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

jsp covert in servlet

 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I got some javascript error it show some line where it occuers but when i try to find out it on jsp page not able to figure it out .. my friend told me that this line is not on jsp page this is the line belongs to when this jsp converted into servlet. Now I wanna know that if it's ture how can i see the servlet file and figure out the problem line and if it's not true then which line it indicate..?

Kaustubh
 
subhash kumar
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding the java script errors, you can find the line number as in IE > view source > Go to line number.
But in case of Jsp error/Exception, you sometimes get the line number shown in the exception is not in the actual jsp page.
this is the line number of the servlet class produced form jsp.
you can in case of tomcat installation directory/work/

For example :

i am using eclipse
jsp file > Loing.jsp
servlet file corrosponding to this jsp can be found at this location

E:\strutsvalidation\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\StrutsValidationTest\org\apache\jsp\pages

strutsvalidation is the workspace.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's usually easier to just debug the JavaScript using something like Firebug than go digging around in the generated servlets. If the JavaScript was external (as it usually should be) you're more likely to get more useful debug information, at least in my experience. Or run it through a tool like JSLint, which can spot some syntax errors.
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks david, subhash
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic