views:

34

answers:

1

Hi all,I'm a novice Grails Programmer.I have 2 use case :

  1. render image file show on GSP Page.

  2. render PDF file and show on PDF Viewer integrate with GSP Page.

Can anyone provide examples of how to do this?

+2  A: 

Please provide some more details for your actions but roughly I suspect you might want the following:

  1. <img src="${createLinkTo(dir: 'images', file: '1.jpg')}" alt="Image"/>

  2. I don't know of any PDF viewers that could be integrated with an HTML page let alone a one that would be specific to grails. Your best bet is to redirect people to the PDF file and let their own browser handle the file.

mfloryan