【发布时间】:2011-06-10 11:54:08
【问题描述】:
我有一个 servlet 可以将某些东西放入请求中,但我不能用 jstl 调用它。我做错了什么?
<%@ page import="beans.Patient"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri='http://java.sun.com/jstl/fmt' prefix='fmt' %>
<jsp:useBean id="patBean" class="beans.Patient" scope="session"/>
<c:set var="patientName" value="${patient.name}"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
test
<form action="PatientAction" method="post">
<input type="text" name="patientId" id="patientId"></input>
<input type="submit"/>
</form>
<c:out value="${patientName}" />
<c:out value="${patBean.name}" />
【问题讨论】: