-
1. Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
peterj May 30, 2007 6:08 PM (in response to bmist)If your servlet is named foo.bar.Servet, package it in a war file, named foobar.war, as follows:
WEB-INF/
+ web.xml
+ classes/
+ foo/
+ bar/
+ Servlet.class
Copy foobar.war to the server/default/deploy directory.
If you have a welcome file set up in web.xml to access the servlet, you can access it as http://localhost:8080/foobar. -
2. Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
peterj May 30, 2007 6:09 PM (in response to bmist)Rats, should have previewed the war file contents:
WEB-INF/ + web.xml + classes/ + foo/ + bar/ + Servlet.class
-
3. Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
bmist May 30, 2007 6:37 PM (in response to bmist)Ohh ok let me try converting it to .WAR file but before doing that my JBoss server is not starting up. i tried running the "run.bat" file but it does not display anythign on the command prompt.
i have set the env variables as follows.
CLASSPATH : C:\Program Files\jboss-4.0.5.GA\bin\run.jar:\lib\tools.jar
JAVA_HOME : C:\Program Files\Java\j2re1.4.2_04\bin\client\jvm.dll
JBOSS_HOME : C:\Program Files\jboss-4.0.5.GA
Thanks for your help. -
4. Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
peterj May 30, 2007 7:05 PM (in response to bmist)1) I recommend against placing any Java applications within Program Files. Various Java libraries have problems with spaces in the directory name, and unless you enjoy chasing down weird problems, you should put JBoss elsewhere. On my PC, JBoss is at f:\jboss\jboss-4.0.5.GA.
2) You do not need a classpath, the run.bat will set it up for you. I recommend that you never set a global CLASSPATH, it will only cause problems.
3) Your JAVA_HOME is incorrect. First, it references a JRE, your really should have a JDK. And your JRE is really old. You should download and use the latest 1.4 or 1.5 JDK from Sun and install it (do not use JDK 6, JBoss is not yet qualified to run with that and it can cause problems). Do not install the JDK in Program Files. Mine is at d:\apps\jdk1.5.0_11. (Yeah, I have a lot of disk drives, but on my laptop at home I use the same naming convention but everything is on the c: drive). Second, set JAVA_HOME to the installation directory, not to the jvm.dll. For example, on my PC I have:
JAVA_HOME=d:\apps\jdk1.5.0_11
4) It is not necessary to set JBOSS_HOME. -
5. Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
bmist May 30, 2007 7:10 PM (in response to bmist)Thanks for the information Peter, let me do it as you have instructed and will get back to you.
Thanks.
B -
6. Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
bmist May 30, 2007 7:57 PM (in response to bmist)Hi,
i downloaded the latest JDK and changed the env variables and was able to start the server successfully.
Thanks for your help Peter and everybody who replied.
Thanks.
B