facebook

How do I debug through JSPs in a struts application?

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #227210 Reply

    pushkar
    Member

    I have deployed the struts-blank.war (comes with standard struts package) in exploded way and I configured it in MyEclipse 3.8.2. I am able to see the struts-confix.xml in design mode. Now when I try to put in breakpoints in the welcome.jsp after adding a scriptlet on line 11 like – Welcome <%=MYNAME%>, the IDE detects that the jsp is to be opened in debug mode. But upon pressing F6, it gives me a blank gray screen in debug perspective with message <Source not found for __welcome._jspService(HttpServletRequest, HttpServletResponse) line: 11>. Any idea what needs to be done to see the debugging working for jsps in JSP source view? I dont want to debug the compiled servlet for the jsp.

    Also, is it possible to debug the tag lib in jsps in jsp source view? For eg, is possible to debug custom tags like <bean:message key=”welcome.message”/> or <logic:notPresent name=”org.apache.struts.action.MESSAGE” scope=”application”></logic:notPresent>?

    #227234 Reply

    Riyad Kalla
    Member

    1) What version of Tomcat are you using and what JDK are you using to run Eclipse AND what version are you using to run your application server?

    2) You can debug taglibs by opening up the source for the tag and setting a break point, you cannot step into them from a JSP page however.

    #227256 Reply

    pushkar
    Member

    I am using weblogic 8.1 SP2. I am using JDK 1.4.1_05 that is available in weblogic directory. I haven’t installed any other JDK on my machine. Do you think something is missing in my setup? I would just like to debug the jsps because I am able to debug java source files without any problem. But <source not found> error is making jsp debugging the most difficult thing to achieve. Please suggest on how to get jsp debugging working.

    #227264 Reply

    Riyad Kalla
    Member

    Ahhh weblogic, make sure you have to configured correctly: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-18.html#97

    #227283 Reply

    pushkar
    Member

    Yes, I have seen that thread already. I have modified weblogic.xml to contain these values appropriately. Is there any problem in cofiguring with weblogic or weblogic itself has any problem to work with IDEs? After making appropriate changes in weblogic.xml, the breakpoints set in jsps are captured; but when I press F6 I get gray blank screen stating <no source found> with the line getting debugged and the debugging continues. So everything goes on behind the scenes. Anything I can do to fix it up?

    #227284 Reply

    pushkar
    Member

    Yes, I have seen that thread already. I have modified weblogic.xml to contain these values appropriately. Is there any problem in cofiguring with weblogic or weblogic itself has any problem to work with IDEs? After making appropriate changes in weblogic.xml, the breakpoints set in jsps are captured; but when I press F6 I get gray blank screen stating <no source found> with the line getting debugged and the debugging continues. So everything goes on behind the scenes. Anything I can do to fix it up?

    #227286 Reply

    Riyad Kalla
    Member

    Try and shut down the app server, remove the deployment, rebuild the project, redeploy it and restart WEbLogic.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: How do I debug through JSPs in a struts application?

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