September

This is the archive for September, 2008.

Dive into the archives.


  • maven and ear packaging

    okay, i just needed to place some files in the ear file.
    solution:
    -create src/main/application
    -anything you place in that folder will be included in the ear file
    -DO NOT USE ’src/main/resources’, it will not get into your ear file
    -thanks to cata

  • Java, the IP address and reverse proxy

    Okay so there is the getRemoteAddr() method of HttpServletRequest, but when you’re using a reverse proxy that won’t work and it will just return 127.0.0.1
    If so, look for the header ‘X-Forwarded-For‘ of your request object. (request.getHeader(”X-Forwarded-For”)).
    But this will return null if using non-reverse proxy.

    thanks to POLONKAI Gergely