A really good servlet question

I have a command line driven program on my web server. I need to write a servlet that will...
start the program
send the program commands
return the results of the commands to a webpage
my guess on what I need to do to accomplish this is to some how manipulate the stdin and stdout. can this be accomplished from a servlet? Does any one know where I might find some example of simular code? or maybe a tutorial on java stdin and stout?
Ron_W

Thanks you scsi_boy for your response.. After looking at your code, I think I have only one more question. If run.exec() returned a process that continuously loops until a use types in some key (like 'Q' for quit) could java interact with that process? or more to the point.....
BufferedReader br = new BufferedReader(new InputStreamReader(perlProcess.getInputStream()));if the above code can read the output from a running process, can the below code send strings to that process?
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(perlProcess.getOutputStream()));Thanks Ron_W

Similar Messages

  • DO we really use Servlet Filters in realtime applications where?

    DO we really use Servlet Filters in realtime applications where?
    Can any one give me somegood exampleor link where i can find required information.
    Regards
    Vijendra

    Yes people do use Servlet Filters in real applications. The most common usage is as a common entry point for security checks or for logging purposes.
    One thing you could do is search the forum for questions on filters. Often the poster has a problem that he believes can be solved using filters.
    If you want to learn how to develop filters check the Sun J2EE tutorial.

  • Any really good reliable Framemaker books for learners?

    Hi, I'm looking for any really good reliable books about FrameMaker for beginners. I found "Adobe FrameMaker 7.0 Classroom in a Book" on amazon but the reviews for it were pretty bad. Does anyone know if there is a FrameMaker book out there that would be suitable for beginners - my version of FrameMaker is 7.2. Thanks in advance for any tips. Sinead.

    Thanks, Claudio. Not sure exactly how I got onto this forum. Thought I'd posted my question in the right area. Will follow your advice and post it correctly now. Am hoping experienced users of FrameMaker will be able to recommend good books. Thanks also, Ramon, for your suggestion. Yes, had already run a google search on books about using FrameMaker but it's not always so easy to know if they're any good or not. As I mentioned, reviews of some FrameMaker books on Amazon were very critical. Anyway, thanks for directing me in the right direction. :-)

  • What organizer app has a really good WEEK VIEW like my Palm Pilot - it's a grid with days across the top.  Below each day- the day is divided into hourly grids.  When events are schdeuled across  week - you get a mosaic of time blocks.  Analogue - great

    What organizer app has a really good WEEK VIEW like my Palm Pilot - it's a grid with days across the top.  Below each day- the day
    is divided into hourly grids.  When events are schdeuled across  week - you get a mosaic of time blocks.  Analogue view is  great way
    to comprehend the time obligations as a molar pattern.
    thx,
    Fritz

    I use Week Cal on the iPod.  I think it was only $1.99.  It is a lot better and does a lot more than the one that came with the Palm Pilot.
    As you know, unlike the Palm Pilot, the iPod does not come with a desktop application that you can sync your iPod calendar to.  Since I don't use Outlook, I have to use a Cloud based calendar to sync with my PC.  I use Hotmail's calendar for that.  (If your computer is a MAC, you can use iCal)

  • I just broke my ipad. I've taken really good care of it and had it since the third gen came out (bought it right away) the screen is cracked from the bottom right corner and im wondering if i can replace it for free or even at all please help :(

    I've taken really good care of it and had it since the third gen came out (bought it right away) the screen is cracked from the bottom right corner and im wondering if i can replace it for free or even at all please help

    You can replace it, but not for free.
    iPad mini: $219
    iPad 2 or earlier, iPad mini Retina display: $249
    iPad 3rd generation or later: $299

  • Good inteview  Question?

    hi ,
      Plz give good int questions on bdc with answers...
    regards

    Hi Deepak,
    What is BDC- its use, and how to use it?
    It is Batch Data conversion used for transferring some data other than sap into sap ... this is also a work of an ABAPer.
    What is "UTS" Or may be it is "UST", something called Unit test?
    Use:  After developing any object we should write a test case proving that the object is working properly or not.  This is done by the ABAPer. This is UNIT TEST CASE.
    In BDC how can we handle Table Controls?
    When you do your recording you will have a tab for Next line or Insert. You have to capture that in your recording. If your transaction code doesn't have that in the recording then you have to set up a page down (=P+) and loop it based on the line entries u c on teh screen. 
    Suppose we are transfer data through BDC from leagacy to SAP and their is some duplicate data in legacy system but we don't want this in SAP system .So how can we check that this data is already exist? 
    In BDC you would have all your legacy data in an internal table. Use Delete Adjacent dulpicates syntax to delete duplicate entries.
    Can we use two transaction code in one BDC like XK01 & XD01 if yes how?
    Yes, we can do that by combining the two bdc program codes together.  Then you perform the program routine accordingly.  However, it will make your BDC program very long and complex.
    How can we handle errors in Function Module?
    Exceptions is used to handle errors.
    Can we use Session method & Call transaction both in one BDC if yes please give me example and scenerio where we use this?
    You start your dataload using Call Transaction and if any errors occur push all those errors in a session so that your dataload takes place uninterrupted and you can processs ur errors later.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Box Office Movie [BOM] is really good?

    Box Office Movie [BOM] is really good? yeah we know that watching movies is always fun for everyone so here is the box office movie streaming movies for everyone. Enjoy
    Watch 22 Jump Street Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/IIpcoM
    Watch How to Train Your Dragon 2 Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/AtI3z
    Watch Maleficent Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/VJri0
    Watch edge of tomorrow Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/tvA0mo
    Watch the other woman Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/zaGdgz
    Watch The Fault in Our Stars Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/GcnIuv
    Watch X-Men Days of Future Past Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/otZ2RW
    Watch Godzilla Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/2DULic
    Watch Neighbors Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/NB3dvu
    Watch Blended Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/dnbVZK
    Watch A Million Ways to Die in The West Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/CEYU3u
    Watch The Amazing Spider Man 2 Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/YhCoki
    Watch Captain American The Winter Soldier Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/zentJU
    Watch Transformer Age of Extinction Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/P6mzkb
    Watch Think Like a Man Too Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/tf4Lyl
    Watch Jersey Boys Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/6X8hR3
    Watch Begin Again Online Free
    http://www.codecademy.com/watchonlinemovie/codebits/Y5UKAK

    leippy
    Why do you think this is a memory issue? You don't control memory usage, the OS does and it's really quite good at it.
    As the problem exists across two accounts, this suggests that the problem is with the entire system rather than your account. As you have re-installed iTunes already, I suggest that you Archive and Reinstall the OS. This will preserve all your settings and not harm your data - though a Back up is, of course, advisable.
    Regards
    TD

  • Tomcat servlet question.

    I created a really simple servlet named Log ( "Hello World") that was created in a Packet called World.
    When I try to run this servlet using
    http://1#.3#.1#4.1#9:8080/World/servlet/Log
    Tomcat generated this error :
    Error: 500
    Location: /World/servlet/Log
    Internal Servlet Error:
    java.lang.NoClassDefFoundError: Log (wrong name: World/Log)
         at java.lang.ClassLoader.defineClass0(Native Method)
    How can I call this servlet ?
    I has been using servlets with websphere without problems.
    Thanks in advance.

    JSP's don't have to be registered but they can. Servlets that are not in packages can be put directly into WEB-INF/classes and not registered.
    As a caveat,this may not apply for all servers. I know that weblogic requires that all servlets be registered and mapped to an alias.

  • Really good D300/D3 NEF preset

    I stumbled across a really good NEF preset which to my eyes gets pretty close to the conversion from Capture NX. Its written by a chap called Lars Gotfredson, and can be downloaded from his Onethirdstop website here:
    http://www.onethirdstop.com
    After setting up the preset, I compared side by side, raw conversions via ACR (LR), and Capture NX of a series of files from a D3. Some slight variations, mainly to my eye in contrast. But on the whole a vast improvement on the default NEF conversion.
    To my taste anyway - I hasten to add.

    Thanks for passing this on - I'll certainly give it a test-drive...
    RM

  • Saying connection too slow for shareplay,but i have really good speed

    i have a really good speed ,when i start shareplay with someone it says that i have very low speed.i have like 3mbps(upload) and 7mbps(download or whatever)mabey its because of the update...please fix this or help! 

    SharePlay can be a bit temperamental at times. The best connections can sometimes say your speeds are too sow. While the slower connections can say the opposite. It has it's moments.
    Do a Test Internet Connection in the PS4 settings. Then try it again a minute later. You'll have quite different results sometimes
    If it allows you to continue, then just do so. Altough your speeds may result in some poor image quality and lag for the person your SharePlay'n with

  • Anyone else feeling really good about their purchase?

    I will admit, I had my doubts when Production Premium CS3 was announced. Sure the marketing sounded great and the examples and demos looked really good but as we all have learned, what you see is not always what you get.
    Having had some time to play around with this suite, I find myself amazed with the value that Adobe has provided. There doesnt seem to be anything that you cant do with these apps. From OnLocation to Premiere to AE & Photoshop. Thus far, my fav app from the bunch has to be Soundbooth. Adobe has just made things a helluva lot easier. Will this guarantee Hollywood success? Of of course not but it surely increases the chances more now than ever before.
    The plethora of features and apps make it seem to be impossible to become an expert at the all especially before CS4 ships. One thing is for sure that software has finally provided us a much more stable ground to build our visions. The only limitation I can see from this offering is our own imagination but then again, thats what brainstorm is for. :)
    Good job Adobe.

    My experience on many other mutlimedia site contradicts your rosy view of the problems many users are having with CS3 and CS4 while Adobe begins to turn its attention to a pure 64 bit version.
    I am keenly anticpating the answer(s) on this form to be... UPGRADE and "oh, why would you WANT to do THAT?" !
    You may be prepared to state anything, and yet, somehow, it doesn't invalidate hundreds of users who find NO ANSWERS forthcoming from Adobe on the myriad of problems that perisist from verision to version.
    As for my attitude, you may think as you wish, but I don't subscribe to a "tinkerbell will live if we all believe" method of customer support.
    I FINALLY got Encore to spit out a useable blu-ray BUT I had to name the project "disk" and save the project in the root OS directory or it would endlessly give an "Error 6" code and double or triple the size of the assets to be encoded and abort the project.
    I was only able to do this after finding the solution on Creative Cow, when another desperate user tried guess after guess after guess when Adobe REFUSED to admit there was a problem.
    Say what you will about how warm and fuzzy Adobe makes you feel, but I feel the opposite right now and don't care to hear the glossing over by fans.

  • Article: Why can't there just be one, really good, codec?

    http://www.redsharknews.com/technology/item/1183-why-can-t-there-just-be-one,-really-good, -codec
    I found this interesting. You might too.

    I found that very interesting and  I found the comment info ..even more so.

  • I need a really good FM Transmitter

    I've tried
    http://www.griffintechnology.com/products/roadtrip/#
    and the model that i guess is under this that doesn't have the LCD display but uses the ipod's display to show the station its transmitting to.
    the one without the LCD Display *****, always static-y.
    The one with the LCD Display works a lot better but i still get static.
    i was wondering if anyone here had experience with a really good FM Transmitter and could help me out.

    Wireless, Try This one:
    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore?productLearnMore=TN9 85VC/A&cid=AOS-CA-111371-C0003121-A10000082379
    Oops, I see what you're trying to do now. You want to listen to your iPod in the car. I recommend the PIE company line of adapters. Go to your local car audio install shop and have them spec out one that is right for your car and your stereo. I've got one and it works fabulous, 10x better than some cheezy adapter, uses the docking plug and higher quality line out as a source. Charges the iPod too. Can't say enough good about it.
    Check it out.

  • I have The New iPad and the FaceTime camera is really bad and fuzzy and does not autofocus properly however the other camera is really good how do I fix this?

    The FaceTime camera is really bad on my New iPad (which I've had for a while) it's really fuzzy, poor & doesn't autofocus properly however the other camera is really good how do I fix this?!!!! X( x_x

    I'm also on iPhone 4, iOS 6, and have exactly the same problem. I've tried resetting privacy settings, turning restrictions on and off, deleting and reinstalling apps. Nothing seems to work. The lists of apps in privacy settings are all empty, except for location services. When using Tweetbot the app is regularly asking for permission to access my twitter account, but even when I allow that, the app doesn't show in privacy settings. When I try to go into the camera roll from the Facebook app, the app tells me I have to allow access to the camera roll from the privacy settings - which I can't do since the app is not listed there.

  • HT5527 This doesn't really answer my questions.  How do I reduce storage?  What's being stored in iCloud anyway?  Just what's backed up on phones and iPad?  Do I increase storage through my laptop in which case I click on the OS X or the iPad/Phones which

    This doesn't really answer my questions.  How do I reduce storage?  What's being stored in iCloud anyway?  Just what's backed up on phones and iPad?  Do I increase storage through my laptop in which case I click on the OS X or the iPad/Phones which is IOS.

    Your iCloud account stores your iOS device backups as well as your synced data (contacts, calendars, notes, etc.) and iCloud email (if you have an iCloud email account).  You can see how much is being used on your iPad by going to Settings>iCloud>Storage & Backup>Manage Storage.
    If you want to purchase more iCloud storage, you can do this on any of your iOS devices or computers that are signed into your iCloud account, as explained here: http://support.apple.com/kb/HT4874.

Maybe you are looking for