Forums Register Login

JSP hyperlink to protected page

+Pie Number of slices to send: Send
Hello everyone,
I was wondering if there is a way I can hyperlink to protected page. Here is my reasoning, I have a jsp page that allows a user to add/delete items from a database. Once the user has added/deleted an item they are redirected to a confirmation jsp page. From this page I would like to allow the user to go back to the protected add/delete page in order to add/delete another item from the database. Can I do this using a hyper link or do I need to use a form whose action is a servlet in order to redirect the response back to the add/delete page. Here is the code I am trying, and is not working.
+Pie Number of slices to send: Send
It's not at all clear what yea mean by a "protected page".
+Pie Number of slices to send: Send
Sorry I mean a jsp page that is in the WEB-INF directory.
Here is by tree
WebPages
-WEB-INF
-view
-admin.jsp

I should add that a user name and password are needed in order to access this page.

Do I need to store the user name and password in a session in order to allow a hyperlink back to the admin.jsp page?
+Pie Number of slices to send: Send
The whole purpose for putting a JSP under WEB-INF is to prevent just what you are trying to do; so don't even try. A JSP page should never be invoked without its page controller. So your link should be to the page controller, not to the JSP page.
+Pie Number of slices to send: Send
Thank you :)
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 913 times.
Similar Threads
Shoud I use window.location.replace() with Struts?
session tracking remove item (urgent)
Include a jsp file , everytime a hyperlink is clicked
Generate PDF report from jsp
Knowning which link was clicked (take 2)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:48:35.