• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

WriteBeyondContentLen Kyle...Please help

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
we are developing a content management where our client can upload and download contents.
The client wants to keep track the no. of times a file is accessed.
We wrote a servlet that intercepts the request.
increase the access count by one and then


this.getServletConfig().getServletContext().getRequestDispatcher("Uploads/"+((Integer)session.getAttribute("company_no")).toString()+"/"+fileName).forward(request,response);


Here we have a weird problem. When the file is accessed on port 9080 it works fine.
It also works when the file is accessed on the server browser using localhost in url(Without port 9080).
But otherwise I get an error

com.ibm.servlet.engine.srt.WriteBeyondContentLengthException.


Any one has already faced this problem ??

Thanks in advance for your help.
Regards,
Bhiku.
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't specifically seen this problem, but the port 9080 rings a bell. If you don't regen the web server plugin, then 100% restart the http server, you get some strange behavior. So try this:
1) regen the plugin
2) Stop the IBM HTTP Server service
3) Check for any running apache processes -- stop them if there are any**
4) Start the IBM HTTP Server service
5) Restart your app server
**this was my problem, even though I stopped the service, the HTTP admin service was still running so I had to stop that, too.
Hopefully this will help...
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen this problem. I was generating PDF documents using FOP in WAS and any time the document was over 100kb I got this error. The problem is that WAS is a poor file server. It is well documented, for example, not to use the file servlet in production. I had to write the PDF to a temporary file and serve it up from the HTTP server. I hear there may be improvements in some of the fix packs.
dt
 
I do some of my very best work in water. Like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic