Hi Mark,

2014-03-13 15:01 GMT+02:00 Mark Thomas <ma...@apache.org>:
>
> 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.
>

if you have two bundles one with the servlet API and another with JSP API
then Servlet API bundle can import optionally the resources from JSP API
bundle.
That's the way bundles use when need some functionality. When you import it
optionally you say that you need these resources/functionality but you can
run also without it.
Using this way you cover xml validation on and off in this particular
scenario.

> > 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.

:( You are right

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

What we can do if we want to cover this scenario?


Thanks
Violeta

>
> 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