I am using Eclipse for J2EE project... one device send request to my side and url like
http://myIP:myPort/corporationweb/Controller
/corporationweb/Controller
is fixed we can't change it because it made on device
my project name in eclipse is "VirtualTest
" but here tomcat include project name if i mapping any servlet, /corporationweb/Controller
URL like
http://localhost:8080/VirtualTest/corporationweb/Controller
I need page open without change project name
http://localhost:8080/corporationweb/Controller
Rightclick project in Eclipse, choose Properties, go to Web Project Settings and set Context root to /
.
This will let Eclipse deploy the project on context root instead of project name (which is the default).
Unrelated to the concrete problem, you really need to ensure that your application is written the way so that it does not care on which context path the application is been deployed. This is namely a server specific setting which is not controllable from inside your project. Make use of HttpServletRequest#getContextPath()
the smart way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With