You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by sa...@locus.apache.org on 2000/10/04 02:16:52 UTC

cvs commit: jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/HttpJspPage positiveJSPInitExtends.jsp positiveJSPInitJSP.jsp

santosh     00/10/03 17:16:52

  Added:       src/server/jsp-tests/jsp/engine/HttpJspPage
                        positiveJSPInitExtends.jsp positiveJSPInitJSP.jsp
  Log:
  watchdog 4.0
  
  Revision  Changes    Path
  1.1                  jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/HttpJspPage/positiveJSPInitExtends.jsp
  
  Index: positiveJSPInitExtends.jsp
  ===================================================================
  <html>
  <title>positiveJSPInitExtends</title>
  <body>
  <%  /**
         Name : positiveJSPInitExtends
         Description: define a class which implements the HttpJspPage and in the 
  	       jsp page use extends directive to make the defined java class
  	       as the super class. now we check the result of
  	       getServletConfig
         Result: we should get the expected string output
    */ %> 
  <!-- to test HttpJspPage implementation -->
  <%@ page extends="engine.HttpJspPage.SuperPage" %>
  <% javax.servlet.ServletConfig con=getServletConfig(); %>
  <% if(con!=null) {
        out.println("it works");
      }else {
        out.println("ServletConfig is null");
      }
  %>
  
  </body>
  </html>
  
  
  1.1                  jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/HttpJspPage/positiveJSPInitJSP.jsp
  
  Index: positiveJSPInitJSP.jsp
  ===================================================================
  <html>
  <title>positiveJSPInitJSP</title>
  <body>
  <%  /**
         Name : positiveJSPInitJSP
         Description: we override the jspInit in the jsp itself
                      and check getServletConfig method works
         Result: we should get the expected string output
    */ %> 
  <!-- to test HttpJspPage implementation -->
  <%! String result; %>
  <%! public void jspInit() {
       javax.servlet.ServletConfig con=getServletConfig();
       if(con!=null) {
        result="it works";
       }else {
         result="ServletConfig is null";
      }
    }
  %>
  <% out.println(result); %>
  
  </body>
  </html>