And I did follow the tutorial and that's how I got upto the speed with Struts2. Also I didn't mention earlier, <s:url..> treats my Servlet Action class as Portlet Action class and generates URL specific to it.
I appreciate your help on this Lukasz. *Thanks & Regards/ **सादर**,* *Gaurav Daga* *togauravd...@gmail.com <togauravd...@gmail.com> | +1.201.308.3242 | Web Presence <http://goo.gl/lW0nh> * Do not follow where the path may lead. Go instead where there is no path and leave a trail. - Harold R. McAlindon On Thu, Feb 20, 2014 at 11:20 AM, Gaurav Daga <togauravd...@gmail.com>wrote: > I used Struts2 filter, and here is web.xml for the same : > <filter> > <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>/servlet/*</url-pattern> > </filter-mapping> > > > *Thanks & Regards/ **सादर**,* > *Gaurav Daga* > *togauravd...@gmail.com <togauravd...@gmail.com> | +1.201.308.3242 > <%2B1.201.308.3242> | Web Presence <http://goo.gl/lW0nh> * > Do not follow where the path may lead. Go instead where there is no path > and leave a trail. - Harold R. McAlindon > > > On Thu, Feb 20, 2014 at 10:38 AM, Lukasz Lenart > <lukaszlen...@apache.org>wrote: > >> You didn't provide your web.xml, have you tried follow the tutorial? >> >> http://struts.apache.org/release/2.3.x/docs/struts-2-portlet-tutorial.html >> >> >> 2014-02-20 19:31 GMT+01:00 Gaurav Daga <togauravd...@gmail.com>: >> > 1. CaseTaskPortlet is a portlets action class. >> > 2. caseTasks is servlet based action class. >> > >> > Problem I am having is, if I use <s:url....> tag to generate endpoint >> for >> > my Servlet based action class, it doesn't work. And I tried accessing >> it >> > from browser by constructing a URL manually, it doesn't invoke my >> action. >> > >> > Looking at the below configuration, if you can suggest me like what >> should >> > be my URL to hit the displaySomeMessage() method inside CaseTasksAction >> > action class? >> > >> > >> > Below here is struts xml, I am having: >> > >> > >> > <?xml version="1.0" encoding="UTF-8" ?> >> > <!DOCTYPE struts PUBLIC >> > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" >> > "http://struts.apache.org/dtds/struts-2.3.dtd"> >> > <struts> >> > <constant name="struts.devMode" value="true" /> >> > <package name="amps-base-package" extends="struts-portlet-default"> >> > <interceptors> >> > <interceptor name="EJBInjectionInterceptor" >> > >> class="gov.nv.dwss.amps.presentation.struts.interceptors.EJBInjectionInterceptor" >> > /> >> > <interceptor-stack name="baseStack"> >> > <interceptor-ref name="defaultStack" /> >> > <interceptor-ref name="EJBInjectionInterceptor" /> >> > </interceptor-stack> >> > </interceptors> >> > <default-interceptor-ref name="baseStack" /> >> > </package> >> > <constant name="struts.custom.i18n.resources" >> > >> value="gov.nv.dwss.framework.resourebundle.DplyTxtResourceBundle,gov.nv.dwss.framework.resourebundle.ValidationMessageResourceBundle" >> > /> >> > >> > <package name="view" extends="amps-base-package" >> > namespace="/CaseTaskPortlet/view"> >> > <action name="HomeCaseTaskAction.*" method="{1}" >> > >> class="gov.nv.dwss.amps.casetask.presentation.action.HomeCaseTaskAction"> >> > <result name="home">/jsp/casetask/home.jsp</result> >> > <result name="search">/jsp/casetask/search.jsp</result> >> > <result name="expeditedSNAP">/jsp/casetask/expeditedSNAP.jsp</result> >> > <result name="applications">/jsp/casetask/applications.jsp</result> >> > <result name="changes">/jsp/casetask/changes.jsp</result> >> > <result name="RDRCERTHOME">/jsp/casetask/rdrcert.jsp</result> >> > <result name="mytasks">/jsp/casetask/mytasks.jsp</result> >> > </action> >> > </package> >> > <package name="caseTasks" namespace="/caseTasks" >> extends="struts-default"> >> > <action name="CaseTasksAction" >> > class="gov.nv.dwss.amps.casetask.presentation.action.CaseTasksAction"> >> > <result name="servletHome">/jsp/casetask/test.jsp</result> >> > </action> >> > </package> >> > </struts> >> > >> > >> > *Thanks & Regards/ **सादर**,* >> > *Gaurav Daga* >> > *togauravd...@gmail.com <togauravd...@gmail.com> | +1.201.308.3242 | >> Web >> > Presence <http://goo.gl/lW0nh> * >> > Do not follow where the path may lead. Go instead where there is no path >> > and leave a trail. - Harold R. McAlindon >> > >> > >> > On Wed, Feb 19, 2014 at 10:07 PM, Lukasz Lenart < >> lukaszlen...@apache.org>wrote: >> > >> >> But in struts.xml you can define actions - no reference to servlets >> >> neither portlets. Do you have any error message? >> >> >> >> 2014-02-20 2:41 GMT+01:00 Gaurav Daga <togauravd...@gmail.com>: >> >> > Hello Struts2 Group, >> >> > >> >> > I have a requirement where I want to have Servlet Action Endpoint, as >> >> well >> >> > as Portlet Actions in the same WAR file. I tried configuring the >> >> > struts.xml, for the both package but Struts continued to give me >> error >> >> > while resolving Servlet Action Endpoint. >> >> > >> >> > I just wanted to know if anyone has tries anything similar to this >> before >> >> > and whether it is supported or not. If you can throw me some >> pointers, >> >> > would be great help! >> >> > >> >> > >> >> > Thanks. >> >> > Gaurav Daga >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org >> >> For additional commands, e-mail: dev-h...@struts.apache.org >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org >> For additional commands, e-mail: dev-h...@struts.apache.org >> >> >