Hi
I 'm beginner with tomcat and I have a problem with JSP files.
I have tomcat5.0.28 (preconfigured) installed on WINXP OS.
I'm working in ROOT directory (C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT), this is where all my jsp files are, and my java class-file are in a package called "elie_paket" in "C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\classes\elie_paket "
The problem is that I have a servlet that forwards(request, response) from a jsp file to another.
1- from betyg.jsp-
. It's call the servlet when submitting
2- if everything is ok the theservlet "BetygServet" forwards to "saveit.jsp":
3- savit.jsp is supposed to receive the request.
The problem is that I receive the follwing msg after submitting from "betyg.jsp":
HTTP Status 404 - /servlet/saveit.jsp
type Status report
message /servlet/saveit.jsp
description The requested resource (/servlet/saveit.jsp) is not available.
"saveit.jsp" looks like that:
and is in "C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT"
I read about doing something in "C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\web.xml" . But I don't have any idea about what to do.
I appreciate all help.
Thks in advanced
I 'm beginner with tomcat and I have a problem with JSP files.
I have tomcat5.0.28 (preconfigured) installed on WINXP OS.
I'm working in ROOT directory (C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT), this is where all my jsp files are, and my java class-file are in a package called "elie_paket" in "C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\classes\elie_paket "
The problem is that I have a servlet that forwards(request, response) from a jsp file to another.
1- from betyg.jsp-
Code:
<form action="[URL unfurl="true"]http://localhost:8080/servlet/elie_paket.BetygServlet"[/URL] method="GET">
2- if everything is ok the theservlet "BetygServet" forwards to "saveit.jsp":
Code:
"RequestDispatcher rd = request.getRequestDispatcher("saveit.jsp");
request.setAttribute("elev",elev);
rd.forward(request,response);"
The problem is that I receive the follwing msg after submitting from "betyg.jsp":
HTTP Status 404 - /servlet/saveit.jsp
type Status report
message /servlet/saveit.jsp
description The requested resource (/servlet/saveit.jsp) is not available.
"saveit.jsp" looks like that:
Code:
<%@page contentType="text/html"%>
<jsp:useBean id="elev" class="StudentBean" scope="request"/>
<jsp:getPropety name="elev" property="*"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>Inlupp9</title>
</head>
<body>
<h3 style="font-family:verdana; color:red;background-color:lightblue">Studen</h3>
<pre style="font-family:verdana; color:red;background-color:lightblue">
Namn : <%= elev.getName()%>
Tenta Poäng: <%= elev.getPoang()%>
Tenta Betyg: <%= elev.getBetyg()%>
</pre>
<%@include file ="betyg.jsp"%>
</body>
</html>
I read about doing something in "C:\Program\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\web.xml" . But I don't have any idea about what to do.
I appreciate all help.
Thks in advanced