Help,
I compile the following servlet using Eclipse.
package sample;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
out.println("<html>");
out.println("<HEAD><TITLE>Hellow World</TITLE></HEAD>");
out.println("<body>");
out.println("This SHIT IS WORKING!!!!!!!!!!!!!!!!!!");
out.println("</body></html>");
}
}
I copied the class from the bin and copied that folder with the class into tomcat7
I copied the web.xml from tomcat7.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app xmlns=" xmlns:xsi=" xsi:schemaLocation=" version="3.0"
metadata-complete="true">
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
</web-app>
It will not run and I am lost.
Tomcat is running. I test the jsp and servlets from tomcat 7 examples.
I am getting this error:
scription The requested resource (/webdev/HelloWorld) is not available.
Why is this not working?
Howard
I compile the following servlet using Eclipse.
package sample;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
out.println("<html>");
out.println("<HEAD><TITLE>Hellow World</TITLE></HEAD>");
out.println("<body>");
out.println("This SHIT IS WORKING!!!!!!!!!!!!!!!!!!");
out.println("</body></html>");
}
}
I copied the class from the bin and copied that folder with the class into tomcat7
I copied the web.xml from tomcat7.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app xmlns=" xmlns:xsi=" xsi:schemaLocation=" version="3.0"
metadata-complete="true">
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
</web-app>
It will not run and I am lost.
Tomcat is running. I test the jsp and servlets from tomcat 7 examples.
I am getting this error:
scription The requested resource (/webdev/HelloWorld) is not available.
Why is this not working?
Howard