?
Solved

Using getParameter getting null

Posted on 2005-04-01
5
Medium Priority
?
243 Views
Last Modified: 2010-04-01
I'm trying to pass a value to another page and then pass it again to the servlet.  When I post the data to the next page i'm getting  - null.  What am I doing wrong?


<html>
<head>
</head>

<body>
<form name="form" method="post" action="client?action=<%= RequestServlet.REDIRECT %>&firstEntry=<%= request.getParameter("firstentry") %>">
<input type="text" name="firstEntry">
 
  <input type="submit" name="Submit" value="Submit">
</form>

</body>


</html>



0
Comment
Question by:javabeginr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13683100
if you are creating it on the url why u have it on the page as well???

go to this page do a right click -- view source.. post the generated HTML here.. that should help
0
 

Author Comment

by:javabeginr
ID: 13683263
What is it ?  You mean the input name?  Here's the code.

<html>
<head>
</head>

<body>
<form name="form" method="post" action="client?action=2&firstEntry=null">

<input type="text" name="firstEntry">
 
  <input type="submit" name="Submit" value="Submit">
</form>

</body>
</html>



0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 2000 total points
ID: 13683303
you are getting it null here on this page itself...

<form name="form" method="post" action="client?action=2&firstEntry=null">...
i.e. the page thats calling this page is not sending the passing it to this page..
are you sure that the first is sending variable name as ("firstentry")  because thats what you are trying to get in this page..
and remember java is case sensetive..
you most probably are looking for ("firstEntry") instead of ("firstentry")
0
 

Author Comment

by:javabeginr
ID: 13683337
Thanks, I figured it out.  
0
 

Author Comment

by:javabeginr
ID: 13683351
You're right I had a getParameter on the second page as firstentry instead of firstEntry.  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What's worse than having your data encrypted by ransomware? Getting attacked by a so-called "wiper," which simply destroys the data and offers you no hope of ever seeing it again.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question