Instead of using a MAIL subject line "help"
why not put "how to restrict access html file content in tomcat?"

1) Don't use a HTML page (*.html).

2) Use a JSP to add a <%@ include="force_login.jsp" %> to include page segmentation
in every JSP on your site that you want to protect.

In your force_login.jsp use a scriptlet to check that a UserProfile bean is valid
for your web app session. If it is not valid then redirect the request to your site
"login.jsp".

3)

i) Write a dummy "index.html" with a default "<h1>ACCESS PROTECTED</h1>"
and stick it in every directory you wanna protect.
ii) Restrict the access by setting security in the deployment descrip file for your 
web app
 "web.xml".

4) Buy a book on JSP or RTFM or RTFFAQ

--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: Deepak C S <[EMAIL PROTECTED]>@java.sun.com> on 16/01/2001 16:49 ZE5B

Please respond to A mailing list about Java Server Pages specification and reference 
<[EMAIL PROTECTED]>

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and 
[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  help pls


 hi,

1)how to restrict users from accessing html files directly(without
authentication) in tomcat-apache??

2) how to prevent directory listing   for directories under Tomcat context?




--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to