The Configuration of Tomcat 5 can be done as follows.
If you have the jars which need specific arrangement.
1 You have to compile application with servlet standards Tomcat 5 are using.
2 Change catalina.properties file Add your path there.
3 Change catalina.xml if its important to you the order in which r=the jars are read.
4 You have to add the -Djava.class.path option in the service properties.
5 Give startin path for the Tomcat shortcut as the pathyour application jars are 
stored.

The bst thing if possible is not to have hard coded paths in application, but this is 
the thing if its 
something out of your control.

Regards
Paresh

-----Original Message-----
From: Paresh Varatkar 
Sent: Wednesday, October 29, 2003 11:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 5 Problem with finding servlet class
Importance: High


Hi Chris,
That was very good cue.
As that made me think why its not loading servlet.jar?

I had recompiled all jsps with latest servlet specifications but
I recompiled them again with Tomcat jars ahead in path.

Then I set classpaths correctly.

Now application works extremely well if I do catalina start.

Still I am setting classpaths manually.

Now the next and Final problem I am facing, how to start Tomcat as service.
This is because when Tomcat starts as service, it does not seem to remember the 
classpath already set.

can I send classpath as parameter to tomcat.exe?

Regards
Paresh



-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 3:10 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Problem with finding servlet class


All,

>> java.lang.NoSuchMethodError: 
>> javax.servlet.ServletConfig.getServletName()Ljava/lang/String;
> 
> 
> This method is not part of the servlet specification:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/index.html
> 
> How did you compile it in the first place?

I'm sorry; I was looking at ServletContext, not ServletConfig.

Anyhow, I don't think you should be explicitly setting any classpaths 
for anything. You should just dump all your JAR files into WEB-INF/lib 
and start Tomcat without any further configuration changes.

Note that putting servlet.jar into WEB-INF/lib is a mistake. Tomcat will 
probably refuse to load thar JAR anyways, so you might be okay (I know 
it does on mine .. oops :)

-chris


---------------------------------------------------------------------
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]


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

Reply via email to