Gurpreet,

I have faced same problem and got the solution too. Actually I have taken 
struts-config.xml file from my old project and DOCTYPE in 
struts-config.xml was having old URL of apache given as bold in following 
doctype.

<!DOCTYPE struts-config PUBLIC
       "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
       "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

While i was having newer version of jar file in which 
struts-config_1_2.dtd was having following DOCTYPE and URL of apache was 
newer one given as bold in follwoing doctype.
<!DOCTYPE struts-config PUBLIC
       "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
       "http://struts.apache.org/dtds/struts-config_1_2.dtd";>

Now if your computer is on internet then it will connect to 
http://jakarta.apache.org as well as http://struts.apache.org. On 
standalone computer it will try to resolve from DTD file in JAR file 
itself but due to mismatch it will not be able to resolve and then it will 
try to connect to internet and end result is "UnknownHostException" 
exception.
Moral of he story is check DOCTYPE in your xml file and match it with 
corresponding DTD in struts.jar file. 

Hope it helps..
Sunil




<[EMAIL PROTECTED]> 
03/17/2006 09:07 PM
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
<user@struts.apache.org>
cc

Subject
RE: Developing and running Struts on Tomcat without an Internet Connection






You are referring to the tab lib files which are hosted on
jakarta.apache.org website.
When you are connected to the internet it get resolved by your web
server and the moment you unhook it
The problem starts. Best practice is to download the same tab lib files
(Tld) and copy them in any of the folder under 
Your web application> once done change the path in your JSPs to load the
tld file from your local path instead of jakarta.apache.org 

-----Original Message-----
From: Richard Yee [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 16, 2006 9:28 PM
To: Struts Users Mailing List
Subject: Developing and running Struts on Tomcat without an Internet
Connection

I know this is supposed to work, but I'm getting an error starting up my
Struts 1.2.8 application on Tomcat 5.5.15 when I unplug my computer from
the Internet.
The stack trace is:

java.net.UnknownHostException: jakarta.apache.org
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.Socket.connect(Socket.java:507)
        at java.net.Socket.connect(Socket.java:457)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
        at sun.net.www.http.HttpClient.New(HttpClient.java:287)
        at sun.net.www.http.HttpClient.New(HttpClient.java:299)
        at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:792)
        at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:744)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:669)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:913)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrent
Entity(XMLEntityManager.java:973)


I'm using Java 1.5.0
I'm using the standard DOCTYPES from the struts_blank webapp

Any help is appreciated.

Thanks,

Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to