OK, the CodeSource can be got in a non container-specific way:
| String loadPath =
this.getClass().getProtectionDomain().getCodeSource().getLocation().toString();
| webCS = new CodeSource(new URL(loadPath.substring(0,
loadPath.indexOf("/WEB-INF") + 1)), (Certificate[])null);
|
So, now I have my LoginModule generating this information at login time, and
then saving itself in the HttpSession. I have implemented a method in it:
| public boolean isURLAuthorized(String URLString)
| {
| return policy.implies(protDomain, new
WebResourcePermission(URLString, ""));
| }
|
So, now I can check availability of URLs in my tag handlers that output links.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915792#3915792
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915792
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user