• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

How to deploy JSP/Servlet in Jboss3.2

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic