Display Videos retrieved from Database?

Hi all,
I am trying to display videos from my database, does anyone know how to do this? I would like to display the video on my jsp page. I have no problem retrieving it but how do i get it to have a player for example like embedding a video from Youtube. Any suggestions? Thanks!

Well it doesn't work as the video which you are retriving from the database is not in SWF / FLV or any shockwave supported format.
Well if i were given a similar situation i'd solve it by the below stratergy.
1).I'd Query my database and i'd get some metadata about the video like
(videoId interger(5) PK,videoName varchar(50) not null,isYouTubeVideo varchar(1) not null,youTubeVideoUrl varchar(200),videoMimeType varchar(40) not null)
2).On a basic grounds i'd apply a small display logic if the video is a youtube video( as youtube simply converts the videos into FLV format with a high compression ratio) or if the video's MIME type is video/x-flv (FLV's mime type) lets simply use youtube's standard embeding feature and render the JSP accordingly else use Media Player's embeding feature and render the JSP accordingly.
jsp code snippet
eg:*
<jsp:useBean id="videoBean" class="com.myapp.entity.VideoBean" scope="request"/>
<c:choose>
   <c:when test="${videoBean.YouTubeVideo == 'Y' || videoBean.videoMimeType == 'video/x-flv'}">    
          <object width="425" height="344">              
               <c:if test="${videoBean.videoMimeType == 'video/x-flv'}">
                    <param name="movie" value="fileServlet?fileId=${videoBean.videoId}"/>
                    <param name="allowFullScreen" value="true"/>
                    <embed src="/fileServlet?fileId=${videoBean.videoId}" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"/>
                </c:if> 
               <c:if test="${not empty videoBean.youTubeVideoUrl}">
                    <param name="movie" value="${videoBean.youTubeVideoUrl}"/>
                    <param name="allowFullScreen" value="true"/>
                    <embed src="${videoBean.youTubeVideoUrl}" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"/>
                </c:if> 
          </object>
   </c:when>
   <c:when test="${videoBean.videoMimeType == 'application/x-Shockwave-flash' || videoBean.videoMimeType == 'application/futuresplash'}">
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="425" height="344">
                <param name="quality" value="high"/>
                <embed src="/fileServlet?fileId=${videoBean.videoId}" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="425" height="344"/>
          </object>
   </c:when>
   <c:otherwise>
           <OBJECT ID="MediaPlayer" WIDTH="425" HEIGHT="344" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player.." TYPE="application/x-oleobject">
                  <PARAM name="FileName" value="${videoBean.videoName}"/>
                  <PARAM name="autostart" value="false"/>
                  <PARAM name="ShowControls" value="true"/>
                  <PARAM name="ShowStatusBar" value="false"/>
                  <PARAM name="ShowDisplay" value="false"/>
                 <EMBED TYPE="application/x-mplayer2" SRC="/fileServlet?fileId=${videoBean.videoId}" NAME="MediaPlayer" WIDTH="425" HEIGHT="344" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"/>
           </OBJECT>
    </c:otherwise>
</c:choose>
NOTE: I have taken an example of embeding media player as an alternative player in this example however as Balusc explains it is on you to choose an alternative player which can fit your client's requirement or the browsers which he uses.
Hope,that helps you out :)
REGARDS,
RaHuL

