GeeCON Prague 2014*
The moose likes Tomcat and the fly likes Changing the default port number for Apache Tomcat 6.0.26 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Changing the default port number for Apache Tomcat 6.0.26" Watch "Changing the default port number for Apache Tomcat 6.0.26" New topic
Author

Changing the default port number for Apache Tomcat 6.0.26

Subhashish Pattnaik
Greenhorn

Joined: Nov 07, 2010
Posts: 14
Dear members, i'd like your help in suggesting me a way to change the port number (8080) for running any servlet. I am using Apache Tomcat for the same.
Since I had already configured Oracle on the same port, earlier, now there's a conflict.

I tried changing the port number in Config\Server.xml, but the browser always acknowledges the link to be broken and seems to be of no use.
Kindly suggest me a way of overcoming the same.

Thanks

Subhashish


Subhashish Pattnaik
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 791

Look for above lines in server.xml and make a change at port="8442". It may help.

SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
Subhashish Pattnaik
Greenhorn

Joined: Nov 07, 2010
Posts: 14
Thanks Ninad, but it's not working either.

Can anyone please help??

Regards
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 791

Subhashish Pattnaik wrote:Thanks Ninad, but it's not working either.

Can anyone please help??

Regards
On my tomcat I am able to change port.

Would you show your server.xml file?
Subhashish Pattnaik
Greenhorn

Joined: Nov 07, 2010
Posts: 14
Yah i will do the needful

It's just like any other server.xml file!! Hope you got the magic wand.

Reagrds and many thanks.

Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 791

At line number 69 in server.xml change port number to "9002" or any of your choice then save server.xml and start tomcat server again
Let me know what happen after changes.
Subhashish Pattnaik
Greenhorn

Joined: Nov 07, 2010
Posts: 14
Thanks Ninad, i did manage to change the port!!!

I reconfigured Oracle to a different port number and that has worked out.

Anyways many thanks for your time and suggestion.

Regards
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Changing the default port number for Apache Tomcat 6.0.26