0

I have to make a simple JSP page that takes 2 inputs as file names and then when you hit submit these files a passed to another method that takes 2 file inputs. i just wante to know how to do this in the second page. the first page is pretty easy u just create 2 text boxes that take inputs and then hit dubmit but then how do i pass these two files to the method?? any help would be greatly appreciated. thanks

3
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by ~s.o.s~
0

you need to be more specific, as what you ask is not clear.
Do you want to only paste name of the files from page_one to page_two or you want to upload file from local machine to remote directory?
These are to very different tasks...

0

i dont need to upload necessarily, the method that takes the inputs and the files are all local, i just need to pass the file names to the method, thats all.

0

But the question here is which method. You can always write a servlet which would handle the client request when the 'submit' button is pressed.

After that, its a simple thing of pulling out the text box values using request.getParameter("textBoxName") .

0

yea i think that is what i need to do, write a servlet. The method is a proprietry method that takes 2 inputs of file names thats all i can tell you. the question is how do i call the method of the class in the servlet??? just load the class in the servlet with the @ attribute??

0

A servlet is a normal Java class extending the HttpServlet class. You can import your 'proprietary' class the way you import normal classes in Java.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.