I am trying to run a web application configured using servletexec
4.2
1. My welcome page defined in servletexec is :
index.jsp
This jsp
file does a post to a servlet which checks for errors called
admitpay.class
2.
If an error occurs I
do a getRequestDispatcher back to my index.jsp page
This seems to work just fine except two things:
a. The input field I type in on the jsp form is empty
b. When I go to submit the form a second time, I get
the following error:
1880: ServletExec: caught exception - java.lang.ClassNotFoundException:
servlet,
App folder=d:\touchnet/nmu/admitpay\
1880: java.lang.ClassNotFoundException: servlet, App
folder=d:\touchnet/nmu/admi
tpay\
1880: at
com.newatlanta.servletexec.ApplClassLoader.loadClass(ApplClassLoader.
java:464)
My index.jsp has the following lines below:
form name="form1" action=""
method="post">
Social Security
Number :
<%
String s = "<input type=\"text\",
name=\"ssno\",value=\"" +
(String) request.getParameter("ssno") +
"\">"; %>
<%
out.println(s); %>
My Method in my servlet is below:
private void handleForm (HttpServletRequest req,
HttpServletResponse
res) throws ServletException, IOException {
String
errormsg = " ";
ssno
= req.getParameter("ssno");
System.out.println
("ssno = " + ssno);
res.setContentType
("text/html");
PrintWriter
out = res.getWriter();
if
(verifycard.isNumber (ssno)) {
out.println
("<html><head><title>Admission Application
Pay</title></head>");
out.println
("<b>Your ssno is " + ssno + "your bill is
paid");
out.println
("</html>");
}
else
{
req.setAttribute("ssno",ssno);
System.out.println
("before dispatch call");
System.out.println
("ssno = " + ssno);
req.getRequestDispatcher("/index.jsp").forward(req,res);
System.out.println
("after dispatch call");
}
}
Question: Can I not link back to the welcome page when it is
inside of a web application defined in servletexec?
Kevin Goethe
Senior Analyst
Northern Michigan University
1401 Presque Isle
501 Cohodas Building
Marquette, MI 49855
email: [EMAIL PROTECTED]
phone: 906-227-1253
fax: 906-227-1890