Ouch, that hurt!
Thank you Lindsay!
What a stupit mistake, sorry to bother you with such a stupit misstake
:-(
Regards, Calle


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: den 16 juli 2002 16:53
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [MVC-Programmers] Problems with bean:include.


Make sure that in your Meny.jsp file, you have declared the "bean"
taglib at the top of the document.  That's the mistake I made.  


 -----Original Message-----
From:   Calle Sollander [mailto:[EMAIL PROTECTED]] 
Sent:   16 July 2002 12:42
To:     mvc-programmers
Subject:        [MVC-Programmers] Problems with bean:include.

Hello!

I'll start by saying that i'm new to struts so I might have missed
something very simple. I have a problem when using the "bean:include"
tag I have a global forward in my strut-config file like this:

<forward name="test1"   path="/test.do"/>        
<!--  -->          
<action path="/test"
    type="se.hejaleksand.TestIncludeAction"
    scope="request"
    input="/Meny.jsp"
    validate="false">
<forward name="success" path="/Meny.jsp"/>
</action>

The action doesn't do anything more than forward to "success", I have
put a breakpoint 
in my debugger so I know that it reaches the action.

The jsp file that uses the include looks like this: <bean:include
id="test" forward="test1"/> <bean:write name="test" filter="html"/>

In the Meny.jsp I try to use the "bean:write" tag like this: <bean:write
name="user" property="name" scope="session"/> the result of this is
empty, the rest of the page, plain html, is showing like it should. It
seems like the session and its attributes cannot be retrieved in the
included jsp-file.

The same line of code works fine in the file that does the include.

If I try with plain old jsp (which I'm also new at) like this: <% 
User  user = (User) session.getAttribute("user");
out.print(user.getName()); %> it works and I get the name of my user.

One more thing the 
<bean:message key="welcome.title"/>
in the Meny.jsp doesn't work either.

Can anybody explain why the Struts tag doesn't work, or doesn't work
like I thought it would anyway?

Thanks in advance for any help!!
Regards, Calle!
PS If this is explained somewhere else already please tell me where, I
have searched the web but found nothing.

_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers

_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers

Reply via email to