File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Feedback request on jsp / struts code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Feedback request on jsp / struts code" Watch "Feedback request on jsp / struts code" New topic
Author

Feedback request on jsp / struts code

Billy Vandory
Ranch Hand

Joined: Mar 23, 2010
Posts: 57
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

Joined: Aug 03, 2008
Posts: 9291
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Billy Vandory
Ranch Hand

Joined: Mar 23, 2010
Posts: 57
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Feedback request on jsp / struts code
 
Similar Threads
scroll bar down
Fieldset is not working
Fieldset is not working
How to access a property attribute of a value outside of an iterate, but within another iterate
displaying data - reuse