How do I get the Tomcat port using Servlet.

I am running Apache + Tomcat. All request are going though Apache. How do I get the Tomcat port using Servlet.

See:
ServletRequest.getServerPort()This will give the port upon which the request was recieved . . .which I blelieve is what you are looking for.

Similar Messages

  • How do i get the driver to use an HP laserjet 5mp with my Mac that runs Lion?

    how do i get the driver to use an HP laserjet 5mp with my Mac that runs Lion?  I'm told by HP to get it through Apple updates but it doesn't show up. 

    The term "server", while technically correct, is misleading.  A print server takes the low-level protocol spoken by a printer and serves it over a higher-level protocol.  For example, parallel printer port (a.k.a. Centronics or IEEE 1284) and serve it over USB.  Or parallel or USB and serve it over Ethernet with a variety of printing protocols (lpr/lpd protocol, JetDirect protocol, port 9100 protocol, the names are confusing).
    In reality, a print server looks nothing like what we usually associate with "server" (which is typically a biggish computer).  Instead they usually look like adapter plugs or even adapter cables, or like a little network hub (just with printer connectors instead of network connectors).
    Here are a few examples (I'll use Amazon as a guide book, without implying that I endorse them).  Let's start with USB to parallel; it seems they tend to look like adapter cables.  Here is one that takes a USB plug (male) and creates a female port that you can plug your regular old printer cable in: http://www.amazon.com/Cables-To-Go-16899-IEEE-1284/dp/B000UX21PY/ref=sr_1_1?ie=U TF8&qid=1333640548&sr=8-1
    And here is one that goes from a USB plug directly into the printer: http://www.amazon.com/Parallel-Printer-Adapter-Connect-parallel/dp/B000BV8604/re f=sr_1_4?ie=UTF8&qid=1333640548&sr=8-4 replacing the old printer cable.
    Then there are (really cheap) Ethernet to printer adapters.  Here is one that you put into the printer (warning, the plastic cover will probably not fit afterwards): http://www.amazon.com/TP-Link-AC-TL-PS110P-Single-Parall/dp/B003CFATR4/ref=sr_1_ 11?s=electronics&ie=UTF8&qid=1333640755&sr=1-11 By the way, I really don't like this type, I always find them unreliable.  But they are cheap.
    The ones I like look more like a network hub. Here is the NetGear PS110: http://www.amazon.com/NETGEAR-PS110-parallel-Ethernet-100Base-TX/dp/B0002AF9JU/r ef=sr_1_2?ie=UTF8&qid=1333640860&sr=8-2
    And the HP external JetDirect: http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/18972-18972-236253-34214-64302-273 16.html?dnr=1&jumpid=reg_r1002_usenc-001&lang=en&cc=us (I think this is the best one of the lot).  Both of those you put next to the printer, use your existing parallel printer cable, and connect them to the network.  Don't get scared by the astronomical price of the HP; it's commonly available used.
    There are even some wireless models around.  In theory, you might be able to use a parallel-to-USB adapter cable and then plug the USB cable into your trusty Apple Airport (as a good Apple fanboy or fangirl you've bought an Airport, right?), but I don't know whether that will work.  With the HP JetDirect box I'm quite certain that it will work (but it's old-fashioned, doesn't come in white, doesn't do wireless, and is not the slightest bit hip or cool).

  • How do I get the charging port cover open on my I-pad, so that I can insert the charger?

    I'm trying to connect an Ipad to a USB charger (30 pin, I believe) there is a little black plastic cover over what appears to be the charging port. How do I get this to open ?

    There is no charging port cover on the iPad. Do you have a case on your iPad? It may have a cover. If so, you'll need to consult any documentation that came with the case.

  • Where and how do I get the SQL Query used by the Microsoft Generic Report Library - Alerts?

    Background:
    I'm tasked with the following: I need to create a new Report and the SQL
    The two canned reports that I can pattern after are: Microsoft Generic Report Library
    - Alerts (there is also an alert detail report that can be chosen within the alert report that we may want to use instead)
    - Most Common Alerts
    I'm trying to do this:
    Add another parameter to search on customfield3.
    It should be able to report on all alerts that were assigned to the specific team for the time period along with the top 10 (most common alerts) assigned to the team for the time period.
    Choose as the objects (group) all servers, but Imay need to adjust the report to just look at all alerts without having to provide objects or a group
    The struggle I'm having is: I know SQL. I know how to create an RDL file.
    But Where are the RDL files for the canned reports so I can modify the canned RDL and modify its SQL and forms?
    What is the SQL/ where can I find the SQL used for the Generic Report Library -> Alerts

    Easy but you need to extract it from Microsoft Generic Report Pack. 
    So.. the procedure is as follows:
    1) You export and unseal Management Pack from your SCOM using
    Boris's OpsgMgr tools (MPViewer
    2.3.3)
    2) Ok you've got unsealed xml, now the tricky part, use
    MpElementsExtract tool, example of usage:
    MPElementsExtract.exe <MP.xml> /ex /destination:<destination>
    That you way you get several folders out of mp:
    DWScripts, DWSubScripts, LinkedReports, ReportResources, Reports
    Take a look into content of first 2, there will be pure sql scripts, and rdl's are in Reports folder :)
    Other way is to just use SQL profiler and catch SQL query while generating report. 
    --- Jeff (Netwrix)

  • How do I get the weblogic port # programmatically?

    I'm writing a class that uses JND to lookup a data source. I don't want to harcode the port number for the provider URL. The code will run in many different environments where the port numbers are different. A configuration file is not pratical. Since the provider URL is always the URL of the weblogic host I'd like to programmatically retrieve the port number that weblogic is listening and use that. Any ideas?

    Hi,
    Yes you can get the port number from your applications web.xml file. Define a new env-entry like one similiar below
    <env-entry>
    <env-entry-name>T3SERVER</env-entry-name>
    <env-entry-value>t3://<<Servername>>:7501</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    and in your source code you can access the above property by obtaining initial context and doing a look up for the property name. A sample code would look like
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    strServerUrl = (String) envCtx.lookup("T3SERVER");
    Hope this helps
    -Jagan
    -Jagan

  • How do I get the icloud to use my iture ID

    I have downloaded the icluod on both my windows vista and my windows 7. but when I go to log on it says that the id is valed but not for the cloud, and if I change the id I still get the same thing.

    This is how you create an Apple ID http://support.apple.com/kb/HT2731
    This has FAQs for setting up iCloud. http://support.apple.com/kb/HT4436

  • How do I get the printer to use regular (not Colorlok) paper when printing what it considers photos?

    I get emails with attachments of a document that someone has taken a picture of with  their iphone (a bill, a receipt, etc). I finally got the HP software to give me a print option, but when I try to print, the printer gives the error message that you must use colorlok paper. I'm printing a receipt, not a glossy family photo! Is there a setting that can be adjusted?

    Welcome to the HP Community , I saw your post about the message you're seeing to select colorlok paper, and I will surely do my best to help! When you open up the email attachment that you need to print, which program are the attachments opening up in that are not allowing you to select a different paper type? Let me know which program it is, and I will look in to the options. In the meantime, try using another program to print the items from if that's an option to see if that helps! I hope to hear from you! Say thanks for my reply to help you today by clicking the "thumbs up" below!

  • I want to use the ethernet connection from my new iMac to my Time Capsule.  It seems only the Wifi is seen by either device.  Ive connected the Time Capsule to the iMac.  How can I get the iMac to use the wired connection

    I want to connect my iMac to my Time Capsule using Ethernet.  I have them connected via an Ethernet cable, but only WiFi seems to be working.  How can I specify the Ethernet connection instead of WiFi?  Thanks
    Welked

    Go to preferences, network and see if ethernet is indicated. Be sure it shows a green dot.  Also be sure it is at the top of the list (above WiFi).  If not click on the the wheel at the bottom and set service order.

  • I tried to install firefox 4 and but not compatible with my computer Mac 10.4 now I don't have a firefox in my dock. How do I get the one I used before in my dock?

    How can I get firefox in my application folder? I lost it while trying to upgrade to firefox 4? I don't it in my dock. My computer is Mac 10.4 older one. Can you help me?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    For an unofficial Firefox 4 compatible version that runs on Mac OS X 10.4.11 or Mac OS X 10.5.8 (PowerPC) you can look at:
    * http://www.floodgap.com/software/tenfourfox/
    Firefox 3.6.x (Mac OS X 10.4 and later) can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

  • How do i get the hdmi port to work with the tv?

    I bought an HDMI cable, plugged it into the computer & TV, set the TV to HDMI & the only thing that happene is my display on the laptop got large like it was in the safe mode. As soon as I unplugged the cable from the Laptop, the display on the laptop returned to normal.
    I have a HP Pavilion DV9235nr running Vista Premium 32 bit. I can't find anything that tells me how to use my HDMI port properly. Anyone got any ideas????
    coot99

    Hi,
    Before go further, please try this Fn+F4 (2 keys together). HDMI should pick up automatically but try Fn+F4 o see how we go.
    Regards,
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can I get the Windows User using ABAP ?

    I need to get thru ABAP the Windows user.

    Hi Carlos,
    You can use the following FM to read the currently logged in windows user id:
    DATA: w_userid TYPE char20.
    CALL FUNCTION 'GUI_GET_DESKTOP_INFO'
         EXPORTING
              type   = '5'
         CHANGING
              return = w_userid.
    WRITE: 'Windows User ID:', w_userid.
    Hope this is what you need.
    Sumant.

  • How do I get the audio port to work?

    I understand that it is a common problem that MacBook Air audio ports behave erratically. I need to make a presentation tomorrow and have both a Soundmatters and a Bose speaker, but the only one that works is my headphone set - Not much use for a group of 20! I've tried rebooting, deleting the bezier file in the preferences Library but to no avail. Simple effective fixes welcome!
    Regards,
    Martin

    Hey Martin,
    Thanks for the question. I understand you are having issues connecting external speakers to your MacBook Air. The following articles may help to resolve your issue:
    OS X Lion: If you can’t hear sound from your speakers
    http://support.apple.com/kb/PH3837
    Mac Basics: Connecting a home stereo, iPod, iPad, musical instruments, or speakers
    http://support.apple.com/kb/HT2508
    Thanks,
    Matt M.

  • How can I get the same result using single query?

    There are 3 tables
    1) tool_desc -
    a master table for storing tool records,
    columns tool_no, tool_chg,
    # of records = 1.5 Millon
    2) step_desc -
    a master table for storing plan wise step records,
    columns plan_id, step_key,
    # of records = 3700 Million
    3) step_tool - a transaction table storing tools to the steps,
    columns plan_id, step_key, tool_no, tool_chg
    For each step in the step_desc table, I need to randomly fetch 1 to 50 tools from tool_desc and insert them into step_tool table.
    Using PL/SQL block, it is like the following -
    begin
    for x in (select plan_id, step_key from step_desc) loop
    insert into step_tool(
    plan_id,
    step_key,
    tool_no,
    tool_chg)
    select
    plan_id,
    x.step_key,
    tool_no,
    tool_chg
    from
    tool sample(0.1)
    where
    rownum <= trunc(dbms_random.value(1,51))
    commit;
    end loop;
    end;
    I need to do the same using a single query so that I can use the CTAS (create table as select) statement and load the data as a bulk.
    Can I do that?

    If they have parent child releation, you can use connect by prior clause,

  • How do you get the iPad to use 4g?, How do you get the iPad to use 4g?

    Got an iPad iPad with retina display, last years model which says its 4g ready. Got an EE sim in which is a 4g sim, but iPad won't go onto 4g, area has 4g coverage, what do I need to do with the iPad?

    The iPad uses wifi first if available. If not aailable, it switches to cellular. Turn Off wifi.
     Cheers, Tom

  • How can I get the avaiable datatypes using single query?

    Is there any sql query to determine available datatypes along with their size lime in the current version of Oracle ?

    If they have parent child releation, you can use connect by prior clause,

Maybe you are looking for

  • Can't ping in or out across the router

    Windows Server 2008 R2 Standard. It's a domain controller, file server, and DNS server. It will also soon be a VPN server. It sits on a private network with two other private subnets accessible through site-site vpns via Cisco routers. This server si

  • Obtaining BAPI Parameters in Adapter Module

    Hi All I am using JRA way for obtaining BAPI parameters in Adapter Modules. Could someone provide me some guidance on the same. Which method in java will be used in retreving the value from BAPI inside module.(Example: Filename) and method for passin

  • I updated my payment my credit card and my Photoshop still will not work

    I had to change my credit card on file and it is still not allowing photoshop to pull up on my computer

  • Solution Manager key error when installing ECC6

    hi Iam installing ECC6 abap+java and facing a problem with the solution manager generated key.Each time iam putting in the key its says its the wrong one. i dont know where iam making a mistake.i managed to generate one before when upgarding to ECC6

  • Why does the scroll sometimes not work?

    I know this question has been posted before, but my problem is slightly different. I have synpatics touchpad with my laptop. Sometimes, the touchpad scrolling does not work, but my actual wireless mouse scrolling works. Sometimes my wireless mouse sc