No, I dont think so, I mis-read your original mail.  The "jsp:usebean" tag
is used to access properties from the request/session/page contexts thus:

> > > SourceBean mysourcebean = (SourceBean)session.getAttribute("source");

would become :

<jsp:usebean id="source" type="(this may have to be fully qualified
name)SourceBean" scope="session" />
which would give you access to a variable called source which would be a
SourceBean

HTH

----- Original Message -----
From: "Mohammed" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 12:30 PM
Subject: Re: <%@ include File =" <%= includefile%> " %> is there a way doto
this


> I actually have a content.jsp file in which I want to include  another jsp
> file. the name of the jsp file to include is know at runtime so I am
> fetching the file name as a variable.
> would the "jsp:useBean " in my case do as you suggested"
>
> Mohammed
>
> ----- Original Message -----
> From: "Jin Bal" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 29, 2001 1:23 PM
> Subject: Re: <%@ include File =" <%= includefile%> " %> is there a way
doto
> this
> > > > SourceBean mysourcebean =
(SourceBean)session.getAttribute("source");

>
> > Use the "jsp:usebean" tag instead and specify scope="session" , the one
> > you've been trying to use is for including files such as other pages.
> > HTH
> > Jin
> > ----- Original Message -----
> > From: "Mohammed" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 29, 2001 11:49 AM
> > Subject: <%@ include File =" <%= includefile%> " %> is there a way doto
> this
> >
> >
> > > Hello evreybody,
> > >
> > > in an action class SourceAction I am setting a variable in the session
> > >
> > > SourceBean sourcebean = new SourceBean();
> > > sourcebean.setSource(  myform.getcommand());
> > > session.setAttribute("source", sourcebean);
> > >
> > > in the jsp file I want to do the following
> > >
> > > <%
> > > SourceBean mysourcebean = (SourceBean)session.getAttribute("source");
> > >
> > > if(mysourcebean!=null) {
> > > String includefile= mysourcebean.getSource();
> > > %>
> > >
> > > <%@ include File ="  <%= includefile%>  %>    // this is not
> > working ----->
> > > ERROR:   file <%= includefile%> not found
> > >
> > > <%}
> > >
> > > else {%>
> > > <%@ include File ="  welcome.jsp>  %>
> > >
> > > <%}%>
> > >
> > >
> > > Thanks for any help
> > >
> > >
> > > Mohammed
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to