tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guilherme Orioli" <gui.ori...@gmail.com>
Subject Re: How can I refresh tomcat in the java code?
Date Thu, 03 Apr 2008 17:26:47 GMT
Christopher,

Ok,

|| This code is located on a managed bean. The method is invoked when a
|| h:commandButton is pressed. That's why I return a String.
|Ugh. Do you mean EJB? <sigh>

Yes, it's an EJB managed by the JSF config faces-config.xml . Should I use a
different servlet to get the result wanted?
Is this code right, i mean, should it show the download dialog (or even  the
PDF screen).
The navigator is firefox, but neither adobe acrobat nor plug-ins. Just a
linux reader.

|| Sorry for the English.
|Your English is just fine. I hope we're not using too many phrases that
|don't translate very well.

No problems with translations here. Just fine actually.

2008/4/3, Christopher Schultz <chris@christopherschultz.net>:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Guilherme,
>
> Guilherme Orioli wrote:
>
> | Everyone recommended me to generate it and send it as a response.
> | If that's the only option, I can accept that. If there's a way to
> refresh
> | the content under tomcat server folder, it would be better.
>
> There's no way that I know, short of reloading the entire webapp (which
> is probably no what you want to do).
>
> Another option would be to generate the content into a directory outside
> your webapp (which is a good idea, anyway, since reloading the webapp
> from a WAR would probably delete your generated content) and serve the
> files yourself using a simple servlet that serves files out of a
> particular directory.
>
> There is full code for such a servlet that was posted (by me!) to the
> list within the last 7 days or so with the subject "displaying an image
> from outside the webapps directory". Check it out.
>
> | The problem with the recommended option is: It doesn't send the
> content to be
> | downloaded.
>
> It should be. You must have something else going on that is not working.
>
> | The system.out was just a test to see if the file was generated
> correctly.
> | It seems to be, since it prints tons of unknown chars. ^^
>
> Well, what did you expect? ;)
>
> | What this code I sent previously tries to do is:
> | 1) Generate the pdf report (working fine)
> | 2) Create a ByteArrayOutputStream with it (working fine)
> | 3) Show it to be downloaded by the user (not working)
>
> Which browser? Displaying in the browser window, or forcing a download?
> It could even be a browser issue, especially if you are using Adobe's
> PDF plug-in and Mozilla Firefox -- they don't play well together for
> some reason.
>
> | This code is located on a managed bean. The method is invoked when a
> | h:commandButton is pressed. That's why I return a String.
>
> Ugh. Do you mean EJB? <sigh>
>
> | Hope you guys can help me now.
>
> I'm sure we can, but it might take some time. Be patient with us ;)
>
> | Sorry for the English.
>
> Your English is just fine. I hope we're not using too many phrases that
> don't translate very well.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkf1D3sACgkQ9CaO5/Lv0PA4MwCeKaF+Dz78BVY7tb10u492uxeK
> lNAAniAw2bQKYN/HG2vZIx/QS8WJELcM
> =iSqR
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message