• 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 make second jsp not accessable directly from url

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i have two jsp pages.login.jsp and second.jsp .after verifying the login.jsp with database i have to enter into the 2nd jsp page.but,if i type http://localhost:8080/project/second.jsp it was appearing with out validating in login.jsp. how can i make second.jsp not visible with out login page validations.
please help me.


[ October 13, 2008: Message edited by: rajesh chowdary ]
 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

You can put second.jsp under security constraint in the web.xml config file.
In other words by making second.jsp page, an authorized page you can restraint
that page to be accessed without login. This way, direct access to this page will redirect the user to the login page setup by you.
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See this:
Form based authentication
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi rajesh chowdary welcome to Javaranch ,

Firstly are you using only JSP's to do the work with no controllers in between?
If yes then consider reworking your design so that it follows the MVC 2 architecture.
Otherwise there will be more of such patch-up problems.

Hope this helps
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic