I’m running tomcat 5.5 and have a small struts application that list data from a table in a DB. The code is simple as follows. In the expression variables in red do not resolve, and when I click on the link in the browser, the url on the address bar looks like:
http://localhost:8080/AdsWeb/displayProjectDetails.do?projectId=${proj.projectId}
Any help is greatly appreciated.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<%@ page language=”java” contentType=”text/html; charset=UTF-8″
pageEncoding=”ISO-8859-1″%>
<%@ taglib uri=”http://struts.apache.org/tags-bean” prefix=”bean” %>
<%@ taglib uri=”http://struts.apache.org/tags-html” prefix=”html” %>
<%@ taglib uri=”http://struts.apache.org/tags-logic” prefix=”logic” %>
<%@ taglib uri=”http://java.sun.com/jstl/core” prefix=”c” %>
<%@ taglib uri=”http://java.sun.com/jstl/fmt” prefix=”fmt” %>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>listProjects.jsp</title>
</head>
<body>
<h3>Project List</h3>
<p><a href=”form/newProject.jsp”>Create a New Project</a></p>
<html:errors />
<c:forEach items=”${projectList}” var=”proj” >
<p>
<b>Project:</b> <c:out value=”${proj.name}” /><br />
<b>Description:</b> <c:out value=”${proj.description}” />
<br /><a href=”projectEditForm.do?addressId=${proj.projectId}“>Edit</a>
<a href=”displayProjectDetails.do?projectId=${proj.projectId}“>Details</a>
</p>
<br />
</c:forEach>
</body>
</html>