This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP form submit questions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "JSP form submit questions" Watch "JSP form submit questions" New topic
Author

JSP form submit questions

sandeepc chintaki
Greenhorn

Joined: Aug 21, 2006
Posts: 11
Hi

I have a similar query

a) I have a html with a username form property submitted it to action.jsp
b) action.jsp does some processing . Sets some hidden form properties . And here I want to go to checkuser.jsp page automatically ; I do not want to use form submit here

if we look it completely the user experience is they enter the username in html page and they go to action.jsp (user does not know this ) and then to checkuser.jsp.

How can I do this in JSP?

Thanks a lot for helping..

Cheers
Sandeep
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

You shouldn't be doing any processing in a JSP. That's a job for a servlet.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
sandeepc chintaki
Greenhorn

Joined: Aug 21, 2006
Posts: 11
Hi thanks for the reply. Can you please suggest me how we can do that in Servlets?

sendRedirect or forward or include. Which of these would carry the current page form properties to another jsp/servlet.

thanks
Sandeep
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

That greatly depends on what it is you are actually trying to accomplish. All of these mechanisms exist so you can use the appropriate one for the occasion. One size does not fit all.

For an overview of modern web app structuring best practices, please read this article.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JSP form submit questions
 
Similar Threads
Submit Button in JSP Page Scrolls Frame!
How to get values of a different page
jsp:forward - whats wrong with this code?
showing one form if the other form is submitted
Sending email