File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
 
subject: jsp covert in servlet
 
Similar Threads
How to figure if a servlet invoked as include or forward
How to figure out what kind of page I am ckecking ?
help needed.....
Variable defined in one JSP scriptlet not visible in another
JSP/form/servlet - session persistence ?