Our legacy MVC uses servlet mapping by path "/legacy/*" and Struts is mapped
by extension "*.do". 

The legacy servlet initializes user information and adds it to the request
object. It then prepends the request.getRequestURI() with "/root" and uses
the RequestDispatcher to dispatch the request to Struts.  We prepend the
request URI with "/root" so the legacy servlet doesn't dispatch to itself.
We also do this because we wrote our own templating system similar to
SiteMesh without servlet filters... but that's another story.

Struts is doing exactly what it should be doing in a "normal" application.
In my case, I just need to modify that behavior so I can get it to work in
my environment.

-----Original Message-----
From: James Mitchell [mailto:[EMAIL PROTECTED]

On Fri, 2003-03-28 at 13:43, Kuntz, Tim wrote:
> Sorry, "the framework" refers to my legacy MVC framework and we use a
> sub-directory named "/root" to store the views (jsps). So while my page is
> "/root/legacy/struts.jsp", I want the form to post back to
> "/legacy/struts.tpc" so my legacy servlet will setup the request prior to
> handing it off to Struts.

I see.  What is your legacy servlet doing to the request?  It appears to
be confusing Struts.

> 
> -----Original Message-----
> From: James Mitchell [mailto:[EMAIL PROTECTED]

> On Fri, 2003-03-28 at 12:16, Kuntz, Tim wrote:
> > Is it possible to manually control the rendered form action attribute? 
> > 
> > I am migrating and existing MVC framework to Struts and have the
> requirement
> > that the two frameworks run in tandem. The existing framework has a
front
> > servlet that is responsible for user initialization, security, etc... It
> > then modifies the path and forwards to a view which in my case will be
the
> > Struts application. So the user submits to "/legacy/struts.do" but
Struts
> > receives "/root/legacy/struts.do" and the page is
> "/root/legacy/struts.jsp".
> > 
> > 
> > The html:form tag  with an action of "/struts.do" currently sets the
> action
> > to "/root/legacy/struts.do" and I need it to be "/legacy/struts.do".
> > 
> > Has anyone else dealt with this issue?
> 
> The framework is only prepending the context (request.getContextPath()).
> 
> Are you sure it's 'root' and not 'ROOT'?
> 
> 
> > 
> > thanks,
> > tim
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> -- 
> James Mitchell
> Software Developer/Struts Evangelist
> http://www.open-tools.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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]
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




---------------------------------------------------------------------
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