RE: Dbtags dumps SQL code to output page on empty result

2002-11-26 Thread Xose Ramon Sousa Vazquez
Perhaps this help you
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4877
See the last comment from Matthias Rambold



-Mensaje original-
De: VP Research [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 26 de noviembre de 2002 0:03
Para: [EMAIL PROTECTED]
Asunto: Dbtags dumps SQL code to output page on empty result


We're using the dbtags tag library (v 1.0) to retrieve and format data from
a
back-end database in a Struts web-app. When a query has no results, the SQL
code for the query will appear in the output page. This may be useful for
debugging in some cases, but since empty results are expected in our queries
and are accounted for using the dbtags:wasEmpty tag, we need to be able to
suppress the SQL code dump.

We understand that in some incarnations of the dbtags tag library, there was
an option to dump the SQL code under programmer control. We cannot find this
feature in the current documentation or taglib descriptors, and cannot find
any reference to control of the code-dumping behavior in the on-line docs or
through Google.

Note that even behavior attached to the dbtags:wasEmpty tag cannot provide
proper warnings in all cases. Some database operations within a page (e.g.,
queries resulting in the creation of a temporary table when the back-end
database SQL implementation does not support nested queries) are triggered
by a dbtags:execute tag rather than by the dbtags:resultSet tags. To our
understanding, the dbtags:wasEmpty tag can only be used following the
dbtags:resultSet tags.

It may be worth noting that we use these queries for the original purpose of
tags -- that is, allowing non-programmers to modify and maintain their own
web pages. The in-page queries are read-only for security and we have found
this approach useful in moving small page-maintenance tasks out of the
programming team and back into the domain of the page-designers. More
complex database activities, including any updates, take place through our
business-entity lightweight classes (a lightweight replacement for the EJB
architecture) and are retained within the programming team.

We would like to control the presence or absence of the code-dumping
behavior, or -- at the very least -- be able to suppress it completely. Any
suggestions compatible with continued use of dbtags?


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: xtags question

2002-11-26 Thread Glenn Nielsen
Yes, the XSL taglib is deprecated.  You can use either the XTags taglib or
JSTL.  If you have a servlet container that supports JSP 1.2, use JSTL.
If you have a container which supports JSP 1.1 but not JSP 1.2, use XTags.

Glenn

bryan wrote:


Hi, I'm a newbie in this area so this will no doubt sound sort of
stupid. First I'm somewhat confused as to what is part of what project,
i.e is xtags part of the jstl? I'm confused about this because I
understand the XSL tag library is superceded by the JSTL and I figured
if it was maybe xtags as well.
 I have an application for which xtags seems to be the right solution
but I don't want to use it if it's possible to do the same things with a
library under the JSTL. 
If xtags is not part of the JSTL is there an answering library that has
the same functionality? The functionality I want is specifically to run
an xslt against an xml and pass in parameters, simple enough. I don't
want to use Cocoon in this situation for reasons too convoluted to
enumerate.



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




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




RE: xtags question

2002-11-26 Thread bryan


 Glenn Nielsen wrote:

>Yes, the XSL taglib is deprecated.  You can use either the XTags taglib
or
>JSTL.  If you have a servlet container that supports JSP 1.2, use JSTL.
>If you have a container which supports JSP 1.1 but not JSP 1.2, use
XTags.

Thanks, already figured that out, but I appreciated the response. This
sort of makes me wonder though, I posted that question quite a while ago
did it just come through now or what's going on?



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




setProperty

2002-11-26 Thread Chen, Gin
Hi all,
I was wondering if there was a way using JSTL to set a property on a
bean?
For example:
I have a page that shows the country.
If the country is null then I want to use USA as the default.
My code looks like:


... i want to set it to USA but ...
... i dont know what to use here ...
... c:set only sets a scoped var but cant use the bean (if
i'm reading Shawn's book right)...


is this possible using jstl or struts? i looked at the struts doc
but dont see anything there either.
Thanks.
-Tim




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




Re: setProperty

2002-11-26 Thread Hans Bergsten
Chen, Gin wrote:

Hi all,
	I was wondering if there was a way using JSTL to set a property on a
bean?
For example:
	I have a page that shows the country.
If the country is null then I want to use USA as the default.
My code looks like:

	
		... i want to set it to USA but ...
		... i dont know what to use here ...
		... c:set only sets a scoped var but cant use the bean (if
i'm reading Shawn's book right)...
	

	is this possible using jstl or struts? i looked at the struts doc
but dont see anything there either.


Use :

  

Hans
--
Hans Bergsten<[EMAIL PROTECTED]>
Gefion Software   
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at


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




RE: setProperty

2002-11-26 Thread Chen, Gin
Thanks Hans,
I realized after I set the first post that the c:set section only showed the
basic attributes.
I should have checked the appendix before posting. :-P
Thanks again :)
-Tim

