Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kiran Sai
Liferay : A query with Liferay Friendly URL routes xml file
February 21, 2013 9:17 PM
Answer

Kiran Sai

Rank: Junior Member

Posts: 47

Join Date: June 29, 2011

Recent Posts

I am navigating from One jsp to another JSP as shown

view.jsp

1    <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
2    <portlet:defineObjects />
3    <portlet:renderURL var="test">
4    <portlet:param name="jspPage" value="/html/sai/edit.jsp" />
5    </portlet:renderURL>
6    <p><a href="<%= test %>">Go to Edit Page</a></p>


edit.jsp

1 <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
2    <portlet:defineObjects />
3    <portlet:renderURL var="test">
4    <portlet:param name="jspPage" value="/html/sai/view.jsp" />
5    </portlet:renderURL>
6    <p><a href="<%= test %>">Go to View Page</a></p>




Currently i have this for friendly url routes.xml file

 1    <?xml version="1.0" encoding="UTF-8"?>
 2    <!DOCTYPE routes PUBLIC "-//Liferay//DTD Friendly URL Routes 6.1.0//EN" "http://www.liferay.com/dtd/liferay-friendly-url-routes_6_1_0.dtd">
 3   
 4    <routes>
 5      <route>
 6        <pattern>/</pattern>
 7        <ignored-parameter name="p_p_lifecycle" />
 8        <ignored-parameter name="p_p_state" />
 9        <ignored-parameter name="p_p_mode" />
10    </route>
11    </routes>


With this the URL is displaying as shown

http://localhost:8080/web/guest/what-we-do/-/sai/?_sai_WAR_Saiportlet_jspPage=%2Fhtml%2Fsai%2Fedit.jsp


Could you please tell me what should be inside

<pattern></pattern>
<generated-parameter name>
Juhi Kumari
RE: Liferay : A query with Liferay Friendly URL routes xml file
February 21, 2013 10:29 PM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi,
1<routes>
2    <route>
3        <pattern>/{jspPageName}</pattern>
4        <generated-parameter name="jspPage">/{jspPageName}.jsp</generated-parameter>
5    </route>
6</routes>


For more information check this For 6.1
and For 6.0.

Regards
Juhi
Kiran Sai
RE: Liferay : A query with Liferay Friendly URL routes xml file
February 22, 2013 10:09 AM
Answer

Kiran Sai

Rank: Junior Member

Posts: 47

Join Date: June 29, 2011

Recent Posts

Thank you Juhi Kumari that worked .