aspose file tools*
The moose likes Servlets and the fly likes JSP in Weblogic & Apache, Help Needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP in Weblogic & Apache, Help Needed" Watch "JSP in Weblogic & Apache, Help Needed" New topic
Author

JSP in Weblogic & Apache, Help Needed

david, chen
Greenhorn

Joined: Jan 18, 2001
Posts: 15
Hi, there:
We have both apache and weblogic5.1 running on HP Unix, with apache as webserver, and weblogic as application server. And, I have a JSP project deployed on weblogic. Everything looks fine when only weblogic server running on my local machine, however, by integrating weblogic with apache, sometimes I can't get the whole HTML file, when I used IE5.5 as browser, and checked the source code, I found only (40%,50%, 60%...)HTML code is there. Further more, when I refreshed, or went back and forth, the page looks fine (got 100% HTML code). It's really appreciated if anyone can help me on that.
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
We've had a similar problem, although using WL6.0. Haven't found a good solution yet, but a work-around is to set the buffer size.
In a servlet, you can use:
response.setBufferSize(bufferSizeInBytes);
In a .jsp, you can use:
<%@page buffer="8kb"%>
Note that setBufferSize takes the actual number of bytes, while the page directive uses kilobytes.
Let me know if you find a better solution.
david, chen
Greenhorn

Joined: Jan 18, 2001
Posts: 15
Hi, Michael:
Thank you very much for your reply. I tried to use <%@page buffer="8kb"%> in my jsp page. It looks better, but still have such problem sometimes. So, here are my 2 questions:
1. When testing, I run weblogic 5.1 on my local machine windows 2000, and run apache on HP Unix, will it cause that problem? (when deploying, both weblogic and apache are supposed to run on HP Unix).
2. Will bigger kilobytes (like 64kb, 128kb) defined in buffersize help? Is the bigger value the better?
Thanks again for your help


Originally posted by Michael Hildner:
We've had a similar problem, although using WL6.0. Haven't found a good solution yet, but a work-around is to set the buffer size.
In a servlet, you can use:
response.setBufferSize(bufferSizeInBytes);
In a .jsp, you can use:
<%@page buffer="8kb"%>
Note that setBufferSize takes the actual number of bytes, while the page directive uses kilobytes.
Let me know if you find a better solution.

Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
8 kilobytes may not be enough, that was just an example. Check out how big your output is. I hate to admit it in public, but I once had to set to 256k.
This in general is not a good solution ( but it works ) because it means (if I understand correctly) that every client using your jsp will cause the server to consume that much memory.
I have the exact same setup as you with the exeption of using WL6.0. I think the problem is the apache proxy. It also does some cookie filtering on less specific domains.
(Maybe this should be moved to WebLogic forum...)
[This message has been edited by Michael Hildner (edited March 22, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP in Weblogic & Apache, Help Needed