Displaying keyword search results 1 - 10
Created by SaranReddy on May 14, 2014 07:59:40 Last update: May 14, 2014 07:59:40
As you have mentioned above, i have changed and its working fine. But my doubt here is, Assume day one you have deployed release abc-RELEASE-0.0.1.war . assume on day 2 you want to deploy second release abc-RELEASE-0.0.2.war. if we hard code the war file name in <Context>, the each and every time when the war file name changes like abc-RELEASE-0.0.3,0.0.4 as per the release then, each and every time we need to change the value at <Context> tag in server.xml file. I want it to be configured only once irrespective of the release As we do in JBOSS. could you please help me in this..
Created by Fang on January 06, 2014 12:22:17 Last update: January 06, 2014 12:22:17
Add <mvc:default-servlet-handler/> to the spring servlet config ( spring-servlet.xml ?) so that static files can be handled by the default servlet handler. This is a full configuration file for example:
<?xml version="1.0" encoding="UTF-8"?> <beans x...
Created by Fang on August 28, 2013 20:37:17 Last update: August 28, 2013 20:37:17
The default extension for JSF facelet files is .xhtml, which looks so out-of-date these days. I wanted to change the extension from .xhtml to .html, to make it look more modern, even though I still use JSF xhtml in reality. This didn't work ( web.xml ):
<servlet-mapping> <servlet-name>Faces Ser...Using the servlet-mapping config without the context-param works, given that the actual file extensions are still .xhtml . But the caveat is, if you request the .xhtml file directly, it will be sent to the browser unprocessed. This worked:
<servlet-mapping> <servlet-name>Faces Ser...I'm using myfaces 2.1.11.
Created by Dr. Xi on March 21, 2013 19:47:46 Last update: March 22, 2013 12:30:27
It's normal practice to import types from an external xsd file in WSDL like this:
<wsdl:types> <xsd:schema xmlns:xsd="htt...When you use <dynamic-wsdl> and have Commons XMLSchema on the class path, Spring-WS inlines the xsd in the wsdl. But that doesn't happen when you use <static-wsdl> . You can define a SimpleXsdSchema bean to expose the xsd:
Created by Fang on January 04, 2013 09:02:44 Last update: January 04, 2013 09:02:44
This snippet sets system properties from Maven surefire test plugin. This is useful when you want to set logging (for example, log4j) properties based on Maven project properties. Example that sets system property testlog.dir :
<plugins> <plugin> <groupId>org.apach...Example log4j.xml that uses system property testlog.dir :
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYP...
Created by Dr. Xi on April 19, 2012 10:10:08 Last update: April 19, 2012 10:11:06
The default servlet for Tomcat is declared in $CATALINA_HOME/conf/web.xml :
<servlet> <servlet-name>default</servle...Therefore, static content is rendered by the default configuration unless you override it with your own definitions. If you want to allow directory listing, just change the listing parameter to true :
<init-param> <param-name>listings</para...Change the welcome-file-list to display a default page in lieu of a directory listing:
<welcome-file-list> <welcome-file>home.xhtml</...Welcome pages are defined at the Web application level.
Created by Fang on February 23, 2012 14:25:57 Last update: March 01, 2012 13:53:59
Some example snippets for Spring message configuration and usage. To configure a message source in Spring context (basename=messages):
<bean id="messageSource" class="org.springf...Locale change interceptor can also be setup with:
<?xml version="1.0" encoding="UTF-8"?> <beans x...The messages file should be named messages.properties (or messages_en.properties , etc.) and located on CLASSPATH , for example: WEB-INF/classes . To use a message resource in JSP:
<%@ taglib prefix="spring" uri="http://www.springf...
Created by James on February 02, 2012 16:00:15 Last update: February 02, 2012 16:00:15
Video for Everybody seems to be a generic way to embed video in a web page, even without flash. This code snippet comes from that site.
<!-- first try HTML5 playback: if serving as XML, ...
Created by Dr. Xi on February 01, 2012 12:55:28 Last update: February 01, 2012 12:55:28
You can define environment variables in the Tomcat context.xml file like this:
<?xml version="1.0" encoding="UTF-8"?> <Context...which is equivalent to the following in web.xml :
<env-entry> <env-entry-name>varName</env-entr...In Java code, the variable can be looked up like this:
// import javax.naming.Context; // import javax...
Created by Fang on January 31, 2012 13:57:56 Last update: January 31, 2012 15:04:29
These are the minimum steps to configure Spring MVC in web.xml : Bootstrap Spring MVC by registering ContextLoaderListener :
<listener> <listener-class> org.springfra...Register the DispatcherServlet :
<servlet> <servlet-name>spring</servlet-name> ...Add servlet-mapping :
<servlet-mapping> <servlet-name>spring</servle...Configure DispatcherServlet with WEB-INF/spring-servlet.xml , which configures WebApplicationContext specific to this servlet.
<?xml version="1.0" encoding="UTF-8"?> <beans x...Optionally, use context-param in web.xml to configure the global WebApplicationContext :
<!-- XmlWebApplicationContext is the default, so t...If you omit this section, you have to create file WEB-INF/applicationContext.xml , even if it's empty. This is the full web.xml :
<?xml version="1.0" encoding="UTF-8"?> <web-app...