Hi,
I did not read the original mail, but for the UTF-8 issue with Tomcat
you might consult the url http://wiki.apache.org/solr/SolrTomcat
The relevant piece of information is under "URI Charset Config":
*** quote ***
Edit Tomcat's conf/server.xml and add the following attribute to the correct
Connector element: URIEncoding="UTF-8".
<Server ...>
<Service ...>
<Connector ... URIEncoding="UTF-8"/>
...
</Connector>
</Service>
</Server>
*** end quote ***
Sven
--On Freitag, 22. Januar 2010 23:41 +0100 Frank Wesemann
<f.wesem...@fotofinder.net> wrote:
Glock, Thomas schrieb:
My flex client httpservice by default only sets the content-type request
header to "application/x-www-form-urlencoded" what it needed to do for
tomcat is set the content-type request header to content-type =
"application/x-www-form-urlencoded; charset=UTF-8";
As some browsers do not send this particular content-type correctly ( at
least Firefox and Safari skip the "charset=utf-8" part),
I added a servlet.Filter :
public class RequestCharset2utf8Filter implements javax.servlet.Filter {
...
public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
chain.doFilter( req, res);
}
}
as the first filter to my webapp:
in web.xml:
<filter>
<filter-name>CharsetEncodingFilter</filter-name>
<filter-class>my.package.servlet.RequestCharset2utf8Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharsetEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I run it on tomcat 6.0.18 .
And:
wonder is of course right, but life isn't all beer and skittles.
--
mit freundlichem Gruß,
Frank Wesemann
Fotofinder GmbH USt-IdNr. DE812854514
Software Entwicklung Web: http://www.fotofinder.com/
Potsdamer Str. 96 Tel: +49 30 25 79 28 90
10785 Berlin Fax: +49 30 25 79 28 999
Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky