I have a problem for mapping my servlet with my Java Server Page, using the JSF framework and especially the commandLink tag.
When I click on the commandLink it only reload the same productList.jsp.
Here is my map web.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>Epimarket</display-name>
<servlet>
<servlet-name>mainServlet</servlet-name>
<servlet-class>com.epimarket.controller.EpimarketServlet</servlet-class>
<init-param>
<param-name>listURL</param-name>
<param-value>productList.jsp</param-value>
</init-param>
<init-param>
<param-name>editURL</param-name>
<param-value>productEdit.jsp</param-value>
</init-param>
<init-param>
<param-name>errorsURL</param-name>
<param-value>errors.jsp</param-value>
</init-param>
</servlet>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>
<servlet-mapping>
<servlet-name>mainServlet</servlet-name>
<url-pattern>/do/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
Here is the faces-config.xml
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<application>
<locale-config>
<default-locale>fr</default-locale>
</locale-config>
</application>
<navigation-rule>
<from-view-id>/*</from-view-id>
<navigation-case>
<from-outcome>productList</from-outcome>
<to-view-id>/productList.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>productEdit</from-outcome>
<to-view-id>/productEdit.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>chart</from-outcome>
<to-view-id>/chart.jsp</to-view-id>
</navigation-case>
</navigation-rule>
Here is my link to create a new Product (access editProduct.jsp page)
<h:commandLink id="createProductLink" value="Ajouter un produit" action="/do/edit"/>
Prefix h is for
<%# taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
And finally my doGet and doEditProduct methods in my Servlet :
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException
{
if (initErrors.size() != 0)
{
req.setAttribute("erreurs", initErrors);
getServletContext().getRequestDispatcher(urlErrors).forward(req, res);
return ;
}
String reqType = req.getMethod().toLowerCase();
String action = req.getPathInfo();
if (action == null)
action = "/list";
if (reqType.equals("get") && action.equals("/list"))
{
doProductList(req, res);
return ;
}
if (reqType.equals("get") && action.equals("/delete"))
{
doDeleteProduct(req, res);
return ;
}
if (reqType.equals("get") && action.equals("/edit"))
{
doEditProduct(req, res);
return ;
}
if (reqType.equals("post") && action.equals("/validate"))
{
doValidateProduct(req, res);
return ;
}
doProductList(req, res);
}
private void doEditProduct(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException
{
int id = Integer.parseInt(req.getParameter("id"));
Product product = null;
if (id != -1)
product = service.getProduct(id);
else
{
product = new Product();
product.setId(new BigDecimal(-1));
}
req.setAttribute("editError", "");
req.setAttribute("id", product.getId());
req.setAttribute("name", product.getName());
req.setAttribute("description", product.getDescription());
req.setAttribute("price", product.getPrice());
getServletContext().getRequestDispatcher((String)params.get("editURL")).forward(req, res);
}
Thank you for your help
With JSF you must not used servlets. You use managed beans.
In order to fix the above code, you should provide an action method, and invoke that method from your command button. In order to get more into the spirit of JSF, I'd suggest starting with a tutorial and/or a sample JSF probject.
Related
I am developing application using Spring and I need to initialize Ticket object in session and then get it from another controller.
I have two controllers, so there are two xml contexts.
web.xml
<web-app id="WebApp_ID" version="2.4"
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">
<display-name>Spring Web MVC Application</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-context.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>rest</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/rest-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>rest</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>index</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/index-context.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>index</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
rest-context.xml
<beans ...>
<mvc:annotation-driven/>
<context:annotation-config/>
<context:component-scan base-package="menu.MenuController"/>
</beans>
index-context.xml
<beans ...>
<mvc:annotation-driven/>
<mvc:resources mapping="/**" location="/"/>
<context:annotation-config/>
<bean class="auth.IndexWebController" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"/>
</beans>
In the spring-context I have my Ticket bean:
<bean id="tickerProvider" class="TicketProviderImpl" scope="session">
<aop:scoped-proxy/>
together with the other beans.
This are what my controllers look like:
IndexWebController.java
#Controller
#SessionAttributes("user")
public class IndexWebController {
private static Logger logger = LoggerFactory.getLogger(IndexWebController.class);
#Autowired
private TicketProviderImpl ticketProvider;
#ModelAttribute("user")
public User populateUser() {
return new User();
}
#RequestMapping(value = "/", method = {RequestMethod.POST, RequestMethod.GET})
public ModelAndView printIndex(#ModelAttribute("user") User user,
#RequestParam(value = "iv-user", required = false) String login,
#RequestParam(value = "iv-groups", required = false) String groups) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("index.html");
<...>
ticketProvider.setLogin(login);
logger.info("Пользователь установлен в " + login);
<...>
MenuController.java
#Controller
public class MenuController {
#Autowired
private TicketProviderImpl ticketProvider;
#ResponseBody
#RequestMapping("/getMenuList")
public MenuListDTO getMenuList(
#RequestParam(value = "menuId", required = true, defaultValue = "-1") long menuId,
#RequestParam(value = "parentId", required = true, defaultValue = "0") long parentId) {
<...>
System.out.println(ticketProvider.getLogin());
<...>
}
}
The problem is that when I autowire ticketProvider bean in the MenuController I get a new instance of it, not those that has been initialized in the IndexWebController. Actually I get null, but waiting for the login.
Where is the mistake or some misunderstanding of using session scoped beans?
According to this you will need another listener to expose your session to the application.
Hence adding <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> should do the trick.
I'm trying to use API documentation using Swagger for my 'org.jboss.resteasy' Rest service. After configuration I can access 'http://localhost:8080/myrestswagger/rest/swagger.json' correctly.
it returns following:
{
"swagger": "2.0",
"info": {
"version": "3.0.0",
"title": ""
},
"host": "localhost:8080",
"basePath": "/myrestswagger/rest",
"schemes": [
"http"
]
}
But I cannot access or generate any data on 'http://localhost:8080/myrestswagger/rest/api-docs', please see my classes.
Rest Service Class :
#Path("/countryDetails")
#Api( value = "/countryDetails", description = "countryDetails" )
public class CountryController {
#Path("/countries")
#GET
#Produces(MediaType.APPLICATION_JSON)
#Consumes(MediaType.APPLICATION_JSON)
#ApiOperation(value = "GetCountries", httpMethod = "GET", notes = "Get Countries against Specific URL", response = Country.class)
public List<Country> getCountries() {
List<Country> listOfCountries = new ArrayList<Country>();
listOfCountries = createCountryList();
return listOfCountries;
}
#Path("/country/{id}")
#GET
#Produces(MediaType.APPLICATION_JSON)
#Consumes(MediaType.APPLICATION_JSON)
public Country getCountryById(#PathParam("id") int id) {
List<Country> listOfCountries = new ArrayList<Country>();
listOfCountries = createCountryList();
for (Country country : listOfCountries) {
if (country.getId() == id) return country;
}
return null;
}
private List<Country> createCountryList() {
Country indiaCountry = new Country(1, "India");
Country chinaCountry = new Country(4, "China");
Country nepalCountry = new Country(3, "Nepal");
Country bhutanCountry = new Country(2, "Bhutan");
List<Country> listOfCountries = new ArrayList<Country>();
listOfCountries.add(indiaCountry);
listOfCountries.add(chinaCountry);
listOfCountries.add(nepalCountry);
listOfCountries.add(bhutanCountry);
return listOfCountries;
}
}
This is the web.xml
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>io.undertow.servlet.handlers.DefaultServlet</servlet-class>
<init-param>
<param-name>allowed-extensions</param-name>
<param-value>js, css, png, jpg, gif, html, htm, txt, pdf, jpeg, xml, zip, jar</param-value>
</init-param>
<init-param>
<param-name>disallowed-extensions</param-name>
<param-value>class, war</param-value>
</init-param>
</servlet>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/rest</param-value>
</context-param>
<!--While using Spring integration set resteasy.scan to false or don't configure resteasy.scan parameter at all -->
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>
io.swagger.jaxrs.listing.ApiListingResource,
io.swagger.jaxrs.listing.SwaggerSerializers
</param-value>
</context-param>
<servlet>
<servlet-name>Jersey2Config</servlet-name>
<servlet-class>io.swagger.jaxrs.config.DefaultJaxrsConfig</servlet-class>
<init-param>
<param-name>api.version</param-name>
<param-value>3.0.0</param-value>
</init-param>
<init-param>
<param-name>swagger.api.basepath</param-name>
<param-value>http://localhost:8080/myrestswagger/rest</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
This is my pom.xml dependancy (maven.project)
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>1.5.9</version>
</dependency>
You don't need both swagger.json and api-docs. Both are common names to describe the Swagger definition from your server, which can be used--as a URL--by Swagger UI to render an interactive view of the API.
From looking at the output of your swagger.json, it looks like you're not scanning your resources. Please see about adding your CountryController to the scanning path for the API.
I'm working with Java, Jetty and Jersey 2.18 (latest for now) hosted on a Google App Engine.
Let say I have a service such that
#GET
#Produces(MediaType.APPLICATION_JSON)
#Path("/{userId}")
public Response getUser(#PathParam("userId") String userId)
{
...
}
When I do:
return Response.ok()
.entity(user)
.build();
I correctly receive an application/json content-type and body.
But when I do:
return Response
.status(404)
.entity(new ResponseModel(100, "user not found"))
.build();
same as for returning any 4XX or 5XX status, I receive a text/html content-type along with this HTML body:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>404 Not Found</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Not Found</h1>
</body>
</html>
and not the object I put in .entity()
Edit: Here is my web.xml
<?xml version="1.0" encoding="utf-8"?>
<web-app
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.mypackage.services;org.codehaus.jackson.jaxrs</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>
org.glassfish.jersey.server.gae.GaeFeature;
org.glassfish.jersey.server.mvc.jsp.JspMvcFeature;
org.glassfish.jersey.media.multipart.MultiPartFeature;
</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.Trace</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/rest/*</url-pattytern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>home.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>ObjectifyFilter</filter-name>
<filter-class>com.googlecode.objectify.ObjectifyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ObjectifyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Spring Security Filter -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml </param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>GlobalResponseFilter</filter-name>
<filter-class>com.mypackage.GlobalResponseFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GlobalResponseFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>everything</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<!-- ** -->
<!-- ** General session timeout in minutes -->
<!-- ** -->
<session-config>
<session-timeout>1440</session-timeout>
</session-config>
</web-app>
ResponseModel is just a basic serializable java class :
import java.io.Serializable;
public class ResponseModel implements Serializable
{
private static final long serialVersionUID = 1L;
private int code;
private Serializable data;
public ResponseModel()
{
}
public ResponseModel(int code, Serializable data)
{
System.err.println("Code " + code + " : " + data);
this.code = code;
this.data = data;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public Serializable getData()
{
return data;
}
public void setData(Serializable data)
{
this.data = data;
}
}
Can you try again with the following configuration:
<servlet>
<servlet-name>API</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
...
<init-param>
<param-name>jersey.config.server.response.setStatusOverSendError</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
This flag defines if Jersey - when sending a 4xx or 5xx response status - uses ServletResponse.sendError(flag is false) or ServletResponse.setStatus (flag is true).
Calling ServletResponse.sendError usually resets the response entity and headers and returns a (text/html) error page for the status code.
Since you want to return an own custom error entity, you need to set this flag to true.
Stripes ActionBeanContext is returning null on all pages where I try to call it.
Here's my shortened ActionBean code:
package stripesbook.action;
public class InitialInfoActionBean implements ActionBean {
private ActionBeanContext context;
public void setContext(ActionBeanContext Context) {
this.context = Context;
}
public ActionBeanContext getContext() {
return this.context;
}
#DefaultHandler
public Resolution nextPage() throws Exception {
return new ForwardResolution("/estimate-info.jsp").addParameter("id", id);
}
}
Here's my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://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">
<description>Perceptive Calculator</description>
<display-name>Perceptive Calculator</display-name>
<filter>
<display-name>Stripes Filter</display-name>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>
<param-name>ActionResolver.Packages</param-name>
<param-value>stripesbook.action</param-value>
</init-param>
<init-param>
<param-name>ActionBeanContext.Class</param-name>
<param-value>stripesbook.action.PerceptiveActionBeanContext</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>StripesFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>StripesFilter</filter-name>
<servlet-name>StripesDispatcher</servlet-name>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>StripesDispatcher</servlet-name>
<servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>StripesDispatcher</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
</web-app>
I'm not doing anything on my .jsp page except setting the bean with <jsp:useBean id="actionBean" class="stripesbook.action.InitialInfoActionBean" /> and checking for null context with ${ actionBean.context == null }
When posting back to the ActionBean, I'm able to perform various operations but in most cases, setContext never even gets hit.
Figured this out. Instead of
<jsp:useBean id="actionBean" class="stripesbook.action.InitialInfoActionBean" />`
I needed to be using
<stripes:useActionBean beanclass="stripesbook.action.InitialInfoActionBean" executeResolution="false" event="populate" var="actionBean" />
Apparently the regular useBean tag doesn't populate the context.
In my application we have implemented several filters. For example I have three filters
Locale Filter
License Filter
Login Filter
The order is working fine in normal case. But when I am giving continuous refresh it sometimes skips the License Filter (execution then is: Locale Filter -> Login Filter).
Is there any way to avoid this? The order should not change even when I continuously refresh. The order should be followed every time.
public class LicenseFilter implements Filter {
#Override
public void destroy() {
}
#Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
try {
LOGGER.info("In LicenseFilter");
licenseValidator.validate();
chain.doFilter(req, res);
}catch (Exception excep) {
LOGGER.error("License Error " + excep.getMessage());
req.setAttribute("error", excep.getMessage());
RequestDispatcher dispatcher = req
.getRequestDispatcher("license_list.action");
dispatcher.forward(req, res);
}
}
}
#Override
public void init(FilterConfig cfg) throws ServletException {
WebApplicationContext wctx = WebApplicationContextUtils.getWebApplicationContext(cfg
.getServletContext());
licenseValidator = (licenseValidator) wctx.getBean("licenseValidator");
ctx = cfg.getServletContext().getContextPath();
}
}
web.xml
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>web</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>META-INF/beans-*.xml</param-value>
</context-param>
<filter>
<filter-name>localeFilter </filter-name>
<filter-class>com.filter.LocaleFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>localeFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>licenseFilter</filter-name>
<filter-class>com.filter.licenseFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>licenseFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>loginFilter</filter-name>
<filter-class>com.filter.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>loginFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>