Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, December 10, 2007

java code for JSTL: generate URL, add parameters to url and display the parameters

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>




the c:url action (1)


This page takes 3 values that you specify, and forwards them to another JSP.
That JSP will create a URL to another page, that then extracts the
parameters and displays them.










Enter name:
Enter age:
Enter gender:






//createURL.jsp


<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>









the c:url action (2)


This page receives the values you specified, and creates a URL that contains
them.


The generated URL is .


Click here to view the it.



//displayValues.jsp


<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>



the c:url action (3)


List of query string parameters:





  • =




No comments: