[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Getting request parameter value spoils form data encoding

krzsam do-not-reply at jboss.com
Tue Jul 11 08:51:15 EDT 2006


I use JBoss 4.0.4.GA Patch1 with ejb3 profile.

I have a form, written in JSF. Encoding of this form is set through 

  | <%@ page contentType="text/html;charset=Windows-1250"%>
  | 

I have also a filter defined in web.xml which filters all request going to jSF. In such configuration everything works ok. 
But when I do some debugging in my filter, like:

  | log.debug("Request encoding [" + req.getCharacterEncoding() + "] type [" + req.getContentType() +"]" ); 
  | 		Enumeration en = req.getParameterNames();
  | 		for( ; en.hasMoreElements(); ) {
  | 			String el = (String)en.nextElement();
  | 			log.debug( "Parametr [" + el + "] value [" + req.getParameter(el) + "]");
  | 		}
  | 

I got garbage (ok, this is correct, see thread http://www.jboss.com/index.html?module=bb&op=viewtopic&t=84678) BUT this value reading spoils encoding of data which goes to JSF page beans - all form data is messed up, in diffrent (and I dont know what) encoding (maybe iso-8859-1). And my question is why READING of request parameters spoils their values later on ?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956978#3956978

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956978



More information about the jboss-user mailing list