Open GoogleCodeExporter opened 9 years ago
[deleted comment]
How many jars you have in your maven dependency?
The Jetty8 have to scan all the jar files to search those "Servlet3" features
(web-fragment / annotations ... etc ) ,
and it might be a long time if your IO speed is not quick enough.
Since you are talking the shared folder from your network ,
I think that's the root-cause and there's nothing to do.
Original comment by tonylovejava
on 4 May 2012 at 2:53
I Agree. But in Jetty6 everything is pretty fast, no issues. I thought it
could be some validation that is delaying my app.
Original comment by rafael.h...@gmail.com
on 4 May 2012 at 2:56
[deleted comment]
Jetty 6 didn't support Servlet3 features, so it need not to scan the content of
all the jar files.That's the reason for why it's faster.
Jetty8 have to do a "content" scan for searching web-fragment.xml/annotations,
but Jetty6 not.
Original comment by tonylovejava
on 4 May 2012 at 3:36
You can add metadata-complete="true" to your web.xml web-app definition to
avoid scanning and initialize faster.
Here's my example:
<web-app id="apalabrados" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
metadata-complete="true">
Original comment by gonz...@gmail.com
on 14 Jun 2012 at 2:51
Thank you. Adding metadata-complete=true makes my application run like hell.
Thank you again gonz...@gmail.com
Original comment by rafael.h...@gmail.com
on 15 Jun 2012 at 11:26
That's a good suggestion , I will list it in the document.
Original comment by tonylovejava
on 15 Jun 2012 at 4:05
adding metadata-complete sometimes doesn't help, there's a bug filed about it:
https://jira.codehaus.org/browse/JETTY-1503
the solution is to add
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$</Arg>
</Call>
</Configure>
to jetty-context.xml. I'm not sure how to do that for run-jetty-run
Original comment by ja...@sindicetech.com
on 11 Apr 2013 at 3:47
Here is a workaround for speeding up Jetty 8 with Servlet 3.x.
1. Create a file (jetty.xml)
2. Open a RJR configuration
3. Click on "Show advanced options"
4. Additional Jetty.xml: <location to the jetty.xml file>
The file (jetty.xml) must have these lines:
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Get name="handler">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>.*/mwa-web-.*\.jar$</Arg>
</Call>
</Get>
</Configure>
Here, I'm telling Jetty that any file starting with mwa-web-* should be scanned
for Servlet 3.x.
As I said, this is a workaround. It will be nice if we can set the
`webInfIncludeJarPattern` regex from RJR configuration dialog.
Thanks
edgar
Original comment by espina.e...@gmail.com
on 27 Oct 2013 at 12:55
Attachments:
Whoa! I already use jetty.xml and this workaround will fit great in my
projects.
Thank you.
Yours faithfully,
Rafael Pereira
Systems Analyst Architect
Em 26/10/2013 22:56, <run-jetty-run@googlecode.com> escreveu:
Original comment by rafael.h...@gmail.com
on 27 Oct 2013 at 1:10
Original issue reported on code.google.com by
rafael.h...@gmail.com
on 3 May 2012 at 2:00