• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WriteBeyondContentLen Kyle...Please help

 
Bhiku Mhatre
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • 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.
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • 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...
 
Danl Thompson
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic