You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by RamKumar <ra...@tarangtech.com> on 2004/08/28 10:07:03 UTC

JSTL Tag problem!!

Hi All,
         I am using JSTL in my JSP page for the first time. I am running into a problem with the following tag.
<c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>

and it prints in the page as "${sessionScope.SurveyCreateForm.surveyTitle}"

Any clues?

thanks,
Ramkumar

Re: JSTL Tag problem!!

Posted by Big Chiz <bi...@gmail.com>.
for jstl 1.1 i believe there is no need to put anything on the
web.xml. you can just include them in any of your pages.

e.g
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

On Sun, 29 Aug 2004 02:47:38 +0800, Can Zheng <ca...@gmail.com> wrote:
> Your <c:out> works here, the problem is EL not being evaluated
> 
> So I still recommend you configure the IsELIgnored page directive
> 
> 
> 
> On Sat, 28 Aug 2004 18:18:58 +0530, RamKumar <ra...@tarangtech.com> wrote:
> > > JSTL needs to config in web.xml
> >
> > I configured JSTL in web.xml like this.
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
> >    <taglib-location>/WEB-INF/fmt.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
> >    <taglib-location>/WEB-INF/c.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
> >    <taglib-location>/WEB-INF/sql.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
> >    <taglib-location>/WEB-INF/x.tld</taglib-location>
> >  </taglib>
> >
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/x-rt.tld</taglib-location>
> >  </taglib>
> >
> > and in my jsp page i referred like this
> >
> > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
> >
> > Anything else i am missing here?.
> >
> > thanks,
> > Ramkumar
> >
> >
> >
> > > On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
> > > > Seems the evaluation of El was not working.
> > > >
> > > > You can either set JSP configurations in the web.xml
> > > >
> > > > or set the IsELIgnored page directive to false in JSP pages.
> > > > On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com>
> > wrote:
> > > > > Hi All,
> > > > >         I am using JSTL in my JSP page for the first time. I am
> > running into a problem with the following tag.
> > > > > <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> > > > >
> > > > > and it prints in the page as
> > "${sessionScope.SurveyCreateForm.surveyTitle}"
> > > > >
> > > > > Any clues?
> > > > >
> > > > > thanks,
> > > > > Ramkumar
> > > > >
> > > >
> > > >
> > > > --
> > > > Best regards,
> > > >
> > > > Can Zheng
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Javen Fang
> > > -----------------------
> > > Just for fun - Just do it
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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
> 
>

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


Re: JSTL Tag problem!!

Posted by Jason Lea <ja...@kumachan.net.nz>.
Sounds like you are using Tomcat 5, which allows EL expressions anywhere.

eg instead of <h1><c:out value="${title}" /></h1> you can use 
<h1>${title}</h1>

It also means you don't need to use the html-el tags, just use the 
normal <html: struts tags.  In fact you get the error message "According 
to TLD or attribute directive in tag file, attribute property does not 
accept any expressions" if you try to use the html-el tags


RamKumar wrote:

