• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

URL redirect

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic