JSTL - web.xml - context init parameter
Hi,
Thank you for reading my post.
I want "some string" to appear on each and every JSP page of my Web site.
I have thought about adding a context init parameter to my "web.xml" file:
==================================================================
<context-param>
<param-name>theStringIWant</param-name>
<param-value>This is the string I want on each and every JSP page of my Web site</param-value>
</context-param>
==================================================================
I want to use JSTL code to have that string rendered in my JSP Web pages.
What do I have to write in my JSP files to get it done properly?
I have tried:
==================================================================
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link type="text/css" rel="stylesheet" href="css/itt.css" />
<title>A JSP Web page</title>
</head>
<body>
<c:out value="${theStringIWant}"></c:out>
</body>
</html>
==================================================================
Maybe there is a better way to do that. If so, can you tell me which?
Thank you in advance for your help.
--
Lmhelp