Getting root DNS name from HttpServletRequest

Discussion in 'Java' started by WJ, Jun 1, 2004.

  1. WJ

    WJ Guest

    WJ, Jun 1, 2004
    #1
    1. Advertising

  2. WJ

    Roedy Green Guest

    On Mon, 31 May 2004 21:17:54 -0700, "WJ" <> wrote or
    quoted :

    >http://someothersub.mysite.com, I want "mysite" or "mysite.com".
    >
    >The parser should not be too hard, but it seems like I can get everything
    >else, including the port, ServletPath, request Uri, request Url, etc.


    The URL or URI class has ways of taking it apart for you.
    See http://mindprod.com/jgloss/uri.html

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Jun 1, 2004
    #2
    1. Advertising

  3. WJ

    WJ Guest

    Thanks!
     
    WJ, Jun 1, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kaspar Minosiants

    [Q] HttpServletRequest.getCookies()

    Kaspar Minosiants, Jul 8, 2003, in forum: Java
    Replies:
    2
    Views:
    2,333
    Kaspar Minosiants
    Jul 9, 2003
  2. Larry S
    Replies:
    0
    Views:
    4,785
    Larry S
    Sep 7, 2003
  3. Jason

    Using DNS name verses Machine Name causes 403 error

    Jason, Sep 13, 2006, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    319
    Steven Cheng[MSFT]
    Sep 18, 2006
  4. Sam Roberts
    Replies:
    0
    Views:
    245
    Sam Roberts
    Mar 20, 2005
  5. gavino
    Replies:
    2
    Views:
    190
    Ted Zlatanov
    Jul 27, 2006
Loading...

Share This Page