org.apache.cocoon.acting
public class: SetCharacterEncodingAction [javadoc |
source]
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.apache.cocoon.acting.SetCharacterEncodingAction
All Implemented Interfaces:
org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.parameters.Parameterizable, org.apache.avalon.framework.service.Serviceable, Action
Sets the character encoding of parameters.
Components use this encoding as default after the action.
Configuration parameters:
- form-encoding (optional)
- The supposed encoding of the request parameter.
These configuration options supported in both declaration and use time.
If no encoding specified, the action does nothing.
- author:
< - a href="mailto:miyabe@jzf.co.jp">MIYABE Tatsuhiko
- version:
CVS - $Id: SetCharacterEncodingAction.java 433543 2006-08-22 06:22:54Z crossley $
| Method from org.apache.cocoon.acting.SetCharacterEncodingAction Summary: |
|---|
|
act, parameterize |
| Methods from org.apache.cocoon.acting.ServiceableAction: |
|---|
|
service |
| Method from org.apache.cocoon.acting.SetCharacterEncodingAction Detail: |
public Map act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String src,
Parameters par) throws Exception {
Request request = ObjectModelHelper.getRequest(objectModel);
if (request != null) {
String form_encoding = par.getParameter("form-encoding", global_form_encoding);
if (form_encoding != null) {
request.setCharacterEncoding(form_encoding);
}
}
return null;
}
Set character encoding of current request. |
public void parameterize(Parameters parameters) throws ParameterException {
// super.parameterize(parameters);
global_form_encoding = parameters.getParameter("form-encoding", null);
}
|