I'll try to take a look at it ... might take a bit of time though :)

2017-06-20 22:23 GMT+02:00 Eben Stewart <[email protected]>:

> If the ticket comments can explain what *should* work (esp from an
> annotation perspective), given the scenario, I can try and help dig around.
>
> On Tuesday, June 20, 2017 at 3:58:48 PM UTC-4, Achim Nierbeck wrote:
>>
>> Hi,
>>
>> first of all thanks for the issue and the detailed description :)
>> regarding your first mail, I don't mind questions at all, so shoot as
>> much as possible at me, I try to answer as much as possible, sometimes I
>> might not know the answer :)
>>
>> Regarding the tracker, yes I really would like to have it backward
>> compatible, as we just introduced the OSGi compliance with 6, we might
>> start to deprecate with 7, and maybe get rid of it with 8 ... but that's
>> something to be worth to consider in the future :)
>> The ExtenderConstants should always work, we might have missed some
>> details while bringing those to the HttpWhiteboardConstants ...
>> Especially the pattern, it might be possible that we missed out on those,
>> need to check though.
>>
>> regards, Achim
>>
>>
>>
>> 2017-06-20 21:26 GMT+02:00 Eben Stewart <[email protected]>:
>>
>>> Created https://ops4j1.jira.com/projects/PAXWEB/issues/PAXWEB-1106 to
>>> report what I found (was able to trim it down to one Java file, plus the
>>> jsp/tag files)
>>>
>>>
>>> On Tuesday, June 20, 2017 at 10:15:26 AM UTC-4, Eben Stewart wrote:
>>>>
>>>> (I hope you don't mind all these questions - I am trying to figure out
>>>> the right way of doing this, and eventually might be able to contribute a
>>>> patch)
>>>>
>>>> So, for that tracker, it should be using both, for backwards compat and
>>>> OSGI spec, right?
>>>>
>>>> Also - for the JspMapping, which HttpWhiteboardConstants should it be
>>>> looking for to handle url mappings, etc?
>>>>
>>>> Same for ResourceMapping.....  in the sample, I had to do this:
>>>>
>>>> public ResourceMappingService() {
>>>>     setAlias("/");
>>>>     setPath("");
>>>>     setHttpContextId(MyHttpContextMapping.HTTP_CONTEXT_ID);
>>>> }
>>>>
>>>> What would be the expected HttpWhiteboardConstants way of doing this?
>>>> I would expect something like:
>>>>
>>>> HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN + "=/",
>>>> HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX + "=",
>>>>
>>>> But I still have not been able to get that to work (hence the original
>>>> post of this thread)
>>>>
>>>> On Tuesday, June 20, 2017 at 2:56:08 AM UTC-4, Achim Nierbeck wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> they actually should use the extender constants, but also the new
>>>>> HttpWhiteboardConstants :)
>>>>>
>>>>> regards, Achim
>>>>>
>>>>> 2017-06-20 2:22 GMT+02:00 Eben Stewart <[email protected]>:
>>>>>
>>>>>> ok, correct me if I am wrong....
>>>>>>
>>>>>> in HttpContextTracker (org.ops4j.pax.web.extender.wh
>>>>>> iteboard.internal.tracker)
>>>>>>
>>>>>> HttpContextElement createHttpContextElement(final
>>>>>> ServiceReference<HttpContext> serviceReference, final HttpContext
>>>>>> published) {
>>>>>> String httpContextId = 
>>>>>> ServicePropertiesUtils.getStringProperty(serviceReference,
>>>>>> ExtenderConstants.PROPERTY_HTTP_CONTEXT_ID);
>>>>>> String httpContextPath = 
>>>>>> ServicePropertiesUtils.getStringProperty(serviceReference,
>>>>>> ExtenderConstants.PROPERTY_HTTP_CONTEXT_PATH);
>>>>>>
>>>>>> those should not be using ExtenderConstants?
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> On Monday, June 19, 2017 at 7:11:20 PM UTC-4, Eben Stewart wrote:
>>>>>>
>>>>>>> Sounds good... knowing the history, and the future dev plans,
>>>>>>> especially if they make it into the OSGI spec, is always good :D
>>>>>>>
>>>>>>> I'm taking from your comments that the ExtenderConstants are not
>>>>>>> long term?  It would be better to have an HttpWhiteboardConstants way of
>>>>>>> doing it?
>>>>>>>
>>>>>>> I think all the annotations are there - I will look into seeing what
>>>>>>> I can do to contribute - still wrapping my head around it all, so I 
>>>>>>> want to
>>>>>>> have a good understanding of how it's all *supposed* to work.
>>>>>>>
>>>>>>> On Monday, June 19, 2017 at 3:07:53 PM UTC-4, Achim Nierbeck wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> thanks for the sample, will see to it.
>>>>>>>> regarding the comments/remarks, see my comments inline :)
>>>>>>>>
>>>>>>>> Achim
>>>>>>>>
>>>>>>>> 2017-06-19 14:50 GMT+02:00 Eben Stewart <[email protected]>:
>>>>>>>>
>>>>>>>>> Attached is a working example, the smallest I could get it
>>>>>>>>> (project is bndtools under Eclipse)
>>>>>>>>>
>>>>>>>>> A few points that threw me off, that did not seem clear at first
>>>>>>>>> (although they make sense now) - a lot of it had to do with the 
>>>>>>>>> whiteboard
>>>>>>>>> extensions to get resources and jsp support - I am not aware if the 
>>>>>>>>> OSGI
>>>>>>>>> spec even handles those concepts (although the WAR/WAB is).  I do 
>>>>>>>>> like this
>>>>>>>>> way better, as it doesn't make the bundle "special" in the way in 
>>>>>>>>> handles
>>>>>>>>> servlets, jsps and resources... they are all just services.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Just a bit of History, it might make the picture clearer for you.
>>>>>>>> The Pax Web Whiteboard extender exists since the WAR/WAB part has
>>>>>>>> been implemented, and at the time beeing that part also moved into the 
>>>>>>>> OSGi
>>>>>>>> spec. If you take a look at it, Pax Web and the Pax Url war 
>>>>>>>> URL-Handler are
>>>>>>>> part of the reference implementation for that part of the OSGi Spec.
>>>>>>>> So actually the Pax Web Whiteboard extension mechanism is "pretty"
>>>>>>>> old :)
>>>>>>>> About 2 years ago an Whiteboard extender mechanism had been added
>>>>>>>> to the OSGi spec, so we working on Pax Web tried to adapt the existing 
>>>>>>>> code
>>>>>>>> to the new spec.
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> 1) The use of HttpContextMapping
>>>>>>>>>
>>>>>>>>>    - There is no default implementation of this, like JspMapping
>>>>>>>>>    and ResourceMapping, so also cannot use annotations to initialize?
>>>>>>>>>    - How to use HttpContextMapping, DefaultHttpContext (or
>>>>>>>>>    shared), and still be able to get to handleSecurity()
>>>>>>>>>
>>>>>>>>>
>>>>>>>> You can retrieve a DefaultHttpContext Instance from the HttpService
>>>>>>>> (or WebContainer Service), register it as your own HttpContext. Maybe 
>>>>>>>> that
>>>>>>>> helps to what your are looking for?
>>>>>>>>
>>>>>>>>
>>>>>>>>> 2) No DefaultHttpContext (that can be extended as an annotated
>>>>>>>>> Service)
>>>>>>>>>
>>>>>>>>>    - DefaultHttpContext is package private, so there is no
>>>>>>>>>    "automatic" way to wire in a custom HttpContext (for the 
>>>>>>>>> handleSecurity()
>>>>>>>>>    method) without doing a lot of boilerplate coding to get the 
>>>>>>>>> service,
>>>>>>>>>    create the context, etc.  Since the DefaultHttpContext handles the
>>>>>>>>>    getResource() correctly in this scenario, it would be nice to be 
>>>>>>>>> able to
>>>>>>>>>    extend this class, and get it wired in via annotations.
>>>>>>>>>    - I think what I was expecting was to have something similar
>>>>>>>>>    to JspMapping or ResourceMapping that allowed me to specify path 
>>>>>>>>> and
>>>>>>>>>    contextID as annotations, and have the default getResources() 
>>>>>>>>> handler,
>>>>>>>>>    while being able to override the getSecurity()
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Sounds like a new feature, this in itself it worthy a new Issue, oh
>>>>>>>> and we do love contributions ;)
>>>>>>>>
>>>>>>>>
>>>>>>>>> 3) Required use of "ExtenderConstants.PROPERTY_HTTP_CONTEXT_ID"
>>>>>>>>> instead of "HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT"
>>>>>>>>> in Servlets
>>>>>>>>>
>>>>>>>>>    - Could not get the context selector to work - only the
>>>>>>>>>    Extender property correctly maps the servlet to the context, as 
>>>>>>>>> created by
>>>>>>>>>    HttpContextMapping
>>>>>>>>>
>>>>>>>>>
>>>>>>>> See above, about us trying to form the existing Whiteboard extender
>>>>>>>> into the specified one by the OSGi Spec, so this could be a bug :)
>>>>>>>>
>>>>>>>>
>>>>>>>>> 4) JspMapping and ResourceMapping cannot use annotations to
>>>>>>>>> initialize
>>>>>>>>>
>>>>>>>>>    - Tried using the ExtenderConstants.PROPERTY_HTTP_CONTEXT_ID
>>>>>>>>>    annotation property - won't work - had expected to use Whiteboard, 
>>>>>>>>> or
>>>>>>>>>    Whiteboard-like annotations
>>>>>>>>>    - Initializing in the constructor does work
>>>>>>>>>
>>>>>>>>> Sounds like another feature request.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hope all this makes sense - not sure how to translate this into a
>>>>>>>>> JIRA bug or feature request.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Makes a lot of sense now, you could open different issues / feature
>>>>>>>> requests for those. Oh and we do love contributions, if I didn't tell 
>>>>>>>> you
>>>>>>>> that before :)
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> In the end, I have a workaround, and a sample you might be able to
>>>>>>>>> use to make the scenario more clear, so that it might help others.
>>>>>>>>>
>>>>>>>>
>>>>>>>> yeah, thanks will form a sample out of it, so we can actually use
>>>>>>>> it as a reference for the integration tests for those 
>>>>>>>> issues/bugs/feature
>>>>>>>> request you'll create ;)
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Saturday, June 17, 2017 at 3:42:51 PM UTC-4, Achim Nierbeck
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> thanks, sounds like a good idea.
>>>>>>>>>> Yep, that's a standard scenario, so it could be a bug you found,
>>>>>>>>>> especially since the non OSGi spec whiteboard properties seem to 
>>>>>>>>>> work.
>>>>>>>>>>
>>>>>>>>>> regards, Achim
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2017-06-17 17:17 GMT+02:00 Eben Stewart <[email protected]>:
>>>>>>>>>>
>>>>>>>>>>> Sure... let me get something stripped down to the essentials....
>>>>>>>>>>>
>>>>>>>>>>> Maybe show how I got it to work, and how I would have expected
>>>>>>>>>>> it to work, given the current docs?  Esp if I can get it working 
>>>>>>>>>>> with all
>>>>>>>>>>> annotations (via annotations on JspMapping and ResourceMapping 
>>>>>>>>>>> classes) -
>>>>>>>>>>> no Activator class,
>>>>>>>>>>>
>>>>>>>>>>> I don't know if it's necessarily a bug, but rather a disconnect
>>>>>>>>>>> or clarification (possibly just in documentation/samples).
>>>>>>>>>>>
>>>>>>>>>>> At a minimum, it might make a good basis for a sample? I can't
>>>>>>>>>>> be the only one trying to do a Servlet->forward to JSP->Custom tags 
>>>>>>>>>>> in
>>>>>>>>>>> jsp.  Pretty standard scenario.
>>>>>>>>>>>
>>>>>>>>>>> On Friday, June 16, 2017 at 4:27:52 PM UTC-4, Achim Nierbeck
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Ok,
>>>>>>>>>>>>
>>>>>>>>>>>> maybe you can provide a little test project, we could use it as
>>>>>>>>>>>> a sample and as foundation for an integration test.
>>>>>>>>>>>> Sounds like you have a special condition we don't have covered
>>>>>>>>>>>> right now.
>>>>>>>>>>>> So it might be a bug.
>>>>>>>>>>>>
>>>>>>>>>>>> regards, Achim
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2017-06-16 22:06 GMT+02:00 Eben Stewart <[email protected]>
>>>>>>>>>>>> :
>>>>>>>>>>>>
>>>>>>>>>>>>> I'm using 6.0.6.snapshot
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Friday, June 16, 2017 at 3:10:56 PM UTC-4, Achim Nierbeck
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> are you looking for this?
>>>>>>>>>>>>>> https://github.com/ops4j/org.ops4j.pax.web/blob/master/sampl
>>>>>>>>>>>>>> es/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples
>>>>>>>>>>>>>> /whiteboard/ds/WhiteboardServletWithContext.java
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> That should work, which version of Pax Web are you using?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> regards, Achim
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 2017-06-16 20:25 GMT+02:00 Eben Stewart <
>>>>>>>>>>>>>> [email protected]>:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> One step further....
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> This works:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> final HttpContextMapping httpContextMapping = new
>>>>>>>>>>>>>>> HttpContextMapping() {
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> static final String HTTP_CONTEXT_ID = "customContext";
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> @Override
>>>>>>>>>>>>>>> public String getHttpContextId() {
>>>>>>>>>>>>>>> return HTTP_CONTEXT_ID;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> @Override
>>>>>>>>>>>>>>> public String getPath() {
>>>>>>>>>>>>>>> return "customContext";
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> @Override
>>>>>>>>>>>>>>> public Map<String, String> getParameters() {
>>>>>>>>>>>>>>> return null;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> @Override
>>>>>>>>>>>>>>> public HttpContext getHttpContext() {
>>>>>>>>>>>>>>> return null;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>> };
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Adding that, as well as calling
>>>>>>>>>>>>>>> setHttpContextId("customContext") on both the
>>>>>>>>>>>>>>> resourceMapping and jspMapping.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> A servlet also works, but only if I set
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ExtenderConstants.PROPERTY_HTTP_CONTEXT_ID
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> instead of
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Is this expected behavior?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Friday, June 16, 2017 at 11:19:00 AM UTC-4, Eben Stewart
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Ok, still trying to narrow this down to just the JSP
>>>>>>>>>>>>>>>> functionality....
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> What I am trying to accomplish:
>>>>>>>>>>>>>>>> 1) As many DS-based classes, keeping to OSGI standard
>>>>>>>>>>>>>>>> annotations as much as possible
>>>>>>>>>>>>>>>> 2) use of @Component instead of @WebServlet, so that wiring
>>>>>>>>>>>>>>>> to OSGI components can be done in the servlets using primarily 
>>>>>>>>>>>>>>>> annotations
>>>>>>>>>>>>>>>> (since @WebServlet are not OSGI components, they are not 
>>>>>>>>>>>>>>>> included in the
>>>>>>>>>>>>>>>> lifecycle - DS annotations do not work)
>>>>>>>>>>>>>>>> 3) must be able to have separate web context roots for
>>>>>>>>>>>>>>>> multiple applications on one server
>>>>>>>>>>>>>>>> 4) and JSPs, preferably with custom tags (using on-the-fly
>>>>>>>>>>>>>>>> compiling w/Jasper)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Here's a real simple setup:  a single jsp (/index.jsp) that
>>>>>>>>>>>>>>>> references the tag "layout.tag" in /WEB-INF/tags - NOT tlds
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> A single Activator class with this start() method:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> public void start(final BundleContext bundleContext) throws
>>>>>>>>>>>>>>>> Exception {
>>>>>>>>>>>>>>>> final DefaultResourceMapping rootResourceMapping = new
>>>>>>>>>>>>>>>> DefaultResourceMapping();
>>>>>>>>>>>>>>>> rootResourceMapping.setAlias("/");
>>>>>>>>>>>>>>>> rootResourceMapping.setPath("");
>>>>>>>>>>>>>>>> rootResourceMappingRegistration =
>>>>>>>>>>>>>>>> bundleContext.registerService(ResourceMapping.class,
>>>>>>>>>>>>>>>> rootResourceMapping, null);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> final DefaultJspMapping jspMapping = new
>>>>>>>>>>>>>>>> DefaultJspMapping();
>>>>>>>>>>>>>>>> jspMappingRegistration = 
>>>>>>>>>>>>>>>> bundleContext.registerService(JspMapping.class,
>>>>>>>>>>>>>>>> jspMapping, null);
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> in root of bundle:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - index.jsp
>>>>>>>>>>>>>>>> - WEB-INF
>>>>>>>>>>>>>>>>     - tags
>>>>>>>>>>>>>>>>         layout.tag
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> This all works as expected.  localhost:8080/index.jsp
>>>>>>>>>>>>>>>> properly shows the jsp page, including the proper use of the 
>>>>>>>>>>>>>>>> custom tag.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I guess the real question is, how do you properly setup a
>>>>>>>>>>>>>>>> custom context root via HttpContext, without the use of a war?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> What's the best practice for getting JSPs to work under a
>>>>>>>>>>>>>>>> different ContextRoot (as this also affects session cookie 
>>>>>>>>>>>>>>>> paths)?  How
>>>>>>>>>>>>>>>> would I modify this start() to associate a context root so it 
>>>>>>>>>>>>>>>> works under
>>>>>>>>>>>>>>>> http://localhost:8080/customcontext/index.jsp?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Friday, June 16, 2017 at 7:09:56 AM UTC-4, Achim
>>>>>>>>>>>>>>>> Nierbeck wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Ahh .. I already thought you would be running a war
>>>>>>>>>>>>>>>>> project.
>>>>>>>>>>>>>>>>> Good to know that that is actually working.
>>>>>>>>>>>>>>>>> In your case you need to make sure you also have
>>>>>>>>>>>>>>>>> registered the taglibs as resources to your project.
>>>>>>>>>>>>>>>>> Take a look at [1], it should be similar.
>>>>>>>>>>>>>>>>> If that still doesn't seem to work we might hit a bug or
>>>>>>>>>>>>>>>>> something we didn't test yet fully.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> regards, Achim
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> [1] - https://github.com/ops4j/org
>>>>>>>>>>>>>>>>> .ops4j.pax.web/tree/master/samples/helloworld-jsp
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> 2017-06-15 23:06 GMT+02:00 Eben Stewart <
>>>>>>>>>>>>>>>>> [email protected]>:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> So it seems a little bit more narrow - it *does* work,
>>>>>>>>>>>>>>>>>> but only when Web-ContextPath is specified in the Manifest 
>>>>>>>>>>>>>>>>>> (therefore
>>>>>>>>>>>>>>>>>> acting as a war?)
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> However, if using Whiteboard-DS, this is not used,
>>>>>>>>>>>>>>>>>> instead a ServletContextHelper with a 
>>>>>>>>>>>>>>>>>> HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH
>>>>>>>>>>>>>>>>>> set is used.  It will compile the JSP just fine in the 
>>>>>>>>>>>>>>>>>> context path, but
>>>>>>>>>>>>>>>>>> not find the .tag file in the tags directory.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Or I am configuring/thinking about this the wrong way,
>>>>>>>>>>>>>>>>>> which is certainly plausible.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Would it be helpful to attach the project zip?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Thursday, June 15, 2017 at 2:06:44 PM UTC-4, Achim
>>>>>>>>>>>>>>>>>> Nierbeck wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> hmmm ... guess we need to take a closer look at it.
>>>>>>>>>>>>>>>>>>> could you open an issue for that?
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> regards, Achim
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> 2017-06-15 19:49 GMT+02:00 Eben Stewart <
>>>>>>>>>>>>>>>>>>> [email protected]>:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> I tried that - Jasper compiler complains about the path
>>>>>>>>>>>>>>>>>>>> not starting with /WEB-INF/
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Thursday, June 15, 2017 at 11:20:48 AM UTC-4, Achim
>>>>>>>>>>>>>>>>>>>> Nierbeck wrote:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I'm not sure, the only thing that crosses my mind
>>>>>>>>>>>>>>>>>>>>> right now would be the / before the WEB-INF,
>>>>>>>>>>>>>>>>>>>>> could you give it a try without the slash?
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> If that still doesn't work out, please open an issue
>>>>>>>>>>>>>>>>>>>>> at pax web for that.
>>>>>>>>>>>>>>>>>>>>> OTH might want to checkout how the jsf and the
>>>>>>>>>>>>>>>>>>>>> primefaces samples are doing this. [1]
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> regards, Achim
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> [1] - https://github.com/ops4j/org
>>>>>>>>>>>>>>>>>>>>> .ops4j.pax.web/tree/master/samples/war-jsf-primefaces
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> 2017-06-14 20:57 GMT+02:00 Eben Stewart <
>>>>>>>>>>>>>>>>>>>>> [email protected]>:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Very simple example... tried this under standard
>>>>>>>>>>>>>>>>>>>>>> WAR/Tomcat environment, and it works fine.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> In pax-web, using extended DefaultJspMapping class
>>>>>>>>>>>>>>>>>>>>>> for JSPs, directory structure of jar shows index.jsp in 
>>>>>>>>>>>>>>>>>>>>>> the root, and layout.tag
>>>>>>>>>>>>>>>>>>>>>> in /WEB-INF/tags.  It definitely sees the jsps (with the 
>>>>>>>>>>>>>>>>>>>>>> custom tag, they
>>>>>>>>>>>>>>>>>>>>>> work fine)
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> index.jsp:
>>>>>>>>>>>>>>>>>>>>>> <!DOCTYPE html>
>>>>>>>>>>>>>>>>>>>>>> <%@taglib prefix="my" tagdir="/WEB-INF/tags"%>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> <my:layout>
>>>>>>>>>>>>>>>>>>>>>>     <jsp:attribute name="body">
>>>>>>>>>>>>>>>>>>>>>>       <div>
>>>>>>>>>>>>>>>>>>>>>>         Test
>>>>>>>>>>>>>>>>>>>>>>       </div>
>>>>>>>>>>>>>>>>>>>>>>     </jsp:attribute>
>>>>>>>>>>>>>>>>>>>>>> </my:layout>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> /WEB-INF/tags/layout.tag:
>>>>>>>>>>>>>>>>>>>>>> <!DOCTYPE html>
>>>>>>>>>>>>>>>>>>>>>> <%@tag description="LayoutTemplate"
>>>>>>>>>>>>>>>>>>>>>> pageEncoding="UTF-8"%>
>>>>>>>>>>>>>>>>>>>>>> <%@attribute name="body" fragment="true" %>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> <html>
>>>>>>>>>>>>>>>>>>>>>>     <body>
>>>>>>>>>>>>>>>>>>>>>>         <jsp:invoke fragment="body"/>
>>>>>>>>>>>>>>>>>>>>>>     </body>
>>>>>>>>>>>>>>>>>>>>>> </html>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> However, when I attempt to load the page:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> org.apache.jasper.JasperException: /index.jsp (line: 4, 
>>>>>>>>>>>>>>>>>>>>>> column: 0) No tag "layout" defined in tag library 
>>>>>>>>>>>>>>>>>>>>>> imported with prefix "my"
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Am I missing a directive somewhere?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>> ------------------
>>>>>>>>>>>>>>>>>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>>>>>>>>>> You received this message because you are subscribed
>>>>>>>>>>>>>>>>>>>>>> to the Google Groups "OPS4J" group.
>>>>>>>>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving
>>>>>>>>>>>>>>>>>>>>>> emails from it, send an email to
>>>>>>>>>>>>>>>>>>>>>> [email protected].
>>>>>>>>>>>>>>>>>>>>>> For more options, visit
>>>>>>>>>>>>>>>>>>>>>> https://groups.google.com/d/optout.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Apache Member
>>>>>>>>>>>>>>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer &
>>>>>>>>>>>>>>>>>>>>> PMC
>>>>>>>>>>>>>>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display
>>>>>>>>>>>>>>>>>>>>> /paxweb/Pax+Web/> Committer & Project Lead
>>>>>>>>>>>>>>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>>>>>>>>>>>>>>>> Co-Author of Apache Karaf Cookbook <
>>>>>>>>>>>>>>>>>>>>> http://bit.ly/1ps9rkS>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Software Architect / Project Manager / Scrum Master
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> ------------------
>>>>>>>>>>>>>>>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>>>>>>>> You received this message because you are subscribed to
>>>>>>>>>>>>>>>>>>>> the Google Groups "OPS4J" group.
>>>>>>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving
>>>>>>>>>>>>>>>>>>>> emails from it, send an email to
>>>>>>>>>>>>>>>>>>>> [email protected].
>>>>>>>>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/op
>>>>>>>>>>>>>>>>>>>> tout.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Apache Member
>>>>>>>>>>>>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>>>>>>>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display
>>>>>>>>>>>>>>>>>>> /paxweb/Pax+Web/> Committer & Project Lead
>>>>>>>>>>>>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>>>>>>>>>>>>>> Co-Author of Apache Karaf Cookbook <
>>>>>>>>>>>>>>>>>>> http://bit.ly/1ps9rkS>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Software Architect / Project Manager / Scrum Master
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> ------------------
>>>>>>>>>>>>>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>>>>>> You received this message because you are subscribed to
>>>>>>>>>>>>>>>>>> the Google Groups "OPS4J" group.
>>>>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails
>>>>>>>>>>>>>>>>>> from it, send an email to [email protected].
>>>>>>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/op
>>>>>>>>>>>>>>>>>> tout.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Apache Member
>>>>>>>>>>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>>>>>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display
>>>>>>>>>>>>>>>>> /paxweb/Pax+Web/> Committer & Project Lead
>>>>>>>>>>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>>>>>>>>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Software Architect / Project Manager / Scrum Master
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> ------------------
>>>>>>>>>>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>>>> Google Groups "OPS4J" group.
>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails
>>>>>>>>>>>>>>> from it, send an email to [email protected].
>>>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Apache Member
>>>>>>>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>>>>>>>>>>> Committer & Project Lead
>>>>>>>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>>>>>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Software Architect / Project Manager / Scrum Master
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>> --
>>>>>>>>>>>>> ------------------
>>>>>>>>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>>>>>>>>
>>>>>>>>>>>>> ---
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "OPS4J" group.
>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>>> Apache Member<br
>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>> --
>>>>>> ------------------
>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "OPS4J" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Apache Member
>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>> Committer & Project Lead
>>>>> blog <http://notizblog.nierbeck.de/>
>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>
>>>>> Software Architect / Project Manager / Scrum Master
>>>>>
>>>>> --
>>> --
>>> ------------------
>>> OPS4J - http://www.ops4j.org - [email protected]
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OPS4J" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to