Re: Resin 3 + Struts problem with JSP compilation



Ambar wrote:
The part of the jsp causing the problem is:

(quote: newlines doubled so newsreaders won't eliminate them)

<logic:iterate id="driverValues"

name="SingleUserLocReportInitializer" property="teamMembers"

type="java.util.Hashtable"><html:option value='<

%=driverValues.get("USER_ID").toString()%>'> <

%=driverValues.get("NAME").toString()%></html:option></logic:iterate>

(END quote)

Is this where the newlines fall in your actual JSP source (obviously not doubled)? I'm not sure what happens if you put a newline between the opening angle bracket and the percent sign in a "<%=" expression, but surely it messes up the ability to read the content as scriptlet.

If that isn't where the newlines appear in your actual source, then that doesn't apply and you should reconsider how you post code to Usenet.

I'd say in that case that either "USER_ID" or "NAME" is missing.

<http://struts.apache.org/1.3.8/struts-taglib/tlddoc/index.html>
states that the logic:iterate type attribute holds the
[f]ully qualified Java class name of the element to be exposed through the JSP bean named from the id attribute. If not present, no type conversions will be performed. NOTE: The actual elements of the collection must be assignment-
compatible with this class, or a request time ClassCastException will occur.

This tells me that your "driverValues" is a Hashtable which in turn is an element of the collection held in the "teamMembers" property of "SingleUserLocReportInitializer". Is that correct?

I can't see the rest of the JSP, so I have to ask. Are you sure that "SingleUserLocReportInitializer" is declared at that point in the JSP, either through <jsp:useBean> (preferred) or <bean:define>?

Incidentally since you aren't leveraging the synchronized nature of Hashtable calls it's not helpful to use the archaic java.util.Hashtable class.

--
Lew
.



Relevant Pages

  • Re: simple jsp question (out.println)
    ... Since your subject line mentions JSP (btw, it'd be a good idea to ... The println statement is, indeed, writing newlines. ... is that they aren't significant in HTML. ... Source" from your web browser when you test the page. ...
    (comp.lang.java.help)
  • Force JSP page to output CR+LF
    ... Pages created in Eclipse on Windows, ... How can I force the JSP page, via Java, JSTL or Velocity, to output ... newlines the way we need them too? ...
    (comp.lang.java.programmer)
  • Re: The Ajax Discussion
    ... Could you also publish the JSP source used to process the form ... Do not worry that it is JSP. ... This will work just as well with Delphi as with Java. ...
    (borland.public.delphi.non-technical)
  • Re: The Ajax Discussion
    ... Could you also publish the JSP source used to process the form ... Do not worry that it is JSP. ... This will work just as well with Delphi as with Java. ... made it a JSP instead of HTML. ...
    (borland.public.delphi.non-technical)
  • Re: q JSP questions
    ... that your app-server only checks whether the JSP source has ... What app server are you using? ... You can explicitly delete the .class file (jsp compiled into a ...
    (comp.lang.java.programmer)