facebook

Debug different JSP-Files BUT with the same name!!! [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #234429 Reply

    mweisser
    Member

    Eclipse 3.0.2, MyEclipseIDE 3.8.4+QF2, Win 2000, 1.4.2_08, Tomcat 5.0.28

    Hello,

    the web-portal-application I want to debug comes with the following structure:

    /portlet1/view.jsp
    /portlet2/view.jsp

    /portletn/view.jsp

    If I now set a breakpoint in /portlet1/view.jsp MyEclipse stops at every “view.jsp” file that will be served !!!

    How can I get MyEclipse to stop only at the view.jsp file at the correct context (here: portlet1) ???

    Thanks and Kind Regards
    Michael

    #234437 Reply

    Riyad Kalla
    Member

    Michael,
    Are these view.jsp files included in other files, or are they standalone pages? For example, can I browse to them: http://localhost:8080/myapp/portlet1/view.jsp, OR are they intended to be included ina bigger page like: http://localhost:8080/myapp/viewUsers.jsp (includes view.jsp)

    #234450 Reply

    mweisser
    Member

    Are these view.jsp files included in other files, or are they standalone pages?

    The view.jsp files are included in other files. The portal system is based on the Struts/Tiles Layout engine…

    Here are some more code snippets to understand the layout handling:

    tiles-defs.xml

    <definition name=”portlet.address_book.view” extends=”portlet.address_book”>
    <put name=”portlet_content” value=”/portlet/address_book/view.jsp” />
    </definition>

    <definition name=”portlet.blogs.view” extends=”portlet.blogs”>
    <put name=”portlet_content” value=”/portlet/blogs/view.jsp” />
    </definition>

    <definition name=”portlet.bookmarks.view” extends=”portlet.bookmarks”>
    <put name=”portlet_content” value=”/portlet/bookmarks/view.jsp” />
    </definition>

    portlet.jsp – Default Layout JSP

    <tiles:useAttribute id=”tilesPortletContent” name=”portlet_content” classname=”java.lang.String” ignore=”true” />
    ….
    <c:if test=”<%= Validator.isNotNull(tilesPortletContent) %>”>
    <liferay:include page=”<%= Constants.TEXT_HTML_DIR + tilesPortletContent %>” flush=”true” />
    </c:if>

    #234460 Reply

    Riyad Kalla
    Member

    Debugging includes is going to be a problem, please read Scott’s reply here why:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-8388.html

    Also note that because tiles is a runtime-evaluation as well as your sample code above (the c:if statements) this si going to make debugging even harder. You can follow Scott’s hint with setting a breakpoint in the main page and stepping into the fragment, however keep in mind that when you are trying to step over the runtime evaluation or over the tiles statement, you MAY step a few times through taglib implementation code, which will seem odd, but at some point you should step out “the other side” into the fragment.

    #234494 Reply

    mweisser
    Member

    THANKS for your quick answer… The approuch described by Scott’s reply is what i did already. Placing a breakpoint to another place and then stepping into the desired file. Not the best solutions but its working.

    Thanks again
    Michael

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Debug different JSP-Files BUT with the same name!!! [Closed]

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