Just to close the loop on this, it appears the solution was to add:

         <dependency>
             <groupId>tomcat</groupId>
             <artifactId>jasper-compiler-jdt</artifactId>
             <version>5.5.15</version>
             <scope>compile</scope>
         </dependency>

To the pom file, in addition to all the other tomcat dependencies already listed.

-Josh
On Feb 22, 2008, at 12:12 PM, Wayne Fay wrote:

Its ok, you don't need to go overboard apologizing, I just want to
make sure you saw my initial response. ;-)

For the first issue, I was simply suggesting:

<build>
<plugins>
<plugin>
(surefire group, artifact, version)
<configurations/>
<executions/>
<dependencies>
<dependency>
(servlet-api, etc)
</dep>
</deps, plugin, plugins, build>

For the second issue, I imagine you could perhaps tell the embedded
Tomcat to use the compiled classes in /target/_pages (the default)
instead of the JSPs. But obviously you should first try to figure out
why the JSPs won't compile with the embedded Tomcat, that might be
easiest for you.

Wayne

On 2/22/08, Joshua Pollak <[EMAIL PROTECTED]> wrote:
Wayne,

I apologize, something must have been wrong with my subscription,
because neither my post, nor your reply (or any of the other messages
posted yesterday) were showing up in my mailbox. I checked the online
archive (mail-archives.apache.org) to see if it was something wrong on
my end (mail filter, etc), and I couldn't find my message, so I
assumed it had been silently canned by the mailing list. I re-
subscribed to the list and reposted.

Again, I apologize for sending the message, but I wasn't received list
messages, and for some reason I am now. Now I see my original post on
mail-archive.com, I guess I should have checked there first.

In response to your original suggestions:

You could try adding the servlet-api artifact as a dependency to
surefire, that might do it.

I'm not sure how to go about doing that... do you mean modifying
surefire's own pom?
Could you perhaps compile the JSPs with jspc-maven-plugin instead of
asking Tomcat to do it? I don't know that its an ideal solution, but
we've been using j-m-p for a while very successfully.

Well, I'll admit I'm not a jsp expert, but were running embedded
tomcat and not using a war, just a directory of jsps. I looked at the
jspc plugin, but I'm a bit confused about how it would integrate into
our system. I'll take a look.

-Josh

On Feb 22, 2008, at 11:33 AM, Wayne Fay wrote:

Is there a reason you're sending this message again when I replied to
it yesterday, rather than just replying to that message to continue
the thread?

I'll readily admit that I didn't really give you an answer, but its
not polite to send the same message again so quickly, especially
without responding to the other thread first.

Wayne

On 2/22/08, Joshua Pollak <[EMAIL PROTECTED]> wrote:
Hello,

I have a project with an embedded tomcat instance which is supposed
to
be compiling some JSPs. When I run a simple unit test that fetches
our
index page, I get a javac compiler error in our logs. (See below,
complaining that package javax.servlet is missing). I have all the
needed tomcat packages (especially servlet-api) as a dependency in
the
pom file, so it should be on the classpath, yet the compile doesn't
see it.

I'm wondering if the Java compiler doesn't disect the surefirebooter
jar properly?

Is there anyone who has run into this or has a solution?

-Josh

2008-02-21 20:13:40,251 [http-8080-Processor4] ERROR
apache.jasper.compiler.Compiler - Javac exception
Compile failed; see the compiler error output for details.

The compiler output looks like this:

008-02-21 20:13:40,252 [http-8080-Processor4] ERROR
apache.jasper.compiler.Compiler - Env: Compile: javaFileName=/ Users/
jpollak/src/software/projects/mhs/trunk/
mhs-core/work/mhsEngine/kiva/distrosite//org/apache/jsp/
index_jsp.java
classpath=/Users/jpollak/src/software/projects/mhs/trunk/mhs- core/ work/mhsEngine/kiva/distrosite:/private/tmp/ surefirebooter4943.jar:/
System/Library/Java/Ext
ensions/CoreAudio.jar:/System/Library/Java/Extensions/dns_sd.jar:/
System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/
Extensions/j3dcore.jar:/System
/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/
Extensions/
jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/
Library/Java/Extensions/
libJ3D.jnilib:/System/Library/Java/Extensions/libJ3DAudio.jnilib:/
System/Library/Java/Extensions/libJ3DUtils.jnilib:/System/Library/
Java/
Extensions/libmlib_jai.j
nilib:/System/Library/Java/Extensions/libQTJNative.jnilib:/System/
Library/Java/Extensions/libShark.jnilib:/System/Library/Java/
Extensions/mlibwrapper_jai.jar:/Sy
stem/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/
Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/
System/Library/Frameworks/Jav
aVM.framework/Versions/1.5.0/Home/lib/ext/apple_provider.jar:/ System/
Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/
dnsns.jar:/System/Library/Fr
ameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/
localedata.jar:/
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/
ext/
sunjce_provider.jar:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/ lib/
ext/sunpkcs11.jar
  cp=/opt/maven/boot/classworlds-1.1.jar
  cp=/Users/jpollak/src/software/projects/mhs/trunk/mhs-core/work/
