This article transferred from: https://www.vastyun.com/bloger/670.html
The new JSP page does not have the same page as Eclipse
<%== request.getscheme () + "://" +request.getservername () + ":" + request.getserverport () + path + "/ "; %>
However, when you manually add the above code, you will get an error, Workaround: Add reference Javax.servlet-api-x.x.x.jar to the project. You can refer to the links above for specific ways.
To support EL expressions, you need to reference the Jstl-1.2.jar class library, and then you can write code like this on a JSP page:
<%@ taglib Prefix="C"URI="Http://java.sun.com/jsp/jstl/core" %><C:choose> <C:whenTest= "${not Empty Sessionscope.user}">welcome you: ${sessionscope.username}</C:when> <c:otherwise>you are not logged in, please log in first:<formAction= "<%= path%>/login<%= path +"a "%>"method=" POST "> UserName:<inputtype= "text"name= "UserName" /><BR/>Password:<inputtype= "Password"name= "Password" /><BR/> <inputtype= "Submit"value= "Login" /> </form> </c:otherwise></C:choose>
Go Idea when creating a new JSP project