Has anyone any views about this. Do's/don'ts.
For those who are keen, I am thinking along these lines..
I am planning on getting my values for the dynamic menus from an LDAP server (this shall be performed by the EJB) and from the values that I retrieve, generate either
a) an object which I can then pass to the servlet. The serlvet can them create an XML file from the objects member variables and their equivalent values. It can populate the dynamic menus from the values it gets from the xml file (after parsing it). Would this be a performance nightmare??
b) generate an XML string that may be passed to the servlet for parsing, and the parsed values populate the dynamic menus in the jsp. This might not be as reliable as option a.
I would be very keen to hear anyones views.
A way to do this is, that the EJB / a method of the EJB returns the XML and the servlets uses an XSLT to generate the appropriate HTML code.
A second possibility is, that the EJB returns the HTML code, also generated by utilizing an XSLT.
It is better to do the transforamtion in a servlet instead of EJB. We have done a similar thing, where EJB returns the object to servlet and servlet does the transforamtion and generates HTML code.
Re: The XLST approach.
Not all browsers support XSLT do they?
I heard the latest version of IE does, but what about Netscape ?