Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] context parameter

Dear Jetty team,

I am trying to add a context parameter to Jetty, using a jetty-web.xml file:

<?xml version="1.0"  encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC
    "-//Mort Bay Consulting//DTD Configure//EN"
    "http://www.eclipse.org/jetty/configure_9_0.dtd";>

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="initParams">
   <Map>
     <Entry>
       <Item>propertiesDir</Item>
       <Item>C:/Users/myname/workspaceProva/propertiesDir</Item>
     </Entry>
   </Map>
</Set>
</Configure>


I am getting this exception:


  ____    ___                   __    __  __         ___
  / __/___/ (_)__  ___ ___   __ / /__ / /_/ /___ __  / _ \
 / _// __/ / / _ \(_-</ -_) / // / -_) __/ __/ // /  \_, /
/___/\__/_/_/ .__/___/\__/  \___/\__/\__/\__/\_, /  /___/
           /_/                              /___/
2016-08-09 15:11:57.595:INFO::main: Logging initialized @2166ms
   Configuration:
C:\Users\AD7E7~1.FRA\AppData\Local\Temp\eclipseJettyPlugin.config.ReplyGAjetty.xml

C:\Users\a.franceschini\workspaceProva\Servers\jetty\jetty-web.xml
2016-08-09 15:11:57.821:WARN:oejx.XmlConfiguration:main: Config error
at <Set name="initParams">|?
<Map><Entry><Item>propertiesDir</Item><Item>C:/Users/myname/workspaceProva/propertiesDir</Item></Entry></Map>|?</Set>
java.lang.NoSuchMethodException: class
org.eclipse.jetty.webapp.WebAppContext.setInitParams(class
java.util.HashMap) in null
Exception in thread "main" java.lang.NoSuchMethodException: class
org.eclipse.jetty.webapp.WebAppContext.setInitParams(class
java.util.HashMap)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:591)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:300)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:245)
at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain.configure(Jetty9LauncherMain.java:96)
at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.configure(AbstractJettyLauncherMain.java:144)
at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:75)
at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain.main(Jetty9LauncherMain.java:42)



What could be the problem ?
How can I correctly pass a context parameter ?  (same as <Parameter
name="propertiesDir"
value="C:/Users/myname/workspaceProva/propertiesDir"
override="false"/>
 in tomcat )

Thankyou very much


Back to the top