I tried both ways:
1)I created beehive-netui-config.xml in WEB-INF, the encoding is realy UTF-8:
<?xml version="1.0" encoding="UTF-8" ?>
<netui-config>
<pageflow-config>
<multipart-handler>memory</multipart-handler>
</pageflow-config>
</netui-config>
but webapp refused to start:
FAIL - Encountered exception java.lang.IllegalStateException: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/netui-tutorial]
has not been started
2)I removed beehive-netui-config.xml and added to Controller`s annotation:
@Jpf.Controller(
simpleActions={
@Jpf.SimpleAction(name="begin", path="index.jsp")
},
multipartHandler=Jpf.MultipartHandler.memory
)
and I got this while uploading file:
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError:
org/apache/commons/io/output/DeferredFileOutputStream
org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:103)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:350)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302)
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:193)
org.apache.beehive.netui.pageflow.MultipartRequestUtils.preHandleMultipartRequest(MultipartRequestUtils.java:209)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processMultipart(PageFlowRequestProcessor.java:921)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionOverride(PageFlowRequestProcessor.java:359)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:469)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>By default, multipart request handling is disabled. The "NetUI Form
>Control Tags" document includes a section on the <netui:fileUpload>
>tag and how to enable multipart request handling. See...
>
>http://beehive.apache.org/docs/1.0.2/netui/tags/formControls.html#FileUpload
>
>Kind regards,
>Carlin
>
>On 5/12/07, "Михаил Noofiz" <[EMAIL PROTECTED]> wrote:
>> Hello.
>>
>> I`ve got a problem while uploading files with com.oreilly.servlet.multipart
>> library.
>> from a jsp page I call a class method? which simply shwos the uploaded file
>> name.
>>
>> Wheb I navigate directly to jsp page everything OK:
>> <form action="page1.jsp" method="POST" enctype="multipart/form-data">
>>
>> But when I try to do the same through the action, which just redirects to
>> page1.jsp, I get:
>> javax.servlet.ServletException: Received a multipart request, but multipart
>> handling is not enabled.
>>
>> Thanks
>>