input in JSP page

Thread Solved

Join Date: Nov 2006
Posts: 8
Reputation: qaizaar is an unknown quantity at this point 
Solved Threads: 0
qaizaar qaizaar is offline Offline
Newbie Poster

input in JSP page

 
0
  #1
May 29th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,183
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 481
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: input in JSP page

 
0
  #2
May 29th, 2007
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...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 8
Reputation: qaizaar is an unknown quantity at this point 
Solved Threads: 0
qaizaar qaizaar is offline Offline
Newbie Poster

Re: input in JSP page

 
0
  #3
May 30th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: input in JSP page

 
0
  #4
May 30th, 2007
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").
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 8
Reputation: qaizaar is an unknown quantity at this point 
Solved Threads: 0
qaizaar qaizaar is offline Offline
Newbie Poster

Re: input in JSP page

 
0
  #5
May 30th, 2007
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??
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: input in JSP page

 
0
  #6
May 30th, 2007
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.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC