• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Securing jsp page in struts 2

 
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!
 
Author
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic