Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence static content style

SIX DGI
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 3, 2016

Hello

We're using Confluence's tomcat engine to serve generated static web content as described in the following article:

https://confluence.atlassian.com/confkb/how-to-use-confluence-to-serve-static-content-677282407.html

I'm well aware that this feature is not covered by your support, as it primarily concerns tomcat rather than confluence. However our problem is NOT with tomcat, but with confluence:

Contrary to what is mentioned in above article Confluence indeed does apply it's style to the static content. The HTML Files are NOT rendered as is, in fact the custom style sheet in the original head-tag gets replaced by the one from Confluence and the actual content does not format properly. 

We found a workaround for that issue by including a second stylesheet desclaration in the body rather than the head, but starting with Confluence 5.9.9. matters got even worse. When using Chrome 53.x the html document get's completely scrambled, instead of one we have now three html tags etc.

Is there a way to make sure Confluence does not tamper in any way with the html documents, so that tomcat can deliver them exactly as they were generated? As mentioned this is supposed to be the case according to your know-how article, but that is clearly not what's happening.

BTW rendering the static content locally without involving Confluence works as expected, there is nothing wrong with the generated HTML code (in our cases generated by Taskjuggler).

Best regards

Daniel

 

 

 

1 answer

0 votes
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2016

Confluence isn't really the best choice of webserver and in release-notes they even recommend you to no add other workloads to the tomcat server. IMHO It would make more sense setting up a webserver elsewhere to make sure your content layout is retained. Needless to say you can have your own content on an apache server on the same machine, and use rewrite rules to distinguish what server the request should get a response from, but doing so will complex your setup and confuse support if help is ever needed. You are better off just setting up such solutions in it's own environment and inline content using the HTML plugin.

SIX DGI
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 4, 2016

Thanks for answering. I agree, that using a dedicated Apache would obviously avoid all these pitfalls and that is indeed what we intend to do in the long term. But it does not answer my original question, if the Confluence/Tomcat service we already have in place can be reconfigured so that it works as advertised and does not interfere with the static content at all.

In the short term this would be preferable to us, since it is a much more 'lightweight' setup. As you mentioned yourself, your suggestion - while being more robust and mainstream - is also more complex (also without optional proxy/rewrite rules).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events