Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Displaying Generated Image on Jsp

Displaying Generated Image on Jsp

2004-12-17       - By Jeroen Wenting

 Back
Reply:     1     2     3     4     5  

You can use a Servlet to send the image data as a binary stream to the
client and in the JSP place an image tag linking to that servlet.
Data telling the servlet what image data to retrieve can be sent along as
request parameters or placed in the Http Session.


 -- --Original Message-- --
 From: A mailing list for Java(tm) 2 Platform, Enterprise Edition
[mailto:J2EE-INTEREST@(protected)]On Behalf Of Govind Kotwani
 Sent: Friday 17 December 2004 10:52
 To: J2EE-INTEREST@(protected)
 Subject: Displaying Generated Image on Jsp



 Hi,

 We have web J2EE web based application which is deployed on weblogic
8.1(on Unix) as an ear.
 This EAR contains some EJB's some jar files and a war file.

 Now we want to display an image on the jsp after retreiving it from the
database.Image is stored in the database as a BLOB object.
 Currently what is implemented is e.g as soon as user selects a product an
image file (.jpg) is generated from the BLOB
 object (at some predefined location say C:\ImageFolder) and in jsp(HTML)
we display this image with with giving this path in
 IMG src tag.

 Is there any way where we can get rid of this absolute path(hard coded)
path and generate the image at a relative path and display
 from there in our jsp or is there any other wat to achieve it.


===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=703521412-17122004><FONT face=Arial color=#0000ff size=2>You
can use a Servlet to send the image data as a binary stream to the client and
in
the JSP place an image tag linking to that servlet.</FONT></SPAN></DIV>
<DIV><SPAN class=703521412-17122004><FONT face=Arial color=#0000ff size=2>Data
telling the servlet what image data to retrieve can be sent along as request
parameters or placed in the Http Session.</FONT></SPAN></DIV>
<DIV><SPAN class=703521412-17122004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=703521412-17122004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid;
MARGIN-RIGHT: 0px">
 <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
 size=2>-- --Original Message-- --<BR><B>From:</B> A mailing list for Java(tm)
 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)]<B>On
Behalf
 Of </B>Govind Kotwani<BR><B>Sent:</B> Friday 17 December 2004
 10:52<BR><B>To:</B> J2EE-INTEREST@(protected)<BR><B>Subject:</B> Displaying
 Generated Image on Jsp<BR><BR></FONT></DIV><BR><FONT face=sans-serif
 size=2>Hi,</FONT> <BR><BR><FONT face=sans-serif size=2>We have web J2EE web
 based application which is deployed on weblogic 8.1(on Unix) as an ear.</FONT
>
 <BR><FONT face=sans-serif size=2>This EAR contains some EJB's some jar files
 and a war file.</FONT> <BR><BR><FONT face=sans-serif size=2>Now we want to
 display an image on the jsp after retreiving it from the database.Image is
 stored in the database as a BLOB object.</FONT> <BR><FONT face=sans-serif
 size=2>Currently what is implemented is e.g as soon as user selects a product
 an image file (.jpg) is generated from the BLOB </FONT><BR><FONT
 face=sans-serif size=2>object (at some predefined location say C:\ImageFolder
)
 and in jsp(HTML) we display this image with with giving this path in</FONT>
 <BR><FONT face=sans-serif size=2>IMG src tag.</FONT> <BR><BR><FONT
 face=sans-serif size=2>Is there any way where we can get rid of this absolute
 path(hard coded) path and generate the image at a relative path and display
 </FONT><BR><FONT face=sans-serif size=2>from there in our jsp or is there any
 other wat to achieve it.</FONT> <BR><BR></BLOCKQUOTE></BODY></HTML>
===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".
<p>

©2008 junlu.com - Jax Systems, LLC, U.S.A.