This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

How to deploy JSP/Servlet in Jboss3.2

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Jboss3.2.
I have 1 servlet and 1 Jsp to deploy in Jboss..
I have created web.xml and WEB-INF directory and subsequently .war file.
.war file I put in server/default/deploy directory....but while deploying it is giving error....
Can any body help to deploy it..

Thanks in Advance
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need to do to deploy on JBoss is build your WAR correctly and put it in the deploy directory of the server you are using. What is the error you see?
 
arnav prateek
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put .war file in server/default/delpoy directory...
I get follwoing error...on Jboss console screen..
---------------------------------
13:47:43,539 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
.scanner.URLDeploymentScanner$DeployedURL@a3a73c29{ url=file:/C:/jboss-3.2.1/ser
ver/default/deploy/test.war, deployedLastModified=0 }
org.jboss.deployment.DeploymentException: Document root element "web-app", must
match DOCTYPE root "null".; - nested throwable: (org.xml.sax.SAXParseException:
Document root element "web-app", must match DOCTYPE root "null".)
at org.jboss.jetty.Jetty.deploy(Jetty.java:353)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:35
7)
----------------------------------
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Document root element "web-app", must
match DOCTYPE root "null".; - nested throwable: (org.xml.sax.SAXParseException:
Document root element "web-app", must match DOCTYPE root "null".)


Looks like your web.xml is invalid. Check you have created this correctly. If you are not sure, post it here and we'll have a look.
 
arnav prateek
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Same web.xml...application is wrking in tomcat....pls find below web.xml

----web.xml--------
<web-app>
<display-name>City Directory Query</display-name>
<description>
Tomcat Example servlets and JSP pages.
</description>
<servlet>
<servlet-name>CDSAdminServlet</servlet-name>
<servlet-class>com.servlet.admin.CDSAdminServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CDSAdminServlet</servlet-name>
<url-pattern>/CDSAdminServlet</url-pattern>
</servlet-mapping>
</web-app>
---------------------------------
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't seem to have a DOCTYPE declaration. You'll need to add one that corresponds to the Servlet version you are using (Tomcat is being lax if it lets you get away without one, since it is a requirement of the spec. that all Servlet deployment descriptors must include a DOCTYPE).

A suitable DOCTYPE declaration might be:
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!