struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Badi <ki...@poonam.org>
Subject Re: Integrating struts 2 with Classic JSP SERVLET /JSTL webapp
Date Mon, 11 May 2015 16:59:17 GMT
checking chris. I think that should work.Let me check.

On Mon, May 11, 2015 at 12:51 PM, Chris Pratt <thechrispratt@gmail.com>
wrote:

> If all your URLs aren't at the root (which they probably aren't), you'll
> want to change your url-pattern to just *.action
>   (*Chris*)
>  On May 11, 2015 9:46 AM, "Kiran Badi" <kiran@poonam.org> wrote:
>
> > Hi Chris,
> >
> > Here is Struts 2 filter in web xml,
> >
> >  <filter>
> >         <description>Struts 2 Filter</description>
> >         <filter-name>struts2</filter-name>
> >
> >
> >
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
> >     </filter>
> >     <filter-mapping>
> >         <filter-name>struts2</filter-name>
> >         <url-pattern>/*.action</url-pattern>
> >         <dispatcher>REQUEST</dispatcher>
> >     </filter-mapping>
> >
> > Here is test sample with struts.xml which is web-inf/classes folder
> >
> > <!DOCTYPE struts PUBLIC
> >     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
> >     "http://struts.apache.org/dtds/struts-2.0.dtd">
> >
> > <struts>
> >   <constant name="struts.devMode" value="true" />
> >   <package name="controller" namespace="/" extends="struts-default">
> >       <action name="TestStruts"
> > class="org.vasanti.app.helpcommunity.controller.TestStruts"
> > method="execute" >
> > <result name="success">testdatasource.jsp</result>
> > </action>
> >     </package>
> > </struts>
> >
> > Here is the test link which I have put in my welcome pag
> >
> > On Mon, May 11, 2015 at 9:07 AM, Christoph Nenning <
> > Christoph.Nenning@lex-com.net> wrote:
> >
> > > > I already tried that and it's not working and it fails to deploy to
> > > tomcat.
> > > >
> > >
> > >
> > > Well, then please give us more details.
> > >
> > > You may want to have a look here:
> > > http://struts.apache.org/docs/home.html
> > >
> > >
> > > Regards,
> > > Christoph
> > >
> > >
> > >
> > >
> > >
> > >
> > > > On Monday, May 11, 2015, Christoph Nenning
> > > <Christoph.Nenning@lex-com.net>
> > > > wrote:
> > > >
> > > > > > Hi,
> > > > > >
> > > > > > I need to integrate struts 2 with my classic web application
> based
> > > on
> > > > > > servlet.
> > > > > >
> > > > > > How do I tell struts 2 intercept only requests coming from
> specific
> > > > > folder
> > > > > > like
> > > > > >
> > > > > > com.mysite.app.xx.yy where I will placing all struts related
> source
> > > > > files ?
> > > > > >
> > > > > > Here is the link what I started at stackoverflow,
> > > > > >
> > > > > >
> > http://stackoverflow.com/questions/30056132/integrating-classic-jsp-
> > > > > > servlet-3-0-based-web-application-with-struts-2?
> > > > > > noredirect=1#comment48258124_30056132
> > > > > >
> > > > > > Please see if someone can throw some light on my issue.
> > > > > >
> > > > > > -- Kiran Badi
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Basically you register struts2 in your web.xml for some url
> pattern,
> > > > > usually *.action. Struts interceptors and actions will only be
> > invoked
> > > for
> > > > > those URLs.
> > > > >
> > > > >
> > > > >
> > > > > Regards,
> > > > > Christoph
> > > > >
> > > > > This Email was scanned by Sophos Anti Virus
> > > > >
> > >
> > > This Email was scanned by Sophos Anti Virus
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message