• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP and Servlet, requires port 8080 to call servlets

 
Michael Peremsky
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic