• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

URL redirect

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

I have an application running in apache-tomcat-6.0.20. Is it possible to redirect the following url "http://localhost:8080/someapp/login.jsp" to another url "http://localhost:8090/someapp/login.jsp" since 8080 port is already in use. My requirement is if anyone try to access the url with 8080 port it should automatically redirect to url with 8090 port.

Any help is appreciated.


 
Sheriff
Posts: 24635
56
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You say there's another unrelated server already listening at port 8080? Then that server is going to get all the requests sent to port 8080. That's how it works.

I suppose you could try playing around with your network routers to do this sort of port mapping, but then the unrelated server wouldn't get any requests. In which case you might just as well shut it down and have your server run at port 8080, which is what you wanted anyway. So just shut down the other server and run yours at port 8080.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if I understood your requirement correctly.

But if this is a deployment requirement, can you please check the Apache httpd mod_jk plugin?

You can define workers( for example the Tomcat server running on 8090) and map a URL pattern to be routed to the worker.

http://tomcat.apache.org/connectors-doc/

Hope this helps.

Thanks,
Vipin
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!