Hi Fabio,

I don't think you absolutely need a servlet, but it might just be the simplest 
way to do it.

Just write your servlet in the "normal" way. You'll probably want to include 
the document name or ID in the URL that calls the servlet, either in the path 
or as a parameter. Your servlet can then load the document and stream it out in 
the response.

Once your servlet is working, add the JAR or class-file to the magnolia webapp, 
and configure it in magnolia under config -> /server/filters/servlets
You should be able to deduce the config format from the other servlets already 
present there.

Regards from Vienna,

Richard


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Fabio Paroni (via Magnolia Forums)
Gesendet: Freitag, 04. Jänner 2013 10:08
An: Magnolia User List
Betreff: [magnolia-user] Servlet to open/download documents (pdf, doc, txt)

Hi guys,

I need to open a document, for example a pdf, after I've clicked on a button in 
my jsp. All my documents are stored in my database as Blob. I think I need my 
own servlet to do this, but I don't know how to write it in the Magnolia 
context.

Any suggestion, tutorial, wiki to do that?

Thanks in advance.
Fabio

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=9bd1727b-44b7-41d2-960d-0f7c4b88b388


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to