web.xml

getSession() always creates a new session

我与影子孤独终老i 提交于 2020-01-23 02:17:12
问题 We have SecurityFilter class in our application by implementing Filter and our doFilter method looks like this. public void doFilter(ServletRequest sres, ServletResponse sreq, FilterChain chain) throws IOException, ServletException { LOGGER.debug(Logger.buildLogMessage("Starting SecurityFilter.doFilter")); HttpServletRequest request = (HttpServletRequest) sres; HttpServletResponse response = (HttpServletResponse) sreq; HttpSession session = request.getSession(); We have the following entry in

schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring- beans-4.1.5.xsd

江枫思渺然 提交于 2020-01-22 13:25:26
问题 I get an error in spring-dispatcher.xml in eclipse as given below. schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring- beans-4.1.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. I have latest spring libraries... spring-beans-4.1.5.RELEASE.jar spring-beans-4.1.5.RELEASE-javadoc.jar spring-beans-4.1.5.RELEASE-sources.jar spring-context-4.1.5.RELEASE.jar

Log4j2.0 is not working with Jboss 5

与世无争的帅哥 提交于 2020-01-17 08:32:12
问题 i have issue with struts2 and log4j2.0 My program working properly but log4j2.0 is not respond pls help me to solve dis.. im using following jar: 1.log4j-core-2.0-beta8 2.log4j-api-2.0-beta8 3.log4j-web-2.0-beta2 my log4j2.xml <?xml version="1.0" encoding="UTF-8"?> <configuration strict="true" schema="Log4J-V2.0.xsd" status="OFF" monitorInterval="300"> <appenders> <Console name="CONSOLE" target="SYSTEM_OUT"> <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n" /> </Console> <File name=

Log4j2.0 is not working with Jboss 5

我的梦境 提交于 2020-01-17 08:30:14
问题 i have issue with struts2 and log4j2.0 My program working properly but log4j2.0 is not respond pls help me to solve dis.. im using following jar: 1.log4j-core-2.0-beta8 2.log4j-api-2.0-beta8 3.log4j-web-2.0-beta2 my log4j2.xml <?xml version="1.0" encoding="UTF-8"?> <configuration strict="true" schema="Log4J-V2.0.xsd" status="OFF" monitorInterval="300"> <appenders> <Console name="CONSOLE" target="SYSTEM_OUT"> <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n" /> </Console> <File name=

Unable to find Spring Configuration resource in applicationContext.xml

有些话、适合烂在心里 提交于 2020-01-16 19:43:21
问题 I have all my Spring configuration files locate under org.huahsin.resources package. With the web.xml configure in this way: <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:/org/huahsin/resources/applicationContext.xml, classpath*:/org/huahsin/resources/applicationContext-security.xml </param-value> </context-param> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter

How to put two param-values in one context-param in Spring?

江枫思渺然 提交于 2020-01-15 23:01:49
问题 Problem: I have two contextConfigLocation parameters, one with @Configuration classes for spring-social-facebook and one with xml-file for app: <context-param> <param-name>contextConfigLocation</param-name> <param-value>com.communicator.core.social.facebook.config</param-value> </context-param> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/root-context.xml</param-value> </context-param> Both of them use one param-name , and I don't know how to fix it.

Can context-param be referenced inside web.xml?

早过忘川 提交于 2020-01-14 09:34:04
问题 Can I reference context parameter in a DD itself? For instance: <context-param> <param-name>firstParam</param-name> <param-value>/first</param-value> </context-param> And then I would like to be able to do something like this: <servlet-mapping> <servlet-name>firstServlet</servlet-name> <url-pattern>${firstParam}</url-pattern> </servlet_mapping> 回答1: No , it is not possible. There is no such feature. 来源: https://stackoverflow.com/questions/13575015/can-context-param-be-referenced-inside-web

Can context-param be referenced inside web.xml?

人走茶凉 提交于 2020-01-14 09:33:09
问题 Can I reference context parameter in a DD itself? For instance: <context-param> <param-name>firstParam</param-name> <param-value>/first</param-value> </context-param> And then I would like to be able to do something like this: <servlet-mapping> <servlet-name>firstServlet</servlet-name> <url-pattern>${firstParam}</url-pattern> </servlet_mapping> 回答1: No , it is not possible. There is no such feature. 来源: https://stackoverflow.com/questions/13575015/can-context-param-be-referenced-inside-web

Multiple filters with same url mapping

Deadly 提交于 2020-01-12 06:54:09
问题 Is it possible to use two filters that have the same url-mapping? <filter> <filter-name>TeeFilter</filter-name> <filter-class>filter1r</filter-class> </filter> <filter-mapping> <filter-name>TeeFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter> <display-name>CredentialsFilter</display-name> <filter-name>CredentialsFilter</filter-name> <filter-class>filter2</filter-class> </filter> <filter-mapping> <filter-name>CredentialsFilter</filter-name> <url-pattern>/*</url

What's the purpose of async-supported in web.xml?

五迷三道 提交于 2020-01-11 18:21:43
问题 <servlet> <description>xxx</description> <servlet-name>xxx</servlet-name> <servlet-class>com.xxx.yyy</servlet-class> <async-supported>true</async-supported> </servlet> What's the purpose of async-supported in the servlet's web.xml configuration file? What case I can use it in? 回答1: Ironically, I was looking for the syntax of how to write this property in tomcat's web.xml and this is the first search item I opened from google - it's written correctly too (it works), so thanks. To answer your