The Artima Developer Community
Sponsored Link

Java Answers Forum
I get null value when I send form to be processed

1 reply on 1 page. Most recent reply: Sep 4, 2002 10:31 PM by Javed

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Sid Northfield

Posts: 20
Nickname: northfield
Registered: Aug, 2002

I get null value when I send form to be processed Posted: Sep 4, 2002 1:11 PM
Reply to this message Reply
Advertisement
Hello I get" null" each time I type my name and send it to be processed. My first file is called form.jsp and the second is called processform.jsp.

Why do I get the null for login name?
I do not get this for location?
I have just read that getParameter() is deprecated? could this be the problem?

<html>
<head>
<title> Welcome</title>
</head>
<body>
<h1> Welocme to my Web site. </h1>
<form action="processform.jsp" method="get">
<br> Enter your name:
<input type="text" name"userName"><br>

Where do you live?
<input type="text" name="region"><br>

<input type="submit" name="submit" value= "Submit button">

<input type="reset" name="reset" value= "Reset button">
<br>
</form>
</body>
<html>

<html>
<head>
<title> Thank you </title>
</head>
<body>
Your information has been processed.
<hr>
Thank You <%= request.getParameter("userName") %>
<br>
Your live in <%= request.getParameter("region") %>
</body>
</html>


Your information has been processed.
------------------------------------------------------------------------------ --
Thank You null
Your live in London


Javed

Posts: 15
Nickname: javedm
Registered: Aug, 2002

Re: I get null value when I send form to be processed Posted: Sep 4, 2002 10:31 PM
Reply to this message Reply
<input type="text" name"userName"><br>

u have missed '=' in name="userName"

This is a small mistake but kills lot of time.

Flat View: This topic has 1 reply on 1 page
Topic: document.myform.submit() Previous Topic   Next Topic Topic: need a code for this??How can i do it in JSP??

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use