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

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...

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.

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") .

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??

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.