Forums Register Login

preventing direct access to JSP pages

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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.

  • +Pie Number of slices to send: Send
    i want to know how to write a filter
    currently all jsp are under WEBINF
    +Pie Number of slices to send: Send
     

    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 ]
    +Pie Number of slices to send: Send
    What is it?
    some how i need to access the action.
    +Pie Number of slices to send: Send
    "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 ]
    You firghten me terribly. I would like to go home now. Here, take this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 1355 times.
    Similar Threads
    help me with struts
    how to catch an exception and do some customized error handling ?
    To perform an action onload of a jsp page only if it meets certain condition
    problem on choosing jsp file direclty
    Authentication Interceptor...
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 29, 2024 01:11:46.