RE: How to user logic:iterate[MORON]

2002-09-10 Thread Craig R. McClanahan



On Tue, 10 Sep 2002, Joe Barefoot wrote:

> Date: Tue, 10 Sep 2002 10:49:09 -0700
> From: Joe Barefoot <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: How to user logic:iterate[MORON]
>
> wow, really!?  The JSP compiler doesn't even issue a warning?  That's
> pretty lame.

In the absence of a taglib directive, what looks to you like a Struts tag
just looks like template text to the compiler, and it is simply passed
through to the response (like all the non-tag HTML markup in a typical
Struts-based JSP page).

Remember, there is no requirement that the template text look like HTML or
XML markup, so there is absolutely no basis on which the compiler can
possibly consider this to be an error condition.

>
> --joe

Craig


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




RE: How to user logic:iterate[MORON]

2002-09-10 Thread Joe Barefoot

wow, really!?  The JSP compiler doesn't even issue a warning?  That's pretty lame.

--joe

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 10, 2002 7:59 AM
> To: Struts Users Mailing List
> Subject: Re: How to user logic:iterate[MORON]
> 
> 
> Without the taglib statement, the tag is completely ignored, as if it 
> wasn't there. The JSP service assumes it's a HTML tag, and 
> the browsers 
> silently swallow anything they don't understand. C'est la vive.
> 
> -T.
> 
> Michael Lee wrote:
> 
> > I would like to thank everyone on this email list that 
> helped out. Every
> > little bit helped including the property attribute on 
> iterate and that
> > logic:present is very handy.
> > The main problem though was a complete brain fart on my part.
> > I am moron, hear me roar.
> > I forgot to include the tag lib import for logic. The thing I dont
> > understand is how it even go to the bean:write tag inside 
> the iterate and
> > failed there?
> > Oh well, if you ever get an error message like I did, don't 
> run around like
> > a chickend with your head chopped off, just include this 
> line at the top of
> > the jsp...
> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> > 
> > AAA, I hate stupid mistakes that waste everyone's time!!!
> > Mike
> > :(
> > 
> > 
> > - Original Message -
> > From: "John Yu" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Monday, September 09, 2002 10:20 PM
> > Subject: Re: How to user logic:iterate
> > 
> > 
> > 
> >>Option 1:
> >>
> >>In Action,
> >>
> >>   request.setAttribute("myUsers", users); // no need to 
> call getUsers()
> >>
> >>In JSP,
> >>
> >>   
> >>  >>scope="request">
> >> 
> >>   
> >>   
> >>   
> >>   
> >>   
> >>property="accoundDisabled"/>
> >>   
> >> 
> >> 
> >>   
> >>
> >>Option 2:
> >>
> >>Use your existing code, but get rid of the "user." part 
> from the property
> >>of the  tags.
> >>
> >>At 04:55 am 10-09-2002, you wrote:
> >>
> >>>Im having a helluva time getting logic:iterate to work..
> >>>I have a Users object that contains an array list of
> >>>User objects.
> >>>you call Users.getUsers() and it returns an arrayList
> >>>I stick that in the request object in the perform() method using
> >>>request.setAttribute("users", users.getUsers());
> >>>In the JSP the code I have is;
> >>>
> >>> <% ArrayList users = (ArrayList) request.getAttribute("users");
> >>>   if(users != null)
> >>>   {%>
> >>>
> >>>
> >>>  
> >>>  
> >>>  
> >>>  
> >>>  
> >>>   >>>
> > property="user.accoundDisabled"/>
> > 
> >>>  
> >>>
> >>>
> >>><%}%>
> >>>
> >>>The error I'm getting is;
> >>>
> >>>  
> >>><[WebAppServletContext(4398493,recei
> >>>ptsplus,/receiptsplus)] Root cause of ServletException
> >>>javax.servlet.jsp.JspException: Cannot find bean aUser in 
> scope null
> >>>at
> >>>
> > org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
> > 
> >>>at
> >>>org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.
> java:179)
> >>>at
> >>>jsp_servlet.__advanced_user_search._jspService(__advanced_u
> ser_search
> >>>.java:1541)
> >>>at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> >>>at
> >>>weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ser
> vletStubIm
> >>>pl.java:265)
> >>>
> >>>what am I doing wrong?
> >>>help!
> >>>thanks,
> >>>Mike
> >>>
> >>--
> >>John Yu   Scioworks Technologies
> >>e: [EMAIL PROTECTED] w: +(65) 873 5989
> >>w: http://www.scioworks.com   m: +(65) 9782 9610
> >>
> >>Scioworks Camino - "Don't develop Struts Apps without it!"
> >>Copyright (c) 2002 John Yu/Scioworks Technologies. All 
> rights reserved.
> >>
> >>
> >>--
> >>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]>
> 
> 


-- 
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:
<http://husted.com/struts/book.html>


--
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]>




Re: How to user logic:iterate[MORON]

2002-09-10 Thread Ted Husted

Without the taglib statement, the tag is completely ignored, as if it 
wasn't there. The JSP service assumes it's a HTML tag, and the browsers 
silently swallow anything they don't understand. C'est la vive.

-T.

Michael Lee wrote:

