This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add back button using JSTL?

 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does any of you know how to add back button in jsp page using jstl tags? I am not allowed to use javascript code here.
Any help appreciated!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSTL tags have nothing to do with creating UI elements, so they will be of little help to you except perhaps at a low level, helping to generate the necessary markup.

Perhaps you should expand upon the requirements for this "back button" rather than asking how to implement it in a specific technology?
 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page containing form1 and submit1 button. After presing submit1 button, it is going to another jsp page containing form2 and submit2. Now, I want to add back button in this second jsp page so that user can go back to jsp page containing first form if he missed anything.
How can I do this?
 
Paul Clapham
Sheriff
Posts: 21567
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You just need an ordinary HTML button which links to something which displays that page. As already pointed out, you don't need JSTL to do that.
 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I do it without using java script??
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without JavaScript you are reduced to using either a link or a form. There's no other active component without scripting.
 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's why I was thinking about jstl tags? Can't I use them here?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you understand what the JSTL is? In fact, it seems like you are even confused about what JSP is. Perhaps this article can help.

All that JSP, or the JSTL, or any other server-side mechanism can do is to create HTML to send to the browser. Once at the browser, all you've got to work with is HTML, CSS and JavaScript.

If you want to have more than forms and links available to you on the client, you'll need to use JavaScript.
 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the clarification.
 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use redirect via submit for back button functionality?
Example:
<FORM METHOD="GET" ACTION="index.htm"
<INPUT TYPE="submit" Name="redirect" VALUE="To Title Page">
</FORM>
I got it on one of the websites. On jsp page1, after submit, it is going to jsp2 and after filling that page, it is submitting entire data in DB. I am using session to keep form1 data(jsp page1) and then submit it together with form2(jsp page2) in DB.
Will this work?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic