aspose file tools*
The moose likes Tomcat and the fly likes Tomcat 5.x and 7.0 jar file questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5.x and 7.0 jar file questions" Watch "Tomcat 5.x and 7.0 jar file questions" New topic
Author

Tomcat 5.x and 7.0 jar file questions

C G Bazil
Greenhorn

Joined: Nov 13, 2012
Posts: 4
I have a couple of questions about the configuration differences between TC 5.x and TC 7.0. But first, let me tell you what I have done and what issues I am facing.

I was able to successfully install Tomcat 7.0 on my machine (Win7Pro). I put my existing app in the webapps directory. After working through some issues with taglibs I was finally able to see my login screen. If I log into the app however, I get an 'IE cannot display the webpage' message. I am still seeing the following output in catalina log:



I thought if I could do a system printout from my logon servlet then I would atleast know that I was hitting it. I opened my servlet in netbeans 7 and see ' package javax.servlet does not exist' with various other errors. I use command prompt to compile my code so I take a look at my old classpath.bat file and compare. I had to change the paths but also copied the missing jars over. I reran the classpath.bat and and tried to recompile the servlet - a few errors disappear but I am still getting a lot.

classpath.bat


Command Prompt:



I am really confused as to what I need to update. Do I need to update each of my jars? Am I putting them in the right directory? I have the following jars in C:\Tomcat70\webapps\app\WEB-INF\lib jstl-1.2.jar, mail.jar and commons-fileupload-1.0.jar. Should these be there or in C:/Tomcat70/lib?

I just feel like the more I read, the more I am confusing myself. Any help pointing me in the right direction would be greatly appreciated. Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61233
    
  66

Yes, jar files still go in WEB-INF/lib

The portion of the log file you posted prior to startup cotnains nothing of interest. Are there no log entries after startup that coincide with the error?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
C G Bazil
Greenhorn

Joined: Nov 13, 2012
Posts: 4
Here is the entire catlina log and I do not see anything in any other log files either.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61233
    
  66

So even when the error occurs, the logs have nothing after the line:

INFO: Server startup in 1329 ms

?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21


WARNING: No rules found matching 'Context/Logger'.


This, and other similar messages, indicate that the Context definition(s) that you are using to deploy webapp(s) under are severely malformed and that the webapps almost certainly didn't deploy at startup. Which is in keeping with the relatively short startup time.

No deploy, no webapp.


Customer surveys are for companies who didn't pay proper attention to begin with.
C G Bazil
Greenhorn

Joined: Nov 13, 2012
Posts: 4
@ Tim

I logged into TC Web Application Manager and it says that my application is running.


Do I need to update context.xml in META-INF? Here is my current file:





@ Bear

Nothing after server startup.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21

I'm not sure why you have an error on your "debug" attribute, but if the "-" on line 2 column 1 is really there, you need to remove it.

"Logger" is not a valid element at the location you coded it under Context for that release of Tomcat.

Beyond that, you probably irretrievably polluted your copy of Tomcat when you copied all those application-level jars into the server folder and if you haven't deleted and re-installed Tomcat, you should.

You should not be setting CLASSPATH when launching Tomcat. The Tomcat catalina.bat file does that (catalina.bat is called by the startup.bat).

When compiling servlets, only the TOMCAT_HOME/lib/servlet-api.jar is normally needed in the compile classpath. If it complains, add the jsp-api.jar as well.

The message "Internet Explorer cannot display the page" normally means that you are not connecting to Tomcat, and therefore not connecting to the webapp. If you were connecting to Tomcat and the webapp (or webapp component) couldn't be resolved, you'd get a "404 Not Found" message from Tomcat itself.
C G Bazil
Greenhorn

Joined: Nov 13, 2012
Posts: 4
Ok Thanks Tim - I will make the changes you suggest and let you know how it goes.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat 5.x and 7.0 jar file questions