Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] [jetty-users] Jetty version 11 web.xml for Jakarta-EE 9

 
metadata-complete="false"
 
The value is meant to be false by default but somehow embedded jetty wasn't picking it up.
 
This is the change I had to make to this app
https://lit-taiga-52898.herokuapp.com/     for it to work using the broken archetype.
 
I eventually found the answer  by looking through stackoverflow.
 
I can develop using using mvn jetty:run and its hot deployment feature then just push to heroku cloud.
 
If you don't believe it try it.
 
I also know the trick with blank index.html/jsp file works with Jetty 9,10,11 &  Tomcat 9 but not tomcat 10.
 
I can also use embedded Jetty  as if it has the hot deployment feature by using the Eclipse IDE relaunch menu  button
but I wanted to get to the bottom of the problem and I did.
 
I am  not writing on this topic any more. I am just trying to help you.
I keep finding nice email addresses and  the moderator keeps making me waste them.
 
I have seen the list moderator's work. He is not even worth thinking about.
He is pathetic. he is below my station.
 
 
 
That is not what metadata-complete is for, and users of Jersey or JSP do not have to set it (either way) for success in either embedded, standalone (home/base), or jetty-maven-plugin.
 
JSP has no care in the world about Servlet metadata.
Jersey doesn't use Servlet metadata either.
 
Stop linking to, or promoting, your herokuapp.com (you'll just get this new email address banned by eclipse mailing list moderators again).
 
Joakim Erdfelt / joakim@xxxxxxxxxxx
 
On Tue, Apr 20, 2021 at 3:31 PM back Button via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
 
This is a copy of the web.xml needed to run Jetty successfully both as
jetty embedded and as a maven plugin. mvn jetty:run
 
The most  important setting is
metadata-complete="false"
 
Please look into the effects of metadata-complete="false" or metadata-complete="true"
 
With this setting metadata-complete="false" one can use web.xml
set the  welcome file to any name
the annotations will be turned on.
 
The original  FAULTY archetype is this one. found here in eclipse documentation
 
mvn archetype:generate -DarchetypeArtifactId=jersey-heroku-webapp \
                -DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \
                -DgroupId=com.example -DartifactId=simple-heroku-webapp -Dpackage=com.example \
                -DarchetypeVersion=3.0.1
 
 
 
<!--web.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                      https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd";
    metadata-complete="false" version="5.0">
    <servlet>
        <servlet-name>Jersey Web Application</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>com.example</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey Web Application</servlet-name>
        <url-pattern>/api/*</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>main.jsp</welcome-file>
    </welcome-file-list>
</web-app>
 
 
 
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-user

Back to the top