Laurie,

Thanks for your reply.I'm not sure if I understand you
clearly.I have used bean:define inside the
logic:present tag as seen in the code snippet.This is
supposed to define a scripting variable named by the
"id" attribute as described in the Struts docs:

"Create a new attribute (in the scope specified by the
toScope property, if any), and a corresponding
scripting variable, both of which are named by the
value of the id attribute"

http://struts.apache.org/struts-taglib/tagreference-struts-bean.html

The issue I have is that the scripting variable
"userRequest" is not created by the bean:define tag
inside the logic:present tag.

Instead "userRequest" is created as a pageContext
attribute. So, if I use the scriptlet below to access
the pageContext attributes, my code works:

---------
<% dsap.business.UserRequest userRequest =
(dsap.business.UserRequest)pageContext.getAttribute("userRequest");
%>
                                <% dsap.business.Employee employee =
(dsap.business.Employee)pageContext.getAttribute("employee");
%>

<html:text name="formBean" property="reqType"
 value="<%=userRequest.getReqType()%>" />
----------

Anyway, the same code (bean:define embedded inside
logic tags) used to work perfectly with the previous
version of my server (JSP 1.1).So, I'm puzzled why it
doesn't work with the latest version of my server -
OC4J 9.0.4 (JSP 1.2).

Could this be some JSP 1.1 - 1.2 compatibility issue?

Shyam

--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> You're checking whether userRequest exists as a
> session attribute, then 
> trying to access it as a scripting variable. The one
> doesn't imply you 
> can do the other. If you need to access userRequest
> from scriptlets, 
> you'll need to use <bean:define/> to create the
> scripting variable or 
> lookup the bean in the session in your scriptlet:
> 
>   
>
<%=session.getAttribute("userRequest").getReqType()%>
> 
> L.
> 
> Shyam Anand wrote:
> > I figured that it's not a JDK issue and it is an
> > application server issue. I use OC4J (Oracle IAS)
> and
> > I'm upgrading from a version that supports JSP 1.1
> to
> > the one that is certified for JSP 1.2.
> > So, could this be a JSP 1.1 - 1.2 compatibility
> issue?
> > 
> > The JSP Compiler of the OC4J container doesn't
> seem to
> > recognize the bean:define tags embedded inside
> Struts
> > logic tags. 
> > 
> > See JSP code snippet below:
> > 
> > <logic:present name="userRequest" scope="session">
> > 
> > <bean:define id="userRequest" name="userRequest"
> > scope="session" type="dsap.business.UserRequest"/>
> > <bean:define id="employee" name="userRequest"
> > property="employee" type="dsap.business.Employee"
> />
> > <bean:define id="userModuleList"
> name="userRequest"
> > property="userModuleList" />
> > 
> > </logic:present>
> > 
> > And I get an error message when I access the
> > "userRequest" bean's properties in my JSP:
> > 
> > eg.
> > <html:text name="formBean" property="reqType"
> > value="<%=userRequest.getReqType()%>" />
> > 
> > Error:
> > JspServlet: unable to dispatch to requested page:
> > oracle.jsp.provider.JspCompileException: Errors
> > compiling:[jsp src:line #:133] cannot resolve
> symbol:
> > variable userRequest 
> > 
> > Any idea on what could be wrong here? Is there any
> > workaround for this?
> > 
> > I would not want to use JSTL as I have some time
> > constraints.
> > 
> > Any help will be greatly appreciated.
> > 
> > Thanks,
> > Shyam
> > 
> > 
> > --- Dave Newton <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>Shyam Anand wrote:
> >>
> >>
> >>>I have issues with struts-logic tags...I'm not
> >>
> >>using JSTL.
> >>
> >>> 
> >>>
> >>
> >>Whoops.
> >>
> >>I'm running 1.4.2 w/o any struts tag issues
> >>(including 'logic'). 
> >>(Tomcat, WinXP, 1.4.2_08)
> >>
> >>Why not switch to JSTL anyway, though?
> >>
> >>Dave
> >>
> >>
> >>
> >>
> > 
> >
>
---------------------------------------------------------------------
> > 
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> > 
> >             
> > __________________________________ 
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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

Reply via email to