On Mar 4, 2009, at 12:02 PM, PeterE59 wrote:
Hi,
i have a basic problem. I am a newbie to geronimo.
Geronimo is running:
Version 2.1.3
Build 2008.09.10-10:18:40.636-0400
Java Version 1.5.0_17
Java Vendor Sun Microsystems Inc.
Architecture i386
Name Linux
Version 2.6.9-023stab048.6-smp
I try to deploy a very simple web application to check my
installation:
HelloWorld\HelloWorld.jsp
\WEB-INF\web.xml
\geronimo-web-xml
You want geronimo-web.xml to be in WEB-INF\
-----------------------------------------------------------
HelloWorld.jsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>HelloWorld!</title>
</head>
<body bgcolor="#707DB8">
<h1>
Hello world from GERONIMO V1.1!
</h1>
${datetime}
</html>
---------------------------------------------------------
web.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>
Note that the above welcome-file in web.xml does not match your
HelloWorld/HelloWorld.jsp location. Updating to 'HelloWorld/
HelloWorld.jsp' is probably what you want. In this case, the
'HelloWorld' url should work. Without this update, you'd need
'HelloWorld/HelloWorld' to reach your jsp.
If you fix geronimo-web.xml, your url would become 'hello' since
geronimo-web.xml is setting the context-root
------------------------------------------------------------
geronimo-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
<environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1
">
<moduleId>
<groupId>geronimo</groupId>
<artifactId>HelloWorld</artifactId>
<version>1.1</version>
<type>war</type>
</moduleId>
</environment>
<context-root>/hello</context-root>
</web-app>
See above about insuring geronimo-web.xml is in WEB-INF/ and note the
change of behavior caused by context-root.
I build a jar file with:
jar cvf HelloWorld.jar HelloWorld
Hot deploy:
cp HelloWorld.jar $GERONIMO_HOME/deploy
Messages in geronimo.out:
17:34:58,001 WARN [TomcatModuleBuilder] Web application . does not
contain
a WEB-INF/geronimo-web.xml deployment plan. This may or may not be a
problem, depending on whether you have things like resource
references that
need to be resolved. You can also give the deployer a separate
deployment
plan file on the command line.
This message tells us that geronimo did not locate your geronimo-
web.xml file.
Hope that helps.
--kevan