• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JSP form submit questions

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You shouldn't be doing any processing in a JSP. That's a job for a servlet.
 
sandeepc chintaki
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic