A friendly place for programming greenhorns!
Access web app localhost:8080/input.jsp URL
May 01, 2017 04:07:08
I have one web application project in
called WebApp1 consiting of one servlet Account.java and one input.jsp file. Currently i have web.xml defined for WebApp1 as follows:
<servlet> <servlet-name>webapp1</servlet-name> <servlet-class>com.webapp1.Account</servlet-class> </servlet> <servlet-mapping> <servlet-name>webapp1</servlet-name> <url-pattern>/Account</url-pattern> </servlet-mapping>
input.jsp is as follows:
<form method="get" action="Account"> Enter String<input type="text" name="t1"> <br> <input type="submit" value="SEND"> </form>
so i have WebApp1 folder in my webapps directory of
therefore the url i need to follows is
but i wish to use
this url. How to make use of ROOT directory of tomcat for that?
May 01, 2017 04:55:45
By putting input.jsp into webapps/ROOT rather than webapps/WebApp1. The URL it submits to would then become "WebApp1/Account" rather than "Account".
Wink, wink, nudge, nudge, say no more ...
This thread has been viewed 237 times.
All times above are in ranch (not your local) time.
The current ranch time is
Jan 19, 2018 12:54:06
Copyright © 1998-2018