Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 5.x and 7.0 jar file questions

 
C G Bazil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
C G Bazil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the entire catlina log and I do not see anything in any other log files either.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So even when the error occurs, the logs have nothing after the line:

INFO: Server startup in 1329 ms

?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18024
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
C G Bazil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ 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
Pie
Posts: 18024
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Thanks Tim - I will make the changes you suggest and let you know how it goes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic