This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP/Javabean and forwarding  RSS feed

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
Boost this thread!