Be Humble... Be Nice.
[My Blog]
All roads lead to JavaRanch
Be Humble... Be Nice.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Be Humble... Be Nice.
Be Humble... Be Nice.
Sudhakar
SCJP 5.0 93%| SCWCD (prep. ongoing))
Be Humble... Be Nice.
Originally posted by suri jagadish:
Hi Arjun,
You are right with regards to the mapping in the web.xml.
<servlet>
<servlet-name>HelloWorld</servlet-name> HelloWorld is the java file name
<servlet-class>Users.Ravi.Desktop.CurrentProject.Servlets.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
but the only problem is url which you are using to call the servlet. it should be in the following way
http://localhost:8080/HelloWorld/hello
in the above URL you have different parts which are necessary.
http://<servername>:<port>/<context name>/<url-pattern or the name of the jsp>
The context name is the name of the folder of your application in the webapps directory of the tomcat.
Be Humble... Be Nice.
Be Humble... Be Nice.
Be Humble... Be Nice.
Incorrect. The class hiearchy needs to be rooted at WEB-INF/classes and reflect the package structure of the classes.Originally posted by Arjun Reddy:
C:\Tomcat\apache-tomcat-5.5.26\webapps\ROOT\WEB-INF
Each web app will have its own WEB-INF folder. You need to find out which application you're trying to update.I just checked tho, there are some 9 WEB-INF folders
Be Humble... Be Nice.
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|