Servlet start (cool!) - stop (bad) ...  :(

Hi, i create a class where a invoke a Thread ...
if(actionevent.getSource() == jbutton1)
(new ssthread()).start();
jtextfield7.setText("ON");
the name of the Thread ssthread ...
and this start the servlet (and the server ...) all is pretty cool, but i dont get to stop it , in the sample say ...
// when you want to stop the server, simply call
     // server.stop();
I try some ways but i didnt ....
here is the code of the Thread .....
public class ssthread extends Thread
public sstthread()
public void run()
char c = '\u1F90';
java.net.InetAddress inetaddress = null;
String s = null;
httpserver = new HttpServer(c, inetaddress, s);
try
URL url = resolveURL("webpages");
httpserver.setDocumentBase(url);
System.out.println("Starting with docbase of: " + url);
httpserver.start(); // ok ...
catch(MalformedURLException malformedurlexception)
System.out.println("Malformed URL Exception for doc root");
System.out.println(malformedurlexception.getMessage());
catch(HttpServerException httpserverexception)
System.out.println("Server threw an exception while running");
System.out.println(httpserverexception.getMessage());
// httpserver1.stop(); I have TO STOP IT CALLING IT ... how can i calling it ??? please
private static URL resolveURL(String s)
throws MalformedURLException
if(s.indexOf(":/") > -1)
return new URL(s);
if(s.startsWith("/"))
return new URL("file", null, s);
} else
String s1 = System.getProperty("user.dir");
return new URL("file", null, s1 + "/" + s);
HttpServer httpserver;
please help me ... all compile ...and work cool , but i get exception in all the way that i tryed ...
cu

