jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Search engine friendly URLs in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Search engine friendly URLs in struts 2" Watch "Search engine friendly URLs in struts 2" New topic
Author

Search engine friendly URLs in struts 2

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

Hello, I'm trying to create a CMS in struts 2 and I'm stuck at something. I want to create search engine friendly URLs for my articles like we have here at ranch. So for that I want to map my actions to a path such as /article/* or /article.action/* so that it could serve requests such as /article/MyArticle or /article.action/MyArticle. Is it possible in struts 2. I searched a lot over the internet but couldn't find anything.

I would be thankful for any help ...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

There is a REST plugin for Struts 2 (http://struts.apache.org/2.x/docs/rest-plugin.html)
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689


Hi,


with rest plug in, But use or make Url like your page contain data. Give appropriate meaning full URL for you application which makes better Search engine friendly URLs in any application..


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

Thanks Joachim for the help. That's something new to me but I'm ready to get my hands wet with it.

Nishan I think I'm going to let the user enter a url for the article himself/herself like in Joomla. I'll try to make it automatic like here at ranch or in wordpress like you said...
Ally Cavs
Ranch Hand

Joined: Aug 25, 2008
Posts: 89
So whats the soluion. To us ethe rest plugin?

DO i really have to?
there has to be another way?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Search engine friendly URLs in struts 2