tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goss <mg...@rtci.com>
Subject Re: Tomcat 3.2 tries to read POST data before forwarding to JSP
Date Fri, 01 Dec 2000 19:43:01 GMT
thanks... :)
Matt

"Craig R. McClanahan" wrote:

> Matt Goss wrote:
>
> > Craig,
> > I'm looking at using the MVC method for a current project... how exactly does
> > struts benifit this framework?
>
> Struts is an implementation of the MVC processing model, including a controller
> servlet and a framework for defining actions, plus mechanisms for assigning logical
> names to business and presentation logic components so that changes in the path of a
> JSP page (for example) do not require changes to the application logic in your
> actions.  There's also a very nice custom tag library for building internationalized
> form-based web applications.
>
> For more info, see <http://jakarta.apache.org/struts>, and join the STRUTS-USER
> maililng list.
>
> >
> > just curious...
> > Also (since, I've got you ear), I've tried a similar process under tomcat 3.1
> > where I route all requests (ie<servlet-mapping><servlet-name>router</servlet-name>
> > <url-pattern>/*</url-pattern></servlet-mapping>)through a router
servlet to check
> > login and whatnot. I couldn't get it to work... is this a bug in 3.1??? We are
> > upgrading to 3.2 now that it is released and I was hoping that would fix the
> > problem...
>
> If you map to "/*", your controller servlet will indeed catch all requests.  The
> problem is that you won't be able to forward to a JSP page later -- because the "/*"
> pattern will catch JSP pages also :-(.
>
> What I like to do is map the controller servlet to an extension (my favorite is "*.do"
> which implies "go do something").  Then, I can have a form submit that goes to a url
> like:
>
>     /myapp/saveCustomer.do
>
> which will be sent to the controller servlet, which then figures out which action to
> call based on the "/saveCustomer" part (which your servlet can extract by calling
> getServletPath() and doing a little string processing), and things go on from there.
>
> >
> > thanks,
> > Matt Goss
> >
>
> Craig
>
> >
> > "Craig R. McClanahan" wrote:
> >
> > > Duane,
> > >
> > > The problem you're referring to doesn't happen to me, even though I use this
> > > kind of programming approach all the time (in Struts).  Do you have a simple
> > > test case that you can send to help us isolate this?
> > >
> > > Craig McClanahan

Mime
View raw message