• 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 I use Struts tags inside plain HTML tags?

 
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 am just wondering

Can I use <logic:iterate> with plain <html> tags?

is the following valid?



In general, can you combine struts tags within your HTML tags? pls let me know. I am new to struts.

Many thanks.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by dog lin:
In general, can you combine struts tags within your HTML tags?

Yes, you can. The JSP compiler treats any tags it doesn't recognize as a taglib as "print this stuff as-is into the output stream".
 
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
okay..thnx...
but the above code shoud work correctly right? with STRUTS tag and HTML tags, i mean, the above code is suppose to generate a drop down box , correct? let me konw.

Many thanks
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to create a drop down.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Can I use <logic:iterate> with plain <html> tags?
[/quote

You can use any Struts tags together with HTML tag in the JSP, if you have defined what taglibs you are going to use inside the JSP. Such as:



Nick

 
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
Remember though that making the page's components regular html tags instead of struts tags loses the automatic prepopulation benefits.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyway, as Lasse said in another thread, it is recommended to use standard JSTL as much as possible that the Struts tags, unless you really need, like the Struts Form tag.

Nick
 
reply
    Bookmark Topic Watch Topic
  • New Topic