jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: java.lang.NoClassDefFoundError--sending file from servlet to other servlet
Date Wed, 25 Sep 2002 21:50:19 GMT
Hi Margaretha,

You need to tell us what class was not found for us to help you. But it
simply means that you have forgotten to put some required jar in your
classpath (client-side classpath I would say). Are you sure you have put
the HTTPClient jar (the one specified in the FAQ entry) in the
classpath?

-Vincent

> -----Original Message-----
> From: Margaretha Sulistyoningsih [mailto:ritha_gd@yahoo.com]
> Sent: 25 September 2002 08:53
> To: cactus-user@jakarta.apache.org
> Subject: java.lang.NoClassDefFoundError--sending file from servlet to
> other servlet
> 
> Hello,
> I ve tried to use the code as written in:
> http://jakarta.apache.org/cactus/faq.html#faq7
> to send file from one servlet to other servlet like
> what Vincent sugested.
> 
> But I have this error while running my program:
> java.lang.NoClassDefFoundError.
> 
> My program looks like this:
> 
> WebRequest theRequest=new WebRequest();
> beginUpload(theRequest);
> 
> NVPair[] hdrs = new NVPair[1];
> 
> public void beginUpload(WebRequest theRequest)
> {
>       NVPair[] opts = { new NVPair("option",
> "myoption") };
>       NVPair[] file = { new NVPair("wavFile",
> "D://VPTS//VPTemplateSystem//test1.wav") };
>       try {
>         byte[] data = Codecs.mpFormDataEncode(opts,
> file, hdrs);
>         InputStream i = new
> ByteArrayInputStream(data);
>         theRequest.setUserData(i);
>         theRequest.setContentType(hdrs[0].getValue());
>         i.close();
>       } catch (IOException e) {
>           System.out.println("Error Building
> Multipart");
>     }
> }
> 
> Hope you guys can help me, it s urgent. Thank s a lot,
> 
> 
> -Margaretha-
> 
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message