struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Can Zheng <can.zh...@gmail.com>
Subject Re: JSP Compilation Problems With JSTL Tags Used
Date Thu, 01 Jul 2004 18:40:08 GMT
Hi, 

did you add the taglib declarations for the prefix "c"


On Thu, 1 Jul 2004 11:30:48 -0700 (PDT), Caroline Jen
<jiapei_jen@yahoo.com> wrote:
> 
> My JSP worked well when I used JSP expressions,
> scriptlets, ....  I tried to use JSTL instead and
> encountered some compilation problems.  I am unable to
> see my mistakes and need help:
> 
> Problme #1:
> [code]
> int offset = 0;
> try
> {
>   <c:set var="offset" value="${requestScope.offset}"
> />
> }
> catch ( Exception e )
> {
>    // do nothing
> }
> [/code]
> 
> The above code has two compilation errors:
> 
> Generated servlet error:
>    [javac] Compiling 1 source file
> 
> illegal start of expression
>   <c:set var="offset" value="${requestScope.offset}"
> />
>   ^
> 
> Generated servlet error:
> ';' expected
>   <c:set var="offset" value="${requestScope.offset}"
> />
> 
> ^
> Problem #2:
> [code]
> <c:set var="threadBean"
> value="${requestScope.ThreadBean}" />
> ......
> ......
> int threadID_int = ParamUtil.getParameterInt( request,
> "thread" );
> <c:if test="${threadBean.threadID} != threadID_int">
>    throw new AssertionException( "The two threadID
> are not the same." );
> </c:if>
> [/code]
> 
> Generated servlet error:
> illegal start of expression
> <c:if test="${threadBean.threadID != threadID_int}">
> ^
> 
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
Best regards,

Can Zheng

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message