Mapping struts.xml actions to their full URL

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapping struts.xml actions to their full URL

shonlevin1234@gmail.com
As part of security tests we are doing, I have to map the actions appears in struts.xml to their full URLs. I know to connect between the namespace and the action name of every action from struts.xml, but how can I know which servlet refers to each action?

For example, this is my struts.xml file-

<package name="mypackage" namespace="/barspace">
    <action name="bar" class="mypackage.simpleAction">
        <result name="success" type="dispatcher">bar2.jsp</result>
    </action>
</package>

I know that the URL contains the path "/barspace/bar.action" but how can I build the rest of the URL (with the servlet prefix as well)?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Mapping struts.xml actions to their full URL

Dave Newton-6
The "servlet prefix" (whatever that is) is dependent on the deployment, not
the app.

On Mon, Mar 11, 2019 at 8:22 AM [hidden email] <
[hidden email]> wrote:

> As part of security tests we are doing, I have to map the actions appears
> in struts.xml to their full URLs. I know to connect between the namespace
> and the action name of every action from struts.xml, but how can I know
> which servlet refers to each action?
>
> For example, this is my struts.xml file-
>
> <package name="mypackage" namespace="/barspace">
>     <action name="bar" class="mypackage.simpleAction">
>         <result name="success" type="dispatcher">bar2.jsp</result>
>     </action>
> </package>
>
> I know that the URL contains the path "/barspace/bar.action" but how can I
> build the rest of the URL (with the servlet prefix as well)?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
em: [hidden email]
mo: 908-380-8699
tw: @dave_newton <https://twitter.com/dave_newton>
li: dave-newton <https://www.linkedin.com/in/dave-newton/>
gh: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
bl[0]: Bucky Bits <http://buckybits.blogspot.com/>
bl[1]: Maker's End Blog <https://blog.makersend.com>
sk: davelnewton_skype
Reply | Threaded
Open this post in threaded view
|

Re: Mapping struts.xml actions to their full URL

shonlevin1234@gmail.com


On 2019/03/11 12:42:14, Dave Newton <[hidden email]> wrote:

> The "servlet prefix" (whatever that is) is dependent on the deployment, not
> the app.
>
> On Mon, Mar 11, 2019 at 8:22 AM [hidden email] <
> [hidden email]> wrote:
>
> > As part of security tests we are doing, I have to map the actions appears
> > in struts.xml to their full URLs. I know to connect between the namespace
> > and the action name of every action from struts.xml, but how can I know
> > which servlet refers to each action?
> >
> > For example, this is my struts.xml file-
> >
> > <package name="mypackage" namespace="/barspace">
> >     <action name="bar" class="mypackage.simpleAction">
> >         <result name="success" type="dispatcher">bar2.jsp</result>
> >     </action>
> > </package>
> >
> > I know that the URL contains the path "/barspace/bar.action" but how can I
> > build the rest of the URL (with the servlet prefix as well)?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> --
> em: [hidden email]
> mo: 908-380-8699
> tw: @dave_newton <https://twitter.com/dave_newton>
> li: dave-newton <https://www.linkedin.com/in/dave-newton/>
> gh: davelnewton <https://github.com/davelnewton>
> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
> bl[0]: Bucky Bits <http://buckybits.blogspot.com/>
> bl[1]: Maker's End Blog <https://blog.makersend.com>
> sk: davelnewton_skype
> Not sure what do yo mean... a servlet is associated with a specific web application so how can I get to which servlet each action is mapped to?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Mapping struts.xml actions to their full URL

shonlevin1234@gmail.com
In reply to this post by Dave Newton-6


On 2019/03/11 12:42:14, Dave Newton <[hidden email]> wrote:

> The "servlet prefix" (whatever that is) is dependent on the deployment, not
> the app.
>
> On Mon, Mar 11, 2019 at 8:22 AM [hidden email] <
> [hidden email]> wrote:
>
> > As part of security tests we are doing, I have to map the actions appears
> > in struts.xml to their full URLs. I know to connect between the namespace
> > and the action name of every action from struts.xml, but how can I know
> > which servlet refers to each action?
> >
> > For example, this is my struts.xml file-
> >
> > <package name="mypackage" namespace="/barspace">
> >     <action name="bar" class="mypackage.simpleAction">
> >         <result name="success" type="dispatcher">bar2.jsp</result>
> >     </action>
> > </package>
> >
> > I know that the URL contains the path "/barspace/bar.action" but how can I
> > build the rest of the URL (with the servlet prefix as well)?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> --
> em: [hidden email]
> mo: 908-380-8699
> tw: @dave_newton <https://twitter.com/dave_newton>
> li: dave-newton <https://www.linkedin.com/in/dave-newton/>
> gh: davelnewton <https://github.com/davelnewton>
> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
> bl[0]: Bucky Bits <http://buckybits.blogspot.com/>
> bl[1]: Maker's End Blog <https://blog.makersend.com>
> sk: davelnewton_skype
> Not sure you understood my question... a servlet is associated with a specific web application so how can I know for every action in struts.xml to which servlet it's mapped?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Mapping struts.xml actions to their full URL

Yasser Zamani-2
In reply to this post by shonlevin1234@gmail.com
Hi there,

The whole Struts itself is a servlet/filter defined in web.xml and you cannot divide your actions between multiple servlet/filter I think.

Regards.

>-----Original Message-----
>From: shonlevin1234@ <gmail.com [hidden email]>
>Sent: Monday, March 11, 2019 3:45 PM
>To: [hidden email]
>Subject: Mapping struts.xml actions to their full URL
>
>As part of security tests we are doing, I have to map the actions appears in
>struts.xml to their full URLs. I know to connect between the namespace and the
>action name of every action from struts.xml, but how can I know which servlet
>refers to each action?
>
>For example, this is my struts.xml file-
>
><package name="mypackage" namespace="/barspace">
>    <action name="bar" class="mypackage.simpleAction">
>        <result name="success" type="dispatcher">bar2.jsp</result>
>    </action>
></package>
>
>I know that the URL contains the path "/barspace/bar.action" but how can I build
>the rest of the URL (with the servlet prefix as well)?
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]