User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,521 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,663 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1072 | Replies: 5 | Solved
Reply
Join Date: Nov 2006
Posts: 8
Reputation: qaizaar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
qaizaar qaizaar is offline Offline
Newbie Poster

input in JSP page

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,230
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: input in JSP page

  #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)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Nov 2006
Posts: 8
Reputation: qaizaar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
qaizaar qaizaar is offline Offline
Newbie Poster

Re: input in JSP page

  #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  
Join Date: Jun 2006
Location: India
Posts: 6,812
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 339
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: input in JSP page

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

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Nov 2006
Posts: 8
Reputation: qaizaar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
qaizaar qaizaar is offline Offline
Newbie Poster

Re: input in JSP page

  #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  
Join Date: Jun 2006
Location: India
Posts: 6,812
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 339
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: input in JSP page

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

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:36 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC