- This topic has 4 replies, 2 voices, and was last updated 19 years, 3 months ago by mweisser.
-
AuthorPosts
-
mweisserMemberEclipse 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.jspIf 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
Riyad KallaMemberMichael,
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)
mweisserMemberAre 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>
Riyad KallaMemberDebugging includes is going to be a problem, please read Scott’s reply here why:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-8388.htmlAlso 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.
mweisserMemberTHANKS 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 -
AuthorPosts