0
这是我的测试servlet;EL表达未评估
public class EventListServlet extends javax.servlet.http.HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
process(request, response);
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
process(request, response);
}
private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setAttribute("name", "test1");
request.getRequestDispatcher("index.jsp").forward(request, response);
}
}
and test jsp;
<html>
<body>
<h2>Hello World!</h2>
<p>${name}</p>
</body>
</html>
,输出为$ {name}的
应该写测试1:/这有什么错在于:
我只是说,但现在的结果是公平的。你好,世界! – cem
所以你看到了改变我的行为?这是一个开始...... – EJK
你是否100%确定你的servlet代码正在执行? – EJK