I am a newbie in servlet. I am using tomcat7 and I want to run a servlet. I have modified web.xml and put in the WEB-INF dir. Contents are
<servlet>
<servlet-name>asg1</servlet-name>
<servlet-class>asg1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>asg1</servlet-name>
<url-pattern>asg1</url-pattern>
</servlet-mapping>
My appname is servlet. I haven't used any .war file. I have created "servlet" dir. SO my servlet DIR is:
- /servlet/WEB-INF/classes
- /servlet/WEB-INF/web.xml
- /servlet/asg1.html
I have put this servlet DIR into {tomcat-asInstall}/webapps I am accessing it with url http://localhost:8080/servlet
but It can not be accessed. Other apps which are provided by tomcat run very well but why not my servlet?