Recent Notes
Displaying keyword search results 1 - 10
Created by venky on March 05, 2012 13:36:41
Last update: March 05, 2012 13:36:41
Thanks Dr.Xi, I was having a tough time changing the deployment context path of my web-app using the
so-called context.xml file under /META-INF, it dint work (tomcat documentation at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html , seemed pretty sure it would :()
But I have one question, as changing server.xml is too instrusive for every web-app you build, is there any other way of pushing this configuration to one of the application specific files ?
thanks,
Venky
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 Dr. Xi on February 24, 2012 12:42:09
Last update: February 24, 2012 12:43:00
Use the copy command to restore a deleted file:
$ svn copy http://svn.example.com/path/to/svn/repo...
@revision must be a revision number before the file was deleted.
You can use the info command to view the info before restoring:
$ svn info http://svn.example.com/path/to/svn/repo...
Created by Dr. Xi on February 23, 2012 14:07:40
Last update: February 23, 2012 14:07:40
The command " svn info " prints information about the current directory:
$ svn info Path: . URL: http://svn.example.c... where: Revision: is the last syncup (update) revision of the current TARGET (artifact/file/directory, whatever you call). This number bumps up to that of the current project revision number after you do an update. Last Changed Rev: is the revision number of the latest change for the current TARGET . If TARGET is a directory, it is the revision number of the latest change within the directory, including all subdirectories. However , this number is not accurate after you do a check in without a following update. The revision number for the file or directory you checked in will have higher revision number than its parent/ancestor. To...
Created by woolf on February 17, 2012 13:08:52
Last update: February 17, 2012 13:08:52
The steps:
Click File , then Info
Click M anage Rules & Alerts
Click New Rule in Rules and Alerts
To block a sender, select "Move messages from someone to a folder"
Created by woolf on February 17, 2012 13:01:41
Last update: February 17, 2012 13:01:41
The steps:
Click File then Info
Click Automatic Replies .
Created by Fang on February 10, 2012 16:17:13
Last update: February 10, 2012 16:17:13
The annotation @org.hibernate.annotations.Type overrides the default hibernate mapping type used for a column. This can usually be omitted since Hibernate normaly infers the correct type to use.
But @Type is required in ambiguous scenarios such as a java.util.Date attribute, which can map to SQL DATE , TIME or TIMESTAMP . You use the @Type("timestamp") annotation to tell Hibernate that a timestamp converter should be used, which identifies an instance of org.hibernate.type.TimestampType .
@Type can also be used to identify custom type converters, which can be defined with @TypeDef at the class level:
@TypeDefs(
{
@TypeDef(
na...
or with an xml file:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mappi...
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...
Created by torstello on January 06, 2012 07:32:25
Last update: January 06, 2012 07:32:25
rdoc documentation:
usage(*args)
Display usage information ...
put something like this on top of your script:
# == Synopsis
# Blah blah blah.
#
...
method to display it
def output_usage
RDoc::usage('usa...
bind it to the '-h' option via optionparser
opts.on('-h', '--help') { output_help }
...
source
http://blog.toddwerth.com/entries/5
Created by nogeek on December 29, 2011 13:31:44
Last update: December 29, 2011 14:29:13
Tomcat allows you to create multiple server instances for the same installation. The installation directory is identified as CATALINA_HOME , the instance directory is identified as CATALINA_BASE . Here are the steps: Create a base directory for the new instance, for example: /home/nogeek/tomcat1 . Create the subdirectories:
mkdir -p /home/nogeek/tomcat/{bin,conf,logs,temp,w... Copy web.xml from the installation directory: cp $CATALINA_HOME/conf/web.xml /home/nogeek/tomcat... Copy logging.properties from the installation directory: cp $CATALINA_HOME/conf/logging.properties /home/no... Create server.xml under tomcat1/conf : <?xml version='1.0' encoding='utf-8'?> <Server ... Create script setenv.sh under tomcat1/bin : # Edit this file to set custom options # Tomcat... Copy startup.sh and shutdown.sh from the installation directory. Add the following two lines to the beginning of each: CATALINA_BASE=/home/nogeek/tomcat1 export CATAL... Create a soft link for catalina.sh in tomcat1/bin : $ ln -s ~/apache-tomcat-7.0.22/bin/catalina.sh cat...