> I would like to thank everyone on this email list that helped out. Every
> little bit helped including the property attribute on iterate and that
> logic:present is very handy.
> The main problem though was a complete brain fart on my part.
> I am moron, hear me roar.
> I forgot to include the tag lib import for logic. The thing I dont
> understand is how it even go to the bean:write tag inside the iterate and
> failed there?
> Oh well, if you ever get an error message like I did, don't run around like
> a chickend with your head chopped off, just include this line at the top of
> the jsp...
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> AAA, I hate stupid mistakes that waste everyone's time!!!
> Mike
> :(
> 
> 
> - Original Message -
> From: "John Yu" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, September 09, 2002 10:20 PM
> Subject: Re: How to user logic:iterate
> 
> 
> 
>>Option 1:
>>
>>In Action,
>>
>>   request.setAttribute("myUsers", users); // no need to call getUsers()
>>
>>In JSP,
>>
>>   
>> >scope="request">
>> 
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>> 
>> 
>>   
>>
>>Option 2:
>>
>>Use your existing code, but get rid of the "user." part from the property
>>of the  tags.
>>
>>At 04:55 am 10-09-2002, you wrote:
>>
>>>Im having a helluva time getting logic:iterate to work..
>>>I have a Users object that contains an array list of
>>>User objects.
>>>you call Users.getUsers() and it returns an arrayList
>>>I stick that in the request object in the perform() method using
>>>request.setAttribute("users", users.getUsers());
>>>In the JSP the code I have is;
>>>
>>> <% ArrayList users = (ArrayList) request.getAttribute("users");
>>>   if(users != null)
>>>   {%>
>>>
>>>
>>>  
>>>  
>>>  
>>>  
>>>  
>>>  >>
> property="user.accoundDisabled"/>
> 
>>>  
>>>
>>>
>>><%}%>
>>>
>>>The error I'm getting is;
>>>
>>>  
>>><[WebAppServletContext(4398493,recei
>>>ptsplus,/receiptsplus)] Root cause of ServletException
>>>javax.servlet.jsp.JspException: Cannot find bean aUser in scope null
>>>at
>>>
> org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
> 
>>>at
>>>org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)
>>>at
>>>jsp_servlet.__advanced_user_search._jspService(__advanced_user_search
>>>.java:1541)
>>>at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>>>at
>>>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
>>>pl.java:265)
>>>
>>>what am I doing wrong?
>>>help!
>>>thanks,
>>>Mike
>>>
>>--
>>John Yu   Scioworks Technologies
>>e: [EMAIL PROTECTED] w: +(65) 873 5989
>>w: http://www.scioworks.com   m: +(65) 9782 9610
>>
>>Scioworks Camino - "Don't develop Struts Apps without it!"
>>Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
> 
> 
>>For additional commands, e-mail:
>>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


-- 
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to user logic:iterate[MORON]

2002-09-10 Thread Michael Lee

I would like to thank everyone on this email list that helped out. Every
little bit helped including the property attribute on iterate and that
logic:present is very handy.
The main problem though was a complete brain fart on my part.
I am moron, hear me roar.
I forgot to include the tag lib import for logic. The thing I dont
understand is how it even go to the bean:write tag inside the iterate and
failed there?
Oh well, if you ever get an error message like I did, don't run around like
a chickend with your head chopped off, just include this line at the top of
the jsp...
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

AAA, I hate stupid mistakes that waste everyone's time!!!
Mike
:(


- Original Message -
From: "John Yu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 10:20 PM
Subject: Re: How to user logic:iterate


> Option 1:
>
> In Action,
>
>request.setAttribute("myUsers", users); // no need to call getUsers()
>
> In JSP,
>
>
>   scope="request">
>  
>
>
>
>
>
>
>
>  
>  
>
>
> Option 2:
>
> Use your existing code, but get rid of the "user." part from the property
> of the  tags.
>
> At 04:55 am 10-09-2002, you wrote:
> >Im having a helluva time getting logic:iterate to work..
> >I have a Users object that contains an array list of
> >User objects.
> >you call Users.getUsers() and it returns an arrayList
> >I stick that in the request object in the perform() method using
> >request.setAttribute("users", users.getUsers());
> >In the JSP the code I have is;
> >
> >  <% ArrayList users = (ArrayList) request.getAttribute("users");
> >if(users != null)
> >{%>
> > 
> > 
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> > 
> > <%}%>
> >
> >The error I'm getting is;
> >
> >  
> ><[WebAppServletContext(4398493,recei
> >ptsplus,/receiptsplus)] Root cause of ServletException
> >javax.servlet.jsp.JspException: Cannot find bean aUser in scope null
> > at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
> > at
> > org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)
> > at
> > jsp_servlet.__advanced_user_search._jspService(__advanced_user_search
> >.java:1541)
> > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> >pl.java:265)
> >
> >what am I doing wrong?
> >help!
> >thanks,
> >Mike
>
> --
> John Yu   Scioworks Technologies
> e: [EMAIL PROTECTED] w: +(65) 873 5989
> w: http://www.scioworks.com   m: +(65) 9782 9610
>
> Scioworks Camino - "Don't develop Struts Apps without it!"
> Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: