[MAGNOLIA-1455] Remove usage of HttpServletRequest and -Reponse in TemplateRenderer Created: 11/Apr/07  Updated: 23/Jan/13  Resolved: 26/Jan/09

Status: Closed
Project: Magnolia
Component/s: core, templating
Affects Version/s: None
Fix Version/s: 4.0

Type: New Feature Priority: Major
Reporter: Magnolia International Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-2387 Request stored in WebContext is not u... Closed
relation
is related to MAGNOLIA-1479 Refactor ParagraphRenderer/TemplateRe... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

This will allow getting rendered content remotely, for instance, and generally cleaner.



 Comments   
Comment by Magnolia International [ 16/Sep/08 ]

If we do this, this will be in 3.7

Comment by Philipp Bracher [ 04/Oct/08 ]

No chance without fixing MAGNOLIA-2387 first

Comment by Philipp Bracher [ 13/Jan/09 ]

Following some input:

1) The TemplateRenderer interface should have the same/similar signature as the ParagraphRenderer
2) the render() method should return a RenderException
3) if possible we should only have a single RendererInterface which is used for both, the paragraph and the page templates.
4) I think that this allows to maintain a single freemarker renderer, instead of having two.

Comment by Magnolia International [ 14/Jan/09 ]

Started this locally, seems simple enough... except that the ServletTemplateRenderer would be broken. Well – it could always use the WebContext and get the request/response from there, but it doesn't seem ideal.

What are the usecases for this renderer ? Delegating to a 3rd party framework ? How does it work, how is Magnolia content passed around that ?

Comment by Philipp Bracher [ 15/Jan/09 ]

In my opinion the ServletTemplateRenderer can use the WebContext in the very same way as the JspTemplateRenderer. Or is there an other problem beside getting the request or response?

Comment by Sean McMains [ 15/Jan/09 ]

Per your request for comments on the list, we've never used the ServletTemplateRenderer (indeed, I hadn't known about it until you posted!), so it would cause us no heartache to break it.

Comment by Magnolia International [ 26/Jan/09 ]

Done.

  • void renderTemplate(Template template, HttpServletRequest request, HttpServletResponse response) is still there, deprecated.
  • ServletTemplateRenderer should still work as before, but now gets its request and response from the current Context.
Generated at Mon Feb 12 03:27:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.