Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Actions and getting confused.

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Mark
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic