Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Way to start Jetty without requiring internet connection

Jetty 9.4.6
Java build 1.8.0_65-b17
Debian:  Jessie
It’s being started by our Application server Terascript

Configuration file is named localhost.xml and the previous mentioned line
Is where the errors come from if there is no Internet connection:

<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd”>

Thanks
John



On Aug 19, 2017, at 7:52 PM, Jan Bartel <janb@xxxxxxxxxxx> wrote:

What version of jetty? How are you starting it - embedded, distro, maven ... ? What jdk? What os?

Jetty does not need an internet connection to resolve the dtd and schemas - that has always been taken care of by code in the jetty-xml jar. I just tested jetty-9.4.7.RC0 and reconfirmed this, so you'll need to provide more details on your setup.

Jan

On 20 August 2017 at 14:40, Thomas Maslen <thomas.mpp.maslen@xxxxxxxxx> wrote:
With the caveat that this isn't a complete answer, just the first little piece of one...

XML Catalog(ue) files exist to solve this sort of thing.  They let you express "when you encounter a reference to this XML-related object, satisfy it by using the local copy stored here".  For a DTD (the case you're dealing with here), the XML catalog lets you identify "this XML-related object" either by the PUBLIC id or by the System ID (that www.eclipse.org URL) or both.

The other 90% of the answer would be:  how do you configure the right parts of Jetty to use an XML Catalogue?  That part I don't know, but my guess is your chances of getting an answer from folks who do know may improve if you state the version of Jetty you're using.

(Perhaps it may also be possible to hack a solution by editing that line and replacing the www.eclipse.org URL with a relative reference to a local copy, e.g. "./configure_9_3.dtd", but that's a bit cheesy).


On Sat, Aug 19, 2017 at 8:26 PM, John Carrieri <jcarrieri@xxxxxxxxxxxx> wrote:
Hi, we have a web application that is based on Jetty.   We would like it to be able to start
even if there is not an internet connection on the local system.

The configuration line attempts resolve www.eclipse.org on startup.   While putting in 
an IP address might take care of it not trying to resolve, that’s a bad strategy to deploy
on remote devices.     Is there a way to just put the .dtd configuration file it’s looking at
on the local drive and reference it there.   I tried it but it did not seem to work, using a file://
notation.

If there is a way please let me know the exact notation.

Here is the configuration line I’m referring to:

<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd”>

Thanks


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top