Hi All
 
I have a small security problem and I would like to know how I can fix it. My servlet sends a request to an HTML file if the request is valid. The code snippet is as  follows:
 
if((user.equals("administrator")) && (passwd.equals("author"))){
 
out.println("<HTML>");
   out.print("<head>" + "<meta http-equiv=\"refresh\" content=\"2; url=" +
   "
http://24.181.167.18:8080/ValidAuthor.htm;\">" + "</head>");
   out.println("<BODY>");
   out.println("<BR>" + "<BR>" + "<BR>");
   out.println("<BR>" + "<BR>" + "<BR>");
   out.println("<BR>" + "<BR>" + "<BR>");
   out.println("<BR>" + "<BR>" + "<BR>");
   out.println("<p align=center>"+"<img src=http://24.181.167.18:8080/welcome.gif>" + "</p>");
   out.println("</BODY>");
   out.println("</HTML>");
}
 
I would like to protect the ValidAuthor.htm file from direct access and the only way it can be accessed is through this servlet. Can someone help me with this problem.
 
Thanks,
Kalyan


Get your FREE download of MSN Explorer at http://explorer.msn.com

___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to