-2

I need to use action="/WebConext/urlpattern" on one install of tomcat but only need to use "/urlpattern" on another install of tomcat. Why is this?

I am learning about Servlets using Eclipse and Tomcat. I have a form with action="/urlPatternOfServlet" and this worked fine for me. The url pattern was defined in servlet-mapping in web.xml.

I got a new laptop and ran the install of all environment as per previous laptop. Now I need to put the web context in the action path eg I set up everything exactly the same and don't know why this is happening can anyone help with this.

The old laptop was running windows 8, the new machine is a VM running Windows server 2012 r2

1 Answers1

-2

check your web.xml in old system and make sure you have not missed web.xml with below settings

<servlet-mapping>
<servlet-name>yourserlvet</servlet-name>
<url-pattern>/WebConext/*</url-pattern>
</servlet-mapping>
AHungerArtist
  • 9,332
  • 17
  • 73
  • 109
Jigar Gajjar
  • 183
  • 2
  • 12