• Post Reply Bookmark Topic Watch Topic
  • New Topic

Localhost in address bar

 
sandy sean
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i type following url

http://localhost:8080/helloapp (no slash in last position)

in address bar and press enter,it automatically shows

http://localhost:8080/helloapp/ (note the slash at last position)

Why does this mean?

Is http://localhost:8080/helloapp and http://localhost:8080/helloapp/ same thing?

I am using tomcat.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35716
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are essentially the same thing. The trailing slash used to mean that it was a directory and not a file. Neither of which applies in a web app. I'm not sure why Tomcat is adding it for you, but it isn't a problem.
 
Paul Clapham
Sheriff
Posts: 21882
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's nothing to do with localhost, or with Tomcat either. Here's a page which expands on what Jeanne said: Why do URLs often end with a slash?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!