Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

debugging

 
Madhusudan Raju
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you debug in jsp
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Madhusudan Raju,
Please take the time to choose the correct forum for your question.
This forum is for Servlet questions.

Moving to JSP
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/developer/Books/javaserverpages/ProJSP/Chap19.pdf

has your answer. :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic