This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to let tomcat know my src path? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to let tomcat know my src path?" Watch "How to let tomcat know my src path?" New topic
Author

How to let tomcat know my src path?

Ren Shao
Ranch Hand

Joined: Dec 23, 2002
Posts: 51
When I got an exception in my web application, tomcat logs the exception stack trance, but it doesn't tell me the line number, for instance:

java.lang.NumberFormatException: For input string: "100003ff"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at au.com.auscript.admin.controller.ManagerInterviewDetailController.handleRequest(Unknown Source)

The above error message didn't tell me the link number. But when I debug the same web application under 'Eclipse/Lomboz', I can see the error line number in the eclipse console.

I think it's because eclipse has my source code but Tomcat doesn't. Does any know how to make tomcat aware of my source code location so I can get a more precise error message.
Roman Tomachinsky
Greenhorn

Joined: Apr 24, 2006
Posts: 12
This is because you compiled your source code for Tomcat without debug information. If you use ant you can add debug="true" to javac task. If you do not, AFAIK you can specify -g command line parameter in javac.
Ren Shao
Ranch Hand

Joined: Dec 23, 2002
Posts: 51
Thanks a lot Roman. I feel sorry myself as I 'considered' myself as advanced java programmer but I even didn't know these basic techniques.

Thanks for help!
Roman Tomachinsky
Greenhorn

Joined: Apr 24, 2006
Posts: 12
It's OK, don't pay much attention to this. It's impossible to know all the things.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to let tomcat know my src path?
 
Similar Threads
JWS: Executable jar runs but doesn't show the data
Exit this Do-While w/out an int?
Why NullPointerException?
Can not compile the jsp file
custom tag not working