Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change the localhost URL  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running a REST application by accessing the URL . Now is it possible to change the "com.test.jersey.aliens.database" in the URL to some custom names for simplicity? Like MyApp etc. What is the location where this URL name is fetched from? Currently it is taking the project name by default for the execution..
 
Author and ninkuma
Marshal
Posts: 66541
160
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat? Glassfish? Other? How are you deploying? Please provide enough details for an answer.
 
saurabhmehta mehta
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Tomcat? Glassfish? Other? How are you deploying? Please provide enough details for an answer.


I am using Eclipse IDE with Maven as the project management tool and the server is Tomcat. I ma deploying by changing the target runtime for the project to the tomcat server
 
Saloon Keeper
Posts: 8618
161
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that when you run your application on Tomcat from your IDE, a context.xml file is generated that determines the base URL of your application. You can change the context path in this file.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!