Lukas Latz wrote:

Hi List,

Sent this yesterday, but it seemed to not get through to the list. My
apologies if it's come through already. :

I'm badly stuck with a STRUTS web-app that runs fine on Tomcat, but refuses
to bahave nicely in production, where a Netscape Proxy on port 80 maps to a
Netscape Webserver on port 8080, which in turn, with Weblogic plugin, does
loadbalancing to 2 Weblogic machines on port 7001.

As I don't have a lot of STRUTS experience, I stuck closely to the
struts-blank application and tuto, and used the struts-html tags as
advertised, including the <html:base> tag and the <html:form> tag.

Accessed through the proxy, the RequestUtils.getActionMappingURL() that (it
appears) does the real work inside those tags produces wrong servername /
port combinations (correct would be the Proxy's name on port 80).

What compounds the problem is that the web-app is a frameset.
Unusual, granted, but works just fine in Tomcat (inter-frame communication
with event-model using javascript).

The wrong resolution of <html:base> leads to multiple user-sessions within
the frameset (Bad Thing) (one session per frame).

Without success, we've tried several strategies to get around the problem:

- use <html:base> or just the regular html <base> tag, hard setting server
to proper value -> still gets multiple sessions, also can't get the port
right.

- get rid of <base> tag in all incarnations, only use relative links from /
level, works just fine on tomcat but still fails in production, presumably
because the <html:form> tag still resolves wrong?
.. could also be because I still use RequestUtils.getActionMappingURL() to
get the URL for the frame src definitions in the frameset. I had trouble
getting the frames any other way in the absence of the base tag.


I'm now wondering if I can safely do completely without RequestUtils and use simple html <form> instead of struts <html:form> ??

Does the core functionality of Actions, ActionForms and mappings still work
if I replace the struts <html:form> tag with just <form> ??



No, that's not going to work.

Or is there another way around this?

Any pointers much appreciated !



The real problem is that your combination of server technologies (proxies plus webserver plus servlet container) is not maintaining the original URL from the browser all the way through to the servlet -- its being modified along the way. Thus, you are going to have problems with *any* technology based on the servlet API (not just Struts), because such applications will always assume that they can reconstruct request URLs in the way that Struts does it. Indeed, the assumptions that RequestUtils makes are based on *requirements* in the servlet specfication that your combination of technologies are, unfortunately, violating.

That's not a problem that Struts can fix :-(.

Lukas



Craig


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to