• 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 restrict the user to see the authorised page

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai

My Question is how to restrict the unauthorised user to see the authorised page through URL. access. in jsp.
[ July 12, 2008: Message edited by: manoj Rksh ]
 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use security constraints.. Open your web.xml file and Just put the folder name between the tags. So the user can't able to access the privileged pages.That's it...
 
Manoj semwal .
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks rajkumar for your kind reply
actually iam new in jsp .
i never used web.xml file so pl tell me in breifly.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlet security and the web.xml file are both big topics - too big to cover in a post here. My advice would be to get an introductory servlet/JSP book, e.g. Head First Servlets/JSP. You could also read up on these concepts in the servlet specification, and study the examples that come with a servlet container like Tomcat.

In the future, please CarefullyChooseOneForum; this one is about JDBC. I'll move it to a more appropriate forum.
 
Manoj semwal .
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai ulf

in my web.xml file
<security-constraint>
<web-resource-collection>
<web-resource-name></web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>

</security-constraint>
in the above coding where i have to give the folder or file name to restrict to anauthorised person.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That would be the url-pattern (of which there can be multiple). "/*" protects everything, but you can be more specific.
 
reply
    Bookmark Topic Watch Topic
  • New Topic