On 13/03/2014 12:28, Violeta Georgieva wrote:
> Hi,
> 
> In OSGi world the functionality is separated in different bundles and
> schemes for servlet API is in one bundle and schemes for JSP API in
> another.

Then I'd argue that those bundles are broken as far as validation goes.
You can't validate a web.xml document without access to the JSP schemas
but it should not be necessary to have a dependency on the jsp-api just
to validate a web.xml document.

> With that change we pack all schemes in servlet-api.jar. Till this changed
> one was able to use whatever servlet api bundle compatible with Tomcat but
> with that change we enforce people to use only the jar provided by Tomcat
> which is not a bundle also.
> 
> Is it possible to return back the check with JSPContext? Something like
> this?

No. That creates a dependency on jsp-api.jar.

A solution should be possible but it is going to be more complex that
the patch proposed here.

Mark


> 
> Index:
> C:/tc7.0.x/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
> ===================================================================
> --- C:/tc7.0.x/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
> (revision
> 1577108)
> +++ C:/tc7.0.x/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
> (working
> copy)
> @@ -22,6 +22,7 @@
>  import java.util.Map;
> 
>  import javax.servlet.ServletContext;
> +import javax.servlet.jsp.JspContext;
> 
>  import org.apache.tomcat.util.digester.Digester;
>  import org.apache.tomcat.util.digester.RuleSet;
> @@ -103,6 +104,9 @@
>          URL id = ServletContext.class.getResource("resources/" + url);
>          if (id == null) {
>              id = ServletContext.class.getResource("jsp/resources/" + url);
> +            if (id == null) {
> +                id = JspContext.class.getResource("resources/" + url);
> +            }
>          }
>          return id.toExternalForm();
>      }
> 
> 
> Thanks
> Violeta
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to