Similar Messages

  • Lightning to 30 Pin Adapter Charging Starts and Stops Intermittently

    I purchased two Lightning to 30 Pin adapters, and both are exhibiting the same problem.  They seem to start and stop charging intermittently on my iPhone 5, which, to be clear, is not in a case, nor is the adapter obstructed in any way.
    I purchased one for a dedicated iPhone/iPad charging station that I keep by my nightstand.  The adapters fit flush with the 30 pin connector on the charging station side.  At least three or four times during the night, the phone vibrates twice with the "you've just connected to power" alert and wakes me up. Trying the same thing in the car with the other adapter, the iPhone charging starts and stops while connected to my 12v power converter via a Twig cable.  When I connect the standard Lightning cable to either the charging dock (through its included USB ports) or directly to the same 12v converter plug in my car's cigarette lighter, I have no trouble charging at all.
    Has anyone else seen this behavior?  Could I have two faulty adapters (which doesn't seem likely), or is there something in the nature of the adapter that makes it turn on and off the charging on occasion?

    I have the same problem. I bought the same type of Speck Candy Shell case that I had for my 3GS iPhone. The $34.00 Lighting to 30-pin adapter will not fit through the case and into the IPhone 5. I just talked to Apple support and after being on hold 5 mins while the tech talked to her supervisor, the Apple solution is "take your case off the phone when you want to use the adapter". I hope thousands of us complain and Apple fixes this. If Apple had not been so secretive and talked to accessory manufacturers they would of know that the Adapter they designed was faulty. Now I how to drive to an Apple store to return the Adapter to get my money back. Only the USB cable will fit through the case into the iPhone 5.
    Bad Adapter design my Apple. Thats what happens when you design a product for millions of people - in a secretive bubble.

  • Re: Satellite C660 - Fan starts then stops

    Hello
    Sorry for my English I am French, I have a laptop Toshiba Satellite C660 few days ago and I noticed that the fan starts and stops every minute at all times, when temperatures exceed about 40 degrees (noted with SpeedFan).
    Even if I'm just the office, the Internet. However it does not heat much. Is this normal?
    Before I had a laptop and the fan did not stop but almost never had little noisy. I prefer that way, but this is can be a simple matter of habit for the Toshiba ...?

    it is not normal at all. it goes on and off about every 30 seconds! it is downright disturbing! it drives me nuts!
    by the way, people have already complained in may 2011 about it:
    http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=59733
    i upgraded the bios to version 1.4 and nothing has changed. and NO, changing anything within the power options does not make it any better.
    do we have to ask for help by this gentleman?
    "fan speeds are set in BIOS and BIOS causes the fan of Satellite L670 to be too noisy for no reason. it is very important to cool the CPU-GPU down but Satellite L670 doesnt do it efficiently as Sat L670 uses a 0/1 approach. i have modified BIOS of Sat L670 and it is much less noisy now and temperature usually does not rise. when temperature rises then the fan works full speed of course. but thats not often. you can write me an email if you would like to know more [email protected]"
    TOSHIBA we need SOLUTIONS, not words!
    thanks for your help.

  • Start or Stop expression at a given frame?

    hello to everyone on the support forum.
    I searched the forum but wasn't able to find anything quite good for resolving the matter.
    This is something that my IT group Charles Stinson, Nick Carangi, and Sandra Connor have been working on fixing for a while.
    I'm getting into expression but the issue is that I am not able to start or stop an expression at a given moment.
    I.E. If i want to wiggle(3, 10) until frame 100.
    How can I set this up?
    Thanks in advance.
    After Effects Cs5.5

    Rick and Dave are correct that it may be easiest to split the layer, but there are examples in After Effects Help for doing this with expressions, here:
    http://helpx.adobe.com/en/after-effects/using/expression-examples.html#expression_example_ start_or_stop_wiggle_at_specific_time

  • Start and Stop Trigger using PXI-6120 and DigitalSta​rtAndStopT​rigger.vi not working :-(

    Hello,
    I've been trying for a while now to get my PXI unit to capture a waveform between a Start and Stop (Reference) Trigger using the NI example DigitalStartAndStopTrigger.vi downloaded from the NI website. However, whilst the start trigger and stop trigger seem to be working i.e. the VI runs and stops at  the correct times there is never any data read from my DAQmx compatible PXI-6120 card. So I can see the VI is running around the aquisition loop but the Property Node AvailSampPerChan is always returning zero... this has me slightly puzzled. I thought this might just be a driver issue so I've updated my box to the following software versions (see below) and installed the latest drivers e.g. DCDNov07.exe (also from the NI site) but nothing has changed.
    my software as of now.
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.3.0.49152
    DAQmx 8.6.0f12
    Trad DAQ 7.4.4f7
    before I updated I had the same problem but with the following versions:
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.2.1.3001
    DAQmx 8.5.0f5
    Trad DAQ 6.9.3f4
    So to cut a long story short I still have the same problem with the triggers... does anybody have any ideas what is going wrong?
    To add insult to injury it the traditional DAQ example ai_start-stop_d-trig.vi was almost working correctly before I did the upgrade. It had the strange behaviour of capturing the AI0 channel but on the wrong edges (e.g. if I set Start on Rise and Stop on Fall it would do the opposite, Start on Fall and Stop on Rise).
    I'm going to leave my box doing a mass compile over night but i'd really like it if someone could suggest a solution or point me in the right direction.
    Many thanks,
    Mike

    Hi Graham
    I'm out of the lab today but I'll try and answer your questions as best I can...
    1) What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?
    At the moment I have all the values (e.g. sample rate, buffer size etc) unchanged apart from the ones I mentioned in my previous post (see above). I have in the past played around with changing the buffer sizes and rates in the example VI but as this appeared to have no effect on the behaviour I now have them setup as in the download.
    2) Does the program end after the stop trigger is implemented?
    Yep, if I toggle the trigger line high then low I see the program exits the read loop and the VI stops running as expected.
    3) Lastly can you give me the details of triggering method. Are you
    using a digital train of users set digital pulses? how long is the
    program running.I'm using the WriteDigChan.vi to manually toggle the first digital line of the PXI-6733 card which is wired directly to PFI0 of the PXI-6120 card. Generally, I just start the VI running  and then toggle the line high, wait a couple of seconds and then toggle it low.
    To me it all looks like it should be acquiring samples but as I said yesterday it just refuses to fill the buffer with any data (and hence no samples are read).
    Any ideas? and thanks for you help,
    Mike

  • I do not have the 'Advanced' tab on the menu bar. I am trying to change ringtone on my iphone 4s. Have done the following: Right cick on song, entered the start and stop times, but unable to proceed as need 'Advanced' tab in order to change to option.

    I do not have the 'Advanced' tab on the menu bar. I am trying to change ringtone on my iphone 4s. Have done the following: Right cick on song, entered the start and stop times, but unable to proceed as need 'Advanced' tab in order to change to option.

    You don't need to upgrade your software.  But if you're struggling with Spry, IMO you should cut your losses and switch to something better for the longrun.
    If you have a budget to work with, I highly recommend Project Seven's Pop-Menu Magic 3.  It's easy to use in DW CS4, 5, 6 or CC.  More importantly, it's bullet proof and works in all devices. 
    Pop-Menu  Magic3 by PVII (commercial DW extension)
    http://www.projectseven.com/products/menusystems/pmm3/index.htm
    If you don't have a budget to work with, you can roll your own menus with jQuery plugins.  A bit more effort on your part, but they perform better than Spry.
    jQuery Superfish
    http://users.tpg.com.au/j_birch/plugins/superfish/
    jQuery MegaMenu2
    DEMO:
    http://www.geektantra.com/projects/jquery-megamenu-2/
    DOWNLOAD:
    http://code.google.com/p/jquery-megamenu/
    Nancy O.

  • Need help getting Tomcat 5.0.28 to start (and stop, eventually)

    Hi!
    I am such a newbie to the Terminal and writing scripts, so please forgive my naiveté. I have successfully installed Tomcat in my /usr/local directory, but I am having trouble creating files to start and stop Tomcat, per the instructions on the following page:
    http://developer.apple.com/internet/java/tomcat1.html
    I've followed the directions but continue to get the following error after I execute ~/bin/start_tomcat.
    -bash: start_tomcat: command not found
    My file contains the following code:
    #!/bin/sh /n
    export CATALINA_HOME=/usr/local/jakarta-tomcat-5.0.28 /n
    export JAVA_HOME=/usr /n
    $CATALINA_HOME/bin/startup.sh /n
    If anyone can help me, I would really, really, really appreciate it!
    Thanks!
    PowerBook G4 12"   Mac OS X (10.4.5)  

    Why are there all those "/n" there? Either you or the place you copied from has the wrong slash. But still, it's wronger than that to have them at all: "\n" means a newline (i.e., press "return") not the actual "backslash en" characters. Sometimes people post code with those \n visible: by making it explicit where a line-break should be, one doesn't have as much trouble when a web browser reformats the text and puts line breaks where they don't belong.

  • HP PRO 3400 Series desktop won't boot CPU fan starts and stops , no video, no beeps

    I have the above computer with an i3-2125 CPU, Windows 7 Home Premium 64 bit, and a 300GB Seagate Hard drive.  I've had it for about 2 years and been working fine. It started acting up about 2 months ago.  It would lose the date and time.  I checked the battery, and it was OK, so I kept using the computer.  Then on 9/15/2014 it hung on "Starting Windows", I did the following:
    1.  Ran the built in HP diagnostic on hard drive and memory and they both passed.
    2.  Tried to go to last known good configuration and nothing happened.
    3.  Noticed the date and time were off, replaced the battery, nothing changed.
    4.  Tried another hard drive from another HP PRO 3400 Series and it would boot up but could not set date in bios.
    5.  Tried all kinds of things but could not set date in bios.
          a.  Bios date read 48/00/0048 after removing and replacing battery.
          b,  Tried to reset date to 9/16/2914 and it gets 56/00/0051
    6.  Then it wouldn't boot at all.   So now when you turn on the power, the CPU fan starts and runs for about 1 second, then shuts off for 4 seconds, then starts and runs for another 1 sec and it does this continuously.  There is  no video and no beeps and no difference when all memory is removed.
    7.  I removed the power supply, and checked voltages.  It appears to be OK.
    8.  I removed the motherboard, and inspected it- saw nothing obvious.
    9.  I connected the power supply to the motherboard with nothing else connected to the motherboard, and I get the same thing.  CPU fan starts then stops continuously, no video no beeps.
    10.  I am thinking it is the Motherboard, but I sure could use some suggestions as to what to do next.
    Thanks
    Maxgle from CA

    Maxgle, welcome to the forum.
    I believe that you would get more responses to your problem if you start a thread here.  They are the members who know your computer best.
    Please click the "Thumbs up + button" if I have helped you and click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • When I try to buy any app or song from iTunes app or app store on iPhone 5 it seems to start the stops and goes back to baseline in a second or two

    When I try to buy any app or song from iTunes app or app store on iPhone 5 it seems to start the stops and goes back to baseline in a second or two.
    It did it with my old iPhone 4 in last month or so, and it I hoped it would go once I updated to new iPhone 5. The problem has transferred to new phone too.
    I can't sign in to iTunes account on iPhone. It takes the password then resets to baseline. No error message comes up. On the base computer (pc) it will allow me to sign up and buy songs, apps etc. I can then sync the phone and put them on it. It just won't let me buy direct from the .
    As there are no error messages I am at a loss what to do. I have updated the payment details on my account, and my husband has an iPhone 4 and has no such problems. We share the same wifi. I have tried with 3G as well as wifi, with no luck.
    I am pretty much out of ideas, and have tried searching forums but there is so much overlap between queries that I can't find a similar problem from someone else, but I am sure it exists!
    Can anyone please help me?
    Thanks in advance
    Sarah

    I figured it out!
    I read a solution for something that sounded similar.
    Anyone in similar position:
    Open iTunes app on iPhone, and pick an option from bottom, such as music. Then scroll down to bottom of page and where your iTunes ID is, press on it, and pick sign out.
    Then return to home screen, and double press home button and press and hold on first icon showing, until a minus symbol appears in the top left of icons present. Press on each minus symbol on each app in turn, until all app icons have disappeared. Then Restart the phone by pressing and hold the home button and the on/off/standby button at top of phone, until the apple symbol appears in centre of blank screen.
    Swipe to turn phone fully on and open settings and scroll down to iTunes and apps option and tap that. Pick sign in and put in your apple ID, it will accept it and then return to home screen and open iTunes a you'll find it works fine
    Simple really, but some like me won't think f this themselves!
    Hope that helps

  • Emac tried to start then stopped, finally after 3 attempts it started

    After a hard drive failure i run my emac on an external hard drive through a fire wire.
    That worked OK till yesterday when it tried to start but after a few seconds of the normal fan noise and before the screen lit up, it stopped. I hit the switch again and it did the same thing 3 times but on the 4th attempt it started but a white screen came on and told me to type "mac-boot" and hit return.
    It finally started.
    The external hard drive was still running OK at the time it had stopped, it was internally that it had stopped.
    I took the back off the emac and vacuumed the dust from inside and after that it has since started normally every time though it seems slower to start, but I could be mistaken about that as I can't now remember noticing how long it took to start before.
    Someone said the problem could be the power supply failing.
    Is there any way for me to diagnose what exactly is wrong, since an emac power supply is not same as a PC power supply?
    Could a PC power supply be modified to replace the emac power supply as I have a failed PC with a good power supply I could use if it would work?
    Any help or suggestions would be appreciated.
    Ann

    Hello and thanks for your reply.
    I neglected to mention that at the time of the hard disk failure I put a new hard disk inside too with the intention of using it as a back up to the External Hard Drive but I found it was easier in the end to get another external hard drive and now I use Time Machine to back up on to that 2nd external hard drive every few days.
    I disconnect the 2nd external hard drive when I'm not backing up data on to it.
    Most of the time when I boot up the emac it somehow knows to go straight to the 1st External Hard Drive instead of the Internal Hard Drive but occasionally it will go to the Internal Hard Drive and when it does that I have to go to System Preferences and then to Startup Disk and actually select the External Hard Drive icon and that's what I had to do every time when it was having that weird starting then stopping phase, ie, every time during the starting then stopping phase, when it did start it went to the Internal Hard Drive even after I would go into Startup Disk and select External Hard Drive it would start on the Internal Hard Drive, so in the end I didn't bother trying any more and I just connected to the internet through the Internal Hard Drive until I took the back off and vacuumed the dust out and ever since I did that it's been running normally, ie, it's always selecting the External Hard Drive again and running at what seems to be normal speed for everything too.
    I just don't know why it went into that starting then stopping phase.
    When it was in the starting then stopping phase the internal fan noise would stop but the little white light next to the DVD door would stay lit up so it was definitely getting some power from somewhere but it was failing to go on and boot up because the power to the internal fan had failed ie, I could clearly hear the fan stop only 3 or 4 seconds after hitting the start button.
    I've just had a look at the capacitors that you suggested and they look perfect, like new in fact, they have a shiny metallic top with a + indented in the top and they are flat and they show no sign of a dried up liquid or any bubbling up anywhere.
    Anyway, your reply was helpful since you ruled out the Power Supply and the capacitors, so thank you for those.
    The friend who advised me how to get going again after the initial hard disk failure, ie, via the External Hard Drive connected by fire wire, did warn me not to touch anything in the back that wasn't directly related to changing the hard drive but thanks for the heads up anyway.
    Ann

  • Report on active sync actions (like starting and stopping the sync)

    Is there a way to report on who stopped or started an active sync? I'm guessing it has to be stored somewhere, but I can't find it.
    Thanks!

    Hi Smit,
    I believe you are talking about FMS AWS instance and you may be using a centos 4.0.2 instance AMI or lower?
    Well ... earlier,  options for stopping a centos AWS image was not available, but recently they are there in place, so I suppose if you use a new centos 4.5.1 AMI then probably you can start stop the aws instance on yuor will. Give ut a shot and let me know.
    Regards,
    Shiraz Anwar
    I again cross-checked and found that you were right, start and stop is not supported there .... an alternative method is to take a snapshots of the runinng instnace and terminate that instance after that, later you can use your snapshot to attach to the EBS volume to run your system again. You may need to use the Elastic IP address, because you wont like your users to update each time you terminate the old instance, and create new instance from snapshot. I have never used it in this way, but this is one of the approach.

  • Music starts and stops during playback of burned DVD

    I really need help with this problem...I made a slideshow and added music from itunes in the program IDVD. Once I burned the DVD the music will start and stop throughout the DVD and not at chapters as I read in other threads - but in random places on the DVD. The DVD sounds like it gets hung up and then starts again. This is my first project using IDVD, so any help would be great.

    Debra,
    Do your project have music purchased from iTunes? If so, that could be the cause of this problem. Music from iTunes is DRM-protected and can cause problems in playback. To take care of this, first burn all of your purchased music to a CD, then reimport in an aiff format. To do this, in iTunes, go to iTunes>Preferences>Advanced>Importing. Look for "Import using", and use the drop-down menu to select AIFF encoder.
    Good luck.

  • In Month View, showing start and stop times for appointments

    Hi, I want to show both the start and stop times for all appointments in my iCal Month view and have not been able to figure out how to do that. Any suggestions? - Dave

    I would also like to know how to do this if possible. I want to print month-view schedules with start and end times for events. Thought I'd bump this up to see if anyone has any ideas.

  • Printing event start and stop times

    In month view, is there any way to have both the start and stop times for an event show when you print the calendar so you can see the duration of an event - thanks.

    You might be able to use this script to reset the start/stop times to zero.  Try with a small selection and see if it works for you.
    http://dougscripts.com/itunes/scripts/ss.php?sp=batchtrimtime

  • Start and stop a loop automatica​lly subtractin​g at each iteration

    Hi there,
    I know that there are some topics about it, but I could not find any solution, especially because I use the version 7.1 and cannot open new version files.
    My problem is as follows:
    I need to charge a tank from 6 to 10 in the morning, every day during 3 days. The process must start and stop automatically, which means, no bottoms to start or stop. The start and stop conditions come from the hour.
    I start with a big loop of 72 iterations, which corresponds to 72 hours.
    The tank must start at level 6 every time it starts.
    After the start, 1 unit must be subtracted in each iteration. Which means, that at 6 am the tank has level 10, at 7 am level 9 and so on. In the end, at 10 am the tank level is equal to 2.
    In the next day, the process must start again and the tank must start at level 6.
    Any suggestions? Thanks in advance.
    Solved!
    Go to Solution.

    While this may work it can be improved significantly. This really isn't a state machine. This is basically the same as your flat sequence with the exception of using a While loop with a Case statement to implement each frame.
    You should define what your actions are and create a typedefed ENUM naming them. State names of 1 through 24 are meaningless. Not to mention in your code many of the cases are duplicates of others. That would mean that all of those can be one state with logic to determine what action/state comes next. A properly defined state machine would not need the outside For loop. Without knowing your specific needs some examples of reason state names would be the following: Start, Stop, Exit, Error, Initialize, Get Tank Level, Fill Tank, Drain Tank, Idle, etc. Can you see how these are easier to understand than 1 through 24.
    There are lots of examples of state machines here. Try a search and take a look at some of them.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Maybe you are looking for

  • Unwanted Duplicate JButtons

    I'm creating a JPanel class which contains a JLabel and two JButtons. The problem is that both JPanel add button statements: this.add(myJButton, new XYConstraints(5, 165, 30, 30)); Are creating extra JButtons, but ones that apear in the defalt positi

  • Exchange 2010 - Accepting Messages Above the Attachment Size Limit

    Recently we implemented a new Exchange 2010 server in a site. This site is in another country with very poor WAN connectivity.  Our standard attachment limit is 50MB (51200 kb) . Since we have put this server in place I am seeing messages get stuck i

  • BI Activities in Service Pack Upgrade

    Hi, We are upgrading all the systems to the next service pack. Presently BI is on Netweaver Stack 12 and application stack 14. Basis is planning to upgrade the Netweaver stack to 17 and application stack to 19. As part of this upgrade project they wo

  • Reader X - bugs???

    Since downloading reader X, all of my company documents have become unusable!  All have a "submit" button that sends the forms to various people.  All worked fine in other versions, suddenly they do not.  This is extremely irritating, is this a bug a

  • Support Patch 17 Updatioin Error

    Hi, I'm facing problem while updating the Patch 17 to my SAP WAS...The installation stops at updating JDBC Drivers and the error in the log is "ERROR 2006-10-11 12:25:26 FSL-06002  Error 1060 (The specified service does not exist as an installed serv