• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP and Servlet, requires port 8080 to call servlets

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to deplouy a client website on a hosted machine. When running locally I had Tomcat running on port 8080 and Apache is on port 80. Running locally everything had port 8080 added to the URL to run it. Now that the application is being deployed to the world I need to remove the 8080 from the URL but I am unsure of how to do that.

Currently when I bring up the login page (jsp) and hit submit, it fails to log the user in (as the jsp is on port 80 - the default). If I change the code to use port 8080 for the login servlet call the login succeeds.

I am lost on this any help would be greatly appreciated.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No where in your code should the port be specified at all. Why did you feel the need to use the port? All your URLs should be server-relative and never specify the domain or port explicitly.
reply
    Bookmark Topic Watch Topic
  • New Topic