Tami, To do what you want, you have to use the <%= %> tag. The content of this tag
cannot be arbitrary Java code; it must be a Java expression. In the case you gave,
this should work:
statusoptions = "<option value=\"H\" <%= ( (status.equals(\"C\")) ? \"SELECTED\" :
\"\" ) %>>HOLD";
If you are unfamiliar with question-mark-colon operator, please consult a Java
book.
Yours, JonTom
JT Kittredge
ITA Software, Inc
Cambridge, Massachusetts
Tami Tutton wrote:
> How do I imbed jsp code into a string? This the code I am trying to
> implement:
>
> statusoptions = "<option value=\"H\" <% if (status.equals(\"C\"))
> {out.println(\"SELECTED\"); } %>>HOLD ";
>
> The error I get is no end quote on my string...
> Thanks in advance.
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html