Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Map not being resolved (FIXED)

 
Sam Gardner
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys -

I'm having a lot of trouble getting Struts 2 Lists to work.

I am trying to do a selection of 8 radio buttons, but i keep getting a Servlet.service() error:


Here is the action class:


struts.xml action configuration:


calling jsp:


Thanks for any help anyone can give me, and let me know if I should include something else.

I'm using "Struts 2 Design and Programming" by Budi Kurniawan as a reference, and as far as I can tell I'm following the pattern of his code exactly.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing wrong with the code.
This may sound obvious, but are you sure you are accessing the page through the 'action' URL, and not directly as a JSP?
 
Sam Gardner
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sonny Gill wrote:There is nothing wrong with the code.
This may sound obvious, but are you sure you are accessing the page through the 'action' URL, and not directly as a JSP?


Hmm, come to think of it, I am not.

By that you mean linking to "DemoSrs.action" instead of "DemoSrs.jsp", right?

Thanks for the help
 
Sam Gardner
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam Gardner wrote:
Sonny Gill wrote:There is nothing wrong with the code.
This may sound obvious, but are you sure you are accessing the page through the 'action' URL, and not directly as a JSP?


Hmm, come to think of it, I am not.

By that you mean linking to "DemoSrs.action" instead of "DemoSrs.jsp", right?

Thanks for the help


Thanks a lot, that was the issue.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, it is one of those things... it bites you once, but you will never do it again

I guess you can see what was happening.
In Struts2, if you get weird problems like this, for example validation not happening where you expected it to happen, it is often because some interceptor was not being invoked, or as in this case, even the Action was never invoked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic