You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by chuanjiang lo <lo...@gmail.com> on 2006/06/14 18:06:39 UTC

Evaluating expression in 2.3 specifications

Hi all,

I have developed my web application based on 2.4 specifications and now i
have to deploy onto a server that is based on the 2.3 specifications.

I have change the web.xml conforming to 2.3 specifications and the
expression in my jsp page is not being evaluated. I have read on the net and
realize that 2.4 specifications would evaluate the expression.

So what should i do now so that my expression can be evaluated and i do not
wish to change the implementation of my codes.

Appreciate any help

sample of my jsp

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
...
..
<bean:define id="biz_link" type="String" name="Biz_Bean"
property="business_id"/>
<html:link action="/viewBiz/ViewBusinessDetail?business_id=${biz_link}">

${biz_link} is not evaluated.

Re: Need help in sending mail using UTF-8

Posted by Ram <Ba...@Sun.COM>.
Thanks for the response. I did try this putting it in web.xml, but still 
no luck. :-(

Thanks
Ram

William Ross wrote:

> Assuming your creating a j2ee complaint app, after some rather
> exhaustive testing and re-testing, I found that adding this to your
> web.xml seems to be a pretty generic solution:
>
> <locale-encoding-mapping-list>
> <locale-encoding-mapping>
> <locale>cn</locale>
> <encoding>UTF-8</encoding>
> </locale-encoding-mapping>
> </locale-encoding-mapping-list>
>
> If this works in every case, I don't know. I simply don't have the
> timewidth to make definitive conclusions. This worked for me in a
> way that seems like its pretty generic though. Adding any number of
> headers to the request stream just seemed to produce nothing legitimate
> in my case(s). And I do a lot of Asian encoding, being a squeeker of
> Japanese. Good luck.
>
>
> At 09:20 AM 6/14/2006, you wrote:
>
>> Hi,
>>
>> I m trying to send a mail with chinese characters using Apache 
>> Mailer. So, I need to set the charset as UTF-8.
>>
>> In my JSP, I m setting the header as <MailTagLib:header 
>> name="content-type" value="text/html;charset=UTF-8" />. This is 
>> inside <mail> tag and before <send> tag. But when the mail is sent, I 
>> dont see the mail with Chinese characters. Instead, I see "???". When 
>> I see the source code for the email, I see that information
>>
>> MIME-version: 1.0
>> Content-type: text/plain
>> Content-transfer-encoding: 7BIT
>>
>> Is there anything wrong I m doing. Can you please help me solve this 
>> issue.
>>
>> Thanks
>> Ram
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


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


Re: Need help in sending mail using UTF-8

Posted by William Ross <bi...@ross-consult.com>.
Assuming your creating a j2ee complaint app, after some rather
exhaustive testing and re-testing, I found that adding this to your
web.xml seems to be a pretty generic solution:

<locale-encoding-mapping-list>
<locale-encoding-mapping>
<locale>cn</locale>
<encoding>UTF-8</encoding>
</locale-encoding-mapping>
</locale-encoding-mapping-list>

If this works in every case, I don't know. I simply don't have the
timewidth to make definitive conclusions. This worked for me in a
way that seems like its pretty generic though. Adding any number of
headers to the request stream just seemed to produce nothing legitimate
in my case(s). And I do a lot of Asian encoding, being a squeeker of
Japanese. Good luck.


At 09:20 AM 6/14/2006, you wrote:
>Hi,
>
>I m trying to send a mail with chinese characters using Apache Mailer. So, 
>I need to set the charset as UTF-8.
>
>In my JSP, I m setting the header as <MailTagLib:header 
>name="content-type" value="text/html;charset=UTF-8" />. This is inside 
><mail> tag and before <send> tag. But when the mail is sent, I dont see 
>the mail with Chinese characters. Instead, I see "???". When I see the 
>source code for the email, I see that information
>
>MIME-version: 1.0
>Content-type: text/plain
>Content-transfer-encoding: 7BIT
>
>Is there anything wrong I m doing. Can you please help me solve this issue.
>
>Thanks
>Ram
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


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


Need help in sending mail using UTF-8

Posted by Ram <Ba...@Sun.COM>.
Hi,

I m trying to send a mail with chinese characters using Apache Mailer. 
So, I need to set the charset as UTF-8.

In my JSP, I m setting the header as <MailTagLib:header 
name="content-type" value="text/html;charset=UTF-8" />. This is inside 
<mail> tag and before <send> tag. But when the mail is sent, I dont see 
the mail with Chinese characters. Instead, I see "???". When I see the 
source code for the email, I see that information

MIME-version: 1.0
Content-type: text/plain
Content-transfer-encoding: 7BIT

Is there anything wrong I m doing. Can you please help me solve this issue.

Thanks
Ram

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


RE: Evaluating expression in 2.3 specifications

Posted by "Karr, David" <da...@wamu.net>.
>From what little I see, this is what you'll have to change:

1. A JSP 2.0 container uses JSTL 1.1.x  You'll have to use the latest
JSTL 1.0.x taglib.  Note that the URI for those two versions are
different.  Make sure you use the correct one.

2. A JSP 1.2 container does not natively evaluate EL expressions in
attribute values, except for the ones in the JSTL tags.  Fortunately,
you're using the Struts taglib.  In a JSP 1.2 container, you should use
the Struts-EL taglib instead of the default Struts taglib (although
you'll need both the strutsel and struts jars), as Struts-EL uses code
to pass attribute values through the Jakarta EL engine.  In your
struts-el taglib definitions, make it use the same prefix as the regular
taglib, so you don't have to change the tags themselves.  Just change
the URI to match struts-el.

> -----Original Message-----
> From: chuanjiang lo [mailto:lochuanjiang@gmail.com] 
> Sent: Wednesday, June 14, 2006 9:07 AM
> To: taglibs-user@jakarta.apache.org
> Subject: Evaluating expression in 2.3 specifications
> 
> Hi all,
> 
> I have developed my web application based on 2.4 
> specifications and now i have to deploy onto a server that is 
> based on the 2.3 specifications.
> 
> I have change the web.xml conforming to 2.3 specifications 
> and the expression in my jsp page is not being evaluated. I 
> have read on the net and realize that 2.4 specifications 
> would evaluate the expression.
> 
> So what should i do now so that my expression can be 
> evaluated and i do not wish to change the implementation of my codes.
> 
> Appreciate any help
> 
> sample of my jsp
> 
> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ...
> ..
> <bean:define id="biz_link" type="String" name="Biz_Bean"
> property="business_id"/>
> <html:link 
> action="/viewBiz/ViewBusinessDetail?business_id=${biz_link}">
> 
> ${biz_link} is not evaluated.
> 

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