Similar Messages

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • Re: [Re: Keys retrieval from database]

    Hi Joseph,
    Thank you for your reply.I am using ODBC to connect Forte application with the database.And I went through the document, and tried all the possible ways, I could't succed in retrieval of whole data.I tried the sql execute procedure also.I will the error message
    after sometime.How does it related with escript?please clarify.
    Thank you,
    J.Babu
    [email protected] wrote:
    Hello Jendran,
    take a look at your 'Online-Help'. Search for 'DBDataType' (DBColumnDesc) and
    'GetDatabaseDesc' and look if your question is answered.
    See the 'Accessing Database Guide' Page 236 for a complete description of the
    call ('sql execute procedure' not 'sql execute Immediate procedure').
    Look wether you connect via ODBC or Direct to the database in your
    DBResourceMgr (Perhaps you have to look how this is specified in your
    environment in 'econsole'). If you have any more problems please copy
    the error-message in your email, to see what forte says to this error.
    Hope this helps
    Joseph Mirwald
    At 04:30 18.06.98, you wrote:
    Hi guys,
    Have any one used the method GetDatabaseDesc() of DbSession classto retrieve columns, primary keys and Foreign keys of a database? I
    couldn't retrieve any information except columns of MsSql server
    database.If possible give some information.
    I couldn't execute stored procedure from Forte, what could be theproblem? we tried with sql execute Immediate procedure.
    Thank you in advance,
    J.Babu
    Get free e-mail and a permanent address at http://www.netaddress.com/?N=1
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Babu,
    Note that though you will be able to get column information on
    most of the
    databases, some databases do not maintain or provide access to
    key
    information. For these databases, specifying DB_IN_KEYINFO and
    DB_IN_FOREIGNKEYINFO has no effect. Oracle, Ingres, and Informix
    do support key information. Check vendor documentation for
    other databases
    on specific platforms.
    As rightly mentioned by Joseph Mirwald, you might want to email
    a copy
    of the error message that you get.
    Good luck!
    Ajith Kallambella M.
    Forte Systems Engineer,
    Internationational Business Corporation.
    From: [email protected][SMTP:[email protected]]
    Reply To: [email protected]
    Sent: Thursday, June 18, 1998 12:30 AM
    To: [email protected]
    Cc: [email protected]; [email protected]
    Subject: Keys retrieval from database
    Hi guys,
    Have any one used the method GetDatabaseDesc() of DbSession
    class to retrieve columns, primary keys and Foreign keys of a
    database? I couldn't retrieve any information except columns of MsSql
    server database.If possible give some information.
    I couldn't execute stored procedure from Forte, what could be
    the problem? we tried with sql execute Immediate procedure.
    Thank you in advance,
    J.Babu
    Get free e-mail and a permanent address at
    http://www.netaddress.com/?N=1
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Date display except sunday from database

    <bean:write name="peter" property="tDate" >
                        Hi I am displaying the dates from database using above tag.
    Now the problem is I dont need to display the dates which are sundays
    so let me know how to do this
    thanxs in advance

    Hi.
    In the execute method of the PreloadPayVoucherAction class that is an Action subclass, I suppose that you should set the bean that contains the parameters you want to display in the jsp in the request scope. For example, you should have:
    request.setAttribute("userContainer", userContainer);
    This ensures that the userContainer object is set in the request scope and is accessible through all jsps throughout this request. After the execute method of the PreloadPayVoucherAction class exits, finally, the control is passed to the jsp page, where the request.getAttribute("userContainer.accountName") should work.
    Regards,
    Vasilis

  • Data Could not be retrieved from database...

    Hi All,
    I have a problem on Excel 2007 while refreshing (for pivot table) data from SQL Server view:
    "Data could not be retrieved from database. Check the database server or contact your database administrator. Make sure that external database is availiable, and then try the operation again"
    Excel file is distributed on about 20 workstations in network with the same Excel version, and problem occurs only on one station. I have checked credentials and connection between workstation and server and it seems to be ok.
    Any ideas?

    it is problem, because sql server is not member of domain... so I'm using sql aunthentication.
    strange thing is that from any other workstations (aldo in domain) it works fine when providing SQL user. I'm supposing that it is problem with some excel settings

  • How to display the data from database(MS access) to a textbox

    anyone know ?

    how to display the data from database(MS access) to a
    textboxThe reply hasn't changed over these years. Read the tuutorial on how to fetch the data. You can display it anywhere you feel like. :)
    http://java.sun.com/docs/books/tutorial/jdbc/

  • Playing a video file retrieved from database using JMF

    Hello!
    I am developing a multimedia application that has to store videos, music, pictures in a database. I did a little searching and found that JMF is a very good solution in playing video/music using Java. I found some examples to play the video/music stored on the hard drive (as separate files), but i have to be able to take the video/music from the database, and feed it to the JMF player. Has anyone some suggestions about how this could be done?
    Thanks in advance!
    Edited by: radu.miron on May 8, 2008 9:03 AM

    Well, i think i didn't make myself clear enough :). i know how to retreive the data from the database. The thing is this: let's suppose i have a 700 MB movie stored in the database. One option to play that movie would be to retrieve it from the DB, create a file somewhere on the disk, and put the data retrieved from the database in that file. But this involves that the disk will be overflooded when let's say 100 people watch 100 different movies. Another option (as i see it) would be to gradually take parts of the movie from the database (first 50 MB, then another 50 MB, then another and so on), and feed it to the JMF player. The user will watch the movie, but will not have the whole movie available, just a part of it. As he watches it, the application takes the next chunck of movie data and feeds it to the JMF player. That was the question i intended to ask, if anyone has any idea regarding the second option, and not the part with retrieving from the database, but the part with giving the JMF player video data to play.
    The example i found on the web with JMF player is the following:
    import javax.swing.*;*
    *import javax.media.*;
    import java.awt.*;*
    *import java.awt.event.*;
    import java.net.*;*
    *import java.io.*;
    public class PlayVideo extends JFrame {
         Player player;
         Component center;
         Component south;
         public PlayVideo() {
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JButton button = new JButton("Select File");
              ActionListener listener =
                   new ActionListener() {
                   public void actionPerformed(
                             ActionEvent event) {
                        JFileChooser chooser =
                             new JFileChooser(".");
                        int status =
                             chooser.showOpenDialog(PlayVideo.this);
                        if (status ==
                             JFileChooser.APPROVE_OPTION) {
                             File file = chooser.getSelectedFile();
                             try {
                                  load(file);
                             } catch (Exception e) {
                                  System.err.println("Try again: " + e);
              button.addActionListener(listener);
              getContentPane().add(button,
                        BorderLayout.NORTH);
              pack();
              show();
         public void load(final File file)
         throws Exception {
              URL url = file.toURL();
              final Container contentPane =
                   getContentPane();
              if (player != null) {
                   player.stop();
              player = Manager.createPlayer(url);
              ControllerListener listener =
                   new ControllerAdapter() {
                   public void realizeComplete(
                             RealizeCompleteEvent event) {
                        Component vc =
                             player.getVisualComponent();
                        if (vc != null) {
                             contentPane.add(vc,
                                       BorderLayout.CENTER);
                             center = vc;
                        } else {
                             if (center != null) {
                                  contentPane.remove(center);
                                  contentPane.validate();
                        Component cpc =
                             player.getControlPanelComponent();
                        if (cpc != null) {
                             contentPane.add(cpc,
                                       BorderLayout.SOUTH);
                             south = cpc;
                        } else {
                             if (south != null) {
                                  contentPane.remove(south);
                                  contentPane.validate();
                        pack();
                        setTitle(file.getName());
              player.addControllerListener(listener);
              player.start();
         public static void main(String args[]) {
              PlayVideo pv = new PlayVideo();
    }but this example plays a video stored on the disk ( player = Manager.createPlayer(url); ), rather than a chunck of data (the whole movie or parts of it) retrieved from the database.
    Sorry for the misunderstanding!
    Cheers!

  • Problem in displaying XML document from database

    Hi I am getting only record in printing xml file which takes from data base.
    Here is my programme.
    Document doc;
    ����public void processTable(Connection con, String tableName)
    ����{
    ��������try
    ��������{
    ������������this.iColumnCount=0;
    ������������HashMap hm = new HashMap();
    ������������//XML related Interfaces
    ������������DocumentBuilderFactory dbf;
    ������������DocumentBuilder db;
    ������������Element rootElement = null;
    Element colData = null;
    ������������Element relElement = null;
    �����
    ������������//Database relevent Interface
    ������������ResultSet rslt = null;
    ������������DatabaseMetaData dmd = null;
    ������������ResultSetMetaData rsmd= null;
    ������������//Initilize the Factory Classes
    ������������dbf = DocumentBuilderFactory.newInstance();
    ������������db = dbf.newDocumentBuilder();
    ������������doc = db.newDocument();
    ������������//Assign the root elements to document
    ������������rootElement = doc.createElement("entity");
    colData = getColMetaData(tableName);
    ������������rootElement.appendChild(colData);
    ������������doc.appendChild(rootElement);
    ������������TransformerFactory tFactory = TransformerFactory.newInstance();
    ����������������Transformer transformer = tFactory.newTransformer();
    ����������������transformer.transform(new DOMSource(doc),
    ��������������������new StreamResult(new FileOutputStream(tableName+".xml")));
    ��������} catch (Exception sqle)
    ��������{
    ����������������e.printStackTrace();
    ��������}
    ����}
    ����/**
    �����* Method getColMetaData.
    �����* @param tableName
    �����* @return Element
    �����*/
    ����private Element getColMetaData(String tableName)
    ����{
    ��������try{
    ������������ResultSet rslt = null;
    ������������ResultSetMetaData rsmd = null;
    ������������DataTypeMap dtp = new DataTypeMap();
    ������������HashMap hm = new HashMap();
    ������������hm = dtp.DataTypes();
    ������������Connection con = db.createConnection();
    ������������Statement stmt = con.createStatement();
    ������������String sQuery = "select * from " +tableName;
    ������������rslt = stmt.executeQuery(sQuery);
    ������������rsmd = rslt.getMetaData();
    ������������Element rooElement = null;
    ������������//Element currentElement =null;
    ������������iColumnCount = rsmd.getColumnCount();
    ����������������Element currentElement = null;//doc.createElement("field");
    // rootElement = doc.createElement("column");
    ����������������for (int i = 1; i <= iColumnCount; i++)
    ��������������������{
    currentElement = doc.createElement("field");
    ������������������������currentElement.setAttribute("DBFieldName",rsmd.getColumnName(i));
    ������������������������currentElement.setAttribute("FieldName",rsmd.getColumnLabel(i));
    ������������������������
    ��������������������}
    ��������������return currentElement;
    ��������catch(Exception ee){
    ������������logger.info(ee.getMessage());
    ��������}
    ��������return null;
    ����}
    Here 'return currentElement;' return the collection of elements.But when I print
    document it is giving only last element.I am not getting how only one record is printing even it has more records
    please help me in this regards.
    here the out put:
    <?xml version="1.0" encoding="UTF-8"?>
    <entity>
    ��<field DBFieldName="X_TYPE" FieldName="X_TYPE"/>
    </entity>
    -krish
    [email protected]

    Problem in displaying the XML Data from database
    Hi I have requirement of generating the XML from database.I could able to acheive partially.
    I am giving the problem below.
    public void processTable()
    Element rootElement = doc.createElement("entity");
    Element colData= getColMetaData(tableName);
    rootElement.appendChild(colData);
    doc.appendChild(rootElement);
    //print the document
    /*getColData method as follows*/
    private Element getColMetaData(String tableName)
    try{
    ResultSet rslt = null;
    ResultSetMetaData rsmd = null
    Connection con = db.createConnection();
    Statement stmt = con.createStatement();
    String sQuery = "select * from " +tableName;
    rslt = stmt.executeQuery(sQuery);
    rsmd = rslt.getMetaData();
    iColumnCount = rsmd.getColumnCount();
    Element currentElement = doc.createElement("field");
    for (int i = 1; i <= iColumnCount; i++)
    currentElement.setAttribute("FieldName",rsmd.getColumnName(i));
    currentElement.setAttribute("Position", parseString(i));
    rootElement.appendChild(currentElement);
    return currentElement;
    catch(Exception ee){
    logger.info(ee.getMessage());
    return null;
    /* End of Method*/
    Here when I printing the document it is giving out put like :
    <entity >
    <field FieldName="X_ID" Position="1"/>
    </entity>
    The is displaying only one field information even though table contains more then one column.If we maintain all the aboue code in single method it is working fine.I want to decouple the like above.Bcz I may have more then one set of elements like this.
    Please help in this regards,
    -Krish
    [email protected]

  • Mark an object in real time on a displayed video acquired from an USB camera

    Hello,
    I am a beginner LabView user undertaking a project in which I need to show video acquired from an USB camera in LabView on computer screen. In the video, there will be a metal part, which is always be at a fixed position at the bottom left of the view. I need to mark an arrow alike sign on the metal part, please take a look at the attached picture. To recognize the metal part easier, in the picture, I drew a blue line at the boundary of the part, whilst the arrow was green. The arrow must be radially pointed to the center of the blue line (but, the blue line may not need to be created) and must be there every time I start the VI, throughout the video.
    How should I do to display the video? Is there any way to create the arrow in LabView (either by programming or manually drawing the arrow)? If making the arrow is impossible, is there any way to just mark a cross at the center of the blue line? The blue line does not need to be marked on the video.
    I have LabView 2010 with Vision Development Module. My camera can be found under NI IMAQdx devices in Measurement and Automation Explorer.
    Thanks,
    LePhuong
    Solved!
    Go to Solution.
    Attachments:
    A fixed arrow mark on the metal part.jpg ‏26 KB

    Hi,
    Look at this post. It may help you. http://forums.ni.com/t5/Machine-Vision/pattern-matching-program/m-p/1914589#M34855. In here its video signal you can replace this with the live video.
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

  • Can i display all images from databases with adf jsp

    hi
    I want to display all images from the databases whit adf bussines components, because with the sample on http://www.oracle.com/technology/training/products/intermedia/index.html page, i only can display 10 images. i'd lije to know if i can to search in the databases by the id of the image.
    this is the code:
    %@ taglib uri="http://xmlns.oracle.com/adf/ui/jsp/adftags" prefix="adf"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <html:errors/>
    <table border="1" width="100%">
    <tr>
    <th> </th>
    <th>
    <c:out value="${bindings.ImagenView1.labels['Id']}"/>
    </th>
    <th>
    <c:out value="${bindings.ImagenView1.labels['Descripcion']}"/>
    </th>
    <th>
    <c:out value="${bindings.ImagenView1.labels['Image']}"/>
    </th>
    </tr>
    <c:forEach var="Row" items="${bindings.ImagenView1.rangeSet}">
    <tr>
    <td>
    <c:out value="${Row.currencyString}"/>
    </td>
    <td>
    <c:out value="${Row['Id']}"/> 
    </td>
    <td>
    <adf:render model="Row.Image"/>
    </td>
    <td>
    <c:out value="${Row['Image']}"/> 
    </td>
    </tr>
    </c:forEach>
    </table>
    </body>
    </html>

    I think you want the interMedia JSP tag library...
    http://www.oracle.com/technology/software/products/intermedia/htdocs/descriptions/tag_library.html
    Larry

  • Problem with displaying the data from Database on swf file.

    Hi ,
      I am new to flash.Thanks in Advance Please help me....
    Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next  when we click on the button for the second time(or anytime) it is not going  and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
    my Code looks like this:
    submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
    function onCheck2(evnt:MouseEvent):void {
    var xmlLoader:URLLoader = new URLLoader();
        var xmlurl:String = "http://localhost:8888/xmlServlet";
        var xmlrequest:URLRequest = new URLRequest(xmlurl);
    xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);
    xmlLoader.load(xmlrequest);
    function xmlcompleteHandler(event:Event):void {
        var loader:URLLoader = URLLoader(event.target);
        var succData:String=loader.data;
            var xmlData:XML = new XML();
            var xmlList:XMLList;
            xmlData = XML(loader.data);
            xmlList = xmlData.children();
            for (var i=0; i<xmlList.length(); i++) {
                for (var n=0; n<xmlData.UserHumanap[i].HumanapDot.length(); n++) {
                        var x_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@x;
                        var y_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@y;
                        var point2:Point = new Point(x_coordinate,y_coordinate);
                        var circle:Sprite = new Sprite();
                        circle.graphics.beginFill(0x00ff00);
                        circle.graphics.drawCircle(point2.x,point2.y,3);   //Placing the data as dots on the swf file
    Thanks in Advance.......Please Help me..........
    its Urgent..........
    Thanks,
    Swarthi

    Checkout following line in your code
    var xmlurl:String = "http://localhost:8888/xmlServlet";
    now change it to
    var xmlurl:String = "http://localhost:8888/xmlServlet?random="+String(MAth.random());
    I think you will get the point now

  • Displaying carriage returns from database query

    hi i'm fairly new to colfusion but have a good basic
    understanding.
    i'm trying to build a community website that has a guestbook
    and forums. i want to build these from scratch.
    i'm using cfmx7 and sqlserver 2005.
    the problem i'm having is when my cfm page retrieves posts
    made to the guestbook or forum, the carriage return characters are
    missing. posts are coming out all on one line.
    how do i get the retrieved posts to display new lines and
    paragraphs the way they were input into the database?
    just like these forums do?
    thanx so much. adella.

    Here is the code. Just replace body with your db field name.
    <cfoutput>
    #Replace(body, newLine, "<br>", "ALL")#
    </cfoutput>

  • Type in value and retrieve from database

    Hi,
    I have a database of clients and to keep it up to date, we will be sending out an email asking them to confirm if they're details are correct and up to date.
    In that email will be a link to a webpage where they can confirm their details are up to date. They will have to type in their email address which will then retrieve their information to update or confirm they are correct.
    I have no trouble updating. I usually list the data and then click on the one that needs updating.
    I'm having trouble retrieving the information after the user has typed in their email address.
    Here is my code so far - at the moment I have listed the data in a table with an "update" link next to each row that allows me to update.
    Where would I put the text field where the user can type in their email? I've tried different ways but was unsuccessful.
    Hope you can help
    Thanks
    <%
    strSQL = "SELECT * FROM emails"
    rsEmail.Open strSQL, conn
    %>
    <html>
    <head><title>All</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="layout.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="wrapper">
      <p>  </p>
      <div id="view">
      <div class="insert"><a href="insertform.html">Insert</a></div>
      </div>
      <table width="1100" cellpadding="5">
        <tr>
          <td width="53">ID</td>
          <td width="300">firstname</td>
          <td width="378">lastname</td>
          <td width="121">email</td>
          <td width="92">Update</td>
          <td width="92">Delete</td>
        </tr>
      </table>
      <table width="1100" cellpadding="5">
        <%
       Do While not rsEmail.EOF
    %>
        <tr><td width="53"><% Response.Write rsEmail("id") %></td>
          <td width="294"><% Response.Write rsEmail("firstname") %></td>
          <td width="374"><% Response.Write rsEmail("lastname") %></td>
          <td width="119"><% Response.Write rsEmail("email") %></td>
          <td width="91"><%  Response.Write ("<a href=""update_form.asp?ID=" & rsEmail("ID") & """>")%>Update<%Response.Write ("</a>") %></td>
        </tr>
        <%
    rsEmail.MoveNext
    Loop
    'Reset server objects
    rsEmail.Close
    Set rsEmail = Nothing
    Set conn = Nothing
    %>
      </table>
    </div>
    </body>
    </html>

    This 'tutorial' is flawed and needs work. Use with care.
    1 - Upload the file correctly. This is NOT an example of how to upload a file from a web page. You need method="post" and enctype="multipart/form-data". Then in the servlet doing the file retrieval you need to get the input stream from the request. Using a library like the jakarta commons File Upload is recommended.
    2 - Database connection should not be done in a JSP. 'nuff said.
    3 - In fact scriptlet code in a JSP is a bad approach in general. avoid.
    4 - A better approach would be to use an ImageServlet as exampled, and just have img tag reference that servlet directly.
    While I applaud the intentions behind wanting to share the code, the code shows several basic design flaws. I think it is a better example of what NOT to do rather than the intended how-to.
    Thats my 2 cents.
    evnafets

  • How to convert an output retrieved from database to an excel sheet?

    Hello friends,
    I am preparing an online JSP based project for our training and placement department.
    In this context, I am showing an output into a JTable format to the user for the shortlisted candidates by retrieving this information from my database (MySQL).
    Now I need to convert this output into the Excel Sheet so that I can perform various operations over there.
    So, what are the things required to perform from my side for implementing the same.

    The easiest thing for you to do would be to save it as CSV (Comma Separated Values). In general, your fields would be separated by commas, and any fields that are not numbers would be surrounded with double quotes:
    1,"text",...
    Dates and times are semi-tricky, but excel is pretty good about accepting "YYYY/MM/DD" and "HH:MI AM" format.
    Other than that, you'll be learning the internal structures of Excel or perhaps there is a third-party library that can do this for you...

  • How to display an image from database

    Hi all,
    I've saved an image(jpeg file) as BLOB item in the database through the forms.I need to fetch that particular image from the database and display the image in the report.How can i do that?
    I tried to fetch the column from the database and added a text item and selected the PHOTO column , the properties has changed once i selected the BLOB item.File format I changed to Image , But the width is 4 and I'm not able to change that.
    While executing I'm getting two errors,
    REP : 0069 Internal Error
    REP : 62203 Internal Error reading the image - Unable to render RenderedOp for this operation
    Please help me to solve this issue.
    Thanks in advance...

    Hello,
    Try to revert to the "old" way to render images :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/envvars/envvar_reports_default_display.htm
    To revert to the dependency on DISPLAY and use screen fonts (old font look up algorithm):
    Set REPORTS_DEFAULT_DISPLAY=NO.
    Remove the screenprinter.ppd entry in the uiscreenprint.txt file.
    Set the DISPLAY variable to the active X-Windows display surface.
    Regards

Maybe you are looking for

  • Why do some black-and-white photos disappear in Mac Preview and Safari?

    I sent a PDF to a colleague recently only to discover that he uses Mac Preview to view PDFs and not Adobe Reader. The unfortunate part is that, although full-color photos all appeared, small black-and-whites were inconsistent: some appeared and other

  • Entity Serivice with Reference and UI patterns

    Hello I have question. How can I configure Object Editor in order to have New button on Refence tab of Object Editor? I have two Entity services. Company and Contacts. BO Contacts is an attribute of BO Company with Relation Type  Association and Card

  • Monitor mysql server in jsp

    i am writing an application that transfers data toa remote mysql server. I want to implement a checking routine which willl check if the the remote server is working or not. If working, then only will the data be sent, else the user will be alerted.

  • Exporting Tables from BSP to Class Methods

    Afternoon Everybody, in true SAP OSS Message style I post this question on it's own thread to enable maximum value from the reward points. Question: I have a BSP, in an event in my BSP I call a method in my class. I have mastered Exporting parameters

  • Find out Account Group for already created customer

    Hi, How do i find out Account Group for already created customer? Is there any Tcode to find that? Thanks in advance. Swetha