You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@locus.apache.org on 2000/08/30 07:39:28 UTC

cvs commit: jakarta-tomcat/src/examples/jsp/security policy.jsp

costin      00/08/29 22:39:28

  Added:       src/examples/jsp/security policy.jsp
  Log:
  Added a small policy example ( it should fail if policy is
  enabled). I couldn't think of a better example - this is probably
  pretty bad ( creates a file in /tmp )
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat/src/examples/jsp/security/policy.jsp
  
  Index: policy.jsp
  ===================================================================
  <h1>Security test </h1>
  
  Attempting to create /tmp/sectest
  <% 
   try {
    java.io.FileWriter f=new java.io.FileWriter("/tmp/sectest");
    f.write("Can write"); 
    f.close();
   } catch(Exception ex ) {
  %>
  <h2>Exception <%= ex %> </h2>
  <%  ex.printStackTrace( new java.io.PrintWriter(out) ); 
   }
  %>