JSP CUSTOM TAG LIBRARIES
Examples: urlconverter tag
The following two JavaServer pages work together to convert the URL query strings passed as param1, param2, and param3 variables.
1. This is test.jsp
<%@ taglib uri="WEB-INF/lib/domtags.tld" prefix="domino" %>
<%@ taglib uri="WEB-INF/lib/domutil.tld" prefix="domutil" %>
<%@ page info="View Tag Tester Page" language="java" import="lotus.domino.*" errorPage="error.jsp" %>
<html>
<head>
<title>Tester for Converter Bean</title>
</head>
<body>
<domutil:urlconverter id="converter" debug="true"/>
Bean is : <%=converter.getMyName() %>
<BR>
<%
String parm1 = converter.encode("Ö×ØÙÚÜÝÞß 1") ;
String parm2 = converter.encode("æçéêëì 2") ;
String parm3 = converter.encode("ðñòóôÿÉÊÍ 3") ;
String href="decode.jsp?param1=" + parm1 +"¶m2=" + parm2 + "¶m3=" + parm3 ;
%>
Click <a href="<%=href%>">here</a> to send params to decoder page!!!
</body>
</html>
2. This is decode.jsp
<%@ taglib uri="domtags.tld" prefix="domino" %>\
<%@ taglib uri="domutil.tld" prefix="domutil" %>
<%@ page info="View Tag Tester Page" language="java" import="lotus.domino.*" %>
<html>
<head>
<title>Decoder page for Converter Bean</title>
</head>
<body>
<domutil:urlconverter id="converter" debug="true"/>
<BR>
Parameter 1 : <%=converter.decode("param1")%>
<BR>
Parameter 2 : <%=converter.decode("param2")%>
<BR>
Parameter 3 : <%=converter.decode("param3")%>
<BR>
</body>
</html>
See Also
urlconverter tag
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary