javascript - How do i render a html file in grails that has source files included in the html? -


i have project in grails i'm doing ui part in separate grails independent project. i'm calling html file in ui project grails controller in different project.

how render html files controller? currently, i'm using render command convert htmlcontent text format , rendering text. released cant include relative source tags inside html , i'll need hardcode in html.

render text: htmlcontent, contenttype:"text/html", encoding:"utf-8" 

any other effective way render html (from different project) grails controller?

the following problem understand it:

  1. you have grails project containing controller.
  2. you have grails plugin project containing ui (html, css, etc).
  3. the controller project configured in grails-app/conf/build.groovy depend on ui plugin.
  4. you want render ui in ui plugin project controller in controller project.

views rendered same way regardless of whether contained in same project or not. example, if ui project has view @ grails-app/views/ui/index.gsp, controller in controller project can render this:

render(view: '/ui/index') 

i don't know htmlcontent coming from, rendering text simple things, such json; not html may contain other resources (like images , css files).

see, in grails urls static resources, such images , css files, generated either resources or asset-pipeline plugins. either way, trying set path such resources directly in html code not work.

if convert htmlcontent gsp page , use either resources or asset-pipeline, you'll able render html content sources.

check grails-app/conf/build.groovy line compile ":asset-pipeline:x.x.x" in plugins section. if it's there, heck go asset-pipeline! it's new way manage static resources.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -