Multiple response streams ?   HTML and binary ?

Hello,
Is it possible for a Servlet to create two responses or two output streams, with one as HTML and the other as binary?
The code below only seems to send the first (HTML) section and seems to ignore the second (binary) section ?
Thanks alot !!!
James
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class MinimalBinaryStream extends HttpServlet
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    doGet(request, response);
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    /*----------Below: Send HTML Response----------*/
    response.setContentType("text/html");
    ServletOutputStream out = response.getOutputStream();
    out.print("<h3>Text message to say binary file is on its way</h3>");
    out.flush();
    out.close();
    /*----------Below: Send Binary Response----------*/
    response.reset();
    response.setContentType("application/octet-stream");
    response.setContentLength(3);
    out = response.getOutputStream();
    out.write(0x31);
    out.write(0x32);
    out.write(0x33);
    out.flush();
    out.close();
}

The servlet validates the serial number. If the
serial number submitted is invalid, then the servlet
simply sends an HTML message to the client saying
"Invalid serial number, please try again, etc,
etc".
If the serial number is valid, then the server
encrypts it into a ZIP file and sends the ZIP file to
the client. (This part is working perfectly by the
way.)It sounds like you're not really mixing the two types of data in a single response... You're doing one or the other depending upon the value of some data the client has sent to the server
I wouldn't use the sendRedirect method off of the response. That causes a new get request to be issued from the client which is not necessary. I'd use the RequestDispatcher, preserving the initial request and forwarding both the request and response to another resource on the server. The client is unaware of any of it.
if ( serial number valid ) {
     // encrypt to ZIP
     // send zip to client on response...
} else {
     ResquestDispatcher dispatcher = request.getRequestDispatcher( "redirect.html" );
     dispatcher.forward( request, response );
}http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html
What would be really nice, is if the servlet could
also send an HTML message saying "Thanks for your
serial number, here is your licence.ZIP, etc,
etc".For this, maybe you could create a jsp page with a link that pointed to the ZIP file on the server. You would define the name dynamically, and attach the name to the request via setAttribute. Then use that same value in the href value on the jsp page. via request.getAttribute The jsp page would contain the message in html and the client would obtain the zip from the link. And use the RequestDispatcher to forward to the jsp page from the servlet. Place the jsp inside /WEB-INF so that by itself it is not accessble to the client. Only the server code can get to it.

