* final version
* call initDB from doService, this creates a database connection each call
* instead of one per servlet creation (i.e. at load time)
* This is in case connection is dropped due to database restart... so connection
* is created, instead of having to have servlet reloaded.
*
* Creation date: (4/17/00 9:09:51 AM)
* @author: Phing
*/
public class AccessUserstuf extends HttpServlet {
private Connection con = null;
// subset of column names for the userinfo table that we will use
private String infoCols[] = {"first_name", "last_name", "email_address",
"date_joined", "birth_date", "address"};
// subset of column names for the userprofile table that we will use
private String profileCols[] = {"as400", "netfinity", "ncf", "nw", "s390", "rs6000",
"scalable", "vm", "vse", "windows", "other"};
// register DB2 app class
static {
try {
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* AccessUserstuf constructor comment.
*/
public AccessUserstuf() {
super();
}
protected void debug(HttpServiceRequest req, HttpServiceResponse res) throws IOException
{
try {
ServletOutputStream out = res.getOutputStream();
res.setContentType("text/html");
out.println("Form values : debug orders</font></pre></span>
<span name = "INTRA" style='top:619px; left:284px' class="ft2"><pre><font face='Courier'>");
// Request object parameters
out.println("Parameters:");
com.sun.server.ServletRequestImpl req2;
out.println("");
out.println("
");
for (Enumeration e = req.getParameterNames(); e.hasMoreElements();) {
String key = (String) e.nextElement();
String parameter = req.getParameter(key);
if (parameter == null) {
parameter = "null parameter";
}
if (parameter.equals("")) {
parameter = "empty string";
}
out.println("
");
}
out.println("
KeyValue
" + key + "" + parameter + "

");

// Session object values
out.println("Session values:");
HttpSession session = req.getSession(true);
out.println("");
out.println("
");
String valueNames[] = session.getValueNames();
for (int i = 0; i < valueNames.length; i++) {
String key = valueNames[i];
148
Linux Web Hosting with WebSphere, DB2, and Domino




  
KeyValue

Home

About Services Network Support FAQ Order Contact
 

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved