Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Note: To save time, you can download HelloWorld.war file from this page.

Code Block
html
html
borderStylesolid
titleHelloWorld.jsphtml
<html>
   <head>
      <jsp:useBean id="datetime" class="java.util.Date"/>
         <title>
             Basic HelloWorld JSP
         </title>
   </head>
   <body bgcolor="#1276C2">
      <h1>
         <font face="tahoma" color="white">
               Hello world from GERONIMO!
         </font>
      </h1>
      <font face="tahoma" color="white">on ${datetime}</font>
   </body>
</html>

...

  1. Create a directory named WEB-INF in the <app_home> directory.
  2. In the <app_home>/WEB-INF directory, create a plain text file named geronimo-web.xml, and then copy the following code to this file.
    Code Block
    xml
    xml
    borderStylesolid
    titleGeronimo deployment plan geronimo-web.xmlxml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
        <environment>
            <moduleId>
                <groupId>org.apache.geronimo.samples</groupId>
                <artifactId>HelloWorldApp</artifactId>
                <version>1.0</version>
                <type>war</type>
            </moduleId>             
        </environment>
        <context-root>/hello</context-root>
    </web-app>
    

  3. In the <app_home>/WEB-INF directory, create a plain text file named web.xml, and then copy the following code to this file.
    Code Block
    xml
    xml
    borderStylesolid
    titleweb.xmlxml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    		       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
        
        <welcome-file-list>
            <welcome-file>HelloWorld.jsp</welcome-file>
        </welcome-file-list>
    
    </web-app>
    

...