L
LM
Hi.
I really need any kind of help on a problem that is driving me crazy in
the last 4 days.
I'm doing a struts web application.
First of all: on my development machine everything works fine.
Four days ago I tried to put the webapp on my remote server and so a
wierd problem came out.
I have a index.jsp page with a bean:include (see below the index.jsp)
Don't know why, but the bean:include works better for me rather then
the jsp:include. It works fine on dev machine.
In prod (remote server) the page freeze and a JasperException came
out.If the included jsp is called directly, it works fine. It aint
working when requested by the bean:include statement.
The VERY WEIRD thing is that on the same server there is a similar
application (a previous release of what I'm developing). It works fine
with the same statement and a lots of bean:include.
The HOST declaration in the server.xml in tomcat is the same, the
CONTEXT declaration is correct.
I tried different path to understand the problem and fix but after 4
days I have to ask for an help.
See my files below:
index.jsp
*************************************************************************************
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<jsp:include page="/sys/header.jsp" >
<jsparam name="section" value="home"/>
</jsp:include>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="180px">
<bean:include id="lm" page="/sys/left_menu.jsp" />
<bean:write name="lm" filter="false"/>
<td width="520px" valign="top">
<bean:include id="prod" page="/product.do?section=index" />
<bean:write name="prod" filter="false"/>
</tr></table>
<jsp:include page="/sys/footer.jsp" />
*************************************************************************************
left_menu.jsp
*************************************************************************************
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%
String p ="/category.do" + (request.getParameter("cat_id") == null ?
"" : "?cat_id=" + request.getParameter("cat_id"));
%>
<bean:include id="cat" page="<%=p%>" />
<bean:write name="cat" filter="false"/>
<jsp:include page="/sys/left_menu_bottom.jsp" flush="true" />
</div>
*************************************************************************************
web.xml
*************************************************************************************
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>myapp</display-name>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/pager</taglib-uri>
<taglib-location>/WEB-INF/pager-taglib.tld</taglib-location>
</taglib>
</web-app>
*************************************************************************************
The category.do is a struts action to retrieve categories list from
database and the forward to a cat_list.jsp with a redirect="false"
Tomcat is 5.5.20 both on my dev and prod machines.
Struts is 1.2.9 on both
Java is both jdk 5.0
How is it possible on my dev machine it is working (win xp sp2) and my
prod server (fc5 - x86_64) is not?
Any idea how to face this strange thing is REALLY appreciated!
Thanks.
LM
I really need any kind of help on a problem that is driving me crazy in
the last 4 days.
I'm doing a struts web application.
First of all: on my development machine everything works fine.
Four days ago I tried to put the webapp on my remote server and so a
wierd problem came out.
I have a index.jsp page with a bean:include (see below the index.jsp)
Don't know why, but the bean:include works better for me rather then
the jsp:include. It works fine on dev machine.
In prod (remote server) the page freeze and a JasperException came
out.If the included jsp is called directly, it works fine. It aint
working when requested by the bean:include statement.
The VERY WEIRD thing is that on the same server there is a similar
application (a previous release of what I'm developing). It works fine
with the same statement and a lots of bean:include.
The HOST declaration in the server.xml in tomcat is the same, the
CONTEXT declaration is correct.
I tried different path to understand the problem and fix but after 4
days I have to ask for an help.
See my files below:
index.jsp
*************************************************************************************
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<jsp:include page="/sys/header.jsp" >
<jsparam name="section" value="home"/>
</jsp:include>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="180px">
<bean:include id="lm" page="/sys/left_menu.jsp" />
<bean:write name="lm" filter="false"/>
<td width="520px" valign="top">
<bean:include id="prod" page="/product.do?section=index" />
<bean:write name="prod" filter="false"/>
</tr></table>
<jsp:include page="/sys/footer.jsp" />
*************************************************************************************
left_menu.jsp
*************************************************************************************
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%
String p ="/category.do" + (request.getParameter("cat_id") == null ?
"" : "?cat_id=" + request.getParameter("cat_id"));
%>
<bean:include id="cat" page="<%=p%>" />
<bean:write name="cat" filter="false"/>
<jsp:include page="/sys/left_menu_bottom.jsp" flush="true" />
</div>
*************************************************************************************
web.xml
*************************************************************************************
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>myapp</display-name>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/pager</taglib-uri>
<taglib-location>/WEB-INF/pager-taglib.tld</taglib-location>
</taglib>
</web-app>
*************************************************************************************
The category.do is a struts action to retrieve categories list from
database and the forward to a cat_list.jsp with a redirect="false"
Tomcat is 5.5.20 both on my dev and prod machines.
Struts is 1.2.9 on both
Java is both jdk 5.0
How is it possible on my dev machine it is working (win xp sp2) and my
prod server (fc5 - x86_64) is not?
Any idea how to face this strange thing is REALLY appreciated!
Thanks.
LM