aspose file tools*
The moose likes JSP and the fly likes jsp covert in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp covert in servlet" Watch "jsp covert in servlet" New topic
Author

jsp covert in servlet

Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1270

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


No Kaustubh No Fun, Know Kaustubh Know Fun..
subhash kumar
Ranch Hand

Joined: Jul 14, 2010
Posts: 63
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.


Subhash Kumar
Attitude is everything
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: May 13, 2010
Posts: 1270

Thanks david, subhash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp covert in servlet