I want to make a chatroom using jsp, and have some problem, Help!

I want to build a chatroom using jsp and client using plain html, so i need every client could have a constant connection with the web server and will receive messages realtime. But i got 2 problems.
First, how can i turn my buffers off so that messages can get to the client the time it is meant to be. I added
<@page buffer="none">
but seems that it takes no effect, any tricks here? thx
Second, I want every user could have a constant conn. with server but i dont want my server to waste resources on those connection that has already been disconnected.so is it possible to stop executing JSP pages once client has diconnected.Since i found that it will throw no exception writing to the client even if the connection is disconnected in JSPs.
Thanks!!!!!

By theway, i'm using TOMCat 5.0 as my JSP container.

Similar Messages

  • I can't connect to the itunes store and have some problems with other websites. Some websites load OK. I had the same problem on my iPad and changed the DNS, but don't want to do this on my iMac, anyway, surely I should have my router's DNS?

    I can't connect to the iTunes store from my iMac and have problems loading a number of other websites, however some websites load perfectly well. I have had the iTunes store issue on my iPad and resolved it by changing the DNS but surely I should use the DNS for my router. I don't really want to change it for the iMac as I access secure sites with it to internet shop.
    Any ideas, I was going to try loading Chrome but can't get it without going through the iTunes store. Anyway, that is treating the symprom not the cause.

    Adding Open DNS codes to your Network Preferences, should give good results in terms of speed-up as well as added security, (including anti-phishing and redirects) (Full information about Open DNS is here: http://www.opendns.com/home/nobloat ) and further independent information can be read here:
    http://reviews.cnet.com/8301-13727_7-57338784-263/free-dnscrypt-tool-enhances-ma c-web-security/?tag=mncol;txt
    and here:
    http://www.macworld.com/article/1146064/troubleshootdns.html?t=234
    Open System Preferences/Network. Double click on your connection type, or select it in the drop-down menu, and in the box marked 'DNS Servers' add the following two numbers:
    208.67.222.222
    208.67.220.220
    (You can also enter them if you click on Advanced and then DNS)
    Sometimes reversing the order of the DNS numbers can be beneficial in cases where there is a long delay before web pages start to load, and then suddenly load at normal speed:
    http://support.apple.com/kb/TS2296

  • Getting files from a business that uses Photoshop CS6. I use CS3 and have text problems

    Hi, I'm getting files from a business that uses Photoshop CS6. I use CS3 and when I edit the text, the text moves to a different location even off screen.
    Anyone know how to fix this?
    It makes it hard to copy the text and imposible to change the color or make corrections.
    This just started when they went to Photoshop CS6.
    Thanks,
    Jeffery

    Ask the folks supplying you with files whether they've updated to the latest version...  There were problems with Photoshop CS6 13.0.0. saving text layers in jumbled-up fashion.
    -Noel

  • Dear apple community, now I have some problem with iPad(The New iPad 4G). 1st, start from I got it, it really difficult charge. 2nd, very and very hot with 3G or Internet using. And more, some problem with wifi.

    From Me, THE MAHACHAK to Apple Company
        I think, the apple company are producing and sell only their own country or their ownself, not over the world. And in the other hand, I want to ask Apple Company about their market policy as marketing strategy or size of marketing. How about it? How did you think? Only your own or for world. I like one word as MARKETING IS WATER. Where can't water go? Such as my small country have a lot of people are using apple products a lot as iPhone, iPad, iPod and apple laptop. Cambodia is my small country with much rich families. They can use a good product or high class product, high tenology. Most of products is Apple. But they always have many bad comments and bad problem with Apple products. WHY? The problems such as Lock code, cann't conected with other, hard to find or buy, no Safety, no warranty world wide, wifi, charger, hot during 3G conected, ...etc. hope, these my own idea is looked for all the Apple customers around the world. Please, text me back. Waiting back.
    Thanks and Regard

    Apple Discussions is a user to user forum, so your post is not read by any Apple employee.
     Cheers, Tom

  • I want to make gImage Class extends Image and use Graphics2D

    Sorry, my english short...
    I want to make gImage Class extends Image and use Graphics2D
    I trying to do...
    make class gImage..
    extends Image class. (Inheritance)
    but Image class is abstract class..
    And I want to use gImage class same as Image class.
    I can't use constructor... because by Abstract calss...
    How do i?
    Help me.. plz...
    And I want to use Graphics2D at Applet Game, But not use Java JDK Plug-in...
    No Way?

    You need to use BufferedImage with 2D or RenderedImage with JAI.
    BufferedImage effectivley extends an Image so you can
    draw it to screen in paintCOmponent.
    I use an Extended JPanel to draw an image in a Panel with this.
    MArk

  • I want to make party leder using sql server

    i want to make party leder using sql server

    What do you mean by "party leder"?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Hello, I want to make DPS magazin for IOS and Android with a lot of text footnotes. There is about 200 footnotes per article. The idea is to make pop-up windows like in EPUB 3.0. Please help.

    Hello, I want to make DPS magazin for IOS and Android with a lot of text footnotes. There is about 200 footnotes per article. The idea is to make pop-up windows like in EPUB 3.0. Please help., Hello, I want to make DPS magazin for IOS and Android with a lot of text footnotes. There is about 200 footnotes per article. The idea is to make pop-up windows like in EPUB 3.0. Please help.

    Remember you can only build an iPad app using your Single Edition solution (which is included in your CC membership). So you'd need a Pro or Enterprise version of DPS to be able to create the Android version.
    You can create pop-ups in InDesign using the slideshow options and a multi-state object. But it's all manual labour so you'll spend a lot of time on this, also depending on the layout of your design.

  • How to upload an html file using jsp and jdbc

    Hi,
    im trying to upload an html page using JSP and jdbc. but of no success.
    my aim is to keep some important html pages in the database.the file size can vary.the file has to be selected from a local machine (through the browser) and uploaded to a remote machine(where the databse resides).
    any help/sample code or pointer to any helpful link is appreciated.
    thanks in advance
    javajar2003

    When uploading a file, I use a byte array as a temporary buffer..
    So, you should then be able to store the byte array in the
    database as binary data.
    example>
    //Temporary Buffer To Store File
    byte[] tmpbuffer = new byte[860];
    //Some Code To Upload File...
    //File Should Now Be In Byte Array
    //Get DB Connection and execute Prepared Statement
    Connection con=//GET DB CONNECTION;
    String sql=insert into TABLE(page) values(?);
    PreparedStatement ps=con.prepareStatement(sql);
    ps.setBytes(1,tempbuffer);
    ps.executeUpdate();
    //Close PS and Free DB Connection
    ..... and this method looks like you dont even have
    to store the file in a byte array, you can just give
    it the input stream.
    ps.setBinaryStream(int, inputStream, int);
    You may have to make several attempts at this. I have
    uploaded a file and temporarily stored it in a byte array,
    but have never from there stored it in the DB as binary
    data.. but this looks like it'll work.
    Good Luck!

  • I recently lost my iphone.......and i have some confidencial data and pics in it....I want to make that are my data and pics secure r not?

    I recently lost my iphone.......and i have some confidencial data and pics in it....I want to make that are my data and pics secure r not?

    Well, if it is locked with a passcode; the only way for someone to use it would be for them to guess your passcode or restore it as new in iTunes. If they restore it, it wipes out all your information and puts the device back to factory settings.
     if you have iCloud setup; you can go to iCloud.com on a computer and sign in with your Apple Id and Password and you can possible track the device; also give the option to send a sound or message to the device; also you can remotely lock it with a passcode or remotely wipe it to factory settings;
    Hope this helps!!

  • Database locking using JSP and Oracle database

    Dear All
    I am reading about how to do database locking in general and i want to implement these mechanisms using JSP pages and oracle database, but i have the following questions:-
    1.If i write a “select for update” quesry in the JSP page will it locks the record ? or it will not lock the record because the connection between the JSP pages and the server will be stateless in most online systems?
    2.If i write all my jave code in transaction , something like this:-
    • Begin transaction
    • Commit or
    • Rollback
    Then should i be worried about the locking issues or the database manger will handle the locking mechanisms to insure data integrity(and what the default mechanism (if any) that the oracle database manger use to do the locking)?
    3. If the answer for question 2 is no, then how can i handle the optimistic and the pentemistic locking using JSP pages?
    BR

    One way to solve this issue is as follows:
    * You add a new column to each database table called 'version' which is of int type.
    * Each time you alter any field in a record, you increament the version number.
    * When you read a record and display it, you store the version number in your code
    * when you go to update the record, you write your sql something like this:
    update person set firstName=? where personId=? and version=?
    Where the version is whatever you stored locally. If someone altered the record in the database while your
    end user was looking at it, the version numbers will not match and the sql statement will
    return zero as the number of records it altered. If its zero, inform the end user someone altered the record
    while he was looking at it and weather or not he wants to proceed.
    The chances of two people altering the same record in a table while both are logged in and viewing the same set of data is small so such collisions will be few.
    You only need transactions if you are updating more than one record at a time (in the same table or multiple tables).
    You dont need it for reading records if you use a single sql statement to read (for example: to join multiple tables).
    In general, you get a (pooled) connection, use it, and close it as quickly as possible in a try/catch/finally block. You dont hold onto it for the duration of the user's session. A book on JDBC should help clarify this.

  • Need Help Badly on Shopping Cart Using JSP And Java Servlet

    Hi All,
    This is the 1st time i am trying to create a shopping cart using JSP and Servlet.
    I have read through a few acticles but i still do not get the whole idea of how it works.
    Please guide me as i need help very badly.
    Thanks.
    This is one of the jsp page which displays the category of products user would like to buy : Products.jsp
    <html>
    <head>
    <title>Purchase Order</title>
    </head>
    <body topmargin="30">
    <table border="0" width="100%" id="table1" cellpadding="2">
         <tr>
              <td bgcolor="#990000" width="96">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Code</font></b></td>
              <td bgcolor="#990000" width="260">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Description </font></b></td>
              <td bgcolor="#990000" width="130">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Brand
              </font></b></td>
              <td bgcolor="#990000" width="146">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">UOM
              </font></b></td>
              <td bgcolor="#990000" width="57">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Unit<br>
              Price </font></b></td>
              <td bgcolor="#990000" width="62">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Carton<br>
              Price </font></b></td>
              <td bgcolor="#990000" width="36">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Qty</font></b></td>
              <td bgcolor="#990000" width="65">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Add<br>
              To Cart</font></b></td>
         </tr>
    <tr>
    <td align="center" width="96" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">123</font>
    </td>
    <td align="center" width="260" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tom Yam</font>
    </td>
    <td align="center" width="130" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Nissin</font>
    </td>
    <td align="center" width="146" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">12 x 10's</font>
    </td>
    <td align="center" width="57" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">$3.85</font>
    </td>
    <td align="center" width="62" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">$46.2</font>
    </td>
    <td align="center" width="36" bgcolor="#CCCCCC">
    <!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" -->
    <p align="center"><input type="Integer" name="Q10005" size="1"></p>
    </td>
    <td align="center" width="65" bgcolor="#CCCCCC">
    <p><input type="checkbox" name="checkbox" value="123"></p>
    </tr>
    <tr>
    </table>
    <table border="0" width="100%" id="table2">
         <tr>
              <td>
              <div align="right">          
                   <input type="hidden" name="hAction" value="AddToCart"/> 
              <input type=submit name="submit" value="Add To Cart"/>                     
    </div>
    </td>
         </tr>
    </table>
    </body>
    </html>
    After user has make his selection by entering the qty and ticking on the check box, he would click the "Add To Cart" button ... and this would call my servlet : AddToAddControlSerlvet.java
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    import java.util.*;
    import java.util.ArrayList;
    public class AddToCartControlServlet extends HttpServlet
         public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException
              String action = req.getParameter("hAction");
              if (action.equals("AddToCart"))
                   addToCart(req,res);
         public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              try
                   String url = "";
                   String[] addList = req.getParameterValues("checkbox");
                   HttpSession sess = req.getSession(true);
                   //String sessionID = sess.getId();
                   DBClass dbClass = new DBClass();
                   ArrayList cartList = new ArrayList();
                   for (int i = 0; i < addList.length; i++)
                        String productCode = (String)addList;
                        int qty = Integer.parseInt(req.getParameter("Q"+productCode));
                        Products product = dbClass.getProductDetail(productCode);
                        double totalUnitAmt = qty * product.getUnitPrice();
                        double totalCartonAmt = qty * product.getCartonPrice();
                        Order order = new Order(product.getProductCode(),product.getProductDesc(),product.getBrandName(),product.getUom(),qty,product.getUnitPrice(),product.getCartonPrice(),totalUnitAmt,totalCartonAmt);
                        cartList.add(order);
                   sess.setAttribute("cartList", cartList);
                   url = "/Cart/CartDetails.jsp";
                   ServletContext sc = getServletContext();
                   RequestDispatcher rd = sc.getRequestDispatcher(url);
                   rd.forward(req, res);
              catch (Exception e)
                   System.out.println(e);
    From here, i would get the list of items which user has selected and add to the cartList, then i would direct the user to CartDetails.jsp which displayed the items user has selected.
    From there, user would be able to remove or to continue shopping by selecting other category.
    How i do store all the items user has selected ... everytime he would wan to view his cart ...
    As i would be calling from jsp to servlet .. or jsp to servlet ... and i do not know how i should go about in creating the shopping cart.

    Hi !
    Yon can use a data structure as vector and store the items selected by the user into the vector . Keep the vector in session using session object , so the user can access the entire shopping cart from anywhere in the application .
    Then , you can change the cart accordingly .
    Hope this works.
    Cheers ,
    Pranav

  • So I am trying to copy my hard drive "Macintosh HD" to an external hard drive, i want to use Terminal and have tried many ways. For example cp -r /Volumes/"Macintosh HD" /Volumes/"NO NAME". When i do it says No such file or directory. Ideas?

    So I am trying to copy my hard drive "Macintosh HD" to an external hard drive, i want to use Terminal and have tried many ways. For example cp -r /Volumes/"Macintosh HD" /Volumes/"NO NAME". When i do it says No such file or directory. Ideas?

    The reason that threadjacking is frowned on (as mentioned in the terms use which you can read by clicking the link to the right on this page) is for the most part a practical one:
    By starting your own thread your problem can get individual attention, focussed on your particular set of circumstances.
    By joining somebody else's thread it becomes tricky to answer more than one question at the same time, and can lead to confusion for both parties.
    So if you don't mind the minor inconvenience, please start your own thread (in the correct forum) so we can get to grips with your particular problem!

  • My husband uses adobe cs5. The clone tool isn't working and after resetting the tools adobe bridge now goes to picasa. How can we make the clone tool work and have bridge go to cs5 not picasa?

    My husband uses adobe cs5. The clone tool isn't working and after resetting the tools adobe bridge now goes to picasa. How can we make the clone tool work and have bridge go to cs5 not picasa?

    A lot more information about your hardware and software is needed.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CC", but something like CC2014.v.2.2) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    a screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • When to use jsp,and when to use servlet?

    I think that jsp and servlet can realize the same functions, because when run a jsp, it is transferred to a servlet program, so when to use jsp and when to use servlet?
    I am now developing the input interface for a website, I just use jsp and javabean to connect to weblogic and database, and I didn't use servlet, Is there any unseemliness?
    Thank you!

    IMHO I use servlets to control the flow between my jsp's based on a number of factors in a webapp. For instance, user authorization. If a user has the authorization to conduct various administrative functions on an application (like change user rights, reset passwords etc) they will have access to specific buttons or links on some screens that others will not. I use servlets to establish what access rights a user has and direct them to the appropriate pages. I also use servlets to test data validity on form input screens. I know that I can also do this with JavaScript but that can be disabled by the client and in order to prevent that I also double check the form input from a servlet. All my jsp's do is display the results of a business process (which is held in a JavaBean or EJB) and the servlets act as the controllers for the application, connecting to multiple databases, verifying application state, flow control etc. I try to keep the jsp as simple as possible as some of them are maintained by html developers who lack the necessary experience to write java code. I hope this helps.

  • HT2534 hii i am using iphone 3g mobile i have some problem in downloading free apps    here is asking an credit card details    so i want to download with out entering credit cards details      and here i have there is not havening an option "NON"

    hii i am using iphone 3g mobile i have some problem in downloading free apps    here is asking an credit card details    so i want to download with out entering credit cards details      and here i have there is not havening an option "NON"

    How did you create the account ? Unless you followed, exactly, the instructions on the HT2534 page that you posted from when creating an account then credit card details will need to be entered before the account can be used to download any item from the store.

Maybe you are looking for

  • Acrobat XI Pro won't Activate

    Hi All, I received Acrobat XI Pro (for free, thanks Adobe) at the launch event in 2012 and it's been a great product to use. It's started asking me to activate it. SO I go to the activation screen, after logging with my Adobe ID, put in the 24 digit

  • Browser URL 127.0.0.1?

    Hi, we will take a look to the Service Desk virt. Appliance. But after first install i got the hint on Appliance Managment Screen, the Browser URL for Service Desk is 127.0.0.1? Where can i change it to the correct URL/IP? Thx Thomas

  • TweenMax a  Child symbol

    Hello everybody, this is my last try, then I will return to a brave tweening Designer. I asked a few times ago, but unforunately no solution at the end: I placed a symol on stage with a trigger at the first frame: sym.stop(); var eins = sym.createChi

  • Get_related_entities

    Hi Experts, I am trying to set the partnerno attribute in the role assignment block to some default value when pressing on create account. I have written the coding in 'DO_PREPARE_OUTPUT' method. I am getting typecasting errors.I have tried the follo

  • Reading in layers of image

    Hi, I was wondering if it was possible to read in an image's different layers. I would like to add a layer which has a blackground, and merge it with another image, and save it. At some point, I would like to remove the black background layer so that