File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes struts-config parsing error. UnknownHostException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts-config parsing error. UnknownHostException" Watch "struts-config parsing error. UnknownHostException" New topic

struts-config parsing error. UnknownHostException

Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261

I think this must be one of the most common queries. "My struts application doesn't load when my computer's not connected to the internet." After pouring over a whole bunch of such mails, I am still stuck. None of the suggested solutions have worked so far.
My struts application STILL doesn't load if my computer isn't connected to the net! I can always point to an absolute location for the struts DTD file, but that isn't exactly a scaleable option.

So as a last resort, I hope someone here can help me out.

Here's the header in my struts-config:

I have the struts-config_1_2.dtd present in the struts.jar file (under the package structure --> org\apache\struts\resources)

AS long my system is connected to the net, there aren't any problems, but take the net out of the picture and zzzaaapp the server can't load the web app anymore. Keeps spitting out UnknownHostException : cannot connect to host struts.apache
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16901

What server are you running? Most systems these days have a lookaside facility that will do a local catalog search before attempting the Internet. The other way isn't just a pain when you're off the net, it also puts a big delay in whenever the DTD has to be checked.

Customer surveys are for companies who didn't pay proper attention to begin with.
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
I am using Tomcat 5.5
And struts 1.2
It is sorta covered in the JavaRanch Style Guide.
subject: struts-config parsing error. UnknownHostException
It's not a secret anymore!