Don't try jwma with tomcat 4.0!

  • genepi

    genepi - 2004-11-12


    I've tried for that last few days to have jwma-struts  (jwma-scratch from CVS) running on tomcat 4.0. And I'm desperate it will never run on that configuration (jwma 0.9.8 is running without major problem under tomcat 4.0.3).

    To keep others from losing their time on it, here is my experience with the two biggest problems I encountered.

    First, why use such an old version of tomcat? Presently, tomcat 4.0.3 is the stable version supported by linux Debian. In a few weeks (days?), we can hope to upgrade to tomcat 4.1.30...

    Bugger #1
    jwma-struts has support for limited styles with the use of CSS stylesheets. At the present time, you can switch from the classic black look to a refresher blue. The jsp views pick images from the classic or blue directory, using struts <html:img> tag.
    I don't know why, but the old Jasper compiler bugs at interpreting the JSP code in these struts img tags, and only these ones:
    <html:img src="<%= (((String) session.getAttribute(CoreGlobals.STYLE_KEY)) + "_images/login_small.png") %>" width="21" height="20" align="right" altKey="login.login"/>

    The only way to bypass it is to change external double quotes by simple ones, like:
    <html:img src='<%= (((String) session.getAttribute(CoreGlobals.STYLE_KEY)) + "_images/login_small.png") %>' width="21" height="20" align="right" altKey="login.login"/>

    Other variations don't work...

    Bugger #2
    Having changed all <html:img> tags in the JSP views, the next problem is a bit bigger. This version of tomcat translates JSP pages into a BIG _jspService() method. But the Java JVM has a limitation and can't handle bytecode blocks of more than 64KB.

    We reach this limit with the folder.jsp page, which includes many other files. All Struts and jwma custom tags expand to Java code, making the resulting source 400 KB big! For only one method!!!

    Usually, the work around is to replace static includes (<%@ include file=... %>) by dynamic ones (<jsp:include page=... />). But this change has bigger impact than the previous one, as you have to understand the structure of the application...

    I gave up with this one and will revert to use version 0.9.8.

    • Dieter Wimberger

      Bugger 1

      Right, this one is really a bad "workaround" for something I do not know yet how to achieve a better way.
      It's on the TODO list though.

      Bugger 2

      If there is no way to update Tomcat, you can maybe try to
      make a simpler view. Basically the attributes are there, by no means jwma is limited to JSP's in the view :)
      Actually exactly for this purpose the architecture is the way it is.

      I still perceive the JSP view as an "example view".


    • genepi

      genepi - 2004-11-13

      >I still perceive the JSP view as an "example view".
      That's the reason I'm working on XSLT views. I think I'll have them ready in a few months, but at that time I'll be able to upgrade my tomcat! ;-)

      Stay tuned...

    • genepi

      genepi - 2004-11-16

      In theory, unstable or testing packages should work. In practice, there are too many dependances and I don't want to break my server at that time, as I have other applications running fine...


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks