Displaying keyword search results 71 - 80
Created by Dr. Xi on February 11, 2010 00:04:02 Last update: February 11, 2010 00:04:02
Servlet container initializes this servlet when it starts up. The content of this element must be a positive integer indicating the order in which the servlet should be loaded. Lower integers are loaded before higher integers. If no value is specified, or if the value specified is not a positive integer, the servlet can be loaded in any order in the startup sequence. In this example, Struts is loaded before cms:
<!-- Struts action servlet setup --> ...
Created by Dr. Xi on February 10, 2010 23:48:23 Last update: February 10, 2010 23:49:13
Servlet mapping examples in web.xml. Struts:
<!-- Struts action servlet setup --> ...Spring:
<servlet> <servlet-name>springapp</...JSF myfaces:
<servlet> <servlet-name>Faces Servl...
Created by Dr. Xi on February 10, 2010 23:39:37 Last update: February 10, 2010 23:39:37
Example web.xml that includes most frequently used elements. This sample is for Servlet Specification 2.4.
<?xml version="1.0" encoding="UTF-8"?> <web-ap...
Created by Fang on August 22, 2009 21:48:12 Last update: January 10, 2010 00:29:08
The POM (Project Object Model, pom.xml ) is at the heart of all Maven builds. It tells Maven how to build your project, just like build.xml for Ant. This is a POM for a simple Hello World project:
<project xmlns="http://maven.apache.org/POM/4.0.0"...Not much can be inferred from the POM file alone, because lots of information is implied . For example, packaging defaults to jar , which means that if nothing is specified, Maven compiles all java files under src/main/java and creates a jar . All Maven POMs inherit from a base Super POM. To see the effective POM for your project, type mvn help:effective-pom :
C:\maven\hello-world>mvn help:effective-pomBelow is the Super POM for Maven 2.0.x.
<project> <modelVersion>4.0.0</modelVersion> ...
Created by Fang on September 07, 2009 16:39:37 Last update: September 07, 2009 18:43:04
It's easiest to use the archetype plugin to start a new Maven project. I'll use struts 1 as example since it's not in the built-in archetypes for archetype:generate . Generate a simple webapp with archetype:generate :
C:\work\maven>mvn archetype:generate -DarchetypeAr...It generates a directory structure like this:
struts1app struts1app/pom.xml struts1app/src...with a simple POM:
<project xmlns="http://maven.apache.org/POM/4.0.0"...Create settings.xml in $HOME/.m2 , add Java.net repository for Java EE dependencies:
<?xml version="1.0" encoding="UTF-8"?> <setting...Add Java EE and Struts dependencies in pom.xml . Note that the Java EE dependency has scope provided , meaning that the web app container provides the jars, therefore we don't need to bundle them with our war fie.
<project xmlns="http://maven.apache.org/POM/4.0.0"...Create a directory named java under main , create the Struts form and...
Created by Dr. Xi on April 30, 2009 23:26:13 Last update: May 01, 2009 17:08:49
ApplicationResources.properties contains these keys:
test.key.1 = Test Key One test.key.2 = Test Key...Struts (struts-el):
<%@ page contentType="text/html;charset=UTF-8" lan...JSTL
<%@ page contentType="text/html;charset=UTF-8" lan...However, the values for one and two must be passed in from pageScope , requestScope , sessionScope , etc. Values defined by struts bean:define are not interpreted. Important: JSTL tags work with servlet spec 2.4 only. So your web.xml must start with this:
<?xml version = '1.0' encoding = 'windows-1252'?> ...Not this:
<?xml version = '1.0' encoding = 'windows-1252'?> ...However, the latter does work with struts-el tags.
Created by Dr. Xi on November 06, 2008 20:11:19 Last update: March 13, 2009 21:37:36
To run a web app in Oracle Application Server with precompiled JSPs (therefore, not recompiling a JSP when requested), add the following servlet section to web.xml:
<?xml version="1.0" encoding="iso-8859-1"?> <we...Or, uncomment the relevant section in $ORACLE_HOME/j2ee/OC4J_INST/config/global-web-application.xml :
Created by Dr. Xi on October 23, 2008 03:54:04 Last update: October 23, 2008 03:57:44
Add validator plugin in struts-config.xml
<struts-config> . . . ...Set validate="true" on action form
<struts-config> <!-- ========== Form Bean De...Add validation rules in validation.xml
<?xml version='1.0' encoding='windows-1252'?> <...If you override validate , make sure super.validate is called.
package com.example; import javax.servlet.h...Read the documentation: http://struts.apache.org/1.2.4/userGuide/dev_validator.html
Created by Dr. Xi on October 15, 2008 19:49:31 Last update: October 15, 2008 19:49:31
<?xml version="1.0"?> <project name="OC4JDe...Deployment properties:
# Deployment properties targetenv=Development ...
Created by Dr. Xi on May 14, 2008 22:55:22 Last update: May 14, 2008 23:07:49
This procedure works for Oracle application server 10.1.3.1, SOA suite. But should be applicable for standalone OC4J or JDeveloper installations with minor modifications. $ORACLE_HOME is the home directory for Oracle app server. $JDEV_HOME is the home directory for JDeveloper. 1. Change directory to $ORACLE_HOME/j2ee , mkdir lib 2. Copy xmlparserv2.jar from $JDEV_HOME to $ORACLE_HOME/j2ee/lib . 3. Copy ocj.jar and jdev_remote.jar from $JDEV_HOME/jdev/lib to $ORACLE_HOME/j2ee/home/lib . 4. Edit global-web-application.xml under your OC4J instance's config directory. Change the development attribute to true .
<orion-web-app xmlns:xsi="http://www.w3.org/...5. Add the following to the servlet section of global-web-application.xml :
<servlet> <servlet-name>jsp</servlet-na...6. Edit $ORACLE_HOME/opmn/conf/opmn.xml , add -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 to start-parameters/java-options :
<process-type id="MYOC4J" module-id="OC4J" status=...7. In Eclipse, open to port 4000 for remote debugging.