CallAttrributeCheck.jsp

To work this example save this file in the jsp directory of a jakarta-tomcat-4.0.1. Open up the web browser and try your URL localhost:8080/examples/jsp/CallAttributeCheck.jsp

This sample shows how the first object associated with the attribute "query" is not stored, although the last is. Using attributes is a powerful technique for sharing information, like logon data, between JSP pages.

CallAttributeCheck.jsp

< %
request.setAttribute(:"query","Hello") ;
request.setAttribute(:"query","Good-Bye") ;
request.setAttribute(:"database","jdbc") ;
request.setAttribute(:"user","java") ;
request.setAttribute(:"password","getit") ;

%>

< jsp:forward page="AttributeCheck.jsp"/ >