• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Actions and getting confused.

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
And inside of my fortune cookie was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic