what is the difference between
Hi guys i am having problem with the Web Application:
I wrote a program in Jsp+JavaBean, Microsoft Access Database, this program runs smoothly in Windows 98/Me+Apache+JRun developer version, but when I put it on the ISP's Server, it always (not every time) cause "Jrun Closed Connection" , i can run the program only when i restart the JRUn Server again. the ISP's environment is: NT server 5.0 + IIS + Jrun 3.02.
here are the code:
when the first jsp page(user.jsp) display, click on the "Add" link should make the second jsp page(adduser.jsp) display. but generally after you click on the link , "Jrun Closed Connection" message come out.
-
user.jsp
<%@ page language="java" import="vehicles.*, java.util.*, java.text.DateFormat" session="true" %>
<html>
<head>
<title>All Roles</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<%
if(session.getValue("user") == null)
response.sendRedirect("nlogin.jsp");
%>
<jsp:useBean id="users" class="vehicles.Users" scope="page" />
<jsp:setProperty name="users" property="*" />
<%
Date today = new Date();
Vector alluser = users.buildUser();
%>
<center><H2>All Users</H2></center>
<small><%=DateFormat.getDateInstance().format(today)%></small>
<small><%=DateFormat.getTimeInstance().format(today)%></small>
<table align=center border=0 cellspacing=1 cellpadding=1>
<tr class="tbh">
<th><small>User Code</small></th>
<th><small>User Name</small></th>
<th><small>Password</small></th>
<th><small>Description</small></th>
<th><small>Role Code</small></th>
<th><small>delete?</small></th>
<th><small>edit?</small></th>
</tr>
<%
for (int i=0; i<alluser.size();i++){
User user = new User();
user = (User)alluser.elementAt(i);
String lineColor = "tbl2";
if( i%2 == 0) lineColor = "tbl1";
%>
<tr class=<%=lineColor%>>
<td><small><%=user.getUserCode()%></small></td>
<td><small><%=user.getUserName()%></small></td>
<td><small><%=user.getUserPwsd()%></small></td>
<td><small><%=user.getUserDesc()%></small></td>
<td><small><%=user.getRoleCode()%></small></td>
<td><small><a href='deluserproc.jsp?del=true&userCode=<%=user.getUserCode()%>'>delete</a></small></td>
<td><small><a href='edituser.jsp?edit=true&userCode=<%=user.getUserCode()%>'>Edit</a></small></td>
</tr>
<%
} //of for
%>
</table>
<center><a href='adduser.jsp'><b><big>Add</big></b></a></center>
<%@ include file="Footer.html" %>
</body>
</html>
-
adduser.jsp
<%@ page language = "java" import = "vehicles.*, java.util.*" session="true" %>
<html>
<head>
<title>Add User</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<%
if(session.getValue("user") == null)
response.sendRedirect("nlogin.jsp");
%>
<jsp:useBean id="user" class = "vehicles.User" scope="page" />
<h3 align="center">Add User</h3>
<form method="POST" action="adduserproc.jsp">
<input type="hidden" name="add" value="true">
<div align="center"><p><small>User Code<input type="text" name="userCode" size="5">
User Name<input type="text" name="userName" size="13"></small></p>
</div>
<div align="center">
<p><small>Password<input type="text" name="userPwsd" size="23"></small></p>
</div>
<div align="center">
<p><small>Description<input type="text" name="userDesc" size="15">
Role Code<input type="text" name="roleCode" size="14"></small></p>
</div>
<div align="center">
<p><small><input type="submit" value="Add Now" name="B1">
<input type="reset" value="Reset" name="B2"></small></p>
</div>
</form>
<p> </p>
<%@ include file = "footer.html" %>
</body>
</html>
does anyone know the answer?
thanks!!
Susan