-Original Message-
From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 3:12 PM
To: Tag Libraries Users List
Subject: Re: setProperty


Chen, Gin wrote:
> Hi all,
>   I was wondering if there was a way using JSTL to set a property on a
> bean?
> For example:
>   I have a page that shows the country.
> If the country is null then I want to use USA as the default.
> My code looks like:
> 
>   
>   ... i want to set it to USA but ...
>   ... i dont know what to use here ...
>   ... c:set only sets a scoped var but cant use the bean (if
> i'm reading Shawn's book right)...
>   
> 
>   is this possible using jstl or struts? i looked at the struts doc
> but dont see anything there either.

Use :

   

Hans
-- 
Hans Bergsten<[EMAIL PROTECTED]>
Gefion Software   
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




XML document --> HTML transformation recommendations?

2002-11-26 Thread Mazza, Glen R., ,CPMS
Hello,

For my web app I would like to have two different output formats for certain
requests: PDF and HTML.  I've already done PDF (via FOP) but would like to
know the best way in generating HTML.

For example, given this document:



...
...

...
...


I see two possibilities:

1) Create an XSL stylesheet and run Xalan on the server to generate the
HTML. 

2) Use the JSTL XML tags within a JSP to place the document elements.

I'm guessing (1) is faster, but (2) is more maintainable...I'm wondering
what the experiences of others on this list have been.

Thanks,
Glen

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




Unable to output column data from Query

2002-11-26 Thread Lyndon Durham
Greetings Taglib Users,
   Can someone tell me if this is a bug 
or user error? I am running a simple query that returns a ResultSet that 
has one row.  I am able to get the row count via 
. Susbsequently when I attempt to iterate the 
result set and output the value of a column I get nothing. I am 
iterating via



I am running this using the latest taglib release from jakarta-taglibs. 
My operating system is win2k and my webserver is JRun 4.0. I am using 
Inet Opta 2000 as my database driver.
My next logical option failing to resolve this would be to try and 
access the columns as two dimensional array via rowsByIndex innvoaction.


Re: Unable to output column data from Query

2002-11-26 Thread Dave Newton
Lyndon Durham wrote:


 

Was that just a typo?

Dave



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




Drop down menu

2002-11-26 Thread Lenny Sorey
Does anyone know if there is a tag lib available to create drop down menus 
similar to JavaScript drop down menus.

Thanks

 Lenny Sorey



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




Re: Unable to output column data from Query

2002-11-26 Thread Lyndon Durham
No it was not a typo. Are you referring to the placement of the attributes?

Dave Newton wrote:


Lyndon Durham wrote:


 


Was that just a typo?

Dave



--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






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




Re: Unable to output column data from Query

2002-11-26 Thread Dave Newton
Lyndon Durham wrote:


No it was not a typo. Are you referring to the placement of the 
attributes? 


Lyndon Durham wrote:


 


Nope, I'm referring to the ${tesResult...} as opposed to ${testResult...}

d


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




Re: Unable to output column data from Query

2002-11-26 Thread Lyndon Durham
Yeah that was a typo and the source of the problem. I wonder how come 
there were no error statements when the tags were interpreted. Thanks 
for pointing that out to me.

Dave Newton wrote:

Lyndon Durham wrote:


No it was not a typo. Are you referring to the placement of the 
attributes? 



Lyndon Durham wrote:


 



Nope, I'm referring to the ${tesResult...} as opposed to ${testResult...}

d


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






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




Re: Unable to output column data from Query

2002-11-26 Thread Dave Newton
Yeah that was a typo and the source of the problem. I wonder how come 
there were no error statements when the tags were interpreted. Thanks 
for pointing that out to me. 


I hate it when that happens!

;)

Dave



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




Re: xtags question

