Changeset 4222


Ignore:
Timestamp:
Apr 15, 2008, 2:24:33 PM (15 years ago)
Author:
Nicklas Nordborg
Message:

References #989: Add support for using extension classes in custom JSP pages

This is now implemented. Need to write documentation also.

Location:
trunk
Files:
11 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r4219 r4222  
    263263  <target
    264264    name="web"
    265     depends="core,coreplugins,web.jar,copy.config,copy.jar"
     265    depends="core,coreplugins,web.jar,xjspcompiler,copy.config,copy.jar"
    266266    description="Build web client application for local use"
    267267    >
     
    825825    </javac>
    826826  </target>
     827 
     828  <!-- XJsp compiler targets -->
     829  <target
     830    name="xjspcompiler"
     831    depends="web.compile,core.compile"
     832    description="Compile the XJsp compiler and put JAR in ./bin/jar"
     833    >
     834    <mkdir dir="${build}/misc/compiler" />
     835    <javac
     836      srcdir="${src}/misc/compiler"
     837      destdir="${build}/misc/compiler"
     838      classpathref="web.classpath"
     839      encoding="${javac.encoding}"
     840      debug="true"
     841      deprecation="true"
     842      source="${javac.source}"
     843      target="${javac.target}"
     844      >
     845      <compilerarg value="${javac.arg}" />
     846    </javac>
     847    <jar
     848      basedir="${build}/misc/compiler"
     849      jarfile="${bin}/jar/base2-xjsp-compiler.jar"
     850    />
     851  </target>
    827852 
    828853  <!-- webservices targets -->
  • trunk/config/dist/web.xml

    r4221 r4222  
    172172  </servlet-mapping>
    173173 
     174  <!-- Mapping *.xjsp files to a custom JSP compiler that adds extension JAR file to classpath -->
     175  <!-- EXPERIMENTAL!! -->
     176    <servlet>
     177        <servlet-name>xjsp</servlet-name>
     178        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
     179        <init-param>
     180            <param-name>fork</param-name>
     181            <param-value>false</param-value>
     182        </init-param>
     183        <init-param>
     184          <param-name>compilerClassName</param-name>
     185          <param-value>net.sf.basedb.clients.web.extensions.XJspCompiler</param-value>
     186        </init-param>
     187    </servlet>
     188    <servlet-mapping>
     189        <servlet-name>xjsp</servlet-name>
     190        <url-pattern>*.xjsp</url-pattern>
     191    </servlet-mapping>
     192
     193 
    174194  <!-- The CompileAll servlet used to compile all JSP pages -->
    175195  <!-- EXPERIMENTAL!! -->
Note: See TracChangeset for help on using the changeset viewer.