Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying data from an ActionForm

 
Andrew McLaren
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to display data from an ActionForm in a jsp page. I want to just write static text. This doesn't work:


But this does (with an html:form):


The bean:write doesn't throw any errors, it just doesn't display anything.
So confused...
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My best guess would be that "dataSource" does not match exactly what you put in your struts-config.xml file as the form bean to be used by the action.

Do you have the following Entry in your struts-config.xml?

<action name="dataSoure" path="/myAction" ..>

In this case, "myAction" is whatever action is specified in your <html:form> tag.
 
Andrew McLaren
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Merrill Higginson:
My best guess would be that "dataSource" does not match exactly what you put in your struts-config.xml file as the form bean to be used by the action.

Do you have the following Entry in your struts-config.xml?

<action name="dataSoure" path="/myAction" ..>

In this case, "myAction" is whatever action is specified in your <html:form> tag.


Aha! That was it, thanks a ton!

Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic