Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Feedback request on jsp / struts code

 
Billy Vandory
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's some code I wrote, can I get some feedback. I dont like the fact struts 2 is being mixed with html and css. Any ideas on how to tighten this up? Note that the site is really CSS intensive and the client wants it to look a certain way without exception. Thanks alot.

 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any problems with putting struts tags inside of the HTML apart from the fact that you are generating div tags inside of an unordered list which is not a good thing...
 
Billy Vandory
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote:I don't see any problems with putting struts tags inside of the HTML apart from the fact that you are generating div tags inside of an unordered list which is not a good thing...


Thanks Ankit, can you tell me why that is bad, or an alternative? Can I use span?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's bad because it's not valid HTML. The alternative would be to make it valid, like by putting the stuff you're trying to put in a misplaced DIV into an LI of the appropriate class.

And what do you mean by you don't like that "S2 is being mixed with HTML and CSS"? That's what a JSP page is--a template used to generate (usually) HTML, with custom tags being used to perform various non-HTML type things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic