Thanks for your feedback Craig, I promise I won't sue the forwardPattern, you're 
probably right about there not being any money in it ;).

Thanks for your reply -- it got me to the correct solution.

So here's how I fixed it for the archives:

Basically how our apache-BEA bridge worked before was that if Apache saw /BEA at the 
beginning of the URL, it stripped /BEA from the URL and sent the request to BEA to be 
serviced.  BEA saw the /myApp context and handled the app as per normal.  But then 
when it came time to generate a link, it simply used the context root, having no idea 
bout the /BEA thing...

SO -- we modified the apache-BEA link to NOT strip out the /BEA from the URL (by 
commenting out the PathTrim in the httpd.conf), and then adjusted the context-root of 
the webapp to be /BEA/myApp (using the <context-root> element in the weblogic.xml) and 
now everything is hunky-dory.

Thanks again for your comment, it pointed us in the right direction.

        -Jess

-----Original Message-----
From: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 12:27 PM
To: Struts Users Mailing List
Subject: Re: how to prepend an alias to URL?


Sant, Jessica wrote:

>I developed my struts app on BEA where I had a URL like this: 
>http://host.com:7001/myApp/index.do
>In our production environment, we're using an Apache front end, so the BEA stuff has 
>been aliased to something like this: http://host.com/BEA/myApp/index.do
>
>Going to that first page works fine, but when I click on a link the "/BEA" gets cut 
>out of the URL and it goes to: http://host.com/myApp/page2.do
>
>In all my pages I use a link like this: <html:link action="/page2" >asdf</html:link>
>
>Is suing the "forwardPattern" in my struts-config <controller> the correct way to fix 
>this?? if so, how do I do it?
>  
>
I doubt the "forwardPattern" attribute has much money, even if you win 
your suit :-).

Actually, I would look first to how the Apache->BEA linkage is set up 
... what you really want to do is convince the servlet container that 
the context path for your application is "/BEA/myApp" instead of 
"/myApp" so that paths are calculated correctly.  Otherwise, the 
following requirement from the servlet specification:

  requestURI = contextPath + servletPath + pathInfo

will be violated, and this is an assumption that *lots* of servlet-based 
technologies rely on, not just Struts.

>Thanks so much
>       - Jess
>
>  
>
Craig

>   Jessica Sant
>   SGBU-Services and TCE
>   hewlett-packard
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


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


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

Reply via email to