jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Actions and getting confused. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Actions and getting confused." Watch "Actions and getting confused." New topic

Actions and getting confused.

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

I am getting a little confused here, and not even sure how to pose the question. I think I am getting things mixed up and out of order or something.
Maybe post some struts-config.xml, code, and JSP to show it?
So the main screen has two links. 1 create tour, 2 search tour.
If the user clicks the create tour, then the URL is

Here is the portion of the struts-config.xml that handles this action

Here is the Action code.

The Action code is using Jason's suggestion for my Menu and Body changing. W

OK, here is where I think I am getting confused. I think I am putting the Cart in front of the Horse, or the other way around. I think I am getting confused as to the role of certain classes.
OK, I think that my link for create tour is incorrect in calling tourEntry, because I think that triggers the Action, before any data can be entered by the user because the entry jsp page isn't displayed yet. Maybe I will need a SetupAction for each page that the user can traverse.
I am getting a NullPointerException when I try running my app here, and I think that is because there is no Form data in the DynaActionForm.
Does that make sense. Am I doing something wrong here.
Thanks for the help.

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

One possible cause of malfunction is your:
HttpSession session = request.getSession();
which should be:
HttpSession session = request.getSession(false);
Try it out and we'll go from there. Also, it would help me if I could see the next few lines of the exception's stack trace to pinpoint where the problem occurs.

A good workman is known by his tools.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

Well, I am getting a page to display when I click the link from the first menu, and that is good. I did make a SetupAction for this, and realized that I was putting the cart in from of the horse.
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
subject: Actions and getting confused.
It's not a secret anymore!