Are you behind a proxy? If so, you'll need to make sure that the JVM
knows about it before ActionServlet starts trying to read the DTD. One
way of doing this would be to subclass ActionServlet and override the
init method to something like this:

public class ProxyActionServlet extends ActionServlet
{
  public void init(ServletConfig config)
  {
    System.setProperty ("http.proxyHost",proxyserver);
    System.setProperty ("http.proxyPort",proxyport);

    System.setProperty ("https.proxyHost",secureproxy);
    System.setProperty ("https.proxyPort",secureproxyport);

    System.setProperty ("http.proxyUserName",username);
    System.setProperty ("http.proxyPassword",password);

    super.init(config);
  }
}

(I've typed this from memory so it may not work if you just cut and
paste). Then you'll need to make sure your web.xml file points to your
new class.

Cheers,
Alex

-----Original Message-----
From: Mike Dewhirst [mailto:[EMAIL PROTECTED]] 
Sent: 23 April 2002 09:08
To: 'Struts Users Mailing List'
Subject: can't register struts-config dtd on tomcat 4.0.3 (1.4 LE)
Importance: High

Has anybody ever had this before? I am running struts on freebsd 4.4
(custom), jdk1.4 (linux), tomcat 4.0.3 (1.4 LE), and struts 1.0.2
(stable).

Does anybody have any idea what could be causing this and how could I
fix
it?

if i do a manual fetch of
http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd - the file
is
downloaded no problem.

register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/usr/local/tomcat4.0.3/webapps/callsystem/WEB-INF/lib/struts.j
ar!/
org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.1//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd')
 Not registered, use system identifier
Parse Fatal Error at line 5 column -1: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";.
java.net.UnknownHostException: jakarta.apache.org
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
        at
org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2
870)
        at
org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167)
        at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
        at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:89)
        at org.apache.struts.digester.Digester.parse(Digester.java:755)
        at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:13
32)
        at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:91
6)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:
3266)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395
)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
        at
org.apache.catalina.core.StandardHost.install(StandardHost.java:714)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:23
2)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
ppor
t.java:155)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
        at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
Starting service Tomcat-Apache
Apache Tomcat/4.0.3


Many thanks in advance!

Mike


=**********************************************************

If you are not the intended recipient, employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination or copying of this communication and its
attachments is strictly prohibited.

If you have received this communication and its attachments in error,
please return the original message and attachments to the sender using
the reply facility on e-mail.

Internet communications are not secure and therefore the UCLES Group
does not accept legal responsibility for the contents of this message.
Any views or opinions presented are solely those of the author and do
not necessarily represent those of the UCLES Group unless otherwise
specifically stated.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses although this does not
guarantee that this email is virus free.

**********************************************************=



***********************************************************

If you are not the intended recipient, employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination or copying of this communication and its
attachments is strictly prohibited.

If you have received this communication and its attachments in error,
please return the original message and attachments to the sender using
the reply facility on e-mail.
Internet communications are not secure and therefore the UCLES Group
does not accept legal responsibility for the contents of this message.
Any views or opinions presented are solely those of the author and do
not necessarily represent those of the UCLES Group unless otherwise
specifically stated.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses although this does not
guarantee that this email is virus free.

***********************************************************




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

Reply via email to