Speaking only for myself, I'm not at all interested in hacking Struts to
support non-spec-compliant servlet and JSP implementations.  It's hard
enough working around the bugs of servers that are mostly compliant but
have a few bugs here and there.

Craig McClanahan


On Mon, 10 Sep 2001, Rohan Oberoi wrote:

> Date: Mon, 10 Sep 2001 09:11:41 -0400 (EDT)
> From: Rohan Oberoi <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED],
>      Rohan Oberoi <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Broadvision 6.0 and context-relative path in form mappings
>
> This issue raises the issue of whether Struts can work properly on
> Broadvision ( and whether BV6 is servlet 2.2 compliant).  Perhaps
> there should be a BV section on the Struts installation instructions
> (http://jakarta.apache.org/struts/installation.html) ?
>
> What I learned from BV support so far is that BV has an initial URL
> section called the Gateway name.  For historical reasons it sits in a
> request attribute called "cgi.SCRIPT_NAME".  Thus the full context
> path is actually:
>
> request.getAttribute("cgi.SCRIPT_NAME") + request.getContextPath()
>
> This means that, to get things like the HTML taglibs working, I'd have
> to go in and edit the Struts source.  In this case, it would be the
> getActionMappingURL() method in org.apache.struts.taglib.html.FormTag.
>
> That's a nasty hairy way to make this work and I'd rather do it a more
> elegant way if I can.  I thought of two possibilities:
>
> 1.  Find some way to configure BV to add the cgi.SCRIPT_NAME when
>     returning the contextPath.  This would be ideal, but so far I
>     haven't found a way to do it.
>
> 2.  Add a configurable string (or Java method) into Struts that
>     returns the extra path information to be inserted at the beginning
>     of the context path.  By default and for all sane J2EE
>     installations this could be unset, and those of us using beasts
>     like BV could set it.  Then all the code that currently uses
>     getContextPath(), ie.
>
> org/apache/struts/action/ActionServlet.java
> org/apache/struts/taglib/bean/IncludeTag.java
> org/apache/struts/taglib/html/FormTag.java
> org/apache/struts/taglib/html/ImageTag.java
> org/apache/struts/taglib/html/ImgTag.java
> org/apache/struts/taglib/Link1Tag.java
> org/apache/struts/taglib/logic/ForwardTag.java
> org/apache/struts/taglib/LinkTag.java
> org/apache/struts/upload/MultipartRequestWrapper.java
> org/apache/struts/util/RequestUtils.java
>
>     would concatenate this extra configuration string first.  This
>     question may be appropriate for the DEV list - perhaps I'll raise
>     the question there.
>
> - Rohan.
>
>
> On Mon, 10 Sep 2001, Rohan Oberoi wrote:
>
> > One obvious thing I've figured out is that Broadvision is returning
> > the wrong string from request.getContextPath().
> >
> > Struts (and the Servlet 2.2 spec too, I think) assumes that it can
> > construct the entire path from / using request.getContextPath().
> >
> > However, Broadvision, at least the way my installation is set up, has
> > a complicated structure using Interaction Managers whereby the
> > context-path only returns part of the full path.
> >
> > So - this is not a Struts question, but has anyone tried to set up BV
> > One to One 6.0 so that it can host Servlet 2.2 applications with the
> > Context-Path correctly set?
> >
> > - Rohan.
> >
> >
> >
> >
> > On Sun, 9 Sep 2001, Rohan Oberoi wrote:
> >
> > > I'm having a problem in BV6.0 where my application is located at
> > >
> > > http://192.168.1.5:83/cgi-bin/bv3_rohan/sa
> > >
> > > (in Tomcat this would be something like:
> > >
> > > http://192.168.1.5:8080/sa
> > >
> > > )
> > >
> > > The problem is that Struts under BV6.0 seems to assume that my
> > > context-specific path is /sa rather than /cgi-bin/bv3_rohan/sa, so
> > > that I get a non-working submit URL in the output HTML.
> > >
> > > I have the following in my struts-config.xml:
> > >
> > > ...
> > > <form-beans>
> > >     <form-bean      name="saf_processlogin"
> > >                     type="saf_processlogin"/>
> > > </form-beans>
> > > ...
> > > <action-mappings>
> > >      <action path="/saa_processlogin"
> > >              type="saa_processlogin"
> > >              name="saf_processlogin"
> > >              scope="session">
> > >        <forward name="success" path="/jsp/saa_home.do"/>
> > >      </action>
> > > </action-mappings>
> > > ...
> > >
> > >
> > > And this in my JSP:
> > >
> > > <html:form action="/saa_processlogin.do">
> > > ...
> > > </html:form>
> > >
> > >
> > > Here's what this produces in the output HTML:
> > >
> > > <form name="saf_processlogin" method="POST" 
>action="/sa/jsp/saa_processlogin.do?BV_SessionID=@@@@1384081966.1000078706@@@@&BV_EngineID=ccccadcdddklikdcefecehldgokdgfi.0">
> > >
> > > Perhaps I'm missing something really obvious... would appreciate any
> > > suggestions.
> > >
> > > Regards,
> > > Rohan.
> > >
> > >
> >
> >
>
>
>

Reply via email to