I have a struts application. I want the user to login with an email address and password. After they log in I want to direct them to update page if their information is in the database to view their information OR to a create page to insert their information in the database. Can I do this? If so which dispatch action can be used? Thanks.
I wouldn't use a dispatch action at all for this. Just create a regular action mapping with two forwards: "newUser" and "updateUser". Then have your action forward to one or the other depending on whether there is already a record in the database for the current user.
This is what I have but its not working. I have 2 links on my index page. One to view and one to add. When the view is pressed it is forwarded to the rochal page. At that page the user is supposed to enter an email and password and then the page is forwarded to myresume. The create link should go to the create_resume page. What am I doing wrong?
Joined: Feb 15, 2005
From the questions you're asking, it appears that you're missing some of the basic concepts of Struts. Without at least some mastery of these basic concepts, it's nearly impossible to create a Struts application.
My recommendation would be to take a break from your project for a while and spend some time learning the basics of Struts. In my experience, the best way to do this is by doing a tutorial or two that walks you through the process of creating and running a basic Struts application. This link has a list of some good ones.
Please don't be offended by my suggestion. I'm sure that once you master the basics, you'll soon be coding Struts applications like a pro.
Joined: Jul 31, 2007
I'm definitely confused about how dispatch action is supposed to work but I have a project I have to finish by Thursday. So I really don't have alot of time. The book for my class is not that helpful. I'm thinking that I will probably write different forms to handle the create and update functions rather than trying to do it all with one form. I'm not sure if this is the answer but I'll try it.
Joined: Jul 31, 2007
I have a form which the user enters their email address and password. When they click the submit button I want to pass their email address and password to another page. How can this be done? [ August 13, 2007: Message edited by: Rochal Collins ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com