Search Results

Search found 7256 results on 291 pages for 'john blue'.

Page 27/291 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Handling a Long Running jsp request on the server using Ajax and threads

    - by John Blue
    I am trying to implement a solution for a long running process on the server where it is taking about 10 min to process a pdf generation request. The browser bored/timesout at the 5 mins. I was thinking to deal with this using a Ajax and threads. I am using regular javascript for ajax. But I am stuck with it. I have reached till the point where it sends the request to the servlet and the servlet starts the thread.Please see the below code public class HelloServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("POST request!!"); LongProcess longProcess = new LongProcess(); longProcess.setDaemon(true); longProcess.start(); request.getSession().setAttribute("longProcess", longProcess); request.getRequestDispatcher("index.jsp").forward(request, response); } } class LongProcess extends Thread { public void run() { System.out.println("Thread Started!!"); while (progress < 10) { try { sleep(2000); } catch (InterruptedException ignore) {} progress++; } } } Here is my AJax call <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>My Title</title> <script language="JavaScript" > function getXMLObject() //XML OBJECT { var xmlHttp = false; xmlHttp = new XMLHttpRequest(); //For Mozilla, Opera Browsers return xmlHttp; // Mandatory Statement returning the ajax object created } var xmlhttp = new getXMLObject(); //xmlhttp holds the ajax object function ajaxFunction() { xmlhttp.open("GET","HelloServlet" ,true); xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(null); } function handleServerResponse() { if (xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { document.forms[0].myDiv.value = xmlhttp.responseText; setTimeout(ajaxFunction(), 2000); } else { alert("Error during AJAX call. Please try again"); } } } function openPDF() { document.forms[0].method = "POST"; document.forms[0].action = "HelloServlet"; document.forms[0].submit(); } function stopAjax(){ clearInterval(intervalID); } </script> </head> <body><form name="myForm"> <table><tr><td> <INPUT TYPE="BUTTON" NAME="Download" VALUE="Download Queue ( PDF )" onclick="openPDF();"> </td></tr> <tr><td> Current status: <div id="myDiv"></div>% </td></tr></table> </form></body></html> But I dont know how to proceed further like how will the thread communicate the browser that the process has complete and how should the ajax call me made and check the status of the request. Please let me know if I am missing some pieces. Any suggestion if helpful.

    Read the article

  • What language is this?

    - by Blue
    got some keys with patterns like 4AC59BAA63A64327DCE12C0B2CD1A397 and B9E685495FECFC9854E7DBA508D91213 they have 32 chars and i would like not to decrypt then but to be able to make my own, its something like a hash of a file

    Read the article

  • How do I copy files into an existing JAR file with Ant?

    - by Blue
    I have a project that needs to access resources within its own JAR file. When I create the JAR file for the project, I would like to copy a directory into that JAR file (I guess the ZIP equivalent would be "adding" the directory to the existing ZIP file). I only want the copy to happen after the JAR has been created (and I obviously don't want the copy to happen if I clean and delete the JAR file). Currently the build file looks like this: <?xml version="1.0" encoding="UTF-8"?> <project name="foobar" basedir=".." default="jar"> <!-- project-specific properties --> <property name="project.path" value="my/project/dir/foobar" /> <patternset id="project.include"> <include name="${project.path}/**" /> </patternset> <patternset id="project.jar.include"> <include name="${project.path}/**" /> </patternset> <import file="common-tasks.xml" /> <property name="jar.file" location="${test.dir}/foobar.jar" /> <property name="manifest.file" location="misc/foobar.manifest" /> </project> Some of the build tasks are called from another file (common-tasks.xml), which I can't display here. Thanks.

    Read the article

  • script not found or unable to stat: /usr/lib/cgi-bin/php-cgi

    - by John
    I have just seen a new series of error in the /var/log/apache2/error.log [Thu Oct 31 06:59:04 2013] [error] [client 203.197.197.18] script not found or unable to stat: /usr/lib/cgi-bin/php [Thu Oct 31 06:59:08 2013] [error] [client 203.197.197.18] script not found or unable to stat: /usr/lib/cgi-bin/php5 [Thu Oct 31 06:59:09 2013] [error] [client 203.197.197.18] script not found or unable to stat: /usr/lib/cgi-bin/php-cgi [Thu Oct 31 06:59:14 2013] [error] [client 203.197.197.18] script not found or unable to stat: /usr/lib/cgi-bin/php.cgi [Thu Oct 31 06:59:14 2013] [error] [client 203.197.197.18] script not found or unable to stat: /usr/lib/cgi-bin/php4 This server is running Ubuntu 12.04lts. I have never seen this sort of attack before, should i be concerned or securing my system in any way for them? Thanks, John

    Read the article

  • SMTP Relay through exchange

    - by John
    Hi guys, We have a bit of a problem in that we want our printers to email our contractor whenever they develop a fault. The problem is on our corporate network we have no access through the firewall to the internet preventing us to use the external SMTP server. So i suppose the question is can we use our exchange server to do this? IE could I run an SMTP service that would forward to the exchange server which would then send the mail to the contractor? Any ideas welcome! Thanks John

    Read the article

  • Grep a strange acirc character

    - by John Hunt
    I have this character appearing in places in some files I have:  (if you can't see it or it looks like a question mark it's the Acirc character (capital A with a circumflex over it)) I simply want to grep replace this char with a space, however when I do this: grep --color -ri  myproject.php Putty gets very confused, as does grep. As I understand it there's probably a way to use an escaped hex code with grep.. does anyone know how? EDIT: The character is showing up on my web page as a weird <?>. The http headers for the page specify utf-8 as does the meta character set and I still see the strange character. In putty it appears as a space (putty also set to utf-8.) When I copy from vim and paste into grep it simply doesn't find it. Cheers, John

    Read the article

  • counting unique values based on multiple columns

    - by gooogalizer
    I am working in google spreadsheets and I am trying to do some counting that takes into consideration cell values across multiple cells in each row. Here's my table: |AUTHOR| |ARTICLE| |VERSION| |PRE-SELECTED| ANDREW GOLF STREAM 1 X ANDREW GOLF STREAM 2 X ANDREW HURRICANES 1 JOHN CAPE COD 1 X JOHN GOLF STREAM 1 (Google doc here) Each person can submit multiple articles as well as multiple versions of the same article. Sometimes different people submit different articles that happen to be identically named (Andrew and John both submitted different articles called "Golf Stream"). Multiple versions written by the same person do not count as unique, but articles with the same title written by different people do count as unique. So, I am looking to find a formula that Counts the number of unique articles that have been submitted [4] (without having to manually create extra columns for doing CONCATS, if possible) It would also be great to find formulas that: Count the number of unique articles that have been pre-selected (marked "X" in "PRE-SELECTED" column) [2] Count the number of unique articles that have only 1 version [4] Count the number of unique articles that have more than 1 of their versions pre-selected 1 Thank you so much! Nikita

    Read the article

  • Looking for the best ec2 setup for 3 sites totaling in 1.5 mil in traffic monthly

    - by john h.
    I am looking to consolidate our current aws setup of 2 Large ubuntu ec2 servers and 2 large RDS server for our 3 websites that have a total of about 1.5 million hits a month and increasing every month with the majority of traffic (1 mil) to one forum site in the group and the rest of traffic to an ecommerce site and a small wordpress site. So here is my question/thought? Would it be better for us to combine the two ec2 large servers to just one and same with the 2 RDS servers so we run all three sites off one large ec2 and one RDS. -or- Should we setup maybe 2-3 smaller ec2 servers load balenced and a single RDS. -or- Something completely different setup? One concern is that if one site crashes it takes with it the others. It happened in the past but I am pretty sure its because of the forum software and not the server setup. -john

    Read the article

  • Guestfish not found on Debian 7 when execute virt-copy-in [on hold]

    - by John Wang
    When I execute virt-copy-in command on a kvm host(Debian7.1), I got error saying "guestfish not found". However according to the dpkg comamnd, guestfish do have been installed: john@sver:~$ dpkg-query -l | grep guestfs* ii libguestfs-perl ... ii libguestfs-tools ... ii libguestfs0 ... What's the problem? Is the libguestfs-tools not the guestfish in Debian? Or it's just a broken dependency in libguestfs-tools in Debian7.1(my KVM Host)?

    Read the article

  • Adding a single 300Gb SCSI drive to poweredge 2850

    - by John Steele
    I have a 2850 setup with 3 146Gb drives, two partitions 1 12GB system with server 2003 sp2 and 1 261Gb Data. I am strapped on disk space on the data partition having to push data around. I wanted to add a 300Gb single drive for lesser critical data, is this possible? Or is it best to add 2 300Gb drives for another RAID 1 configuration? This is my church network and while it is mission critical it is not enterprise so I can take it down for a few hours. Any pointers to documentation or direct help would be greatly appreciated. John

    Read the article

  • When DNS doesn't cache

    - by John Francis
    We've had some odd DNS problems over the past couple of days that I don't fully understand. Some of our DNS names stopped resolving for some of our customers due to some 'unknown' server reconfiguration at our DNS provider. The problem seemed to be intermittent i.e. stopped working and started working within a few minutes over a couple of days. I'm no expert on DNS, but I'd have expected DNS caches to prevent this sort of thing from happening - when we need to change an IP address for a DNS record, it can take 24 hours to propogate, so how can our DNS provider be breaking name resolution intermittently for our customers so easily? Shouldn't the DNS caches kick in here? We had a similar problem about a month ago when one of their nameservers 'decided to reload the DNS database from scratch' - this broke our name resolution too. Again, why didn't the caches satisfy the name resolution requests. Any guesses would be appreciated. John

    Read the article

  • Email censorship system

    - by user1116589
    I would like to ask you about any censorship / moderation system. Basic workflow of events: Customer sends email to [email protected] from [email protected] ACME administrator receives notification and can moderate email After moderation administrator confirm an email and send it to [email protected] John answears to [email protected] Before the email is send it is moderated again by ACME administrator What is important, that this functionality is easy to do with some CMS/CMF systems. The problem is that we do not want to use an extra domain and force customer to login an extra system. Customer should only use his own email box or desktop email application. Thank you, Tomek

    Read the article

  • Why do we need Hash by key? [migrated]

    - by Royi Namir
    (i'm just trying to find what am I missing...) Assuming John have a clear text message , he can create a regular hash ( like md5 , or sha256) and then encrypt the message. John can now send Paul the message + its (clear text)hash and Paul can know if the message was altered. ( decrypt and then compare hashes). Even if an attacker can change the encrpyted data ( without decrypt) - - when paul will open the message - and recalc the hash - it wont generate the same hash as the one john sent him. so why do we need hash by key ?

    Read the article

  • Syncing contacts to iOS device with Exchange

    - by flackend
    I set up a Microsoft Exchange account on my iOS device to sync my Gmail contacts. But Microsoft Exchange is ignoring phone numbers that are labeled as 'iPhone' or 'main'. For example, John Smith: On Mac and Gmail: John Smith main: 123-334-1212 home: 123-330-1002 work: 123-330-8211 iPhone: 123-778-5556 On iOS device (via Exchange sync): John Smith home: 123-330-1002 work: 123-330-8211 I'd like to sync my contacts from my Mac to iCloud and Gmail, but you can't do both: Is there a solution to sync iOS and Gmail contacts without using Exchange? Thanks for any help!

    Read the article

  • The simplest Ubuntu mail server

    - by John G.
    After days of trying all sorts of tutorials I finally found a simple solution (not necessary the best) for a functional ubuntu mail server: sudo aptitude install postfix next type sudo dpkg-reconfigure postfix and configure like this: Internet Site yourdomain.com john (type your ubuntu user) yourdomain.com, localhost.localdomain, localhost No 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/192.168.0.1/24 (192.198.0.1 replace with your server ip address) 0 + all next install mail-stack-delivery sudo aptitude install mail-stack-delivery At this point you have a working mail server. Next, I configured SquirrelMail and start sending and receaving mail. This configuration worked with both Apache and Nginx.

    Read the article

  • syntax error: unknown user 'munin' in statoverride file

    - by John
    Server running Ubuntu 12.04 lts I installed munin the other day on a server. I decided later to remove it with apt-get. I noticed that not everything was removed from the installation so manually removed the munin web directory and also removed the munin user-name and group from the sever. However I have just now tried to run apt-get upgrade which is now returning an error: dpkg: unrecoverable fatal error, aborting: syntax error: unknown user 'munin' in statoverride file E: Sub-process /usr/bin/dpkg returned an error code (2) I am now out of my depth. What does this mean? Google results have not really been helpful. Can anyone help? Thanks, John

    Read the article

  • Mass remove passwords from rar archives

    - by ldigas
    Is there a way to (I'm using WinRAR; demo, but I'm willing to change it to whatever is needed) mass remove passwords from a bunch of files ? Problem description: for reasons unknown to me, some archiving was done for two-and-something years in RAR format, and all archives have passwords. I have a list of them, them all being similar (mostly something like John-03, John-04, John-05 ... e.g. name-month ...) but I need to manipulate the files at large, and it is a real problem removing and or dearchiving all those files, while entering passwords manually. What would be my best options concerning ? Ideally, I'm looking for some kind of archiver which tries out a predefined list of passwords, and asks only if non of them cracks the safe. Afaik, WinRAR has no such feature.

    Read the article

  • Automate configuration change on Outlook 2007

    - by Julien Vehent
    I am migrating a bunch of mailboxes to google apps. Each user owns several mailboxes each serving different domains (john has [email protected], [email protected], and so on...) Currently, those accounts are hosted on (edit:NOT an exchange server) an old SMTP/POP server we want to replace, and I need to edit their outlook 2007 configuration to change the pop, smtp and password parameters. The hard way to do it is to connect to each outlook session and edit the parameters manually. I want to avoid that. Because that represents over 700 accounts spread between 40 users... :'( How can I automate this configuration change ? In the active directory ? Using a PRF file ? note: I'm a linux sysadmin with very little knowledge of windows's black magic.

    Read the article

  • How do MaxSpareServers work in Apache?

    - by John Hunt
    I've scoured the web but I can't find out what MaxSpareServers are in Apache MPM prefork.. The MaxSpareServers directive sets the desired maximum number of idle child server processes. An idle process is one which is not handling a request. If there are more than MaxSpareServers idle, then the parent process will kill off the excess processes. Great, but what causes a spareserver to be created? More importantly, when does a spare server go away? I understand that minspareservers are created gradually after the server is started.. How do maxspareservers relate to maxclients? Basically I'm at a bit of a loss on how best to configure Apache.. there's a lot of documentation out there but it isn't that clear. Thanks, John.

    Read the article

  • Restoring Subversion repositories from backup

    - by John Hoge
    Hi, I had to restore a subversion server from a backup image taken the previous night. Everything worked fine after the restore except for one repository. A working copy had been committed on the server after the latest backup, so this working copy had newer files than the restored repository. I tried to commit the files using tortoise, but SVN didn't recognize that the files on the working copy were newer than those in the repository. I'm using Subversion Server 1.6.5 on Windows 2003 Server and TortoiseSVN 1.6.8 64 bit on a Win7 64 bit client. Thanks, John

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >