Jsp, Struts, and Tomcat 5.5.20

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" >
<jsp:param 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
 
M

Mike Beaty

LM

Have you considered using tiles to solve this problem? I see the tiles
taglib imported in your JSP but I don't see it used anywhere.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top