Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Displaying data from an ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Displaying data from an ActionForm" Watch "Displaying data from an ActionForm" New topic
Author

Displaying data from an ActionForm

Andrew McLaren
Ranch Hand

Joined: May 27, 2005
Posts: 33
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Andrew McLaren
Ranch Hand

Joined: May 27, 2005
Posts: 33
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying data from an ActionForm
 
Similar Threads
how to combine html:text and bean:write
Retaining Form Values
Data grid
logic:match , logic:notEqual not working
Data Retention in JSPs