You probably want 
getContext().getResponse().sendError(HttpServletResponse.SC_MOVED_PERMANENTLY);

You could wrap that inside a subclass of Resolution, execute method, if you 
want.

-----Original Message-----
From: Stone, Timothy [mailto:[email protected]] 
Sent: Monday, July 13, 2009 10:09 AM
To: Stripes Users List
Subject: Re: [Stripes-users] Permanent redirect?

Without writing your own Resolution, e.g., PermanentRedirectResolution,
you might try:

1. a ForwardResolution to a resource that generates your 301
2. a ForwardResolution to a resource that performs mapped lookup in
Apache (or other HTTPD), using a query or path element, for a 301.

Writing your own Resolution, extending RedirectResolution, overriding
the execute method, seems plausible. In order of complexity, it might be
the most complex, with #1 being the easiest, IMHO.

Regards,
Tim

> -----Original Message-----
> From: Ray Vanderborght [mailto:[email protected]] 
> Sent: Sunday, July 12, 2009 12:40 AM
> To: [email protected]
> Subject: [Stripes-users] Permanent redirect?
> 
> Is there a way to do a permanent (301) redirect from inside a 
> stripes action?
> 
> What I'm doing is adding keywords to the end of my urls for 
> better SEO, and I'm redirecting existing urls to the new ones 
> with the keywords added.  I'm using a RedirectResolution now 
> to accomplish this but it's issuing a temporary (302) 
> redirect instead of a permanent redirect.
> 
> This article on a related topic (the canonical tag) mentions 
> a 301 redirect as being the right thing to do in this case:
> http://www.mattcutts.com/blog/canonical-link-tag/ (slide #4).
> 
> Anyhow I'm not too hung up on it, but if there's a way to do 
> a permanent redirect that I'm just missing let me know.  Thanks.
> 


Barclays             www.barclaycardus.com

This e-mail and any files transmitted with it may contain confidential and/or 
proprietary information. It is intended solely for the use of the individual or 
entity who is the intended recipient. Unauthorized use of this information is 
prohibited. If you have received this in error, please contact the sender by 
replying to this message and delete this material from any system it may be on.



------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to