Meaningless Drivel is fun!*
The moose likes JSP and the fly likes debugging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "debugging" Watch "debugging" New topic
Author

debugging

Madhusudan Raju
Greenhorn

Joined: Dec 27, 2006
Posts: 4
how do you debug in jsp
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Madhusudan Raju,
Please take the time to choose the correct forum for your question.
This forum is for Servlet questions.

Moving to JSP


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
My number one suggestion for debugging in JSP or servlets is to put all the working code in "helper" classes that can be tested and debugged OUTSIDE the servlet/jsp environment.

There are so many things that can go wrong when you plunk totally untested code into a jsp/servlet container that it is hard to conduct intelligent debugging. Just browsing through recent posts will convince you of that.

Bill
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Is there a particulare IDE you are using?

With WebSphere Studio Application Developer, or IBM's Rational Application Developer (IRAD), you can set breakpoints in Java code in a JSP and step through your code at runtime. It's an invaluable service.

Having said that of course, there is great value in minimizing the amount of code in a JSP. Factore out logic into custom tags or Java classes which are easier to maintain, reuse, and debug.

-Cameron McKenzie
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
http://java.sun.com/developer/Books/javaserverpages/ProJSP/Chap19.pdf

has your answer. :-)


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: debugging
 
Similar Threads
action class not being called.
Problem with form submission
problem while debugging in IBM RAD
Session Advice
Ant Unknown Source?????