why "JRun Closed Connection"

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

[5868 byte] By [pengyl] at [2007-9-26 2:07:30]
# 1

Hi,

You should supply more information about the set up between JRun ISS and the database. I'm not usre its anything to do with your JSP (all thought you should look at Struts from jakarta.apache.org). I've used JRun with IIS and Apache. However my database has mainly been Oracle. I have used access with a JDBC:ODBC bridge but this isnt good.

Try using JRun's connection pooling features. Its a create way to handle database access, and improves performance.

Agian if you are using datasouces with JRun thats more relevant to the JSP code you included. I feel its a configuration issue rather than JSP.

Peter

pizyco at 2007-6-29 8:54:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...