You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/02/05 21:30:41 UTC

DO NOT REPLY [Bug 48689] New: Jar abstraction for Jasper

https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

           Summary: Jar abstraction for Jasper
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: jgawor@gmail.com


Jasper can load TLD files through the ServletContext or from a Jar file. To
load TLDs from Jar file, an URL to a Jar file must be passed. However, in some
environments (e.g. in OSGi) it might not be easy to provide an URL to a jar
file. It would be nice to abstract the way Jasper is looking up the embedded
TLDs so that different ways of looking up TLDs within Jar files or Bundles or
whatever could be used.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Mark Thomas <ma...@apache.org> 2010-04-25 08:57:13 EDT ---
Thanks for the patch. It has been applied to 7.0.x and will be included in
7.0.0 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

--- Comment #4 from Mark Thomas <ma...@apache.org> 2010-02-06 12:13:37 UTC ---
It was bug47834 and mainly r814617 and r817685.

Bundles (as long as they are on the class path) are handled if
org.apache.jasper.compiler.TldLocationsCache.SCAN_ALL_FILES is set as any file
on the class path is checked to see if it is in JAR format and if it is, it is
scanned.

Exploded bundles (again as long as they are on the class path) are handled if
org.apache.jasper.compiler.TldLocationsCache.SCAN_ALL_DIRS is set and any
directory on the class path is checked to see it it is an exploded JAR/bundle.
If it is it is scanned.

As an aside, the TLD scanning is likely to see another refactoring once the
Servlet 3.0 work is complete to take advantage of some of the new features to
simplify the code.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Re: DO NOT REPLY [Bug 48689] New: Jar abstraction for Jasper

Posted by Bruno Henrique <br...@gmail.com>.
dev-unsubscribe@tomcat.apache.org

2010/2/5 <bu...@apache.org>

> dev-unsubscribe@tomcat.apache.org

DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

--- Comment #1 from Jarek Gawor <jg...@gmail.com> 2010-02-05 12:38:53 UTC ---
Created an attachment (id=24933)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24933)
Proposed patch for this issue.

Proposed patch for this issue is now attached. The patch introduces JarResource
interface through which most of the embedded TLD lookup is done. In most places
the code uses JarResource.getEntry() to get an URL to a specific entry within
the JarResource. In one or two places JarResource.getJarFile() is used but
really JarResource.getEntry() should be preferred.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

--- Comment #3 from Jarek Gawor <jg...@gmail.com> 2010-02-06 10:01:14 UTC ---
First, can you quickly describe or point me to the features that were added to
support TLD scanning in OSGi env. in case I missed them?

We have a custom implementation of TldLocationsCache.java. If the TLD is within
the application bundle (accessible via ServletContext or within a jar file in a
bundle) everything works fine. But in some cases we want to return a TLD that
is located in another bundle. So all we have is a URL to the TLD. For example,
something like bundle://123:0/META-INF/foo.tld. And in this case there is no
"jar url" I can pass/return to Jasper.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

--- Comment #5 from Jarek Gawor <jg...@gmail.com> 2010-02-08 08:01:38 UTC ---
Thanks for the pointers. I am aware of that code but it doesn't really help or
address the problem described in this bug. Jasper shouldn't require (as it
doesn't really need) a jar url to be passed from TldLocationsCache just to
parse the TLD or tag files within it. The problem is not with TLD scanning
itself but what TldLocationsCache.getLocation() method forces me to return and
rest of the Jasper code that uses the location information to do its stuff.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #2 from Mark Thomas <ma...@apache.org> 2010-02-06 05:53:31 GMT ---
Tomcat 7 already includes a number of features added specifically to support
TLD scanning in OSGi environments. Can you elaborate as to what you can't
currently do with Tomcat 7?

Also, could you provide an example of situations when a URL can't be provided?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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