• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't anybody have any idea about this?
Man I would have thought this would have come up somewhere before.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic