RE: choose question

2004-05-20 Thread Morrow, Steve D.
c:set var=checkDate value= /
c:forEach var=row items=${result.rows}
 fmt:parseDate value=${row.date} var=parsedDate
pattern=-MM-dd/
 tr
td align=left
  c:if test=${checkDate != parseDate}
fmt:formatDate value=${parsedDate} pattern=E'., 'MMM d/
c:set var=checkDate value=${parsedDate} /
  /c:if
/td   
td align=rightc:out value=${row.Time}//td
td align=centerc:out value=${row.Am_Pm}//td
td align=rightc:out value=${row.Height}//td
td align=centerc:out value=${row.Cond}//td
 tr
 /c:forEach
/table

 -Original Message-
 From: Jack Lauman [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 20, 2004 1:31 PM
 To: Tag Libraries Users List
 Subject: c:choose question
 
 
 I am trying to format a table so that it displays the date in 
 the first 
 column on the first row and not display it again until the 
 date changes 
 to the next day.  I have tried the following code to get this 
 to work. 
 Any suggestion on how to solve this problem would be appreciated.
 
 I've tried the display taglib but it's overkill for this.
 
 
 table
  tr align=center
   thDate/th
   thTime/th
   tham/pm/th
   thHeight/th
   thCondition/th
  /tr
 
  c:forEach var=row items=${result.rows}
  fmt:parseDate value=${row.date} var=parsedDate 
 pattern=-MM-dd/
  tr
  c:choose
   c:when test=${parsedDate == parsedDate}
   td align=left//td 
   c:otherwise
   td align=leftfmt:formatDate value=${parsedDate} 
 pattern=E'., 
 'MMM d//td
   /c:otherwise
   c:when
   /c:choose
   td align=rightc:out value=${row.Time}//td
   td align=centerc:out value=${row.Am_Pm}//td
   td align=rightc:out value=${row.Height}//td
   td align=centerc:out value=${row.Cond}//td
  tr
  /c:forEach
 /table
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: choose question

2004-05-20 Thread Morrow, Steve D.
CORRECTED TYPO:

c:set var=checkDate value= /
c:forEach var=row items=${result.rows}
 fmt:parseDate value=${row.date} var=parsedDate
pattern=-MM-dd/
 tr
td align=left
  c:if test=${checkDate != parsedDate}
fmt:formatDate value=${parsedDate} pattern=E'., 'MMM d/
c:set var=checkDate value=${parsedDate} /
  /c:if
/td   
td align=rightc:out value=${row.Time}//td
td align=centerc:out value=${row.Am_Pm}//td
td align=rightc:out value=${row.Height}//td
td align=centerc:out value=${row.Cond}//td
 tr
 /c:forEach
/table


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: outputting html as html

2004-05-18 Thread Morrow, Steve D.
If you're using the c:out tag, set the escapeXml attribute to false.

Example: c:out value=${myBean.html} escapeXml=false /

 -Original Message-
 From: Barnett, Brian W. [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 18, 2004 12:35 PM
 To: '[EMAIL PROTECTED]'
 Subject: outputting html as html
 
 
 How can I output a string of html as html?
 
  
 
 If I have a property called myBean.html set to,
 
  
 
 table border='1'trtdHi there. This is an html bean 
 writing test./td/tr/table
 
  
 
 how can I output it in the jsp page as html? (i.e., as a 
 table with a border of 1, not a string with angle bracket syntax.)
 
  
 
 Thanks,
 
 Brian Barnett
 
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: whitespace inside c:choose but outside c:when inserted in to output

2004-05-03 Thread Morrow, Steve D.
I would have expected the space. Do the different versions behave
differently with respect to this?

 -Original Message-
 From: Andreas Schildbach [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 03, 2004 10:22 AM
 To: [EMAIL PROTECTED]
 Subject: whitespace inside c:choose but outside c:when 
 inserted into output
 
 
 Hello everyone,
 
 With the Jakarta JSTL implementation 1.10, I discovered the following 
 behaviour:
 
 Any whitespace inside c:choose but outside c:when or 
 c:otherwise 
 is inserted into the output stream.
 
 An example:
 
 Xc:choose c:when test=${true}Y/c:when/c:choose
 
 would result in X Y instead of the expected XY.
 
 Regards,
 
 Andreas
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: whitespace inside c:choose but outside c:when inserted in to output

2004-05-03 Thread Morrow, Steve D.
I don't disagree with your viewpoint (a 300-character line can be yucky to
read); I'm just saying I would have expected the space and am interested to
know if the different implementations handle this differently.

 -Original Message-
 From: Andreas Schildbach [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 03, 2004 10:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: whitespace inside c:choose but outside 
 c:when inserted in to output
 
 
 Morrow, Steve D. wrote:
 
  I would have expected the space.
 
 I thought there is no sense in putting any text between 
 c:choose and 
 c:when. When should it show up?
 
 Suppressing the whitespace at this point would ease indenting choose 
 constructs. If I want no whitespace at all, with the current 
 implementation I have to write the whole 
 choose/when/when/otherwise-construct in one line, which 
 results in a 300 
 character line.
 
 Regards,
 
 Andreas
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: Help: How to generate unescaped HTML output

2004-03-29 Thread Morrow, Steve D.
c:out value=${newsItem.news}/ escapeXml=false

 -Original Message-
 From: Frank Burns [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 29, 2004 10:39 AM
 To: [EMAIL PROTECTED]
 Subject: Help: How to generate unescaped HTML output
 
 
 Hi,
 
 Can someone help please. I have an urgent problem I have to 
 solve for a client.
 
 I'm using this tag
 
 c:out value=${newsItem.news}/
 
 to ouput the news from a newsItem bean into a JSP that is 
 generating XML.
 
 The problem is, the news in the newsItem may contain HTML text.
 
 The c:out ... tag seems to be escaping the HTML 
 angled-brackets,  and , with lt; and gt;
 
 How do I stop this character-escaping functionality?
 
 Is there a different tag that will just output the raw text 
 from my bean's getNews() method?
 
 Thanks,
 
 Frank.
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: Help: How to generate unescaped HTML output

2004-03-29 Thread Morrow, Steve D.
Sorry - misplaced cut'n'paste... :o)

c:out value=${newsItem.news} escapeXml=false/

 -Original Message-
 From: Morrow, Steve D. [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 29, 2004 10:41 AM
 To: 'Tag Libraries Users List'
 Subject: RE: Help: How to generate unescaped HTML output
 
 
 c:out value=${newsItem.news}/ escapeXml=false
 
  -Original Message-
  From: Frank Burns [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 29, 2004 10:39 AM
  To: [EMAIL PROTECTED]
  Subject: Help: How to generate unescaped HTML output
  
  
  Hi,
  
  Can someone help please. I have an urgent problem I have to
  solve for a client.
  
  I'm using this tag
  
  c:out value=${newsItem.news}/
  
  to ouput the news from a newsItem bean into a JSP that is
  generating XML.
  
  The problem is, the news in the newsItem may contain HTML text.
  
  The c:out ... tag seems to be escaping the HTML
  angled-brackets,  and , with lt; and gt;
  
  How do I stop this character-escaping functionality?
  
  Is there a different tag that will just output the raw text
  from my bean's getNews() method?
  
  Thanks,
  
  Frank.
  
 
 
 This message and any files transmitted with it are 
 confidential and are intended solely for the use of the 
 individual or entity to whom they are addressed.  If you have 
 received this email in error, please delete the email and any 
 files transmitted with it entirely from your computer. 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: how to use methods with parameters

2004-02-05 Thread Morrow, Steve D.
There a several different ways to calculate days, based on the definition of
day; e.g. should 23:59 - 00:01 count as a day? Nevertheless, once you
decide on those rules, you can write your own custom tag (I don't believe
JSTL has such a function).

my:days start=%= startDate % end=%= endDate % /

If you're interested in writing your own tags, Sun has a good tutorial here:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html


 -Original Message-
 From: Just Fun 4 You [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, February 05, 2004 10:38 AM
 To: [EMAIL PROTECTED]
 Subject: how to use methods with parameters
 Sensitivity: Personal
 
 
 Hi,
  
 is it possible to use JSTL for an expression like
  
 %=calculateDays(startDate, endDate) % ???
  
  
 probably not, but I am too new to JSTL to figure it out by 
 myself. Could someone advise me?
  
 thanks.
 Dirk
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: Loop Tags

2004-01-15 Thread Morrow, Steve D.
The standard tag library offers that functionality. Make sure the c.tld is
in your web-inf directory...

!-- as an example, with locations as a jav.util.Collection of Location
objects with getters... --
select name=location
option value=Select a Station ID/option
c:forEach var=location items=${locations}
option value=c:out value=${location.id}/c:out
value=${location.name}//option
/c:forEach
/select

 -Original Message-
 From: Anthony Smith [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 15, 2004 10:46 AM
 To: [EMAIL PROTECTED]
 Subject: Loop Tags
 
 
 I am fairly new to taglibs...
 
 However as I start to create more jsps. I have decided to 
 take advantage for
 
 tags for better MVC compilancy and code re-use. I looked through the
 
 standard tags, but did not see what I was looking for.
 
 I am looking for tags that I can use for things like for 
 loops and such.
 
 Instead of doing things like:
 
 select name=stationId
 
 option value=Select a Station ID/option
 
 %
 
 for( int i = 0; i  locations.length; i++ )
 
 {
 
 %
 
 option
 
 value=%=locations[i].value()%%=locations[i].value()%/option
 
 %
 
 }
 
 %
 
 /select
 
 
 
 Cleaning that code up even more where my for loop is in a 
 tag. Where can I
 
 find such a tag?
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: fmt+struts headaches.

2003-11-20 Thread Morrow, Steve D.
If you put the standard.jar and jstl.jar files in your /WEB-INF/lib
directory of your webapp, and the corresponding TLD files in /WEB-INF, you
can use %@ taglib prefix=c uri=/WEB-INF/c.tld%, for example. No
connectivity problems... :o)

 -Original Message-
 From: Caoilte O'Connor [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 20, 2003 7:31 AM
 To: [EMAIL PROTECTED]
 Subject: Re: fmt+struts headaches.
 
 
 will that work testing a container not connected to the 
 internet though? I'd hate to be sitting on the train with 
 my laptop getting cannot download taglib type errors.
 
 c
 
 On Thursday 20 November 2003 14:11, Kris Schneider wrote:
  As of JSP 1.2, there's really no need for separate tld
  files and taglib entries in web.xml - at least for
  packaged taglibs like Struts and JSTL. Just use the
  following directive in your JSP:
 
  %@ taglib prefix=c uri=http://java.sun.com/jstl/core;
  %
 
  Quoting Caoilte O'Connor [EMAIL PROTECTED]:
   aaah. many thanks. that looks exactly like what i want.
  
   should i replace my c taglibs (and others), presently URI=/ 
   WEB-INF/c.tld with http://java.sun.com/jstl/c; too?
  
   c
  
   On Thursday 20 November 2003 13:39, Kris Schneider
 wrote:
You might try using a servlet filter to keep the
locales in sync:
   
import javax.servlet.jsp.jstl.core.Config;
...
HttpSession session = request.getSession(true);
Locale locale = 
 (Locale)session.getAttribute(Globals.LOCALE_KEY); 
if (locale == null) {
  locale = request.getLocale();
}
Config.set(session, Config.FMT_LOCALE, locale);
   
Obviously, you can use the Config class from action
code as well. Depending on what type of app server
you're using, you'll want a different version of
JSTL, which means different taglib URIs:
   
JSP 1.2 / JSTL 1.0 (e.g. Tomcat 4): http://java.sun.com/jstl/fmt
   
JSP 2.0 / JSTL 1.1 (e.g. Tomcat 5): 
http://java.sun.com/jsp/jstl/fmt
   
Quoting Caoilte O'Connor [EMAIL PROTECTED]:
 hey all,
 I'm playing around and trying to get the jstl 
 internationalization tags working with struts. It's proving a 
 bit more of a headache than I'd like.

 I made the usual changes and eventually figured out that the 
 1.0.0 release (included in the struts 1.1 contrib dir) is 
 seriously broken.

 Now I'm trying to work out the best way to allow
 users to change locale. Right now I've had to put a

 fmt:setLocale  
value='${sessionScope[org.apache.struts.action.LOC
ALE ]}'/


 at the top of every jsp page using fmt tags
 otherwise the fmt tags do not pick up on locale changes.

 (I've tried using session.setAttribute(Config.FMT_LOCALE, 
 locale);

 in the action where I normally change locale but
 that didn't work (it was suggested in the archives
 somewhere.)

 Does anyone know how I can change the fmt locale as 
 part of an 
 action (ie not using the fmt tags)?



 ALSO,
 i had to change the URI of the fmt tag to be
 http:// java.sun.com/jstl/fmt before it would
 work properly.

 Are there any other tag libraries with such a feature?

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


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: fmt+struts headaches.

2003-11-20 Thread Morrow, Steve D.
Really? I haven't had any trouble with the fmt tags. Double-check to be sure
you've got the fmt.tld and the jars in the right place, and the URI correct.
Also, you may want to verify that you're using the correct TLD version.

/WEB-INF/lib/standard.jar
/WEB-INF/fmt.tld
%@ taglib prefix=fmt uri=/WEB-INF/fmt.tld%

 -Original Message-
 From: Caoilte O'Connor [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 20, 2003 7:43 AM
 To: [EMAIL PROTECTED]
 Subject: Re: fmt+struts headaches.
 
 
 hehe, that's what I do at the moment. apparently it doesn't 
 work for fmt tags though. :-(. 
 
 c
 
 On Thursday 20 November 2003 14:35, Morrow, Steve D. wrote:
  If you put the standard.jar and jstl.jar files in your /WEB-INF/lib 
  directory of your webapp, and the corresponding TLD files 
 in /WEB-INF, 
  you can use %@ taglib prefix=c uri=/WEB-INF/c.tld%, 
 for example. 
  No connectivity problems... :o)
 
   -Original Message-
   From: Caoilte O'Connor [mailto:[EMAIL PROTECTED]
   Sent: Thursday, November 20, 2003 7:31 AM
   To: [EMAIL PROTECTED]
   Subject: Re: fmt+struts headaches.
  
  
   will that work testing a container not connected to the internet 
   though? I'd hate to be sitting on the train with my 
 laptop getting 
   cannot download taglib type errors.
  
   c
  
   On Thursday 20 November 2003 14:11, Kris Schneider
 wrote:
As of JSP 1.2, there's really no need for separate
tld files and taglib entries in web.xml - at least
for packaged taglibs like Struts and JSTL. Just use
the following directive in your JSP:
   
%@ taglib prefix=c
uri=http://java.sun.com/jstl/core; %
   
Quoting Caoilte O'Connor [EMAIL PROTECTED]:
 aaah. many thanks. that looks exactly like what i
 want.

 should i replace my c taglibs (and others),
 presently URI=/ WEB-INF/c.tld with 
 http://java.sun.com/jstl/c; too?

 c

 On Thursday 20 November 2003 13:39, Kris Schneider
  
   wrote:
  You might try using a servlet filter to keep the locales in 
  sync:
 
  import javax.servlet.jsp.jstl.core.Config;
  ...
  HttpSession session = request.getSession(true); 
 Locale locale 
  =
  
   (Locale)session.getAttribute(Globals.LOCALE_KEY);
  
  if (locale == null) {
locale = request.getLocale();
  }
  Config.set(session, Config.FMT_LOCALE, locale);
 
  Obviously, you can use the Config class from
  action code as well. Depending on what type of
  app server you're using, you'll want a different version of 
  JSTL, which means different taglib
  URIs:
 
  JSP 1.2 / JSTL 1.0 (e.g. Tomcat 4): 
  http://java.sun.com/jstl/fmt
 
  JSP 2.0 / JSTL 1.1 (e.g. Tomcat 5): 
  http://java.sun.com/jsp/jstl/fmt
 
  Quoting Caoilte O'Connor [EMAIL PROTECTED]:
   hey all,
   I'm playing around and trying to get the jstl 
   internationalization tags working with struts. 
 It's proving 
   a bit more of a headache than I'd like.
  
   I made the usual changes and eventually figured
   out that the 1.0.0 release (included in the
   struts 1.1 contrib dir) is seriously broken.
  
   Now I'm trying to work out the best way to
   allow users to change locale. Right now I've
   had to put a
  
   fmt:setLocale 
  value='${sessionScope[org.apache.struts.action.
  LOC ALE ]}'/
  
  
   at the top of every jsp page using fmt tags otherwise the 
   fmt tags do not pick up on locale changes.
  
   (I've tried using session.setAttribute(Config.FMT_LOCALE,
   locale);
  
   in the action where I normally change locale
   but that didn't work (it was suggested in the archives 
   somewhere.)
  
   Does anyone know how I can change the fmt
   locale as
  
   part of an
  
   action (ie not using the fmt tags)?
  
  
  
   ALSO,
   i had to change the URI of the fmt tag to be http:// 
   java.sun.com/jstl/fmt before it would work properly.
  
   Are there any other tag libraries with such a feature?
  
   c
  
   ---
  -- To unsubscribe, e-mail:  
  [EMAIL PROTECTED] For  
 additional commands, 
  e-mail:  [EMAIL PROTECTED]
 
  This message and any files transmitted with it are confidential and 
  are intended solely for the use of the individual or entity to whom 
  they are addressed.  If you have received this email in 
 error, please 
  delete the email and any files transmitted with it entirely from
  your computer.
 
 
 
  -
  To unsubscribe, e-mail:  
 [EMAIL PROTECTED] For  additional 
 commands, 
 e-mail:  [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL

RE: embedding sql:query

2003-11-10 Thread Morrow, Steve D.
SQL tags are great for doing quick-n-dirty test stuff, but data access in a
production environment is probably best left out of the View layer (i.e.,
the *.jsp) of a Model-View-Controller setup. Send the request to a servlet,
have the servlet call a data access method to populate a data bean, and send
the data bean (or List of beans) back to the *.jsp for display.

That's pretty high-level, but I hope it gives you the idea. :o)

 -Original Message-
 From: Peter Choe [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 9:29 AM
 To: Tag Libraries Users List
 Subject: Re: embedding sql:query
 
 
 i am relatively new to using the jstl.  what do you mean 
 putting it in 
 Action?
 
 [EMAIL PROTECTED] wrote:
 
 
 
 
 Did you know you could get much better performance out of 
 putting that 
 sql stuff in the Action? Savan Thongvanh
 Berkley Technology Services
 515.278.7725
 
 
  
   
   
   Peter Choe 
   
   
   [EMAIL PROTECTED]To:   Tag 
 Libraries Users List [EMAIL PROTECTED]
   
   ing.com cc:   
   
   
Subject:  
 embedding sql:query 
   
   11/10/2003 09:25   
   
   
   AM 
   
   
   Please respond to  
   
   
   Tag Libraries 
   
   
   Users List
   
   
  
   
   
  
   
   
 
 
 
 
 is it possible to embed a sql:query tag inside a sql:query?
 
 i am trying to use the result of one sql to look up data 
 with another 
 sql:
 
 sql:query var=waitList sql=SELECT discipline, course_num, 
 days_of_week, time_slot, crs_id, is_available, 
 wait_list_course.semester FROM wait_list_course, time_slots WHERE 
 time_slots.time_id=wait_list_course.time_id AND school_id=? ORDER BY 
 discipline, course_num, time_slot, is_available sql:param 
 value=${sessionScope.school} / /sql:query
 c:forEach var=listRec items=${waitList.rows}
 trtdc:out value=${listRec.discipline} / c:out
 value=${listRec.course_num} //tdtdc:out
 value=${listRec.days_of_week} //tdtdc:out
 value=${listRec.time_slot} //tdtdc:out
 value=${listRec.is_available} //tdtdc:out
 value=${listRec.semester} //td
 sql:query var=count sql=SELECT count(*) FROM student_status WHERE
 add IS NOT NULL AND crs_id=?
 sql:param value=${listRec.crs_id} /
 /sql:query
 tdc:forEach var=act_count items=${count.rowsByIndex}c:out
 value=${act_count[0]} //c:forEach/td
 tdinput type=button name=close value=Close
 onClick=doAction('c:out value=${listRec.crs_id} /', 'close',
 'No')input type=button name=open value=Open
 onClick=doAction('c:out value=${listRec.crs_id} /', 'close',
 'Yes')input type=button name=recycle value=Recycle
 onClick=doAction('c:out value=${listRec.crs_id} /', 
 'recycle')/tr
 /c:forEach
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents 
 contain private, privileged and confidential information 
 belonging to 
 the sender. The information therein is solely for the use of the 
 addressee.  If your receipt of this transmission has occurred as the 
 result of an error, please immediately notify us so we can 
 arrange for 
 the return of the documents. In such circumstances, you are advised 
 that you may not disclose, copy, distribute or take any 
 other action in 
 reliance on the information transmitted.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 
 
 
 
 

RE: embedding sql:query

2003-11-10 Thread Morrow, Steve D.
P.S. Actions are helper classes in the Struts framework, generally used to
extend controller (servlet) functionality.

 -Original Message-
 From: Morrow, Steve D. [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 9:33 AM
 To: 'Tag Libraries Users List'
 Subject: RE: embedding sql:query
 
 
 SQL tags are great for doing quick-n-dirty test stuff, but 
 data access in a production environment is probably best left 
 out of the View layer (i.e., the *.jsp) of a 
 Model-View-Controller setup. Send the request to a servlet, 
 have the servlet call a data access method to populate a data 
 bean, and send the data bean (or List of beans) back to the 
 *.jsp for display.
 
 That's pretty high-level, but I hope it gives you the idea. :o)
 
  -Original Message-
  From: Peter Choe [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 10, 2003 9:29 AM
  To: Tag Libraries Users List
  Subject: Re: embedding sql:query
  
  
  i am relatively new to using the jstl.  what do you mean
  putting it in 
  Action?
  
  [EMAIL PROTECTED] wrote:
  
  
  
  
  Did you know you could get much better performance out of
  putting that
  sql stuff in the Action? Savan Thongvanh
  Berkley Technology Services
  515.278.7725
  
  
   


Peter Choe 


[EMAIL PROTECTED]To:   Tag 
  Libraries Users List [EMAIL PROTECTED]

ing.com cc:   


 Subject:
  embedding sql:query 

11/10/2003 09:25   


AM 


Please respond to  


Tag Libraries 


Users List


   


   


  
  
  
  
  is it possible to embed a sql:query tag inside a sql:query?
  
  i am trying to use the result of one sql to look up data
  with another
  sql:
  
  sql:query var=waitList sql=SELECT discipline, course_num,
  days_of_week, time_slot, crs_id, is_available, 
  wait_list_course.semester FROM wait_list_course, time_slots WHERE 
  time_slots.time_id=wait_list_course.time_id AND 
 school_id=? ORDER BY 
  discipline, course_num, time_slot, is_available sql:param 
  value=${sessionScope.school} / /sql:query
  c:forEach var=listRec items=${waitList.rows}
  trtdc:out value=${listRec.discipline} / c:out
  value=${listRec.course_num} //tdtdc:out
  value=${listRec.days_of_week} //tdtdc:out
  value=${listRec.time_slot} //tdtdc:out
  value=${listRec.is_available} //tdtdc:out
  value=${listRec.semester} //td
  sql:query var=count sql=SELECT count(*) FROM 
 student_status WHERE
  add IS NOT NULL AND crs_id=?
  sql:param value=${listRec.crs_id} /
  /sql:query
  tdc:forEach var=act_count items=${count.rowsByIndex}c:out
  value=${act_count[0]} //c:forEach/td
  tdinput type=button name=close value=Close
  onClick=doAction('c:out value=${listRec.crs_id} /', 'close',
  'No')input type=button name=open value=Open
  onClick=doAction('c:out value=${listRec.crs_id} /', 'close',
  'Yes')input type=button name=recycle value=Recycle
  onClick=doAction('c:out value=${listRec.crs_id} /', 
  'recycle')/tr
  /c:forEach
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
  
  
  
  CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents
  contain private, privileged and confidential information 
  belonging to
  the sender. The information therein is solely for the use of the
  addressee.  If your receipt of this transmission has 
 occurred as the 
  result of an error, please immediately notify us so we can 
  arrange

RE: embedding sql:query

2003-11-10 Thread Morrow, Steve D.
It looks like there's no closing /td tag after your input tags. That may
be causing some of the HTML rendering problems...

At what point does the HTML *stop*?
  
  
   Peter Choe  
   
  
   [EMAIL PROTECTED]To:   Tag 
 Libraries Users List [EMAIL PROTECTED]
   
   ing.com cc:
   
  
Subject:  Re: 
 embedding sql:query 
   
   11/10/2003 09:40
   
  
   AM  
   
  
   Please respond to   
   
  
   Tag Libraries  
   
  
   Users List 
   
  
   
   
  
   
   
  
 
 
 
 
 no error is being reported but the jsp doesn't finish 
 rendering.  but i guess i should redo the design.  i was just 
 trying to be lazy and avoid coding.
 
 thanks all.
 
 Kris Schneider wrote:
 
 You're not really embedding one sql:query within another, but it 
 should
 work.
 What type of error(s) are you getting?
 
 Quoting Peter Choe [EMAIL PROTECTED]:
 
 
 
 is it possible to embed a sql:query tag inside a sql:query?
 
 i am trying to use the result of one sql to look up data 
 with another
 sql:
 
 sql:query var=waitList sql=SELECT discipline, course_num, 
 days_of_week, time_slot, crs_id, is_available, 
 wait_list_course.semester FROM wait_list_course, time_slots WHERE 
 time_slots.time_id=wait_list_course.time_id AND school_id=? 
 ORDER BY 
 discipline, course_num, time_slot, is_available sql:param 
 value=${sessionScope.school} / /sql:query
 c:forEach var=listRec items=${waitList.rows}
 trtdc:out value=${listRec.discipline} / c:out
 value=${listRec.course_num} //tdtdc:out
 value=${listRec.days_of_week} //tdtdc:out
 value=${listRec.time_slot} //tdtdc:out
 value=${listRec.is_available} //tdtdc:out
 value=${listRec.semester} //td
 sql:query var=count sql=SELECT count(*) FROM 
 student_status WHERE
 add IS NOT NULL AND crs_id=?
 sql:param value=${listRec.crs_id} /
 /sql:query
 tdc:forEach var=act_count items=${count.rowsByIndex}c:out
 value=${act_count[0]} //c:forEach/td
 tdinput type=button name=close value=Close
 onClick=doAction('c:out value=${listRec.crs_id} /', 'close',
 'No')input type=button name=open value=Open
 onClick=doAction('c:out value=${listRec.crs_id} /', 'close',
 'Yes')input type=button name=recycle value=Recycle
 onClick=doAction('c:out value=${listRec.crs_id} /',
 'recycle')/tr
 /c:forEach
 
 
 
 
 
 
 
 
 
 CONFIDENTIALITY NOTICE: This e-mail and the transmitted 
 documents contain private, privileged and confidential 
 information belonging to the sender. The information therein 
 is solely for the use of the addressee.  If your receipt of 
 this transmission has occurred as the result of an error, 
 please immediately notify us so we can arrange for the return 
 of the documents. In such circumstances, you are advised that 
 you may not disclose, copy, distribute or take any other 
 action in reliance on the information transmitted.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: Jstl i18n not working

2003-11-10 Thread Morrow, Steve D.
Assuming then, that the ApplicationResources.properties file is not in a
*.jar, you may try making sure that the file is in the
/WEB-INF/classes/org.j2e_translate directory with the settings you currently
have... 

 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 11:18 AM
 To: 'Tag Libraries Users List'
 Subject: RE: Jstl i18n not working
 
 
 Ah, I wonder...
 
 In my struts.xml file, I define the resource file too:
   
   !-- == Message Resources Definitions 
 === --
   message-resources 
 parameter=org.j2e_translate.ApplicationResources
   /message-resources
 
 Will that cause any conflict?  I have no clue right now.  I 
 tried all kinds of combination... With path, absolute path, 
 without path, still no vail..
 
 Thanks!
   
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: November 10, 2003 10:07 AM
 To: Tag Libraries Users List
 Cc: 'Tag Libraries Users List'
 Subject: Re: Jstl i18n not working
 
 
 
 
 
 
 
 I've only seen that when struts can't find the resource file 
 or the key...
 
 Savan Thongvanh
 Berkley Technology Services
 515.278.7725
 
 
  
 
 Yansheng Lin
 
 [EMAIL PROTECTED]To:   'Tag Libraries Users List'
 [EMAIL PROTECTED]gis.com
 cc:
 
Subject:  Jstl i18n not working
 
 11/10/2003 11:00AM
 
 Please respond toTag Libraries Users List
 
 
 Hi, in my web.xml:
 
   !--  JSTL i18n support 
 ===
 --
   context-param
 
 param-namejavax.servlet.jsp.jstl.fmt.fall-backLocale/param-name
 param-valueen/param-value
   /context-param
   context-param
 
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
 ram-name
  param-valueApplicationResources.properties/param-value
   /context-param
 
 Then in my jsp:
 
 fmt:bundle basename=ApplicationResources
   fmt:message key=j2emain.title /
 /fmt:bundle
 
 But I am getting the following output:
  ???j2emain.title???
 
 Help appreciated!
 
 -Yan
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 CONFIDENTIALITY NOTICE: This e-mail and the transmitted 
 documents contain private, privileged and confidential 
 information belonging to the sender. The information therein 
 is solely for the use of the addressee.  If your receipt of 
 this transmission has occurred as the result of an error, 
 please immediately notify us so we can arrange for the return 
 of the documents. In such circumstances, you are advised that 
 you may not disclose, copy, distribute or take any other 
 action in reliance on the information transmitted.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: Jstl i18n not working

2003-11-10 Thread Morrow, Steve D.
Typo: directory = /WEB-INF/classes/org/j2e_translate

 -Original Message-
 From: Morrow, Steve D. [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 11:22 AM
 To: 'Tag Libraries Users List'
 Subject: RE: Jstl i18n not working
 
 
 Assuming then, that the ApplicationResources.properties file 
 is not in a *.jar, you may try making sure that the file is 
 in the /WEB-INF/classes/org.j2e_translate directory with the 
 settings you currently have... 
 
  -Original Message-
  From: Yansheng Lin [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 10, 2003 11:18 AM
  To: 'Tag Libraries Users List'
  Subject: RE: Jstl i18n not working
  
  
  Ah, I wonder...
  
  In my struts.xml file, I define the resource file too:
  
!-- == Message Resources Definitions
  === --
message-resources 
  parameter=org.j2e_translate.ApplicationResources
/message-resources
  
  Will that cause any conflict?  I have no clue right now.  I
  tried all kinds of combination... With path, absolute path, 
  without path, still no vail..
  
  Thanks!
  
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: November 10, 2003 10:07 AM
  To: Tag Libraries Users List
  Cc: 'Tag Libraries Users List'
  Subject: Re: Jstl i18n not working
  
  
  
  
  
  
  
  I've only seen that when struts can't find the resource file
  or the key...
  
  Savan Thongvanh
  Berkley Technology Services
  515.278.7725
  
  
   
  
  Yansheng Lin
  
  [EMAIL PROTECTED]To:   'Tag Libraries Users List'
  [EMAIL PROTECTED]gis.com
  cc:
  
   Subject:  Jstl i18n not working
  
  11/10/2003 11:00AM
  
  Please respond toTag Libraries Users List
  
  
  Hi, in my web.xml:
  
!--  JSTL i18n support
  ===
  --
context-param
  
  param-namejavax.servlet.jsp.jstl.fmt.fall-backLocale/param-name
  param-valueen/param-value
/context-param
context-param
  
  param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
  ram-name
   param-valueApplicationResources.properties/param-value
/context-param
  
  Then in my jsp:
  
  fmt:bundle basename=ApplicationResources
fmt:message key=j2emain.title /
  /fmt:bundle
  
  But I am getting the following output:
   ???j2emain.title???
  
  Help appreciated!
  
  -Yan
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
  
  
  
  CONFIDENTIALITY NOTICE: This e-mail and the transmitted
  documents contain private, privileged and confidential 
  information belonging to the sender. The information therein 
  is solely for the use of the addressee.  If your receipt of 
  this transmission has occurred as the result of an error, 
  please immediately notify us so we can arrange for the return 
  of the documents. In such circumstances, you are advised that 
  you may not disclose, copy, distribute or take any other 
  action in reliance on the information transmitted.
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
 
 
 This message and any files transmitted with it are 
 confidential and are intended solely for the use of the 
 individual or entity to whom they are addressed.  If you have 
 received this email in error, please delete the email and any 
 files transmitted with it entirely from your computer. 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: Jstl i18n not working

2003-11-10 Thread Morrow, Steve D.
Try the full classpath for the ApplicationResources.properties file at the
top of your JSP...

fmt:bundle basename=org.j2e_translate.ApplicationResources /

Then, you can use fmt:message key=j2emain.title /...

Good luck! :o)

 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 11:35 AM
 To: 'Tag Libraries Users List'
 Subject: RE: Jstl i18n not working
 
 
 Oh, I see.  I can find the resource bundle now for my other 
 fmt:message.  But it still doesn't solve my first problem.  
 That's why I got so confused. I guess it has something to do 
 with putting the fmt:message tag in the head.  Wonder if 
 someone can provide a good point for a JSTL beginner like me.
 
 Thanks a lot!
 
 -
 HEAD
   title
 fmt:bundle basename=ApplicationResources
   fmt:message key=j2emain.title /
 /fmt:bundle
   /title
   META NAME=Author CONTENT=Yansheng
   META NAME=Keywords CONTENT=translator
   META NAME=Description CONTENT=
   style type=css/text src=./styles/global_style.css 
   style type=css/text src=./styles/elements.css 
   style type=css/text src=./styles/navigation.css 
 /HEAD
 --
 
 And I am getting: 
 
   title
 
   ???j2emain.title???
 
   /title
 --
 Oh, wait, why do I need basename?  Ah, I don't understand 
 this very well
 
 
 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Sent: November 10, 2003 10:28 AM
 To: Tag Libraries Users List
 Subject: Re: Jstl i18n not working
 
 
 So, based on your updated info, this should be:
 
 context-param
   
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
 ram-name
   param-valueorg.j2e_translate.ApplicationResources/param-value
 /context-param
 
 And you should have your property file located at:
 
 WEB-INF/classes/org/j2e_translate/ApplicationResources.properties
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
  Nothing to do with Struts. From the JSTL spec for fmt:message:
  
  If the i18n localization context that this action 
 determines does not 
  have any resource bundle, an error message of the form 
 ???key??? 
  is produced.
  
  Try this:
  
  context-param

 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
 ram-name
param-valueApplicationResources/param-value
  /context-param
  
  Quoting [EMAIL PROTECTED]:
  
   
   
   
   
   
   I've only seen that when struts can't find the resource 
 file or the
  key...
   
   Savan Thongvanh
   Berkley Technology Services
   515.278.7725
   
   
 
  
   
  
 Yansheng Lin  
  
   
  
 [EMAIL PROTECTED]To:   
 'Tag Libraries
   Users List' [EMAIL PROTECTED]
   
 gis.com cc:
  
   
  
  Subject:  
 Jstl i18n not
   working   
 
 11/10/2003 11:00
  
   
  
 AM  
  
   
  
 Please respond to   
  
   
  
 Tag Libraries  
  
   
  
 Users List 
  
   
  
 
  
   
  
 
  
   
  
   
   
   
   
   
   Hi, in my web.xml:
   
 !--  JSTL i18n support 
   ===
   --
 context-param
   
 param-namejavax.servlet.jsp.jstl.fmt.fall-backLocale/param-name
   param-valueen/param-value
 /context-param
 context-param
  
  
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
  
param-valueApplicationResources.properties/param-value
 /context-param
   
   Then in my jsp:
   
   fmt:bundle basename=ApplicationResources
 

RE: Jstl i18n not working

2003-11-10 Thread Morrow, Steve D.
Quite different - in a test environment with integrated TC (IDEA, for
example), it's often quicker *and* easier just to restart. At least, that's
been my experience... :o)


 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 11:56 AM
 To: Tag Libraries Users List
 Subject: RE: Jstl i18n not working
 
 
 You shouldn't have to restart TC just because you've made a 
 Struts config change. You may have to *redeploy* the app, but 
 that's different from restarting TC.
 
 Quoting Yansheng Lin [EMAIL PROTECTED]:
 
  Ok, got it working.  I simply got rid of the fmt:bundle 
  basename=ApplicationResources declaration.
  
  But I tried with fmt:bundle 
  basename=org.j2e_translate.ApplicationResources
  too, and it worked as well.
  
  And one cool feature I found through this is I don't have 
 to restart 
  Tomcat if I changed anything in web.xml.  Way better than changing 
  anything in struts.xml.
  Stupid ActionMapping:).
  
  Thanks for your help!
  
  -Original Message-
  From: Kris Schneider [mailto:[EMAIL PROTECTED]
  Sent: November 10, 2003 10:41 AM
  To: Tag Libraries Users List
  Subject: RE: Jstl i18n not working
  
  
  Okay, you've got a file called ApplicationResources.properties, 
  right? If it's in WEB-INF/classes, you can just use 
  ApplicationResources as a basename. If
  it's in WEB-INF/classes/org/j2e_translate, you have to use
  org.j2e_translate.ApplicationResources as a basename. So 
 where is the
  property
  file *really* located?
  
  Quoting Yansheng Lin [EMAIL PROTECTED]:
  
   Oh, I see.  I can find the resource bundle now for my other 
   fmt:message.
  
   But
   it still doesn't solve my first problem.  That's why I got so 
   confused. I guess it has something to do with putting the 
   fmt:message tag in the head. Wonder
   if someone can provide a good point for a JSTL beginner like me.
   
   Thanks a lot!
   
   -
   HEAD
 title
   fmt:bundle basename=ApplicationResources
 fmt:message key=j2emain.title /
   /fmt:bundle
 /title
 META NAME=Author CONTENT=Yansheng
 META NAME=Keywords CONTENT=translator
 META NAME=Description CONTENT=
 style type=css/text src=./styles/global_style.css 
 style type=css/text src=./styles/elements.css 
 style type=css/text src=./styles/navigation.css
   /HEAD
   --
   
   And I am getting:
   
 title
   
 ???j2emain.title???
   
 /title
   --
   Oh, wait, why do I need basename?  Ah, I don't understand 
 this very 
   well
   
   
   -Original Message-
   From: Kris Schneider [mailto:[EMAIL PROTECTED]
   Sent: November 10, 2003 10:28 AM
   To: Tag Libraries Users List
   Subject: Re: Jstl i18n not working
   
   
   So, based on your updated info, this should be:
   
   context-param
 
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
 ram-name
 
 param-valueorg.j2e_translate.ApplicationResources/param-value
   /context-param
   
   And you should have your property file located at:
   
   WEB-INF/classes/org/j2e_translate/ApplicationResources.properties
   
   Quoting Kris Schneider [EMAIL PROTECTED]:
   
Nothing to do with Struts. From the JSTL spec for fmt:message:

If the i18n localization context that this action 
 determines does 
not
   have
any
resource bundle, an error message of the form ???key??? is
  produced.

Try this:

context-param
 
  
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
  
  param-valueApplicationResources/param-value
/context-param

Quoting [EMAIL PROTECTED]:

 
 
 
 
 
 I've only seen that when struts can't find the 
 resource file or 
 the
key...
 
 Savan Thongvanh
 Berkley Technology Services
 515.278.7725
 
 
   
  
   

 
   
  
   Yansheng Lin  
  
   

 
   
  
   [EMAIL PROTECTED]To:   'Tag
   Libraries
 Users List' [EMAIL PROTECTED]
   
   gis.com cc:
  
   

 
   
  
Subject:  Jstl 
 i18n
  not
 working   

  
   11/10/2003 11:00
  
   

 
   
  
   AM  

RE: c:out unable to find value

2003-11-04 Thread Morrow, Steve D.
Yeah, I'm familiar with the map notation. Unfortunately, this is a List. All
the other values for this object are printing fine, just not the 'id'. I've
chalked this one up as a loss and am simply using another method (getID(),
as opposed to getId())to get the value.

The sunspots must still be in full effect. LOL.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 04, 2003 11:37 AM
 To: Tag Libraries Users List
 Cc: 'Tag Libraries Users List'
 Subject: RE: c:out unable to find value
 
 
 
 
 
 
 
 Hey Steve-
 If you didn't figure it out here's another suggestion.  If 
 you are using a Map you might need to use the 
 name=myBean.value notation.  It's a little different than 
 using List in iteration.
 
 
 Savan Thongvanh
 Berkley Technology Services
 515.278.7725
 
 
   
   
  
   Morrow, Steve  
   
  
   D.  To:   'Tag 
 Libraries Users List' [EMAIL PROTECTED]   
  
   [EMAIL PROTECTED]cc:
   
  
   om  Subject:  RE: 
 c:out unable to find value  
   
   
   
  
   11/03/2003 04:43
   
  
   PM  
   
  
   Please respond to   
   
  
   Tag Libraries  
   
  
   Users List 
   
  
   
   
  
   
   
  
 
 
 
 
 Yep - I know it works - I've done it before in other apps. 
 Just not here. :o(
 
 Hopefully the sunspots will be gone by tomorrow...
 
  -Original Message-
  From: Kris Schneider [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 03, 2003 4:31 PM
  To: Tag Libraries Users List
  Subject: Re: c:out unable to find value
 
 
  I just hacked up a small example with JDK 1.4.2, Tomcat 4.1.24, and 
  Standard 1.0.4 that works fine...
 
  Customer.java:
  --
 
  package com.dotech;
 
  public class Customer {
 
   private Integer id;
   private String name;
 
   public Customer(Integer id, String name) {
   super();
   this.id = id;
   this.name = name;
   }
 
   public Integer getId() {
   return this.id;
   }
 
   public String getName() {
   return this.name;
   }
  }
 
  customer.jsp:
  -
 
  %@ page contentType=text/plain %
  %@ page import=com.dotech.Customer %
  %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 
  %
  pageContext.setAttribute(customer,
new Customer(new Integer(42), 
 Foo Bar)); 
  %
 
  Id:   c:out value=${customer.id}/
  Name: c:out value=${customer.name}/
 
  Id: jsp:getProperty name=customer property=id/
 
  Gives:
 
  Id:   42
  Name: Foo Bar
 
  Id: 42
 
  Morrow, Steve D. wrote:
 
   jsp:getProperty name=customer property=id/
  
   ...gives me...
  
   Cannot find a method to read property 'id' in a bean of type 
   'ebus.common.Customer'
  
   ...mind you, customer.getId() works just fine. I think solar 
   flares/sunspots is as good an explanation as any
  
   I've already cleaned house three times today. Gack.
  
  
  -Original Message-
  From: Kris Schneider [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 03, 2003 3:14 PM
  To: Tag Libraries Users List
  Subject: RE: c:out unable to find value
  
  
  Okay, so you've heard about all the solar flare activity, 
 right? I'm 
  sure once that clears up it'll work just fine... Uh huh. What 
  happens with:
  
  jsp:getProperty name=customer property=id/
  
  You might have to do this before using it:
  
  jsp:useBean id=customer type=pkg.name.Customer/
  
  I dunno, it's kooky. Make sure you've got JSTL

c:out unable to find value

2003-11-03 Thread Morrow, Steve D.
I have a session-scoped bean structured (in part) as follows:

public class Customer {
 
public Integer id;
public String name;
 
public Integer getId() {
return id;
}
 
public String getName() {
return name;
}
}

In the JSP, c:out value=${customer.name} / works as expected. However,
c:out value=${customer.id} / does not - it throws an error that the JSP
is unable to find a value for id in object... I added the following
method, which works fine with a value of ${customer.ID}:

public String getID() {
return id.toString();
}

I googled, but was unable to find an answer, or anyone experiencing the same
sort of problem. I'm sure I'm missing something pretty simple, but I could
use some more eyes on the problem. Why is the tag unable to find
${customer.id} (i.e. use the getId() method)?

I am using Jakarta's 1.0.4 taglibs...


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: c:out unable to find value

2003-11-03 Thread Morrow, Steve D.
No love. I double- (triple-) checked that the jars and tlds were from the
same family and got the same results. This isn't a Struts app - I'm only
using the taglibs. The environment is WSDC, with a WASE5 test server
(Servlet 2.3, JSP 1.2). I'm open to other suggestions... :o)

 I actually ran into a similar problem not too long ago.  the 
 problem that I had was that the version of the tld i was 
 using was older than struts jar.
 
 Sounds weird i know.  It happened because of the stupid WSAD 
 wizard i used. didn't make it a servlet 2.2 web app.  it put 
 the newer but still old version of the jar in there which 
 requires servlet2.3 and jsp1.2.
 
 Particularly a problem on WAS4.  if you are using WAS and are 
 deploying from it you might just make sure the curtains match 
 the carpet if ya know what i mean...
 
 Savan Thongvanh
 Berkley Technology Services
 515.278.7725
 
 

 I have a session-scoped bean structured (in part) as follows:
 
 public class Customer {
 
 public Integer id;
 public String name;
 
 public Integer getId() {
 return id;
 }
 
 public String getName() {
 return name;
 }
 }
 
 In the JSP, c:out value=${customer.name} / works as 
 expected. However, c:out value=${customer.id} / does not 
 - it throws an error that the JSP is unable to find a value 
 for id in object... I added the following method, which 
 works fine with a value of ${customer.ID}:
 
 public String getID() {
 return id.toString();
 }
 
 I googled, but was unable to find an answer, or anyone 
 experiencing the same sort of problem. I'm sure I'm missing 
 something pretty simple, but I could use some more eyes on 
 the problem. Why is the tag unable to find ${customer.id} 
 (i.e. use the getId() method)?
 
 I am using Jakarta's 1.0.4 taglibs...


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: c:out unable to find value

2003-11-03 Thread Morrow, Steve D.
Thanks for the code snippet. :o)

I'm positive that it actually references a Customer object, as I'm
successfully displaying other fields from that object (e.g., name, city,
state). I ran the introspector and received the following:

state 
name 
id 
class 
marketSegment 
acquiredCustomers 
city 
ID 
mergedDate 

The following value doesn't work (throws error): ${customer.id}
The following values work: ${customer.name}, ${customer.city},
${customer.state}, ${customer.ID}

The other fields are blank strings for this particular object.

I'm at a complete loss, here. :o)

 You can use java.beans.Introspector.decapitalize to tell you 
 what the property name should look like. In this case, 
 Introspector.decapitalize(Id) results in id, so you 
 should be fine. I'm sure that's helpful ;-). Are you positive 
 that your scoped attribute customer actually references an 
 instance of your Customer class? Here's another helpful 
 snippet to see all the properties exposed by your class:
 
 import java.beans.*;
 ...
 BeanInfo info = Instrospector.getBeanInfo(Customer.class);
 PropertyDescriptor[] props = info.getPropertyDescriptors();
 for (int i = 0; i  props.length; i++) {
   System.out.println(props[i].getName());
 }
 
 Quoting Morrow, Steve D. [EMAIL PROTECTED]:
 
  I have a session-scoped bean structured (in part) as follows:
  
  public class Customer {
   
  public Integer id;
  public String name;
   
  public Integer getId() {
  return id;
  }
   
  public String getName() {
  return name;
  }
  }
  
  In the JSP, c:out value=${customer.name} / works as expected. 
  However, c:out value=${customer.id} / does not - it throws an 
  error that the JSP is unable to find a value for id in 
 object... I 
  added the following method, which works fine with a value of 
  ${customer.ID}:
  
  public String getID() {
  return id.toString();
  }
  
  I googled, but was unable to find an answer, or anyone experiencing 
  the same sort of problem. I'm sure I'm missing something pretty 
  simple, but I could use some more eyes on the problem. Why 
 is the tag 
  unable to find ${customer.id} (i.e. use the getId() method)?
  
  I am using Jakarta's 1.0.4 taglibs...
 
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: c:out unable to find value

2003-11-03 Thread Morrow, Steve D.
Oh yeah... %= customer.getId() % works, of course.

 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 03, 2003 2:42 PM
 To: Tag Libraries Users List
 Subject: Re: c:out unable to find value 
 
 
 You can use java.beans.Introspector.decapitalize to tell you 
 what the property name should look like. In this case, 
 Introspector.decapitalize(Id) results in id, so you 
 should be fine. I'm sure that's helpful ;-). Are you positive 
 that your scoped attribute customer actually references an 
 instance of your Customer class? Here's another helpful 
 snippet to see all the properties exposed by your class:
 
 import java.beans.*;
 ...
 BeanInfo info = Instrospector.getBeanInfo(Customer.class);
 PropertyDescriptor[] props = info.getPropertyDescriptors();
 for (int i = 0; i  props.length; i++) {
   System.out.println(props[i].getName());
 }
 
 Quoting Morrow, Steve D. [EMAIL PROTECTED]:
 
  I have a session-scoped bean structured (in part) as follows:
  
  public class Customer {
   
  public Integer id;
  public String name;
   
  public Integer getId() {
  return id;
  }
   
  public String getName() {
  return name;
  }
  }
  
  In the JSP, c:out value=${customer.name} / works as expected. 
  However, c:out value=${customer.id} / does not - it throws an 
  error that the JSP is unable to find a value for id in 
 object... I 
  added the following method, which works fine with a value of 
  ${customer.ID}:
  
  public String getID() {
  return id.toString();
  }
  
  I googled, but was unable to find an answer, or anyone experiencing 
  the same sort of problem. I'm sure I'm missing something pretty 
  simple, but I could use some more eyes on the problem. Why 
 is the tag 
  unable to find ${customer.id} (i.e. use the getId() method)?
  
  I am using Jakarta's 1.0.4 taglibs...
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: c:out unable to find value

2003-11-03 Thread Morrow, Steve D.
jsp:getProperty name=customer property=id/

...gives me...

Cannot find a method to read property 'id' in a bean of type
'ebus.common.Customer'

...mind you, customer.getId() works just fine. I think solar flares/sunspots
is as good an explanation as any

I've already cleaned house three times today. Gack.

 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 03, 2003 3:14 PM
 To: Tag Libraries Users List
 Subject: RE: c:out unable to find value 
 
 
 Okay, so you've heard about all the solar flare activity, 
 right? I'm sure once that clears up it'll work just fine... 
 Uh huh. What happens with:
 
 jsp:getProperty name=customer property=id/
 
 You might have to do this before using it:
 
 jsp:useBean id=customer type=pkg.name.Customer/
 
 I dunno, it's kooky. Make sure you've got JSTL installed 
 correcty, stop your app server and blow away the app's work 
 area (complied JSP files, etc), then restart. Yup, 
 shotgunning at this point...
 
 Quoting Morrow, Steve D. [EMAIL PROTECTED]:
 
  Oh yeah... %= customer.getId() % works, of course.
  
   -Original Message-
   From: Kris Schneider [mailto:[EMAIL PROTECTED]
   Sent: Monday, November 03, 2003 2:42 PM
   To: Tag Libraries Users List
   Subject: Re: c:out unable to find value 
   
   
   You can use java.beans.Introspector.decapitalize to tell you
   what the property name should look like. In this case, 
   Introspector.decapitalize(Id) results in id, so you 
   should be fine. I'm sure that's helpful ;-). Are you positive 
   that your scoped attribute customer actually references an 
   instance of your Customer class? Here's another helpful 
   snippet to see all the properties exposed by your class:
   
   import java.beans.*;
   ...
   BeanInfo info = Instrospector.getBeanInfo(Customer.class);
   PropertyDescriptor[] props = 
 info.getPropertyDescriptors(); for (int 
   i = 0; i  props.length; i++) {
 System.out.println(props[i].getName());
   }
   
   Quoting Morrow, Steve D. [EMAIL PROTECTED]:
   
I have a session-scoped bean structured (in part) as follows:

public class Customer {
 
public Integer id;
public String name;
 
public Integer getId() {
return id;
}
 
public String getName() {
return name;
}
}

In the JSP, c:out value=${customer.name} / works as 
 expected.
However, c:out value=${customer.id} / does not - it 
 throws an 
error that the JSP is unable to find a value for id in 
   object... I
added the following method, which works fine with a value of
${customer.ID}:

public String getID() {
return id.toString();
}

I googled, but was unable to find an answer, or anyone 
experiencing
the same sort of problem. I'm sure I'm missing something pretty 
simple, but I could use some more eyes on the problem. Why 
   is the tag
unable to find ${customer.id} (i.e. use the getId() method)?

I am using Jakarta's 1.0.4 taglibs...
   


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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



RE: c:out unable to find value

2003-11-03 Thread Morrow, Steve D.
Yep - I know it works - I've done it before in other apps. Just not here.
:o( 

Hopefully the sunspots will be gone by tomorrow...

 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 03, 2003 4:31 PM
 To: Tag Libraries Users List
 Subject: Re: c:out unable to find value
 
 
 I just hacked up a small example with JDK 1.4.2, Tomcat 4.1.24, and 
 Standard 1.0.4 that works fine...
 
 Customer.java:
 --
 
 package com.dotech;
 
 public class Customer {
 
  private Integer id;
  private String name;
 
  public Customer(Integer id, String name) {
  super();
  this.id = id;
  this.name = name;
  }
 
  public Integer getId() {
  return this.id;
  }
 
  public String getName() {
  return this.name;
  }
 }
 
 customer.jsp:
 -
 
 %@ page contentType=text/plain %
 %@ page import=com.dotech.Customer %
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 
 %
 pageContext.setAttribute(customer,
   new Customer(new Integer(42), Foo 
 Bar)); %
 
 Id:   c:out value=${customer.id}/
 Name: c:out value=${customer.name}/
 
 Id: jsp:getProperty name=customer property=id/
 
 Gives:
 
 Id:   42
 Name: Foo Bar
 
 Id: 42
 
 Morrow, Steve D. wrote:
 
  jsp:getProperty name=customer property=id/
  
  ...gives me...
  
  Cannot find a method to read property 'id' in a bean of type 
  'ebus.common.Customer'
  
  ...mind you, customer.getId() works just fine. I think solar 
  flares/sunspots is as good an explanation as any
  
  I've already cleaned house three times today. Gack.
  
  
 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 03, 2003 3:14 PM
 To: Tag Libraries Users List
 Subject: RE: c:out unable to find value 
 
 
 Okay, so you've heard about all the solar flare activity,
 right? I'm sure once that clears up it'll work just fine... 
 Uh huh. What happens with:
 
 jsp:getProperty name=customer property=id/
 
 You might have to do this before using it:
 
 jsp:useBean id=customer type=pkg.name.Customer/
 
 I dunno, it's kooky. Make sure you've got JSTL installed
 correcty, stop your app server and blow away the app's work 
 area (complied JSP files, etc), then restart. Yup, 
 shotgunning at this point...
 
 Quoting Morrow, Steve D. [EMAIL PROTECTED]:
 
 
 Oh yeah... %= customer.getId() % works, of course.
 
 
 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 03, 2003 2:42 PM
 To: Tag Libraries Users List
 Subject: Re: c:out unable to find value
 
 
 You can use java.beans.Introspector.decapitalize to tell you what 
 the property name should look like. In this case,
 Introspector.decapitalize(Id) results in id, so you
 should be fine. I'm sure that's helpful ;-). Are you positive 
 that your scoped attribute customer actually references an 
 instance of your Customer class? Here's another helpful 
 snippet to see all the properties exposed by your class:
 
 import java.beans.*;
 ...
 BeanInfo info = Instrospector.getBeanInfo(Customer.class);
 PropertyDescriptor[] props =
 
 info.getPropertyDescriptors(); for (int
 
 i = 0; i  props.length; i++) {
   System.out.println(props[i].getName());
 }
 
 Quoting Morrow, Steve D. [EMAIL PROTECTED]:
 
 
 I have a session-scoped bean structured (in part) as follows:
 
 public class Customer {
  
 public Integer id;
 public String name;
  
 public Integer getId() {
 return id;
 }
  
 public String getName() {
 return name;
 }
 }
 
 In the JSP, c:out value=${customer.name} / works as
 
 expected.
 
 However, c:out value=${customer.id} / does not - it
 
 throws an
 
 error that the JSP is unable to find a value for id in
 
 object... I
 
 added the following method, which works fine with a value of
 ${customer.ID}:
 
 public String getID() {
 return id.toString();
 }
 
 I googled, but was unable to find an answer, or anyone
 experiencing
 the same sort of problem. I'm sure I'm missing something pretty 
 simple, but I could use some more eyes on the problem. Why 
 
 is the tag
 
 unable to find ${customer.id} (i.e. use the getId() method)?
 
 I am using Jakarta's 1.0.4 taglibs...
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



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