facebook

JSP editor: bad behavoir when include another jsp

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #207971 Reply

    Hello,
    env: eclipse30RC1 + myeclipse

    description:
    I have a jsp:include like that:

    <jsp:include page=”/jsp/panels/TSPanel.jsp” flush=”true” >
    <jsp:param name=”aT” value=”<%= dialogBean.getAT() %>” />
    <jsp:param name=”sC” value=”<%=db.getSortColumn() %>” />
    </jsp:include>

    db.getSortColumn() is of type int.

    This jsp compile in any jsp container but myeclipse reports errors :
    The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, int). BUT hey, i am working with that syntax in oter ide without problems.

    The jasper copiles ok that jsp.

    #208019 Reply

    Riyad Kalla
    Member

    marius,
    If tomcat is compiling this correctly, then try and remove our “J2EE Library Set” from your build path, and manually add the jsp-api.jar and servlet-api.jar files from Tomcat’s install. This will cause MyEclipse to compile against the same JARs that Tomcat is using.

    #208060 Reply

    No Operation
    Member

    dunno why other accepts your method, coz the spec states:

    JSP.1.14.2.2 Conversions from request-time expressions
    Request-time expressions can be assigned to properties of any type. In the
    case of scriptlet expressions, no automatic conversions will be performed.

    Simple workaround:

    <jsp:include page="/jsp/panels/TSPanel.jsp" flush="true" >
    <jsp:param name="aT" value="<%= dialogBean.getAT() %>" />
    <jsp:param name="sC" value='<%=""+db.getSortColumn() %>' />
    </jsp:include>

    NOP

    #208227 Reply

    Sure, I know this workaround from start but I had to many jsp to modify. I hope “support-rkalla” method wil work

    #208247 Reply

    Riyad Kalla
    Member

    Did it work?

    #208747 Reply

    No, did not work.

    I deleted J2EE Library Set and added my tomcat libraries but the problem remained the same.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: JSP editor: bad behavoir when include another jsp

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