websphere 7 (and Spring Roo) incompatible with javax.el.ELException

后端 未结 3 1751
不思量自难忘°
不思量自难忘° 2021-02-03 14:58

I have a application where the frontend is based on the Spring Roo 1.1.2 jspx files.

Every think works fine in Tomcat 6, but if I deploy the same application in a Websph

3条回答
  •  孤独总比滥情好
    2021-02-03 15:45

    The 4 steps to make a Roo generated JSPX running on Websphere 7

    or how I spend my last two days


    The problem is that the Roo (1.1.2) generated JSPX files are not compatible with IBM Webshpere. So it is not a problem of the libaries.

    To get the Roo templates running you need to do this:

    • The first problem (that causes the java.lang.ClassCastException: java.lang.NullPointerException incompatible with javax.el.ELException Exception is this line in WEB-INF/layout/default.jspx I have absolute no idea why, because all other tagx work (I spend my whole evening). The easiest work arround is to "include" the relevant content of /WEB-INF/tags/util/load-scripts.tagx direct by hand in default.jspx. (Then you can delete the load-scripts.tagx)

    • A new Validation error will occure: this is because IBM seams to have problems to parse jstl functions in '. For example: ${fn:toLowerCase(userLocale)}. And this is exacly one of the lines copied from load-scripts.tagx to default.jspx in step 1. My workarround is: to replace:

      
      

    by:

        
       
    
    • Now you will see something, but I you look at the output, you will see, hat IBM Websphere 7 does not remove the namespace definitions form divs. But in the template you will have a lot of this

      So what you need to do is extract all of them in to elements (In all jspx files). So that the files looks like that:

      
      
      ...

      I am not 100% sure if this step is need, but you need the next one.

    • Now everything works, except the Java Scripts. That is because IBM Websphere 7, Normalize the JSPX output. So that lines like that:

      
      

      become

    At least your default.jspx look like this:

    
      
    
        
    
          
         
    
        
            
            
    
            
            
            
            
            
            
            
            
            
    
            
            
              
            
    
             
            
            
            
            
                    
    
            
            <spring:message code="welcome_h3" arguments="${app_name}" />
        
    
        
            

提交回复
热议问题