get the port to the server during redirection between http and https

Hi, I have the following scenario, where I have to redirect http to https, and vice versa. When I call getServerPort he returned some port is configured for the current regime (https or http). The problem is I have to go the url with the port for the https scheme, in the scenario of http-> https redirect. So the getServerPort method does not provide me that. I don't want to hard code the port numbers because they are subject to change. Is it possible to get the ports configured for the systems supported by the servlet container?

In the number short. If ports are subject to change, and then store this information in a database and retrieve it from there.

Tags: Java

Similar Questions

  • I get the message "Trust relationship between workstation and domain fails" on various computers on the domain, without warning or reason.

    I re - clone the machine to get rid of the problem, but can someone help me with what is the cause?

    7 Windows operating system on computers, Windows Server 2008 R2 for the server.

    As I said, it will happen without cause. We have a lot of laptops, it will affect one at random and it is not the same every time. In addition, it may be coincidental, but it seems to only affect laptop computers and laptops, desktop PC, which is connected with an RJ45 adapter No.

    Hello

    The question that you are running in suitable for the forum on the link below.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

    Hope it will be useful.

  • Unable to send or receive e-mails. I get the server error: 0x800CCC90

    Unable to send or receive e-mails. I get the server error: 0x800CCC90

    Check with your email provider that you have the correct settings.  If you use OE, then go to tools | Accounts | Mail | Properties and verify that the settings are correct.  You can also try to log via webmail if you have this option to determine if your ISP is having problems or if it's your computer.

    Steve

  • I've lost all my acrobat adobe Pro XI files during a reinstallation of win7.  How can I get the news I need to download and install Adobe Acrobat XI Pro?

    I've lost all my acrobat adobe Pro XI files during a reinstallation of win7.  How can I get the news I need to download and install Adobe Acrobat XI Pro?

    [Read https://forums.adobe.com/docs/DOC-7273]
    [Ask in the correct forum allows... Left the connections for specific program forum forum... MOD]

    https://Accounts.adobe.com/ , then click on Plans & products above to find a list of your programs and your serial numbers

  • When I try to connect to my remote server the message "an ftp error occurred - cannot establish a connection to the host." How can I get the server to which to connect with dreamweaver?

    When I try to connect to my remote server the message "an ftp error occurred - cannot establish a connection to the host." How can I get the server to which to connect with dreamweaver?

    After spending most of the day on this I found that my password required to upgrade... so two of my sites are now meet Dreamweaver. And the other will be taken care by the owner of the Web site. Thank you, Nancy!

    gay

  • Get the error during the execution of the IOM in script integrated purge OIM_ReconArch.sh

    Get the error during the execution of the IOM in script integrated purge OIM_ReconArch.sh


    bash-3. $00 cat Err_Arch_Recon_2012_11_01_15_36_06.log
    ****
    -The execution state of archives reconciliation
    ****
    BEGIN OIM_SP_ReconArchival ("n", "n", 200000, 'ARCHIVE_SELECT_WITH_CONS_DROP_REC', 'both, '20110101',' 20111231'); END;

    *
    ERROR on line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "PREPRD. OIM_SP_RECONARCHIVAL', line 722
    ORA-00942: table or view does not exist
    ORA-01031: insufficient privileges
    ORA-06512: at line 1


    Help, please

    ORA-06512: at "PREPRD. OIM_SP_RECONARCHIVAL', line 722
    ORA-00942: table or view does not exist
    ORA-01031: insufficient privileges

    (1) check if the OIM_SP_RECONARCHIVAL table or the view exists or not...
    (2) if it exists, check if the DEV_OIM user has enough privilege to view this table...
    Otherwise, give it all privileges to open as a sys as sysdba

    GRANT ALL PRIVILEGES ON DEV_OIM;

    COMMIT;

  • Is there a java script to get the Server datetime in CC & B?

    Hi all:
    We want to get the Server datetime in UIMap? If the for get java script the Server datetime in CC & B are there? all we should create a Server Script?

    JavaScript is client so that you would need a script on the side-side server to do this, probably a Script Service (SS) called for example from the "onload" event to the UI mapping body. SS does nothing but fills one with $CURRENT - DTMC. Diagram of the SS becomes an integral part of the user interface card is .

    But what would be the requirement that you want to display Date/time of the server in terms of user interface, before even that the user is committed to the Transaction.
    If there is still a need for this, you can display the local time but always use the $CURRENT-DTTM/%CurrentDateTime on the server to add/update registration / transaction.

  • Laptop starts sometimes, but most of the time I get the flashing single LED SHIFT NUMLOCK and caps lock.

    Presario CQ61-411WM

    OS is Windows 7

    Most of the time the laptop does not start upward and I get the only witness flashing Caps Lock and Num Loc.  However, if I'm persistent and keep trying the Start button it will start.  After that it starts everything works fine.  I can even do a reboot and it will stop and start up.  But if I make a stop so I have to press the start several times (it will come back with the only witness flashing Caps Lock and Num Loc) before it will start again.

    Any suggestions?

    Buddy,

    The system does not close completely to the bottom of all components during a restart.

    When you can get your backups done, you could do some tests on the material.

    You can do a search using your favorite search engine to learn more about sleep verses shutdown.

    For example: Shut Down versus sleep against Hibernate

    Click on the Thumbs-Up Kudos to testify and say thank you.

    Although I strive to reflect best practices of HP, I do not work for HP.

  • I bought ipad air 1 after that 2013 but can not get the pages for free. Numbers and imovie I can. IOS9 running at the moment. I have pages when I connect on icloud on my pc. Can I transfer iPad app, because it is not in the ILO purchased in itunes.

    Hi everyone, this is my first post, also help on the post would be appreciated.

    I bought ipad air 1 after that 2013 but can not get the pages for free. Numbers and imovie I can. IOS9 running at the moment. I have pages when I connect on icloud on my pc. Can I transfer iPad app, because it is not in the ILO purchased in itunes.

    Thanks in advance

    Newbie

    The only way to install an ipad app is through the app store.  PC or Mac software does not run on the ipad.  Search in the contacts link at the bottom right of this page.  Give apple a call.

    I guess is the icon for pages in icloud for storing documents pages.  At the same time, apple had a cloud based pages.  Not sure what happened to her.

    R

  • How can I get the 8.3 file name short AND way?

    We use some old DOS programs and need to use the old format back (filename.xxx). When the files are in the long trees, it is very difficult to find the names of files under Windows.

    There was a response published in Google (http://answers.google.com/answers/threadview/id/522710.html) which works very well under XP, but when I use it in Windows 7, I get the long file name.

    Does anyone know how to do this?  The program can be changed?  Here is the program of this flajason-ga posted, but it must be updated for Windows 7 (I only know how to program in Foxpro).  Thank you, Alan

    Topic: Re: how to get the 8.3 file name short AND path?
    From: flajason-ga on May 27, 2005 10:45 PDT
     

    After my last comment, I read your details a little closer.
    The last script I posted was to list out a whole directory in 8.3 format.
    If you are looking for a friendly way of Clipboard to recover the 8.3
    for individual files, that will be more to your liking.

    Same thing as before. Copy the below into Notepad and save it with a .vbs extension.
    Except that this time, you can simply drag and drop a folder or file icon
    on the .vbs file and it displays the short path in an input box.
    where you can copy the value and use anything you want to.

    If you're industrious, you can also save the .vbs file in your
    Folder "send to" (C:\Documents and Settings\ [yourname] \SendTo) to have
    It is available in your context menu with a right click.

    Set fso = CreateObject ("Scripting.FileSystemObject")

    ' Is a file or a folder?
    If fso. FolderExists (WScript.Arguments (0)) then
    "It's a folder
    Set objFolder = fso. GetFolder (WScript.Arguments (0))
    Refund = InputBox ("this is your short path:", "SHORT PATH", objFolder.ShortPath)
    End If

    If fso. FileExists (WScript.Arguments (0)) then
    "It's a file
    Set objFile = fso. GetFile (WScript.Arguments (0))
    Refund = InputBox ("this is your short path:", "SHORT PATH", objFile.ShortPath)
    End If

    Hello

    Read the following article.

    How Windows generates 8.3 names to long file names
    http://support.Microsoft.com/kb/142982

  • When I try to use a MS fingerprint reader I get the message "no mapping between account names and security IDS was done."

    Original title: fingerprint digital mapping

    When I try to use a MS fingerprint reader I get the message "no mapping between account names and security IDS was done."

    I tried the fix (http://support.microsoft.com/kb/890737?wa=wsignin1.0) without success.

    Any ideas?

    Hello

    Have you tried to reinstall the fingerprint reader, as mentioned in the previous post article?

    If your computer is on a domain, the question you posted would be better suited for the IT Pro TechNet public. I would recommend posting your query in the TechNet Forums to get help:
     
    For more information, see the articles:
     

    Hope the helps of information.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • Parts of our software will disappear and then when it is closed, we get the usual "software encounterd a problem and needs to close" and the faulitng module error

    original title: problem with shdocvw.dll

    Hey guys just a quick question.

    bascailly, I'm working on the first line of support for a company and we have created a software for the United Kingdom NHS, basically our software is used by doctor general practitioner through the United Kingdom to read documents electronically.

    a question we seem to become much lately is certain parts of our software will disappear and then when it is closed, we get the usual "software encounterd a problem and needs to close" and the module faulitng error. When event viewer is selected the below appears.

    Failing application dme7_client.exe, version 7.1.0.270, failing module shdocvw.dll, version 6.0.2900.6212, address 0x000b26fe failure

    It seems that the only way to solve this problem is the newspaper on a differnet and use them as seems to be the specific user. does anyone have any ideas of what we can try to solve this problem without obiously the user with a different account?

    see you soon

    Hello

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. Appropriate in the MSDN forums. Please post your question in the MSDN forums.

    You can follow the link below to ask your question:
    http://social.msdn.Microsoft.com/forums/en-us/categories

    I hope that helps!

  • I have three problems___the is first I get the error messages form I mesh and cannot access my profile or friends list ' ___Microsoft online which is a whoosie of my gave me element to modify registry keys but no items exist in the regisry

    I get the error messages form I mesh and cannot access my profile or friends list '

    MIicrosoft online which is a whoosie of my gave me element to modify registry keys but no items exist in the regisry

    For iMesh, you can go here...

    http://www.iMesh.com/community.html

    I don't understand the other two problems that you encounter.  If you please would explain what they are and what, if any, error messages that you receive.  Also, what antivirus do you use, and you run Windows XP SP3?

    --
    Gina Whipp
    Microsoft MVP (access)

    Please post all responses on the forum where everyone can enjoy.

  • I get the same update to install, again and again, when the original is installed at 4 or 5 times.

    I get the same update to install, again and again, when the original is installed at 4 or 5 times.

    Hi stevie33

    For the update are facing the issue?

    If you have the update already installed on your computer and always offered several times the update then I suggest refer you to the Microsoft article provided below and follow the steps in resolution-

    http://support.Microsoft.com/kb/910339/

    I hope this helps.

  • When I try to open an attachment text I only get the microsoft office Picture Manager icon and can't click on anything

    When I ry to open an attachment, I only get the microsoft office Picture Manager icon and can't click on anything to view the file, which must be a text document.

    When I ry to open an attachment, I only get the microsoft office Picture Manager icon and can't click on anything to view the file, which must be a text document.

    What is the extension of fixing this "text"?
    The last 3 letters of the attachment is the file extension.

    If the last 3 letters... are doc, you need Microsoft Office Word or Microsoft WordViewer.
    Here is the link to MS Word Viewer: this is a free program.
    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=3657ce88-7cfa-457a-9aec-f4f827f20cac&displaylang=en

    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

Maybe you are looking for