File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Search engine friendly URLs in struts 2" Watch "Search engine friendly URLs in struts 2" New topic

Search engine friendly URLs in struts 2

Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

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 (
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684


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

Joined: Aug 03, 2008
Posts: 9291

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:
subject: Search engine friendly URLs in struts 2
Similar Threads
Your opinion on my newbie Webapp Architecture
Wildcard Actions
SEO friendly URLs with Struts
How to make my search page content availble from google search
JForum nice urls (as on Java Ranch)