File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Web.xml Unknown Host Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Web.xml Unknown Host Exception" Watch "Web.xml Unknown Host Exception" New topic
Author

Web.xml Unknown Host Exception

Toms Luke
Greenhorn

Joined: Nov 10, 2010
Posts: 11
hi
I am building a web application and deploying in jboss.during that getting exception Unknown host http://java.sun.com
which is present in web.xml
snippet
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
....................
...................
...............
<web-app>
I dont have internet,Is it due to that?
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Hello Toms.

When you post some code, put it surrounded by code tags. [code ] [/code ] (whitout the espaces).

Could you post the error msg?


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Toms Luke wrote:



I think the problem is due to the above- I think It isnt correct. You can have a look at the sample web.xml.


Mohamed Sanaulla | My Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

Servlets 2.2? Why such an old version? What container and version are you using?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Toms Luke
Greenhorn

Joined: Nov 10, 2010
Posts: 11
I am using JBOSS4.0.5.What servlet do you suggest?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

What Tomcat version is JBoss using?
Toms Luke
Greenhorn

Joined: Nov 10, 2010
Posts: 11
Tomcat 5.5
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

Then you should be declaring as Servlets 2.4, and using the XML Schema format rather than DOCTYPE.
Toms Luke
Greenhorn

Joined: Nov 10, 2010
Posts: 11
Thanks Bear,

It worked with your suggestion, but I used servler2.5.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

Servlets 2.5 is supported by Tomcat 6.
 
Don't get me started about those stupid light bulbs.
 
subject: Web.xml Unknown Host Exception