You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Bob Hanckel <rh...@us.oracle.com> on 1999/11/18 23:02:34 UTC
are jsp's restricted to text mime types?
hi,
can a jsp call a bean that retrieves multimedia content?
(i.e. not text). we've had partial success with this but
are running into exceptions that infer that it only returns
text. can the mime type be set by a bean in the jsp environment.
thx,
bob
Re: are jsp's restricted to text mime types?
Posted by Bob Hanckel <rh...@us.oracle.com>.
thx joe.
fyi, originally we thought about handcrafting a multimedia servlet but
thought about doing this in a jsp environment because of the simplicity
of administration.
Joseph Shelby wrote:
>
> Bob Hanckel wrote:
> >
> > hi,
> >
> > can a jsp call a bean that retrieves multimedia content?
> > (i.e. not text). we've had partial success with this but
> > are running into exceptions that infer that it only returns
> > text. can the mime type be set by a bean in the jsp environment.
>
> it seems that it must be a text-based mime type on return. The JSP
> environment gives the JSP page writer access to a java.io.Writer object,
> which is text-only. The standard specifically states that access to
> the underlying outputstream from HttpResponse is forbidden.
>
> So, it technically doesn't forbid a binary response explicitely,
> but it doesn't give you the ability (legally) to generate one either.
>
> It is possible to use that output stream, but the engine will report
> an exception (which in GNUJSP and apache, ends up in error_log
> in the apache logs directory). The exception usually is closing
> an already closed stream...
>
> Joe
> --
> ----------------------------------------------------------------------
> Joseph Shelby mailto:acroyear@io.com
> 5809 Chase Commons Ct. #201 http://www.io.com/~acroyear
> Burke, VA 22015 (703) 323-7121 | 247-7868
> Software Engineer, ISX Corporation, Arlington, VA
> "Any technology distinguishable from magic is insufficiently advanced"
> -- First Corollary to Clarke's Law
> ----------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
Re: are jsp's restricted to text mime types?
Posted by Joseph Shelby <ac...@io.com>.
Bob Hanckel wrote:
>
> hi,
>
> can a jsp call a bean that retrieves multimedia content?
> (i.e. not text). we've had partial success with this but
> are running into exceptions that infer that it only returns
> text. can the mime type be set by a bean in the jsp environment.
it seems that it must be a text-based mime type on return. The JSP
environment gives the JSP page writer access to a java.io.Writer object,
which is text-only. The standard specifically states that access to
the underlying outputstream from HttpResponse is forbidden.
So, it technically doesn't forbid a binary response explicitely,
but it doesn't give you the ability (legally) to generate one either.
It is possible to use that output stream, but the engine will report
an exception (which in GNUJSP and apache, ends up in error_log
in the apache logs directory). The exception usually is closing
an already closed stream...
Joe
--
----------------------------------------------------------------------
Joseph Shelby mailto:acroyear@io.com
5809 Chase Commons Ct. #201 http://www.io.com/~acroyear
Burke, VA 22015 (703) 323-7121 | 247-7868
Software Engineer, ISX Corporation, Arlington, VA
"Any technology distinguishable from magic is insufficiently advanced"
-- First Corollary to Clarke's Law
----------------------------------------------------------------------