> MultipartParser mpParser = new MultipartParser(req,
> 10*1024*1024);
try to use a smaller number and see what happens, like 1024bytes, instead of
10Megs.
> -----Original Message-----
> From: Sam Seaver [mailto:samseaver@hotmail.com]
> Sent: Wednesday, October 09, 2002 2:09 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Error with multipartParser
>
>
> I cannot work this out as I get no more in my error messages
> despite trying
> to use the usual ways of debugging the bean. Basically I'm using a bean
> that extends HttpServlet and uses Hunter's MultipartParser, and the error
> ALWAYS occurs when I try to create an instance of the parser...
>
> Error:
>
> root cause
>
> javax.servlet.ServletException:
> com/oreilly/servlet/multipart/MultipartParser
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(Page
> ContextImpl.java:497)
>
> Code:
>
> import java.io.*;
> import java.util.*;
> import javax.servlet.http.*;
> import javax.servlet.*;
>
> import com.oreilly.servlet.*;
> import com.oreilly.servlet.multipart.*;
>
> public class SimpleBean extends HttpServlet {
>
> private String fileName;
> private String name;
> private String type;
> private String output;
>
> public SimpleBean(){
> fileName="";
> name="";
> type="";
> output="";
> }
>
> public void setFileName(String x){
> fileName=x;
> }
>
> public void setName(String x){
> name=x;
> }
>
> public void setType(String x){
> type=x;
> }
>
> public void setOutput(String x){
> output=x;
> }
>
> public void appendOutput(String x){
> output=output+x;
> }
>
> public String getFileName(){
> return fileName;
> }
>
> public String getName(){
> return name;
> }
>
> public String getType(){
> return type;
> }
>
> public String getOutput(){
> return output;
> }
>
> public void doPost(HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException{
> setOutput("Demo Parser Upload Bean");
> res.setContentType("text/html");
> ServletOutputStream out = res.getOutputStream();
>
> try{
> MultipartParser mpParser = new MultipartParser(req,
> 10*1024*1024);
> }catch (Exception e){
> StringWriter sw = new StringWriter();
> PrintWriter pw = new PrintWriter(sw);
> e.printStackTrace(pw);
>
> }
>
>
>
> }
> }
>
>
>
> "JC Rules"
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
|