• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven Tomcat plugin precompile JSPs problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've been trying to precompile my JSP pages using Maven and have almost succeded in it.

The problem I'm having has to do with the classpath in use when doing the compiling. The JspC compiler classpath contains only the libraries that are under my webapp directory (the one that is created using 'maven war:webapp').

The JPS pages that I'm trying to precompile need a reference to these libraries: jasper-compiler.jar, jasper-runtime.jar, jspapi.jar and servlet-api.jar. But these are also libraries that I don't want to include to the webapp directory.

So how can I tell Maven (or Jasper JspC) to include some additional libraries to its classpath?

Example of my project structure:

myproject
-- ...
-- lib
-- src
-- target
-- myapp
-- WEB-INF
-- lib (Only this is included in the classpath, why?)
-- tomcat
-- src (the JSP source codes are generated here)

The lib-directory in the root of my project contains the additional libraries mentioned earlier. I have introduced them in the project.xml, but they are not included in to the war structure (intentionally).

My question/problem again: does anyone know how can I make these libraries also available for the JSP compilation?

I'm using the 'maven tomcat:jspc' goal.

And, if I add the additional libraries to the webapp lib directory, the JSPs will be compiled just fine.


Thanks!

JL
reply
    Bookmark Topic Watch Topic
  • New Topic