| Summary: | Logging from DefaultServlet next to useless - no information about attempted path for static resources | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Cefn Hoile <bugs.eclipse.org> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | unspecified | ||
| Target Milestone: | 7.1.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Cefn Hoile
Sorry, the updated file for this scenario, which provides configuration of paths to servlets is ServletContextAdaptor.java in this folder. https://github.com/cefn/Spring-JPA-MVC-Postgres/blob/6fe00f7938a64d04c48151ed841ee54d923781cf/src/main/java/com/cefn/filesystem/servlet/ The build I'm using is from jetty-distribution 8.0.0M2 out of the org.eclipse maven. Dear GRUMPY! I do believe that we may have inadvertently reduced the level of useful debugging with our recent changes to the resource cache. The debug line with "resource=null" previously would never give a null result and would reveal the path that was being attempted. For now, turn off the resource cache (set max cached files to 0 on the default servlet) and you should get better debug output. Also to confirm my diagnosis, what version of Jetty are you using? we'll make sure we fix it for the next release. regards "Dear GRUMPY!" made me laugh. Thankyou for the feedback and the workaround. As noted in the original thread I'm using 8.0.0M2 from org.eclipse through maven. The property 'resourceBase' was unset, (so the default path could have been read as null). I was attempting to work out what the default location served by DefaultServlet was if nothing was specified - aiming to place files in the default location for a typical maven environment (e.g. src/main/webapp) rather than introducing lots of hard coded paths which could break. I'm not using a web.xml configuration plus maven plugin, but instead launching Jetty direct. It seems in this configuration paths specified are relative to the 'working directory' rather than anything classloader-based. Trying to find out what file path DefaultServlet would attempt without being overridden by specific path configuration was how I got in a knot. Perhaps this is an unsupported approach. In the end I didn't understand what resource=null referred to anyway as I had very little context for what was being reported. I do have a chip on my shoulder about error messages, but I'll keep my narky subject lines in order next time. Forgot to go back and check the bug title and build id before submitting, sorry. It's not helped by writing in 'British English' which always sounds more formal than intended. I'm very appreciative of the Jetty project. I have selected it as our servlet engine because it seems well engineered with minimal unnecessary complexity. Keep up the good work. r2647 cheers Resolved -> Closed |