You really shouldn’t do conditions on web-resources… It messes up with the caching of web resources.
Better approach would be just to add a my-special-context in your Atlassian-plugin.xml and then from the servlet, web-panel etc - just require the resource from the pagebuilder/webresources (just like you would do atl.admin or atl.general etc).
/Daniel