You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jerry Thome <je...@hewitt.com> on 2009/03/25 20:15:30 UTC
JSP Precompile and WebSphere
I have a project where we need to precompile JSPs. I have followed the
instructions here: http://mojo.codehaus.org/jspc-maven-plugin/usage.html
We are servlet spec 2.4, JDK 1.5. Works great. Deploys and runs under my
local Tomcat without problems.
Under WebSphere however is where we encounter an issue.
SRVE0206E: This error typically implies that the servlet was originally
compiled with classes which cannot be located by the server.
SRVE0187E: Check your classpath to ensure that all classes required by the
servlet are present.SRVE0210I: This problem can be debugged by recompiling
the servlet using only the classes in the application's runtime classpath
SRVE0234I: Application classpath=[...]...
Unfortunately, it doesn't tell me what file it is missing. Right now, I'm
going down the route that the generated source is different than what
would have been generated by WebSphere. I'm trying to get a generated JSP
from our dev server from a prior deployment now to compare
Generated from Maven2 project...
public final class error_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent
I'm suspecting I need to include a Jasper jar or somehow change what is
generated during the build process.
While I'm in limbo, just thought I would reach out and see if anyone else
encountered this situation before.
Thanks.
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: JSP Precompile and WebSphere
Posted by Robert Einsle <ro...@einsle.de>.
Hy Jerry,
this is my only war-Project in Workspace. I'ts the only maven-Project in
Workspace.
Robert
Jerry Thome schrieb:
> We have a simple web app. We test locally using Tomcat and then deploy
> through various lifecycles which run WebSphere 6.1. Our JSP precompile
> process doesn't do anything IBM / WAS specific. Some of our JSPs are very
> simple, and some are used by Spring.
>
> We followed the instructions exactly as outlined here:
> http://mojo.codehaus.org/jspc-maven-plugin/usage.html Well, we are using
> JDK 1.5 so we specify that via properties.
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>jspc-maven-plugin</artifactId>
> <executions>
> <execution>
> <id>jspc</id>
> <goals>
> <goal>compile</goal>
> </goals>
> <configuration>
> <source>${compileSource}</source>
> <target>${compileSource}</target>
> <compilerVersion>${compileSource}</compilerVersion>
> </configuration>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webXml>${basedir}/target/jspweb.xml</webXml>
> </configuration>
> </plugin>
>
>
> Then, depending on the J2EE spec you're using, you need to include the
> right dependencies. Make sure to include the jsp-runtime jar too.
>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>jsp-api</artifactId>
> <version>2.0</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>jstl</artifactId>
> <version>1.1.2</version>
> </dependency>
> <dependency>
> <groupId>taglibs</groupId>
> <artifactId>standard</artifactId>
> <version>1.1.2</version>
> </dependency>
>
> <dependency>
> <groupId>tomcat</groupId>
> <artifactId>jasper-runtime</artifactId>
> <version>5.5.15</version>
> </dependency>
>
> We didn't change the WAS deployment descripters either. Prior to using
> this precompile feature, we let WebSphere auto-compile.
>
> I won't guarantee this will work for you, but this is all that we did.
>
> Good luck.
>
>
>
>
>
> asokan02 <as...@aol.com>
>
> 04/07/2009 10:06 AM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
>
>
>
> To
> users@maven.apache.org
> cc
>
> Subject
> RE: JSP Precompile and WebSphere
>
>
>
>
>
>
>
> Hello Jerry
>
> Is it possible to precompile JSPs for WebSphere using the jspc-maven
> plugin without a WebSphere installation on the machine that the comipation
> is done on? We do not have WAS installed on the our continuum servers and
> hence have been stuck compiling JSPs at deployment time. IBM's response
> to our question was that the only option is to run the jspBatch compiler
> that comes with WAS6.1. Could you please post the details of how you got
> the jspc-maven plugin to precompile JSPs for WebSphere?
>
> Thanks
>
>
>
> BTW, thanks for the info Martin.
>
> To follow-up, we had to add a couple dependencies to the WAR in order for
> the precompiled JSPs to work under WebSphere. That's it. The JSP
> servlets generated from WebSphere were a bit different than what's
> generated by our Maven2 project. The source extends different classes.
> Since our classes now extend org.apache.jasper.runtime.HttpJspBase and not
>
> IBM HttpJspBase classes, we had to add the jasper-runtime dependency...
> and maybe 1 or 2 others.
>
> So, not a big deal. It makes sense, I just had to think through it.
>
> Thanks.
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: JSP Precompile and WebSphere
Posted by Jerry Thome <je...@hewitt.com>.
We have a simple web app. We test locally using Tomcat and then deploy
through various lifecycles which run WebSphere 6.1. Our JSP precompile
process doesn't do anything IBM / WAS specific. Some of our JSPs are very
simple, and some are used by Spring.
We followed the instructions exactly as outlined here:
http://mojo.codehaus.org/jspc-maven-plugin/usage.html Well, we are using
JDK 1.5 so we specify that via properties.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<executions>
<execution>
<id>jspc</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>${compileSource}</source>
<target>${compileSource}</target>
<compilerVersion>${compileSource}</compilerVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>${basedir}/target/jspweb.xml</webXml>
</configuration>
</plugin>
Then, depending on the J2EE spec you're using, you need to include the
right dependencies. Make sure to include the jsp-runtime jar too.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
<version>5.5.15</version>
</dependency>
We didn't change the WAS deployment descripters either. Prior to using
this precompile feature, we let WebSphere auto-compile.
I won't guarantee this will work for you, but this is all that we did.
Good luck.
asokan02 <as...@aol.com>
04/07/2009 10:06 AM
Please respond to
"Maven Users List" <us...@maven.apache.org>
To
users@maven.apache.org
cc
Subject
RE: JSP Precompile and WebSphere
Hello Jerry
Is it possible to precompile JSPs for WebSphere using the jspc-maven
plugin without a WebSphere installation on the machine that the comipation
is done on? We do not have WAS installed on the our continuum servers and
hence have been stuck compiling JSPs at deployment time. IBM's response
to our question was that the only option is to run the jspBatch compiler
that comes with WAS6.1. Could you please post the details of how you got
the jspc-maven plugin to precompile JSPs for WebSphere?
Thanks
BTW, thanks for the info Martin.
To follow-up, we had to add a couple dependencies to the WAR in order for
the precompiled JSPs to work under WebSphere. That's it. The JSP
servlets generated from WebSphere were a bit different than what's
generated by our Maven2 project. The source extends different classes.
Since our classes now extend org.apache.jasper.runtime.HttpJspBase and not
IBM HttpJspBase classes, we had to add the jasper-runtime dependency...
and maybe 1 or 2 others.
So, not a big deal. It makes sense, I just had to think through it.
Thanks.
--
View this message in context:
http://n2.nabble.com/JSP-Precompile-and-WebSphere-tp2534484p2599460.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
RE: JSP Precompile and WebSphere
Posted by asokan02 <as...@aol.com>.
Hello Jerry
Is it possible to precompile JSPs for WebSphere using the jspc-maven plugin without a WebSphere installation on the machine that the comipation is done on? We do not have WAS installed on the our continuum servers and hence have been stuck compiling JSPs at deployment time. IBM's response to our question was that the only option is to run the jspBatch compiler that comes with WAS6.1. Could you please post the details of how you got the jspc-maven plugin to precompile JSPs for WebSphere?
Thanks
BTW, thanks for the info Martin.
To follow-up, we had to add a couple dependencies to the WAR in order for
the precompiled JSPs to work under WebSphere. That's it. The JSP
servlets generated from WebSphere were a bit different than what's
generated by our Maven2 project. The source extends different classes.
Since our classes now extend org.apache.jasper.runtime.HttpJspBase and not
IBM HttpJspBase classes, we had to add the jasper-runtime dependency...
and maybe 1 or 2 others.
So, not a big deal. It makes sense, I just had to think through it.
Thanks.
--
View this message in context: http://n2.nabble.com/JSP-Precompile-and-WebSphere-tp2534484p2599460.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: JSP Precompile and WebSphere
Posted by Jerry Thome <je...@hewitt.com>.
BTW, thanks for the info Martin.
To follow-up, we had to add a couple dependencies to the WAR in order for
the precompiled JSPs to work under WebSphere. That's it. The JSP
servlets generated from WebSphere were a bit different than what's
generated by our Maven2 project. The source extends different classes.
Since our classes now extend org.apache.jasper.runtime.HttpJspBase and not
IBM HttpJspBase classes, we had to add the jasper-runtime dependency...
and maybe 1 or 2 others.
So, not a big deal. It makes sense, I just had to think through it.
Thanks.
"Martin Gainty" <mg...@hotmail.com>
03/25/2009 04:28 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>
To
users@maven.apache.org
cc
Subject
RE: JSP Precompile and WebSphere
Here is what I found for Websphere documentation for JSPCBuild.xml
/**************************WINDOWS***************************/
Windows: ant -Dwas.home=%WAS_HOME% -Dear.path=%EAR_PATH%
-Dextract.dir=%EXTRACT_DIR%
Windows: ant jspc2 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME%
-Dwebmodule.name=%MOD_NAME%
Windows: ant jspc3 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME%
-Dwebmodule.name=%MOD_NAME% -Ddir.name=%DIR_NAME%
/********************************UNIX***************************/
Unix: ant -Dwas.home=$WAS_HOME -Dear.path=$EAR_PATH
-Dextract.dir=$EXTRACT_DIR
Unix: ant jspc2 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME
-Dwebmodule.name=$MOD_NAME
Unix: ant jspc3 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME
-Dwebmodule.name=$MOD_NAME -Ddir.name=$DIR_NAME
/*****JSPCBuild.xml from websphere displayed for your
edification**********/
<!-- JspCBuild.xml - sample build.xml for the public WebSphere Ant task
JspC. JspC is included in -->
<!-- WebSphere Application Server and is found in the jar wsanttasks.jar.
-->
<!-- JspC is an Ant front-end to the JSP Batch Compiler. Descriptions of
the attributes can -->
<!-- be found in the Information Center, and in the file
batchcompiler.properties.default which -->
<!-- is found in {WAS_HOME}/bin. -->
<!-- -->
<!-- JspC Attribute Equivalent Batch Compiler Parameter -->
<!-- ============== =================================== -->
<!-- earPath -ear.path -->
<!-- warPath -war.path -->
<!-- src -->
<!-- Same as warPath, for backward compatibility -war.path -->
<!-- enterpriseAppName -enterpriseapp.name -->
<!-- responseFile -response.file -->
<!-- webmoduleName -webmodule.name -->
<!-- fileName -filename -->
<!-- configRoot -config.root -->
<!-- cellName -cell.name -->
<!-- nodeName -node.name -->
<!-- serverName -server.name -->
<!-- extractToDir -extractToDir -->
<!-- compileToDir -compileToDir -->
<!-- toDir -->
<!-- same as compileToDir, for backward compatibility -compileToDir
-->
<!-- compileToWebInf -compileToWebInf -->
<!-- jspCompileClasspath -jspCompileClasspath -->
<!-- compilerOptions -compilerOptions -->
<!-- recurse -recurse -->
<!-- removeTempDir -removeTempDir -->
<!-- translate -translate -->
<!-- compile -compile -->
<!-- forceCompilation -forceCompilation -->
<!-- useFullPackageNames -useFullPackageNames -->
<!-- trackDependencies -trackDependencies -->
<!-- createDebugClassfiles -createDebugClassfiles -->
<!-- keepgenerated -keepgenerated -->
<!-- keepGeneratedclassfiles -keepGeneratedclassfiles -->
<!-- usePageTagPool -usePageTagPool -->
<!-- useThreadTagPool -useThreadTagPool -->
<!-- classloaderParentFirst -classloader.parentFirst -->
<!-- classloaderSingleWarClassloader -classloader.singleWarClassloader -->
<!-- additionalClasspath -additional.classpath -->
<!-- classpath -->
<!-- same as additionalClasspath, for backward compatibility
-additional.classpath -->
<!-- verbose -verbose -->
<!-- deprecation -deprecation -->
<!-- javaEncoding -javaEncoding -->
<!-- compileWithAssert -compileWithAssert -->
<!-- useJikes -useJikes -->
<!-- jspFileExtensions -jsp.file.extensions -->
<!-- logLevel -log.level -->
<!-- wasHome none
-->
<!-- classpathref none
-->
<!-- -->
<!-- Below is an example of a build script with multiple targets, each
with different attributes. -->
<!-- The following commands can be used to execute the script: -->
<!-- on Windows: ant -Dwas.home=%WAS_HOME% -Dear.path=%EAR_PATH%
-Dextract.dir=%EXTRACT_DIR% -->
<!-- ant jspc2 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME%
-Dwebmodule.name=%MOD_NAME% -->
<!-- ant jspc3 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME%
-Dwebmodule.name=%MOD_NAME% -Ddir.name=%DIR_NAME% -->
<!-- on Unix: ant -Dwas.home=$WAS_HOME -Dear.path=$EAR_PATH
-Dextract.dir=$EXTRACT_DIR -->
<!-- ant jspc2 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME
-Dwebmodule.name=$MOD_NAME -->
<!-- ant jspc3 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME
-Dwebmodule.name=$MOD_NAME -Ddir.name=$DIR_NAME -->
<project name="JSP Precompile" default="jspc1" basedir=".">
<taskdef name="wsjspc" classname="com.ibm.websphere.ant.tasks.JspC"/>
<target name="jspc1" description="example using a path to an EAR, and
extracting the EAR to a directory">
<wsjspc wasHome="${was.home}"
earpath="${ear.path}"
forcecompilation="true"
extractToDir="${extract.dir}"
useThreadTagPool="true"
keepgenerated="true"
jspCompileClasspath=""
/>
</target>
<target name="jspc2" description="example using an enterprise app and
webmodule">
<wsjspc wasHome="${was.home}"
enterpriseAppName="${app.name}"
webmoduleName="${webmodule.name}"
removeTempDir="true"
forcecompilation="true"
keepgenerated="true"
jspCompileClasspath=""
/>
</target>
<target name="jspc3" description="example using an enterprise app,
webmodule and specific directory">
<wsjspc wasHome="${was.home}"
enterpriseAppName="${app.name}"
webmoduleName="${webmodule.name}"
fileName="${dir.name}"
recurse="false"
forcecompilation="true"
keepgenerated="true"
jspCompileClasspath=""
/>
</target>
</project>
HTH
Martin
______________________________________________
Disclaimer and confidentiality note
This message is confidential and may be privileged. If you are not the
intended recipient, we kindly ask you to please inform the sender. Any
unauthorised dissemination or copying hereof is prohibited. This message
serves for information purposes only and shall not have any legally
binding effect. Given that e-mails can easily be subject to manipulation,
we can not accept any liability for the content provided.
> To: users@maven.apache.org
> Subject: JSP Precompile and WebSphere
> From: jerry.thome@hewitt.com
> Date: Wed, 25 Mar 2009 14:15:30 -0500
>
> I have a project where we need to precompile JSPs. I have followed the
> instructions here:
http://mojo.codehaus.org/jspc-maven-plugin/usage.html
>
> We are servlet spec 2.4, JDK 1.5. Works great. Deploys and runs under
my
> local Tomcat without problems.
>
> Under WebSphere however is where we encounter an issue.
>
> SRVE0206E: This error typically implies that the servlet was originally
> compiled with classes which cannot be located by the server.
> SRVE0187E: Check your classpath to ensure that all classes required by
the
> servlet are present.SRVE0210I: This problem can be debugged by
recompiling
> the servlet using only the classes in the application's runtime
classpath
> SRVE0234I: Application classpath=[...]...
>
> Unfortunately, it doesn't tell me what file it is missing. Right now,
I'm
> going down the route that the generated source is different than what
> would have been generated by WebSphere. I'm trying to get a generated
JSP
> from our dev server from a prior deployment now to compare
>
> Generated from Maven2 project...
> public final class error_jsp extends
org.apache.jasper.runtime.HttpJspBase
> implements org.apache.jasper.runtime.JspSourceDependent
>
> I'm suspecting I need to include a Jasper jar or somehow change what is
> generated during the build process.
>
> While I'm in limbo, just thought I would reach out and see if anyone
else
> encountered this situation before.
>
> Thanks.
>
>
>
> The information contained in this e-mail and any accompanying documents
may contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if
this message has been addressed to you in error, please immediately alert
the sender by reply e-mail and then delete this message, including any
attachments. Any dissemination, distribution or other use of the contents
of this message by anyone other than the intended recipient is strictly
prohibited. All messages sent to and from this e-mail address may be
monitored as permitted by applicable law and regulations to ensure
compliance with our internal policies and to protect our business. E-mails
are not secure and cannot be guaranteed to be error free as they can be
intercepted, amended, lost or destroyed, or contain viruses. You are
deemed to have accepted these risks if you communicate with us by e-mail.
>
>
_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
RE: JSP Precompile and WebSphere
Posted by Martin Gainty <mg...@hotmail.com>.
Here is what I found for Websphere documentation for JSPCBuild.xml
/**************************WINDOWS***************************/
Windows: ant -Dwas.home=%WAS_HOME% -Dear.path=%EAR_PATH% -Dextract.dir=%EXTRACT_DIR%
Windows: ant jspc2 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME% -Dwebmodule.name=%MOD_NAME%
Windows: ant jspc3 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME% -Dwebmodule.name=%MOD_NAME% -Ddir.name=%DIR_NAME%
/********************************UNIX***************************/
Unix: ant -Dwas.home=$WAS_HOME -Dear.path=$EAR_PATH -Dextract.dir=$EXTRACT_DIR
Unix: ant jspc2 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME -Dwebmodule.name=$MOD_NAME
Unix: ant jspc3 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME -Dwebmodule.name=$MOD_NAME -Ddir.name=$DIR_NAME
/*****JSPCBuild.xml from websphere displayed for your edification**********/
<!-- JspCBuild.xml - sample build.xml for the public WebSphere Ant task JspC. JspC is included in -->
<!-- WebSphere Application Server and is found in the jar wsanttasks.jar. -->
<!-- JspC is an Ant front-end to the JSP Batch Compiler. Descriptions of the attributes can -->
<!-- be found in the Information Center, and in the file batchcompiler.properties.default which -->
<!-- is found in {WAS_HOME}/bin. -->
<!-- -->
<!-- JspC Attribute Equivalent Batch Compiler Parameter -->
<!-- ============== =================================== -->
<!-- earPath -ear.path -->
<!-- warPath -war.path -->
<!-- src -->
<!-- Same as warPath, for backward compatibility -war.path -->
<!-- enterpriseAppName -enterpriseapp.name -->
<!-- responseFile -response.file -->
<!-- webmoduleName -webmodule.name -->
<!-- fileName -filename -->
<!-- configRoot -config.root -->
<!-- cellName -cell.name -->
<!-- nodeName -node.name -->
<!-- serverName -server.name -->
<!-- extractToDir -extractToDir -->
<!-- compileToDir -compileToDir -->
<!-- toDir -->
<!-- same as compileToDir, for backward compatibility -compileToDir -->
<!-- compileToWebInf -compileToWebInf -->
<!-- jspCompileClasspath -jspCompileClasspath -->
<!-- compilerOptions -compilerOptions -->
<!-- recurse -recurse -->
<!-- removeTempDir -removeTempDir -->
<!-- translate -translate -->
<!-- compile -compile -->
<!-- forceCompilation -forceCompilation -->
<!-- useFullPackageNames -useFullPackageNames -->
<!-- trackDependencies -trackDependencies -->
<!-- createDebugClassfiles -createDebugClassfiles -->
<!-- keepgenerated -keepgenerated -->
<!-- keepGeneratedclassfiles -keepGeneratedclassfiles -->
<!-- usePageTagPool -usePageTagPool -->
<!-- useThreadTagPool -useThreadTagPool -->
<!-- classloaderParentFirst -classloader.parentFirst -->
<!-- classloaderSingleWarClassloader -classloader.singleWarClassloader -->
<!-- additionalClasspath -additional.classpath -->
<!-- classpath -->
<!-- same as additionalClasspath, for backward compatibility -additional.classpath -->
<!-- verbose -verbose -->
<!-- deprecation -deprecation -->
<!-- javaEncoding -javaEncoding -->
<!-- compileWithAssert -compileWithAssert -->
<!-- useJikes -useJikes -->
<!-- jspFileExtensions -jsp.file.extensions -->
<!-- logLevel -log.level -->
<!-- wasHome none -->
<!-- classpathref none -->
<!-- -->
<!-- Below is an example of a build script with multiple targets, each with different attributes. -->
<!-- The following commands can be used to execute the script: -->
<!-- on Windows: ant -Dwas.home=%WAS_HOME% -Dear.path=%EAR_PATH% -Dextract.dir=%EXTRACT_DIR% -->
<!-- ant jspc2 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME% -Dwebmodule.name=%MOD_NAME% -->
<!-- ant jspc3 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME% -Dwebmodule.name=%MOD_NAME% -Ddir.name=%DIR_NAME% -->
<!-- on Unix: ant -Dwas.home=$WAS_HOME -Dear.path=$EAR_PATH -Dextract.dir=$EXTRACT_DIR -->
<!-- ant jspc2 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME -Dwebmodule.name=$MOD_NAME -->
<!-- ant jspc3 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME -Dwebmodule.name=$MOD_NAME -Ddir.name=$DIR_NAME -->
<project name="JSP Precompile" default="jspc1" basedir=".">
<taskdef name="wsjspc" classname="com.ibm.websphere.ant.tasks.JspC"/>
<target name="jspc1" description="example using a path to an EAR, and extracting the EAR to a directory">
<wsjspc wasHome="${was.home}"
earpath="${ear.path}"
forcecompilation="true"
extractToDir="${extract.dir}"
useThreadTagPool="true"
keepgenerated="true"
jspCompileClasspath=""
/>
</target>
<target name="jspc2" description="example using an enterprise app and webmodule">
<wsjspc wasHome="${was.home}"
enterpriseAppName="${app.name}"
webmoduleName="${webmodule.name}"
removeTempDir="true"
forcecompilation="true"
keepgenerated="true"
jspCompileClasspath=""
/>
</target>
<target name="jspc3" description="example using an enterprise app, webmodule and specific directory">
<wsjspc wasHome="${was.home}"
enterpriseAppName="${app.name}"
webmoduleName="${webmodule.name}"
fileName="${dir.name}"
recurse="false"
forcecompilation="true"
keepgenerated="true"
jspCompileClasspath=""
/>
</target>
</project>
HTH
Martin
______________________________________________
Disclaimer and confidentiality note
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.
> To: users@maven.apache.org
> Subject: JSP Precompile and WebSphere
> From: jerry.thome@hewitt.com
> Date: Wed, 25 Mar 2009 14:15:30 -0500
>
> I have a project where we need to precompile JSPs. I have followed the
> instructions here: http://mojo.codehaus.org/jspc-maven-plugin/usage.html
>
> We are servlet spec 2.4, JDK 1.5. Works great. Deploys and runs under my
> local Tomcat without problems.
>
> Under WebSphere however is where we encounter an issue.
>
> SRVE0206E: This error typically implies that the servlet was originally
> compiled with classes which cannot be located by the server.
> SRVE0187E: Check your classpath to ensure that all classes required by the
> servlet are present.SRVE0210I: This problem can be debugged by recompiling
> the servlet using only the classes in the application's runtime classpath
> SRVE0234I: Application classpath=[...]...
>
> Unfortunately, it doesn't tell me what file it is missing. Right now, I'm
> going down the route that the generated source is different than what
> would have been generated by WebSphere. I'm trying to get a generated JSP
> from our dev server from a prior deployment now to compare
>
> Generated from Maven2 project...
> public final class error_jsp extends org.apache.jasper.runtime.HttpJspBase
> implements org.apache.jasper.runtime.JspSourceDependent
>
> I'm suspecting I need to include a Jasper jar or somehow change what is
> generated during the build process.
>
> While I'm in limbo, just thought I would reach out and see if anyone else
> encountered this situation before.
>
> Thanks.
>
>
>
> The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
>
>
_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme