Displaying keyword search results 1 - 10
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 Dr. Xi on February 23, 2012 14:07:40 Last update: June 25, 2012 13:40:44
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....
Created by Fang on January 31, 2012 15:40:34 Last update: January 31, 2012 15:41:28
This is a simple Hello World application with Spring 3 MVC. Like the default Apache HTTPd welcome page, it displays " It works! " when successfully deployed. The sole purpose is to show the minimum elements needed to setup Spring 3 MVC. I use Maven since it's so much easier than downloading the dependencies manually. Directory layout:
./src ./src/main ./src/main/webapp ./src/...pom.xml :
<?xml version="1.0" encoding="UTF-8"?> <project...WEB-INF/web.xml :
<?xml version="1.0" encoding="UTF-8"?> <web-app...WEB-INF/applicationContext.xml (empty, but needed):
<?xml version="1.0" encoding="UTF-8"?> <beans x...WEB-INF/spring-servlet.xml :
<?xml version="1.0" encoding="UTF-8"?> <beans x...WEB-INF/jsp/home.jsp :
<!DOCTYPE html> <html> <head> <title>H...Build with:
mvn clean packageThe resulting webapp is target/springmvc.war .
Created by freyo on April 01, 2011 14:29:25 Last update: June 29, 2011 13:58:27
Start the emulator ( create an AVD if none exists)
$ tools/emulator -avd Simple8Create new project
$ tools/android create project \ > --package co...where " --target 2 " identifies the target platform as displayed by " tools/android list targets ", which is stored in the properties file default.properties in the project root folder. cd HelloWorld and install debug package onto the running emulator:
$ ant install Buildfile: build.xml [set...Launch the Hello World application on the emulator. You'll see something like this: Edit res/values/string.xml , change the contents to:
<?xml version="1.0" encoding="utf-8"?> <resourc...Edit res/layout/main.xml , change the contents to:
<?xml version="1.0" encoding="utf-8"?> <LinearL...The contents of the text area now refer to a string defined in the resource file strings.xml , instead...
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 April 12, 2011 15:13:32 Last update: May 03, 2011 15:20:55
Create new project
$ tools/android create project \ > --package co...Edit res/values/string.xml , add strings for the main screen.
<?xml version="1.0" encoding="utf-8"?> <resourc...Add widgets to main layout ( res/layout/main.xml ).
<?xml version="1.0" encoding="utf-8"?> <LinearL...Edit src/com/android/apkinfo/GetAPKPermissions.java and change contents to:
package com.android.apkinfo; import android...Install the debug package to the emulator:
ant installThe screen should look like: Add display permissions activity. Start by creating a new layout res/layout/display_permissions.xml :
<?xml version="1.0" encoding="utf-8"?> <LinearL...Add the strings used by the new Activity ( res/values/strings.xml ):
<?xml version="1.0" encoding="utf-8"?> <resourc...Add the Display Permissions Activity ( src/com/android/apkinfo/DisplayPermissions.java ):
package com.android.apkinfo; import android...Change src/com/android/apkinfo/GetAPKPermissions.java to invoke the Display Permissions Activity:
package com.android.apkinfo; import android...Declare Display Permissions Activity in AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?> <manifes......
Created by freyo on April 18, 2011 15:08:21 Last update: April 18, 2011 15:12:20
Generate android project
$ ~/android-sdk-linux_86/tools/android create proj...Create XML file res/xml/books.xml :
<?xml version="1.0"?> <catalog> <book id=...Edit layout ( res/layout/main.xml ):
<?xml version="1.0" encoding="utf-8"?> <Lin...Edit code ( src/com/android/xmlres/XMLResource.java ):
package com.android.xmlres; import java.io....Change activity label from app_name to booklist ( AndroidManifest.xml ):
<?xml version="1.0" encoding="utf-8"?> <manifes...Add value for string resource ( res/values/string.xml ):
<?xml version="1.0" encoding="utf-8"?> <resourc...Deploy and test:
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> ...
Created by Fang on April 02, 2010 21:45:47 Last update: July 17, 2010 02:55:06
This is built upon the simple test application for JSTL , which contained a single servlet and a single JSP page. If I want to use it to test all available JSTL tags, the servlet and JSP page would be too complicated. Instead, I want to group the JSTL tags into separate JSP pages and display each group based on the requested URL. For example, if the URL ends with /CoreBasic , I'll display a page that contains the basic core tags; if the URL ends with /I18N , I'll display a page that contains the internationalization tags (e.g., <fmt:message> ). Furthermore, I want to delegate the handling of each group of tags to separate Java classes. This is the application I'll use for the...
Created by Fang on April 01, 2010 22:24:58 Last update: April 02, 2010 02:49:38
In this note I'll show you how to create and package a JSP custom tag. The purpose of this tag is to display a random splash image for a home page, among a set of images. We should be able to add or delete candidate splash images from the WAR archive without the need to change the JSP. This is the intended use of the tag:
<%@ taglib uri="http://custom.tag.com/demo" prefix...In the above example you provide a set of images named splash*.png (e.g., splash1.png, spalsh2.png, ...), and the tag will pick a random one to display when the JSP is rendered. Let's get started. I'll use Maven for this purpose. Create the standard Maven directory structure
./pom.xml ./src ./src/main ./src/main/jav...pom.xml
package tagdemo; import java.util.ArrayList......