Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP/Javabean and forwarding

Ben Roy
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a hard time reconciling a good way to handle this common situation:
Simple JSP page with a submit form
Simple javabean which saves the information from the form
Thank you or confim page
The big question is how to do the redirect. The way I've generally been doing it is:
<jsp use bean tag>
<jsp set property tag>
<%if (some condition that tells the page was submitted)%>
<%{do the save operation%>
That way if they did NOT submit anything yet (ie just got here) it displays the page, otherwise it saves the data and redirects. This feels like a work around when I do there a preferred method for accomplishing this?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic