wood burning stoves 2.0*
The moose likes Tomcat and the fly likes accessing classes save in shared/classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "accessing classes save in shared/classes " Watch "accessing classes save in shared/classes " New topic
Author

accessing classes save in shared/classes

pratibha khamkar
Greenhorn

Joined: May 16, 2008
Posts: 1
I am write the class in ..../appl1/classes
public class Ser1 extends HttpServlet
{
public void doGet(HttpServletRequest rq, HttpServletResponse rs) throws ServletException, IOException
{
rs.setContentType("text.html");
PrintWriter out = rs.getWriter();
out.println("<html><body>"+
"<form method= \"POST\" ACTION= \"Shr\">"+
"<input type = submit value = \"Ok\">"+
"</form>"+
"</body></html>");
}

}

and

the Shr.class is in shared/classes


Error is
HTTP Status 404 - /appl1/Shr

type Status report

message /appl1/Shr

description The requested resource (/appl1/Shr) is not available.
Apache Tomcat/4.1.31
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

From your post, I can't tell where you've actually put your class file.
Classes belong in the WEB-INF/clases directory.

tomcat/webapps/your_app/WEB-INF/classes/your_package/your_class

Also post the parts of your web.xml file that hold the servlet entry and the servlet mapping for this servlet as well as the URL you're using when trying to hit it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing classes save in shared/classes