- This topic has 2 replies, 1 voice, and was last updated 18 years, 6 months ago by pablogmuller.
-
AuthorPosts
-
pablogmullerMemberHi,
I have a jsp page that has a <jsp:include> tag in it’s head that includes a javascript dropdown menu. The first time I browse it it works great. Then I follow a link that takes me to a form (the link is in this dropdown menu), I submit it to an action (that works ok) and the action then forwards to the original page, that should show the menu, but now it doesn’t. I’ve tried with <%@ include file=””%> with the same results.
Here’s the code:<%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="true"> <head> <title>principal.jsp</title> <Link Rel="stylesheet" Href="../classes/style.css" type="text/css"> <Script Language="JavaScript" Src="../js/toolbar.js" Type="text/javascript"></Script> <Script Language="JavaScript" Src="../js/common.js" Type="text/javascript"></Script> <Script Language="JavaScript" Src="../js/funciones.js" Type="text/javascript"></Script> <%@include file="menuDesplegable.jsp" %> </head> <body bgcolor="#0000FF"> <h1><font color="#FFFFFF">Principal</font></h1> <!-- Usuario: <%=session.getAttribute(Constantes.PARAM_USUARIO)%>--> </body> </html>
I couldn’t find any bug in my code or anything on the web about this. It seems like the second time it’s ignoring the head part (because of the consequences, I really don’t know what’s going on).
Thanks,
Pablo
pablogmullerMemberThis is the content of the included page:
<%@ page language="java"%> <Script Language="JavaScript" Src="../js/menu_array.js" Type="text/javascript"></Script> <Script Language="JavaScript" Src="../js/mmenu.js" Type="text/javascript"></Script>
pablogmullerMemberSolved!!
It was a path problem.
I was using relative paths that worked the first time, but after the struts call the path was two dirs up. -
AuthorPosts