WIP deploy ee10 and ee9 webapps.

This commit is contained in:
Jan Bartel 2022-05-25 17:35:52 +10:00
parent b767ba0dcd
commit eea3a11dd7
8 changed files with 113 additions and 2 deletions

View File

@ -3,6 +3,9 @@
[description] [description]
Adds servlet standard security handling to the classpath. Adds servlet standard security handling to the classpath.
[environment]
ee10
[depend] [depend]
server server

View File

@ -3,9 +3,13 @@
[description] [description]
Enables standard Servlet handling. Enables standard Servlet handling.
[environment]
ee10
[depend] [depend]
server server
sessions sessions
[lib] [lib]
lib/jetty-jakarta-servlet-api-6.0.0-SNAPSHOT.jar
lib/jetty-ee10-servlet-${jetty.version}.jar lib/jetty-ee10-servlet-${jetty.version}.jar

View File

@ -1503,6 +1503,7 @@ public class ServletHandler extends Handler.Wrapper
protected void doGet(HttpServletRequest req, HttpServletResponse resp) protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException throws ServletException, IOException
{ {
//TODO
resp.sendError(HttpServletResponse.SC_NOT_FOUND); resp.sendError(HttpServletResponse.SC_NOT_FOUND);
} }
} }

View File

@ -0,0 +1,63 @@
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<!-- =============================================================== -->
<!-- Create the deployment manager -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- The deplyment manager handles the lifecycle of deploying web -->
<!-- applications. Apps are provided by instances of the -->
<!-- AppProvider interface. -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call id="DeploymentManager" name="getBean">
<Arg><Call class="java.lang.Class" name="forName"><Arg>org.eclipse.jetty.deploy.DeploymentManager</Arg></Call></Arg>
</Call>
<Ref refid="Environment">
<Call name="setAttribute">
<Arg>contextHandlerClass</Arg>
<Arg><Property name="contextHandlerClass"/></Arg>
</Call>
</Ref>
<Ref refid="DeploymentManager">
<Call name="addAppProvider">
<Arg>
<New id="WebAppProvider" class="org.eclipse.jetty.deploy.providers.ContextProvider">
<Set name="defaultEnvironment">ee10</Set>
<Set name="monitoredDirName">
<Call name="resolvePath" class="org.eclipse.jetty.xml.XmlConfiguration">
<Arg>
<Property name="jetty.base" />
</Arg>
<Arg>
<Property name="jetty.deploy.monitoredDir" default="webapps-ee10" />
</Arg>
</Call>
</Set>
<Set name="defaultsDescriptor">
<Property>
<Name>jetty.deploy.defaultsDescriptorPath</Name>
<Default>
<Property name="jetty.home" default="." />/etc/webdefault-ee10.xml
</Default>
</Property>
</Set>
<Set name="scanInterval">
<Property name="jetty.deploy.scanInterval" default="1" />
</Set>
<Set name="extractWars">
<Property name="jetty.deploy.extractWars" default="true" />
</Set>
<Set name="configurationManager">
<New class="org.eclipse.jetty.deploy.PropertiesConfigurationManager">
<!-- file of context configuration properties
<Set name="file"><SystemProperty name="jetty.base"/>/etc/some.properties</Set>
-->
<!-- set a context configuration property
<Call name="put"><Arg>name</Arg><Arg>value</Arg></Call>
-->
</New>
</Set>
</New>
</Arg>
</Call>
</Ref>
</Configure>

View File

@ -0,0 +1,33 @@
[description]
Enables web application deployment from the $JETTY_BASE/webapps/ directory.
[environment]
ee10
[depend]
deploy
ee10-webapp
[lib]
[files]
webapps-ee10/
[xml]
etc/jetty-ee10-deploy.xml
[ini-template]
# Monitored directory name (relative to $jetty.base)
# jetty.deploy.monitoredDir=webapps-ee10
# - OR -
# Monitored directory path (fully qualified)
# jetty.deploy.monitoredPath=/var/www/webapps-ee10
# Defaults Descriptor for all deployed webapps
# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault-ee10.xml
# Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1
# Whether to extract *.war files
# jetty.deploy.extractWars=true

View File

@ -4,6 +4,9 @@
Adds support for servlet specification web applications to the server classpath. Adds support for servlet specification web applications to the server classpath.
Without this, only Jetty-specific handlers may be deployed. Without this, only Jetty-specific handlers may be deployed.
[environment]
ee10
[depend] [depend]
ee10-servlet ee10-servlet
ee10-security ee10-security
@ -30,5 +33,8 @@ lib/jetty-ee10-webapp-${jetty.version}.jar
#jetty.webapp.addSystemClasses+=,org.example. #jetty.webapp.addSystemClasses+=,org.example.
#jetty.webapp.addServerClasses+=,org.example. #jetty.webapp.addServerClasses+=,org.example.
[ini]
contextHandlerClass=org.eclipse.jetty.ee10.webapp.WebAppContext
[jpms] [jpms]
add-modules:java.instrument add-modules:java.instrument

View File

@ -17,7 +17,6 @@ etc/jetty-ee9-webapp.xml
[lib] [lib]
lib/jetty-ee9-webapp-${jetty.version}.jar lib/jetty-ee9-webapp-${jetty.version}.jar
[ini-template] [ini-template]
## Add to the server wide default jars and packages protected or hidden from webapps. ## Add to the server wide default jars and packages protected or hidden from webapps.
## System classes are protected and cannot be overridden by a webapp. ## System classes are protected and cannot be overridden by a webapp.
@ -33,7 +32,9 @@ lib/jetty-ee9-webapp-${jetty.version}.jar
## ##
#jetty.webapp.addSystemClasses+=,org.example. #jetty.webapp.addSystemClasses+=,org.example.
#jetty.webapp.addServerClasses+=,org.example. #jetty.webapp.addServerClasses+=,org.example.
contextHandlerClass = org.eclipse.jetty.ee9.webapp.WebAppContext
[ini]
contextHandlerClass=org.eclipse.jetty.ee9.webapp.WebAppContext
[jpms] [jpms]
add-modules:java.instrument add-modules:java.instrument