I am trying to deploy a simple web application. I only have 2 files, Entry.html and UpdateDBServlet. I have placed them under a directory in the webapps of tomcat. I can access the entry.html when Tomcat is running, but upon pressing the submit button, the UpdateDBServlet should be called, however, I get a html 404 error indicating that the requested resource is unavailable. I dont know how else to place this resource. Should this servlet also be mapped in the web.xml file?
raghujosh
0
Junior Poster
Recommended Answers
Jump to PostYour server cannot find your Java class that should be inside PROEJCT_FOLDER/WEB-INF/classes. For more details on project folder structure check Tomcat documentation here
Jump to Post1. Your HTML is wrong. Form tags should encapsulate fields you want to retrieve
2. If you post also Java class and web.xml file I may try to run it and see where is problem
Jump to PostHi raghujosh, i go through you post and I think there is an error in web.xml file content. Here is mine code try it.
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
All 11 Replies
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
ph03nix
0
Newbie Poster
raghujosh
0
Junior Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
raghujosh
0
Junior Poster
mohammed2raja
0
Light Poster
raghujosh
0
Junior Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
raghujosh
0
Junior Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
raghujosh
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.