In SpringMVC framework, we may take advantage of El expression to get the current project name, but turned out to be an error?
<a href="user/testController?username=hehe">请求测试1</a>
<a href="/user/testController?username=haha&password=123">请求测试2</a>
<a href="${pageContext.request.contextPath}/user/testController?username=haha&password=123">请求测试3</a>
We can see that the above code is no problem, but why choose request a test to three, being given it?
abnormal:
<% - [/ $% 7BpageContext.request.contextPath % 7D / user / testController] in DispatcherServlet with name 'DispatcherServlet' -%>
later learned that, in the jsp, if the selected format, then the head jsp have such a property: isELIgnored = "false", what does that mean?
If set to true, then the JSP expression is treated as a character string. Example, the following expression is $ 20 {2000%}, when the output isELIgnored = "true" for the $ 20 {2000%},
and the output 100 is isELIgnored = "false". Web container default isELIgnored = "false".
Therefore, we recommend jsp head plus isELIgnored = "false" attribute, so we can use the EL expression