Tomcat Help

Chong Yu Meng chongym at cymulacrum.net
Fri Aug 4 14:39:18 UTC 2006


On Thu, 2006-08-03 at 16:58 -0700, Ryan Ollerenshaw wrote:
> I am able to compile a java mapscript file from the command line
> using: 
> 
> javac -classpath ./mapscript.jar MapServerTest.java 

Hi Ryan,

I'm not exactly sure what you are doing here. Are you trying to compile
MapServerTest.java ? And does it require mapscript.jar for it to compile
correctly? First, you should define the full path to the mapscript.jar
file to avoid confusion, and next, after the compile, you should check
that there is a file called MapServerTest.class in the same directory,
if it does compile correctly (i.e. without errors).
> 
> But when i try to turn my code into a servelt and run it over Tomcat i
> keep getting: 
> 
> java.lang.UnsatisfiedLinkError: no mapscript in java.library.path 

How are you running it in Tomcat? Have you defined a context, and does
it work properly? You should test with a plain web page first to verify
that the URL for the context really works. 
> 
> I have tried adding: export CLASSPATH=./mapscript.jar 
> to my ./tomcat5/bin/startup.sh file but that does not seem to help.
> Am i missing a setting somewhere, why cant Tomcat find the .jar file?
> I have it in the same directory as my .java file and also
> in /common/lib and /shared/lib 

IIRC libraries that are placed inside <tomcat-directory>/common/lib are
available to all servlets. I'm not clear though on whether this is still
the behaviour in Tomcat 5.5. But the thing is, if you *only* need to use
the library for your servlet (presumably MapServerTest), you should
place the library in the lib directory of your servlet context. 

If all that sounds like gibberish, you could start by taking a look at
some tutorials. Setting up a context can be confusing.

-- 
Pascal Chong 
email:  chongym at cymulacrum.net 
web:    http://cymulacrum.net
pgp:    http://cymulacrum.net/pgp/cymulacrum.asc

"La science ne connaît pas de frontière parce que la connaissance
appartient à l’humanité. et que c’est la flamme qui illumine le monde."

-- Louis Pasteur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060804/c22d7377/attachment-0001.sig>


More information about the fedora-list mailing list