Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection reset by peer in SSL connection

843833Oct 9 2001 — edited Oct 9 2001
Hi,

I have a Bean running in Application scope on a tomcat 3.2.2 webserver (Win2K) that gets connections from the database(seperate machine MS SQL 2000) and closes them.

When I connect thru SSL I get the error :

java.sql.SQLException: [Atinav][JDBC SQL Server Driver] Connection reset by peer: JVM_recv in socket input stream read

I obtain this connection and then use it to validate a user and based on the result I foward to another jsp page.

here is my validate jsp page :

<--<%@ page errorPage="Exception.jsp" %>-->
<title>User Validation</title>
<jsp:useBean id="sessionManager" class="SessionManager"
scope="application" />
<jsp:useBean id="credentials" class="UserCredentials"
scope="session" />
<jsp:setProperty name="credentials" property="user"/>
<jsp:setProperty name="credentials" property="password"/>



<%
if(request.getParameter("language") != null) credentials.setLanguage(request.getParameter("language"));
String dir = credentials.getLanguage();


%>


<%! String nextPage = "Login.jsp";
String errorMsg = "Unable to Login";

%>
<%

if(!sessionManager.userExists(credentials.getUser())){
nextPage = "Login.jsp";
errorMsg = "Invalid Login";
%>

<%
}else{
if (sessionManager.login(request.getParameter("password"), request.getParameter("user"))) {
if (sessionManager.loginProfile(credentials)) {
credentials.setSessionId(session.getId());
sessionManager.initiateSessionLogging(credentials);
errorMsg = "";
nextPage = "Accounts.jsp";
}else {
nextPage = "Login.jsp";
errorMsg = "Invalid Login";
credentials = null;

session.invalidate();
}
if (sessionManager.isSuspended(request.getParameter("user"))) {

errorMsg = "Account Suspended";
}else{
sessionManager.incrementLoginAttempts(request.getParameter("user"));
if (sessionManager.getLoginAttempts(request.getParameter("user")) >= 5) {

sessionManager.suspendAccount(request.getParameter("user"));
errorMsg = "Account Suspended";
}
}
}else {nextPage = "Login.jsp";
errorMsg = "Invalid Login";
credentials = null;

session.invalidate();
}
}
%>

<jsp:forward page="<%= nextPage %>">
<jsp:param name="errorMsg" value="<%= errorMsg%>" />
</jsp:forward>


idea/comments/solutions will be greatly appreaciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2001
Added on Oct 9 2001
1 comment
281 views