2002-11-26 Thread Glenn Nielsen
Your email was delivered on time.  Some of us who participate in Jakarta
projects were off at ApacheCon US 2002 in Las Vegas last week. I put off
checking my email list subscriptions until I got back and had time to
catch up.

Glenn

bryan wrote:


 Glenn Nielsen wrote:



Yes, the XSL taglib is deprecated.  You can use either the XTags taglib


or


JSTL.  If you have a servlet container that supports JSP 1.2, use JSTL.
If you have a container which supports JSP 1.1 but not JSP 1.2, use


XTags.

Thanks, already figured that out, but I appreciated the response. This
sort of makes me wonder though, I posted that question quite a while ago
did it just come through now or what's going on?



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





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




Re: XML document --> HTML transformation recommendations?

2002-11-26 Thread Glenn Nielsen
It depends on what the primary source of your data is.  If it is primarily
XML I would use a servlet which does XSL transformations of the data.

If most of your data is not XML I would use JSP/JSTL and use the custom
JSP tags to invoke styling XML using an external XSL stylesheet.

I have done both. Its the same old answer, pick the best tool that fits
the needs of your specific application and skill sets of your development
team.

Regards,

Glenn

Mazza, Glen R., ,CPMS wrote:

Hello,

For my web app I would like to have two different output formats for certain
requests: PDF and HTML.  I've already done PDF (via FOP) but would like to
know the best way in generating HTML.

For example, given this document:



	...
	...

...
...


I see two possibilities:

1) Create an XSL stylesheet and run Xalan on the server to generate the
HTML. 

2) Use the JSTL XML tags within a JSP to place the document elements.

I'm guessing (1) is faster, but (2) is more maintainable...I'm wondering
what the experiences of others on this list have been.

Thanks,
Glen

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




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




rtexprvalue and EL

2002-11-26 Thread Affan Qureshi
I want to do a test like this:




I am comparing a value against a constant in a class but I can't execute a
RT expression in a  when using the EL tags. How do I accomplish this
in EL?

Of course I can initialize pageContext variables with all the constants and
do EL comparisons using them. But is there another way to do this?

I have tried making true in the TLD but it didn't
help.

Thanks a lot


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




Re: rtexprvalue and EL

2002-11-26 Thread David M. Karr
> "Affan" == Affan Qureshi <[EMAIL PROTECTED]> writes:

Affan> I want to do a test like this:
Affan> 
Affan> 
Affan> 

Affan> I am comparing a value against a constant in a class but I can't execute a
Affan> RT expression in a  when using the EL tags. How do I accomplish this
Affan> in EL?

Affan> Of course I can initialize pageContext variables with all the constants and
Affan> do EL comparisons using them. But is there another way to do this?

The EL only references javabean properties.  That's what you have to work with.

Write a function which takes a class and a hashmap, and uses reflection to
populate all the constant symbols into the hashmap.  You can then reference
that hashmap in the EL.  Either that, or use both the "c" and "c-rt" tags, and
use "c-rt:set" to set a scoped attribute and then "c:if" (I think that would
work).

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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




Re: rtexprvalue and EL

2002-11-26 Thread Affan Qureshi
Or I could have a jsp page that set pageContext variables with the constant
values. I can include that page in all JSPs where i need constant values.
And then I could use those pageContext variables in EL tags.

- Original Message -
From: "David M. Karr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 11:18 AM
Subject: Re: rtexprvalue and EL


> > "Affan" == Affan Qureshi <[EMAIL PROTECTED]> writes:
>
> Affan> I want to do a test like this:
> Affan> 
> Affan> 
> Affan> 
>
> Affan> I am comparing a value against a constant in a class but I
can't execute a
> Affan> RT expression in a  when using the EL tags. How do I
accomplish this
> Affan> in EL?
>
> Affan> Of course I can initialize pageContext variables with all the
constants and
> Affan> do EL comparisons using them. But is there another way to do
this?
>
> The EL only references javabean properties.  That's what you have to work
with.
>
> Write a function which takes a class and a hashmap, and uses reflection to
> populate all the constant symbols into the hashmap.  You can then
reference
> that hashmap in the EL.  Either that, or use both the "c" and "c-rt" tags,
and
> use "c-rt:set" to set a scoped attribute and then "c:if" (I think that
would
> work).
>
> --
> ===
> David M. Karr  ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]   ; SCJP
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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