Use X-Application 4.1.1 with Resin 2.1.1.

Hi,

I did a smoke test on deploying a generated X-Application to Resin 2.1.1.
Therefor I generated a war file of the desired application and I copied it to
the webapps folder of the Resin. I restarted Resin and tried to run the application.

Unfortunately, it does not work at once.

Resigen interprets tags of the kind <xapp:display select="…"/> different as e.g. Tomcat 4.1.18.
Resin sets the “BodyContent” to “null”, this leads to a NullPointerException.

I just need to replace the existing doAfterBodyCore method of the SimpleBodyTag
by the following snippet:

public final int doAfterBodyCore() {
        String body;
        
        if (getBodyContent() == null) {
            // Resin returns null for empty bodies
            bodyContentStr = "";
        } else {
            bodyContentStr =getBodyContent().getString().trim();
        }
        return SKIP_BODY;
    }



Now, I just need to rebuild X-Application and it works.


To adapt your X-Application 4.1.1 please follow the instructions:

--------------------------------------------------------------------------------

Installation instruction the resin patch
--------------------------------------------------------------------------------


Important:
Create a backup copy of your Tamino X-Application environment because changes you have previously made may be overwritten.

1. Replace the doAfterBodyCore method of the SimpleBodyTag by the snipped above.

2. Execute the command script build.cmd to rebuild Tamino X-Application in order to integrate the changes.

3. Execute the command script build examples.jsp to rebuild the JSP examples.

4. Execute the command script build demos.jsp to rebuild the JSP demos.

5. Execute the command script build generator to rebuild the Tamino X-Application Generator.


--------------------------------------------------------------------------------

Integrating the Tags into an Existing Web Application

--------------------------------------------------------------------------------

To integrate the changes:



1. Proceed with the steps as described in the above section.


2. Copy the file xapplication\lib\debug\xapplication.jar into the directory yourWebApplication\Web-Inf\lib\xapplication.jar.


Cheers

Thorsten