Displaying keyword search results 1 - 10
Created by Fang on March 30, 2012 12:15:49 Last update: March 30, 2012 12:15:49
1. mvc:default-servlet-handler Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static resources. HandlerMapping: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Handler: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Attribute Description default-servlet-name The name of the default Servlet to forward to for static resource requests. The handler will try to auto-detect the container's default Servlet at startup time using a list of known names. If the default Servlet cannot be detected because of using an unknown container or because it has been manually configured, the servlet name must be set explicitly. 2. mvc:view-controller Defines a simple Controller that selects a view to render the response. HandlerMapping: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Handler: org.springframework.web.servlet.mvc.ParameterizableViewController Attribute Description...
Created by Fang on November 03, 2011 21:11:55 Last update: November 03, 2011 21:11:55
Facelet tag library descriptors can be specified in one of two ways: In web.xml , as <context-param> :
<context-param> <param-name>javax.faces...where javax.faces.FACELETS_LIBRARIES is interpreted as a semicolon ( ; ) separated list of paths, starting with "/" (without quotes). Each entry in the list is a path relative to the web application root, and is interpreted as a facelet XML tag library descriptor. The parameter facelets.LIBRARIES is an alias to javax.faces.FACELETS_LIBRARIES for backwards compatibility reasons. Via auto-discovery, by placing the XML tag library descriptor within a jar on the web application classpath (for example, under the folder WEB-INF/lib ). The file should have a name suffix .taglib.xml , and be placed in the META-INF folder of the JAR file.
Created by freyo on May 13, 2011 15:45:29 Last update: September 20, 2011 08:08:12
This is an Android app that dumps any binarized xml file as plain text - to the sdcard on the device or emulator. build.xml :
<?xml version="1.0" encoding="UTF-8"?> <project...AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <man...res/layout/main.xml
<?xml version="1.0" encoding="utf-8"?> <Lin...res/values/strings.xml :
<?xml version="1.0" encoding="utf-8"?> <res...src/com/android/xmltool/DumpXml.java
package com.android.xmltool; import java.ut...Screenshot Pre-built APK can be downloaded from: http://code.google.com/p/android-binxml-dump/
Created by alfa on July 01, 2011 13:16:12 Last update: July 01, 2011 13:16:12
This is a simple doclet that prints all public methods and their parameter names and types. Code
import com.sun.javadoc.*; public class List...Compile
javac -cp $JAVA_HOME/lib/tools.jar:. ListMethodsDo...Use
javadoc -doclet ListMethodsDoclet -sourcepath /pat...
Created by freyo on May 17, 2011 11:13:17 Last update: May 17, 2011 11:13:17
This is an odd-ball content provider in that it doesn't provide database records, but provides a resource as a stream. It can be used to provide media files or XML resources. Start the project with:
tools/android create project --package com.android...Create assets directory and add an XML file ( assets/demo.xml ):
<? xml version="1.0" encoding="UTF-8"?> <people...Edit the layout ( res/layout/main.xml ):
<?xml version="1.0" encoding="utf-8"?> <LinearL...Edit src/com/android/cptest/Dummy.java :
package com.android.cptest; import java.io....Add content provider ( src/com/android/cptest/XmlResource.java ):
package com.android.cptest; import java.io....Update AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?> <manifes...Add this section to the end of build.xml :
<target name="-package-resources"> <ech...Build and install:
ant installScreenshot: Remove the Dummy activity ( AndroidManifest.xml ):
<?xml version="1.0" encoding="utf-8"?> <manifes...Create a new project for...
Created by freyo on May 17, 2011 08:46:50 Last update: May 17, 2011 08:47:35
When I used AssetManager to open an XML file in a ContentProvider :
getContext().getAssets().openFd("demo.xml");it failed with this exception:
java.io.FileNotFoundException: This file can not b...It turned out that openFd only works for asset files that are not compressed. It works on media files such as .mp3 , .jpg , .wmv etc., which are not compressed during packaging. XML files are compressed by dedault, causing openFd to fail. An Android ticket was opened on this issue. Till that is fixed, the workaround is to add an exclusion in build.xml :
<?xml version="1.0" encoding="UTF-8"?> <pro...
Created by freyo on May 11, 2011 12:30:45 Last update: May 11, 2011 12:32:06
Android application builds use Xpath to query AndroidManifest.xml attributes. This is a simple build.xml to demo how it is set up:
<?xml version="1.0" encoding="UTF-8"?> <project...
Created by Dr. Xi on January 14, 2010 00:28:27 Last update: March 30, 2011 15:37:44
A task that a Java developer does so frequently is to find out where a certain class can be found - to resolve compilation errors, classpath issues, or version conflicts of the same class introduced by multiple class loaders. A long while back I wrote a simple Perl script to perform the task. Later I was informed that there are Swing based Jar Browser and Jars Browser . Then, there are a couple of shell one-liners:
# one liner 1 find -name "*.jar" -print0 | xarg...But all of them share the same problem: if a class is in a jar nested in another jar, it cannot be found. Such is the case for a class inside a jar under the WEB-INF/lib directory of a...
Created by nogeek on December 31, 2010 13:02:23 Last update: December 31, 2010 13:03:27
The JBoss Microcontainer provides three StructureDeployer implementations out-of-the-box, with relativeOrder values defined for each: DeclaredStructure: relativeOrder 0 JARStructure: relativeOrder 10000 FileStructure: relativeOrder Integer.MAX_VALUE At deployment time, the StructureDeployer with lower relativeOrder will be consulted first to determine the structure of a deployment. This means that DeclaredStructure is always called first followed by JARStructure and finally FileStructure . DeclaredStructure allows you to specify the structure of a deployment, including any nested deployments, using an XML file named jboss-structure.xml placed in the deployment's META-INF directory. For example, the following is jboss-structure.xml for jbossweb.sar , the JBoss Tomcat service:
<?xml version="1.0" encoding="UTF-8"?> <structu...
Created by voodoo on July 11, 2009 15:14:55 Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. It's really easy to see HTTP headers with curl:
C:\>curl --head http://www.google.com HTTP/1.0 ...or, headers and page together (dump headers to stdout):
$ curl --dump-header - http://www.google.com HTTP/...Download openssl from openssl.org:
C:\>curl --help Usage: curl [options...] <url> ...