Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app id="WebApp_9" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
- <display-name>Servlet 3.0 application</display-name>
- https://www.baeldung.com/spring-security-expressions
- override 30 min default - to maintain Session
- <session-config>
- <session-timeout>10</session-timeout>
- </session-config>
- <filter>
- <filter-name>ServletMappedDoFilter_Filter</filter-name>
- <filter-class>tests.Filter.DoFilter_Filter</filter-class>
- <init-param>
- <param-name>attribute</param-name>
- <param-value>tests.Filter.DoFilter_Filter.SERVLET_MAPPED</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>ServletMappedDoFilter_Filter</filter-name>
- <url-pattern>/DoFilterTest</url-pattern>
- <dispatcher>REQUEST</dispatcher>
- </filter-mapping>
- <listener>
- <listener-class>tests.ContextListener</listener-class>
- </listener>
- <servlet>
- <servlet-name>welcome</servlet-name>
- <servlet-class>WelcomeServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>welcome</servlet-name>
- <url-pattern>/hello.welcome</url-pattern>
- </servlet-mapping>
- <servlet>
- <servlet-name>redteam</servlet-name>
- <servlet-class>mysite.server.TeamServlet</servlet-class>
- <init-param>
- <param-name>teamColor</param-name>
- <param-value>red</param-value>
- </init-param>
- <init-param>
- <param-name>bgColor</param-name>
- <param-value>#CC0000</param-value>
- </init-param>
- </servlet>
- <welcome-file-list>
- <welcome-file>hello.welcome</welcome-file>
- </welcome-file-list>
- <error-page>
- <exception-type>java.lang.ArrayIndexOutOfBoundsException</exception-type>
- <location>/ServletErrorPage</location>
- </error-page>
- <error-page>
- <error-code>404</error-code>
- <location>/error404.html</location>
- </error-page>
- <taglib>
- <taglib-uri>/i18ntaglib</taglib-uri>
- <taglib-location>/WEB-INF/tlds/i18ntaglib.tld </taglib-location>
- </taglib>
- <servlet>
- <servlet-name>register</servlet-name>
- <jsp-file>/register/start.jsp</jsp-file>
- </servlet>
- App Engine supports automatic compilation and URL mapping for JSPs. A JSP file in the application's WAR (outside of WEB-INF/) whose filename ends in .jsp is compiled into a servlet class automatically, and mapped to the URL path equivalent to the path to the JSP file from the WAR root. For example, if an app has a JSP file named start.jsp in a subdirectory named register/ in its WAR, App Engine compiles it and maps it to the URL path /register/start.jsp.
- If you want more control over how the JSP is mapped to a URL, you can specify the mapping explicitly by declaring it with a <servlet> element in the deployment descriptor. Instead of a <servlet-class> element, you specify a <jsp-file> element with the path to the JSP file from the WAR root. The <servlet> element for the JSP can contain initialization parameters.
- See https://cloud.google.com/appengine/docs/standard/java/config/webxml
- <servlet-mapping>
- <servlet-name>register</servlet-name>
- <url-pattern>/register/*</url-pattern>
- </servlet-mapping>
- </web-app>
Add Comment
Please, Sign In to add comment