question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Base AssetServlet on Jetty's DefaultServlet?

See original GitHub issue

Hi,

I noticed some issues about the AssetServlet’s missing functionalities (e.g., #1750) and myself was wondering how to activate the exploitation of pre-gzipped assets as handled by Jetty’s DefaultServlet (instead of doing on the fly gzipping).

I was wondering if it wouldn’t make sense to base AssetServlet’s on DefaultServlet directly… I have no idea how hard it would be, but for sure people would enjoy the extra functionalities it provides!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
evnmcommented, Nov 27, 2016

Thanks for outlining your findings, @victornoel.

It sounds like it would make sense to modify AssetServlet to extend DefaultServlet rather than HttpServlet. I think that an initial PR making this change should simply mimic the existing functionality of AssetServlet. We can then start to leverage the additional functionality of DefaultServlet in future changes, if it makes sense to do so.

I’m not familiar with Jetty’s notion of “welcome files/servlets”, but based on the Javadoc, it sounds feasible to implement AssetServlet’s index file behavior in terms of welcome files.

0reactions
github-actions[bot]commented, Aug 19, 2019

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

Read more comments on GitHub >

github_iconTop Results From Across the Web

DefaultServlet (Jetty :: Project 9.4.2.v20170220 API)
The default servlet. This servlet, normally mapped to /, provides the handling for static content, OPTION and TRACE methods for the context.
Read more >
org.eclipse.jetty.servlet.DefaultServlet Java Examples
This page shows Java code examples of org.eclipse.jetty.servlet. ... DefaultServlet.class); // If no filesytem path was passed in, load assets from the ...
Read more >
Servlet for serving static content - java - Stack Overflow
This basically just maps all content files by extension to the default servlet, and everything else to "myAppServlet". It works in both Jetty...
Read more >
Java Examples for org.eclipse.jetty.servlet.DefaultServlet
private void initHandler() { // default servlet required for jetty to accept all requests // (guice will ... getProperty("bq.internaljetty.base")); server.
Read more >
com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.java ...
WireMockHandlerDispatchingServlet ; import com.google.common.base. ... DefaultServlet; import org.eclipse.jetty.servlet.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found