I apologize if this question is too elementary, but I am new to the web development arena and I am stuck.
I am attempting to learn about web development by learning about
servlets and
JSP. To that end, I have downloaded and installed a
Java JDK 1.7, Eclipse Kepler,
and Glassfish 4.0. I have added the glassfish server to Eclipse and all of that went well. I have written a small servlet in order to
test the server, following the
instructions in the book that I am trying to learn from (Head First Servlets and JSP).
I am running into an issue when I try to add statements to the glassfish-web.xml file. The book uses
Tomcat as a web server, and the commands that I type in give me
errors. I do not have the experience to determine what these errors are trying to tell me. Following is the code from the glassfish-web.xml file:
I receive errors on the <glassfish-web-app> tag and the <servlet> tag. The errors on the <glassfish-web-app> tag are as follows:
Multiple annotations found at this line:
- Attribute "xsi:schemaLocation" must be declared for element type "glassfish-web-app".
- Attribute "xmlns" must be declared for element type "glassfish-web-app".
- Attribute "version" must be declared for element type "glassfish-web-app".
- Attribute "xmlns:xsi" must be declared for element type "glassfish-web-app".
- The content of element type "glassfish-web-app" must match "(context-root?,security-role-
mapping*,servlet*,idempotent-url-pattern*,session-config?,ejb-ref*,resource-ref*,resource-env-ref*,service-
ref*,message-destination-ref*,cache?,class-loader?,jsp-config?,locale-charset-info?,parameter-
encoding?,property*,valve*,message-destination*,webservice-description*,keep-state?,version-identifier?)".
The error on the <servlet> tag are as follows:
The content of element type "servlet" must match "(servlet-name,principal-name?,webservice-endpoint*)".
Any insight into these issues would be appreciated.
Thanks.
DB