Closing jsp page

hi infocrats,
my problem statement:
i m using a page say A.jsp, which is home page, and it is posted to B.jsp, which is used for validation, and it may redirect to A.jsp if value entered does not meet the condition.
now at the time of redirection i get the error message:
IllegalStateException
on line of redirection
plzzzzzzzz help its urgent.

Whenever you forward/redirect make sure you return control at that point.
Otherwise it will continue execution of the page, and possibly send more data back to the page - which creates the IllegalStateException
ie something like this
if (pageHasError){
RequestDispatcher.forward("/errorPage");
// must return here, otherwise execution of this page would continue
return;
// continue as we are ok
// If the page had an error and we didn't return above, this
// line of code would create an error as we try to execute it when we have
// already forwarded to another resource to do the response.
RequestDispatcher.forward("successPage");

Similar Messages

  • In JSP pages request.getParameter returns null

    There are two jsp's,the first JSP has 1 textbox inside the form tag.We input the values in the textbox and submit.
    Code :Ist jsp
    <BODY>
    <HEAD>
    function validate()
    document.add.submit();
    </HEAD>
    <FORM name="add" method="post" action=/dir/two.jsp" >
    <TABLE width="37%" border="0" align="center" class="c4f3">
    <TR>
    <TD class="c4">Rating</TD>
    <TD><input type=text name="rating"></TD?
    </TR>
    <TR>
    <TD align=center><INPUT type="button" name="submitadd" value="Submit" onClick="validate()" </TD>
    </TR>
    </TABLE>
    </FORM>
    </BODY>
    After the submit it goes to the 2nd JSP page .
    code:2nd Jsp
    <%
    String Rating=request.getParameter("rating");
    out.println(" Rating "+Rating);
    %>
    The 2nd JSP pages gets the values by request.getParameter.When I use method='post' in Ist JSP ,even if I enter values in the textbox, it prints null. But when I give method="get" , it prints the value.
    Pls let me know if there is any problem in the code or its the problem due to webserver configuration.Also suggest the solution to over come this problem.
    Thanks

    If I'am right you have misplaced the opening body-tag of your first jsp-page.
    The opening body-tag should follow after the closing head tag .
    The structure of your HTML-code should look like this:
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>

  • Urgent: SAX parser bean is not working in JSP page

    Hi All,
    I have created a bean "ReadAtts" and included into a jsp file using
    "useBean", It is not working. I tried all possibilities. But Failed Plz Help me.
    Below are the details:
    Java Bean: ReadAtts.java
    package sax;
    import java.io.*;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import java.util.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.ParserConfigurationException;
    public class ReadAtts extends DefaultHandler implements java.io.Serializable
         private Vector attNames = new Vector(); //Stores all the att names from the XML
         private Vector attValues = new Vector();
         private Vector att = new Vector();
         private Locator locator;
         private static String start="",end="",QueryString="",QString1="",QString2="";
    private static boolean start_collecting=false;
         public ReadAtts()
         public Vector parse(String filename,String xpath) throws Exception
    QueryString=xpath;
         StringTokenizer QueryString_ST = new StringTokenizer(QueryString,"/");
         int stLen = QueryString_ST.countTokens();
         while(QueryString_ST.hasMoreTokens())
              if((QueryString_ST.countTokens())>1)
              QString1 = QueryString_ST.nextToken();
    else if((QueryString_ST.countTokens())>0)
                   QString2 = QueryString_ST.nextToken();
         SAXParserFactory spf =
    SAXParserFactory.newInstance();
    spf.setValidating(false);
    SAXParser saxParser = spf.newSAXParser();
    // create an XML reader
    XMLReader reader = saxParser.getXMLReader();
    FileReader file = new FileReader(filename);
    // set handler
    reader.setContentHandler(this);
    // call parse on an input source
    reader.parse(new InputSource(file));
         att.add("This is now added");
         //return attNames;
    return att;
    public void setDocumentLocator(Locator locator)
    this.locator = locator;
    public void startDocument() {   }
    public void endDocument() {  }
    public void startPrefixMapping(String prefix, String uri) { }
    public void endPrefixMapping(String prefix) {  }
    /** The opening tag of an element. */
    public void startElement(String namespaceURI, String localName,String qName, Attributes atts)
    start=localName;
    if(start.equals(QString2))
    start_collecting=true; //start collecting nodes
    if(start_collecting)
    if((atts.getLength())>0)
    for(int i=0;i<=(atts.getLength()-1);i++)
    attNames.add((String)atts.getLocalName(i));
    attValues.add((String)atts.getValue(i));
    /** The closing tag of an element. */
    public void endElement(String namespaceURI, String localName, String qName)
    end = localName;
    if(end.equals(QString2))
         start_collecting=false; //stop colelcting nodes
    /** Character data. */
    public void characters(char[] ch, int start, int length) { }
    /** Ignorable whitespace character data. */
    public void ignorableWhitespace(char[] ch, int start, int length){ }
    /** Processing Instruction */
    public void processingInstruction(String target, String data) { }
    /** A skipped entity. */
    public void skippedEntity(String name) { }
    public static void main(String[] args)
    String fname=args[0];
    String Xpath=args[1];
    System.out.println("\n from main() "+(new ReadAtts().parse(fname,Xpath)));
    //System.out.println("\n from main() "+new ReadAtts().attNames());
    //System.out.println("\n from main() "+new ReadAtts().attValues());
    JSP File:
    <%@ page import="sax.*,java.io.*,java.util.*,java.lang.*,java.text.*;" %>
    <jsp:useBean id="p" class="sax.ReadAtts"/>
    Data after Parsing is.....
    <%=p.parse"E:/Log.xml","/acq/service/metrics/system/stackUsage")%>
    Expected Output:
    The jsp file should print all the vector objects from the "ReadAtts" bean
    Actual Output:
    Data after Parsing.......[]
    Thanks for your time.....
    Newton
    Bangalore. INDIA

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • How to use one ResultSet many times in a jsp page ?

    Hi all,
    I have .jsp page and I have used it to get data from DB and display them to users. So I have to get data from DB in number of places in this particular jsp.
    I thought that it is better to have one ResultSet for entire page and once it is done its job, the ResultSet will be closed and I can use it again and again like this.
    Resultset rs = new ResultSet();
    try{
        //My operations
    }catch(Exception ex){
       //Handle Exceptions
    }finally{
       rs.close();
    }After above code snippet I can use same ResultSet again below the page.
    I just want to know this,
    1. is this a good coding practice?
    2. Should i put rs = null; within finally clause?
    any help will be appreciated
    thank in advance,
    Dilan.

    Ok, Finally I switched my coding to use DAO and DTO, and I learned it through internet.
    I removed all of data access codes from my jsp file(lets say 'functions.jsp'). I then created one interface and two clasess.
    here is my DAO interface.
    public interface UserFunctionsDAO{
        public List<UserFunctionsDTO> selectUserList();
    }here is DTO class
    public class UserFunctionsDTO{
        private String category = "";
        private String sub_category = "";
        private int cat_id = 0;
        private int sub_cat_id = 0;
        public UserFunctionsDTO(){}
        public UserFunctionsDTO(String category, String sub_category, int cat_id, int sub_cat_id){
            this.category = category;
            this.sub_category = sub_category;
            this.cat_id = cat_id;
            this.sub_cat_id = sub_cat_id;
        //Setters and getters will go here.
    }my concrete data access class is like this.
    public class UserFunctionsDataAccess implements UserFunctionsDAO{
        MyDB dbObject = null;
       private static final String SQL_GET_DISTINCT_CAT= "SELECT DISTINCT cat FROM cat_table";
       public List<UserFunctionsDTO> selectUserList(){
           dbObject = new MyDB();
           dbObject.sqlSelect(SQL_GET_DISTINCT_CAT);
           ResultSet rs = dbObject.getResultSet();
           ArrayList list = new ArrayList();
           while(rs.next()){
               list.add(new UserFunctionsDTO(rs.getString('category'), .......................));
           return list;     
    }I think now im following good coding practices, but I have one problem.
    1. How do I retrieve this userlist from my jsp page?
    2. Should I include UserFunctionsDTO in my jsp page as a bean?
    3. If I include it, how can I get the list from it?
    thanks in advance,
    Dilan.

  • Error when deploy a jsp page which includes customizable component

    Hi all,
    I add a customizable component to my jsp page. It works fine on local but when I deploy it and run the deployment I get the error below:
    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/islistesi/DevamEdenIsler.jspx
    Exception:
    java.lang.IllegalStateException: ClassLoader "islistesi.web.islistesi:0.0.0" (from <web-module> in /oc4j/webcenter/j2ee/home/applications/islistesi/islistesi/): This loader has been closed and should not be in use.
    anyone who has an idea?
    thanks a lot in advance

    Did you define a web.xml and application.xml file for the deployment of your application?
    Are you using deployment profiles to configure your application on a standalone OC4J?

  • Java File and JSP Page

    I am to create a link verification program -- a simple java file with the database connection & some business logic and a JSP page that instantiates the my java file. It won't work. Everytime I run the jsp page, it gives me java.lang.NullPointerException. Can anyone give me some directions? The web server I am using is JRun.
    Thank you
    Below are my code:
    JSP Page:
    <%--      Verify Links
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.sql.*" %>
    <%@ page import="java.net.*" %>
    <%@ page import="pro.*" %>
    <html>
    <head>
    <title>Results</title>
    </head>
    <body>
    <%
    try{
    LinkConnection newconn = new LinkConnection();
    newconn.initialize();
    newconn.query();
    newconn.close();
    }catch (ClassNotFoundException cnfe)
    out.println(cnfe);
    catch (SQLException sqle)
    out.println(sqle);
    catch (NullPointerException npe)
    out.println(npe);
    %>
    </body>
    </html>
    Java Code:
    package pro;
    import java.io.*;
    import java.sql.*;
    import java.net.*;
    public class LinkConnection {
    Connection con;
    ResultSet RS;
    Statement Stmt;
    public void initialize() throws SQLException, ClassNotFoundException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("XXXX", "XXXX", "XXXX");
    public void query() throws SQLException
    Statement Stmt=con.createStatement();
    String strSQL="Select guideline_name, guideline_url from pgt_guidelines";
    ResultSet RS=Stmt.executeQuery(strSQL);
    while (RS.next())
    String guidelinename = RS.getString("guideline_name");
    String guidelineurl = ("http://" + RS.getString("guideline_url"));
    try {
    URL url = new URL(guidelineurl);
    HttpURLConnection link=(HttpURLConnection)url.openConnection();
    System.out.println("<font color='blue'>");
    System.out.println(guidelinename);
    System.out.println("<br>");
    System.out.println(guidelineurl);
    System.out.println("</font>");
    System.out.println("<font color='red'>");
    System.out.println(link.getResponseCode());
    System.out.println("</font>");
    System.out.println("<br />");
              }catch (Exception e)
              {System.out.println("<font color='yellow'>Error Link </font>")
    public void close() throws SQLException {     
    RS.close();
    Stmt.close();
    con.close();

    i'm having the same problem, what is the solution to this
    A Servlet Exception Has Occurred
    java.lang.NullPointerException
         at test.Lesson.runSql(Lesson.java:80)
    ===== Lesson.java file =====
    package test;
    import java.sql.* ;
    import java.io.Serializable;
    public class Lesson {
         public Lesson( ) { }
    //Line 9
         public String runSql ( ) {
              String browserOutput = "";
              Connection sqlca = null;
              Statement sqlStatement = null;
              ResultSet myResultSet = null;
    //Line 16
              /* Connect to database, run SQL and produce output */
              try { 
                   /* Connection to the database */
                   Class.forName("org.gjt.mm.mysql.Driver").newInstance();
                   String theDatabase ="jdbc:mysql://localhost/employee";
                   sqlca = DriverManager.getConnection(theDatabase,"usr","pwd");
    //Line 24
                   /* Construct and execute the sql, positioning before the
                   first row in the result set */
                   sqlStatement = sqlca.createStatement();
                   myResultSet = sqlStatement.executeQuery
    //Line 29
                   ("select emp_id, " +
                        "emp_lname, " +
                        "city, " +
                        "state," +
                        "zip_code, " +
                        "emp_fname " +
                        "from employee " +
                        "where emp_id < 250 " +
                        "order by emp_lname, emp_fname");
    //Line 39
                   /* Construct the heading for the table */
                   browserOutput =
                        "<div align=left>"+
                        "<table border=0 align=left width=520>" +
                        "<caption><i><b>" +
                        "Employee Listing</b></i></caption>" ;
    //Line 46
                   /* Construct the column headings for the table */
                   browserOutput +=
                        "<th align=left>Emp_id</th>" +
                        "<th>First Name</th>" +
                        "<th>Last Name</th>" +
                        "<th>City</th>" +
                        "<th>State</th>" +
                        "<th>Zip</th>" ;
    //Line 55
                   /* Move to next row and & its contents to the html output */
                   while(myResultSet.next()) {
                        browserOutput += "<TR><TD>" +
                   myResultSet.getObject("emp_id").toString() + "</TD><TD>" +
                   myResultSet.getObject("emp_fname").toString()+"</TD><TD>" +
                   myResultSet.getObject("emp_lname").toString() + "</TD><TD>" +
                   myResultSet.getObject("city").toString() + "</TD><TD>" +
                   myResultSet.getObject("state").toString() + "</TD><TD>" +
                   myResultSet.getObject("zip_code").toString() + "</TD></TR>" ;
    //Line 66
                   }//end of while
                   sqlStatement.close();
                   sqlca.close();
              }//end of try
              catch (SQLException e) {
    //Line 72
                   browserOutput = " Error: SQLException: " + e.getMessage();
                   browserOutput= " Error: SQLState: " + e.getSQLState();
                   browserOutput= " VendorError: " + e.getErrorCode();
              }//end of SQLException
              catch (Exception e) {
                   browserOutput = " Error: JDBC Class creation: " + e.getMessage();
              }//end of Exception
    /**Line 80**/     finally {
                   try { sqlca.close(); }
                   catch(SQLException e) {
                   browserOutput = " Error: Closing connection: " + e.getMessage();
              }//end of finally
         /* Complete the html and return it to the Java Server Page */
         browserOutput += "</table>" + "</div>" ;
         return browserOutput;
         } //end of runSql
    }//end of Lesson

  • Using JavaBeans in a JSP Page

    I wan't to know the advantages and disadvantages of using JavaBeans in a JSP page.
    Like for example general traditional approach for a database connection
    is to create a connection and access the database from that and close the connection
    at the end of the page, instead of the If I use a common connection bean for making connections,
    is that suggestable and then when should i close the connection then.
    One good application of JavaBeans is using a Set and Get methods for form fields in
    a registration form to get back the values.
    So may i know how best can we use the JavaBeans other than this application.
    ThanX in advance,
    kiran
    [email protected]

    I believe putting processing and query code in the JavaBean was one of the reasons for putting JavaBeans support in JSP in the first place. The original idea was to use the setXXX methods to populate the bean's data from the posted form, then do the processing (or database query), then use the getXXX methods to display the bean's data.
    Efficiency-wise, it's exactly the same as putting all the code in-line in the JSP page (actually, it might be a bit slower, because of the reflection required to do it.) Code-wise though, it makes the JSP easier to read.
    Of course, we have EJBs now too, which tie very closely and can match database queries almost one-to-one, one way to incorporate these is inside the JavaBean you reference from the JSP, another way from a servlet you redirect the JSP to, etc...

  • Uploading a photo in a jsp page

    hi Friends,
    i have 4 fields
    Date <takes system date>
    Description<description of the photo>
    Path< has a text box > Upload <is a button>
    I want to upload photos on click event of a button and the the path of where my photo is located , that shud be entered in the path text box
    and then I have a button Save
    when i click on 'Save ' , it shud save the link in database as well as show the uploaded photo in apge called 'Photos.jsp"
    basically my query is how i upload photo thru jsp ?
    thnx in advance

    Here is the solution to your problem dear.
    just set the attribute of form ENCTYPE="multipart/form-data" and call this servlet from your jsp page
    //=============================This Servlet stores image
    import myConPack.Connect; //my own class to connect to db
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class UploadIntoDB extends HttpServlet {
    public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
         PrintWriter out=response.getWriter();
         String contentType = request.getContentType();
    //IF FORM HAS PICTURE ALSO THEN IF CONDITION WILL EXECUTED FOR WRITING IMAGE INTO DB
         if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
         DataInputStream in = new DataInputStream(request.getInputStream());
         int formDataLength = request.getContentLength();
         byte dataBytes[] = new byte[formDataLength];
         int byteRead = 0;
         int totalBytesRead = 0;
         while (totalBytesRead < formDataLength)
         byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
         totalBytesRead += byteRead;
         String file = new String(dataBytes);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
              saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
         saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
         int lastIndex = contentType.lastIndexOf("=");
         String boundary = contentType.substring(lastIndex + 1,contentType.length());
         int pos;
              pos = file.indexOf("filename=\"");
              pos = file.indexOf("\n", pos) + 1;
              pos = file.indexOf("\n", pos) + 1;
              pos = file.indexOf("\n", pos) + 1;     
         int boundaryLocation = file.indexOf(boundary, pos) - 4;     
         int startPos = ((file.substring(0, pos)).getBytes()).length;
         int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
         ByteArrayInputStream bais=new ByteArrayInputStream(dataBytes,startPos,(endPos-startPos));
         //========================================
         if((bais.available())>0)
         try{
              Connect connect=new Connect();
              Connection con=connect.getConnection();
              String SqlQuery="insert into tbl values(?,?)";          PreparedStatement pst=con.prepareStatement(SqlQuery);
              pst.setString(1,saveFile);//filename of image
              pst.setBinaryStream(2,bais,bais.available());//image itself
              int result=pst.executeUpdate();
              System.out.println(result+ "Row Added");
         }catch(Exception e) { System.out.println("Exception : "+e); }
         RequestDispatcher rd=request.getRequestDispatcher("/backto.jsp");
         if(rd!=null)
              rd.forward(request,response);
         else
    out.println("NO IMAGE WAS Found ");
         }//if closed
    }//function closed
    }//class closed

  • Problem in Reloading JSP Page

    I am having list of users in parent window(1st JSP Page), user selects one user and presses edit button, the details of the selected user is populated in the pop-up window (using java script), now user modifies the details and presses the save button and i am fwd to parent window(child window is closed), now the details are saving in the database but the parent page is not displaying the updated user details. i am using struts to pass data from jsp to db. Even i used System.out.println statement in the user display loop(parent jsp page), the updated details is printing, but it is not shown in the web page.
    Sabarish R L

    Hi,
    This is because ur page is not refreshed.
    After updating database when u coming back to ActionClass, you can invoke mapping which refreshed ur JSP (means call a mapping which invoke ur JSP again but remember do not hit the database again it will reduce programe efficiency).

  • Best Practive to resturn Resultset to a JSP page

    I'm writing a class to return a resultSet to use in a JSP page or at least i think thats what i want to do. Whats the best practice to return that resultset.....As the class is written below, when i try to iterate through the resultset in the jsp page i get a NullPointerException which i understand because i closed the connection before returning....If i take out all the code in the finally section i can iterate through the data no problem....but thats not good to leave connections open.......instead of returning a resultset should i return some other type such as an Array with all the data. How should i return the data?
    ======================================================================
    package foo;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    public class DBTest{
    String foo = "Not Connected";
    String bar = "Not";
    public ResultSet getUser(){
    Connection conn = null;
    Statement stmt = null; //Or preparedStatement if needed
    ResultSet rs = null;
    try{
    Context ctx = new InitialContext();
    if(ctx == null)
    throw new Exception("Boom - No Context");
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/Show");
    if(ds != null){
    conn = ds.getConnection();
    if(conn != null){
    foo = "Got Connection " + conn.toString();
    stmt = conn.createStatement();
    rs = stmt.executeQuery("SELECT * FROM user");
    if(rs.next()){
    foo=rs.getString("login");
    bar=rs.getString("password");
    }catch(Exception e){
    e.printStackTrace();
    }finally{
    // Always make sure result sets and statements are closed,
    // and the connection is returned to the pool.
    if(rs != null){
    try{
    rs.close();
    }catch(SQLException e){;}
    rs=null;
    if(stmt != null){
    try{stmt.close();}catch(SQLException e){;}
    stmt=null;
    if(conn != null){
    try{conn.close();}catch(SQLException e){;}
    conn=null;
    return rs;
    public String getFoo(){return foo;}
    public String getBar(){return bar;}

    Yes, when you close your connection all data in your result set is lost, and yes its not a good idea to keep connections open. Its also not a good idea to pass results around. What you should do is store the data in some type of collection object and pass that to your jsp.
    for exmaple if you select data from a table that stores names of people, e.g. two columns first_name and last_name, then create a class called People with two private string members to hold the first and last names. loop through your result set and build a People object for each row of data. when your done close the result set (and the connection if you want). store all your People objects is a collection (vector, array, whatever). pass the vector to your jsp for display.
    -S-

  • Embeding audio player in jsp page.

    Hello All,
    I have embed the quickTime player in a jsp page. Following is my code snippet of the object embedding.
    When I run the project my programme download and save the amr file from my database in the specified project location("../image/"+recordId +".amr"), but not run the amr file. Only logo of the player is displayed. Next Time when i run the project again, the amr file run smoothly. Probabely the problem is, when the programme run first time it could not find the required amr file location.
    My requirement is, after click a button, it will download the amr file in specific location and then read the file from that path. The file download successfully before embedding the object, but do not run the file.
    Also, the programme could not run the amr file from other than the project location. I am new in developing the jsp page, where amr file have to be play directly from the page. How can i solve the problem?
    any idea, please help.
    Code snippet:
    <% String recordId = request.getParameter("pId");
    String path=null;
    path="../image/"+recordId +".amr";
    %>
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="50" height="50" standby="Data is loading..." codebase="http://www.apple.com/qtactivex/qtplugin.cab">
    <param name="src" value=<%=path%>>
    <param name="autoplay" value="false">
    <param name="controller" value="true">
    <embed src=<%=path%> width="75" height="50" scale="1" autoplay="false" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">
    </embed>
    </object>

    uhr wrote:
    When I run the project my programme download and save the amr file from my database in the specified project location("../image/"+recordId +".amr")Why are you copying the file from DB to disk file system? This makes no sense, you're only duplicating the bytes and adding unnecessary overhead. Either keep it entirely in the DB, or just keep it at the disk file system and have the file attributes only in DB.
    but not run the amr file. Only logo of the player is displayed. Next Time when i run the project again, the amr file run smoothly. You apparently did not close the file outputstream after write.
    My requirement is, after click a button, it will download the amr file in specific location and then read the file from that path. The file download successfully before embedding the object, but do not run the file.
    Also, the programme could not run the amr file from other than the project location. I am new in developing the jsp page, where amr file have to be play directly from the page. How can i solve the problem?By closing the streams/resources properly.
    Code snippet:Comment: scriptlets are bad. You should use taglibs/EL.

  • Jsp page not refereshing in IE 6.0

    can you give me any suggestion on following issue
    I have (first.jsp)jsp in following way
    +1234
    when i click on +
    it shows like this(the records are coming from second.jsp by using azax))
    -1234
    record1
    record2
    here second,third jsp conatins same thing except third.jsp contains some buttons
    and when you click on 1234 in next window(third.jsp) it will show
    record1
    record2
    button accept
    when i click on accept button i am loadng first.jsp
    at the time of loading I have to refresh second,third.jsp
    presently I am refreshing third.jsp it is working fine
    but i was unable to refresh second.jsp
    this application running fine in Mozila(both(second.third.jsp pages are refreshing)
    In Ie that first.jsp is not refreshing(oonly third.jsp is refreshing)
    I am using following function on body onload()
    if (window.opener && !window.opener.closed) {
    window.opener.location.reload();
    it is not working in second.jsp

    Hi,
    Which IDE are you using: NetBeans 6.0, or JSE 8.1?
    Regards,
    -Brad Mayer

  • Updating JSP page

    Hi all,
    I have a web application implemented using MVC architecture. In the application, statistics of "clients" are displayed on a table. The user can select some "clients" and clicks on a "Workbench" button. This will trigger a new window to another application (developed using echo 3 framework) through javascript window.open() whereby files uploaded by the "clients" selected is displayed. Some parameters of the clients can be changed in the 2nd application. When the user moves back onto using my application, how do i go about updating the changes done on the 2nd application over to my application? Both applications uses the same database.
    Currently, this is handled through the 2nd application calling on my servlet using window.open(), which on my end, i will re-initialize the javabeans and forward back to my index page. However, this will cause an additional window to open everytime there is an update on the 2nd application, which is not elegant.
    Sorry if this sounds confusing.

    HI,
    i suggest simply reloading your jsp page.
    This can be accomplished by calling a java script function in the child window before closing:
    <script>
    opener.location.reload(true);
    window.close();
    </script>Regards,
    Ape
    Edited by: primedape on Jul 9, 2009 8:06 AM

  • Progress bar onLoad of jsp page.

    Hello all,
    I was wondering how to put a progress bar on load of jsp page.
    Also I have html page that calls a servlet. It takes some time to run it.
    So, is there a way to put a progress indicator while serlvet is doing work?
    thanks

    You can fix that in your page template by putting something like this just before the BODY tag in the Header region:
    <div id="loading"
      style="display: block;
             position: fixed;
             top: 0px;
             left: 0;
             z-index: 1999;
             width: 100%;
             height: 100%;
             background-color: #fff;
             text-align: center;">
    <div style="position: relative;
                top: 130px;">
    Wait..loading..
    </div>
    <img src="#IMAGE_PREFIX#themes/theme_200/images/loading.gif" height="32" width="32"
       style="position: relative;
              top: 150px;"/>
    </div>and putting something like this just after the closing BODY tag in the Footer region:
    <script>
    $(document).ready(function(){
      $('#loading').hide();
    </script>

  • While refreshing jsp page through javascript

    Hi,
    I am refreshing a jsp page by calling javascript method -'reload()', when its child window is closed. It is displaying a confirmation box saying 'whether to resend the request for refreshing the page.....' with two buttons-ok and cancel.
    How do I avoid this confirmation box ? I want to reload the jsp page without asking any confirmation msg.
    Please help me out.
    thanks
    --Karthik                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    if you use meta refresh you will lose your data your best bet is to create an object relating to your page, basically a bean and store all your values into that bean, save it into the database then recall after refresh, but make sure you test that the object contains something before retrieving the values from it

Maybe you are looking for

  • How to use original java VM in microsoft windows applications

    I have seen few applications like of Oracles, They use Java Beans and classes in the windows applications. Can any one of you tell me how can i use java classes in Windows applications(through oroginal java VM only, not by microsoft Java VM).

  • Import From Memory Id  . Where is Export ?

    i have standard FM there is code for Import memory like below DATA : Zget(10) TYPE C. IMPORT zget FROM MEMORY ID 'ZPQR' . Now i want to Know from where its value comming i.e . What & where is its Export parameter. What is ZPQR ? Is it Program or tabl

  • Hi! i need help in updating my ipod touch 1st generation to an ios 3.

    please help in what i should do....i have no idea.

  • Iphone safari open new link?

    Hi, I wondering why all of a sudden when I open a new link in safari it opens a new window but it also replaces my current window so I have two windows open with the same website. For example when I searching on google news, I click on a news story a

  • Script to export data frmo SQL Server 2014 to xls file

    Hi All: I want to export data form a table in SQl Server 2014 to an xls file. Currently I have a working script for SQL Server 2005 in the below lines, but the same script doesnot work for SQL Server 2014. set @outFileName='D:\Folder1\File1.xls' SET