Load problem from request redirect/forwards

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
ingemar
Beginner
Beginner
Posts: 2
Joined: Fri May 16, 2003 2:25 pm
Location: London
Contact:

Load problem from request redirect/forwards

Post by ingemar »

Hi,

I'm using version 3.5.15 in my JSP's inside the Struts framework.

My problem is that when I'm coming from a request redirect/forward the menu is not loading. The menu loads perfectly if I ask for the JSP specifically, for example, http://www.myhost.com/menutest.jsp.

The file menutest.jsp as below:

Code: Select all

<html>
<head>
</head>
<body>
<SCRIPT language=JavaScript src="menu/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="menu/mmenu.js" type=text/javascript></SCRIPT>
</body>
</html>
When the menutest.jsp is a target for a request redirect/forward it seems like the JavaScript is not loaded or not executed. When checking the code I find that the resulting HTML is exactly the same!

Any advice?

Cheers,

Ingemar Svensson
Zophar
Advanced
Advanced
Posts: 10
Joined: Tue May 06, 2003 10:09 am
Location: Vevey, Switzerland

Post by Zophar »

I think it's the way you do your redirect and the way you do it... Could we see an example of your redirect!?
ingemar
Beginner
Beginner
Posts: 2
Joined: Fri May 16, 2003 2:25 pm
Location: London
Contact:

Found solution

Post by ingemar »

Hi there,

Thanks for the reply.

I discovered that because the forward/redirects are executed in a different context then the JSPs my relative paths didn't work. I just replaced them with absolute URLs and voila!

One strange thing is that there was no JavaScript error (normally "Object expected...") telling me that the .js files were not found.

Regards,

Ingemar
Post Reply