You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Akins <an...@gmail.com> on 2010/09/17 18:24:48 UTC
URLRewrite, maybe?
I'm having a bit of a mental block on this one.
Using Struts2, I want to redirect paths like
example.com/Partner55/index.action to example.com/index.action after
I've using a Filter to get the "Partner" value from the URL
Can anyone help point me in the right direction? Is URLRewrite the
correct place to start?
--
Greg Akins
http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts2-jquery-grid-showcase240, is there any tutorial for that ?
Posted by Dave Newton <da...@gmail.com>.
Read up on the Convention plugin.
Dave
On Mon, Sep 20, 2010 at 12:15 PM, A. Lotfi <ma...@yahoo.com> wrote:
> I downloaded struts2-jquery-grid-showcase2.4.0
>
> I do not understand where "index.action" in struts.xml :
>
> index.jsp :
>
> <% response.sendRedirect("index.action"); %>
>
>
> struts.xml :
>
> <struts>
> <constant name="struts.enable.DynamicMethodInvocation" value="false" />
> <constant name="struts.devMode" value="false" />
> <constant name="struts.convention.result.path" value="/pages"/>
> <constant name="struts.convention.action.packages"
> value="com.jgeppert.struts2.jquery.grid.showcase.action"/>
> <constant name="struts.convention.default.parent.package"
> value="showcase"/>
>
> <package name="showcase" extends="hibernate-default,json-default">
> <interceptors>
> <interceptor-stack name="showcaseStack">
> <interceptor-ref name="defaultStackHibernate"/>
> </interceptor-stack>
> </interceptors>
> <default-interceptor-ref name="showcaseStack"/>
> </package>
> </struts>
>
> Thanks, your help is appreciated.
>
>
>
Re: struts2-jquery-grid-showcase240, is there any tutorial for that ?
Posted by Dave Newton <da...@gmail.com>.
On Mon, Sep 20, 2010 at 12:16 PM, Frans Thamura wrote:
> i still learning how the JQuery API can become Java API in S2JQuery
>
I'm not sure what you mean.
Dave
Re: struts2-jquery-grid-showcase240, is there any tutorial for that ?
Posted by Frans Thamura <fr...@meruvian.org>.
i still learning how the JQuery API can become Java API in S2JQuery
john :) wanna share.... here..
--
Frans Thamura
Director
Meruvian.
The Most Complete Java Services Provider in Indonesia
Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info
We grow because we share the same belief.
On Mon, Sep 20, 2010 at 9:15 AM, A. Lotfi <ma...@yahoo.com> wrote:
> I downloaded struts2-jquery-grid-showcase2.4.0
>
> I do not understand where "index.action" in struts.xml :
>
> index.jsp :
>
> <% response.sendRedirect("index.action"); %>
>
>
> struts.xml :
>
> <struts>
> <constant name="struts.enable.DynamicMethodInvocation" value="false" />
> <constant name="struts.devMode" value="false" />
> <constant name="struts.convention.result.path" value="/pages"/>
> <constant name="struts.convention.action.packages"
> value="com.jgeppert.struts2.jquery.grid.showcase.action"/>
> <constant name="struts.convention.default.parent.package" value="showcase"/>
>
> <package name="showcase" extends="hibernate-default,json-default">
> <interceptors>
> <interceptor-stack name="showcaseStack">
> <interceptor-ref name="defaultStackHibernate"/>
> </interceptor-stack>
> </interceptors>
> <default-interceptor-ref name="showcaseStack"/>
> </package>
> </struts>
>
> Thanks, your help is appreciated.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
struts2-jquery-grid-showcase240, is there any tutorial for that ?
Posted by "A. Lotfi" <ma...@yahoo.com>.
I downloaded struts2-jquery-grid-showcase2.4.0
I do not understand where "index.action" in struts.xml :
index.jsp :
<% response.sendRedirect("index.action"); %>
struts.xml :
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.convention.result.path" value="/pages"/>
<constant name="struts.convention.action.packages"
value="com.jgeppert.struts2.jquery.grid.showcase.action"/>
<constant name="struts.convention.default.parent.package" value="showcase"/>
<package name="showcase" extends="hibernate-default,json-default">
<interceptors>
<interceptor-stack name="showcaseStack">
<interceptor-ref name="defaultStackHibernate"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="showcaseStack"/>
</package>
</struts>
Thanks, your help is appreciated.
Re: URLRewrite, maybe?
Posted by Greg Akins <an...@gmail.com>.
I was hoping to use the ConventionPlugin.. but having that in the
struts.xml seems to work better, in this case, than having it in
UrlRewrite.
Thanks for the tip.
2010/9/20 Paweł Wielgus <po...@gmail.com>:
> Hi All,
> i'm using action configuration like this:
>
> < action name="/conference-photo/{conferenceId}/{photoId}"
> class="com.ppp.elsevier.struts.action.ConferencePhotoAction" >
> < result type="stream" >
> < param name="contentType" >image/jpeg< / param >
> < / result >
> < / action >
>
> So in your case it woud be:
> < action name="/{partnerId}/index"
> class="com.ppp.elsevier.struts.action.ConferencePhotoAction" >
> but if that rule have to work for every single action in your
> application automaticaly than maybe URLRewrite will be better.
>
> If You want to use struts based solution read more about it here:
> http://struts.apache.org/2.2.1/docs/wildcard-mappings.html
>
> Best greetings,
> Paweł Wielgus.
>
>
>
> 2010/9/17 Matt Meola <ma...@gmail.com>:
>> I have used URLRewrite with struts2, and it works quite well.
>>
>>
>> On Fri, 2010-09-17 at 12:24 -0400, Greg Akins wrote:
>>
>>> I'm having a bit of a mental block on this one.
>>>
>>> Using Struts2, I want to redirect paths like
>>> example.com/Partner55/index.action to example.com/index.action after
>>> I've using a Filter to get the "Partner" value from the URL
>>>
>>> Can anyone help point me in the right direction? Is URLRewrite the
>>> correct place to start?
>>>
>>
>>
>> --
>> Matt Meola
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Greg Akins
http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: URLRewrite, maybe?
Posted by Paweł Wielgus <po...@gmail.com>.
Hi All,
i'm using action configuration like this:
< action name="/conference-photo/{conferenceId}/{photoId}"
class="com.ppp.elsevier.struts.action.ConferencePhotoAction" >
< result type="stream" >
< param name="contentType" >image/jpeg< / param >
< / result >
< / action >
So in your case it woud be:
< action name="/{partnerId}/index"
class="com.ppp.elsevier.struts.action.ConferencePhotoAction" >
but if that rule have to work for every single action in your
application automaticaly than maybe URLRewrite will be better.
If You want to use struts based solution read more about it here:
http://struts.apache.org/2.2.1/docs/wildcard-mappings.html
Best greetings,
Paweł Wielgus.
2010/9/17 Matt Meola <ma...@gmail.com>:
> I have used URLRewrite with struts2, and it works quite well.
>
>
> On Fri, 2010-09-17 at 12:24 -0400, Greg Akins wrote:
>
>> I'm having a bit of a mental block on this one.
>>
>> Using Struts2, I want to redirect paths like
>> example.com/Partner55/index.action to example.com/index.action after
>> I've using a Filter to get the "Partner" value from the URL
>>
>> Can anyone help point me in the right direction? Is URLRewrite the
>> correct place to start?
>>
>
>
> --
> Matt Meola
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: URLRewrite, maybe?
Posted by Matt Meola <ma...@gmail.com>.
I have used URLRewrite with struts2, and it works quite well.
On Fri, 2010-09-17 at 12:24 -0400, Greg Akins wrote:
> I'm having a bit of a mental block on this one.
>
> Using Struts2, I want to redirect paths like
> example.com/Partner55/index.action to example.com/index.action after
> I've using a Filter to get the "Partner" value from the URL
>
> Can anyone help point me in the right direction? Is URLRewrite the
> correct place to start?
>
--
Matt Meola