tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anunay ashish" <>
Subject Servlet and JSP.
Date Mon, 06 Oct 2003 10:07:14 GMT
I have a problem regarding my servlet.
The JSP file calling the servlet is having the following code:
  <TITLE> Page format </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">

  <%@ page import="java.sql.*" %>
  <jsp:useBean id="dbBean" scope="session" class="com.scheduler.DBUpdate" />
  <!--In the above statement the bean tag made an object of the class and
called the constructor too.-->
  Welcome! The available page formats are:
  <table border="1">
   <tr><td><b>Page format</b></td></tr>
     ResultSet testRS;
     String query = "Select * from lookup_page_format"; //On giving a ;
after the query did not return any record.
       testRS = dbBean.getResultSet();
         out.print("<tr><td>" + testRS.getString(2) + "</td></tr>");
     catch (SQLException e)
       out.print("SQLException :" + e);
  Please add a new page format of your choice:
  <form action="servlet/com.scheduler.addDataServlet" method="GET">
   <input type="text" name="newPageFormat">
   <input type="Submit" name="submitButton" value="Submit">

The bean as well as the servlet packages is in the same folder as:
C:\Program Files\Apache Group\Tomcat

If I change the method in servlet from doGet to doPost and make the
corresponding change in form method to "POST" then the JSP throws an error
of something related to my bean package.

Is the problem related to GET/POST? or to the fact that both the packages
are in the same folder?

Anunay Ashish.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message