• 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

preventing direct access to JSP pages

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what if a user types in the direct jsp page into the browser www.xamplesite.com/xample.jsp

No STRUTS action will be called, so that wont work.
how can i take care of it.I doesn't want to go thru menu.
nothing need to be submitted in that jsp page
just i need to call the struts action that gets datas from database, so the user will get updated information and the i wont verify any authentication for user this is just for some known user.
[ November 08, 2005: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can:
  • Put all of your JSP in a directory under WEB-INF
  • Write a filter with a mapping for '*.jsp' to catch any such requests.

  •  
    k mut
    Greenhorn
    Posts: 16
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    i want to know how to write a filter
    currently all jsp are under WEBINF
     
    Sheriff
    Posts: 67746
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    currently all jsp are under WEBINF



    That should be WEB-INF. And if that is the case, then no direct access as you describe is possible.

    I always place my JSP pages under WEB-INF.

    Your question really has nothing at all to do with Struts so I have changed the subject to something more appropriate.
    [ November 08, 2005: Message edited by: Bear Bibeault ]
     
    k mut
    Greenhorn
    Posts: 16
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    What is it?
    some how i need to access the action.
     
    Bear Bibeault
    Sheriff
    Posts: 67746
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    "k mut",

    I noticed that you have also posted this question in the Servlets forum, and it has since been moved to the Struts forum due to your poor use of subject.

    Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

    This topic is now closed. Please continue any discussion in your other post which has been moved to the Struts forum.
    [ November 08, 2005: Message edited by: Bear Bibeault ]
     
    Water proof donuts! Eat them while reading this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic