I set up Eclipse and Sun Application Server (8) to be able to debug my web application (WAR with servlet and JSP pages) in Eclipse. I can set breakpoints in my java classes and debug them. but i can't set breakpoints in the JSP files. so have can i debug the JSP files? is it possible at all?
well, the page seems to be deleted. here's a short description how it works:
A. set up Eclipse to be able to remote debug the web application on the Sun application server. (Just to be sure to have all set up correctly).
B. debugging the JSP pages is not possible directly, but you can debug the translated code from the JSP pages:
1. Project > Properties
2. Add Folder
3. Create New Folder
4. Folder Name: JSP
5. Advanced >>
6. Link to folder in the file system (select the path above)
7. OK
the project's "Java Build Path" should now contain an entry "<ProjectName>/JSP".
II. In the package explorer you will see the new folder "JSP" with the generated source files. (You may have to start the Web app and klick the pages at least once for the Servlet container to generate the source files.)
Each JSP page results in a Java source file with the name of the JSP page, e.g. "hello.jsp" => "hello_jsp.java". You can ignore Eclipse error indicators (red crosses) for referenced apache classes not found - you don't need them to debug your code.
Well, that's it! just double click such a generated xxx_jsp.java file to open it in a Java Editor and set your breakpionts. Of course, this is not a true JSP-Debugging like Microsoft's ASP debugger, but it's at least better than nothing and still a way step through your JSP functions and have better control over JSP debugging.
I am using WSAD as the IDE which is pretty similar to I guess the same as eclipse. As far as debugging jsp's with that is you could use the step by step mode to go into the jsp's also I guess you could put breakpoints to the java scriptlets in JSP's. As far as debugging javascript and jsp tags themselves within a jsp I don't understand why would you ant to do that?
This page has clear and concise steps for debugging JSPs in eclipse (without having to use plugins). Just follow the "Debugging JSP Pages" section. Please note that if you are using the JSTL tag libraries, you would also want to add jstl.jar and standard.jar to your classpath.