mhsEngine/kiva/distrosite
  cp=/private/tmp/surefirebooter4943.jar
  cp=/System/Library/Java/Extensions/CoreAudio.jar
  cp=/System/Library/Java/Extensions/dns_sd.jar
  cp=/System/Library/Java/Extensions/j3daudio.jar
  cp=/System/Library/Java/Extensions/j3dcore.jar
  cp=/System/Library/Java/Extensions/j3dutils.jar
  cp=/System/Library/Java/Extensions/jai_codec.jar
  cp=/System/Library/Java/Extensions/jai_core.jar
  cp=/System/Library/Java/Extensions/libJ3D.jnilib
  cp=/System/Library/Java/Extensions/libJ3DAudio.jnilib
  cp=/System/Library/Java/Extensions/libJ3DUtils.jnilib
  cp=/System/Library/Java/Extensions/libmlib_jai.jnilib
  cp=/System/Library/Java/Extensions/libQTJNative.jnilib
  cp=/System/Library/Java/Extensions/libShark.jnilib
  cp=/System/Library/Java/Extensions/mlibwrapper_jai.jar
  cp=/System/Library/Java/Extensions/MRJToolkit.jar
  cp=/System/Library/Java/Extensions/QTJava.zip
  cp=/System/Library/Java/Extensions/vecmath.jar
  cp=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home/lib/ext/apple_provider.jar
  cp=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home/lib/ext/dnsns.jar
  cp=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home/lib/ext/localedata.jar
  cp=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home/lib/ext/sunjce_provider.jar
  cp=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home/lib/ext/sunpkcs11.jar
  work dir=/Users/jpollak/src/software/projects/mhs/trunk/mhs-core/
work/mhsEngine/kiva/distrosite
  extension dir=/Library/Java/Extensions:/System/Library/Java/
Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/
1.5.0/
Home/lib/ext
  srcDir=/Users/jpollak/src/software/projects/mhs/trunk/mhs-core/
work/mhsEngine/kiva/distrosite
 compilerTargetVM=1.5
 compilerSourceVM=1.5
  include=org/apache/jsp/index_jsp.java

2008-02-21 20:13:40,253 [http-8080-Processor4] ERROR
apache.jasper.compiler.Compiler - Error compiling file: /Users/
jpollak/
src/software/projects/mhs/trunk/mhs-c
ore/work/mhsEngine/kiva/distrosite//org/apache/jsp/index_jsp.java
[javac] Compiling 1 source file

/Users/jpollak/src/software/projects/mhs/trunk/mhs-core/work/
mhsEngine/
kiva/distrosite/org/apache/jsp/index_jsp.java:3: package
javax.servlet
does not exist
import javax.servlet.*;
^
/Users/jpollak/src/software/projects/mhs/trunk/mhs-core/work/
mhsEngine/
kiva/distrosite/org/apache/jsp/index_jsp.java:4: package
javax.servlet.http does not exist
import javax.servlet.http.*;
^
/Users/jpollak/src/software/projects/mhs/trunk/mhs-core/work/
mhsEngine/
kiva/distrosite/org/apache/jsp/index_jsp.java:5: package
javax.servlet.jsp does not exist
import javax.servlet.jsp.*;



--
Joshua ChaitinPollak | Software Engineer
Kiva Systems, Inc., 225 Wildwood Ave, Woburn, MA 01970








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Joshua ChaitinPollak | Software Engineer
Kiva Systems, Inc., 225 Wildwood Ave, Woburn, MA 01970







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Joshua ChaitinPollak | Software Engineer
Kiva Systems, Inc., 225 Wildwood Ave, Woburn, MA 01970






Reply via email to