简体   繁体   中英

URL path meaning in Tomcat

I deployed an application named "am" on Apache Tomcat7. When I point the browser to that application ( http://x.server.com:8080/am ), in the address bar immediately appears this URL: http://x.server.com:8080/am/task/Home , thus the sub-path "/task/Home" is added.

The strange thing is that on the server I cannot find any path /am/task/Home in the tomcat7 locations. Shouldn't an URL path always reflect a directory path on a machine?

Not always. The URL is independent of the file system (although you can set it up in your container to reflect it). Try looking at your web.xml file to see how the <servlet-mapping> elements are mapping URLs to your serlvets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM