Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  1. ファイルシステムの適当な場所にHelloWorldディレクトリーを作成します。以降、この場所を<HelloWorld_home>と呼ぶことにします。
  2. <HelloWorld_home>ディレクトリーに HelloWorld.jsp という名前のファイルを作成し、以下の内容を貼り付けます。
Code Block
XML
borderStyleSolid
titleHelloWorld.jspborderStyleSolid
XML
<html>
    <head>
        <jsp:useBean id="datetime" class="java.util.Date"/>
        <title>Basic HelloWorld JSP</title>
    </head>
    <body bgcolor="#909DB8">
        <h1><font face="tahoma" color="white">Hello world from GERONIMO!</font></h1>
        <font face="tahoma" color="white">on ${datetime}</font>
    </body>
</html>
  1. <HelloWorld_home>配下に WEB-INF ディレクトリーを作成します。
  2. <HelloWorld_home>\WEB-INFディレクトリーに web.xml ファイルを作成し、以下の内容を貼り付けます。
Code Block
XML
borderStyleSolid
titleweb.xmlborderStyleSolid
XML
<?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>
  1. <HelloWorld_home>\WEB-INF ディレクトリーに geronimo-web.xml という名前のファイルを作成し、以下の内容を貼り付けます。
Code Block
XML
borderStyleSolid
titlegeronimo-web.xmlborderStyleSolid
XML
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
        <environment>
                <moduleId>
                        <groupId>sample.applications</groupId>
                        <artifactId>HelloWorldApp</artifactId>
                        <version>2.0</version>
                        <type>war</type>
                </moduleId>
        </environment>
        <context-root>/hello</context-root>

        <!-- Add this line to define a new Virtual Host in Geronimo - Jetty  -->
        <virtual-host>virtualhost1.com</virtual-host>
</web-app>

...