I'm trying to write an ant task to pre-compile JSP pages, but I have the following problem.

Here is a piece of page :
# <form:input type="hidden" name="idy" value="<%= itlBean.getIdy() %>"/>
(itlBean.getIdy() returns a Long.)

Then I try to transform the JSP page into a servlet with the jasper task, which gives the following java code :
#      _jspx_th_form_input_0.setParent(null);
#      _jspx_th_form_input_0.setType("hidden");
#      _jspx_th_form_input_0.setName("idy");
#      _jspx_th_form_input_0.setValue( itlBean.getIdy() );

But the value field in the tag handler is a String and so the setter is void setValue(String value), therefore javac refuses to compile the corresponding servlet. Unlike jasper, Orion (the server I'm using) generate the following java code for the same page :
#            __tag1.setParent(null);
#            __tag1.setName("idy");
#            __tag1.setType("hidden");
# __tag1.setValue(com.orionserver.util.ObjectUtils.toString( itlBean.getIdy() ));

Great ! Orion recognized the problem and convert the Long to a String.
And now my question :
Is jasper able to do that ? How ?
If not, does this way of proceeding conforms exactly to JSP spec. ?
Can my problem be solved ?

Thanks for your help.
Romain Thouvenin



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to