• 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

Map not being resolved (FIXED)

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic