I’m currently writing an extension (with a confluence http filter module) for redirecting mobile users to another mobile site - for example, mobile users should simply get a response like <html>...<script src='...'></script></html>, nothing else. My current problem is, that my custom response is mixed somehow with the normal website… the script tag is inside the body tag of the normal page.
After detecting the mobile device in the doFilter-Method I do the following:
You can/should do it through a servlet-filter. Can you post the lines of your servlet-filter definition from the atlassian-plugin.xml ?My guess is that your weight/location isn’t far enough up in the chain so the mobile ui intercepts it.
thank you for your response! The error was that the location-attribute in the <servlet-filter> was not before-decoration.
I still have another problem… I’m trying to get a absolute link to some web resources (like this one Solved: Confluence Download Image Resource URL), so I can refer to (for example) a javascript with the generated url.
I think the StaticAccessor.getWebResourceUrlProvider() not available for confluence.
Maybe only for jira, I not really sure.
You can just autowired WebResourceUrlProvider.