-
1. Re: Where to store servlets in JBOSS3.0
joelvogt Jul 29, 2002 5:03 AM (in response to lavanya_s)you should package your servlets in a war file which you should place in jboss' deploy directory
-
2. Re: Where to store servlets in JBOSS3.0
dudoes Jul 30, 2002 5:52 AM (in response to lavanya_s)Servlet is a Class, place it to the place where you like,
then make reference tags in Web.xml of the .war where your .JSP file ACTION to the Servlet.
do you underStand?
I hope this help you. -
3. Re: Where to store servlets in JBOSS3.0
guru Jul 31, 2002 9:33 AM (in response to lavanya_s)Hi,
To run a servlet in JBOSS or for that matter in any app server, You have to prepare a archive called .war file.
it's directory structure shud be like the following one.
sample_servlet.war
|
|
---- index.html, .jsp files shud be placed here.
|
---- WEB-INF [FOLDER]
|
--- WEB.XML [FILE]
(which has the entry abt the servlets that can be accessed) |
|
|
--- CLASSES [FOLDER]
(which contains all the servlet class files)
| |
| --- LIB [FOLDER]
(which contains the .jar files that the servlet uses )
after arcchiving these files as .war
just put it in deploy folder in JBOSS and access it using the url thru the browser. -
4. Re: Where to store servlets in JBOSS3.0
guru Jul 31, 2002 9:35 AM (in response to lavanya_s)Hi,
To run a servlet in JBOSS or for that matter in any app server, You have to prepare a archive called .war file.
it's directory structure shud be like the following one.
sample_servlet.war
|
|
---- index.html, .jsp files shud be placed here.
|
---- WEB-INF [FOLDER]
|
--- WEB.XML [FILE]
(which has the entry abt the servlets that can be accessed) |
|
|
--- CLASSES [FOLDER]
(which contains all the servlet class files)
| |
| --- LIB [FOLDER]
(which contains the .jar files that the servlet uses )
after arcchiving these files as .war
just put it in deploy folder in JBOSS and access it using the url thru the browser.
i have attached a sample .war file which shows the structure that has to be built for deploying a servlet.
it is a sample .war ... only jsp works and not the servlet.. any how u can put ur own servlet and see it works.
regards,
Gurumurthy R. -
5. Re: Where to store servlets in JBOSS3.0
dudoes Jul 31, 2002 1:12 PM (in response to lavanya_s)I think a JAVA programmer should know the contructure of .war
I means how to call the servlet after the Servlet Class have being compiled.
of cause ,System can automatically put all Class files in the folder "/web-inf/Classes" after having been compiled. -
6. Re: Where to store servlets in JBOSS3.0
mlapolla Aug 9, 2002 7:09 PM (in response to lavanya_s)If I deploy my servlet to the /WEB-INF/classes directory, I can forward from a JSP using
<jsp:forward page="/servlet/servletController">
</jsp:forward>
However, if I try to do that from an action in a post,
it doesn't work. I know I have to modify web.xml if I don't want to deploy under /servlet/ but what do I modify to get it to work for the action in a form?
Thanks. -