Displaying keyword search results 1 - 9
Created by Fang on November 10, 2011 09:26:12 Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines!
<?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by Fang on September 07, 2009 20:44:15 Last update: November 03, 2011 14:43:19
Step 1: Repackage a web app as EAR A Java EE application is a multimodule Maven project. At the very least you'll need to package a WAR and an EAR. To get started, I'll simply re-package the simple webapp as an EAR. Create a directory named javaee-app Copy the webapp from here to javaee-app . Rename struts1app to webapp . Create pom.xml under javaee-app :
<project> <modelVersion>4.0.0</modelVersion>...Create a directory named ear under javaee-app . Create pom.xml under ear :
<project> <modelVersion>4.0.0</modelVersion>...Modify pom.xml in the webapp directory so that it looks like this:
<project> <modelVersion>4.0.0</modelVersion> ...Build with " mvn package " in the javaee-app directory. You can see that ear-1.0.ear is successfully generated in javaee-app/ear/target . Maven successfully resolves dependencies between the sub-projects....
Created by freyo on September 07, 2011 16:46:14 Last update: September 07, 2011 19:23:00
The Android unit test framework is based on JUnit 3 , not JUnit 4. Test cases have to extend junit.framework.TestCase or a subclass (such as android.test.InstrumentationTestCase ). Tests are identified by public methods whose name starts with test , not methods annotated with @Test (as in JUnit 4). An Android test suite is packaged as an APK, just like the application being tested. To create a test package, first you need to identify the application package it is testing. Google suggests to put the test package source in a directory named tests/ alongside the src/ directory of the main application. At runtime, Android instrumentation loads both the test package and the application under test into the same process. Therefore, the tests can invoke methods on...
Created by Dr. Xi on October 26, 2010 04:47:37 Last update: January 11, 2011 20:00:36
<!doctype html> <html> <head> <style typ...
Created by nogeek on December 31, 2010 11:56:25 Last update: December 31, 2010 11:56:25
These are the steps to create a JBoss 5.1.0 configuration with Tomcat from the built-in minimal configuration. Change directory to $JBOSS_HOME/server . Make a copy of the minimal configuration.
cp -R minimal tomcatonlyCopy bindingservice.beans from the default configuration.
cp -R default/conf/bindingservice.beans tomcatonly...Copy login-config.xml from the default configuration.
cp default/conf/login-config.xml tomcatonly/conf/Edit tomcatonly/conf/jboss-service.xml : Add jars from the common/lib directory:
<!-- Load all jars from the JBOSS_DIST/serv...Add the JAAS security manager section (copy from the default profile, and yes, JBoss tomcat can't live without the JBoss JAAS manager).
<!-- JAAS security manager and realm mappin...Copy the Tomcat (JBoss web) deployer from the default configuration.
cp -R default/deployers/jbossweb.deployer tomcaton...Copy metadata-deployer-jboss-beans.xml and security-deployer-jboss-beans.xml from the default profile.
Created by James on June 30, 2010 19:04:45 Last update: July 03, 2010 21:24:33
/** * * AJAX IFRAME METHOD (AIM) * http...The above code only supports HTML responses. In order to support JSON responses, the above...
Created by Fang on March 22, 2010 02:55:04 Last update: March 22, 2010 03:48:55
If you followed the steps in Start a Java EE application with Maven , you'll arrive at an EAR file that's ready to be deployed. However, if you look carefully, you'll find that the ejb-1.0.jar file is included in the EAR file twice : once as the ejb module of the EAR, another time under the WEB-INF/lib folder of webapp-1.0.war . The second is brought about by specifying the ejb project as a dependency in the webapp POM. Actually, the webapp project is dependent on the ejb project as an EJB client. So we should have been more accurate by specifying the type of dependency as ejb-client , not ejb : Edit webapp/pom.xml , change the ejb dependency to ejb-client :
<project> <modelVersion>4.0.0</modelVersion...Update ejb/pom.xml...
Created by Dr. Xi on October 06, 2008 22:48:08 Last update: October 06, 2008 22:50:11
A first attempt would be to create an input file like this:
userid password shell_command1 shell_...and feed the lines to the telnet client:
cat telnet_input.txt | telnet remote_host #...However, you'll learn soon enough that it doesn't work. You get output like this:
Trying 192.168.159.128... Connected to bash...What's happening? The telnet client depleted all input before the remote host had a chance to respond. Since there's no more input, the telnet client initiated to close the connection. Adding a delay between the commands makes it work:
(echo userid sleep 10 echo password ...How much time to sleep between commands is just guesswork. You can use Expect to provide more control over the automated session:
#!/usr/bin/expect # timeout script aft......
Created by Dr. Xi on August 15, 2007 18:08:34 Last update: November 08, 2007 22:00:01
I had this problem when deploying a J2EE application into Oracle app server. It worked fine with an OC4J container configured in the default group. But it failed to start with an OC4J container I created. Here's a sample stack trace of the initialization exception:
07/08/14 13:32:46.34 10.1.3.3.0 Started 07/08/1...The problem was, the struts ActionServlet loads commons logging LogFactory, the log factory somehow knows that it needs log4j, but it can't load log4j since it's loaded by a different class loader. The solution for Oracle is to omit commons logging from the list of inherited libraries. Add this to META-INF/orion-application.xml solves the problem:
<imported-shared-libraries> <remove-inhe...Actually, this is a quite common problem with commons-logging. If you search the web, you'll find that people have...