| Author |
How to add back button using JSTL?
|
namita sasa
Ranch Hand
Joined: Apr 20, 2009
Posts: 56
|
|
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
Joined: Jan 10, 2002
Posts: 56554
|
|
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?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
namita sasa
Ranch Hand
Joined: Apr 20, 2009
Posts: 56
|
|
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
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
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
Joined: Apr 20, 2009
Posts: 56
|
|
How can I do it without using java script??
Thanks.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
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
Joined: Apr 20, 2009
Posts: 56
|
|
|
That's why I was thinking about jstl tags? Can't I use them here?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
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
Joined: Apr 20, 2009
Posts: 56
|
|
|
Thanks for the clarification.
|
 |
namita sasa
Ranch Hand
Joined: Apr 20, 2009
Posts: 56
|
|
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?
|
 |
 |
|
|
subject: How to add back button using JSTL?
|
|
|