Similar Messages

  • Partial-credit scoring in multiple response and multiple hot-spot questions

    Hello everyone,
    I'm calling on your generosity in the spirit of the holidays to help out a noob.  I would like to create matching, multiple-response and multiple-hot spot questions where the user receives credit based on the number of correct answers within the question. For example, in a matching question where there are four items; if the user gets 2 out of the four items matched correctly, I would like for him to receive 2 out of 4 points.
    I understand that Captivate doesn't support partial-credit scoring of this type, but a few posts have implied that it can be done with variables. Is there anyone who can walk me through this process, or send me to a link that will walk me through it? (I've scoured these forums and tried the Cp tutorials, to no avail.) And if it's not asking too much, please make it understandable to someone who has very little experience with variables.
    Thanks, and Merry Christmas.
    JR
    (Running CP 5 on Windows Vista)

    Hello,
    I did publish an article more specific on partial scoring, perhaps this could help you:
    Partial scores and customized feedback
    And since you are asking for more basic information, on my blog I point to some other articles to explain the meaning of variables with/without advanced actions. Feel free to have a look (there are more postings about advanced actions and links to articles over there):
    Curious about variables ?
    Unleash the power of variables with advanced actions
    Lilybiri

  • Multiple input streams

    hey folks newbie here
    i am designing a client server program
    with my client i want to send serialized objects & primitive types across the socket to the server
    is it possible to creat two output streams on the same socket i.e an ObjectOutputStream & a DataOutputStream on the same socket, i have tried this but get some errors so i don't think this is possible
    if not possible how would i be able to send both primitive types & serialized objects across the same socket

    Forget about the first person's post. He his correct, but it is not the solution used by most developers.
    Multiple Input Streams/Output Streams are easy to create. A better "management" deal would be like FTP - FTP uses two port, one for data and one for commands.
    Socket objectSocket = new Socket("www.object-server.com", objectPort);
    Socket dataSocket = new Socket("www.data-server.com", dataPort);
    The server should implement a class which represents the connection of both sockets as a single client. Somethig like this:
    public class Connection {
        Socket dataSocket;
        Socket objectSocket;
        public Connection(Socket s1) {
            dataSocket = s1;
        public void addObjectSocket(Socket s2) {
            objectSocket = s2;
    }You can then use this class (permission given to copy and use without license hereby granted) to manage the task.
    There are also many other ways of doing this. You can also apply multiple i/o streams to the same socket - but your server/client needs to know which data type is being sent or to which stream the data needs to be read from.
    Example: Client sends binary file to server (such as FTP)
    ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
    PrintWriter out2 = new PrintWriter(socket.getOutputStream());
    The code above will work, but data send in one stream will not show up in the other stream. The server does the reverse for the input > adding different InputStreams to the socket, but when data is sent from the client's object stream both of the server's streams (BufferedReader or other text-based input) and the object stream will receieve the file, so you need to communicate between the client and server which stream to read from/write to.
    Client: Send file via socket to server by means of ObjectOutputStream
    Note: You should not need to implement the try-catch logic when passing the argument of the socket - since it would throw that in the class which was calling the constructor, but you CAN implement it here as long as it is not handled in the calling class. If you do, the complier should throw an error saying that the exception would not be thrown at this point.

  • Multiple responsive compositions on 1 page with edgecommons

    Hi Guys,
    I am trying to determine what in the is going on here, got two responsive compositions using edgecommons in a single html page. Below is the runtime code - however not having much luck getting them both displayed at the same time. I am able to see each composition on the page when I remove one of the two load functions, but if I use both, there is no joy. I must be doing something wrong but cannot determine what. P.S. all files and assets loaded in the root directory.
    <script>
      var custHtmlRoot="";
      var script = document.createElement('script');
      script.type= "text/javascript";
      script.src = custHtmlRoot+"edge.5.0.0.min.js";
      var head = document.getElementsByTagName('head')[0], done=false;
      script.onload = script.onreadystatechange = function(){
      if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
      done=true;
      //1st composition
      (function() {
      var custHtmlRoot="";
      var opts ={
      scaleToFit: "none",
      centerStage: "none",
      minW: "0px",
      maxW: "undefined",
      width: "100%",
      height: "100%"
      opts.htmlRoot =custHtmlRoot;
      AdobeEdge.loadComposition('clients', 'clients', opts,
      {"dom":{}}, {"dom":{}});
      //2nd composition
      (function() {
      var custHtmlRoot="";
      var opts ={
      scaleToFit: "none",
      centerStage: "none",
      minW: "0px",
      maxW: "undefined",
      width: "100%",
      height: "100%"
      opts.htmlRoot =custHtmlRoot;
      AdobeEdge.loadComposition('solutions', 'solutions', opts,
      {"dom":{}}, {"dom":{}});
      script.onload = script.onreadystatechange = null;
      head.removeChild(script);
      head.appendChild(script);
    </script>
    <style>
        .edgeLoad-clients { visibility:hidden; }
        .edgeLoad-solutions { visibility:hidden; }
    </style>
    <body style="margin:0;padding:0;height:100%;">
      <div id="Stage1" class="clients"></div>
      <div id="Stage2" class="solutions"></div>
        <meta content="minimum-scale=1, width=device-width, maximum-scale=1, user-scalable=yes" name="viewport">
    </body>
    Any help would be appreciated - Cheers
    Wish the adobe team would streamline this in the next update. Makes real life instances very difficult to figure out.

    vivekuma,
    I believe I either found the problem or at least narrowed it down. 2014.1.1 appears to have broken the Multiple Responsive Animate Compositions in an uploaded state.
    I will send you the comps that I have used for testing, but it appears that the current version (2014.1.1) broke this code in an "uploaded" state. Running this code on a local web server functions perfectly fine.
    Again, this code only works locally and not on an internet web host!
    P.S. I have removed all instances of Edge Commons, so there are no calls to this extension library.
    P.S.S. I am now using multiple compositions to serve my responsive breakpoint needs using media queries to hide and zero out stages between break points.
    Thanks Vivekuma and any other Adobe Edge Animate staff who read this!
    Eldin

  • HELP: Is it possible to record from multiple video streams using iMovie?

    Is it possible to record from multiple video streams using iMovie.
    I want to record a presenter on a greenscreen and also his powerpoint slides at the same time and cut from one to other.
    Can imovie record from screen and camera at same time?
    If so is there a link to somewhere explaining how to do so?
    If not, what is the most efficient way to do so, without having to learn a whole complex program?
    Please advise asap.
    Very many thanks

    Alan and Anthony,
    Thanks for the quick responses. Unfortunately, there is no backup :(.
    I will ask if they get logged into the global zone, but one thing I forgot to mention is that this zone (as are all our non-global zones and the global zone also) are configured for ldap logins.
    Assuming that they can even try to login to the global zone, can they even see the directory structure in the non-global zone (sorry, I haven't worked with Zones much thus far) from the global zone?
    Also, if they can see the non-global zones directory structure, what should they then try?
    Also, I've been searching and I've seen some suggestions of running a "pkgcheck -af" which might restore the directory permissions to what the various packages expect. Assuming that they can get to the point that they can at least log into the zone, is that something that would work?
    I'm setting up a new test Solaris box now, with a zone, to try to reproduce the problem. If I can reproduce the problem, I'll post back whether or not I see the same thing.
    In the meantime, if anyone has any suggestions, please post them.
    Thanks,
    Jim
    P.S. In case you're wondering, the box/zone that got messed up was a test/integration zone, and they were in the process of installing some software when this chmod happened.

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • Is there a way to create multiple New Tabs pages and name them?

    This feature is great but I would like to be able to create multiple new tabs pages and label them. This would be more useful than tabs groups that all load at once.

    No that is (currently) not possible.
    It will be possible in future Firefox version to specify the number of rows and columns.
    *[https://bugzilla.mozilla.org/show_bug.cgi?id=752841 bug 752841] - [New Tab Page] make the number of tabs adjustable
    <i>([https://bugzilla.mozilla.org/page.cgi?id=etiquette.html please do not comment in bug reports])</i>

  • What could be causing my multiple response survey question to show a non-response in LMS report?

    I have a 10 question survey that has been running fine and providing accurate responses in reports generated from my LMS. I made a property change to a multiple response type question that is now causing the reports to show a date/time (2003-01-01  18:00:00) response instead of the actual multiple responses the user made. The change I made to the question was to change the "Numbers property from" [ a), b), c) ] to [ 1), 2), 3) ]. This property change did not affect the reported responses for the single response questions, only the multi-response. This problem occured Using Captivate 4. I then tried using the same properties in Captivate 5.5 thinking it was a bug in CP4, but got the same results. Has anyone else run into this issue? I'm going to bring this to the attention of my LMS provider, but want to make sure CP is clean first.
    Thanks,
    Dave

    First things first. I am not an LMS expert, so this is not about troubleshooting.
    However, to ensure that your course works fine on a SCORM-compliant LMS, you can upload it to cloud.scorm.com and test it out. If the course works fine there, rest assured that it will work fine on any SCORM-compliant LMS. If your LMS team comes back with an issue after this, you can counter them with this evidence that the problem is with the LMS and not your course.
    Sreekanth

  • Problem when streaming out a binary file

    Hi,
    I am trying to stream out a binary file to an output stream (not a file, but a socket). My file is a gzip file, and I was initially simply trying to open the
    file, read it to a a byte array, and writing it out to my output stream. However, I got corrupted data at my other end and it took me quite a bit of
    debugging hours to find out why.
    I tried writing to a file the same information I was writing to my output stream but, although my file was correct, my output stream still contained
    corrupted data.
    I think I have finally narrowed down my problem to the fact that when I try to write a 0x00 value to my output stream, everything gets ignored from this
    point until I write a 0x0a byte to my output stream. Obviously this produces corrupted data, since I need all the bytes of my binary file.
    If somebody can direct me as to how to write a 0x00 value to a socket output stream, I would really appreciate your input.
    This is a sample of my code (Right now I am writing byte by byte: not very efficient, but was the only way I found where I was getting a problem):
    // out is of type OutputStream
    if (Zipped){
         // In this case we just have to stream the file out
    File myFile = new File(fileName);
         FileInputStream inputFile = new FileInputStream(myFile);
         FileOutputStream fos = new FileOutputStream(new File("/tmp/zip.gz")); //zip.gz results in a good (not corrupted) file.
         ByteArrayOutputStream out1 = new ByteArrayOutputStream(1024);
         int bytes = (int)myFile.length();
         byte[] buffer = new byte[bytes];
         bytes = inputFile.read(buffer);
         while (bytes != -1) {
              out1.write(buffer,0,bytes);
              bytes = inputFile.read(buffer);
         inputFile.close();
         try {
              int count=0;
              bytes=out1.size();
              while (count<bytes){
                   fos.write(buffer,count,1);
    out.write(buffer,count,1); // when buffer[count] == 0x00, everything after it gets ignored until a 0x0a byte is written.
                   count++;
         } catch (IOException ioe) {
              SysLog.event("IOEXCEPTION: "+ioe);
         } catch (Exception e) {
              SysLog.event("EXCEPTION: "+e);
         fos.flush();
         fos.close();
         out.flush();
    out.close();
         return;
    }

    Actually, I had thought about that and for some time I tried getting rid of some of the header information in the gzipped file, and then I stopped doing that when I realized that part of the gzipped file is a CRC value which I believe is computed taking into account both the data of the file and the header information. If this is the case, then getting rid of part of the header would produce a corrupted file ... but then, I might be wrong in this issue.
    Anyway, to make my application more clear, what I am doing is writing the code for a cgi command which is suppossed to access information from a database, create an xml file, gzip it, and then send it to the client who requested the information.
    Therefore, what I am sending is an xml file (Content-Type: text/xml) in compressed format (Content-Encoding: gzip). Note that if I don't gzip the file and then send it uncompressed to the client, I have no problems. However, for me it is very important to gzip it because the size of the file can get very large and that would just take bandwidth unnecessarily.
    On the other hand, if I try to gunzip the file locally, I have no problem either (the file is not corrupt at the server's end). Therefore, my problem is when I stream it out.
    Any further help would be really appreciated!

  • Getting Started with Swept Sine (DAQmx) Multiple Response Signals

    Hi,
    I've been using the modified version of the Getting started with swept sine.vi for multiple response signals
    https://decibel.ni.com/content/docs/DOC-24474. Program fully suitable.
    However, I am facing with three issues :
    1) The edits are highly non user friendly (horrible for 6 multi-channel already), and quite long to perform.
    2) Would there be a way using for loops to have a more compact and flexible way to use FRF? (Calling 6 times the same program in a similar structure does not quite seem like a smart move yet I'm relatively novice in LabVIEW).
    3) Be able to set the number of channels somewhere in the software, and automatically have the software to be able to cope with this? (aka if 20 multichannels are needed, no need to modify the code?)
    It's probably going to be a lot of work to get there, all I'm asking for you guys is to point me in the right direction and suggestions,
    Cheers,
    Kentmey
    Kentmey

    duplicate post, continue here…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Html and CSS in JEditorPane

    I have been working with Velocity to produce dynamic HTML and displaying the results with the JEditorPane. I have been searching for an article or tutorial that talks about the JEditorPane (HTML and CSS related), but nothing has come up (I also did a quick search in this forum).
    I would like to know what is JEditorPane capable of doing in terms of displaying HTML with CSS, and how do you set it up.
    If JEditorPane is not the best option with HTML that has positioning in CSS, can somebody suggest something else that has better support for CSS than JEditorPane?
    I would greatly appreciate any response (Any suggestion or links to additional information will be great too!)
    Thanks,
    Victor Gutierrez

    I would like to know what is JEditorPane capable of
    doing in terms of displaying HTML with CSS, and how
    do you set it up. JEditorPane has no support for CSS
    If JEditorPane is not the best option with HTML thatit's not
    has positioning in CSS, can somebody suggest
    something else that has better support for CSS than
    JEditorPane?Search google for 'JDIC' find the WebBrowser component
    I would greatly appreciate any response (Anylet's not get carried away here
    suggestion or links to additional information will be
    great too!)
    Thanks,
    Victor Gutierrez

  • Does OCSPChecker handle multiple responses yet?

    I have been trying to get DavMail java application to access an Exchange server that requires the use of OCSP. I have not been able to get it to work. In my research, I have found references to a bug that the OCSP procedure handles only the first response from the OCSP server and so probably returns a fail if multiple responses are received.
    Several bug reports on this indicate that this is fixed, but a later bug report indicates that it is not. Does anyone know which it is?
    Thanks
    Edited by: 834601 on Mar 15, 2011 5:26 AM

    Found out that the answer is YES.

  • Home Theater need. Multiple Audio Streams from 1 card or possible to use 2 car

    I currently have 2 SB Li've's installed and a SB Audigy in the box.
    I would like to be able to send different audio out to different devices. I need to send audio from a game interface called MAME 32 to a speaker system connected to the PC. I also use this PC as a home theater PC and want to send audio from my DVD playing software out to my TV(in analog stereo mode) and/or to my receiver(in Dolby Digital mode using the digital connector).
    I would like to be able to run these seperatly without having to go into the Control Panel and switch the default sound card like I am doing now. I do not need to run them at the same time.

    Bummer. Are you guys working on something that might have this capability? Seems to me that the closer we integrate PC's into our entertainment systems the more need we will have for the ability to do multiple audio streams, i.e. MP3's to the living room. DVD movie audio to the family room, XM radio classical station to the kitchen for mom etc..
    Intel is offering this as an onboard solution that has the ability to do at least 2 different streams.
    http://www.intel.com/design/chipsets/hdaudio.htmMessage Edited by relay on 0-26-2004 05:02 PM

  • Streaming wifi and bluetooth at the same time is it possible in air play from iPod

    Streaming bluetooth and wifi at the same. Is it possible?

    You are not able to send the music to two different streams, you can use the bluetooth and wireless at the same time but for different tasks.
    The best way I have seen for what you are attempting, is to buy a wired splitter and two bluetooth transmitters, and have each transmitter broadcast bluetooth sound to the two different locations.
    I have not found any other way except when using itunes on a desktop computer which allows the selection of multiple output destinations.

  • Multiple Forecast Streams in Demantra

    Hey,
    I've noticed release note for 7.2 includes the following enhancement:
    "You may want to create statistical forecasts from multiple demand streams.
    You can generate a forecast from any data stream, for example, booking history and shipment history. Each data stream has a unique engine profile and version."
    I haven't been able to find much documentation about this option.
    Has anyone implemented a solution using that ? Know any HOW-TO documents available?
    I'm thinking of using it for forecasting - item sales, and item returns from customers.
    How should SALES_DATA be loaded for that scenario? How should engine be run?
    Thanks alot for any reply,
    Aaron

    Hi All,
    Forecasting with multiple demand stream means that you can generate multiple forecasts based on different demand stream. By demand stream, i mean the historical data stream on which you want to generate the forecast.
    There can be situations where you may require to generate forecast for different purpose.Like Aaron mentioned, you may want to generate a forecast based on the order/booking history and/or you may want to generate a forecast based on the returns history. For this purpose you need to create different engine profiles.Engine profile is nothing but a set of engine parameters with specific values. Oracle Demantra provides some predefined profiles for different purposes, and you can define additional engine profiles, as needed. When you run the Analytical Engine, you specify the engine profile to use.
    Now coming to the HOW-TO part:
    1) The quantity_form (system parameter) contains an expression that is used by the engine to retrieve and aggregate demand stream data from the SALES_DATA table. Make sure that the quantity_form expression for a specific engine profile points to database columns containing the historical demand stream desired for the profile. Meaning, if you want to generate a forecast based on booking history then the quantity_form should point to the booking history stream in the sales_data table. Likewise for returns history, point the quantity_form to returns history stream in sales_data table.
    2) Create a series to view the forecast generated by the engine profile.
    3) The newly created engine profiles gets added to the list of engine profiles in the system parameters.You can select the required engine profile and generate the forecast.
    4) View, Edit or compare the forecast created in step 4 by creating a worksheet with all the forecast generated.
    I hope this brings more clarity to the queries/replies posted earlier.
    Regards,
    Shekhar
    Edited by: Shekhar on Feb 18, 2009 10:02 AM

Maybe you are looking for

  • 24" iMac - so far so good

    I've now had my iMac for around a week and everything is great. This is now my 3rd Mac (I also have a G4 MDD and a PowerBook) and I my overall experience is very good. I don't have any bad or stuck pixels in the screen and the display is beautiful. W

  • N80 bluetooth disconnecting issue

    I am unable to use my bluetooth gps with N80. It disconnects the bt connection about once in 5 minutes. I've read some forums and it seems that others are also experiencing similar bug in N80 (bt headsets and gps's) My firmware is 3.0617.0.6 I'm usin

  • Upgrade from Cache 3.1.x Software to ACNS 4.2.3

    I have a problem in upgrading my CE590 from Cache 3.1.x Software to ACNS 4.2.3 Software. The following error appear : Integrity check failed for /sw/tmp_bundle. Install addon "Cisco Upgrade Diamond Ruby Bundle" failed (256) I tried to install deltmpp

  • Discussion Forum Email Subscriptions

    How do I suppress subscriptions in the Discussion forum. My client does not want to allow users to generate any emails when new messages/threads are posted into any and all forums. Any Ideas?

  • MacBook Pro 13" with Retina Display?

    I read there were testing a MBP 13 in April but battery issues delayed its release on Monday's WWDC  Hold off on buying 13 in MPB non-retina $1,499 version?  If released in a month or so I will be upset if I buy this new one.  Also the new MPB 2.9Ghz