| Summary: | The CGI servlet should support serving scripts from customisable paths within the context | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Florian Hackenberger <f.hackenberger> | ||||||||
| Component: | other | Assignee: | Project Inbox <jetty-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | simone.bordet | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 7.5.x | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Florian Hackenberger
Created attachment 204061 [details]
Implements the enhancement request
Setting the following init parameters exposes everthing in WEB-INF/cgi as cgi servlets, accessible using CONTEXTROOT/cgi-bin/CGIFILE.cgi
<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.eclipse.jetty.servlets.CGI</servlet-class>
<init-param>
<param-name>cgibinResourceBase</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<init-param>
<param-name>cgibinResourceBaseRelative</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi-bin/*</url-pattern>
</servlet-mapping>
Created attachment 205042 [details]
proposed patch
I've applied and tested the suggested changes and don't see any side effects. So attached is the git patches.
Thx a lot for the contribution!
Patch applied. Thanks for accepting the patch! Created attachment 206478 [details]
proposed patch
Javadoc update.
Please not that this will only work on extracted war files as "jar cf" will not presume the execute permissions needed on the cgi files.
Javadoc patch applied. |