• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to configure Servlet to run on different port?

 
Mohit Mehta
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have web appilcation which has 4 servlets.
Presently all running on default port 8080.
Can we configure this individual to run on different port?
[ September 24, 2006: Message edited by: Ben Souther ]
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can four servlets be invoked on four different ports from the same web application ? I dont think so.

But you can change the default port number. Assuming you are using tomcat i think you can change it from conf/server.xml
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changing the port for the server is different for each server.
You'll have to check the documentation.

You're not going to be able to have multiple servlets within the same app listen to different ports but you may be able to set up multiple hosts on different ports with one server.

Why would you want to do this?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey whats a prot ?
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can run more than one instance of tomcat on the same machine.
[ September 24, 2006: Message edited by: Lynette Dawson ]
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically Listeners are configured with ports.You cannot configure servlets to listen to request at ports.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!