File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to let tomcat know my src path?

 
Ren Shao
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's OK, don't pay much attention to this. It's impossible to know all the things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic