Hope this helps.. an example i think i grabbed from JBoss example dir:
//web page ->
marconi jec zen 142> grep MailerServlet war/home.html
<form action="/mailer/MailerServlet" method="POST" >
//compile classes to build dir ->
marconi jec zen 144> ls build/classes/cae/javamail/
Mailer.class MailerHome.class MailerLocalHome.class
MailerBean.class MailerLocal.class MailerServlet.class
//copy Servlet class to WEB-INF ->
marconi jec zen 143> ls build/javamail/WEB-INF/classes/cae/javamail/
MailerServlet.class
//web.xml says what EJBs to use and which servlet ->
marconi jec zen 146> more build/javamail/WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://localhost:6666/dtd/web-app_2_2.dtd">
<web-app>
<!-- ### Servlets -->
<servlet>
<servlet-name>MailerServlet</servlet-name>
<servlet-class>cae.javamail.MailerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MailerServlet</servlet-name>
<url-pattern>/MailerServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>home.html</welcome-file>
</welcome-file-list>
<!-- ### EJB References (java:comp/env/ejb) -->
<ejb-ref>
<ejb-ref-name>ejb/Mailer</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>cae.javamail.MailerHome</home>
<remote>cae.javamail.Mailer</remote>
</ejb-ref>
</web-app>
//shove EJBs in jar ->
marconi jec zen 147> jar tf build/javamail/mailer.jar
META-INF/
META-INF/MANIFEST.MF
cae/
cae/javamail/
cae/javamail/Mailer.class
cae/javamail/MailerBean.class
cae/javamail/MailerHome.class
cae/javamail/MailerLocal.class
cae/javamail/MailerLocalHome.class
META-INF/ejb-jar.xml
META-INF/jboss.xml
//shove Servlet in war ->
marconi jec zen 148> jar tf build/javamail/mailer.war
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/cae/
WEB-INF/classes/cae/javamail/
WEB-INF/web.xml
WEB-INF/jboss-web.xml
WEB-INF/classes/cae/javamail/MailerServlet.class
home.html
// then cram war and jar into ear and deploy the ear ->
marconi jec zen 149> jar tf build/javamail/mailer.ear
META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml
mailer.jar
mailer.war
//here's my application.xml that goes in the ear ->
marconi jec zen 151> more build/javamail/META-INF/application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application>
<display-name>Javamail</display-name>
<module>
<web>
<web-uri>mailer.war</web-uri>
<context-root>/mailer</context-root>
</web>
</module>
<module>
<ejb>mailer.jar</ejb>
</module>
</application>
//add a jboss.xml if you want ( doesn't look like i have it in the ear file
though for my case ) ->
marconi jec zen 152> more build/javamail/META-INF/jboss.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<session>
<ejb-name>Mailer</ejb-name>
<jndi-name>Mailer</jndi-name>
<local-jndi-name>MailerLocal</local-jndi-name>
</session>
</enterprise-beans>
<resource-managers>
<resource-manager>
<res-name>mail/Mail</res-name>
<res-jndi-name>Mail</res-jndi-name>
</resource-manager>
</resource-managers>
</jboss>
James
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 12:37 PM
Subject: [JBoss-user] resource-loading in .war
> I'm running JBoss 3.0.4 w/Jetty. My servlets / JSPs cannot find resources
> located under WEB-INF/classes. Am I missing something? Isn't
WEB-INF/classes
> the 'default' root directory for servlets loading resources?
>
> - Henning
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
**********************************************************************
This e-mail and any files transmitted with it are confidential and may
be legally privileged or otherwise exempt from disclosure under
applicable law. This e-mail and its files are intended solely for
the individual or entity to whom they are addressed and their content
is the property of Smiths Aerospace. If you are not the intended
recipient, please do not read, copy, use or disclose this communication.
If you have received this e-mail in error please notify the e-mail
administrator at [EMAIL PROTECTED] and then delete this e-mail, its
files and any copies.
This footnote also confirms that this e-mail message has been scanned
for the presence of known computer viruses.
***********************************************************************
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user