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...
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...
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 folders.java 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.
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.
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".
>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! ;-)
I think you might try to switch to dynamic includes without impact to the application (at least I can't imagine it would go wrong).
However, you might consider to use any of the following:
In theory these should work.
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...
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.