tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Gesin <evgenyge...@yahoo.com>
Subject Re: JSTL: POST vs GET
Date Fri, 06 Feb 2004 22:05:12 GMT
I just tried these configuration parameters, except
QueryStringEncoding which I cannot find in Tomcat docs
for server.xml (I don't use Tomcat API) without much
luck.

At least the bug indicates that problem exists and
POST is a quick solution.

But I want to hear, if I move to Tomcat 5 (currently
run 4.1), will that solve the problem ?

Evgeny Gesin
Javadesk

--- Hans Bergsten <hans@gefionsoftware.com> wrote:
> Evgeny Gesin wrote:
> > Hi,
> > I will provide a little more information, may be
> that
> > will be important.
> > 
> > 1. I use an in-house developed Tiles, similar to
> > Struts, so each page is make up of of dinamically
> > included pages, for example, header, content and
> > footer JSPs.
> > 
> > 2. I use only i18n from JSTL package, so web.xml
> have
> > a single declaration for that JSTL library as
> below
> > 
> > <taglib>
> >  <taglib-uri>fmt</taglib-uri>
> > 
> >
>
<taglib-location>/WEB-INF/tld/fmt-1_0-rt.tld</taglib-location>
> > </taglib>
> > 
> > 3. A "wrapper" Tile page declares
> > <%@ page language="java" contentType="text/html;
> > charset=UTF-8" %>
> > 
> > 4. A "template" Tile page declares
> > <META HTTP-EQUIV="content-type"
> CONTENT="text/html;
> > charset=UTF-8" />
> > 
> > 5. Each "included" JSP page has these lines
> > 
> > <%@ taglib uri='fmt' prefix='fmt' %>
> > <jsp:useBean id="locale" scope="session"
> > class="java.util.Locale" />
> > <fmt:setLocale value="<%= locale %>" />
> > <fmt:bundle basename="bundle">
> > <TABLE>
> >   <fmt:message key="header" />
> >   <FORM ACTION="anAction" METHOD=GET>
> > ... <-- here are all JSP/HTML tags
> >   </FORM>
> > </TABLE>
> > </fmt:bundle>
> > 
> > JSP may also use <fmt:> to format numbers and
> > currencies. Please ask if you need more
> information.
> > 
> > You can visit http://www.javadesk.com and see that
> all
> > pages are UTF-8 encoded.
> > 
> > A characterEncodingFilter sets encoding
> > 
> > request.setCharacterEncoding("UTF-8");
> > response.setContentType("text/html;
> charset=UTF-8");
> > 
> > Now, if I submit the above web page, all UTF-8
> encoded
> > data became gibberish. If I replace 
> > 
> > <FORM ACTION="anAction" METHOD=GET>
> > with
> > <FORM ACTION="anAction" METHOD=POST>
> > 
> > everything works fine. What is wrong ?
> 
> Tomcat 5 doesn't use the encoding you set with
> setCharacterEncoding()
> for query string parameters, only for parameters in
> a POST body:
> 
>   
>
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12253>
> 
> Hans
> -- 
> Hans Bergsten                               
> <hans@gefionsoftware.com>
> Gefion Software                      
> <http://www.gefionsoftware.com/>
> Author of O'Reilly's "JavaServer Pages", covering
> JSP 2.0 and JSTL 1.1
> Details at                                   
> <http://TheJSPBook.com/>
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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


Mime
View raw message