THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Create a HelloWorld directory somewhere in the file system, from now on we will reference this location as <HelloWorld_home>.
- Create a HelloWorld.jsp file in the <HelloWorld_home> directory and paste the following content.
Code Block XML XML borderStyle Solid title HelloWorld.jspXML <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>
- Create a WEB-INF directory under <HelloWorld_home>.
- Create a
web.xml
file in the <HelloWorld_home>\WEB-INF directory and paste the following content.Code Block XML XML borderStyle Solid title web.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>
- Create a
geronimo-web.xml
file in the <HelloWorld_home>\WEB-INF directory and paste the following content.Code Block XML XML borderStyle Solid title geronimo-web.xmlXML <?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.1</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>
...