URL Path directions possible?

Hi , i ve written some vaadin application works on this path on my liferay glassfish:

I want my vaadin portlet to work on all sub directories too , like ;


So when google indexes my page , my all documents get indexed better.
Because of title and url path.

But when i try ;

The requested resource was not found.


How can i make all subdirectories also direct to my portlet?

Its important for SEO please someone can help little?

Thats really what i want :

We are trying to make book that works on international language support.
When i click on tree , it goes ajax query and show content on right side.

How did they do url change?
When i click on some tree , its sending ajax query but url path also changes :

But stays on same app.
How did you do this?

Put a Apache Webserver with redirect rules in front to archieve this.

www.mywebsite.com/some/keyword1 → [Internal-IP]
www.mywebsite.com/some/keyword2 → [Internal-IP]

Its generally not a good idea to allow direct acces to your servlet container (tomcat, jetty, …) from the internet. Thats why all servlet containers are shipped with default port > 1000 (most 8080).

the book chapter

You can also search for related posts on the forum, or if you are a Pro Account subscriber, there is a
short knowledge base entry
about URIFragmentUtility and
a longer one about SEO
that also has some background information links.

I’m using Liferay ,
i ve seen on documentation , there is something named ,
Friendly URL Mapper ,
But i ve still problem on liferay.

My codes is shown below on liferay-portlet.xml :

I’ve added :
this line and finally:


and java side:

package com.test;

import java.util.Map;

import javax.portlet.PortletMode;
import javax.portlet.WindowState;

import com.liferay.portal.kernel.portlet.BaseFriendlyURLMapper;
import com.liferay.portal.kernel.portlet.LiferayPortletURL;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.util.PortletKeys;

public class SearchFriendlyURLMapper extends BaseFriendlyURLMapper {
private static final String _MAPPING = “journal”;
private static final String _PORTLET_ID = PortletKeys.JOURNAL_CONTENT;

public String buildPath(LiferayPortletURL path) {
	return "/web/guest/testxxx";

public void populateParams(String friendlyURLPath, Map<String, String[]> params,Map<String, Object> arg2) {
	System.out.println("Path Now:"+friendlyURLPath);
	String[] items = friendlyURLPath.split("/");

public boolean isCheckMappingWithPrefix() {
        return true;

public String getMapping() {
    return _MAPPING;


But this code is making infinite loop.
My same page always start to refresh all the time and cant stop.
Whats wrong here? Someone know liferay solution here?