JWMA & Struts

genepi
2004-11-12
2013-04-09
  • genepi
    genepi
    2004-11-12

    I'm working on an extension to jwma-struts to use XSLT for styles.

    jwma-struts supports styles through the use of CSS (classic or blue), but the possibilities are too limited: you can only change font styles or colors. You can't have jwma logo at the bottom left of the page, for example. The view layout is presently described in HTML 4, in the JSP pages. If you change something, it applies to all styles.
    For instance, I wanted to remove all the tables used for layout and move to XHTML, to offer an accessible style. This operation is not possible with CSS only...

    So I started thinking of using XSL to manage the different styles in the views, with the smallest impact on the present jwma architecture. This is done with a servlet filter, which applies XSLT transforms on jwma responses. jwma JSP pages don't create HTML code anymore, but custom XML with only data (no layout information). It also adds a request attribute for the XSLT filter, to describe the XSLT transform to use. Then the filter intercepts jwam response and processes it with XSLT to create the HTML layout (or XHTML, or WML..). The jwma JSP pages don't contain anymore struts <html:...> tags, as they are useless to produce XML.
    The jwma custom tags have to be adapted to produce XML code instead of HTML. I've added an xml attribute to the tags (xml="true").

    Last, the XML views are stored in a subdirectory /xslv. To use them, it's enough to change /WEB-INF/jwma-config.xml and rename the views to the ones in the xslv directory.

    These changes are limited and does not prevent the application to revert to the old views instead (just change jwma-config.xml). The consequence of using a servlet filter is a bit of loss of performance.

    I've a prototype running on the first view (login.jsp), and I have to finalize it before extending to all views (as I'm learning XSLT at the same time, I want to have the first prototype right before deploying to all views!). Points on hold:
    - Session management in the XML...
    - XSLT in WAR file.
    - Switch the view layout depending on the user preferences (the initial goal).
    - Bugs in tomcat 4.0 and JDK 1.4 Xalan...

    After checking stxx, I didn't used it as it seemed over powerful for the task (my XsltFilter is only 3 classes!)

    I'll make the code available if I'm able to have the full jwma-struts run on my old pentium...

    Regards

     
  • real_stuff
    real_stuff
    2005-11-06

    cna anyone tell me the complete procedure to download latest version of jwma from CVS

    what does this mean??????
    cvs -d:pserver:anonymous@cvs.jwma.sourceforge.net:/cvsroot/jwma login 

    and where to write this command ?????

     
  • R. V. R. K.
    R. V. R. K.
    2007-02-13

    I want to download the latest version of struts based JWMA. But I am unable to find the link from where to download this struts version of JWMA.

       Can anybody provide me the link to download this latest Struts version.