Using Servlet for non HTTP purpose

Hi,
I have a requirement where I require tomcat to serve a non http request. Is there a way?

The HTTP protocol begins with a line like:
GET /some/thing HTTP/1.0
Tomcat uses the "/some/thing" to find out to which servlet to give the request.
If your protocol doesn't have that line, Tomcat is going to have a hard time knowing what to do with the request.
You could write a thread that opens a ServerSocket, accepts incoming requests, and hands them off to a servlet-like system (perhaps even subclasses of Servlet). You could even run that thread within Tomcat. If you want/can restrict yourself to Tomcat, you may even be able to use parts of Tomcat's internals (the Service/Connector/Engine infrastructure or whatnot.) Whether this is a good approach depends on all kinds of details.

Similar Messages

  • When i use language for non-unicode [Russian] and i insert another language

    when i use language for non-Unicode [Russian] and i insert another language. it transform to Russian.
    i insert Thai language into MS access it transform to Russian type.i try to change anything,CharSet, sun.jnu.encoding.
    but it doesn't have any effect.How can i insert Thai data into database and in database shown Thai data not another type.
    Thank you for help.My English is not good,Sorry

    that is a little-known known issue
    Check this post:
    http://myitforum.com/cs2/blogs/smslist/archive/2009/01/12/mssms-userlocale-in-mdt-sccm-also-changes-system-locale-9a532hdf.aspx
    He details how to modify the ZTIConifgure.xml file.

  • Using servlets for custom protocol???

    Is it possible to use servlets for my own custom protocol??
    Can somebody PLEASE say yes or no!!!!
    I've been struggling with this for hours!
    Is there an easier way?

    Yes, I searched through the API docs, doesn't tell me anything. I need proven examples.
    There's nothing out there .... strange!!!Actually, not so strange.
    I think the original design of the servlet API permitted protocols other that HTTP, but in practice it was found that it didn't work as well. I think I've heard of an FTPServlet subclass, but that's it.

  • [b]can I use servlets for Chat? new to servlets[/b]

    I want to a chat application for someprof and students
    I am using multicasting technique to send and receive messages
    I used applets and created it but applets don't support java.net's MulticastSocket so I used certificate
    Now I want to use servlets for this in JSP because I called applets from JSP
    Can it be possible? If yes please clearify.

    it is possible
    you could create a jsp page that would update like 10 or 20 or whatever number of ServletContext attributes.
    in the jsp_service or in the doPost or doGet method of a servlet:
    String messageFromUser=request.getParameter("msg");
    int num=15;
    String[] chat=new String[num];
    chat[0]=getServletContext().setAttribute("chatLine" + 0, messageFromUser);
    for(int i=1; i<num; i++) {
        String previousMessage=getServletContext().getAttribute("chatLine" + (i-1));
        chat=getServletContext().setAttribute("chatLine" + i, previousMessage);
    out.println(chat[i]);
    however, there is a pretty decent client/server chat program that can run as an applet here:
    http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=4397&lngWId=2

  • Is  any SIMPLE way to legally publish an original music piece to get it into the iTunes store as public domain use just for start up purposes? Any better ideas ? I write contemporary (mostly) dance pieces...any thoughts?

    Is  any SIMPLE way to legally publish an original music piece to get it into the iTunes store as public domain use just for start up purposes? Any better ideas ? I write contemporary (mostly) dance pieces...any thoughts?

    https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/apply

  • How to use Quickbooks for non-profit on mac

    I run a non-profit and need to use QUickbooks for non-profit but this version of quickbooks is only made for PC. Is there a way I can run this software on my mac? Does Virtual PC software for macs work well? ANyone run Quickbooks for PC on a mac? Is there any other way to do this?

    Artist --
    Welcome to Apple Discussions !
    I would highly recommend that you get the Mac version.
    You can find more about it here
    http://quickbooks.intuit.com/
    Virtual PC slows everything down tremendously.
    Plus, it opens your Mac to be vulnerable to viruses.
    Get the Mac Version.
    It's worth the investment,
    in my humble opinion.
    Hope this helps,
    and sending you all the best wishes
    for your non-profit.
    I'm a former nonprofit staffer, so I know what you're up against.
    Onwards & upwards !

  • Flex IO error# 2032 when using IE7 for parallel https calls across two servers

    Hi,
    Weeks back I faced a wierd issue in the behaviour of flashplayer running on IE7 which is invoking parallel https calls. I have two SSL enabled servers one is listening on port 443 and the other is listening on port 8443 but both running in the same domain. I developed a flex client (using httpservice class) which sends parallel https requests to these two servers. When the number of parallel requests increases say more than 5 requests to each server, the fault handler was encountered with the error message:
    [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://servlet"]. URL: https://servlet"]
    I used some http tracer tools to check if the request jumps out of the browser but that didnt happen. I am 100% sure that I am using the correct url. I was totally helpless . This worked without any issues in IE8 or Chrome or Firefox. This made me think about increasing the number of concurrent connections for IE7 by modifying the windows registry. But still no difference in the behaviour.
    After breaking my head for a long days, I got one solution which would work. This issue is happening only if we are sending https requests to different ports in the same domain. So rather than moving one among the two servers to a new domain, I got a new DNS name for the same destination. So presently I got two DNS names pointing to the same machine in which both the servers are mounted.
    After this it really worked cool!!! Now that I am using a separate DNS name for the server listening on port 8443 and the old DNS name is used to hit the server listening on 443. And I am happy that its working fine without any issues .
    But can anyone tell me if this is really an IE7 issue or do we have anyother solution to fix this.
    Please share ur thoughts..

    Hi,
    I am building a mobile employee directory and for that I am using Flash Builder 4.6/AIR 3.1.0. I am using RESTful web service to get XML results and to display on my mobile application. I am getting the same below error when accessing the webservice from mobile app (Android - Galaxy Tab 7 inch).
    Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error # 2032"] URL: http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co">http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabhttp://adfdevp.alshaya.com:7013/RESTEmployeeDetails-http://adfdevp.als haya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabEmployeeDetails-context-root/jersey/restlab
    The same code is working in Flash Builder 4.6. I have checked Network Monitor to "Disabled" before deploying to mobile. What am i doing wrong here? I am pasting my code below-
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:dao="dao.*"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
       <![CDATA[
        import mx.collections.ArrayCollection;
        import mx.collections.IList;
        import mx.collections.XMLListCollection;
        import mx.events.FlexEvent;
        import mx.rpc.events.FaultEvent;
        import mx.rpc.events.ResultEvent;
        import mx.rpc.xml.SimpleXMLDecoder;
        import mx.utils.ArrayUtil;
        import valueObjects.EmployeeDetail;
        [Bindable]
        private var myXml:XML;
        [Bindable]
        public var resultCollection:IList;
        public function handleXml(event:ResultEvent):void
         var xmlListCollection:XMLListCollection = new XMLListCollection(event.result.children());
         var xmlListCollectionValues:XMLListCollection = new XMLListCollection(event.result.emp.children());
         var resultArray:Array = xmlListCollection.toArray();
         var resultArrayValues:Array = xmlListCollectionValues.toArray();
         var objEmployeeDetails:EmployeeDetail;
         var resultCollection:ArrayCollection = new ArrayCollection();
         var j:int = 0;
         for(var i:int=0;i<resultArray.length;i++){
          objEmployeeDetails = new EmployeeDetail();
          objEmployeeDetails.brand = resultArrayValues[j];
          objEmployeeDetails.division = resultArrayValues[j+1];
          objEmployeeDetails.email = resultArrayValues[j+2];
          objEmployeeDetails.employee_name = resultArrayValues[j+3];
          objEmployeeDetails.employee_number = resultArrayValues[j+4];
          objEmployeeDetails.grade = resultArrayValues[j+5];
          objEmployeeDetails.mobile = resultArrayValues[j+6];
          objEmployeeDetails.position = resultArrayValues[j+7];
          j = j + 8;
          resultCollection.addItem(objEmployeeDetails);
         list.dataProvider = resultCollection;
         //return resultCollection;
        public function handleFault(event:FaultEvent):void
         //Alert.show(event.fault.faultDetail, "Error");             
        protected function sesrchEmployee():void
         xmlRpc.send();
       ]]>
    </fx:Script>
    <fx:Declarations>
       <dao:EmployeeDAO id="srv"/>
       <mx:HTTPService id="xmlRpc"
           url="http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlab"
           result="handleXml(event)"
           fault="handleFault(event)"
           resultFormat="e4x" showBusyCursor="true">
        <mx:request xmlns="">
         <data>{key.text}</data>
         <data>{key1.text}</data>
        </mx:request>
       </mx:HTTPService>
    </fx:Declarations>
    <s:navigationContent/>
    <s:titleContent>
       <s:VGroup width="100%">
       <s:HGroup width="100%">
        <s:Label top="40" paddingTop="10" paddingRight="13" height="29" text="Employee Name:"/>
        <s:TextInput id="key" width="559"/>
       </s:HGroup>
       <s:HGroup width="100%">
        <s:Label height="30" paddingTop="10" text="Employee Number:"/>
        <s:TextInput id="key1" width="100%"/>
       </s:HGroup>
       </s:VGroup>
    </s:titleContent>
    <s:actionContent>
       <s:Button icon="@Embed('assets/search.png')" click="sesrchEmployee()"/> 
    </s:actionContent>
    <s:List id="list" top="0" bottom="0" left="0" right="0" 
        change="navigator.pushView(EmployeeDetails, list.selectedItem)">
       <s:itemRenderer>
        <fx:Component>
         <s:IconItemRenderer label="{data.employee_name}"
              messageField="position">
         </s:IconItemRenderer>
        </fx:Component>
       </s:itemRenderer>
    </s:List>
    </s:View>
    Please help me to resolve this issue as soon as possible. Appreciate your quick response in this regard.
    Thanks,
    Murtaza Ghodawala
    Mobile: +965 97180549
    [email protected]

  • Alternative free version for TOAD for non-DBA purpose

    Hi,
    I am a new junior DBA in my company. i have lots of oracle developers who needs a tool like TOAD to work with oracle but should not have DBA facilities.
    and also need to have something which is for long term and not like TOAD freeware which we have to re-install every 3 months.
    I have sql developer and plsql developer in mind.
    does someone know of any other tools that can be used like TOAD with non-DBA privilieges.
    Thanks in advance,
    Philip.

    We use PL/SQL Developer from allround automations, it's not free, but it is much cheaper than TOAD (Does Toad still have the clause where you can keep reinstalling the free version, as long as you don't have more than 5 people using it in your organistation?). The company are very flexible about licensing too - we recently whent from 10 to 20 licences, about 3 years after getting the original 10 user pack, and they let us just pay the difference between the 10 user pack and 20 user - don't know many companies who would do that.
    We have been using it for a few years now, and it works great - both for people doing PL/SQL development, and for people just using it for ad-hoc querying and support purposes.
    But if SQL Developer had been available when I started looking at the available tools I probably have gone with that - you can't beat the price, and you know the company isn't going to go bust!

  • Using CIF for non-SAP APS

    Hello world,
    we would like to use CIF for master data, but our company is using NSKEP, a non-SAP APS. This has a datahub included, which can be used for middleware purposes (mapping, etc.)
    Since in the future we could change to APO, we think CIF would be the right way.
    Is it possible to create IDOCs from CIF data?
    Has anyone use this already?
    What other software did you connect?
    If yes, can you reccomend any consultants or firms?
    What are the biggest obstacles?
    What would be your best alternative if you don't recommend CIF?
    Any and all help will be appreciated!
    Kind regards, Peter

    I cannot recommend to use CIF for this purpose.
    Please have a look at the predefined ALE process for external production planning optimization

  • Is it possible to use iChat for non network video conferanci

    Hi all,
    I am looking for a little help please. This may be a fruitless question, but here it goes. I have a deaf 5th grader. TTY relay is essentially a thing of the past, and all of her friends are using 'video phone' to keep in touch. Anyway, today we got a Sorenson VRS router and video phone camera from her school, and it uses our existing cable internet connection. It is a BUNCH of stuff to hook up to an already crowded system. Does anyone have any ideas about the possibility of using iChat for my daughter to connect to her friends that will be using a different system?
    Sorry if this is the question of a Neophyte. I am learning this deaf world as i go.
    Thanks,
    Chad

    HI Randell,
    Welcome to the Apple Discussion Pages.
    I can tell you what iChat will do and maybe that will help.
    iChat is an Instant Messaging service that uses the AIM servers. Therefore it is an AIM client.
    AIM stands for AOL Instant Messenger.
    You can join this service in several ways.
    1) By having the AOL Package where AOL is your Internet provider (ISP)
    2) By having the stand alone Application referred on these Discussions as the AIM application (comes in several version for PC, Macs, Linux and phones although each version varies as to what it can do - see side bar at link page).
    3) Or by another application that is also an AIM client.
    On a Mac that can be Proteus or AdiumX, there are PC AIM clients like Trillian.
    Some AIM clients only do some of the features.
    FOr instance iChat to PC AIM can Video (Moving Pics and Sound) but not Audio only.
    iChat to Trillian on a PC can do both Video and Audio only if the PC end has the Pro version of Trillian ($25)
    All clients can at least Text chat.
    Many can send files and pics as well as Text chatting.
    iChat can support Text chatting, Audio Chats and Video chats. Any USB Mic will work for Audio chats. Many Firewire DV Camcorders also work, many Firewire Webcams also work and some USB cams can be made to work with iChat.
    To do this iChat needs a fast enough Mac (Procesor speed) and a fast enough interent Connection Speed.
    In iChat 2 there is felt to be a better chance of success with connections to PC machines running either AIM (or the AOL package) or Trillian Pro for Video chats.
    Text chats and Video chats can be done to the same Buddy (contact) at the same time. I would have thought this would be ideal as it provides a chance to practice lip reading skills and not missing any of the info.
    What iChat 2 can not do.
    1) Chat to other services like MSN or Yahoo!
    2) Chat or link to Video phones.
    3) Video to Mobile (cell) phones.
    4) Connect to other Video conferencing services.
    For more info start here
    Faq on how to start in iChat
    This tells you more about connecting to PCs.
    More info than you might need at this stage http://www.ralphjohnsuk.dsl.pipex.com/
    What iChat 3 adds.
    1) Upto 4 people in a Video chat
    2) Access to the Jabber service (Another Instant Messaging service). This also can use Jabber servers that provide things called Tranports Gateways to other IM services which allows Text chatting to Buddiies on these services.
    Ralph

  • Is Windows 7 illegal if re-armed in the state of California & used for non-commercial purposes?

    Hi.
    I am a part of an organization and we intend to use virtual copies of Windows 7. Is it illegal to use such copies for educational purposes in a non-profit organization?
    Arming Windows 7 with trial licenses, is it illegal to use in California?

    Hello,
    The TechNet Wiki Forum is a place for the TechNet Wiki Community to engage, question, organize, debate, help, influence and foster the TechNet Wiki content, platform and Community.
    Please note that this forum exists to discuss TechNet Wiki as a technology/application.
    As it's off-topic here, I am moving the question to the
    Where is the forum for... forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Using iWeb for non dot-mac sites

    Hi all,
    I own a number of domains that I'd like to use iWeb on. Am I able to utilize iWeb for a non .mac domain, or do I need to use something like Dreamweaver?
    Many thanks.
    -Hugh

    No, in fact I have a sneaky suspicion that not using dot-mac sites will eliminate a lot of problems other people have. You will also lose some of the effects like the nicer slideshow etc.
    I have never used dot-mac and never encountered any of the uploading/publishing problems that are so often mentioned on this forum.
    Here is what you do:
    After editing your website you choose :Publish to a folder.
    This lets you choose a location on your hardrive into which all the necessary files will be compiled/rendered. In this folder you will find an htlm file plus a folder with the necessary files for easch of your pages.. This publishing is done lightning fasy pecause it is done locallly and not trhough your internetconnection like when you published to dot-mac. Also post-editing is easy and hassle free.
    For editing and uploading my website I use "Transmit" but there are lots of other applications like "Fetch"
    What to upload?
    Well I believe the jury is still out on this.
    I just upload the contents of the published folder and that works for me. Other publish the whole folder plus the dummy "Index file" that is generated outside that folder. You will heve to find out for your self.
    If any changes or editing has to be done afterwards, I republish and then just upload the altered files.
    There is one more thing I do, and I believe others don't. I keep my domain file in the same folder where I keep the Published folder.
    E.g. there is a festival website, so I have a folder "Festival" in which I keep the domains file, and the published "Festival website" folder.
    This way it is easy to keep various different websites.
    When you want to edit one of them, go to that folder and double click the domains file, this will start iWeb with the right website for you to edit.
    Really very easy.
    Harry

  • Using FIOS for non-HD Digital TV

    We just had Fios TV service installed.  We have a digital TV, a nice Sony, but it is not HD, so I ordered the standard definition Set-top box.  When the technician was here, I asked him if he thought we would get a better picture if I ordered the HD STB.  He said he did not think the HD box would work with my TV, so I dropped the subject.  But once I saw the Fios picture, I was somewhat disappointed.  It did not look as bright and sharp as over-the-air through my TV's digital tuner. Also, the picture was in fullscreen mode, never in the letterbox mode that you often see when watching Tv over-the-air.  (The technician hooked up the STB to my Tv with an RF antenna connection, which surprised me.  After he left, I switched it to the S-Video connection, to get the best picture we could.)
    I read the user manual for the two set-top boxes, on the VZ wire site.  It looks to me as if the HD STB can be set to 480i resolution, which is standard definition.  My TV has component inputs for 480i, and the HD STB has component video outputs.  So that is why I thought I could use the HD STB even though the VZ literature says you must have an HD TV to use the HD service.
    So (1) am I correct that the HD STB can work with my TV, at 480i?
    and (2) if I did get the HD STB, would the picture in fact be noticeably better with the 480i output on the component connections than via the S-video cord I am now using?  Or not.
    Anyone else do this before? 
    thanks!

    The  answer is that it depends upon how you plan to connect the TV, and how good the video electronic in the TV are..
    Your TV has 480i component input available. It certainly can provide a much better picture. I have my HD-DVR connected to an SD TV that has a 480i input. Can I see the difference between an SD and HD channel? No question about it. Why your tech didn't offer to hook it up that way is beyond me.
    I will point out that the default component output on the HD boxes is 1080p, so you need to make sure you set the HD STB to 480i output. That should work from the front panel of the HD box, on the DVR boxes, it is actually available from the on-screen menu( and may also be from the HD STB, but since I only have an HD DVR, I don't know for sure), but you need to be able to display the on-screen menu, so don't disconnect you S-Video cable until you are sure the output has been set to 480i.
    Here is how it breaks down:
    With over the air (via tuner on ch3/4), you will get somewhere between 260 and 330 line resolution, depending upon how good (or bad) the comb filter , video source and tuner are. OF the available choices (4), this is the one with the worst picture.
    Too many steps in generating the picture, converting it to NTSC, modulating the carrier, tuning the signal, coupled with channel bandwidth restrictions to limit the picture quality.
    Composite video can provide up to 330 lines if the comb filter (and source) is good enough. Without the comb filter, about 260 lines. With high end TV's you tend to get comb filters that can get pretty close to 330 line. No modulation of demodulation of a carrier involved. Fewer steps better picture
    S-Video input can provide up to 400 line resolution, depending upon the quality of the source, and how good the video electronics are in TV. (in S-Video mode the comb filter isn't involved, the Chromiance and Luminance signals are already split out at the S-Video source (in fact they may never have been combined in the first place). Fewer steps still...
    480i provides 480 line resolution.
    Is it as a good as 720p or 1080i? No
    However on an SD STB the best you can hope for is 400line via S-Video, and of course none of the HD only channels are available on the SD STB.
    With an HD STB, you can expect to get 480 lines, which beats 260-400 everytime.

  • How do I use iCloud for non-iCloud apps

    I have a password manager app on both my iPhone 4S and iPad2. According to the description in the App Store and the About/Settings/Help section of the app, I can use iCloud to sync between the two, meaning that what I put on one will show up on the other as long as my log-in code is the same for both (it is). However, this has yet to happen. I have added a few passwords to my iPad and they're not on my iPhone. I've even turned on Documents and Data in the iCloud section of Settings. Is there anything else I can do to make this work or is the claim a lie?

    You may have to go into the settings within the app itself to enable iCloud syncing.  If that's not it, you'll probably have to ask the app developer what the issue is.

  • Is using vshare for non jailbroken devices safe

    I Thought to use vshare but is it virus free

    TacticalTrollface wrote:
       He can come here whenever he thinks he needs it and he can ask as many questions and make as many objections as he wants, whether or not it's the same user that he replied to. Maybe you shouldn't be here if you want to understand that even you aren't perfect and that he's carefully double checking. And when he hoses his i-device, he'll come back here and I'll be the one who replies it, and you can leave and stop being useless.
    Since you're new here, you get a small amount of grace for not understanding how things work. See all those dots under Kilted Tim's name? That really big number of points? He was awarded those points by fellow users who felt his answers were helpful. So, your assertion that he is "useless" is quite obviously wrong.
    What you don't get a pass for is rudeness. However, I suspect from your username, you have intentions of being disruptive. I hope you prove me wrong and learn to be as helpful and useful as Tim.

Maybe you are looking for

  • JSF Deployment error - login.faces not available

    I am new to JSF and am having deploying my first example JSF pages in Eclipse on default Tomcat (6.x). I feel I have done everything stated in the tutorial http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html (I did not repeat the step by st

  • Running help files in app

    Hi everyone: I have added help files to my application but have run into a snag. The problem I have encountered is that if the user hits the F1 key to bring up the help everything works fine. But, if they hit the F1 key without closing the first help

  • Oracle SQL Tutorials

    Hey, I've been contacted by a job recruiter about an entry level position requiring Java, Oracle SQL, and Javascript knowledge. I'm currently studying for the SCJP6 test, but are there any decent free crash courses on Oracle SQL? I have previously ta

  • I get an error message 'Cannot create session cookie'

    Hello, This is the exact error message I receive: "Time: 2011-04-05 14:47:47 OUCU: zz767748 URL: /science.level1ayrf.s104/ TN: openmark @ ltsweb2 Status: 403 Title: Unable to create session cookie Message: In order to use this website you must enable

  • Autodesk Maya network licenses do not work on Lion

    Does not connect to the license server. The server is Windows  Maya is on Macs. Not problem with previous versions of Maya.