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 <asoka...@aol.com> 

04/07/2009 10:06 AM
Please respond to
"Maven Users List" <users@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@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. 


Reply via email to