473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Tomcat 5.0.28 and status code 302

<p>
Hi all. I've a web application running under tomcat 5.0.28. Sometimes,
after a couple of days of 24h running of the server, suddenly it
becames impossibile to log in the application, until Tomcat is
rebooted. I tried to look at the access log files, and noticed
this:<br>
<br><br>
CORRECT LOGIN<br>
<br>
192.168.20.145 - - [11/Nov/2006:07:25:17 +0100] "GET / HTTP/1.1" 200
2250<br>
192.168.20.145 - - [11/Nov/2006:07:25:17 +0100] "GET
/styles/default.css HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:17 +0100] "GET
/Utility/funzioni.js HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:17 +0100] "GET /images/sfondo.gif
HTTP/1.1" 304 -<br>
/images/logo.gif HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:25 +0100] "POST /auth/auth.jsp
HTTP/1.1" 200 1767 <-- Here user clicked on the button to
authenticate<br>
192.168.20.145 - - [11/Nov/2006:07:25:25 +0100] "GET
/styles/default.css HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:25 +0100] "GET
/Utility/funzioni.js HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:25 +0100] "GET /images/logo.gif
HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:25 +0100] "GET /images/sfondo.gif
HTTP/1.1" 304 -<br>
192.168.20.145 - - [11/Nov/2006:07:25:25 +0100] "GET /menu/menu.jsp
HTTP/1.1" 200 10296 <-- Here user is authenticated and
redirected to the main page<br>
<br><br>
INCORRECT LOGIN<br>
<br>
192.168.20.132 - - [11/Nov/2006:22:23:03 +0100] "GET / HTTP/1.1" 200
2250<br>
192.168.20.132 - - [11/Nov/2006:22:23:03 +0100] "GET
/styles/default.css HTTP/1.1" 200 6834<br>
192.168.20.132 - - [11/Nov/2006:22:23:04 +0100] "GET
/Utility/funzioni.js HTTP/1.1" 200 5233<br>
192.168.20.132 - - [11/Nov/2006:22:23:06 +0100] "GET /images/sfondo.gif
HTTP/1.1" 200 51<br>
192.168.20.132 - - [11/Nov/2006:22:23:06 +0100] "GET /images/logo.gif
HTTP/1.1" 200 3365<br>
192.168.20.132 - - [11/Nov/2006:22:23:14 +0100] "POST /auth/auth.jsp
HTTP/1.1" 200 1767<br>
192.168.20.132 - - [11/Nov/2006:22:23:14 +0100] "GET
/styles/default.css HTTP/1.1" 304 -<br>
192.168.20.132 - - [11/Nov/2006:22:23:14 +0100] "GET
/Utility/funzioni.js HTTP/1.1" 304 -<br>
192.168.20.132 - - [11/Nov/2006:22:23:14 +0100] "GET /menu/menu.jsp
HTTP/1.1" 302 -<br>
192.168.20.132 - - [11/Nov/2006:22:23:14 +0100] "GET /index.jsp
HTTP/1.1" 200 2250<br>
<br><br>
As you can see, during a correct login, after the POST the response is
a GET of menu.jsp with status code 200. During an incorrect login,
instead, the response is a GET of menu.jsp with status code 302,
followed by a GET of index.jsp. The result is that, if I don't reboot
tomcat, it is impossible to log in the application and everytime I try
to log in, I am redirected to the authentication form (index.jsp).<br>
<br>
This is the form in index.jsp:

<tt>
<form name="access" action="auth/auth.jsp" method="post"
onSubmit="return CheckFields();">
<p>
<label>Login</label>
<input type="text" name="username">
</p>
<p>
<label>Password</label>
<input type="password" name="password">
</p>
<input type="submit" name="actionBtn" value="Enter">
</form>
</tt>
<br>
And this is the piece of auth.jsp page which performs the login:<br>
<tt>
<gtris:auth
action="login"
username="${param.username}"
password="${param.password}"
/>
<c:choose>
<c:when test="${user != null && user.size 0}">
<c:redirect url="/menu/menu.jsp" />
</c:when>
<c:when test="${user != null && user.size == 0}">
<p>Username or password incorrect.</p>
<a href="../index.jsp">Go back</a>
</c:when>
<c:otherwise>
<p>Errore during login.</p>
<a href="../index.jsp">Go back</a>
</c:otherwise>
</c:choose>
</tt>
<br>
Any idea on how to solve this problem?<br>
<br>
Thanks to all
Nov 14 '06 #1
0 5333

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Erwan | last post by:
Hi, we have a big problem with our Apache / tomcat production server. Characteristics are : aapche : httpd-2.0.40-21.5 tomcat : these versions were tried without success :4.1.18, 4.1.27, 5.0.12...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
0
by: Mat | last post by:
Hi. I want to change the standard error pages in my tomcat webserver (Debian Woody)... ( Apache Tomcat/4.0.3 - HTTP Status 404 - ... ) Could someone help me plz? Tnx in advance, sry 4 my english...
2
by: genc ymeri | last post by:
I'm uploading a text through http server but I keep getting the below error. Is the below error coming from my code or from the http server ???? Any help/tip will be very much appreciated. Thank...
0
by: AlexTengco | last post by:
Hi All, I'm not sure if this is the right group to ask this question, but I'll give it a try. I'm currently developing a dotnet web app. Using custom authentication like this: ...
1
by: kommaraju | last post by:
iam a starter to db2 & jdbc.i have a servlet program which connects to ibm db2 using jdbc.when i run this using apache tomcat 4.1.34 , it is showing a error message of HTTP STATUS 500 my jdbc...
2
by: shanmukhi | last post by:
Hi all, i created on jsf,hibernate application and i deployed on Tomcat 5.0 while running a jsf page i got error as HTTP Status 500 - ...
0
by: emadattalla1983 | last post by:
Hi, First, I am just starting deal with Java. I configured Apache Tomcat 5.5 to Eclipse 3.2. And after running a simple jsp page... I receive this error: HTTP Status 404 - /Test03/...
4
by: puneit1234 | last post by:
In my web app after 1 hour web page automatically get expired when i checked tomcat status, the tomcat server is running Please help me out
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.