Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

IT Mill, getServletContext()

Anonymous Anonymous
2 decades ago Jul 05, 2007 11:53am
Anonymous Anonymous
2 decades ago Jul 05, 2007 1:15pm
Marc Englund
2 decades ago Jul 05, 2007 1:26pm

Just a breakdown of the previous posters suggestion, in case it makes things clearer:

ApplicationContext ctx = getContext();
WebApplicationContext webCtx = (WebApplicationContext) ctx;
ServletContext sc = webCtx.getHttpSession().getServletContext();
Anonymous Anonymous
2 decades ago Jul 05, 2007 2:29pm
Anonymous Anonymous
2 decades ago Jul 20, 2007 12:51pm

Hey there,

this time I would like to open a PDF as MIME Type in the browser. But I'm not getting the ServletOutputStream....

ServletOutputStream out = res.getOutputStream();

:?: Thanks in advance,
Best regards
Thomas

Joonas Lehtinen
2 decades ago Jul 20, 2007 2:40pm
Anonymous Anonymous
2 decades ago Jul 21, 2007 12:03am