Better way to take Comet requests and respond with dynamic HTML?

Hello folks,
When my servlet writes back inline plaintext/XML in response to Comet requests, it only takes 10-20ms.
When I have it use RequestDispatcher to return a processed JSP page, it never takes less than a full second.
(I am on localhost with Tomcat 6.20 using the connector org.apache.coyote.http11.Http11NioProtocol)
Now I am a servlets newb, but I thought JSP's are essentially servlets. So there should be a way to run my Comet servlet and then have it call my JSP in serial and only double the processing time.
Is there a faster way than RequestDispatcher to process a JSP page and send it to the client from my servlet?
Thanks.
moeshroom

If you understand HTML and CSS well enough to just write it in Notepad, you are light years beyond most beginners here.  Understanding the code is usually the steepest curve of all.  Think of DW as a really advanced Notepad with color-coded editing and a visual preview of the code.  With that I would recommend doing your coding in Dreamweaver and use Fireworks/Photoshop to optimize your graphics for the web and export those pieces, but not code (HTML or CSS).
If you feel the curve is too steep at first and your job needs to be finished, stick with what you know. 

Similar Messages

  • A better way to initialize imported taskflows and BCs with current user

    Hello.
    I'm currently developing a composite application containing one main application and a number of subapplications (modules) packed in adflibs.
    Main application has a side menu and a dynamic region, showing taskflows (on fragments) from adflibs.
    Main application is configured with adf security and it has current login and queries his ID. I would like main application to tell modules current user ID rather than each module to find out current user on their own.
    So there is currentUserID input parameter required in each imported taskflow. And my question is what is a better way to process this ID in the modules?
    What I have previously done is:
    I've created a custom BC classes layer, VOImpl and VORowImpl have getIdUser() method. This method reads currentUserID parameter from pageFlowScope where the taskflow is storing the parameter.
    Top-level View Objects have :IdUser query parameter and corresponding bind variable. This bind variable has value="source.getIdUser()", calling the method from custom VO class.
    This way works fine but here and there I read that it is a bad practice to access pageFlowScope from BCs.
    I could agree with this in case someone could share a better way.
    So what is a good practice?
    Thanks.
    ADF/JDev 11.1.2.3 - 12

    Why don't you use adf security for this? Read Oracle ADF: Security for Everyone which give you an overview and sample on how to implement this.
    Timo

  • Working with request and respond in Java.. Help needed.

    I'm currently working on making a old time- multiplayer shooter in java.
    It will have a TCP server, that got all the games that are hosted
    And all clients will connect and get the list of hosted games from this server..
    To communicate, I made interfaces for request, and respond.
    Logon object:
    public class LogonObject implements Serializable, MSRequest, MSResponse {
        public String USERNAME;
        public String PASSWORD;
        public void clientWork(MainServerManager client) { // client will do this work..
            // Client work..
        public void serverWork(RCOS server) { // RCOS is the threaded object that contains socket to the client etc..
            // Serverwork..
    }So currently, my cast in client looks like this:
            MSResponse objCast = (MSResponse) obj;
            objCast.clientWork(this);Since all the objects im sending, will be of either type of MSRequest or MSRespond, i have not found any problems with it.
    But im wondering if there is any better way to do this?
    One of the reasons why im wondering, is because i want to split up the project a bit.
    At the moment, i got everything in one project (in Netbeans), and got packages like: Client, Client.Network, Client.GUI, Server, Server.Network, Server.DIV, Shared.NetworkObjects, and so on.
    Shared contains all the classes that will go back and forth the client and server.
    But I want to split them up into different projects. So Server is a project at its own.
    So i tried in netbeans, to make one project for Server, one for Client and one for Shared.
    This i thought would work out great, but when i tried to add the projects as libraries, I could'nt add both ways.
    This is how i would want it to work:
    Server (Access to shared)
    Client (Access to shared)
    Shared (Access to client and server)
    Except when I add Shared in Server as a library, I cant add Server as a library in Server, and same for client.
    Netbeans gives me the message: Can't add cylic reference.
    So that brings me back to the question, is there a better way for me to split it up, or make the shared network files?
    Ps: Sorry if its the wrong forum, but it goes under more than one thing, atleast as i figure.
    Kind reguards..

    Lgeee wrote:
    And how would i go about doing that?By making a proper design.
    This way, I can easily do what the object itself is made to do, without writing alot of code that checks what kind of object was sendt.
    The first way I did this was:
    Psudo Code:
    Object obj = input.readObject();
    String type = obj.getClass().toString();
    if (type.contains("logonObject")) {
    } else if (type.contains("playerObject")) {
    I don't think that's relevant. I don't see where that code uses anything which is specific to the server and to the client. Those class names look like they belong in the server, so that code shouldn't be in a "shared" class. It should be in a "server" class.
    As for the issue of having to tell what kind of object was sent, I'm sure there are better ways than just sending an object and then having the receiver inspect the object to see what kind of object it was.

  • Does any one know is there a way to take off maps and passbook off  your phone

    Does any one know, is there a way to take off maps and passbook app off your Iphone ?

    I have just put them on last window, out of the way- useless.

  • TS2755 is there a quick way to take a photo and send it from messages application on the computer

    is there a quick way to take a photo and send it from messages application on the computer

    Just the regular way. Take the photo and then open the Messages app and select that photo and send it. That does not seem hard.

  • Is there a way to take a screenshot on iPad with one hand?

    I have a friend with only one working hand, and I have recommended an iPad to him. However, the only way of taking screenshots that I can find needs two hands. Is there another method?

    I tried this approach and while it does work, with the latest iOS AssistiveTouch there's an even better way to take a single-handed screenshot:
    1. Press the AssistiveTouch home icon to display the options overlay.  Hint: You can enable AssistiveTouch all the time or set triple-click Home to bring it up.
    2. Press the Device icon.
    3. Press the More icon.
    4. Press the Screenshot icon.
    And taking the screenshot this way also removes the AssistiveTouch overlay from the picture.
    Thanks Apple!

  • HT4759 If I have a late 2006 iMac is there any way to sync my contacts and calendar with my iphone

    If I have a late 2006 iMac is there any way to sync my contacts and calendar with my iphone

    Upgrade to 10.7.5. See:
    Upgrading to Lion
    If your computer does not meet the requirements to install Mountain Lion, it may still meet the requirements to install Lion.
    You can purchase Lion by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.

  • Better way to change telephone, fax and emails in mass?

    Hi,
    What's the better way to change telephone, fax number and emails in mass in ISU and CRM?
    ADDR_COMM_MAINTAIN and ADDR_PERSONAL_COMM_MAINTAIN functions seems to work fine for ADR2, ADR3 and ADR6.  But it does'nt update telephone in KNA1 and LFA1 tables.

    HI EMANUEL
    We to are Implemen SAP IS u
    could u please help us to configure fact sheets
    in SAP CRM interaction centre....
    Which actually contains object like premise,
    installation,meter etc..
    could you please help out in how to replicate fact sheet
    from SAP IS to SAP CRM ...
    or you suggest any alternative

  • Best way to take a form and.....

    Looking for suggestion on the best way to take a form after submission to the DB and allow the users to save it as a PDF?
    So enduser fills out the form online and then clicks the submit...it sends the info to a db then outputs the form in a pdf form so they can save it or print it...
    any suggestion?
    B

    Do a Google search for PHP to PDF
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Why does Siri say she can't take any request and I have to reset my phone so she can work ?

    Happens quite often Siri says I am very sorry about this but icant take any request right now please try again and she loads for a 3 minute and the says this I have to reset the phone settings to get it to work but it is getting annoying
    I tries turning Siri on and off and also resetting wifi renewing lease etc.

    Thanks James, I just tried Siri again and it worked fine on two tests.
    Does this Problem happen often? I have had my Iphone5 for about two weeks and this is the first time I have
    had the problem. My 3gs used Siri to dial phone numbers or use the address book to dial and I never had a problem with it.
    Thanks for posting the system status page.

  • What is the easiest way to sync Google Cal and Contacts with an iMac?

    iTunes will sync Google Contacts, but not calendar. Weird. Why? What's the best fix?

    There must a better way to do this. The problem is, YOU CAN'T UNCHECK IPHOTO in the installer. You pretty much need all the support files which you can't see in the installer, but you usually don't want iphoto.
    1 way to get around this is: Quit the installer if you launched it. Open the install disc > search = (any ilife app) > make visibility option 'invisible'. (if you don't know how, search invisible files in apple's help menu). run through the stuff to find a 'packages' (or some similar name) folder. Inside of that, I install everything except for what I don't want, which for me is the iphoto and imovie stuff.
    Still there must a better way, maybe you can create your own installer from the packages w/ package maker or something and burn that image... Worth trying...
    Please be assured that you will not get full integration between the current apps and the iLife apps in 10.9.x; Mavericks.  The apps don't have all the expected hooks to each other due end of product development. This seems to be the crux of the problems I've had testing to make an idvd dvd.
    If you're running 10.9, I recommend moving on to current replacements that will work as expected. That way you won't be wasting time running down project problems.

  • HELP Filtering and IReport with Dynamic Actions

    Hi all,
    Now that I've upgraded to 4.0, I'm trying to make more use of Dynamic Actions. I followed the example at: http://anthonyrayner.blogspot.com/2010/07/report-filtering-with-apex-40-dynamic.html and it works fine. The thing is that it is based on a select list which kind of takes away from the effect. What I want is to have an interactive report which is filtered by the value in a text box. I want to use a dynamic action that when a user types a search string, the IR is filtered down based on each character typed. I used the "Change" Event on the text box and the Refresh action on the report region for the IR, but it only refreshes when I "Enter" (submit). Any ideas on how I can get an AJAX-like action using dynamic actions?
    Thanks!!!

    Hi,
    See this post
    APEX 3.2 Refresh interective report
    It works also for Apex 4.
    You can call javascript that set your item session state and refresh IR like in that post
    Regards,
    Jari

  • Help with CISCO-887VA adsl over pots and PPPoE with dynamic IP

    Hi
    I've got problem trying to connect the CISCO-887VDSL/ADSL OVER POTS ROUTER to internet. Only got the LAN part working.
    I'm trying to setup PPPoE with dynamic IP
    Followed CISCO's documentations but the commands used were not recognized by the router. Any simple working config for me to follow will be enough.
    I'll appreciate any help. Thanks a lot!
    here's  my config.
    ! Last configuration change at 08:31:51 UTC Sat Feb 11 2012
    version 15.1
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname router
    boot-start-marker
    boot-end-marker
    no aaa new-model
    memory-size iomem 10
    crypto pki token default removal timeout 0
    ip source-route
    ip dhcp excluded-address 10.0.0.1 10.0.0.149
    ip dhcp excluded-address 10.0.0.199 10.0.0.254
    ip dhcp pool sdm-pool
    import all
    network 10.0.0.0 255.255.255.0
    default-router 10.0.0.1
    dns-server x.x.x.x x.x.x.x.x
    lease 0 2
    ip cef
    no ipv6 cef
    license udi pid CISCO887VA-K9 sn FGLxxxxxxx
    controller VDSL 0
    ip ftp username cisco
    ip ftp password cisco
    interface Ethernet0
    pppoe enable group global
    pppoe-client dial-pool-number 1
    no ip address
    shutdown
    interface ATM0
    no ip address
    no atm ilmi-keepalive
    pvc 0/35
    pppoe-client dial-pool-number 1
    interface FastEthernet0
    no ip address
    interface FastEthernet1
    no ip address
    interface FastEthernet2
    no ip address
    interface FastEthernet3
    no ip address
    interface Vlan1
    ip address 10.0.0.1 255.255.255.0
    ip nat inside
    ip directed-broadcast
    ip virtual-reassembly in
    ip tcp adjust-mss 1452
    interface Dialer1
    mtu 1492
    ip address negotiated
    ip nat outside
    ip virtual-reassembly in
    encapsulation ppp
    dialer pool 1
    dialer-group 1
    ppp authentication chap pap callin
    ppp chap hostname xxxx
    ppp chap password 0 xxxx
    ppp pap sent-username xxxx password 0 xxxx
    ip forward-protocol nd
    no ip http server
    no ip http secure-server
    ip nat inside source list 1 interface Dialer1 overload
    ip route 0.0.0.0 0.0.0.0 Dialer1
    ip access-list standard 1
    permit 10.0.0.0 0.0.0.255
    no cdp run
    line con 0
    line aux 0
    line vty 0 4
    login
    transport input all
    end

    Try to check with your ISP the modem string to use for VDSL
    and some ISP support direct dhcp on Ethernet0 without PPPoE.
    An equivalent config is working for me in Switzerland with Swisscom.
    N.B. "modem" under VDSL controller is enable using service internal !
    service internal
    controller VDSL 0
    operating mode vdsl2
    modem co5
    ip source-route
    ip cef
    ip dhcp excluded-address 10.0.0.1 10.0.0.149
    ip dhcp excluded-address 10.0.0.199 10.0.0.254
    ip dhcp pool sdm-pool
    import all
    network 10.0.0.0 255.255.255.0
    default-router 10.0.0.1
    dns-server 8.8.8.8
    lease 0 2
    interface Ethernet0
    ip address dhcp
    ip nat outside
    interface Vlan1
    ip address 10.0.0.1 255.255.255.0
    ip nat inside
    ip tcp adjust-mss 1452
    ip nat inside source list 23 interface Ethernet0 overload
    access-list 23 permit 10.0.0.0 0.0.0.255
    end

  • What is the better way to change name of a site with paths and links?

    Hi!
    i m using dreamweaver cs4 and i have a site already configured on dreamweaver
    i need to change the name of the site and at the same time, every path names and every links
    This site has about 50 pages so i would like to know what is the better steps to do for modified the name of the site unless problem?
    I read the informations about  'manage site' but its not clear for me about links and path names!!
    thank you

    Just use site manager to change the site name. Nothing complicated with that.
    What exactly do you mean by changing path names? Do you want to change the name of folders in the site? If so, just change them within DW and it will prompt if you want to update links.

  • Is there a way to take single songs and make one album out of?

    If you have asst songs from an artist and want to make your own mix mpg albums to put on ipod, can this be done? If so how?

    sound like you want to make a play list.
    try here: http://docs.info.apple.com/article.html?artnum=93045

Maybe you are looking for