You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ravi_eze <ra...@ivycomptech.com> on 2009/07/14 16:42:02 UTC

how to configure struts2 for /*.action?

hi,

We have an application in jsps. Now we added new functionality using Struts
2. 

The jsps (not struts2 jsps) have a file upload utility ( where the multi
part form posts request to /upload.jsp). Now, this upload doesnt work if we
have the struts2 filter mapping in web.xml. If we remove teh mapping then
the upload works but not the struts2 application. 

The filter dispatcher documentation tells not to try other than /* i.e.. i
cant wrtie /*.do or /*.action here. Why so? any reason? or in other words if
i want to get this then how do i proceed? 

The filter is mapped to the end of the chain as said in the documentation.
The cleanup Action context filter is placed before its execution.

Any clues/ ideas? Please help.

regards,
ravi
-- 
View this message in context: http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24481000.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to configure struts2 for /*.action?

Posted by Dale Newfield <da...@newfield.org>.
谢冬鸣 wrote:
> I have another question,

So please start a new thread.  Hijacking another is impolite.

That said, this recent thread answers your question:  It can't be done.

http://www.nabble.com/Struts-2-Plug-in-and-JSP-404-td24415564.html#a24416948

-Dale


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: how to configure struts2 for /*.action?

Posted by Struts Two <st...@yahoo.ca>.
Let's say you have /*.action as your filter URL and you have Websphere application server and IBM Http server as your webserver. Once you try to generate your plugin file for http server, *.action is not picked up by WAS as filter are ignored [since they are not supposed be accessed directly for resource as specified by spec]. To make the long story short, all your requests for *.action would fail.

To fix the issue, you may want to create a dummuy servlet and have *.action as servlet URL. This also would work for any other appserver that may face a similar issue.

--- On Thu, 7/16/09, ravi_eze <ra...@ivycomptech.com> wrote:

> From: ravi_eze <ra...@ivycomptech.com>
> Subject: RE: how to configure struts2 for /*.action?
> To: user@struts.apache.org
> Received: Thursday, July 16, 2009, 6:04 AM
> 
> hi,
> 
> can you give some exampels for which u had to put hacks? We
> will test those
> parts explicitly.
> 
> --
> ravi
> -- 
> View this message in context: http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24510603.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


      __________________________________________________________________
Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: how to configure struts2 for /*.action?

Posted by ravi_eze <ra...@ivycomptech.com>.
hi,

can you give some exampels for which u had to put hacks? We will test those
parts explicitly.

--
ravi
-- 
View this message in context: http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24510603.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: how to configure struts2 for /*.action?

Posted by Struts Two <st...@yahoo.ca>.
Just keep in mind by setting /*.action for your struts filter url, you may cause yourself some problems down the road depending on the app server you use, as struts 2 is not following servlet 2.4 spec in this regard. filters are not supposed to be accessed directly as a resource according to the spec.

I myself have been experiencing some issues for a similar case like this one and had to resort various hacks to get around it.

--- On Wed, 7/15/09, Martin Gainty <mg...@hotmail.com> wrote:

> From: Martin Gainty <mg...@hotmail.com>
> Subject: RE: how to configure struts2 for /*.action?
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Received: Wednesday, July 15, 2009, 9:21 PM
> 
> look at a working example.. showcase contain these *.action
> entries in /WEB-INF/web.xml
> 
>       <servlet>
>        
> <servlet-name>faces</servlet-name>
>        
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>        
> <load-on-startup>1</load-on-startup>
>       </servlet>
>           <servlet>
>        
> <servlet-name>JspSupportServlet</servlet-name>
>        
> <servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
>        
> <load-on-startup>1</load-on-startup>
>       </servlet>
> 
>       <!-- JavaServer Faces Servlet
> Mapping, not called directly -->
>         <servlet-mapping>
>        
> <servlet-name>faces</servlet-name>
>        
> <url-pattern>*.action</url-pattern>
>       </servlet-mapping>
> 
> Martin 
> ______________________________________________ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de
> confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der
> vorgesehene Empfaenger sein, so bitten wir hoeflich um eine
> Mitteilung. Jede unbefugte Weiterleitung oder Fertigung
> einer Kopie ist unzulaessig. Diese Nachricht dient lediglich
> dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer
> den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si
> vous n'êtes pas le destinataire prévu, nous te demandons
> avec bonté que pour satisfaire informez l'expéditeur.
> N'importe quelle diffusion non autorisée ou la copie de
> ceci est interdite. Ce message sert à l'information
> seulement et n'aura pas n'importe quel effet légalement
> obligatoire. Étant donné que les email peuvent facilement
> être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
> > Date: Wed, 15 Jul 2009 16:29:04 -0400
> > From: newton.dave@yahoo.com
> > To: user@struts.apache.org
> > Subject: Re: how to configure struts2 for /*.action?
> > 
> > ravi_eze wrote:
> > > We are not serving static content. 
> > 
> > Not *you*, *Struts 2*.
> > 
> > > What will happen if i do *.action?
> > > Why did the doc say /* *should* be in web.xml?
> > 
> > Because of what you've already been told a couple of
> times now.
> > 
> > Dave
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> 
> _________________________________________________________________
> Hotmail® has ever-growing storage! Don’t worry about
> storage limits. 
> http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009


      __________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: how to configure struts2 for /*.action?

Posted by Martin Gainty <mg...@hotmail.com>.
look at a working example.. showcase contain these *.action entries in /WEB-INF/web.xml

      <servlet>
        <servlet-name>faces</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
          <servlet>
        <servlet-name>JspSupportServlet</servlet-name>
        <servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>

      <!-- JavaServer Faces Servlet Mapping, not called directly -->
        <servlet-mapping>
        <servlet-name>faces</servlet-name>
        <url-pattern>*.action</url-pattern>
      </servlet-mapping>

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Wed, 15 Jul 2009 16:29:04 -0400
> From: newton.dave@yahoo.com
> To: user@struts.apache.org
> Subject: Re: how to configure struts2 for /*.action?
> 
> ravi_eze wrote:
> > We are not serving static content. 
> 
> Not *you*, *Struts 2*.
> 
> > What will happen if i do *.action?
> > Why did the doc say /* *should* be in web.xml?
> 
> Because of what you've already been told a couple of times now.
> 
> Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Re: how to configure struts2 for /*.action?

Posted by Dave Newton <ne...@yahoo.com>.
ravi_eze wrote:
> We are not serving static content. 

Not *you*, *Struts 2*.

> What will happen if i do *.action?
> Why did the doc say /* *should* be in web.xml?

Because of what you've already been told a couple of times now.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to configure struts2 for /*.action?

Posted by ravi_eze <ra...@ivycomptech.com>.
hi,

Thanks for the response.

We are not serving static content. 

We have a JSP which is used to upload images/ files etc.(submits the form to
/upload.jsp) 

When we give the struts mapping, this Jsp doesnt work. 

As said in:
https://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java;
i think we should map only /* in web.xml. Please correct me if i am wrong.

What will happen if i do *.action?
Why did the doc say /* *should* be in web.xml?

Thanks in advance,
ravi 
-- 
View this message in context: http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24495894.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to configure struts2 for /*.action?

Posted by Dave Newton <ne...@yahoo.com>.
ravi_eze wrote:
> did u mean that we cant map only *.action to struts filter? Or u were
> telling of some workaround? Why does struts put this restriction that all
> urls should pass through him? 

As has been stated, S2 serves its own static content. If you're serving 
the static content yourself (or don't need it) then mapping to *.action 
*should* work ok.

> Please help, this is unexpected behavior of our application. 

It can't be *that* unexpected-the documentation explicitly describes it.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to configure struts2 for /*.action?

Posted by 谢冬鸣 <ms...@gmail.com>.
Hi ravi_eze,
One of our projects use Struts2, we have two url patterns /*.action and
/webservice/*, the first one is served by Struts2 and the second is served
by CXF framework directly.
is this what you want?

On Wed, Jul 15, 2009 at 11:06, ravi_eze <ra...@ivycomptech.com>wrote:

>
> i didnt get u,
>
> did u mean that we cant map only *.action to struts filter? Or u were
> telling of some workaround? Why does struts put this restriction that all
> urls should pass through him? And Why does he put restrictions at container
> level.
>
> see web.xml is the container level and i have my own applications/ filters
> in it. I should be given the choice to decide what urls should go to what
> and what not! Now why does struts come at this level at all??; Now that it
> comes what is the work around? The Filter dispatcher documentations says
> not
> to use other than '/*' for url pattern. He doesnt say what i need to do if
> at all i cant put /* there?
>
> Please help, this is unexpected behavior of our application. We were
> thinking all are fine, but suddenly this file upload didnt work (of prev
> jsp
> application).
>
> any help/ ponters are of great help.
>
> regards,
> ravi
>
>
> Wes Wannemacher wrote:
> >
> > 2009/7/14 谢冬鸣 <ms...@gmail.com>:
> >> Hi david,
> >> I have another question, I want to forward my Struts2 result to one jsp
> >> page
> >> which included in one jar file, how can I locate the jsp file? You said
> >> "...there are several Struts2 jars that house css and js files...", do
> >> you
> >> have any idea how to get these files?
> >>
> >> Thanks
> >>
> >> On Tue, Jul 14, 2009 at 23:29, Kawczynski, David
> >> <david_kawczynski@merck.com
> >>> wrote:
> >>
> >>> I was in the same boat...
> >>> One of my clients use apache httpd for all static content
> >>> and tomcat for all dynamic content... there are several
> >>> Struts2 jars that house css and js files.  If you don't
> >>> map everything to the Struts2 filter your Struts2 app
> >>> won't be as full-featured as it could be.  (Javascript
> >>> validation won't work, any themed presentation will appear
> >>> quite plain, etc...)
> >>>
> >
> > As far as I know, the content that is served by struts directly (css,
> > js and image files) are always mapped to URLs that start with /struts.
> > It might be possible to create two mappings, one to /struts/* and
> > another to *.action. As for the question above, I don't think there is
> > any good way to serve a JSP out of a jar file. Rather than packaging
> > your JSPs into your jar, can you configure your build to copy the JSP
> > somewhere into your app so that it can be served traditionally? If you
> > have to put the content into a jar, maybe try looking at freemarker.
> > We use freemarker internally for generating tag output because we can
> > package it in the jar files and it is more general-purpose than JSP.
> >
> > -Wes
> >
> > --
> > Wes Wannemacher
> > Author - Struts 2 In Practice
> > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> > http://www.manning.com/wannemacher
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24491177.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
*********************************************
Xie Dongming
MAIL(Gtalk):msys.xdm@gmail.com
Mobie:+86-15071342225

*********************************************

---------------------------------------------------------------------
俺终身奋斗的最低革命纲领:农妇--山泉--有点儿田

Re: how to configure struts2 for /*.action?

Posted by ravi_eze <ra...@ivycomptech.com>.
i didnt get u,

did u mean that we cant map only *.action to struts filter? Or u were
telling of some workaround? Why does struts put this restriction that all
urls should pass through him? And Why does he put restrictions at container
level. 

see web.xml is the container level and i have my own applications/ filters
in it. I should be given the choice to decide what urls should go to what
and what not! Now why does struts come at this level at all??; Now that it
comes what is the work around? The Filter dispatcher documentations says not
to use other than '/*' for url pattern. He doesnt say what i need to do if
at all i cant put /* there?

Please help, this is unexpected behavior of our application. We were
thinking all are fine, but suddenly this file upload didnt work (of prev jsp
application).

any help/ ponters are of great help.

regards,
ravi 


Wes Wannemacher wrote:
> 
> 2009/7/14 谢冬鸣 <ms...@gmail.com>:
>> Hi david,
>> I have another question, I want to forward my Struts2 result to one jsp
>> page
>> which included in one jar file, how can I locate the jsp file? You said
>> "...there are several Struts2 jars that house css and js files...", do
>> you
>> have any idea how to get these files?
>>
>> Thanks
>>
>> On Tue, Jul 14, 2009 at 23:29, Kawczynski, David
>> <david_kawczynski@merck.com
>>> wrote:
>>
>>> I was in the same boat...
>>> One of my clients use apache httpd for all static content
>>> and tomcat for all dynamic content... there are several
>>> Struts2 jars that house css and js files.  If you don't
>>> map everything to the Struts2 filter your Struts2 app
>>> won't be as full-featured as it could be.  (Javascript
>>> validation won't work, any themed presentation will appear
>>> quite plain, etc...)
>>>
> 
> As far as I know, the content that is served by struts directly (css,
> js and image files) are always mapped to URLs that start with /struts.
> It might be possible to create two mappings, one to /struts/* and
> another to *.action. As for the question above, I don't think there is
> any good way to serve a JSP out of a jar file. Rather than packaging
> your JSPs into your jar, can you configure your build to copy the JSP
> somewhere into your app so that it can be served traditionally? If you
> have to put the content into a jar, maybe try looking at freemarker.
> We use freemarker internally for generating tag output because we can
> package it in the jar files and it is more general-purpose than JSP.
> 
> -Wes
> 
> -- 
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24491177.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to configure struts2 for /*.action?

Posted by Wes Wannemacher <we...@wantii.com>.
2009/7/14 谢冬鸣 <ms...@gmail.com>:
> Hi david,
> I have another question, I want to forward my Struts2 result to one jsp page
> which included in one jar file, how can I locate the jsp file? You said
> "...there are several Struts2 jars that house css and js files...", do you
> have any idea how to get these files?
>
> Thanks
>
> On Tue, Jul 14, 2009 at 23:29, Kawczynski, David <david_kawczynski@merck.com
>> wrote:
>
>> I was in the same boat...
>> One of my clients use apache httpd for all static content
>> and tomcat for all dynamic content... there are several
>> Struts2 jars that house css and js files.  If you don't
>> map everything to the Struts2 filter your Struts2 app
>> won't be as full-featured as it could be.  (Javascript
>> validation won't work, any themed presentation will appear
>> quite plain, etc...)
>>

As far as I know, the content that is served by struts directly (css,
js and image files) are always mapped to URLs that start with /struts.
It might be possible to create two mappings, one to /struts/* and
another to *.action. As for the question above, I don't think there is
any good way to serve a JSP out of a jar file. Rather than packaging
your JSPs into your jar, can you configure your build to copy the JSP
somewhere into your app so that it can be served traditionally? If you
have to put the content into a jar, maybe try looking at freemarker.
We use freemarker internally for generating tag output because we can
package it in the jar files and it is more general-purpose than JSP.

-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to configure struts2 for /*.action?

Posted by 谢冬鸣 <ms...@gmail.com>.
Hi david,
I have another question, I want to forward my Struts2 result to one jsp page
which included in one jar file, how can I locate the jsp file? You said
"...there are several Struts2 jars that house css and js files...", do you
have any idea how to get these files?

Thanks

On Tue, Jul 14, 2009 at 23:29, Kawczynski, David <david_kawczynski@merck.com
> wrote:

> I was in the same boat...
> One of my clients use apache httpd for all static content
> and tomcat for all dynamic content... there are several
> Struts2 jars that house css and js files.  If you don't
> map everything to the Struts2 filter your Struts2 app
> won't be as full-featured as it could be.  (Javascript
> validation won't work, any themed presentation will appear
> quite plain, etc...)
>
> If you really want to use a non-default filter mapping
> pattern, this can be worked around... You just have to
> determine the files are returning 404 status codes to the
> browser (use firebug or yslow). Find those files in the
> struts jars, and extract them (preserving path info) to
> the web server.
>
>
> > -----Original Message-----
> > From: ravi_eze [mailto:ravichandrac@ivycomptech.com]
> > Sent: Tuesday, July 14, 2009 10:42 AM
> > To: user@struts.apache.org
> > Subject: how to configure struts2 for /*.action?
> >
> >
> > hi,
> >
> > We have an application in jsps. Now we added new
> > functionality using Struts
> > 2.
> >
> > The jsps (not struts2 jsps) have a file upload utility (
> > where the multi
> > part form posts request to /upload.jsp). Now, this upload
> > doesnt work if we
> > have the struts2 filter mapping in web.xml. If we remove teh
> > mapping then
> > the upload works but not the struts2 application.
> >
> > The filter dispatcher documentation tells not to try other
> > than /* i.e.. i
> > cant wrtie /*.do or /*.action here. Why so? any reason? or in
> > other words if
> > i want to get this then how do i proceed?
> >
> > The filter is mapped to the end of the chain as said in the
> > documentation.
> > The cleanup Action context filter is placed before its execution.
> >
> > Any clues/ ideas? Please help.
> >
> > regards,
> > ravi
> > --
> > View this message in context:
> > http://www.nabble.com/how-to-configure-struts2-for--*.action--
> > tp24481000p24481000.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
*********************************************
Xie Dongming
MAIL(Gtalk):msys.xdm@gmail.com
Mobie:+86-15071342225

*********************************************

---------------------------------------------------------------------
俺终身奋斗的最低革命纲领:农妇--山泉--有点儿田

RE: how to configure struts2 for /*.action?

Posted by "Kawczynski, David" <da...@merck.com>.
I was in the same boat... 
One of my clients use apache httpd for all static content 
and tomcat for all dynamic content... there are several 
Struts2 jars that house css and js files.  If you don't 
map everything to the Struts2 filter your Struts2 app 
won't be as full-featured as it could be.  (Javascript 
validation won't work, any themed presentation will appear 
quite plain, etc...)

If you really want to use a non-default filter mapping 
pattern, this can be worked around... You just have to 
determine the files are returning 404 status codes to the 
browser (use firebug or yslow). Find those files in the 
struts jars, and extract them (preserving path info) to 
the web server.  


> -----Original Message-----
> From: ravi_eze [mailto:ravichandrac@ivycomptech.com] 
> Sent: Tuesday, July 14, 2009 10:42 AM
> To: user@struts.apache.org
> Subject: how to configure struts2 for /*.action?
> 
> 
> hi,
> 
> We have an application in jsps. Now we added new 
> functionality using Struts
> 2. 
> 
> The jsps (not struts2 jsps) have a file upload utility ( 
> where the multi
> part form posts request to /upload.jsp). Now, this upload 
> doesnt work if we
> have the struts2 filter mapping in web.xml. If we remove teh 
> mapping then
> the upload works but not the struts2 application. 
> 
> The filter dispatcher documentation tells not to try other 
> than /* i.e.. i
> cant wrtie /*.do or /*.action here. Why so? any reason? or in 
> other words if
> i want to get this then how do i proceed? 
> 
> The filter is mapped to the end of the chain as said in the 
> documentation.
> The cleanup Action context filter is placed before its execution.
> 
> Any clues/ ideas? Please help.
> 
> regards,
> ravi
> -- 
> View this message in context: 
> http://www.nabble.com/how-to-configure-struts2-for--*.action--
> tp24481000p24481000.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org