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 Lorenzo Sicilia <ar...@kemen.it> on 2004/08/13 16:51:33 UTC

mail and fmt:message

Hi to all,

I have search in ML archive but I don't found any post about that.

I have this snipets:
<%-- sending confirm mail --%>
<mt:mail>
	<mt:server>mail.xxxx.it</mt:server>
	<mt:from>info@xxxx.com</mt:from>
	<mt:subject><fmt:message key="mail.subject" /></mt:subject>
	<mt:setrecipient type="to"><c:out value="${user.email}" 
/></mt:setrecipient>
	<mt:message type="text">
		<fmt:message key="mail.text.header" /><br/>
		<fmt:message key="user.full_name" /><c:out 
value="${user.full_name}"/><br/>
		<fmt:message key="user.nick_name" /><c:out 
value="${user.nick_name}"/><br/>
		<fmt:message key="user.pswd"      /><c:out value="${user.pswd}"/><br/>
		TODO: altri dati a piacere<br/>
		<c:out value="${user.email}" />
		<fmt:message key="welcome" />
		<fmt:message key="mail.text.footer" />
	</mt:message>
	<mt:send>
		<mt:error id="error_mail" >
		</mt:error>
	</mt:send>
</mt:mail>

The mail is send fine but <fmt:message> cannot be resolved.

The email output is:
???mail.text.header???<br/>
???user.full_name???full_name<br/>
???user.nick_name???arnor3<br/>
???user.pswd???123456789<br/>
TODO: altri dati a piacere<br/>
arnor@kemen.it
???welcome???
???mail.text.footer???

I use http://jakarta.apache.org/taglibs/mailer-1.1

Any idea?

regards Lorenzo Sicilia

--
KEMEN srl
http://www.kemen.it


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


Re: mail and fmt:message (charset problem)

Posted by Lorenzo Sicilia <ar...@kemen.it>.
Kris Schneider wrote:
> Do you have an entry like the following in web.xml:
> 
> <web-app>
>   ....
>   <context-param>
>     <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
>     <param-value>Messages</param-value>
>   </context-param>
>   ....
> </web-app>
> 
> This sets up a default resource bundle (WEB-INF/classes/Messages.properties) for
> JSTL's fmt tags.

I have put in web.xml fmt setting but the charset is exploded :)

I have a query from mysql with this output

output ko
italiano
english
fran?aise

output ok:
italiano
english
française

if I remove fmt setting in web.xml and I put it in a jsp all work fine.
In my header.jsp I put:
<fmt:setBundle basename="localtext" scope="application" />

May be a bug of fmt tag? I use jstl 1.0.5

regards Lorenzo

ps. Sorry my english is very poor ;)


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


Re: mail and fmt:message

Posted by Lorenzo Sicilia <ar...@kemen.it>.
Kris Schneider wrote:
> Do you have an entry like the following in web.xml:
> 
> <web-app>
>   ....
>   <context-param>
>     <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
>     <param-value>Messages</param-value>
>   </context-param>
>   ....
> </web-app>
> 
> This sets up a default resource bundle (WEB-INF/classes/Messages.properties) for
> JSTL's fmt tags.

Many thanks Kris. It was a stupid error. In my page I don't include 
<fmt:setBundle basename="localtext" scope="page" />

Now, I put the setting in web.xml

Regards Lorenzo

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


Re: mail and fmt:message

Posted by Kris Schneider <kr...@dotech.com>.
Do you have an entry like the following in web.xml:

<web-app>
  ....
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>Messages</param-value>
  </context-param>
  ....
</web-app>

This sets up a default resource bundle (WEB-INF/classes/Messages.properties) for
JSTL's fmt tags.

Quoting Lorenzo Sicilia <ar...@kemen.it>:

> Hi to all,
> 
> I have search in ML archive but I don't found any post about that.
> 
> I have this snipets:
> <%-- sending confirm mail --%>
> <mt:mail>
> 	<mt:server>mail.xxxx.it</mt:server>
> 	<mt:from>info@xxxx.com</mt:from>
> 	<mt:subject><fmt:message key="mail.subject" /></mt:subject>
> 	<mt:setrecipient type="to"><c:out value="${user.email}" 
> /></mt:setrecipient>
> 	<mt:message type="text">
> 		<fmt:message key="mail.text.header" /><br/>
> 		<fmt:message key="user.full_name" /><c:out 
> value="${user.full_name}"/><br/>
> 		<fmt:message key="user.nick_name" /><c:out 
> value="${user.nick_name}"/><br/>
> 		<fmt:message key="user.pswd"      /><c:out value="${user.pswd}"/><br/>
> 		TODO: altri dati a piacere<br/>
> 		<c:out value="${user.email}" />
> 		<fmt:message key="welcome" />
> 		<fmt:message key="mail.text.footer" />
> 	</mt:message>
> 	<mt:send>
> 		<mt:error id="error_mail" >
> 		</mt:error>
> 	</mt:send>
> </mt:mail>
> 
> The mail is send fine but <fmt:message> cannot be resolved.
> 
> The email output is:
> ???mail.text.header???<br/>
> ???user.full_name???full_name<br/>
> ???user.nick_name???arnor3<br/>
> ???user.pswd???123456789<br/>
> TODO: altri dati a piacere<br/>
> arnor@kemen.it
> ???welcome???
> ???mail.text.footer???
> 
> I use http://jakarta.apache.org/taglibs/mailer-1.1
> 
> Any idea?
> 
> regards Lorenzo Sicilia
> 
> --
> KEMEN srl
> http://www.kemen.it

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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