问题
I have some question about mapping url in Glassfish 4.
here is my project structure http://postimg.org/image/5gdyiassj/
as you can see I don't have eshop folder, but in my project there is a redirect to this folder.
I tried to place this code web xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Test MVC Project</display-name>
<description>
E-bookshop example for
Beginning JSP, JSF and Tomcat: from Novice to Professional
</description>
<servlet>
<servlet-name>EBookshopServlet</servlet-name>
<servlet-class>
ebookshop.ShoppingServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>EBookshopServlet</servlet-name>
<url-pattern>/eshop</url-pattern>
</servlet-mapping>
</web-app>
into WEB-INF folder but it still shows this http://postimg.org/image/8zbsatf0f/
So, where is my mistake, what is I am doing wrong?
来源:https://stackoverflow.com/questions/31709601/glassfish-url-mapping