This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

categorize data display

 
Rodney Hirokane
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hopefully this is the right forum for this question. I pass a list of data elements to my jsp page in the following format.

DEMO Name
DEMO DOB
DEMO CITIZEN
DESCRIPTOR WEIGHT
DESCRIPTOR HEIGHT
DESCRIPTOR HAIR COLOR

I would like to display this data in the following format

DEMO
NAME
DOB
CITIZEN

DESCRIPTOR
WEIGHT
HEIGHT
HAIR COLOR

Does this need to be done using javascript or could this be done through another technique? Should I manipulate my list to be in some other format? Any suggestions appreciated.

Thank you,

Rod
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should format the data more appropriately before getting to the JSP.

Seems like a Map might be a good fit.
 
Rodney Hirokane
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:You should format the data more appropriately before getting to the JSP.

Seems like a Map might be a good fit.


I have decided to make a format change as you suggested. Not sure what you meant by a Map. I am using JSP and JSF. I looked online but could not find anything relevant at this time.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?
 
Rodney Hirokane
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?


JSF using JSP for the web app development but maybe you can help better clarify for me. I thought JSF provided the framework that my JSP pages are developed in. My web page files have a .jsp extension that needs to be compiled and the eventual end product is an .ear that is deployed to the application server. I use JSF tags within my .jsp page and also use both session and backing beans for accessing the database. Isn't the JSP being extended using the JSF tags? For what it is worth my development environment is IBM Rational Software Architect and DB2 and my Application Server is Websphere.

Thanks,

Rod
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to the JSF forum for sorting out.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rodney Hirokane wrote:
Bear Bibeault wrote:If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?


JSF using JSP for the web app development but maybe you can help better clarify for me. I thought JSF provided the framework that my JSP pages are developed in. My web page files have a .jsp extension that needs to be compiled and the eventual end product is an .ear that is deployed to the application server. I use JSF tags within my .jsp page and also use both session and backing beans for accessing the database. Isn't the JSP being extended using the JSF tags? For what it is worth my development environment is IBM Rational Software Architect and DB2 and my Application Server is Websphere.

Thanks,

Rod


No. JSF started off being based on JSP, but that was long ago. These days, the ".jsp" files are not compiled to produce servlets like "real" JSPs are. Instead, they're used as templates to be digested into JSF View trees. So a ".jsp" suffix is really an illusion. As of JSF2.0, the preferred mechanism is Facelets, and Facelets resources normally have an extension of ".xhtml", in fact.

All of which provide the primary reasons why scriptlets and JSTL don't work well on JSF "jsp"s.

An additional caveat for WebSphere, BTW. Depending on which version and what service packs are in effect, JSF support is integrated into the WebSphere server itself. That makes some things simpler, but you do have to make sure that the version of WebSphere you're using is sufficiently advanced to support the level of JSF that you're developing in.
 
Rodney Hirokane
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:
Rodney Hirokane wrote:
Bear Bibeault wrote:If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?


JSF using JSP for the web app development but maybe you can help better clarify for me. I thought JSF provided the framework that my JSP pages are developed in. My web page files have a .jsp extension that needs to be compiled and the eventual end product is an .ear that is deployed to the application server. I use JSF tags within my .jsp page and also use both session and backing beans for accessing the database. Isn't the JSP being extended using the JSF tags? For what it is worth my development environment is IBM Rational Software Architect and DB2 and my Application Server is Websphere.

Thanks,

Rod


No. JSF started off being based on JSP, but that was long ago. These days, the ".jsp" files are not compiled to produce servlets like "real" JSPs are. Instead, they're used as templates to be digested into JSF View trees. So a ".jsp" suffix is really an illusion. As of JSF2.0, the preferred mechanism is Facelets, and Facelets resources normally have an extension of ".xhtml", in fact.

All of which provide the primary reasons why scriptlets and JSTL don't work well on JSF "jsp"s.

An additional caveat for WebSphere, BTW. Depending on which version and what service packs are in effect, JSF support is integrated into the WebSphere server itself. That makes some things simpler, but you do have to make sure that the version of WebSphere you're using is sufficiently advanced to support the level of JSF that you're developing in.


Thanks for the clarification.

Rod
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic