facebook

not working after a struts forward

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #255873 Reply

    pablogmuller
    Member

    Hi,
    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

    #255874 Reply

    pablogmuller
    Member

    This 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>
    
    #255876 Reply

    pablogmuller
    Member

    Solved!!
    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.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: not working after a struts forward

You must be logged in to post in the forum log in