Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ensuring that page is loaded through Servlet...



Hello again,

Following yours and Darnell Gadberry's advice, placing the files inside WEB-INF/protected/ I can forward using

dispatcher.forward("/WEB-INF/protected/file.jsp");

This is working great! Thanks for your help!

Very Best Regards,

Joachim Haagen Bøe



On 28/05/2005, at 1:07 PM, Bill Manuel wrote:

If you put the files under the WEB-INF folder, they will no longer be
available from the browser.  The only way to get to them is from your
servlet.  This would prevent people from going directly to them
because the WEB-INF is not accessible directly.

Give that a try.

Bill Manuel


On 5/27/05, Joachim Haagen Bøe <email@hidden> wrote:

Hello,

I have a simple controller servlet that verifies the query string, and
dispatches different jsp files according to the specified queries. 

For instance 

site.com/ControllerServlet?page=report 

will forward the request to viewReport.jsp using the ServletContext:

ServletContext sc = getServletContext();
RequestDispatcher dispatcher = sc.getRequestDispatcher(dispatchURL);
dispatcher.forward(request, response);

Since the ControllerServlet controls the login of the webapp, I do not want
anyone to be able to type in

site.com/viewReport.jsp and acccess this file. 

Is there a way that I can ensure that the viewReport.jsp file will return an
error unless it is loaded through the ControllerServlet ? 



Very Best Regards, 

Joachim Haagen Bøe 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Ensuring that page is loaded through Servlet... (From: Joachim Haagen Bøe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.