Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Debug problem with login form  RSS feed

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have build a simple login form and double checked everything but something goes wrong. As soon as I press the login button , an empty page ( http://localhost:8084/cust/login.do ) appears instead of redirecting to login page or showing the main.jsp. I do not receive any error and this resulting page's source is empty.

I put a System.out.println to see if LoginAction's execute is being called and it seems to me that it is not even being called. And also no error appears in Tomcat's log.

Let me excuse for putting the code here before someone reminds me.

1- Would someone please help me with this.

2- How are we supposed to find the problem without any error message (how should we debug such problems).

Regards,
Mac
[ June 05, 2006: Message edited by: Siamak Saarmann ]
 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After something about 6 hours ! I finally found the problem. I have been a programmer for almost 19 years and this is a shame

The problem was from my LoginAction's execute method.



The problem was from the type "ServletResponse" of request and response variables. They should have been "HttpServletResponse".

I wanted once use the NetBeans's code completing capabilities and it did this to me. It has also been smart enough!! to add below imports to my code!

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

Anyway, thank you.

Regards,
Mac
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!