• 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

can somebody take a look at my struts--config file?

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All:

I posted earlier, here is my original code




and i got javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN

basically , i figured out that it is the <html:select> tags that are giving me problems, and in his reply to my post, Marc Peabody said that error means that the ActionForm being referenced (in this case it defaults to the ActionForm defined in your struts-config ActionMapping because the name attribute was not specified) cannot be found."


here is a section from my struts-config.xml

I do have a "name " attribute though...can somebody please tell me what went wrong?

Many Thanks...
 
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
This is a one-in-a-million shot, but make sure your starting html:form is not being terminated with a slash like:
<html:form action="inquiry"/>
...
</html:form>

This is probably one of the most frustrating things to debug.

btw - the input attribute is not necessary when validate is false although it's probably not hurting anything either.
[ May 22, 2004: Message edited by: Marc Peabody ]
 
kay lin
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:
[QB]This is a one-in-a-million shot, but make sure your starting html:form is not being terminated with a slash like:
<html:form action="inquiry"/>
...
</html:form>

This is probably one of the most frustrating things to debug.



Hi:
Just a question,DO I HAVE TO HAVE A <html:form> tags

you mean I should inclose the <html:form> outside of my <html:select>?

like the following?


I thought I just need to have the <html:select> before. Please let me know

Many thanks
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the Struts documentation for the html:select tag:

Renders an HTML <select> element, associated with a bean property specified by our attributes. This tag is only valid when nested inside a form tag body.

See full documentation here.
[ May 22, 2004: Message edited by: Chris Mathews ]
 
Marc Peabody
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

Just a question,DO I HAVE TO HAVE A <html:form> tags



It's usually a good idea.

You MIGHT be able to get around it by:
1) Use regular html form tags <form action="context/myAction.do"> (This assumes you want to actually SUBMIT your form. You might be able to leave this out if your drop-down box was for display purposes only.)
2) define the name attribute in the html:select tag to point to a bean with the corresponding property, otherwise it will look for one in the html:form as the default... which does not exist

Warning: Do not try this at home! I accept no responsibility for any ulcers developed in the process of following the above procedure.
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic