• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to add back button using JSTL?

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 67746
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
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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I do it without using java script??
Thanks.
 
Bear Bibeault
Sheriff
Posts: 67746
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
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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's why I was thinking about jstl tags? Can't I use them here?
 
Bear Bibeault
Sheriff
Posts: 67746
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
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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the clarification.
 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
It's a tiny ad only because the water is so cold.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic