Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Tomcat
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Tomcat
tomcat port
shobhit garg
Ranch Hand
Posts: 42
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi ,
How can we programatically decide on which port to run
tomcat
.
I don't want to modify the server.xml but want to do it through
java
code .
Thanks
Shobhit
Ben Souther
Sheriff
Posts: 13411
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Tomcat binds to the port specified in server.xml when it starts up.
Webapplications are not loaded until Tomcat has started.
This means that it is not possible to change this setting from within your webapp.
Tomcat is an open source project so you are free to download and modify the actual Tomcat source code if you want to change it's default behavior.
Java API
J2EE API
Servlet Spec
JSP Spec
How to ask a question...
Simple Servlet Examples
jsonf
Can you smell this for me? I think this tiny ad smells like blueberry pie!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Apache + Tomcat Configuration Problem
Tomcat5.5
mapping default page to domain name in tomcat without port number.in Ubuntu
Dynamic Setting of Server Port in Tomcat
Query about 'Port' Number??
More...