How to show images in jsp dynamic

Hi all,
I am beginner in web technology and am faced with some prob. I have a form in which user enters his unique id....n submits...then web server call ejb which fetches data for that unique id from DB and does some operation and also fetch photograph which i need to display in my response jsp along with data....this photograph is different for each ID and i want to know how to display this image , i dont want to use applet.....i need good response time..and i have lot of hits per second on my site....i was planning to have separate frame wherein image will be loaded and use AJAX for the same but i do believe their mite be some other simple method for the same please suggest.....
Regards,
beginner83.

I am not great at UI, but see if this thread is of any help:
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=20&t=007725

Similar Messages

  • How to show image in a Transperent form ?? screen shots attached

    Hi
    Help me in making Images appearing as Transperent . Screen shots attached
    I am having a TextInput and a Search Button (The Functionality is that user can enter something in this TextInput and makes a Search Operation by pressing Search Button .)
    At the Initail screen display i need to show Some Image in transperent  Inside this TextInput  , when Mouse is focused on this TextInput , the Image will be completely Invisible .
    Now the question i want to ask is , how to show image in a Transperent form ??
    Please find the screen shots attached with this Thread .

    Thanks for specifying  the alpha property of an Image .

  • How to Show Image form Library with Thumbnail view on visual Web part page using XsltListView web part?

    <WebPartPages:XsltListViewWebPart ID="XsltListViewWebPart_AppWeb"
    runat="server" ListUrl="Lists/MyList" IsIncluded="True"
    NoDefaultStyle="TRUE" Title="XsltListView web part" PageType="PAGE_NORMALVIEW"
    Default="False" ViewContentTypeId="0x">
    </WebPartPages:XsltListViewWebPart>
    For any List it work fine but for Image form library its not working:
    My url: http://sitename:portname/PublishingImages/Forms/AllItems.aspx
    Please provide Solution.
    Question:How To show image library with thumbnail view in Visual Webpart using xslt webpart.

    Is it throwing any error?
    do you set correctly the ListUrl parameter? in this case it will be "PublishingImages"

  • How to upload image using JSP

    hi,
    i am confronting a problem how to upload image from local PC to web server . I am using Tomcat 4.0
    please help me by sending code
    thanks

    Hi,
    Here is the solution for uploading images and displaying images. I am using struts with JSP, so this code has a Action and ActionForm class. You can put the same code in Java Beans or Servlet class to run it. This code has two JSP files - one for Upload (upload.jsp)and other for Image(image.jsp) display. It has a Servlet also to display the image. Here is the code file wise.
    Upload.jsp **********************************************************
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="uploadAction.do" enctype="multipart/form-data" method="POST">
    <p>File to upload   
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit value="Upload" property="upload"/></p>
    <p> </p>
    <p><html:img src="image.jsp"/></p>
    <p> </p>
    </html:form>
    </body>
    </html:html>
    Image.jsp*****************************************************************
    <jsp:useBean id="upload" class="uploadtest.uploadActionForm" scope="session">
    </jsp:useBean>
    <%
         byte[] rgb=(byte[])session.getAttribute("byte");
         request.setAttribute("byArr", rgb);
    %>
    <!--
    The image data is now on the request object.
    Forward the user to the showImage servlet.
    That servlet will process and display the image data contained on the request object.
    -->
    Image is<p>
    <jsp:forward page="/showimage" />
    Struts Action Class - UploadAction.java **************************************************
    import javax.servlet.http.*;
    import java.io.*;
    import org.apache.struts.upload.FormFile;
    import org.apache.struts.action.*;
    public class uploadAction extends Action {
    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
    uploadActionForm upload = (uploadActionForm) actionForm;
    try {
    int size=upload.getFileUpload().getFileSize();
    //if (image != null) {
    byte[] byteArr = new byte[size];
    //Create an input stream to read the uploaded file.
    ByteArrayInputStream bytein = new ByteArrayInputStream(upload.getFileUpload().getFileData());
    // Load the input stream into the byte Array.
    bytein.read(byteArr);
    // Close the input stream.
    bytein.close();
    // Load the byte[] into the content field.
    upload.setContent(byteArr);
    HttpSession ses=httpServletRequest.getSession();
    ses.setAttribute("byte",byteArr);
    return actionMapping.findForward("success");
    } catch (Exception ex) {
    ex.printStackTrace();
    return actionMapping.findForward("success");
    Struts ActionForm class ---uploadActionForm.java***************************************************
    package uploadtest;
    import org.apache.struts.action.*;
    import org.apache.struts.upload.*;
    import javax.servlet.http.*;
    public class uploadActionForm extends ActionForm {
    private FormFile fileUpload;
    private byte[] content;
    public FormFile getFileUpload() {
    return fileUpload;
    public void setFileUpload(FormFile fileUpload) {
    this.fileUpload = fileUpload;
    public byte[] getContent()
    return content;
    public void setContent(byte[] theFile)
    this.content = theFile;
    public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    /**@todo: finish this method, this is just the skeleton.*/
    return null;
    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    Servlet to display image --- ShowImage.java ********************************************************
    import java.io.*;
    import java.util.*;
    public class ShowImage extends HttpServlet {
    //Initialize global variables
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    byte[] rgb = (byte[]) request.getAttribute("byArr");
    if (rgb != null)
    response.setContentType("image/gif");
    OutputStream stream = response.getOutputStream();
    stream.write(rgb);
    else
    response.setContentType("text");
    response.getWriter().write("attribute byArr not found");
    This code will enable to to upload and display the image. If you know Struts, then you can write the Struts-Config.xml file by yourself. Other wise write to me, I will send you that. If you want to save the image in database, then you have to keep it as BLOB datatype is database. For database you need to send the byte array in the uploadAction.java file to database. Database will keep the image as binary.
    Thanks
    Amit

  • How to show image in TestStand xml report

    Hi,
    I am using TestStand to run DLLs written over CVI.
    I am using the xml report for collecting results.
    Some of the tests i run require showing images on the report -
    I would like to know how to allow showing an image on xml report by writing a CVI code.
    Thanks,
    Moshik

    Hi Moshik,
    There is an example for inserting images in your report in this discussion:
    http://forums.ni.com/ni/board/message?board.id=330&message.id=2819&requireLogin=False
    TestStand uses the sequences named reportgen_***.seq that default to the
    C:\Program Files\National Instruments\TestStand 3.5\Components\NI\Models\TestStandModels directory for report generation.
    You can edit the reportgen_xml.seq for XML reports.
    Is it really necessary for your DLLs to do the image insertion?
    Gavin Fox
    Systems Software
    National Instruments

  • How to show image in oracle adf if i have data in byte[] ?

    For first time I am using <af:inputFile> to get file of image type from any location on my system and convert the data in "byte[]" and store it in database...
    When i visit page again i need to show uploaded file which is coming to me "byte[ ] ".
    To show image i am using <af:image> component.
    Help will be appreciated.

    Check this blog post: http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
    Dario

  • How to show images in horizontal scroll field in blackberr

    hi i want to show images in horizontal field manager and scroll right to left. focused image should be show up.
    Solved!
    Go to Solution.

    please reply with your device model (e.g. Blackberry Curve 8520)
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up Blackberry Battery Saving Tips | Follow me on Twitter

  • How to show image in matrix by selecting matrix column type as "it_PICTURE"

    Hi All!
    Can i show image in matrix, by selecting matrix column type as "it_PICTURE". If yes please write the steps.
    Thanks & Regards
    Surojit

    Hi
    First you have to set the matrix column type as it_PICTURE then bind that column to a userdatasource or dbdatasource. In the following code I am using userdatasource . This code will   set the picture to a sepecified columns first row. Please create small image and paste it in your c drive (15X15 size image-- "c:\pic.png")
    Dim oColumn As SAPbouiCOM.Column
                Dim mtxDisp As SAPbouiCOM.Matrix = form.Items.Item("mtxDisp").Specific
                form.DataSources.UserDataSources.Add("udsPic", BoDataType.dt_SHORT_TEXT, 254)
                oColumn = mtxDisp.Columns.Item("colPic")
                oColumn.DataBind.SetBound(True, "", "udsPic")
                mtxDisp.AddRow()
                mtxDisp.GetLineData(1) '*Loads UserDataSources from line X*'
                mtxDisp.DataSources.UserDataSources("udsPic").ValueEx = "c:\pic.png"
                mtxDisp.SetLineData(1) '*Sets Matrix line X based on current UserDataSource values*'
    Hope this helps
    Regards
    Arun

  • How to Show images in mail box with java mail??????????

    Hello everyone,
    Iam sending mail using java, my mail format consisit of colored text and images,that should be diplsyed to reciever in mail box,my code is working fine reciever gets mail in inbox but problem is when we recieve mail like that images doesnot show up in the mail automaticaly,when i click on show images link in my mail box only then images become visible,i tested my mail in gmail,rediff and yahoo and in all cases i have to mannually click on "show images" link to view images that i sent with my mail,why so? is this due to security reasons in mailbox??? can i write such code that can overcome this problem i.e my images shows directly in anymailbox without clicking on showimages link.
    Please help.
    Thanks.

    anie wrote:
    can i write such code that can overcome this problem i.e my images shows directly in anymailbox without clicking on showimages link.No. That's a security function of the browser, and not something you can control.
    On another note, please refrain from posting unnecessary, excessive punctuation. It only clutters up your message, which isn't a good thing. Thanks!
    ~

  • How to include image or html dynamically in a JSP?

    I need to show the uploaded content in a jsp. It could be either a image or html file. How can i include these images or html files dynamically without affecting screen design.

    What the heck is 'screen design'? You mean the page layout?
    You could show in a popup div; JQuery will be your best bet for a prebuilt function to do that. But you'd need to put the uploaded file in a place where the browser can fetch it through an URL, or you need to create a servlet that can load and return the data to the browser.

  • How to show image in Smart Form dynamically , Image is stored on local PC

    Hi All,
    I have a requirement where user can attach any image to PM Order in T-code IW33. Now this image  gets stored on user`s local PC.
    After this user will generate a report which is a Smart form, On this Smartform i have to show that attached image.
    So that image will contain Order Id and attached image.
    How this can be achieved.
    Regards,
    Abhishek

    Actually this Image(Image of Signature ) will be coming from Mobile device and then it will be stored as an attachment for an PM Order.
    So there will not be any manual interuption and therefore no one will be storing this in se78. But this image gets stored in local PC. And now i have to get this image on my Smartform.
    Any idea how to do it?
    Regards,
    Abhishek

  • How to show image dynamically in CFR

    Hi ,
    I am trying to build reports to print the image (jpg format)
    in the report builder (CFR). Getting the following error message:-
    The location of the image (jpg) is stored in the final answer
    table. In CFR, image type defined as BLOB.
    Report data binding error Unable to get value for field
    'Mysign' of class 'java.io.InputStream'.
    Any help/suggestion to resolve this problem will be
    appreciated.
    Thanks
    CF100 , New York

    I had this problem when using the report builder. I switched
    to using a .cfm and a cfdocument format= "pdf". Within the .cfm,
    I'm able to include dynamic images. I know this isn't a solution,
    but more of a way around...

  • Problem using weblogic6.1 to show image via JSP

              I am trying to load an image from database,we use Oracle8, the data type of the
              image field is Long Raw.
              The following code can work on Tomcat, that is it can show the image, but on weblogic
              it can not.
              <%@ page import="java.sql.*,javax.servlet.*,java.io.*" %>
              <%
              //Define the database connection: bedb
              %>
              <%
              response.setContentType("image/gif");
              ServletOutputStream ot = response.getOutputStream();
              BufferedOutputStream os = new BufferedOutputStream(ot);
              byte[] b = null;
              String m_Sql="select image from Image";
              ResultSet rsimage = bedb.executeQuery(m_Sql);
              if (rsimage.next())
              b=rsimage.getBytes(1);
              if(b!=null)
              os.write(b);
              os.flush();
              os.close();
              %>
              

    If you look at the generated code, you will see that there are newlines
              inserted before your image data. Your safest bet is to use servlet instead of
              JSP to generate binary data.
              nova <[email protected]> wrote:
              > I am trying to load an image from database,we use Oracle8, the data type of the
              > image field is Long Raw.
              > The following code can work on Tomcat, that is it can show the image, but on weblogic
              > it can not.
              > <%@ page import="java.sql.*,javax.servlet.*,java.io.*" %>
              > <%
              > //Define the database connection: bedb
              > ........
              > %>
              > <%
              > response.setContentType("image/gif");
              > ServletOutputStream ot = response.getOutputStream();
              > BufferedOutputStream os = new BufferedOutputStream(ot);
              > byte[] b = null;
              > String m_Sql="select image from Image";
              > ResultSet rsimage = bedb.executeQuery(m_Sql);
              > if (rsimage.next())
              > {
              > b=rsimage.getBytes(1);
              > }
              > if(b!=null)
              > {
              > os.write(b);
              > }
              > os.flush();
              > os.close();
              > %>
              Dimitri
              

  • How to embed image in jsp(j2ee application)

    Hi ,
    I have created a simple jsp application and deployed on portal.
    in the first jsp i need to show a jpeg image
    I am referencing the image wth a simple HTML SRC="image.jpg" tag
    image is placed in same folder as jsp.
    However this does not work. when i deploy on portal and access the jsp using following url
    http://hostname:port/applicationname/index.jsp
    the image is not shown..?
    What is the reason..?
    Please help.
    Thanks
    rocky

    Hi Rocky,
    Are you using the DC?
    if yes then you need to put the image inside the component folder. after that close the application
    & reopen. You will get the image.
    In case this does not work then try refreshing the portal through server side. Once the cache is cleared, it will be up to view.
    Also check the Activity list you have created. It should be added to the dtr properly or else it wont be reflected once reimported the configurations.
    Regards
    Chander Kararia

  • How to show image from within a symbol

    Howdy,
    EA, Win7
    I've imported an img on to my stage, converted it to a symbol (and unchecked autoplay).
    Then I deleted the img from the stage, the symbol w/img still remains in the Assets > Symbols section.
    What I want to do now is simply have the img (that's inside the symbol) appear when I click on a button/text.
    Is this possible? I've tried...
    sym.getSymbol("image").show();       where "image" is the name of the symbol
    but this doesn't work. What am I missing?
    Thanks for any help,
    R

    Thanks resdesign,
    Looked over the Edge API and it's kinda vague on how to interact with symbols. There's nothing that specifically says 'A symbol must have an instance on the main timelline in order to interact with it'. The API seems to make the assumption that that people automatically know that. Yet when I see something like the following from the Edge JSAPI...
    Access a symbol timeline from the main stage
    To access the timeline of a symbol from the main stage, use the following in your event:
    // Play the symbol timeline sym.getSymbol("symbolName").play();
    ...it makes me think that I can just call up the symbol on to the the main stage without having an instance of the symbol already on the stage/timeline.
    Would be curious to know where in the API it mentions that in order to interact with symbols they must have an instance on the main timeline/stage.
    Cheers,
    R

Maybe you are looking for