• Post Reply Bookmark Topic Watch Topic
  • New Topic

Securing jsp page in struts 2

 
Gopi Chand
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to learn struts 2 and i tried the following. there is a user registration page in which user enters all the result.
After that user clicks register button, user will be shown register_success.jsp if the registration succeeds otherwise register_failure.jsp if some prblem with registration..

But the problem is user can give the url like http://localhost:8080/testapp/register_success.jsp or register_failure.jsp and directly try to see the results page withtout registration page. i don't want this to happen..

Without struts i would have placed this under WEB-INF folder and use request dispatcher to redirect the request to the required page, but with struts 2 i couldn't do it..

how to go about this?

Cheers!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no issue putting JSP files under WEB-INF; that's how most people do it.

I suspect you're doing something wrong.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!