facebook

JSP Debugging with WebLogic 7 & 8 [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #196411 Reply

    Scott Anderson
    Participant

    With MyEclipse 2.1.1 EA2, full JSP debugging with WebLogic 7 & 8 is possible. The only thing you have to do to enable it is to tell WebLogic that you’d like debug information placed in your JSP files when they’re compiled. You do this by providing a WEB-INF/weblogic.xml file in your web project that looks like the following:

    
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA
    Systems, Inc.//DTD Web Application 7.0//EN"
    "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
    <weblogic-web-app>
        <description>WebLogic Descriptor</description>
        <jsp-descriptor>
            <jsp-param>
                <param-name>debug</param-name>
                <param-value>true</param-value>
            </jsp-param>
        </jsp-descriptor>
    </weblogic-web-app>
    

    Once you add the descriptor and deploy your project, you should be able to set breakpoints on the Java code embedded in your JSP’s and step through it just like you do regular Java files.

    Enjoy!

    –Scott
    MyEclipse Support

    #196416 Reply

    naga_iyer
    Member

    Thanks Scott.. !!
    It works like a charm!

    A minor correction to your previous post:
    The weblogic.xml should be in the WEB-INF directory and not the META-INF…

    thanks
    -Naga

    #196417 Reply

    naga_iyer
    Member

    One more Question Scott..
    The release features list talked about creating WAR/EAR files.Is there a wizard inbuilt to do this ?..I am not able to figure out how to generate them for deployment. My current deployment options only has “exploded dir” and the “package structure” option is disabled..

    Thanks,
    Naga

    #196422 Reply

    Scott Anderson
    Participant

    Naga,

    You’re correct. EA2 does not have the ability to create packaged archives, only exploded deployments at the moment. We had to cut packaged archives from scope due to some resource limitations in order to make the EA2 release date. Packaged archives will certainly be in the GA release, or may show up in an interim release between now and GA. Sorry for the delay, but we wanted to have a full end to end deployment and debugging solution in place for EA2 and something had to give.

    –Scott
    MyEclpse Support

    #207046 Reply

    Bandu
    Member

    I already had the weblogic.xml in my WEB-INF.
    I just added the
    <jsp-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </jsp-param>

    element to it. Now it looks like this:

    <weblogic-web-app>
    <jsp-descriptor>
    <jsp-param>
    <param-name>keepgenerated</param-name>
    <param-value>true</param-value>
    </jsp-param>
    <jsp-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </jsp-param>
    </jsp-descriptor>
    <context-root>digite4.0</context-root>
    </weblogic-web-app>

    With this too, I am not able to debug JSPs. the debugging works fine with Java Classes. What am I doing wrong.
    Note that double clicking on a line displays a breakpoint symbol – though it is not similar to the one displayed for a Java Class. Moreover, the context menu on line numbers also does not have the Toggle Breakpoint options, etc.
    Can someone help.

    #207055 Reply

    Scott Anderson
    Participant

    Bandu,

    The breakpoint symbol will be a blue circle until the class is loaded by the remote JVM. After that, a checkmark should be added to it. Also, for deubgging to work you must be running WebLogic with JDK 1.4.1+, since debugging relies on the JDK 1.4 debug architecture. If this doesn’t get you going, please post your full configuration, as we request in the ‘Posting Guidelines’ thread at the top of this forum and we’ll try to determine what’s going on.

    #207063 Reply

    Bandu
    Member

    I have sent and email to support@genuitec.com regarding my System settings.
    Please note that I am using WebLogic with JDK 1.4.1 and debuggiing for my Java classes
    is working fine.
    I had Lomboz installed previously, but prior to this problem, I was unable to add breakpoints
    in JSPs. So, I closed Eclipse, deleted the plugin directories for Lomboz and restarted Eclipse.
    Since then, I am opening JSPs with MyEclipse JSP Editor which is allowing adding of breakpoints.
    However, the execution does not suspend on JSP Breakpoints. It does suspend for Java classes.
    Pl. refer to my email sent to support@genuitec.com with the subject: JSP Debugging with WebLogic 7 & 8
    (I wanted to refer to this thread in the email subject, but I simply can’t find the thread ID)

    #207074 Reply

    Scott Anderson
    Participant

    Bandu,

    The configuration looked OK. Let’s try this. Create a new web project and add one JSP page to it. Deploy it as an exploded archive to WebLogic and then point a browser to it to see that it’s working. Once you’ve verified deployment, add a breakpoint using our JSP editor. Since you’ve already loaded the JSP page previously, the breakpoint you set should show a ‘checked’ icon. Refresh the page in the browser and see if the breakpoint is hit.

    #230295 Reply

    Jim Jarrett
    Member

    I have tried this exact same thing and it doesn’t work.

    I have done clean installs of Eclipse and Weblogic, rebuilt, and I get that exact same “source not found” messsage.

    What operating system and version are you running?

    Windows XP Pro SP 2

    What Eclipse version and build id are you using? (Help > About Eclipse Platform)

    3.0.2
    Build id: 200503110845

    – Was Eclipse freshly installed for MyEclipse?

    Yes (this was a brand-new laptop)

    – If not, was it upgraded to its current version using the update manager?

    N/A

    – Are any other external plugins installed?

    Yes.

    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    8

    org.eclipse.pde.build_3.0.1
    org.eclipse.pde.core_3.0.2
    org.eclipse.pde.doc.user_3.0.0
    org.eclipse.pde.junit.runtime_3.0.0
    org.eclipse.pde.runtime_3.0.1
    org.eclipse.pde.source_3.0.2
    org.eclipse.pde.ui_3.0.2

    What MyEclipse version are you using? (Help > About Eclipse Platform > Features)

    3.8.3

    What JDK version are you using to run Eclipse? (java -version)

    java version “1.4.2_04”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

    What JDK version are you using to launch your application server?
    1.4.2_05

    What steps did you take that resulted in the issue?
    -Created a new web project.
    -Added one JSP page to it, generated using the template.
    -Deployed it as an exploded archive to WL 8.1 SP 3
    -Verified it displayed in the browser
    -Added a breakpoint in MyEclipse to the JSP page
    -Verified the breakpoint showed a “checked” icon
    -Refreshed the page
    -MyEclipse stopped during the execution of the JSP page, but displayed a grey box with red text,
    “Source not found for __myjsp._jspService(HttpServletRequest, HttpServletResponse) line: 28”

    What application server are you using?

    WebLogic 8.1 SP3

    Are there any exceptions in the Eclipse log file?

    I cleared the log file and started fresh, with the same result. This was in the log file.

    !ENTRY org.eclipse.core.filebuffers 4 0 May 27, 2005 14:11:17.816
    !MESSAGE The content type with id “com.objfac.xmlbuddy.xmlfile” specified in the extension point does not exist.

    #230299 Reply

    Scott Anderson
    Participant

    This issue is likely that you’re using MyEclipse version 3.8.3. IIRC, there was a bug that was fixed in version 3.8.4 related to JSP source lookups for WebLogic. Could you try upgrading to 3.8.4 to see if it resolves the issue? The instructions on how to do that easily using the update manager are here:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-5755.html

    Please note the instructions to restart with the ‘-clean’ commandline option the first time after upgrading to ensure the new versions of all the features are loaded properly.

    #230402 Reply

    Jim Jarrett
    Member

    Yes, that seemed to fix the problem by upgrading to 3.8.4.

    #231428 Reply

    inkinen
    Member

    hello, i have the same problem with jsp debugging. i get the “source not found error” when setting a breakpoint in the jsp.

    i have tried to create a fresh install of eclipse 3.0.2 and myeclipseide without any extra plugins, but it wont work anyway. the breakpoint is marked with a “checked” icon. ear archive is exploded.

    jdk 1.4.2_04-b05
    windows 2000
    eclipse 3.0.2 Build id: 200503110845
    myeclipseide 3.8.4+QF2
    Weblogic Server 8.1 SP3, running under same jdk as eclipse

    weblogic.xml looks like this :

    <weblogic-web-app>

    <session-descriptor>
    <session-param>
    <param-name>PersistentStoreType</param-name>
    <param-value>memory</param-value>
    </session-param>
    <session-param>
    <param-name>TimeoutSecs</param-name>
    <param-value>1800</param-value>
    </session-param>
    </session-descriptor>

    <jsp-descriptor>
    <jsp-param>
    <param-name>printNulls</param-name>
    <param-value>false</param-value>
    </jsp-param>
    <jsp-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </jsp-param>
    </jsp-descriptor>

    </weblogic-web-app>

    /johan

    #231441 Reply

    Riyad Kalla
    Member

    Johan,
    Please describe the structure of the ear (how many modules, what are they) and which JSP you are setting the breakpoint in, is it a full jsp or an include? Also have you configured weblogic to debug JSP pages correctly as per this FAQ entry: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-18.html#97

    #231493 Reply

    inkinen
    Member

    riyad,

    i have followed the guide in the faq to setup weblogic & eclipse.

    my (exploded) ear looks like this :

    EAR
    +-APP-INF (classes used throughout the application)
    +-AppUtils (a couple of textfiles & property files)
    +-EJB (approx 15 stateless session ejbs)
    +-META-INF (application.xml & weblogic-application.xml)
    +-WebApp

    in the WebApp directory there are jsp:s, html files and in the WEB-INF/classes folder servlet code..

    debugging jsps used to work before, and it stopped to work when someone added the eclipse web tools plugins to my eclipse installation. i removed these and reinstalled eclipse from scratch with myeclipse. i also added a vss plugin for versioning. debugging servlet code, and ejb classes works ok, but jsps still dont work.. i have also tried to upgrade to jdk 1.4.2_08 but still the same “source not found” error when entering a jsp with a breakpoint set. i have also noticed that the breakpoint icons arent “checked” anymore..

    #231502 Reply

    Riyad Kalla
    Member

    Johan,
    Successful JSP debugging is going to depend heavily on your JDK version used to run Eclipse and your app server as well as your app server supporting JSR 45 spec. Can you double check the JDK being used to run Eclipse (Help > About >Configuration Details, (near the top), and then also check which JDK you have setup to run WebLogic (Window > Prefs > MyEclipse > App Servers > WebLogic (VER) > JDK)

Viewing 15 posts - 1 through 15 (of 23 total)
Reply To: JSP Debugging with WebLogic 7 & 8 [Closed]

You must be logged in to post in the forum log in