Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

<form enctype="multipart/form-data"> problem

843842Jun 28 2006 — edited Jul 2 2008
Hi. 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2008
Added on Jun 28 2006
9 comments
1,076 views