Looping a tree-structure of objects of unknown depth

2003-02-14 Thread Sakke Wiik
I have a tree-structure of objects similar to a filesystem,
where directories has subdirectories to an unknown depth.
How can i loop and display all these in jsp without knowing the 
depth of the tree? it's easy to do in pure java with a method
calling itself, but I can't use methods inside a jsp, or can I?

cheers,
Sakke Wiik

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




RE: Looping a tree-structure of objects of unknown depth

2003-02-14 Thread Heinonen Jani
You can define methods inside a JSP, when you use the declaration block. 

The regular JSP code goes to the service method of the servlet, whereas
things in the declaration block are object/class wide.
Of course, this is something that we are trying to avoid by using tag
libraries. At worst, we end up with applications where all of the logic is
in JSP's.

%!
  public void myMethod(Object someParameter) {
 ...
  }
%

-Original Message-
From: Sakke Wiik [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 12:41 PM
To: [EMAIL PROTECTED]
Subject: Looping a tree-structure of objects of unknown depth


I have a tree-structure of objects similar to a filesystem, where
directories has subdirectories to an unknown depth. How can i loop and
display all these in jsp without knowing the 
depth of the tree? it's easy to do in pure java with a method calling
itself, but I can't use methods inside a jsp, or can I?

cheers,
Sakke Wiik

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




Re: Problem with empty key word on a collection.

2003-02-14 Thread James Cook

On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:


The change that Jeff is proposing, although of interest, would
unfortunately break compatibility with the spec.
(sorry guys, but the Expert Group ain't perfect)



Why would extending the empty keyword to support Collections break 
compatibility with the spec?


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



RE: Problems with Tomcat 4.1.18 and xtags

2003-02-14 Thread Eduardo Suastegui
Thank you very much for your response. I have browsed through web.xml and
the config documentation, and it isn't terribly obvious how I should disable
tag pooling. Could you point me in the right direction here? Thanks again.

-Original Message-
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 5:55 PM
To: Tag Libraries Users List
Subject: Re: Problems with Tomcat 4.1.18 and xtags


The difference is that Tomcat 4.1 comes with Jasper 2.  Jasper 2 implements
JSP custom tag pooling.  The XTags taglib most likely has some sort
lifecycle
related bug that gets trigger when its tag handlers are pooled.  You can
disable tag pooling in the JspServlet config in your tomcat/conf/web.xml
config file.

Regards,

Glenn

Eduardo Suastegui wrote:
 I am running Tomcat 4.1.18 with JDK 1.4.1.01, and use the xtags directory
 for server-side XSL transformation (XSLT). The first time I access the
page
 that includes XML to be displayed through xtags' XSLT, it works. The 2nd
 time, it fails (see exception stack trace below), the 3rd time it works,
the
 4th time it fails, and so on--odds are okay; evens fail. I do not have
this
 problem with either Tomcat 4.0.3 or 4.0.6; when I switch to these
versions,
 all works as expected. Can anyone throw some help my way? Thanks.



RE: Problems with Tomcat 4.1.18 and xtags

2003-02-14 Thread Eduardo Suastegui
UPDATE: I have disabled pooling, as shown below, and the problem persists:

servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueWARNING/param-value
/init-param
!-- Disable pooling to prevent problems with xtags/XSLT processing
--
init-param
param-nameenablePooling/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet

Any other ideas?

-Original Message-
From: Eduardo Suastegui [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 7:14 AM
To: 'Tag Libraries Users List'
Subject: RE: Problems with Tomcat 4.1.18 and xtags


Thank you very much for your response. I have browsed through web.xml and
the config documentation, and it isn't terribly obvious how I should disable
tag pooling. Could you point me in the right direction here? Thanks again.

-Original Message-
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 5:55 PM
To: Tag Libraries Users List
Subject: Re: Problems with Tomcat 4.1.18 and xtags


The difference is that Tomcat 4.1 comes with Jasper 2.  Jasper 2 implements
JSP custom tag pooling.  The XTags taglib most likely has some sort
lifecycle
related bug that gets trigger when its tag handlers are pooled.  You can
disable tag pooling in the JspServlet config in your tomcat/conf/web.xml
config file.

Regards,

Glenn

Eduardo Suastegui wrote:
 I am running Tomcat 4.1.18 with JDK 1.4.1.01, and use the xtags directory
 for server-side XSL transformation (XSLT). The first time I access the
page
 that includes XML to be displayed through xtags' XSLT, it works. The 2nd
 time, it fails (see exception stack trace below), the 3rd time it works,
the
 4th time it fails, and so on--odds are okay; evens fail. I do not have
this
 problem with either Tomcat 4.0.3 or 4.0.6; when I switch to these
versions,
 all works as expected. Can anyone throw some help my way? Thanks.



RE: Problem with empty key word on a collection.

2003-02-14 Thread O'brien, Tim
 -Original Message-
 From: James Cook [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, February 14, 2003 8:17 AM
 To: Tag Libraries Users List
 Subject: Re: Problem with empty key word on a collection.
 
 
 
 On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
 
  The change that Jeff is proposing, although of interest, would 
  unfortunately break compatibility with the spec. (sorry 
 guys, but the 
  Expert Group ain't perfect)
 
 
 Why would extending the empty keyword to support Collections break 
 compatibility with the spec?
 

Modifying the empty keyword to support Collections doesn't break anything
per se, but it does exceed the definition of empty in Section A.3.8 in the
JSTL 1.0 specification.  I believe that the JSPA talks about adhering to the
spec in independent implementations of a JSR.  

I'm very uninterested in starting a flamewar about JCP, but it is important
to note that adhering to the spec allows for portability over multiple
implementations of JSTL and EL.

I've already submitted a patch to commons-jexl to make empty work with
Collection, but it won't be of any help to anyone using the current Standard
Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
what meant for, providing functionality for little bits of functionality
that might have been inadvertently overlooked by the first rev of JSTL in a
way that doesn't conflict with existing JCP specs.  


Tim O'Brien 


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




howto internationalize btton's labels?

2003-02-14 Thread Philippe Petit
Hi
I'm newbe with JSTL and trying to internationalize the labels of my buttons
by nesting tags like this :
input type=submit name=ListOrg Value=fmt:message
key=\org.menu.btn.list\ bundle=\${nav}\/ 
and it's not working.
I saw in the archives that it was forbidden
So do I have to keep using JSP expression for this kind of need, or is there
a tip to achieve it with JSTL ?

Regards
Cordialement

Philippe


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




RE: Problem with empty key word on a collection.

2003-02-14 Thread Jerome Jacobsen
I'll bite.  What's the Unstandard Taglib?  Is there a website for this?

 -Original Message-
 From: O'brien, Tim [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 14, 2003 11:45 AM
 To: 'Tag Libraries Users List'
 Subject: RE: Problem with empty key word on a collection.
 
 
  -Original Message-
  From: James Cook [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, February 14, 2003 8:17 AM
  To: Tag Libraries Users List
  Subject: Re: Problem with empty key word on a collection.
  
  
  
  On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
  
   The change that Jeff is proposing, although of interest, would 
   unfortunately break compatibility with the spec. (sorry 
  guys, but the 
   Expert Group ain't perfect)
  
  
  Why would extending the empty keyword to support Collections break 
  compatibility with the spec?
  
 
 Modifying the empty keyword to support Collections doesn't 
 break anything
 per se, but it does exceed the definition of empty in Section 
 A.3.8 in the
 JSTL 1.0 specification.  I believe that the JSPA talks about 
 adhering to the
 spec in independent implementations of a JSR.  
 
 I'm very uninterested in starting a flamewar about JCP, but it is 
 important
 to note that adhering to the spec allows for portability over multiple
 implementations of JSTL and EL.
 
 I've already submitted a patch to commons-jexl to make empty work with
 Collection, but it won't be of any help to anyone using the 
 current Standard
 Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
 what meant for, providing functionality for little bits of functionality
 that might have been inadvertently overlooked by the first rev of 
 JSTL in a
 way that doesn't conflict with existing JCP specs.  
 
 
 Tim O'Brien 
 
 
  
  -
  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]
 
 
 

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




RE: Problem with empty key word on a collection.

2003-02-14 Thread Henri Yandell

It's mainly a set of ideas at the moment. People come to this list a lot
asking for features in JSTL. Rather than send them away unsatisified, the
idea is to implement them in the Unstandard taglib and have happy users.

Additionally, it would provide an interesting research ground for the JSTL
people and provide some way in which Users can really force home the fact
that the c:systemExit/ tag is essential.

We set things up for it last week, the developer list has a chunk about it
in the mail archives. Tim's put a bit of code in there and Glenn and I
have setup the infrastructure for it, but I'm focusing on String 1.0.1
first at the moment.

Website to come.

Hen

On Fri, 14 Feb 2003, Jerome Jacobsen wrote:

 I'll bite.  What's the Unstandard Taglib?  Is there a website for this?

  -Original Message-
  From: O'brien, Tim [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 14, 2003 11:45 AM
  To: 'Tag Libraries Users List'
  Subject: RE: Problem with empty key word on a collection.
 
 
   -Original Message-
   From: James Cook [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 14, 2003 8:17 AM
   To: Tag Libraries Users List
   Subject: Re: Problem with empty key word on a collection.
  
  
  
   On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
  
The change that Jeff is proposing, although of interest, would
unfortunately break compatibility with the spec. (sorry
   guys, but the
Expert Group ain't perfect)
   
  
   Why would extending the empty keyword to support Collections break
   compatibility with the spec?
  
 
  Modifying the empty keyword to support Collections doesn't
  break anything
  per se, but it does exceed the definition of empty in Section
  A.3.8 in the
  JSTL 1.0 specification.  I believe that the JSPA talks about
  adhering to the
  spec in independent implementations of a JSR.
 
  I'm very uninterested in starting a flamewar about JCP, but it is
  important
  to note that adhering to the spec allows for portability over multiple
  implementations of JSTL and EL.
 
  I've already submitted a patch to commons-jexl to make empty work with
  Collection, but it won't be of any help to anyone using the
  current Standard
  Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
  what meant for, providing functionality for little bits of functionality
  that might have been inadvertently overlooked by the first rev of
  JSTL in a
  way that doesn't conflict with existing JCP specs.
 
  
  Tim O'Brien
 
 
  
   -
   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]
 
 
 

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




Tag List

2003-02-14 Thread Scott Taylor
I am trying to find a list of tags to help me modify the CD Shop Cart web
application from Sun One.

For example, how do I insert tags that provide a search form (and entry
form) rather than simply list everything.

Here is what the code looks like so far:

%@page contentType=text/html%
html
headtitleCD Catalog List/title/head
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
body
h1 CD Catalog List /h1
sql:setDataSource var=productDS
   url=jdbc:postgresql://localhost:5432/recruitment
   driver=org.postgresql.Driver
   user=scott password= /

sql:query var=productQuery  dataSource=${productDS}  
SELECT * FROM CD
/sql:query

TABLE border=1
  TR
THID/TH
THCD Title/TH
THArtist/TH
THCountry/TH
THPrice/TH
  /TR

c:forEach var=row items=${productQuery.rows}
  TR
TDc:out value=${row.ID}//TD
TDc:out value=${row.CDTITLE}//TD
TDc:out value=${row.ARTIST}//TD
TDc:out value=${row.COUNTRY}//TD
TDc:out value=${row.PRICE}//TD
TD
form method=get action=ShopCart.jsp
  input type=hidden name=cdId value=c:out value=${row.ID}/
  input type=hidden name=cdTitle value=c:out
value=${row.CDTITLE}/
  input type=hidden name=cdPrice value=c:out value=${row.PRICE}/
  input type=submit name=operation value=Add
/form
/TD
  /TR
/c:forEach
/TABLE
/body
/html

Regards

Scott


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




Re: Tag List

2003-02-14 Thread Eddie Barna
You can pass the value from your search form to the page which you have
listed in your email.  For example:  You have a search form with a text box
titled search

Here's what the page that queries the db would look like now

 sql:query var=productQuery  dataSource=${productDS}  
 SELECT * FROM CD WHERE CDTITLE = ?
sql:param value=${param.search}/
 /sql:query
You can also expand on this by using the OR statement in your query.  For
example:

 sql:query var=productQuery  dataSource=${productDS}  
 SELECT * FROM CD WHERE CDTITLE = ? OR ARTIST = ?
sql:param value=${param.search}/
sql:param value=${param.search}/
 /sql:query

For every condition in your query you must add a sql;param/ tag.

Hope this helps.  I really do recomend that you get Shawn Bayern's book
titled JSTL in Action.  It explains all this in great detail, plus
everything else.


- Original Message -
From: Scott Taylor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 14, 2003 9:31 AM
Subject: Tag List


 I am trying to find a list of tags to help me modify the CD Shop Cart web
 application from Sun One.

 For example, how do I insert tags that provide a search form (and entry
 form) rather than simply list everything.

 Here is what the code looks like so far:

 %@page contentType=text/html%
 html
 headtitleCD Catalog List/title/head
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
 body
 h1 CD Catalog List /h1
 sql:setDataSource var=productDS
url=jdbc:postgresql://localhost:5432/recruitment
driver=org.postgresql.Driver
user=scott password= /

 sql:query var=productQuery  dataSource=${productDS}  
 SELECT * FROM CD
 /sql:query

 TABLE border=1
   TR
 THID/TH
 THCD Title/TH
 THArtist/TH
 THCountry/TH
 THPrice/TH
   /TR

 c:forEach var=row items=${productQuery.rows}
   TR
 TDc:out value=${row.ID}//TD
 TDc:out value=${row.CDTITLE}//TD
 TDc:out value=${row.ARTIST}//TD
 TDc:out value=${row.COUNTRY}//TD
 TDc:out value=${row.PRICE}//TD
 TD
 form method=get action=ShopCart.jsp
   input type=hidden name=cdId value=c:out value=${row.ID}/
   input type=hidden name=cdTitle value=c:out
 value=${row.CDTITLE}/
   input type=hidden name=cdPrice value=c:out
value=${row.PRICE}/
   input type=submit name=operation value=Add
 /form
 /TD
   /TR
 /c:forEach
 /TABLE
 /body
 /html

 Regards

 Scott


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




Re: Tag List

2003-02-14 Thread Scott Taylor
Thanks...how about an entry form?

Also, if I want to do JSP's easier are Struts better?

I will get the book though

Thanks

Scott


- Original Message -
From: Eddie Barna [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Friday, February 14, 2003 6:01 PM
Subject: Re: Tag List


 You can pass the value from your search form to the page which you have
 listed in your email.  For example:  You have a search form with a text
box
 titled search

 Here's what the page that queries the db would look like now

  sql:query var=productQuery  dataSource=${productDS}  
  SELECT * FROM CD WHERE CDTITLE = ?
 sql:param value=${param.search}/
  /sql:query
 You can also expand on this by using the OR statement in your query.  For
 example:

  sql:query var=productQuery  dataSource=${productDS}  
  SELECT * FROM CD WHERE CDTITLE = ? OR ARTIST = ?
 sql:param value=${param.search}/
 sql:param value=${param.search}/
  /sql:query

 For every condition in your query you must add a sql;param/ tag.

 Hope this helps.  I really do recomend that you get Shawn Bayern's book
 titled JSTL in Action.  It explains all this in great detail, plus
 everything else.


 - Original Message -
 From: Scott Taylor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 14, 2003 9:31 AM
 Subject: Tag List


  I am trying to find a list of tags to help me modify the CD Shop Cart
web
  application from Sun One.
 
  For example, how do I insert tags that provide a search form (and entry
  form) rather than simply list everything.
 
  Here is what the code looks like so far:
 
  %@page contentType=text/html%
  html
  headtitleCD Catalog List/title/head
  %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
  %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
  body
  h1 CD Catalog List /h1
  sql:setDataSource var=productDS
 url=jdbc:postgresql://localhost:5432/recruitment
 driver=org.postgresql.Driver
 user=scott password= /
 
  sql:query var=productQuery  dataSource=${productDS}  
  SELECT * FROM CD
  /sql:query
 
  TABLE border=1
TR
  THID/TH
  THCD Title/TH
  THArtist/TH
  THCountry/TH
  THPrice/TH
/TR
 
  c:forEach var=row items=${productQuery.rows}
TR
  TDc:out value=${row.ID}//TD
  TDc:out value=${row.CDTITLE}//TD
  TDc:out value=${row.ARTIST}//TD
  TDc:out value=${row.COUNTRY}//TD
  TDc:out value=${row.PRICE}//TD
  TD
  form method=get action=ShopCart.jsp
input type=hidden name=cdId value=c:out value=${row.ID}/
input type=hidden name=cdTitle value=c:out
  value=${row.CDTITLE}/
input type=hidden name=cdPrice value=c:out
 value=${row.PRICE}/
input type=submit name=operation value=Add
  /form
  /TD
/TR
  /c:forEach
  /TABLE
  /body
  /html
 
  Regards
 
  Scott
 
 
  -
  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]



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




Re: Tag List

2003-02-14 Thread Eddie Barna
Are you trying to do an entry form that stores the data in the db?  Please
clarify.

As for Struts:  I am not familiar with those.  I am actually not that
familiar with JSP itself.  That is why i decided to start with JSTL (it
makes things easier).  Sorry.

Eddie B.

- Original Message -
From: Scott Taylor [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Friday, February 14, 2003 10:23 AM
Subject: Re: Tag List


 Thanks...how about an entry form?

 Also, if I want to do JSP's easier are Struts better?

 I will get the book though

 Thanks

 Scott


 - Original Message -
 From: Eddie Barna [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Friday, February 14, 2003 6:01 PM
 Subject: Re: Tag List


  You can pass the value from your search form to the page which you have
  listed in your email.  For example:  You have a search form with a text
 box
  titled search
 
  Here's what the page that queries the db would look like now
 
   sql:query var=productQuery  dataSource=${productDS}  
   SELECT * FROM CD WHERE CDTITLE = ?
  sql:param value=${param.search}/
   /sql:query
  You can also expand on this by using the OR statement in your query.
For
  example:
 
   sql:query var=productQuery  dataSource=${productDS}  
   SELECT * FROM CD WHERE CDTITLE = ? OR ARTIST = ?
  sql:param value=${param.search}/
  sql:param value=${param.search}/
   /sql:query
 
  For every condition in your query you must add a sql;param/ tag.
 
  Hope this helps.  I really do recomend that you get Shawn Bayern's book
  titled JSTL in Action.  It explains all this in great detail, plus
  everything else.
 
 
  - Original Message -
  From: Scott Taylor [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, February 14, 2003 9:31 AM
  Subject: Tag List
 
 
   I am trying to find a list of tags to help me modify the CD Shop Cart
 web
   application from Sun One.
  
   For example, how do I insert tags that provide a search form (and
entry
   form) rather than simply list everything.
  
   Here is what the code looks like so far:
  
   %@page contentType=text/html%
   html
   headtitleCD Catalog List/title/head
   %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
   %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
   body
   h1 CD Catalog List /h1
   sql:setDataSource var=productDS
  url=jdbc:postgresql://localhost:5432/recruitment
  driver=org.postgresql.Driver
  user=scott password= /
  
   sql:query var=productQuery  dataSource=${productDS}  
   SELECT * FROM CD
   /sql:query
  
   TABLE border=1
 TR
   THID/TH
   THCD Title/TH
   THArtist/TH
   THCountry/TH
   THPrice/TH
 /TR
  
   c:forEach var=row items=${productQuery.rows}
 TR
   TDc:out value=${row.ID}//TD
   TDc:out value=${row.CDTITLE}//TD
   TDc:out value=${row.ARTIST}//TD
   TDc:out value=${row.COUNTRY}//TD
   TDc:out value=${row.PRICE}//TD
   TD
   form method=get action=ShopCart.jsp
 input type=hidden name=cdId value=c:out value=${row.ID}/
 input type=hidden name=cdTitle value=c:out
   value=${row.CDTITLE}/
 input type=hidden name=cdPrice value=c:out
  value=${row.PRICE}/
 input type=submit name=operation value=Add
   /form
   /TD
 /TR
   /c:forEach
   /TABLE
   /body
   /html
  
   Regards
  
   Scott
  
  
   -
   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]
 


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




Re: Problem with empty key word on a collection.

2003-02-14 Thread Timothy Kettering

Not surprised at that - a prior company I worked at, where I first 
learned Java, they had consultants and (i thought..) smart engineers 
working together to develop a quite large web application.  The company 
folded a year later, and I moved on.  It wasn't till after I got into 
jsp/servlets that I realized that they had horribly mangled the MVC.. 
namely they wrote the entire thing in a couple massive behemoth JSP 
page and not a single servlet in sight.  I remember one particular .jsp 
being over 4000 lines.

I've since come to the conclusion that so-called consultants get their 
$150/hr jobs either by being experts, or by sheer incompetence.  Which 
happens more often, I don't know.  :)


On Friday, February 14, 2003, at 01:33 PM, O'brien, Tim wrote:



You might laugh at this, but I've worked with high priced consultants 
from
well respected companies who always managed to do something like
System.exit(0); in a Servlet.  :-)  Or, better yet, the certified web
developer from a 3-letter acronym company (not IBM) who liked to 
write all
content to a temporary file before sending it back to the client.


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




RE: Tag List

2003-02-14 Thread Schnitzer, Jeff
Yes, if you're using JSTL then you will be a whole lot better off with
an MVC framework like Struts or Maverick.  I recommend Maverick - it's
considerably simpler than Struts, yet offers more features.  Also,
unlike most other similar frameworks (Struts, WebWork, etc), Maverick
never started out with a now-crufty set of specialized set of JSP tags -
JSTL works great.

The core distribution includes a sample application that uses JSTL.

http://mav.sourceforge.net

Jeff Schnitzer
[EMAIL PROTECTED]
(yes, I'm the lead developer of Maverick)

 - Original Message -
 From: Scott Taylor [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Friday, February 14, 2003 10:23 AM
 Subject: Re: Tag List
 
 
  Thanks...how about an entry form?
 
  Also, if I want to do JSP's easier are Struts better?
 
  I will get the book though
 
  Thanks
 
  Scott
 
 
  - Original Message -
  From: Eddie Barna [EMAIL PROTECTED]
  To: Tag Libraries Users List [EMAIL PROTECTED]
  Sent: Friday, February 14, 2003 6:01 PM
  Subject: Re: Tag List
 
 
   You can pass the value from your search form to the page which you
 have
   listed in your email.  For example:  You have a search form with a
 text
  box
   titled search
  
   Here's what the page that queries the db would look like now
  
sql:query var=productQuery  dataSource=${productDS}  
SELECT * FROM CD WHERE CDTITLE = ?
   sql:param value=${param.search}/
/sql:query
   You can also expand on this by using the OR statement in your
query.
 For
   example:
  
sql:query var=productQuery  dataSource=${productDS}  
SELECT * FROM CD WHERE CDTITLE = ? OR ARTIST = ?
   sql:param value=${param.search}/
   sql:param value=${param.search}/
/sql:query
  
   For every condition in your query you must add a sql;param/ tag.
  
   Hope this helps.  I really do recomend that you get Shawn Bayern's
 book
   titled JSTL in Action.  It explains all this in great detail, plus
   everything else.
  
  
   - Original Message -
   From: Scott Taylor [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, February 14, 2003 9:31 AM
   Subject: Tag List
  
  
I am trying to find a list of tags to help me modify the CD Shop
 Cart
  web
application from Sun One.
   
For example, how do I insert tags that provide a search form
(and
 entry
form) rather than simply list everything.
   
Here is what the code looks like so far:
   
%@page contentType=text/html%
html
headtitleCD Catalog List/title/head
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
body
h1 CD Catalog List /h1
sql:setDataSource var=productDS
   url=jdbc:postgresql://localhost:5432/recruitment
   driver=org.postgresql.Driver
   user=scott password= /
   
sql:query var=productQuery  dataSource=${productDS}  
SELECT * FROM CD
/sql:query
   
TABLE border=1
  TR
THID/TH
THCD Title/TH
THArtist/TH
THCountry/TH
THPrice/TH
  /TR
   
c:forEach var=row items=${productQuery.rows}
  TR
TDc:out value=${row.ID}//TD
TDc:out value=${row.CDTITLE}//TD
TDc:out value=${row.ARTIST}//TD
TDc:out value=${row.COUNTRY}//TD
TDc:out value=${row.PRICE}//TD
TD
form method=get action=ShopCart.jsp
  input type=hidden name=cdId value=c:out
 value=${row.ID}/
  input type=hidden name=cdTitle value=c:out
value=${row.CDTITLE}/
  input type=hidden name=cdPrice value=c:out
   value=${row.PRICE}/
  input type=submit name=operation value=Add
/form
/TD
  /TR
/c:forEach
/TABLE
/body
/html
   
Regards
   
Scott
   
   
   

 -
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail: taglibs-user-
 [EMAIL PROTECTED]
  
  
  
-
   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]
 
 
 -
 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]




JSTL + Tomcat 5 + XML JSP problem

2003-02-14 Thread Manfred Riem
Hi there,

I've got a problem when I'm trying to use JSTl in XML mode
in Tomcat5. I want to be able to use my own taglibraries as
well as the JSTL supplied ones. But 

I get an error message staying the it is unable to validate
a namespace for some reason. Anyone come across this yet?

Manfred.


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