我有一個Spring Controller,我正在設置一個帶有變量的會話對象。Spring MVC - JSTL - 會話屬性
@RequestMapping("/index.html")
public String indexHandler(HttpSession session,
HttpServletRequest request,
HttpServletResponse response){
session = request.getSession(true);
session.setAttribute("country","India");
session.setAttribute("url", getAuthURL());//getAuthURL returns a string
return "tempJSP";
//tempJSP is a JSP under webroot/jsps/ and this is configured in Dispatcher servlet
}
tempJSP.jsp
//My 2 taglibs are declared here one is core and other is format
<c:redirect url=<%(String)session.getAttribute("url")%> //Here it fails
您需要向我們提供更多信息,而不是說「在這裏失敗」。 *它如何失敗? – skaffman 2010-10-09 15:07:08