Hi Phil:
I have found that impala-web was compiled with Servlet2.5&jsp2.1,so whatever app server I wanna use,following funcation will always return "true":
===========================ServletContextUtils.java======================================
public static boolean isAtLeast25(ServletContext servletContext) {
return servletContext.getMajorVersion() >= 2 && servletContext.getMinorVersion() >= 5;
}
========================================================================
but if I compile impala with servlet2.4,the ServletContextUtils does not work.
Thanks.
Hi,if isAtLeast25() method always returns false,many test cases within impala-web do not work again,so I am afraid this is a hidden trouble,Phil,I really need your confirmation to encourage me to do this way.Thanks.
Hi Phil:
I am still testing now,my environment is weblogic9.2 and jasper jsp have been changed to 5.1.5 version, but some questions have been found below:
1:Can't deploy Impala application into Weblogic9 with "WAR",in this case weblogic can't find the files in "WEB-INF/modules/xxx.jar" when starting,so I have to expand my application.
2:Now I can startup my application successfully(of course the application is very very simple,just only generated by wizard console),but when I click the link "http://xxx:port/mytesthost/web/message.htm" to see the message,exception is thrown,I will post here:
=======================================================================
<Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServl
etContext@1ebf5c - appName: 'mytesthost', name: 'mytesthost', context-path: '/mytesthost'] Root caus
e of ServletException.
java.lang.IllegalStateException: No JSP servlet registered in the module to which the request was di
rected. Your module configuration requires a class org.impalaframework.web.jsp.JspServletFactoryBean configuration entry, or equivalent.
at org.impalaframework.web.jsp.ModuleJspServlet.service(ModuleJspServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
Truncated. see log file for complete stacktrace
========================================================================
and mytestweb-context.xml is here:
=========================================================================
<service:import id="messageService" proxyTypes="com.mytest.main.MessageService"/>
<web:mapping>
<web:to-module prefix = "/web" setContextPath="true"/>
<web:to-handler extension = "htm" servletName="dispatcher"/>
<web:to-handler extension = "css" servletName="resources"/>
</web:mapping>
<web:servlet id = "dispatcher"/>
<web:servlet id = "resources"
servletClass = "org.impalaframework.web.servlet.ResourceServlet"
initParameters = "cacheTimeout=10"/>
<web:jsp-servlet id="jsp"/>
<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean class="com.mytest.web.MessageController">
<property name = "messageService" ref = "messageService"/>
</bean>
===============================================================================
I have tried to change the value of "htm" extension from "dispatcher" to "jsp",but the ClassCastException of JSP is thrown。