• Post Reply Bookmark Topic Watch Topic
  • New Topic

form values in a new windows

 
andreas test
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ,
i have a little problem with this:
i want to let the user fill in some values and after that a new windows should pop up.
in this window i need the values to generate some SQL Query.
with my skript at the bottom all values are null.
has anybody an idea to do it without getting null values ?
<form name="index" method="post" action="/servlet/pdfmain" target="_blank" onSubmit="">
value1: <input type="text" name="value1">
value2: <input type="text" name="value2">
<input type="Submit" name="Submit" value="do">
</form>
if i try to get the values with request.getAttribut("value1");
the value is null
has anybody an idea to solve the problem ?
Thanks in advance.
andreas
 
Dmitriy Pavlyuk
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It so easy to help you.
You must use request.getParameter("value") and it will be work independently in what window you call you servlet.
Dmitriy
 
andreas test
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Dmitriy
it works, thanks.
but now the values are coded in the browser titel bar like this http://127.0.0.1:8080/servlet/PDFlibServlet?value1=212/00 [...]
can i switch this feature off ? ( i am using tomcat )
Thanks in advance.
andreas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!