[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-dev
Subject:    cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade JspInterceptor.java
From:       costin () apache ! org
Date:       2001-04-28 21:14:48
[Download RAW message or body]

costin      01/04/28 14:14:48

  Modified:    src/facade22/org/apache/tomcat/facade JspInterceptor.java
  Log:
  Hack to generate code for a different runtime.
  
  Revision  Changes    Path
  1.22      +15 -0     jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- JspInterceptor.java	2001/04/27 21:45:40	1.21
  +++ JspInterceptor.java	2001/04/28 21:14:47	1.22
  @@ -103,6 +103,7 @@
       Properties args=new Properties(); // args for jasper
       boolean useJspServlet=false; 
       String jspServletCN=JSP_SERVLET;
  +    String runtimePackage;
       
       // -------------------- Jasper options --------------------
       // Options that affect jasper functionality. Will be set on
  @@ -221,6 +222,15 @@
       public void setPageContextPoolSize(int i) {
   	pageContextPoolSize=i;
       }
  +
  +    /** The generator will produce code using a different
  +	runtime ( default is org.apache.jasper.runtime ).
  +	The runtime must use the same names for classes as the
  +	default one, so the code will compile.
  +    */
  +    public void setRuntimePackage(String rp ) {
  +	runtimePackage=rp;
  +    }
       
       // -------------------- Hooks --------------------
   
  @@ -230,6 +240,11 @@
       public void addContext(ContextManager cm, Context ctx)
   	throws TomcatException 
       {
  +	if( runtimePackage!=null ) {
  +	    Constants.JSP_RUNTIME_PACKAGE=runtimePackage;
  +	    Constants.JSP_SERVLET_BASE=runtimePackage+".HttpJspBase";
  +	}
  +
   	JspFactoryImpl factory=new JspFactoryImpl(pageContextPoolSize);
   	
   	JspFactory.setDefaultFactory(factory);
  
  
  

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic