Friday, September 25, 2009

Debugging JSPs Using Eclipse

JSPs are compiled into java classes (servlets) before they are run on the server.For our application we are using Weblogic.
By default weblogic deletes the source files after compiling.
To enable weblogic to keep the source file of the jsps enter these details in the weblogic.xml of the web application
jsp-descriptor
jsp-param
param-name
keepgenerated
param-name
param-value
true
param-value
jsp-param
jsp-descriptor

Also Note that weblogic keeps the compiles jsp classes and source in the same folder.

Now goto Eclipse

  1. Open your web project
  2. Right click and create a Folder inside the project.Name this folder as 'JSP'
  3. In the window that opens click on 'Advanced' and link this folder to that folder where weblogic keeps the compiled jsps/source.
  4. Add this folder to the project build path as Source Folder.
  5. Now run weblogic and include a debug point in the compiled source generated
Note : You might have to manually refresh the folder to see the source.

0 Comments:

Post a Comment

<< Home