>  
>
>>>Your <c:out> works here, the problem is EL not being evaluated
>>>      
>>>
> 
>  
>
>>>So I still recommend you configure the IsELIgnored page directive
>>>      
>>>
>
> As you said  i made IsELIgnored page directive to false,  i got into a new problem that my logic-el tags are not working now.
>
> i am getting  an error as "According to TLD or attribute directive in tag file, attribute property does not accept any expressions" in the following line
>
><logic-el:iterate id="skip" name="SurveyCreateForm" scope="session" property="pageValue[${pageNo}].questionValue[${questionNo}].skipLogicList" indexId="ctr">
>
>I guess that EIs in struts-el tags won't work if you make the IsELIgnored page directive to false.
>
>I tried to convert the above logic-el tag to c:forEach.
>
><c:forEach items="${sessionScope.SurveyCreateForm.pageValue[pageNo].questionValue[questionNo].skipLogicList" var="ss" varStatus="status">. 
>
>where pageValue(pageNo) and questionValue(questionNo) are the indexed property methods.But here also i am facing a problem.
>
>The Error says the expression contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered "", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", "?"]
>
>
>I want both JSTL and struts-el tags to work as i can't convert html-el tags. How do i do that?.
>
>Any clues?.
>
>thanks,
>Ramkumar
>
>
> 
>
> 
>  
>
>>On Sat, 28 Aug 2004 18:18:58 +0530, RamKumar <ra...@tarangtech.com> wrote:
>>    
>>
>>>>JSTL needs to config in web.xml
>>>>        
>>>>
>>>I configured JSTL in web.xml like this.
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
>>>   <taglib-location>/WEB-INF/fmt.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
>>>   <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
>>>   <taglib-location>/WEB-INF/c.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
>>>   <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
>>>   <taglib-location>/WEB-INF/sql.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
>>>   <taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
>>>   <taglib-location>/WEB-INF/x.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>   <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
>>>   <taglib-location>/WEB-INF/x-rt.tld</taglib-location>
>>> </taglib>
>>>
>>>and in my jsp page i referred like this
>>>
>>><%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
>>>
>>>Anything else i am missing here?.
>>>
>>>thanks,
>>>Ramkumar
>>>
>>>
>>>
>>>      
>>>
>>>>On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
>>>>        
>>>>
>>>>>Seems the evaluation of El was not working.
>>>>>
>>>>>You can either set JSP configurations in the web.xml
>>>>>
>>>>>or set the IsELIgnored page directive to false in JSP pages.
>>>>>On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com>
>>>>>          
>>>>>
>>>wrote:
>>>      
>>>
>>>>>>Hi All,
>>>>>>        I am using JSTL in my JSP page for the first time. I am
>>>>>>            
>>>>>>
>>>running into a problem with the following tag.
>>>      
>>>
>>>>>><c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
>>>>>>
>>>>>>and it prints in the page as
>>>>>>            
>>>>>>
>>>"${sessionScope.SurveyCreateForm.surveyTitle}"
>>>      
>>>
>>>>>>Any clues?
>>>>>>
>>>>>>thanks,
>>>>>>Ramkumar
>>>>>>
>>>>>>            
>>>>>>
>>>>>--
>>>>>Best regards,
>>>>>
>>>>>Can Zheng
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>--
>>>>Javen Fang
>>>>-----------------------
>>>>Just for fun - Just do it
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>    
>>
>
>  
>


-- 
Jason Lea



Re: JSTL Tag problem!!

Posted by Big Chiz <bi...@gmail.com>.
Where is the ending }

