JBoss 4.0.2 web module deployment query.

P

Piper707

Hi,

I'm trying to write a simple appln consisting of a JSP page and
servlet, combine that into a .war (packed into a .ear) and drop it in
the D:\JBoss\jboss402\server\default\deploy directory.

The JSP page is found, but the Servlet is not.

I have included my steps below:

-------------------------------------------------------
1) JSP and Servlet related files:

root/example2/index.jsp
root/example2/WEB-INF/web.xml
root/example2/WEB_INF/classes/HelloWorld.class

- combine example2/*.* ---> example2.war

2) application.xml file

root/META-INF/application.xml

combine /META-INF/*.* + example2.war --> example2.ear

3) Deploy .ear file

D:\JBoss\jboss402\server\default\deploy\example2.ear

4) web.xml file

<web-app>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>

<servlet-mapping>
<url-pattern>/servlet/HelloWorld</url-pattern>
<servlet-name>HelloWorld</servlet-name>
</servlet-mapping>

</web-app>


5) application.xml file

<?xml version="1.0" encoding="ISO-8859-1"?>

<application>
<display-name>Example 2 </display-name>
<module>
<web>
<web-uri>example2.war</web-uri>
<context-root>/example2</context-root>
</web>
</module>
</application>

6) JSP page found at:

http://localhost:8080/example2/example2/

7) Servlet NOT found at

http://localhost:8080/example2/example2/HelloWorld

ERROR Message:

type Status report
message /example2/example2/servlet/HelloWorld
description The requested resource
(/example2/example2/servlet/HelloWorld) is not available.

-------------------------------------------------------------

Questions:

1) For the JSP page the url is:
http://localhost:8080/example2/example2/

I'm guessing the first "example2" in the URL refers to "example2.ear"
and next to "example2.war", is that correct?.

2) why can't it find the Servlet?

3) Is there ever any need to set the classpath for TOMCAT when it comes
embedded in JBoss? If yes, point it to where?

Thanks for any help,
Rohit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top