aspose file tools*
The moose likes Struts and the fly likes Debug problem with login form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Debug problem with login form" Watch "Debug problem with login form" New topic
Author

Debug problem with login form

Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78
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 ]

PhD Artificial Intelligence, OCJP1.6
Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Debug problem with login form