see error:
expected one of ["}

On Mon, 30 Aug 2004 12:15:02 +0530, RamKumar <ra...@tarangtech.com> wrote:
> 
> 
> >> Your <c:out> works here, the problem is EL not being evaluated
> 
> >> So I still recommend you configure the IsELIgnored page directive
> 
>  As you said  i made IsELIgnored page directive to false,  i got into a new problem that my logic-el tags are not working now.
> 
>  i am getting  an error as "According to TLD or attribute directive in tag file, attribute property does not accept any expressions" in the following line
> 
> <logic-el:iterate id="skip" name="SurveyCreateForm" scope="session" property="pageValue[${pageNo}].questionValue[${questionNo}].skipLogicList" indexId="ctr">
> 
> I guess that EIs in struts-el tags won't work if you make the IsELIgnored page directive to false.
> 
> I tried to convert the above logic-el tag to c:forEach.
> 
> <c:forEach items="${sessionScope.SurveyCreateForm.pageValue[pageNo].questionValue[questionNo].skipLogicList" var="ss" varStatus="status">.
> 
> where pageValue(pageNo) and questionValue(questionNo) are the indexed property methods.But here also i am facing a problem.
> 
> The Error says the expression contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered "", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", "?"]
> 
> I want both JSTL and struts-el tags to work as i can't convert html-el tags. How do i do that?.
> 
> Any clues?.
> 
> 
> 
> thanks,
> Ramkumar
> 
> > On Sat, 28 Aug 2004 18:18:58 +0530, RamKumar <ra...@tarangtech.com> wrote:
> > > > JSTL needs to config in web.xml
> > >
> > > I configured JSTL in web.xml like this.
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
> > >    <taglib-location>/WEB-INF/fmt.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
> > >    <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
> > >    <taglib-location>/WEB-INF/c.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
> > >    <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
> > >    <taglib-location>/WEB-INF/sql.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
> > >    <taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
> > >    <taglib-location>/WEB-INF/x.tld</taglib-location>
> > >  </taglib>
> > >
> > >  <taglib>
> > >    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
> > >    <taglib-location>/WEB-INF/x-rt.tld</taglib-location>
> > >  </taglib>
> > >
> > > and in my jsp page i referred like this
> > >
> > > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
> > >
> > > Anything else i am missing here?.
> > >
> > > thanks,
> > > Ramkumar
> > >
> > >
> > >
> > > > On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
> > > > > Seems the evaluation of El was not working.
> > > > >
> > > > > You can either set JSP configurations in the web.xml
> > > > >
> > > > > or set the IsELIgnored page directive to false in JSP pages.
> > > > > On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com>
> > > wrote:
> > > > > > Hi All,
> > > > > >         I am using JSTL in my JSP page for the first time. I am
> > > running into a problem with the following tag.
> > > > > > <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> > > > > >
> > > > > > and it prints in the page as
> > > "${sessionScope.SurveyCreateForm.surveyTitle}"
> > > > > >
> > > > > > Any clues?
> > > > > >
> > > > > > thanks,
> > > > > > Ramkumar
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Best regards,
> > > > >
> > > > > Can Zheng
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Javen Fang
> > > > -----------------------
> > > > Just for fun - Just do it
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >

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


Re: JSTL Tag problem!!

Posted by RamKumar <ra...@tarangtech.com>.

>> Your <c:out> works here, the problem is EL not being evaluated
 
>> So I still recommend you configure the IsELIgnored page directive

 As you said  i made IsELIgnored page directive to false,  i got into a new problem that my logic-el tags are not working now.

 i am getting  an error as "According to TLD or attribute directive in tag file, attribute property does not accept any expressions" in the following line

<logic-el:iterate id="skip" name="SurveyCreateForm" scope="session" property="pageValue[${pageNo}].questionValue[${questionNo}].skipLogicList" indexId="ctr">

I guess that EIs in struts-el tags won't work if you make the IsELIgnored page directive to false.

I tried to convert the above logic-el tag to c:forEach.

<c:forEach items="${sessionScope.SurveyCreateForm.pageValue[pageNo].questionValue[questionNo].skipLogicList" var="ss" varStatus="status">. 

where pageValue(pageNo) and questionValue(questionNo) are the indexed property methods.But here also i am facing a problem.

The Error says the expression contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered "", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", "?"]


I want both JSTL and struts-el tags to work as i can't convert html-el tags. How do i do that?.

Any clues?.

thanks,
Ramkumar


 

 
> On Sat, 28 Aug 2004 18:18:58 +0530, RamKumar <ra...@tarangtech.com> wrote:
> > > JSTL needs to config in web.xml
> > 
> > I configured JSTL in web.xml like this.
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
> >    <taglib-location>/WEB-INF/fmt.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
> >    <taglib-location>/WEB-INF/c.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
> >    <taglib-location>/WEB-INF/sql.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
> >    <taglib-location>/WEB-INF/x.tld</taglib-location>
> >  </taglib>
> > 
> >  <taglib>
> >    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
> >    <taglib-location>/WEB-INF/x-rt.tld</taglib-location>
> >  </taglib>
> > 
> > and in my jsp page i referred like this
> > 
> > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
> > 
> > Anything else i am missing here?.
> > 
> > thanks,
> > Ramkumar
> > 
> > 
> > 
> > > On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
> > > > Seems the evaluation of El was not working.
> > > >
> > > > You can either set JSP configurations in the web.xml
> > > >
> > > > or set the IsELIgnored page directive to false in JSP pages.
> > > > On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com>
> > wrote:
> > > > > Hi All,
> > > > >         I am using JSTL in my JSP page for the first time. I am
> > running into a problem with the following tag.
> > > > > <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> > > > >
> > > > > and it prints in the page as
> > "${sessionScope.SurveyCreateForm.surveyTitle}"
> > > > >
> > > > > Any clues?
> > > > >
> > > > > thanks,
> > > > > Ramkumar
> > > > >
> > > >
> > > >
> > > > --
> > > > Best regards,
> > > >
> > > > Can Zheng
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Javen Fang
> > > -----------------------
> > > Just for fun - Just do it
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 

Re: JSTL Tag problem!!

Posted by Can Zheng <ca...@gmail.com>.
Your <c:out> works here, the problem is EL not being evaluated

So I still recommend you configure the IsELIgnored page directive

On Sat, 28 Aug 2004 18:18:58 +0530, RamKumar <ra...@tarangtech.com> wrote:
> > JSTL needs to config in web.xml
> 
> I configured JSTL in web.xml like this.
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
>    <taglib-location>/WEB-INF/fmt.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
>    <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
>    <taglib-location>/WEB-INF/c.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
>    <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
>    <taglib-location>/WEB-INF/sql.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
>    <taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
>    <taglib-location>/WEB-INF/x.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
>    <taglib-location>/WEB-INF/x-rt.tld</taglib-location>
>  </taglib>
> 
> and in my jsp page i referred like this
> 
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
> 
> Anything else i am missing here?.
> 
> thanks,
> Ramkumar
> 
> 
> 
> > On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
> > > Seems the evaluation of El was not working.
> > >
> > > You can either set JSP configurations in the web.xml
> > >
> > > or set the IsELIgnored page directive to false in JSP pages.
> > > On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com>
> wrote:
> > > > Hi All,
> > > >         I am using JSTL in my JSP page for the first time. I am
> running into a problem with the following tag.
> > > > <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> > > >
> > > > and it prints in the page as
> "${sessionScope.SurveyCreateForm.surveyTitle}"
> > > >
> > > > Any clues?
> > > >
> > > > thanks,
> > > > Ramkumar
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > Can Zheng
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > Javen Fang
> > -----------------------
> > Just for fun - Just do it
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> 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


Re: JSTL Tag problem!!

Posted by RamKumar <ra...@tarangtech.com>.
> JSTL needs to config in web.xml

I configured JSTL in web.xml like this.

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
    <taglib-location>/WEB-INF/fmt.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
    <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
    <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
    <taglib-location>/WEB-INF/sql.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
    <taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
    <taglib-location>/WEB-INF/x.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
    <taglib-location>/WEB-INF/x-rt.tld</taglib-location>
  </taglib>

and in my jsp page i referred like this

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

Anything else i am missing here?.

thanks,
Ramkumar

> On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
> > Seems the evaluation of El was not working.
> >
> > You can either set JSP configurations in the web.xml
> >
> > or set the IsELIgnored page directive to false in JSP pages.
> > On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com>
wrote:
> > > Hi All,
> > >         I am using JSTL in my JSP page for the first time. I am
running into a problem with the following tag.
> > > <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> > >
> > > and it prints in the page as
"${sessionScope.SurveyCreateForm.surveyTitle}"
> > >
> > > Any clues?
> > >
> > > thanks,
> > > Ramkumar
> > >
> >
> >
> > --
> > Best regards,
> >
> > Can Zheng
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Javen Fang
> -----------------------
> Just for fun - Just do it
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: JSTL Tag problem!!

Posted by Javen Fang <fa...@gmail.com>.
JSTL needs to config in web.xml 


On Sat, 28 Aug 2004 18:17:42 +0800, Can Zheng <ca...@gmail.com> wrote:
> Seems the evaluation of El was not working.
> 
> You can either set JSP configurations in the web.xml
> 
> or set the IsELIgnored page directive to false in JSP pages.
> 
> 
> 
> On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com> wrote:
> > Hi All,
> >         I am using JSTL in my JSP page for the first time. I am running into a problem with the following tag.
> > <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> >
> > and it prints in the page as "${sessionScope.SurveyCreateForm.surveyTitle}"
> >
> > Any clues?
> >
> > thanks,
> > Ramkumar
> >
> 
> 
> --
> Best regards,
> 
> Can Zheng
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
Javen Fang
-----------------------
Just for fun - Just do it

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


Re: JSTL Tag problem!!

Posted by Can Zheng <ca...@gmail.com>.
Seems the evaluation of El was not working.

You can either set JSP configurations in the web.xml

or set the IsELIgnored page directive to false in JSP pages.

On Sat, 28 Aug 2004 13:37:03 +0530, RamKumar <ra...@tarangtech.com> wrote:
> Hi All,
>         I am using JSTL in my JSP page for the first time. I am running into a problem with the following tag.
> <c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
> 
> and it prints in the page as "${sessionScope.SurveyCreateForm.surveyTitle}"
> 
> Any clues?
> 
> thanks,
> Ramkumar
> 


-- 
Best regards,

Can Zheng

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


Re: ExceptionHandler handles, but no error output in JSP(tiles)

Posted by "O. Oke" <re...@yahoo.co.uk>.
 --- Michael McGrady <mi...@michaelmcgrady.com> wrote: 
> O. Oke wrote:
> 
> >Help please!
> >
> >I have just integrated ExceptionHandler into
> >struts-config.xml file.  It now
> >appears to handle exceptions (because stack trace
> is
> >no longer displayed in browser, when there is an
> >error) but no error is output in JSP.
> >My jSP (TILES) has tags for actionErrors and
> >ActionMessages, which outputs errors/messages for
> >other things such as validation errors, but does
> not
> >work for ExceptionHandler in struts-config.xml
> file.
> >
> >Can anyone please tell me why exceptionHandler
> errors
> >are not output in my JSP(tiles) screen?
> >
> >Please see my source code below.
> >
> >Thank you.
> >
> 
> I just had the thought that this whole way of doing
> things may be 
> superior to logging with respect to debugging. 
> Hmmm?
> 
> Michael
> 


Michael,

I do intend to log the error and will add the
functionality to do that later.  My primary concern
for now is to give the user some information.  My
problem is what additional step to take in order to
output the message on the screen - JSP (TILES).

Thank you.

Ola.



	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

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


Re: ExceptionHandler handles, but no error output in JSP(tiles)

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
O. Oke wrote:

>Help please!
>
>I have just integrated ExceptionHandler into
>struts-config.xml file.  It now
>appears to handle exceptions (because stack trace is
>no longer displayed in browser, when there is an
>error) but no error is output in JSP.
>My jSP (TILES) has tags for actionErrors and
>ActionMessages, which outputs errors/messages for
>other things such as validation errors, but does not
>work for ExceptionHandler in struts-config.xml file.
>
>Can anyone please tell me why exceptionHandler errors
>are not output in my JSP(tiles) screen?
>
>Please see my source code below.
>
>Thank you.
>

I just had the thought that this whole way of doing things may be 
superior to logging with respect to debugging.  Hmmm?

Michael


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


ExceptionHandler handles, but no error output in JSP(tiles)

Posted by "O. Oke" <re...@yahoo.co.uk>.
Help please!

I have just integrated ExceptionHandler into
struts-config.xml file.  It now
appears to handle exceptions (because stack trace is
no longer displayed in browser, when there is an
error) but no error is output in JSP.
My jSP (TILES) has tags for actionErrors and
ActionMessages, which outputs errors/messages for
other things such as validation errors, but does not
work for ExceptionHandler in struts-config.xml file.

Can anyone please tell me why exceptionHandler errors
are not output in my JSP(tiles) screen?

Please see my source code below.

Thank you.


The Struts config setting:
=========================

<global-exceptions>
   <exception
      
handler="com.fujimitsu.cargo.exception.CargoExceptionHandler"
       key="global.db.sql.exception"
       path=".customerDef.jsp"
       scope="request"
       type="java.sql.SQLException"/>
</global-exceptions>


Properties file
===============
global.db.sql.exception=The SQL exception below was
raised:



HANDLER
=======
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.config.*;
import org.apache.struts.Globals;

public class CargoExceptionHandler extends
ExceptionHandler {
   public ActionForward execute( Exception ex,
                              ExceptionConfig
exConfig,
                              ActionMapping mapping,
                              ActionForm form,
                              HttpServletRequest
request,
                              HttpServletResponse
response
  ) throws ServletException{



      ActionError error =  new ActionError
(exConfig.getKey (), ex.getMessage ());

      ActionForward forward =
mapping.getInputForward();
      String property = ActionErrors.GLOBAL_MESSAGE;
      String scope = exConfig.getScope();

      storeException (request, property, error,
forward, scope);
      ex.printStackTrace (System.err); // should log
      request.setAttribute ("ex", ex);
      //return forward;

        return (new
ActionForward(mapping.getInput()));
      //return new ActionForward(exConfig.getPath());
   }
}




ACTION ERROR/MESSAGES in tiles...
=================================
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:messagesPresent message="false">
<TR>
<TD class="error" colspan="3">
   <UL>
   <html:messages id="error" header="errors.header"
footer="errors.footer">
      <LI><bean:write name="error"/></LI>
   </html:messages>
   </UL>
</TD>
</TR>
</logic:messagesPresent>
<logic:messagesPresent message="true">
<TR>
<TD class="message" colspan="3">
   <UL>
   <html:messages id="message" message="true"
header="messages.header" footer="messages.footer">
      <LI><bean:write name="message"/></LI>
   </html:messages>
   </UL>
</TD>
</TR>
</logic:messagesPresent>




	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

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


ExceptionHandler handles, but no error output in JSP

Posted by "O. Oke" <re...@yahoo.co.uk>.
Help please!

I have just integrated ExceptionHandler.  It now
appears to handle exceptions (because stack trace is
no longer displayed in browser, when there is an
error) but no error is output in JSP
My jSP (TILES) has tags for actionErrors and
ActionMessages, which outputs errors/messages for
ohter things, but does not work for ExceptionHandler
error.

Can anyone please tell me why exceptionHandler errors
are not output in my JSP screen?

Please see my source code below.

Thank you.


The Struts config setting:
=========================

<global-exceptions>
   <exception
      
handler="com.fujimitsu.cargo.exception.CargoExceptionHandler"
       key="global.db.sql.exception"
       path=".customerDef.jsp"
       scope="request"
       type="java.sql.SQLException"/>
</global-exceptions>


Properties file
===============
global.db.sql.exception=The SQL exception below was
raised:



HANDLE
======
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.config.*;
import org.apache.struts.Globals;

public class CargoExceptionHandler extends
ExceptionHandler {
   public ActionForward execute( Exception ex,
                              ExceptionConfig
exConfig,
                              ActionMapping mapping,
                              ActionForm form,
                              HttpServletRequest
request,
                              HttpServletResponse
response
  ) throws ServletException{



      ActionError error =  new ActionError
(exConfig.getKey (), ex.getMessage ());

      ActionForward forward =
mapping.getInputForward();
      String property = ActionErrors.GLOBAL_MESSAGE;
      String scope = exConfig.getScope();

      storeException (request, property, error,
forward, scope);
      ex.printStackTrace (System.err); // should log
      request.setAttribute ("ex", ex);
      //return forward;

        return (new
ActionForward(mapping.getInput()));
      //return new ActionForward(exConfig.getPath());
   }
}




aCTION ERROR/MESSAGES tiles...
==============================
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:messagesPresent message="false">
<TR>
<TD class="error" colspan="3">
   <UL>
   <html:messages id="error" header="errors.header"
footer="errors.footer">
      <LI><bean:write name="error"/></LI>
   </html:messages>
   </UL>
</TD>
</TR>
</logic:messagesPresent>
<logic:messagesPresent message="true">
<TR>
<TD class="message" colspan="3">
   <UL>
   <html:messages id="message" message="true"
header="messages.header" footer="messages.footer">
      <LI><bean:write name="message"/></LI>
   </html:messages>
   </UL>
</TD>
</TR>
</logic:messagesPresent>



	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

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


Re: JSTL Tag problem!!

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
RamKumar wrote:

>Hi All,
>         I am using JSTL in my JSP page for the first time. I am running into a problem with the following tag.
><c:out value="${sessionScope.SurveyCreateForm.surveyTitle}"/>
>
>and it prints in the page as "${sessionScope.SurveyCreateForm.surveyTitle}"
>
>Any clues?
>
>thanks,
>Ramkumar
>
>  
>
You sure you have not used "(" and ")" instead of "{" and "}"?  That is 
what your results indicate.

Michael


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