aspose file tools*
The moose likes Servlets and the fly likes JSP, Servlets, File Uploads & Weblogic -- Garbeling files. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP, Servlets, File Uploads & Weblogic -- Garbeling files." Watch "JSP, Servlets, File Uploads & Weblogic -- Garbeling files." New topic
Author

JSP, Servlets, File Uploads & Weblogic -- Garbeling files.

Matt Gregory
Greenhorn

Joined: Jul 24, 2001
Posts: 8
Ok, I normally manage to fix problems on my own but this one has me completely stuck. I have tried 3 implementations for handling file uploads in Weblogic. I have tried Marsh http://sourceforge.net/projects/marsh/ . I have tried the Oreilly com.oreilly.servlet package http://www.servlets.com/cos/index.html . And I have tried implementing my own code. My servlets are running inside of Weblogic 5.1. Every time I upload a file, many of the characters are translated into ascii '?' bytes instead of the origional bytes. This is obviously barbeling anything other than text files.
Has anyone ran into this before?
Matt Gregory
Greenhorn

Joined: Jul 24, 2001
Posts: 8
Doesn't anybody have any idea about this?
Man I would have thought this would have come up somewhere before.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Have you considered looking at your Webserver setup? Perhaps there is a problem with MIME types?

I must say the com.oreilly.servlet classes are excellent, and thankfully, they work on iPlanetWebServer and iPlanet Application Server.

If it can work on this platform, Weblogic should be a cake-walk.
Matt Gregory
Greenhorn

Joined: Jul 24, 2001
Posts: 8
Just to let everyone know: I found the source of this problem: The FileWriter object just replaces bytes not in the character set with '?' characters. Ok, now Sun calls this a "feature", I call it a bloody bug.
It's not well-documented, it's unexpected, and it's just plain ass-backwards thinking IMHO.
syed mraza
Greenhorn

Joined: Aug 23, 2001
Posts: 28
hi guys
i,m trying to upload files thru JSP using weblogic. but getting this error
<Sep 5, 2001 10:39:17 AM PDT> <Error> <NT Performance Pack> <failure in processS
ockets() - GetData: 'weblogic.socket.GetData@2c5444 - fd: '1568', numBytes: '834
''
java.lang.NullPointerException
at weblogic.socket.TunnelContext.getServlet(TunnelContext.java:24)
at weblogic.servlet.internal.MuxableSocketHTTP.dispatch(MuxableSocketHTT
P.java:465)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:638)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
23)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
it doesnt reach the handler i have written, and if i remove the attribute enctype=multipart/form-data it doesnt crash but returns me jsut the name of the file.
do we need to tune weblogic or soemthing?
any help in this regard woudl be appriciated.
rgds
 
Consider Paul's rocket mass heater.
 
subject: JSP, Servlets, File Uploads & Weblogic -- Garbeling files.