<form enctype="multipart/form-data"> problem
843842Jun 28 2006 — edited Jul 2 2008Hi. I use jakarta common fileUpload tag. It works but use of
<form enctype="multipart/form-data"> (which is needed to enable file upload) cause side effects: all form's fields that have some national characters (polish in my case) are changed into rubbish when only I submit the form (they worked with default enctype). Has anybody had such problem? How to solve it?
I am sending an essential fragment of the .jsp page:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib uri="http://java.sun.com/upload" prefix="corejsf"%>
<html>
<head>
<%--<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">--%>
</head>
<body>
<f:view>
<h:form id="MenuForm" styleClass="form" enctype="multipart/form-data">
<corejsf:upload target="upload/#cmsMenuB.menuItem.fileName}.jpg"/>
<h:inputText id="menuName" value="#{cmsMenuB.menuName}" size="20"maxlength="50" onchange="menuModified()"/>
</h:form>
</f:view>
</body>
</html>
I declared proper locale in faces-config.xml as well:
<application>
<message-bundle>properties.messages</message-bundle>
<locale-config>
<default-locale>pl</default-locale>
</locale-config>
</application>
Thx in advance for any advice or suggestion
Regards,
Tom