File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes servlet problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet problem" Watch "servlet problem" New topic
Author

servlet problem

salvador rcn
Ranch Hand

Joined: Feb 18, 2004
Posts: 51
<html>

<head>
<title>New Page 1</title>
</head>

<body>

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p>                                                                     
<input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"></p>
</form>



<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p>                                                                     
<input type="text" name="T2" size="20"><input type="submit" value="Submit" name="B1"></p>
</form>

</body>

</html>


here i have 2 forms. T1, T2 two form fields in two form . how do i access T1,T2 in servlet ?
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 579
If u r expecting your servlet to pick up both T1 and T2 at the same time it wont as soon as you press submit you will call the servlet. So it can only ever pick up T1 or T2. Is that your question.

Tony
salvador rcn
Ranch Hand

Joined: Feb 18, 2004
Posts: 51
getparameter() works for single form...but here two forms r there.so i am in trouble.
salvador rcn
Ranch Hand

Joined: Feb 18, 2004
Posts: 51
is there any soln ?
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 579
What are u tring to do first, why do you need two forms when u can combine them into one form. If u can explain the business reason, I could come up with a solution. Are both forms on the same page. Are the forms on separate pages.

Tony
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet problem