I'm writing a simple application using struts & trying to deploy it on Tomcat Server.
First page of an application just accepts two values(userName and password) from user & passes onto next page via formbean, which then gets displayed on that page.
But my bean never gets populated i.e. no reset(), validate() and setter method gets invoked. THE request just gets forwarded to next page and no value appears there.
Please find below the struts-config.xml file I'm using:
I have crosschecked the spelling of class names. My formbean also extends ActionForm.
What can be the possible causes, which prevents the bean to come into picture. Any help would be highly appreciated.
Thanks.
Attitude matters the Altitude.
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted
0
need to see your form, action and jsp that uses this form for presentation. Please use code tags
Brent Sterling
Ranch Hand
Joined: Feb 08, 2006
Posts: 948
posted
0
I agree...I cannot see anything wrong in your mappings but seeing at least your jsp would help. I take it that you are showing the initial page directly and not using an action.
- Brent
Balaji Londhe
Ranch Hand
Joined: May 02, 2006
Posts: 100
posted
0
You are right, Brent. Thanks for your reply. I'm directly invoking my first JSP without action class. Below are the Action class, Form bean and jsp I'm using:
Index.jsp(which I'm accessing directly as first page)
-------------------------------------------
LoginForm.java (The form bean)
-------------------------
LoginAction.java
------------------------------------------
Login.jsp (The next page which should display userName entered by user)
Thanks...
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted
0
Would you please create a default value for userName in the form. that way you can see if the form is being forund in the indicated scope or it is being created in the useBean tag.
Brent Sterling
Ranch Hand
Joined: Feb 08, 2006
Posts: 948
posted
0
It might just be a matter of the case on your method...change setUSerName to setUserName.
- Brent
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted
0
Yes Brent. I think you are correct. Good eyes
Balaji Londhe
Ranch Hand
Joined: May 02, 2006
Posts: 100
posted
0
You are just perfect, Brent. That was really a mistake. Thanks a lot, both of you.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.