This discussion is archived
3 Replies Latest reply: Jan 24, 2012 9:49 AM by 912907 RSS

JSP Tag Lib HELP!!

912907 Newbie
Currently Being Moderated
I'm in the process of upgrading a massive struts 1.3 application to the newest version of Weblogic 10.3.5. I have successfully migrated everything except these JSP tags. I have to admit I'm not a front-end developer for the most part.

Here is the problem:

I have a <HTML:RADIO> tag that looks like :

<html:radio property="role" value="<%=srtId%>" tabindex="1" onclick="form.submit();" />

This is the error:

LoginRole.jsp:33:60: The method setValue(String) in the type RadioTag is not applicable for the arguments (Object)
<html:radio property="role" value="<%=srtId%>" tabindex="1" onclick="form.submit();" />
^-^

.. I KNOW what the error is saying and I can easliy correct the call if I download the source, change the class and recompile, but I can't do that. I have dozens of these tags, both from the regular taglibs but also a number of custom tags, over 400 JSPs, some of which are 1000 lines long.

If I change all these calls to EL they work fine... also the post to the server is just the string ="<%=srtId%>" instead of the integer value... Why did this notation stop functioning? I know this is an old app but this shoud be backwards compatible one would think.

Thank you in advance,
Eric
  • 1. Re: JSP Tag Lib HELP!!
    912907 Newbie
    Currently Being Moderated
    I have another problem also related to tags...

    <logic:notEqual property="PPFNI" value="${Access.INVISIBLE}" name="security" >

    This tag <logic:notEqual> in the documentation states that: if the parameter is null or not found then it coverts it to an empty string and does the comparison.

    In this case PPFNI is a string that is not in the HashMap security. Access (a static class) INVISIBLE is just a string, so this call should say no match and execute the contained JSP code. This is how it has worked.. this is why the DB calls where designed around this.. but yet I have upgraded and the call fails! It says they are equal.. A null and a static string are equal somehow, and it skips the code.

    I can obviously change the DB calls but if these calls were written based upon this fuctionality, other calls are also based around this behavior.. god this is a mess.

    Thank you in advance,
    Eric
  • 2. Re: JSP Tag Lib HELP!!
    829740 Newbie
    Currently Being Moderated
    Check web.xml for below and remove, might solve the first problem
    <jsp-property-group>
       <url-pattern>*.jsp</url-pattern>
       <scripting-invalid>true</scripting-invalid>
    </jsp-property-group>
  • 3. Re: JSP Tag Lib HELP!!
    912907 Newbie
    Currently Being Moderated
    Thank you for the reply, however that was not the problem.

    It looks like variables defined in a java syntax and those that are bean dervived are not in the same "heap" container...

    For instance on a JSP:

    <%Person per = new Person();%> -- java syntax

    <bean:define id="per" name="Person" scope="request" />

    In prior releases the pointer to per is the same... now they are different. The java variables in value= parameters want the java syntax... <%=myVar%> while the bean dervied instantiations want EL syntax...

    As for the <logic:notEqual> tag... I'm still trying to figure out, and any help would be apreciated.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points