Re: Are there some examples of proper generating of XML from queries

2006-11-24 Thread David Schwartz
Which database are you using?

--Original Message--
From: Rashmi Rubdi
To: Apache Jakarta Taglibs help
ReplyTo: Apache Jakarta Taglibs help
Sent: Nov 24, 2006 12:26 PM
Subject: Re: Are there some examples of proper generating of XML from queries

Hi Alexander, 

I think you might want to consider using a MVC framework to generate the XML 
from the database.

*After* an XML file is generated then, you can easily extract the contents of 
the XML file with JSTL XML Tags.

There are many examples of how JSTL XML Tags are used in the JSTL Spec 
document. 
I'm refering to jstl-1_1-mr2-spec.pdf 


http://acme.com/customer?id=76567” var=”doc”/>









You can either parse a document with x:parse and then access the contents of 
the XML or you can transform an xml file with xslt
and you can access the contents of XML this way also. 

There are many options and they are fully covered in the spec. 

There are no shortcuts, being a newbie myself I had to read the entire spec 
(which is very well written and easy to understand)
 to understand how JSTL works and what options are available.

-Rashmi

- Original Message 
From: Alexander Shopov <[EMAIL PROTECTED]>
To: taglibs-user@jakarta.apache.org
Sent: Friday, November 24, 2006 11:55:52 AM
Subject: Are there some examples of proper generating of XML from queries


Hi guys,
I am using JSTL to generate XML from simple queries.
I am doing it like the example I am giving below.

I am wondering - is this the right way? Should not XML be generated with 
some  expressions (where x is mapped to XML taglib)? Is there to 
do XPath expressions on variables like "result" from above?

I am reading JavaServer Pages Standard Tag Library specs Version 1.2 
from Sun but am undecided whether I am doing XML generation the proper 
way or just making ugly hacks.



http://java.sun.com/JSP/Page";;
   xmlns:sql="http://java.sun.com/jsp/jstl/sql";;
   xmlns:c="http://java.sun.com/jsp/jstl/core";;
   version="2.0">

 


 

 
 
 SELECT   ID as "id",
  DESCRIPTION as "description"
 FROM CURRENCY
 ORDER BY ID
 

 
 
 
 <></>
 
 
 

 






Kind regards:
al_shopov

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


 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

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



David Schwartz
[EMAIL PROTECTED]
Array Software Inc.  

Re: xpath error

2006-02-20 Thread David Schwartz

Thanks Murray.
That was perfect.
I downloaded xalan & copied the following jars to tomcat/common/lib...

xalan.jar
xercesImpl.jar
xml-apis.jar.

Note: The xalan download contains the required xerces jars.


Quoting Murray Steele <[EMAIL PROTECTED]>:

Sounds like your xalan jars are missing.  But as far as I'm aware 
they  should come pre-bundled with tomcat *and* the jre (admittedly 
I'm on  4.1 and 1.4 respectively, so I could be out of date).


Maybe you should check the classpath of your tomcat or grab a xalan  
from http://xml.apache.org/xalan-j/index.html and put the jar in the  
WEB-INF/lib/ folder of your webapp and see if that fixes it.  
Although  I've a feeling that Tomcat might do some "oh, that's a 
xalan jar, I've  my own one of them, I won't load it" when it comes 
to looking at jars  in /WEB-INF/lib/ so you could perhaps try putting 
it somewhere else  (e.g. /common/lib if that still exists in tomcat 
5.5)


Muz

On 20 Feb 2006, at 13:49, David Schwartz wrote:


I just intalled tomcat 5.5.15 & jre1.5.0_06. getting the following  error...

org.apache.jasper.JasperException: org/apache/xpath/VariableStack
	 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServl 
etWrapper.java:510)
	 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j 
ava:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.ServletException: org/apache/xpath/VariableStack
	 
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon 
textImpl.java:858)
	 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte 
xtImpl.java:791)

org.apache.jsp.Logon_jsp._jspService(org.apache.jsp.Logon_jsp:230)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j 
ava:332)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.NoClassDefFoundError: org/apache/xpath/VariableStack
	 
org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(ForEachTa 
g.java:49)
	 
javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.ja 
va:227)
	 
org.apache.jsp.Logon_jsp._jspx_meth_x_forEach_0(org.apache.jsp.Logon_js 
p:295)

org.apache.jsp.Logon_jsp._jspService(org.apache.jsp.Logon_jsp:158)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j 
ava:332)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


David Schwartz






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



--
Murray Steele
Head of Development

Peoples Archive
w: http://www.peoplesarchive.com
t: 0207 323 0323
d: 0207 631 9147

This email has been scanned by Postini.
For more information please visit http://www.postini.com


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






David Schwartz
Array Software Inc.
http://www.arrayone.com


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



xpath error

2006-02-20 Thread David Schwartz
I just intalled tomcat 5.5.15 & jre1.5.0_06. getting the following error...

org.apache.jasper.JasperException: org/apache/xpath/VariableStack

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.ServletException: org/apache/xpath/VariableStack

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.Logon_jsp._jspService(org.apache.jsp.Logon_jsp:230)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.NoClassDefFoundError: org/apache/xpath/VariableStack

org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(ForEachTag.java:49)

javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:227)

org.apache.jsp.Logon_jsp._jspx_meth_x_forEach_0(org.apache.jsp.Logon_jsp:295)
org.apache.jsp.Logon_jsp._jspService(org.apache.jsp.Logon_jsp:158)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


David Schwartz






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



xpath error

2006-02-17 Thread David Schwartz
I just intalled tomcat 5.5.15 & jre1.5.0_06.
Getting an xpath error...
org.apache.jasper.JasperException: org/apache/xpath/VariableStack

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Am I missing dependencies?

David Schwartz






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



Tomcat 5.5 system requirements

2006-01-12 Thread David Schwartz
Is there a list of Tomcat 5.5 system requirements for a windows based install?
Thanks

David Schwartz

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



Re: Response in Firefox vs IE

2005-08-05 Thread David Schwartz
Is the data being displayed in a ?
If yes, the browser will render the entire table in memory before displaying it.

Quoting Marius Botha <[EMAIL PROTECTED]>:

>> Ok, seeing as no one wants to answer my "Tips for improving performance and
>> optimizing tags" question, let me try something else :)
>>
>> I have a JSP containing some tags that I developed. It displays quite a lot
>> of content (couple of hundred rows of data, about 160KB of text). I have
>> timed the various stages of the response and it takes about 2 sec to get all
>> the info from the database, then about 2 sec to go through the tags, build
>> the HTML, etc. But from the moment this is done and the last line of the JSP
>> has executed it still takes a couple of seconds to display in the browser.
>> In Firefox at least I get a couple of lines immediately once the page has
>> finished executing, but in IE it takes another 5 seconds after everything
>> has completed before I see any data.
>>
>> Is there maybe a way one can flush data to the browser earlier on, or is
>> this an IE problem? Putting flush in the JSP also makes no difference, this
>> time lapse happens after the page has finished executing. It looks like it
>> is buffering the response and only writing it out once it has received all
>> the data.
>>
>> Hope that makes sense and someone can give some constructive advice.
>>
>> Kind regards,
>>
>> Marius Botha
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: how to debug jsp compilation error in Tomcat 5.5 ?

2005-06-16 Thread David Schwartz
Where's the jsp code?

Quoting Woodchuck <[EMAIL PROTECTED]>:

>> hihi all!!
>>
>> this is my 8th jakarta mailing list and my first question to
>> taglibs-user!! :)
>>
>> my question is, how do i debug something like this:
>>
>> org.apache.jasper.JasperException: Validation error messages from
>> TagLibraryValidator for c_rt894: Illegal text inside "c:choose"
>> tag: "894: Illegal text inside "c:choose" tag:
>> "...".894: Illegal text inside "c:choose" tag: "> sty...".894: Illegal text inside "c:choose" tag:
>> "...".894: Illegal text inside "c:choose" tag:
>> "...".923: Illegal text inside "c:choose" tag:
>> "...".923: Illegal text inside "c:choose" tag:
>> "...".923: Illegal text inside "c:choose" tag:
>> "
>>
>>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
>>
>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
>>
>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:72)
>>
>> org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1549)
>>  org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
>>  org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
>>  org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
>>  org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>>  org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>>
>>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
>>
>>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
>>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
>>
>>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
>>
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
>>
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
>>  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
>>
>>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
>>
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
>>
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
>>  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>>
>>
>> to give some context about this, i am upgrading my web app from:
>>  - windows 2000
>>  - jdk1.4.2_07
>>  - tomcat 4.1.24
>>  - struts 1.1
>>
>> to this:
>>  - windows 2003 server
>>  - jdk1.5.0_03
>>  - tomcat 5.5.9
>>  - struts 1.2.7
>>
>> my web app worked fine in my original setup, but in the new
>> configuration the majority of pages are fine, but i'm getting this
>> error on one page which i do not know why.
>>
>> i have done the following:
>>   - changed to version 2.4 dtd in my web.xml
>>   - changed to version 1.2 dtd in struts-config.xml
>>   - referenced the run-time TLDs in my jsps (ie. core_rt, fmt_rt)
>>
>> but now i get this TagLibraryValidator error messages.
>>
>> how do i go about finding what my problem is?  how do i use the unique
>> id's given in the error message?  (ie. the 894 or 923 id numbers)
>>
>> please and thanks!!
>> woodchuck
>>
>> __
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz

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



Re: Upgrade from Tomcat 4 to 5

2005-06-03 Thread David Schwartz
Try changing the taglib in your jsp to...

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"; %>

Quoting Nic Werner <[EMAIL PROTECTED]>:

>> So, I could throw in the new version of JSTL, and Tomcat 5 and use my
>> old code with  and I should be fine? I've gotten errors doing
>> this ('value' not definined for the TLD), but if you say it should work
>> then I'll look elsewhere for problems.
>>
>> Thanks,
>> - Nic.
>>
>> David Schwartz wrote:
>>
>> >>>is this correct?
>> >>>
>> >>>
>> >
>> >No. It's still used.
>> >
>> >David Schwartz
>> >
>> >
>> >Quoting Nic Werner <[EMAIL PROTECTED]>:
>> >
>> >
>> >
>> >>>Hi,
>> >>>I've got an application using Tomcat 4, JSTL 1.0 and I'm trying to
>> >>>upgrade it to Tomcat 5. The problem I'm having is the  is
>> >>>no longer used, and I have to use just the ${variable} EL syntax, is
>> >>>this correct?
>> >>>There is more to this problem, but I was hoping to use the newer
>> >>>version of JSTL with Tomcat5, and wasn't really sure what needed to
>> change.
>> >>>
>> >>>Thanks,
>> >>>
>> >>>- Nic.
>> >>>
>> >>>
>> >>>-
>> >>>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: Upgrade from Tomcat 4 to 5

2005-06-03 Thread David Schwartz
>>is this correct?

No. It's still used.

David Schwartz


Quoting Nic Werner <[EMAIL PROTECTED]>:

>> Hi,
>> I've got an application using Tomcat 4, JSTL 1.0 and I'm trying to
>> upgrade it to Tomcat 5. The problem I'm having is the  is
>> no longer used, and I have to use just the ${variable} EL syntax, is
>> this correct?
>> There is more to this problem, but I was hoping to use the newer
>> version of JSTL with Tomcat5, and wasn't really sure what needed to change.
>>
>> Thanks,
>>
>> - Nic.
>>
>>
>> -
>> 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: counter in forEach tag?

2005-05-26 Thread David Schwartz
1. Add this to your forEach...

varStatus = "stat"

2. Add this to the rows...








This example create alternating colors for odd/even rows.


Quoting Scott Purcell <[EMAIL PROTECTED]>:

>> Hello,
>> I have this scenario come up occasionally, and have to opt to JSP
>> expressions on the page for a work-around.
>>
>>  
>>   
>>  nothing
>>   
>>   
>> 
>>
>>
>> BODY
>>
>>
>>   
>> 
>>   
>> 
>>
>>
>> In the forEach section, I am going to create a rows in a table which will be
>> different colors for each row. How can I put in a counter that I can then
>> change the row color for? Basically, I would like to know what asset I am on
>> in the body.
>>
>> Thanks,
>> Scott
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz

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



Re: Dynamic Evaluation

2005-04-28 Thread David Schwartz
Thanks everyone for your help.
Using the requestScope[] as Rahul suggested worked.
The [] handles the dynamic evaluation of vars.

>>If _you_ called request.setAttribute(...) then surely you know what name you
saved the ResultSet(s) under.

That is also dynamic & based on user input, at run time.

Quoting Wendy Smoak <[EMAIL PROTECTED]>:

>> From: "David Schwartz" <[EMAIL PROTECTED]>
>>
>> > A request attribute is set from a servlet via request.setAttribute.
>> > The attribute is a ResultSet.
>> > On the JSP page I want to loop through all request attributes. When I find
>> one
>> > that contains the ResultSet I want to output the query results.
>> >
>> > Is it possible using JSTL to determine if a request attribute is a
>> ResultSet?
>>
>> I don't see why you would need to--  If _you_ called
>> request.setAttribute(...) then surely you know what name you saved the
>> ResultSet(s) under.  I think I would set another request attribute with a
>> List of those names, and iterate over that, not the entire set of request
>> attributes.   But if you must...
>>
>> This is a hack since it depends on the output of Class.toString().
>> (Untested.)
>>
>> 
>> 
>>  The key it was saved under: 
>>  The ResultSet itself: 
>>
>> 
>> 
>>
>> --
>> Wendy Smoak
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz

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



Re: Dynamic Evaluation

2005-04-28 Thread David Schwartz
Sorry, I'll try to clarify...

A request attribute is set from a servlet via request.setAttribute.
The attribute is a ResultSet.
On the JSP page I want to loop through all request attributes. When I find one
that contains the ResultSet I want to output the query results.

Is it possible using JSTL to determine if a request attribute is a ResultSet?

Quoting Martin Cooper <[EMAIL PROTECTED]>:

>> Maybe you could back up a bit and tell us exactly what is stored
>> where, and under what names. In your first message, you referred to "a
>> request parameter whose value is a ResultSet", which is just not
>> possible, since request parameters are, by definition, strings. Once
>> we know what is stored where, I'm sure we can give you a simple
>> solution. ;-)
>>
>> --
>> Martin Cooper
>>
>>
>> On 4/28/05, David Schwartz <[EMAIL PROTECTED]> wrote:
>> > >>param[myQuery]
>> >
>> > The var is set in a servlet so it's available via requestScope.
>> > Is the syntax the same as param[myQuery]?
>> >
>> > Quoting Rahul P Akolkar <[EMAIL PROTECTED]>:
>> >
>> > >> On 4/28/05, David Schwartz <[EMAIL PROTECTED]> wrote:
>> > >> > The myQuery param is actually a variable.
>> > >> > It would look like...
>> > >> > 
>> > >> >
>> > >> > If the request param has a "_Query" suffix then i want to display the
>> > >> rows.
>> > >> >
>> > >> 
>> > >>
>> > >> Fun :-) Then access value of the param whose name is contained in the
>> > >> variable myQuery using the [ ] operator, like so:
>> > >>
>> > >> param[myQuery]
>> > >>
>> > >> -Rahul
>> > >>
>> >
>> > David Schwartz
>> > Array Software Inc.
>> > http://www.arrayone.com
>> >
>> > -
>> > 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]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Dynamic Evaluation

2005-04-28 Thread David Schwartz
>>param[myQuery]

The var is set in a servlet so it's available via requestScope.
Is the syntax the same as param[myQuery]?

Quoting Rahul P Akolkar <[EMAIL PROTECTED]>:

>> On 4/28/05, David Schwartz <[EMAIL PROTECTED]> wrote:
>> > The myQuery param is actually a variable.
>> > It would look like...
>> > 
>> >
>> > If the request param has a "_Query" suffix then i want to display the
>> rows.
>> >
>> 
>>
>> Fun :-) Then access value of the param whose name is contained in the
>> variable myQuery using the [ ] operator, like so:
>>
>> param[myQuery]
>>
>> -Rahul
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Dynamic Evaluation

2005-04-28 Thread David Schwartz
The myQuery param is actually a variable.
It would look like...


If the request param has a "_Query" suffix then i want to display the rows.




Quoting Rahul P Akolkar <[EMAIL PROTECTED]>:

>> On 4/28/05, David Schwartz <[EMAIL PROTECTED]> wrote:
>> > The names are dynamic as well & are not known until run-time.
>> >
>>
>> Sorry, I'm not sure what you mean here. In:
>> 
>> "myQuery" is a string literal?
>>
>> > So, based on the type I would display the result.
>> > For a ResultSet I want to loop & display the rows.
>> >
>>
>> These references might help, please look at:
>> 1) JSTL sql tags [
>> http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/sql/tld-summary.html
>> ]
>> 2) The DBTags jakarta taglibs supported taglib [
>> http://jakarta.apache.org/taglibs/doc/dbtags-doc/intro.html ]
>>
>> -Rahul
>>
>> > Quoting Rahul P Akolkar <[EMAIL PROTECTED]>:
>> >
>> > >> You don't have to loop to get at a request param, just use the param
>> > >> implicit object in your EL expression like so:
>> > >>
>> > >> ${param.myQuery}
>> > >>
>> > >> -Rahul
>> > >>
>> > >> On 4/28/05, David Schwartz <[EMAIL PROTECTED]> wrote:
>> > >> > Hi.
>> > >> > I'm trying to dynamically evaluate & loop through a request
>> parameter
>> > >> whose
>> > >> > value is a ResultSet.
>> > >> >
>> > >> > First, I'm looping the requestScope to find a param named
>> "myQuery".
>> > >> > Once found I want to output the rows of the query.
>> > >> >
>> > >> > 
>> > >> >
>> > >> >
>> > >> ><%-- Here's where I'm stuck.
>> > >> > How do I reference the value of myQuery, which is a
>> > >> ResultSet?
>> > >> >--%>
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> > 
>> > >> >
>> > >> >
>> -
>> > >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > >> > For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> > >> >
>> > >> >
>> > >>
>> >
>> > David Schwartz
>> > Array Software Inc.
>> > http://www.arrayone.com
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Dynamic Evaluation

2005-04-28 Thread David Schwartz
The names are dynamic as well & are not known until run-time.

So, based on the type I would display the result.
For a ResultSet I want to loop & display the rows.

Quoting Rahul P Akolkar <[EMAIL PROTECTED]>:

>> You don't have to loop to get at a request param, just use the param
>> implicit object in your EL expression like so:
>>
>> ${param.myQuery}
>>
>> -Rahul
>>
>> On 4/28/05, David Schwartz <[EMAIL PROTECTED]> wrote:
>> > Hi.
>> > I'm trying to dynamically evaluate & loop through a request parameter
>> whose
>> > value is a ResultSet.
>> >
>> > First, I'm looping the requestScope to find a param named "myQuery".
>> > Once found I want to output the rows of the query.
>> >
>> > 
>> >
>> >
>> ><%-- Here's where I'm stuck.
>> > How do I reference the value of myQuery, which is a
>> ResultSet?
>> >--%>
>> >
>> >
>> >
>> >
>> > 
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Dynamic Evaluation

2005-04-28 Thread David Schwartz
Hi.
I'm trying to dynamically evaluate & loop through a request parameter whose
value is a ResultSet.

First, I'm looping the requestScope to find a param named "myQuery".
Once found I want to output the rows of the query.




<%-- Here's where I'm stuck.
 How do I reference the value of myQuery, which is a ResultSet?
--%>









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



Re: Substitution of a variable in a variable

2005-03-29 Thread David Schwartz
In your SQL statement use an alias...

SELECT name_${language} As namedLanguage,
iso3166
FROM countries
ORDER BY name_${language}

In the  list...


${row.namedLanguage}


now your result column will always have the same, expected name.

Quoting Christoph Pilka <[EMAIL PROTECTED]>:

>> Hi folks,
>>
>> anyone knows how to express the following snippet?
>>
>> 
>>   SELECT name_${language}, iso3166 FROM countries ORDER BY name_${language}
>> 
>> 
>>   
>> ${row.name_${language}}
>>   
>> 
>>
>> The expression ${row.name_${language}} is the one making trouble. How to
>> substitute a variable in a variable?
>>
>> Mni thx,
>> Chris
>>
>> -----
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: JSTL - c:if test Question

2005-01-11 Thread David Schwartz
Try...

Add this to your jsp...
<%@ taglib prefix = "fn" uri = "http://java.sun.com/jsp/jstl/functions"; %>

Then...



Quoting Jack Lauman <[EMAIL PROTECTED]>:

>> I am using the following line of code to test strings for equailty.
>> In most cases I'm just trying to compare a city name in an array to
>> user input for the name of a city i.e. Seattle.
>>
>> 
>>
>> If the user enters seattle instead of Seattle I don't get a response.
>> Is there a way to alter this statement to make it "case insensitive"?
>> Is there a way to alter it to respond like a SQL %LIKE% query?
>>
>> Thanks,
>>
>> Jack
>>
>>
>> -----
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz

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



Re: How to avoid the line breaks when a tag file used within javascript?

2004-10-20 Thread David Schwartz
You may be able to work around it via javascript?
Try outputting the value to a hidden text field than displaying the value
property. This will not cause a javascript error & elliminates line breaks.


Quoting Rick Reumann <[EMAIL PROTECTED]>:

>> Kris Schneider wrote the following on 10/20/2004 3:51 PM:
>>
>> > Are you still pursuing this? If so, I use the following comment hack:
>> >
>> > <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %><%--
>> > --%><%@ attribute name="items" required="true"
>> > type="java.util.Collection"%><%--
>> > --%>...
>> >
>> > I've also seen this in use:
>> >
>> > <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core";
>> > %><%@ attribute name="items" required="true" type="java.util.Collection"
>> > %>...
>> >
>>
>> Thanks, yes still looking:( The problem is I'm still left with just one
>> closing break at the end. I had previously tried converting the whole
>> tag file to one line and still I'll get one break when it's evaluated in
>> the JSP. Very frustrating. The only other hack I can think of is when
>> I'm iterating over my loop in my tag file I can keep prepending a > var to make my String and I could then use that in the JSP. Seems
>> like a lot overhead though. Be nice if there was a way to do > var="foo" value=""/> Then I could just use ${foo}
>> within the javascript.
>>
>>
>>
>> --
>> Rick
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz

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



RE: Submit Button - Solved

2004-09-07 Thread David Schwartz
Thanks Ross. That worked.




Then on action page...


displays "Next" or "Save"

Quoting "Ross, Douglas" <[EMAIL PROTECTED]>:

>> David,
>>
>> I believe the browser only sends the clicked submit button value. So the
>> trick (if you would call it that) is to name all your submit buttons the
>> same:
>>
>> 
>> 
>> 
>>
>> Whichever one the user clicks is the one sent to the server:
>>
>> request.getParameter("action")=="New" | "Edit" | "Delete";
>>
>> Hope this helps. Note: the img and the input type=image tags do not do
>> this!
>>
>> Doug
>>
>> -Original Message-
>> From: David Schwartz [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 07, 2004 9:54 AM
>> To: [EMAIL PROTECTED]
>> Subject: Submit Button
>>
>> Is it possible to determine the name or value of the submit button that
>> user
>> clicked?
>> For example, I have a form with 4 submit buttons - each with a dif name
>> & value.
>> Need to know which was clicked so user can be routed.
>>
>> David Schwartz
>>
>> -
>> 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]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Submit Button

2004-09-07 Thread David Schwartz
Looking for JSTL - not Struts.

Quoting "Michael G. McGrady" <[EMAIL PROTECTED]>:

>> Karl Coleman wrote:
>>
>> >I believe the name of the button is passed in the request under the name
>> Submit.
>> >
>> >page.jsp?Submit=
>> >
>> >Karl
>> >
>>
>> Oh, if this is all you wanted to know, and not how to use images, blah,
>> blah, then you can use  and the property attribute will
>> pass along the value to the ActionForm.  I assumed you wanted to know
>> more than this, since this is just how the submit tag works and I
>> assumed you looked at that.
>>
>> Michael
>>
>>
>> -----
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Submit Button

2004-09-07 Thread David Schwartz
Is it possible to determine the name or value of the submit button that user
clicked?
For example, I have a form with 4 submit buttons - each with a dif name & value.
Need to know which was clicked so user can be routed.

David Schwartz

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



String concatenation

2004-08-23 Thread David Schwartz
Is there a way to concatenate strings in JSTL 1.1?
For example, 

David Schwartz

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



RE: Display Taglib & Dates

2004-08-16 Thread David Schwartz
Use select * sparingly!
Explicitly select cols & keep db formatting & db logic on the db side.

Quoting Keith <[EMAIL PROTECTED]>:

>> I wasn't formatting anymore. I did not have an "AS column_name" after the
>> TO_CHAR(),
>> though. That lets it display. Thanks.
>>
>> Only problem I can see with this, though, is that I now have to explicitly
>> list all the
>> columns I need from a table if there's a date in it. There are some queries
>> where I need
>> all columns and do a SELECT *, and this wouldn't be an easy fix for some of
>> them. Still
>> looking through the taglib documentation. I'm still pretty new to custom tag
>> libraries, so
>> it's slow going now.
>>
>> Keith
>>
>>
>> -- Original Message ---
>> From: David Schwartz <[EMAIL PROTECTED]>
>> To: Tag Libraries Users List <[EMAIL PROTECTED]>
>> Sent: Mon, 16 Aug 2004 13:35:50 -0400
>> Subject: RE: Display Taglib & Dates
>>
>> > Once it's returned from oracle simply display using JSTL. There wont be a
>> need
>> > to format.
>> >
>> > Quoting Keith <[EMAIL PROTECTED]>:
>> >
>> > >> That is what the TO_CHAR() function does. Using it results in no output
>> > >> (empty table
>> > >> cells) with the display taglib, tho.
>> > >>
>> > >> Keith
>> > >>
>> > >> -- Original Message ---
>> > >> From: "Karl Coleman" <[EMAIL PROTECTED]>
>> > >> To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
>> > >> Sent: Mon, 16 Aug 2004 13:20:06 -0400
>> > >> Subject: RE: Display Taglib & Dates
>> > >>
>> > >> > I know T-SQL on MS SQL Server has functions that allow for date
>> > >> formatting. Maybe
>> > >> something similar exists for Oracle.
>> > >> >
>> > >> > Karl
>> > >> >
>> > >> > -Original Message-
>> > >> > From: Keith [mailto:[EMAIL PROTECTED]
>> > >> > Sent: Monday, August 16, 2004 1:18 PM
>> > >> > To: Taglibs
>> > >> > Subject: Display Taglib & Dates
>> > >> >
>> > >> > I just got the Display taglib to try and make some of my job a little
>> > >> easier. Things
>> > >> > seemed to be going good til I ran across the problem of a date field.
>> I'm
>> > >> pulling from an
>> > >> > Oracle database, so the following query:
>> > >> >
>> > >> > 
>> > >> >   SELECT a.project_id,
>> > >> >   a.project_name,
>> > >> >   a.kickoff_date
>> > >> >   FROM project_main a
>> > >> >   ORDER BY project_id DESC
>> > >> > 
>> > >> >
>> > >> > returns something like this:
>> > >> >
>> > >> > 10016
>> > >> > Project1234
>> > >> > 2004-07-15 00:00:00.0
>> > >> >
>> > >> > I'd like to format the date field to look like this: 15-Jul-2004
>> > >> > Before, I just used the  tag, but I'm at a loss for
>> how to
>> > >> use it in
>> > >> > conjuction with the display taglib. I tried using the TO_CHAR
>> function in
>> > >> the database
>> > >> > query to format my date beforehand, but then it doesn't return any
>> date
>> > >> information at
>> > >> > all. Any help?
>> > >> >
>> > >> > Keith
>> > >> >
>> > >> > -
>> > >> > 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]
>> > >> --- End of Original Message ---
>> > >>
>> > >>
>> > >> -
>> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > >> For additional commands, e-mail: [EMAIL PROTECTED]
>> > >>
>> > >>
>> >
>> > David Schwartz
>> > Array Software Inc.
>> > http://www.arrayone.com
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> --- End of Original Message ---
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Display Taglib & Dates

2004-08-16 Thread David Schwartz
For the format 15-Jul-2004 its To_Date(a.kickoff_date).

Quoting Keith <[EMAIL PROTECTED]>:

>> I just got the Display taglib to try and make some of my job a little
>> easier. Things
>> seemed to be going good til I ran across the problem of a date field. I'm
>> pulling from an
>> Oracle database, so the following query:
>>
>> 
>>  SELECT a.project_id,
>>  a.project_name,
>>  a.kickoff_date
>>  FROM project_main a
>>  ORDER BY project_id DESC
>> 
>>
>> returns something like this:
>>
>> 10016
>> Project1234
>> 2004-07-15 00:00:00.0
>>
>> I'd like to format the date field to look like this: 15-Jul-2004
>> Before, I just used the  tag, but I'm at a loss for how to
>> use it in
>> conjuction with the display taglib. I tried using the TO_CHAR function in
>> the database
>> query to format my date beforehand, but then it doesn't return any date
>> information at
>> all. Any help?
>>
>> Keith
>>
>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



RE: Display Taglib & Dates

2004-08-16 Thread David Schwartz
Once it's returned from oracle simply display using JSTL. There wont be a need
to format.

Quoting Keith <[EMAIL PROTECTED]>:

>> That is what the TO_CHAR() function does. Using it results in no output
>> (empty table
>> cells) with the display taglib, tho.
>>
>> Keith
>>
>> -- Original Message ---
>> From: "Karl Coleman" <[EMAIL PROTECTED]>
>> To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
>> Sent: Mon, 16 Aug 2004 13:20:06 -0400
>> Subject: RE: Display Taglib & Dates
>>
>> > I know T-SQL on MS SQL Server has functions that allow for date
>> formatting. Maybe
>> something similar exists for Oracle.
>> >
>> > Karl
>> >
>> > -Original Message-
>> > From: Keith [mailto:[EMAIL PROTECTED]
>> > Sent: Monday, August 16, 2004 1:18 PM
>> > To: Taglibs
>> > Subject: Display Taglib & Dates
>> >
>> > I just got the Display taglib to try and make some of my job a little
>> easier. Things
>> > seemed to be going good til I ran across the problem of a date field. I'm
>> pulling from an
>> > Oracle database, so the following query:
>> >
>> > 
>> >SELECT a.project_id,
>> >a.project_name,
>> >a.kickoff_date
>> >FROM project_main a
>> >ORDER BY project_id DESC
>> > 
>> >
>> > returns something like this:
>> >
>> > 10016
>> > Project1234
>> > 2004-07-15 00:00:00.0
>> >
>> > I'd like to format the date field to look like this: 15-Jul-2004
>> > Before, I just used the  tag, but I'm at a loss for how to
>> use it in
>> > conjuction with the display taglib. I tried using the TO_CHAR function in
>> the database
>> > query to format my date beforehand, but then it doesn't return any date
>> information at
>> > all. Any help?
>> >
>> > Keith
>> >
>> > -----
>> > 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]
>> --- End of Original Message ---
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Display Taglib & Dates

2004-08-16 Thread David Schwartz
You should be doing that in the query, using Oracle functions.
Try...

SELECT a.project_id,
a.project_name,
To_Char(a.kickoff_date, 'MM/DD/' ) AS Kickoff_Date
FROM project_main a
ORDER BY project_id DESC


Quoting Keith <[EMAIL PROTECTED]>:

>> I just got the Display taglib to try and make some of my job a little
>> easier. Things
>> seemed to be going good til I ran across the problem of a date field. I'm
>> pulling from an
>> Oracle database, so the following query:
>>
>> 
>>  SELECT a.project_id,
>>  a.project_name,
>>  a.kickoff_date
>>  FROM project_main a
>>  ORDER BY project_id DESC
>> 
>>
>> returns something like this:
>>
>> 10016
>> Project1234
>> 2004-07-15 00:00:00.0
>>
>> I'd like to format the date field to look like this: 15-Jul-2004
>> Before, I just used the  tag, but I'm at a loss for how to
>> use it in
>> conjuction with the display taglib. I tried using the TO_CHAR function in
>> the database
>> query to format my date beforehand, but then it doesn't return any date
>> information at
>> all. Any help?
>>
>> Keith
>>
>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Rotating tables? (slightly OT)

2004-08-10 Thread David Schwartz
Oracle - You're in luck. Go to http://asktom.oracle.com & search for "crosstab
query".

Quoting Nic Werner <[EMAIL PROTECTED]>:

>> David Schwartz wrote:
>>
>> >>>is this possible/smart in JSTL
>> >>>
>> >>>
>> >
>> >May be possible but not smart.
>> >Should be returned by the database & just displayed by JSTL.
>> >You need a crosstab query. Which database are you using?
>> >
>> >
>>
>> I'm using Oracle. I've got a crosstab query going now, but what happens
>> is that I'm getting getting duplicate rows with one row having a null in
>> a certain field and the other with data in the field:
>>
>> select distinct
>> x.outlet_no,
>> building.name,
>> x.rm,
>> decode(b.color,NULL,' ',b.color),
>> decode(b.switchip,NULL,' ',b.switchip) BSWITCHIP,
>> decode(b.blade,NULL,' ',b.blade) BBLADE,
>> decode(b.port,NULL,' ',b.port) BPORT,
>> decode(b.vlan,NULL,' ',b.vlan)  BVLAN,
>> decode(o.color,NULL,' ',o.color) ,
>> decode(o.switchip,NULL,' ',o.switchip) OSWITCHIP,
>> decode(o.blade,NULL,' ',o.blade) OBLADE,
>> decode(o.port,NULL,' ',o.port) OPORT,
>> decode(o.vlan,NULL,' ',o.vlan) OVLAN,
>> decode(g.color,NULL,' ',g.color) ,
>> decode(g.switchip,NULL,' ',g.switchip) GSWITCHIP,
>> decode(g.blade,NULL,' ',g.blade) GBLADE,
>> decode(g.port,NULL,' ',g.port) GPORT,
>> decode(g.vlan,NULL,' ',g.vlan) GVLAN,
>> d.dn
>> from
>> building,
>> data b,
>> data o,
>> data g,
>> cablepair d,
>> new_outlet x
>> where x.outlet_no = b.outlet_no(+)
>> and x.outlet_no = o.outlet_no(+)
>> and x.outlet_no = g.outlet_no(+)
>> and x.id=d.cabl_pr(+)
>> and b.color(+) = 'B'
>> and o.color(+) = 'O'
>> and g.color(+) = 'G'
>> and x.buildid=building.id(+)
>>
>> This will give me outlets of three colors, but the phone (dn) from
>> 'cablepair' will cause duplicate rows. I guess the best way to eliminate
>> this is to union this query against itself for each color, which will be
>> clunky. Thanks for all your input!
>>
>> - Nic.
>>
>> >
>> >Quoting Helios Alonso <[EMAIL PROTECTED]>:
>> >
>> >
>> >
>> >>>I think he wants a table like this:
>> >>>
>> >>>+ John (in red)
>> >>>+ Mark (in blue)
>> >>>+ Nic (in green)
>> >>>+ Helios (in red)
>> >>>+ David (in blue)
>> >>>
>> >>>
>> >>>If you have an array of 3 colors named colors (I dont know but, maybe the
>> >>>set tag can build a mapping that works like an array...)
>> >>>
>> >>>Try this:
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>In the expression you're coding the round robin (increment and modulus 3)
>> >>>and the selection of the color based on the index.
>> >>>
>> >>>But, I didn't try it.  I hope the modulus is a valid construction in EL.
>> >>>
>> >>>At 11:05 04/08/2004 +0200, you wrote:
>> >>>
>> >>>
>> >>>>I'm not exactly sure what you mean with "rotate"?!
>> >>>>
>> >>>>Do you just have a collection that you want to iterate - with each each
>> >>>>entry corresponding to a "row" in the table? Or shall every row display
>> a
>> >>>>different "column" of your table? It's hard to understand from your
>> >>>>
>> >>>>
>> >>>examples..
>> >>>
>> >>>
>> >>>>For displaying tabular data, you should check out the
>> displaytag-library:
>> >>>>http://displaytag.sourceforge.net/  - it has nothing  to with jstl, but
>> >>>>gives you everything you will likely ever need for displaying tables...
>> >>>>
>> >>>>cheers
>> >>>>stf
>> >>>>
>> >>>>Nic Werner wrote:
>> >>>>
>> >>>>
>> >>>>>Greetings,
>> >>>>>   I have a table of data that I'd basically like to rotate, is this
>>

Re: Rotating tables?

2004-08-04 Thread David Schwartz
>>is this possible/smart in JSTL

May be possible but not smart.
Should be returned by the database & just displayed by JSTL.
You need a crosstab query. Which database are you using?


Quoting Helios Alonso <[EMAIL PROTECTED]>:

>> I think he wants a table like this:
>>
>> + John (in red)
>> + Mark (in blue)
>> + Nic (in green)
>> + Helios (in red)
>> + David (in blue)
>> 
>>
>> If you have an array of 3 colors named colors (I dont know but, maybe the
>> set tag can build a mapping that works like an array...)
>>
>> Try this:
>> 
>> 
>> 
>> 
>> 
>>
>> In the expression you're coding the round robin (increment and modulus 3)
>> and the selection of the color based on the index.
>>
>> But, I didn't try it.  I hope the modulus is a valid construction in EL.
>>
>> At 11:05 04/08/2004 +0200, you wrote:
>> >I'm not exactly sure what you mean with "rotate"?!
>> >
>> >Do you just have a collection that you want to iterate - with each each
>> >entry corresponding to a "row" in the table? Or shall every row display a
>> >different "column" of your table? It's hard to understand from your
>> examples..
>> >
>> >For displaying tabular data, you should check out the displaytag-library:
>> >http://displaytag.sourceforge.net/  - it has nothing  to with jstl, but
>> >gives you everything you will likely ever need for displaying tables...
>> >
>> >cheers
>> >stf
>> >
>> >Nic Werner wrote:
>> >>Greetings,
>> >>I have a table of data that I'd basically like to rotate, is this
>> >>possible/smart in JSTL?
>> >>Basically, I have an attribute with three colors, each one is a
>> >>different row in a table.
>> >>001 Blue data
>> >>001 Green data
>> >>002 Purple data
>> >>I want to have one row:001 | Blue Data | Green Data | Purple Data.
>> >>Any suggestions? Please help by pointing me elsewhere if you can
>> >>- Nic
>> >>
>> >>
>> >>-
>> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >--
>> >Stefan Frank
>> >iBioS - Intelligent BioInformatics Systems
>> >http://www.dkfz-heidelberg.de/ibios
>> >DKFZ - German Cancer Research Center
>> >Im Neuenheimer Feld 580
>> >69120 Heidelberg
>> >Tel.: +49 (0) 6221 42-3612
>> >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]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



Re: Trouble with JSP and Oracle sequences

2004-07-08 Thread David Schwartz
I would first constrain the sequence value...


Select main_id.NextVal as currentID From Dual


Then save it into a form var...



Now use this currentID value in your insert queries...


INSERT INTO main (main_id, project_id, selection )
VALUES (
,
, ? 
, ? 
 )


Once you have the mainID you can use it throughout the page.

Quoting Keith <[EMAIL PROTECTED]>:

>> First, here's my relevant code:
>>
>> > pattern="dd-MMM-" />
>>
>> 
>>
>> 
>> INSERT INTO main (
>>  main_id
>>  , project_id
>>  , selection
>> )
>> VALUES (
>>  main_id_seq.NEXTVAL
>>  , ? 
>>  , ? 
>> )
>> 
>>
>> 
>> INSERT INTO meeting_dates (
>>  main_id
>>  , meeting_date
>>  , meeting_type_id
>> )
>> VALUES
>>  main_id_seq.CURRVAL
>>  , ? 
>>  , ? 
>> )
>> 
>>
>> 
>>
>> The user is submitting the data via an HTML form. I need to use the same
>> sequence number
>> that was generated by the first  as the ID value in the second
>> .
>> But, I'm getting the following ORACLE error:
>>
>> ORA-00947: not enough values
>>
>> Looking through the Oracle documentation, it says the .CURRVAL option for a
>> sequence is
>> only available within the same session that the .NEXTVAL option was first
>> used. The only
>> thing I can think of that's happening is these two  are not
>> being done within
>> the same session, even thought they're in the same .
>> Therefore, the
>> .CURRVAL of the sequence is no longer available, thus throwing the above
>> error. Doing
>> something like this in an SQL*Plus session works perfectly fine and the
>> documentation
>> gives examples of multiple inserts being done like this, so I know it can be
>> done. But, I
>> don't know enough about what's going on behind the scenes in JSP to be able
>> to see if
>> that's what is causing the problem. Anyone able to shed a little light on
>> what might be
>> causing this? Thanks!
>>
>> Keith
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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



RE: servlet.jar location

2004-05-25 Thread David Schwartz
I'm not getting any errors at this point - but the servlets don't work. I
just get a blank page when calling servlets.
They are registered in web.xml & all jars are in common/lib.

Looks like this...


myHandler
stuff.myHandler


myHandler
    /myHandler


David Schwartz

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 25, 2004 7:57 AM
To: Tag Libraries Users List
Subject: RE: servlet.jar location

Any JAR files in common/lib are automatically available to TC and its apps.
See:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html

For an explanation of TC's class loading architecture. Can you provide some
detail about the errors you're getting?

Quoting David Schwartz <[EMAIL PROTECTED]>:

> Thanks.
> Does common/lib have to be in the classpath?
> I have them there but servlet still doesn't work. I'm wondering if the
> mapping in web.xml is dif between tomcat 4 & 5.
>
> David Schwartz
>
> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 25, 2004 7:33 AM
> To: Tag Libraries Users List
> Subject: Re: servlet.jar location
>
> common/lib/jsp-api.jar
> common/lib/servlet-api.jar
>
> Quoting David Schwartz <[EMAIL PROTECTED]>:
>
> > Where should servlet.jar be located for tomcat 5.0.24?
> >
> >
> > David Schwartz
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech   <http://www.dotech.com/>

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

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



RE: servlet.jar location

2004-05-25 Thread David Schwartz
Thanks.
Does common/lib have to be in the classpath?
I have them there but servlet still doesn't work. I'm wondering if the
mapping in web.xml is dif between tomcat 4 & 5.

David Schwartz

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 25, 2004 7:33 AM
To: Tag Libraries Users List
Subject: Re: servlet.jar location

common/lib/jsp-api.jar
common/lib/servlet-api.jar

Quoting David Schwartz <[EMAIL PROTECTED]>:

> Where should servlet.jar be located for tomcat 5.0.24?
>
>
> David Schwartz

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

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



servlet.jar location

2004-05-25 Thread David Schwartz
Where should servlet.jar be located for tomcat 5.0.24?


David Schwartz


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



RE: x:parse error - Cannot inherit from final class

2004-05-24 Thread David Schwartz
Hi Kris
That worked!
Thanks

David Schwartz

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 23, 2004 11:04 AM
To: Tag Libraries Users List
Subject: Re: x:parse error - Cannot inherit from final class

Where do you have Xerces/Xalan installed? If they're not in
$CATALINA_HOME/common/endorsed, try putting them there:

xalan.jar
xercesImpl.jar
xml-apis.jar

I'm also assuming you're running some flavor of JDK 1.4...

David Schwartz wrote:
> Just upgraded to tomcat 5.0.24.
> Getting error in x:parse. I have xerces 2.6.2.
>
> java.lang.VerifyError: Cannot inherit from final class
>   java.lang.ClassLoader.defineClass0(Native Method)
>   java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>  
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>   java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
>   java.net.URLClassLoader.access$100(URLClassLoader.java:54)
>   java.net.URLClassLoader$1.run(URLClassLoader.java:193)
>   java.security.AccessController.doPrivileged(Native Method)
>   java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>  
>
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader
> .java:485)
>  
>
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
> .java:820)
>  
>
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
> .java:721)
>   java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
>  
> org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(Unknown
> Source)
>   javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(Unknown
> Source)
>   org.apache.jsp.logon_jsp._jspx_meth_x_forEach_0(logon_jsp.java:279)
>   org.apache.jsp.logon_jsp._jspService(logon_jsp.java:171)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>  
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 98)
>  
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>
> David Schwartz

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

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



x:parse error - Cannot inherit from final class

2004-05-22 Thread David Schwartz
Just upgraded to tomcat 5.0.24.
Getting error in x:parse. I have xerces 2.6.2.

java.lang.VerifyError: Cannot inherit from final class
java.lang.ClassLoader.defineClass0(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:502)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
java.net.URLClassLoader.access$100(URLClassLoader.java:54)
java.net.URLClassLoader$1.run(URLClassLoader.java:193)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:186)

org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader
.java:485)

org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:820)

org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:721)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(Unknown
Source)
javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(Unknown
Source)
org.apache.jsp.logon_jsp._jspx_meth_x_forEach_0(logon_jsp.java:279)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:171)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


David Schwartz


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



RE: Custom Tags

2004-05-21 Thread David Schwartz
Thanks Wali.
That worked!
Solution: I copied the following web-app header from the samples.war.

http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">

This replaced my old  tag.

David Schwartz

-Original Message-
From: Wali Ansary [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 1:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Custom Tags

You need to use a web.xml for the latest version of the Servlet specs, since
you're using JSTL 1.1. I believe the new web.xml uses a xml-schema instead
of a DTD.

Wali


----Original Message Follows
From: David Schwartz <[EMAIL PROTECTED]>
Reply-To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
To: 'Tag Libraries Users List' <[EMAIL PROTECTED]>
Subject: RE: Custom Tags
Date: Fri, 21 May 2004 07:09:05 -0400

I upgraded to tomcat 5.0.24.
Now expressions are not being evaluated.

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"; %>




The code above displays ${xx}.
I have all jars in place.

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

_
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo


-
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: Custom Tags

2004-05-21 Thread David Schwartz
Do you have a sample?

David Schwartz
Array Software Inc.
www.arrayone.com

-Original Message-
From: Wali Ansary [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 1:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Custom Tags

You need to use a web.xml for the latest version of the Servlet specs, since
you're using JSTL 1.1. I believe the new web.xml uses a xml-schema instead
of a DTD.

Wali


Original Message Follows
From: David Schwartz <[EMAIL PROTECTED]>
Reply-To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
To: 'Tag Libraries Users List' <[EMAIL PROTECTED]>
Subject: RE: Custom Tags
Date: Fri, 21 May 2004 07:09:05 -0400

I upgraded to tomcat 5.0.24.
Now expressions are not being evaluated.

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"; %>




The code above displays ${xx}.
I have all jars in place.

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

_
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo


-
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: Custom Tags

2004-05-21 Thread David Schwartz
I upgraded to tomcat 5.0.24.
Now expressions are not being evaluated.

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"; %>




The code above displays ${xx}.
I have all jars in place.

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



Tomcat 5 JKHandler error

2004-05-16 Thread David Schwartz
I upgraded from tomcat 4.1.24 to 5.0.24.
When starting tomcat the following error is logged in stdout.log.

What causes this?

May 16, 2004 11:04:06 PM org.apache.commons.modeler.Registry
registerComponent
SEVERE: Error registering
Catalina:type=protocolHandler,className=org.apache.jk.server.JkCoyoteHandler
javax.management.MBeanRegistrationException: nested exception is
javax.management.ReflectionException: Cannot find Class for
org.apache.jk.core.JkHandlernested exception is
java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler
javax.management.ReflectionException: Cannot find Class for
org.apache.jk.core.JkHandlernested exception is
java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler
java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:854)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:721)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
org.apache.commons.modeler.BaseModelMBean.getAttributeClass(BaseModelMBean.j
ava:558)
at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:467)
at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanSer
verInterceptor.java:209)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer
verInterceptor.java:123)
at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanS
erverInterceptor.java:79)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer
verInterceptor.java:123)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer
verInterceptor.java:123)
at
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(Cont
extClassLoaderMBeanServerInterceptor.java:144)
at mx4j.server.MBeanServerImpl.invoke(MBeanServerImpl.java:1353)
at org.apache.jk.core.JkHandler.preRegister(JkHandler.java:174)
at
org.apache.jk.server.JkCoyoteHandler.preRegister(JkCoyoteHandler.java:529)
at
org.apache.commons.modeler.BaseModelMBean.preRegister(BaseModelMBean.java:13
97)
at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.registration(InvokerMB
eanServerInterceptor.java:150)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMB
eanServerInterceptor.java:113)
at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.registration(Security
MBeanServerInterceptor.java:128)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMB
eanServerInterceptor.java:113)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMB
eanServerInterceptor.java:113)
at
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.registratio
n(ContextClassLoaderMBeanServerInterceptor.java:108)
at
mx4j.server.MBeanServerImpl.registerImpl(MBeanServerImpl.java:1051)
at
mx4j.server.MBeanServerImpl.registerMBeanImpl(MBeanServerImpl.java:1002)
at
mx4j.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:978)
at
org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
at
org.apache.commons.modeler.Registry.registerComponent(Registry.java:346)
at
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1487)
at
org.apache.catalina.core.StandardService.start(StandardService.java:485)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

David Schwartz


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



Re: scriptlet variables and JSTL

2004-04-22 Thread David Schwartz
Try...

<% x = “hello” ...
request.setParameter(”x”, x);
%>


-Original Message-
From: "Karl Coleman" <[EMAIL PROTECTED]>
Date: Thu, 22 Apr 2004 08:01:16 
To:"Tag Libraries Users List" <[EMAIL PROTECTED]>
Subject: RE: scriptlet variables and JSTL

AFAIK, you have to use . I've yet to figure out how to do it otherwise.

Karl

-Original Message-
From: Anuj Agrawal [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 12:04 AM
To: [EMAIL PROTECTED]
Subject: scriptlet variables and JSTL


Because i'm unable to perform my required action via JSTL tags (or
other taglibs), i'm forced to use scriptlets within my JSP.

What i'd like to be able to do is use variables in the scriptlets, and
then output (or access) them via some core tags.  I read that for this
i have to use  .. but i must be doing something wrong
because it doesn't give me the required output.

Essentially i want to:


<% x = "hello"; %>


(I know i can use , but the above is a simplistic example.)

Thanks for any help.
Anuj.




__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-
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: Conditional Loop

2004-04-15 Thread David Schwartz
Also look at
http://asktom.oracle.com/pls/ask/f?p=4950:61:6135004253755051307P61_ID:2
64715428643


David Schwartz

-Original Message-
From: Keith [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 4:09 PM
To: Tag Libraries Users List
Subject: RE: Conditional Loop


Hmm... I think I get what you did now. Didn't click before. I'll try it out
tomorrow.

Thanks! :)

-- Original Message ---
From: David Schwartz <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
Sent: Thu, 15 Apr 2004 16:11:09 -0400
Subject: RE: Conditional Loop

> The query I sent will do exactly that!
> The sub-select with Count(Name) gives you the total number of product
names
> - that will correspond to your RowSpan amount.
>
> Since you want to display the Tech Type & Requirements beneath/within a
> given Product name just add an Order By clause to the sql...
>
> Order By t.Product_Name, t.Technology_Type etc.
>
> Now your result set has everything you need - the JSTL need only display
it.
>
> As for performance, with Oracle 9i the query should have sub-second
> processing time (you can also tune it once you get your desired result set
> working).
> If you find that it's too slow make sure you have an index on
Product_Name.
>
> David Schwartz
>
> -Original Message-
> From: Keith [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 15, 2004 3:25 PM
> To: Tag Libraries Users List
> Subject: RE: Conditional Loop
>
> Yes, it already is a lot of coding, so any working shortcut I can find is
> good. ;) But,
> some of the different columns in the DB are being combined into one column
> in the
> resulting HTML table (ex. a complete address), so the output is more
compact
> in the end.
> It's an Oracle 9i R2 database.
>
> Here's a hopefully clearer explination of what I'm trying to do...
>
> Some of the DB information is product names, technology types, and
> requirements with each
> of those 3 being stored in their own table (they get joined). Some
products
> have multiple
> technology types and requirements. Right now I have a  loop
> outputting each
> row. When a product name has multiple technology types or requirements, it
> puts them in
> their own, individual table row. So the same product name is being output
in
> multiple
> rows, but each row having a different technology or requirement.
>
> To avoid the multiple product name listings, I was trying to create
rowspans
> based on how
> many technologies or requirements a product had. So, the rowspan would be
> changing with
> each iteration through the loop. I was thinking that if I had a
conditional
> loop inside
> the  loop (before the row is output), checking to see how many
> technologies or
> requirements there were for the current product name in the loop, I could
> use that as a
> variable for the rowspan.
>
> This is complex problem, I know. But it's what I'm stuck trying to figure
> out. :p I admit
> I could be thinking about this in completely the wrong way. I'm still a
> novice
> programmer, so if anyone understands what I'm trying to do and has a
> different way to do
> it, I'd appreciate it!
>
> Thanks!
>
> -- Original Message ---
> From: David Schwartz <[EMAIL PROTECTED]>
> To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
> Sent: Thu, 15 Apr 2004 15:07:20 -0400
> Subject: RE: Conditional Loop
>
> > >> Isn't there any way to do this via JSTL and not in the DB query?
> > Maybe, but I'm not sure why you would want to. Seems like the
> functionality
> > you describe is a feature of the DB.
> > Also, with JSTL & 30+ columns could be a lot of coding.
> >
> > Do you have more specific example? What db?
> >
> > David Schwartz
> >
> > -Original Message-
> > From: Keith [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 15, 2004 2:28 PM
> > To: Tag Libraries Users List
> > Subject: RE: Conditional Loop
> >
> > Isn't there any way to do this via JSTL and not in the DB query? My
> example
> > was rather
> > simplistic for what I'm really doing, but still is a good example of the
> raw
> > data. I'm
> > using the resulting number in colspans and rowspans to build a nicer
table
> > layout
> > (displaying data only once that's repeated for several rows). I was
trying
> > to avoid sub
> > selects and such because I have anywhere from 30 and up columns that I'm
> > returning and
> > having to store a separate count variable for each one is getting
> > ri

RE: Conditional Loop

2004-04-15 Thread David Schwartz
The query I sent will do exactly that!
The sub-select with Count(Name) gives you the total number of product names
- that will correspond to your RowSpan amount.

Since you want to display the Tech Type & Requirements beneath/within a
given Product name just add an Order By clause to the sql...

Order By t.Product_Name, t.Technology_Type etc.

Now your result set has everything you need - the JSTL need only display it.

As for performance, with Oracle 9i the query should have sub-second
processing time (you can also tune it once you get your desired result set
working). 
If you find that it's too slow make sure you have an index on Product_Name.

David Schwartz

-Original Message-
From: Keith [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 3:25 PM
To: Tag Libraries Users List
Subject: RE: Conditional Loop

Yes, it already is a lot of coding, so any working shortcut I can find is
good. ;) But,
some of the different columns in the DB are being combined into one column
in the
resulting HTML table (ex. a complete address), so the output is more compact
in the end.
It's an Oracle 9i R2 database.

Here's a hopefully clearer explination of what I'm trying to do...

Some of the DB information is product names, technology types, and
requirements with each
of those 3 being stored in their own table (they get joined). Some products
have multiple
technology types and requirements. Right now I have a  loop
outputting each
row. When a product name has multiple technology types or requirements, it
puts them in
their own, individual table row. So the same product name is being output in
multiple
rows, but each row having a different technology or requirement.

To avoid the multiple product name listings, I was trying to create rowspans
based on how
many technologies or requirements a product had. So, the rowspan would be
changing with
each iteration through the loop. I was thinking that if I had a conditional
loop inside
the  loop (before the row is output), checking to see how many
technologies or
requirements there were for the current product name in the loop, I could
use that as a
variable for the rowspan.

This is complex problem, I know. But it's what I'm stuck trying to figure
out. :p I admit
I could be thinking about this in completely the wrong way. I'm still a
novice
programmer, so if anyone understands what I'm trying to do and has a
different way to do
it, I'd appreciate it!

Thanks!

------ Original Message ---
From: David Schwartz <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
Sent: Thu, 15 Apr 2004 15:07:20 -0400
Subject: RE: Conditional Loop

> >> Isn't there any way to do this via JSTL and not in the DB query?
> Maybe, but I'm not sure why you would want to. Seems like the
functionality
> you describe is a feature of the DB.
> Also, with JSTL & 30+ columns could be a lot of coding.
>
> Do you have more specific example? What db?
>
> David Schwartz
>
> -Original Message-
> From: Keith [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 15, 2004 2:28 PM
> To: Tag Libraries Users List
> Subject: RE: Conditional Loop
>
> Isn't there any way to do this via JSTL and not in the DB query? My
example
> was rather
> simplistic for what I'm really doing, but still is a good example of the
raw
> data. I'm
> using the resulting number in colspans and rowspans to build a nicer table
> layout
> (displaying data only once that's repeated for several rows). I was trying
> to avoid sub
> selects and such because I have anywhere from 30 and up columns that I'm
> returning and
> having to store a separate count variable for each one is getting
> ridiculous. I really do
> appreciate your time in replying, though!
>
> Keith
>
> -- Original Message ---
> From: David Schwartz <[EMAIL PROTECTED]>
> To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
> Sent: Thu, 15 Apr 2004 14:23:03 -0400
> Subject: RE: Conditional Loop
>
> > Try a sub select that returns the count...
> >
> > SELECT
> >
> > t.Primary_Key,
> > h.Name,
> > (Select Count(tt.Name) as Count_Name
> > FROM myTable tt
> > where tt.Name = t.Name
> > )
> > FROM myTable tt
> >
> > It's fast & returns all nesc data from the db.
> >
> > David Schwartz
> >
> > -Original Message-
> > From: Keith [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 15, 2004 1:45 PM
> > To: Taglibs
> > Subject: Conditional Loop
> >
> > Here's a generic scenario similar to my situation:
> >
> > A database with two columns, one being an auto-sequence number for the
> > prim

RE: Conditional Loop

2004-04-15 Thread David Schwartz
>> Isn't there any way to do this via JSTL and not in the DB query? 
Maybe, but I'm not sure why you would want to. Seems like the functionality
you describe is a feature of the DB.
Also, with JSTL & 30+ columns could be a lot of coding.

Do you have more specific example? What db?

David Schwartz

-Original Message-
From: Keith [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 2:28 PM
To: Tag Libraries Users List
Subject: RE: Conditional Loop

Isn't there any way to do this via JSTL and not in the DB query? My example
was rather
simplistic for what I'm really doing, but still is a good example of the raw
data. I'm
using the resulting number in colspans and rowspans to build a nicer table
layout
(displaying data only once that's repeated for several rows). I was trying
to avoid sub
selects and such because I have anywhere from 30 and up columns that I'm
returning and
having to store a separate count variable for each one is getting
ridiculous. I really do
appreciate your time in replying, though!

Keith



------ Original Message ---
From: David Schwartz <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
Sent: Thu, 15 Apr 2004 14:23:03 -0400
Subject: RE: Conditional Loop

> Try a sub select that returns the count...
>
> SELECT
>
> t.Primary_Key,
> h.Name,
> (Select Count(tt.Name) as Count_Name
> FROM myTable tt
> where tt.Name = t.Name
> )
> FROM myTable tt
>
> It's fast & returns all nesc data from the db.
>
> David Schwartz
>
> -Original Message-
> From: Keith [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 15, 2004 1:45 PM
> To: Taglibs
> Subject: Conditional Loop
>
> Here's a generic scenario similar to my situation:
>
> A database with two columns, one being an auto-sequence number for the
> primary key, the
> other listing names.
>
> 1   Bob
> 2   Bob
> 3   Jim
> 4   John
> 5   Jim
> 6   Bob
> 7   John
> 8   John
> 9   Jim
> 10  Bob
>
> Ok, I query the database to return both columns, since I need all the
stored
> data. But I
> also want to get the number of each unique name in the 'names' column (how
> many Jim's,
> how many Bob's, and how many John's). I know I could do a separate query
> looking for a
> count() on each unique name, but that's not realistic with the amount of
> data I'm dealing
> with (actually tried doing it and nearly killed the poor DB server).
>
> Normally, I'd do this with a 'while' conditional loop and a counter
> incrementing while
> the 'name' column contains a specific value, but I don't see that
> functionality in JSTL.
> I had asked generally before if JSTL had any 'while' loop capability, but
> got no
> response. So, I figured I'd give an example of what I'm trying to do and
> maybe someone
> could help.
>
> Thanks!
>
> Keith
>
> -
> 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]
--- End of Original Message ---


-
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: Conditional Loop

2004-04-15 Thread David Schwartz
That query will return the name & total counts but not the individual name
rows with primary key col (since you have a "Group By" clause).

David Schwartz

-Original Message-
From: Jon Archer [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 2:03 PM
To: Tag Libraries Users List
Subject: Re: Conditional Loop

Assuming your column with the names in is called NAME did you try this?

SELECT NAME, COUNT(NAME) FROM MY_TABLE GROUP BY NAME

Make sure you have an index on the NAME column.

Jon


On Thu, 2004-04-15 at 11:45, Keith wrote:
> Here's a generic scenario similar to my situation:
>
> A database with two columns, one being an auto-sequence number for the
primary key, the
> other listing names.
>
> 1   Bob
> 2   Bob
> 3   Jim
> 4   John
> 5   Jim
> 6   Bob
> 7   John
> 8   John
> 9   Jim
> 10  Bob
>
> Ok, I query the database to return both columns, since I need all the
stored data. But I
> also want to get the number of each unique name in the 'names' column (how
many Jim's,
> how many Bob's, and how many John's). I know I could do a separate query
looking for a
> count() on each unique name, but that's not realistic with the amount of
data I'm dealing
> with (actually tried doing it and nearly killed the poor DB server).
>
> Normally, I'd do this with a 'while' conditional loop and a counter
incrementing while
> the 'name' column contains a specific value, but I don't see that
functionality in JSTL.
> I had asked generally before if JSTL had any 'while' loop capability, but
got no
> response. So, I figured I'd give an example of what I'm trying to do and
maybe someone
> could help.
>
> Thanks!
>
> Keith
>
> -
> 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: Conditional Loop

2004-04-15 Thread David Schwartz
Try a sub select that returns the count...

SELECT 

t.Primary_Key,
h.Name,
(Select Count(tt.Name) as Count_Name
FROM myTable tt
where tt.Name = t.Name
)
FROM myTable tt

It's fast & returns all nesc data from the db.

David Schwartz

-Original Message-
From: Keith [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 1:45 PM
To: Taglibs
Subject: Conditional Loop

Here's a generic scenario similar to my situation:

A database with two columns, one being an auto-sequence number for the
primary key, the
other listing names.

1   Bob
2   Bob
3   Jim
4   John
5   Jim
6   Bob
7   John
8   John
9   Jim
10  Bob

Ok, I query the database to return both columns, since I need all the stored
data. But I
also want to get the number of each unique name in the 'names' column (how
many Jim's,
how many Bob's, and how many John's). I know I could do a separate query
looking for a
count() on each unique name, but that's not realistic with the amount of
data I'm dealing
with (actually tried doing it and nearly killed the poor DB server).

Normally, I'd do this with a 'while' conditional loop and a counter
incrementing while
the 'name' column contains a specific value, but I don't see that
functionality in JSTL.
I had asked generally before if JSTL had any 'while' loop capability, but
got no
response. So, I figured I'd give an example of what I'm trying to do and
maybe someone
could help.

Thanks!

Keith

-
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: Referencing scriptlet variable in expression language

2004-04-15 Thread David Schwartz
Try...

<%  String test = "Happy Days";
request.setAttribute( "test", test );
%>
test: ${test}

David Schwartz

-Original Message-
From: Derek [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 11:23 AM
To: [EMAIL PROTECTED]
Subject: Referencing scriptlet variable in expression language

This has got to be a really trivial thing, but this
doesn't work for me:

<% String test = "Happy Days"; %>

test: ${test}

I was expecting:

test: Happy Days

However, it just prints out blank.  I can make it work
by doing this:

<% String test = "Happy Days"; %>

test: ${test}

How do I reference a scriptlet variable directly in EL
without having to use ?  I must be missing
something simple.

Thanks!
Derek




=



   
   
__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

-
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: Recursive Functionality with Tags

2004-04-09 Thread David Schwartz
Oracle has built-in func to return a query result in hierarchy/tree format.
I'm not familiar with mySQL, but you should be able to write a query that
returns the tree then simply output in jstl.

David Schwartz

-Original Message-
From: Jeff Brewer [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 10:21 AM
To: Tag Libraries Users List
Subject: Re: Recursive Functionality with Tags

+-+--+--+-+-++
| Field   | Type | Null | Key | Default | Extra  |
+-+--+--+-+-++
| issue_id| int(11)  |  | PRI | NULL| auto_increment |
| name| varchar(255) | YES  | | NULL||
| description | text | YES  | | NULL||
| parent  | int(11)  | YES  | | NULL||
| public  | tinyint(4)   | YES  | | 1   ||
+-+--+--+-+-++
5 rows in set (0.01 sec)

"parent" is the "issue_id" number of the parent record
- Original Message -----
From: "David Schwartz" <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 10:37 AM
Subject: RE: Recursive Functionality with Tags


> Oracle?
>
> David Schwartz
>
> -Original Message-
> From: Jeff Brewer [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 09, 2004 10:12 AM
> To: Tag Libraries Users List
> Subject: Re: Recursive Functionality with Tags
>
> Yes
> - Original Message -
> From: "David Schwartz" <[EMAIL PROTECTED]>
> To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
> Sent: Friday, April 09, 2004 10:29 AM
> Subject: RE: Recursive Functionality with Tags
>
>
> > Is your item list coming from a database?
> >
> > David Schwartz
> >
> > -Original Message-
> > From: Jeff Brewer [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 09, 2004 10:00 AM
> > To: [EMAIL PROTECTED]
> > Subject: Recursive Functionality with Tags
> >
> > I'm new to Tags and still hip-deep in getting my first JSP project off
the
> > ground and very much appreciate all the great support in this forum.
Thank
> > You! My question is at the end of all this (in case you want to skip
over
> > the rest)...
> >
> > **BACKGROUND
> > I have an "outline" or "directory" type structure that consists of an
> > ArrayList that contains objects that have ArrayLists full of the same
kind
> > of objects that each have ArrayLists full of and so on. I want my
HTML
> > page to look something like this with each sub-item indented:
> >
> > FIRST ITEM
> >  FIRST SUB-ITEM
> >  SECOND SUB-ITEM
> >   FIRST SUB-ITEM
> >  THIRD SUB-ITEM
> > SECOND ITEM
> > THIRD ITEM
> >  FIRST SUB-ITEM
> > FOURTH ITEM
> >
> > **CURRENT SOLUTION
> > I made this work on my JSP page using the following code:
> >
> > <%
> >  // get the ArrayList from the request
> >  ArrayList al = (ArrayList) request.getAttribute("issuesList");
> > %>
> > <%=writeIssues(al, new String(), 50) // call the writeIssues function -
> > returns the outline%>
> > <%!
> > String writeIssues(ArrayList al, String myOutput, int indent) {
> > // sort the array list alphabetically
> > Collections.sort(al);
> >  Iterator iter = al.iterator();
> >  Issue myIssue = null;
> >  while (iter.hasNext()) {
> >   myIssue = (Issue) iter.next();
> >  // append the string with this issue title
> >   myOutput = new String(myOutput + " > indent + ";\">" + myIssue.getName() + "\n");
> >   // recurse by passing this issue's ArrayList, the ever-growing
> > string, and a new indent value
> >   myOutput = new String(writeIssues(myIssue.getChildren(),
> myOutput,
> > indent + 50));
> >  }
> >  return myOutput;
> >  }
> > %>
> >
> >
> > **QUESTION
> > Can I do this somehow in JSTL?
> >
> > -
> > 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]

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



RE: Recursive Functionality with Tags

2004-04-09 Thread David Schwartz
Oracle?

David Schwartz

-Original Message-
From: Jeff Brewer [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 10:12 AM
To: Tag Libraries Users List
Subject: Re: Recursive Functionality with Tags

Yes
- Original Message -
From: "David Schwartz" <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 10:29 AM
Subject: RE: Recursive Functionality with Tags


> Is your item list coming from a database?
>
> David Schwartz
>
> -Original Message-
> From: Jeff Brewer [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 09, 2004 10:00 AM
> To: [EMAIL PROTECTED]
> Subject: Recursive Functionality with Tags
>
> I'm new to Tags and still hip-deep in getting my first JSP project off the
> ground and very much appreciate all the great support in this forum. Thank
> You! My question is at the end of all this (in case you want to skip over
> the rest)...
>
> **BACKGROUND
> I have an "outline" or "directory" type structure that consists of an
> ArrayList that contains objects that have ArrayLists full of the same kind
> of objects that each have ArrayLists full of and so on. I want my HTML
> page to look something like this with each sub-item indented:
>
> FIRST ITEM
>  FIRST SUB-ITEM
>  SECOND SUB-ITEM
>   FIRST SUB-ITEM
>  THIRD SUB-ITEM
> SECOND ITEM
> THIRD ITEM
>  FIRST SUB-ITEM
> FOURTH ITEM
>
> **CURRENT SOLUTION
> I made this work on my JSP page using the following code:
>
> <%
>  // get the ArrayList from the request
>  ArrayList al = (ArrayList) request.getAttribute("issuesList");
> %>
> <%=writeIssues(al, new String(), 50) // call the writeIssues function -
> returns the outline%>
> <%!
> String writeIssues(ArrayList al, String myOutput, int indent) {
> // sort the array list alphabetically
> Collections.sort(al);
>  Iterator iter = al.iterator();
>  Issue myIssue = null;
>  while (iter.hasNext()) {
>   myIssue = (Issue) iter.next();
>  // append the string with this issue title
>   myOutput = new String(myOutput + " indent + ";\">" + myIssue.getName() + "\n");
>   // recurse by passing this issue's ArrayList, the ever-growing
> string, and a new indent value
>   myOutput = new String(writeIssues(myIssue.getChildren(),
myOutput,
> indent + 50));
>  }
>  return myOutput;
>  }
> %>
>
>
> **QUESTION
> Can I do this somehow in JSTL?
>
> -
> 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: Recursive Functionality with Tags

2004-04-09 Thread David Schwartz
Is your item list coming from a database?

David Schwartz

-Original Message-
From: Jeff Brewer [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 10:00 AM
To: [EMAIL PROTECTED]
Subject: Recursive Functionality with Tags

I'm new to Tags and still hip-deep in getting my first JSP project off the
ground and very much appreciate all the great support in this forum. Thank
You! My question is at the end of all this (in case you want to skip over
the rest)...

**BACKGROUND
I have an "outline" or "directory" type structure that consists of an
ArrayList that contains objects that have ArrayLists full of the same kind
of objects that each have ArrayLists full of and so on. I want my HTML
page to look something like this with each sub-item indented:

FIRST ITEM
 FIRST SUB-ITEM
 SECOND SUB-ITEM
  FIRST SUB-ITEM
 THIRD SUB-ITEM
SECOND ITEM
THIRD ITEM
 FIRST SUB-ITEM
FOURTH ITEM

**CURRENT SOLUTION
I made this work on my JSP page using the following code:

<%
 // get the ArrayList from the request
 ArrayList al = (ArrayList) request.getAttribute("issuesList");
%>
<%=writeIssues(al, new String(), 50) // call the writeIssues function -
returns the outline%>
<%!
String writeIssues(ArrayList al, String myOutput, int indent) {
// sort the array list alphabetically
Collections.sort(al);
 Iterator iter = al.iterator();
 Issue myIssue = null;
 while (iter.hasNext()) {
  myIssue = (Issue) iter.next();
 // append the string with this issue title
  myOutput = new String(myOutput + "" + myIssue.getName() + "\n");
  // recurse by passing this issue's ArrayList, the ever-growing
string, and a new indent value
  myOutput = new String(writeIssues(myIssue.getChildren(), myOutput,
indent + 50));
 }
 return myOutput;
 }
%>


**QUESTION
Can I do this somehow in JSTL?

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



RE: Finding a string within a string

2004-04-01 Thread David Schwartz
I made a mistake - using jstl 1.0

BTW - can I use 1.1 with Tomcat 4.1.24?

David Schwartz
Array Software Inc.
www.arrayone.com

-Original Message-
From: Johnson, Chris [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 3:43 PM
To: Tag Libraries Users List
Subject: RE: Finding a string within a string

If you use jstl 1.1 (the newest--there isn't a 1.2), then you can use
the EL functions.  There are two functions to do what you want:
fn:contains and fn:containsIgnoreCase.

-Original Message-
From: David Schwartz [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 3:03 PM
To: Jakarta Taglibs help (E-mail)
Subject: Finding a string within a string


I'm using jstl 1.2 with tomcat 4.1.24

Using the EL, is there a way to search for a "string within a string"?

For example, I want to find "there" in the string "hello there world".
(something like indexOf(String str) )

David Schwartz


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



Finding a string within a string

2004-04-01 Thread David Schwartz
I'm using jstl 1.2 with tomcat 4.1.24

Using the EL, is there a way to search for a "string within a string"?

For example, I want to find "there" in the string "hello there world".
(something like indexOf(String str) )

David Schwartz


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



RE: Single row query result

2004-04-01 Thread David Schwartz
Thanks Serge. Exactly what I needed!

David Schwartz

-Original Message-
From: Serge Knystautas [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 10:08 AM
To: Tag Libraries Users List
Subject: Re: Single row query result

David Schwartz wrote:
> Is it possible to output values from a query result that has only one row
-
> without usinf ?
> For example, I have many queries that will only return one row. Currently,
> if I want to output a column value I do...
>
> 
> output etc.
>
> 
>
> I'm looking for a more direct way to access the column value.



--
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. [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]



Single row query result

2004-04-01 Thread David Schwartz
Is it possible to output values from a query result that has only one row -
without usinf ?
For example, I have many queries that will only return one row. Currently,
if I want to output a column value I do...

 
output etc.



I'm looking for a more direct way to access the column value.

David Schwartz


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



Re: Result.getRowCount() in EL.

2003-12-15 Thread david . schwartz

try...




   
   
  "Antony Paul"
   
  <[EMAIL PROTECTED]To:   "Tag Libraries Users List" 
<[EMAIL PROTECTED]> 
  mail.com>cc: 
   
   Subject:  Result.getRowCount() in EL.   
   
  12/15/2003 09:42 
   
  AM   
   
  Please respond to
   
  "Tag Libraries   
   
  Users List"  
   
   
   
   
   




Hi,
How to access the method Result.getRowCount() in JSTL standard 1.0 EL.

rgds
Antony Paul.


-
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: using scripting variable in JSTL standard 1.0 EL

2003-12-15 Thread david . schwartz

Try this at the top...
<%String Mode = request.getParameter("Mode");
  pageContext.setAttribute( "Mode", Mode );
%>

then...




   
   
  "Antony Paul"
   
  <[EMAIL PROTECTED]To:   "Tag Libraries Users List" 
<[EMAIL PROTECTED]> 
  mail.com>cc: 
   
   Subject:  using scripting variable in 
JSTL standard 1.0 EL 
  12/15/2003 09:41 
   
  AM   
   
  Please respond to
   
  "Tag Libraries   
   
  Users List"  
   
   
   
   
   




Hi,
I have a page where a value is calculated at top of the page based on a
request parameter. It is an integer. Using normal JSP I could get this
varaible at another part in page. But if using JSTL do I have to set the
value first in pageContext then get the value using EL. Is this an
inefficent method ?. I am working on JSTL standard 1.0 Tomcat 4.27.  I have
only 2 weeks knowledge in JSTL and EL.

rgds
Antony Paul

-
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: How to obtain the check box value when using Display Tag

2003-12-09 Thread david . schwartz
What about JavaScript?




"Ravi Krishna" <[EMAIL PROTECTED]>
12/08/2003 11:31 PM
Please respond to "Tag Libraries Users List"

 
To: <[EMAIL PROTECTED]>
cc: 
Subject:How to obtain the check box value when using Display Tag


Hi All,

I am using Display Tag  to display a list in a table . I have a list of
check boxes in one column. In order to edit or delete a particular row  I
want to identify whether the check box in that row is clicked or not .
I am unable to identify the state of checkbox. Please help me.

regards,Ravi Krishna



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





XML Doc type problem

2003-11-26 Thread david . schwartz
I found the following post but there was no answer. Does anyone know?

I have created a JSP page that use the xml tag library, specifically using
xpath. Everything works perfectly fine as long as I don't have a doctype
definition like the following in my XML instance:



If I remove it, life is great, but if I don't, I get a java error like 
this:


Getting x:set var

2003-11-26 Thread david . schwartz
The following code displays [[rplyCode: null]].


<%= pageContext.getAttribute("Code") %>

Whats the proper way to access the "Code" variable value?

xml: setting to an xml file

2003-11-17 Thread david . schwartz
How can I set the xml to an xml file?
For example...


Thanks

Re: dbtags - question

2003-10-28 Thread david . schwartz
I use this...

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html






Peter Choe <[EMAIL PROTECTED]>
10/28/2003 08:26 AM
Please respond to "Tag Libraries Users List"

 
To: Tag Libraries Users List <[EMAIL PROTECTED]>
cc: 
Subject:Re: dbtags -  question


i thought i was using the standard taglibrary.  i downloaded the 
jakarata-taglibs.zip and used the jakarta-dbtags.jar file.

is there another standard tag library that i should get?  can you post 
the link for it?

thanks

Peter

[EMAIL PROTECTED] wrote:

>I had the same problem - when there were 0 rows returned by the query.
>I suggest you switch to the standard tag library - works much better.
>
>
>
>
>
>Adrian Beech <[EMAIL PROTECTED]>
>10/27/2003 06:33 PM
>Please respond to "Tag Libraries Users List"
>
> 
>To: "'Tag Libraries Users List'" 
<[EMAIL PROTECTED]>
>cc: 
>Subject:RE: dbtags -  question
>
>
>G'day Peter & list,
>
>I'm getting similar behavior with the SQL query string being included as
>part of the HTML text even though the SQL statement is definitely
>between  and  tags.  I posted a question about
>this last Sunday... alas though no response thus far from the list.
>
>The behavior is inconsistent in that I can remove the apps working
>directory (under work/standalone/localhost), restart Tomcat and in one
>instance the SQL statement is not shown but repeating the process a
>second or third time it will appear.  However in all cases the SQL
>statement will be included as part of the HTML when ever the page is
>reloaded and an empty result set is returned.  In my case I have an
>overdue page which is refreshed every 3 minutes.  This is how the
>problem first came to light when the page refreshed after it's initial
>load.
>
>This doesn't exactly help you with your problem.  Though it does
>highlight that something astray is going on.
>
>AB
>
>
>-Original Message-
>From: Peter Choe [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, 28 October 2003 6:11 AM
>To: Tag Libraries Users List
>Subject: Re: dbtags -  question
>
>
>the problem seems to be that if i use the session.getAttribute("sid"), 
>it will display the value on the browser even though it is between the 
> .
>
>so, i am not sure if this is a bug anyone has encountered before or if i
>
>am doing something wrong?
>
>a little help here.
>
>Peter Choe
>
>
>Manos Papantoniou wrote:
>
> 
>
>>I am not an expert, but it could be that when you refresh the page, the
>> 
>>
>
> 
>
>><%=request.getParameter("discipline")%> value is empty. Or it could be 
>>another variable that only has request-time life and not session-time 
>>life duration, so the contents of the variable are empty when the 
>>reload happens. Perhaps you want to experiment with changing some of 
>>your request.* methods to session.* if possible or at least inspecting 
>>their contents when you reload the page. Then again maybe somebody more
>> 
>>
>
> 
>
>>experienced in this forum might have a better idea
>>
>>
>>
>> - Original Message -
>> From: Peter Choe 
>> To: [EMAIL PROTECTED] 
>> Sent: Monday, October 27, 2003 6:04 PM
>> Subject: dbtags -  question
>>
>>
>> i am using dbtags library in my jsp file.
>>
>> i have the following set up:
>>
>> 
>> CourseDays of WeekTime
>> 
>>   SELECT crs_id, discipline, course_num, days_of_week,
>> time_slot FROM time_slots, wait_list_course WHERE 
>> time_slots.time_id=wait_list_course.t
>> ime_id AND is_available='Yes' AND discipline=? AND 
>> wait_list_course.semester=?
>>   > position="1"><%=request.getParameter("discipline")%>
>>   <%=semester%> 
>>   
>>  
>> 
>> 
>> 
>> 
>>
>>   SELECT added, removed FROM student_status
>> 
>>
>WHERE 
> 
>
>> crs_id=? AND student_id=? AND added is not null
>>  > 
>>
>position="1" 
> 
>
>> />
>>  > position="2"><%=(String)session.getAttribute("sid")%>
>>  
>>  
>>  > value="Add Me" onClick="getOn('', 
>> 'add')">
>>  Added
>>
>>   
>>   
>>   > colspan="4"><%=request.getParameter("discipline")%> currently has no 
>> courses available for wait list for <%=session.getAttribute(
>> "semester")%> semester.
>> 
>> > href="/registrar_appt/waitlist/menu.jsp">Back to main
>> 
>>
>menu
> 
>
>> 
>> 
>> 
>>
>> when i run the page in the web browser the value of the 
>>> position="2">
>> 
>>
><%=(String)session.getAttribute("sid")%> 
> 
>
>> is shown on the web browser.  but this doesn't occur on a constant 
>> basis.  if i refresh the page, the value is not shown.  is the syntax
>> 
>>
>
> 
>
>> correct or is there something i need to do to prevent the value from 
>> being processed by the web browser?
>>
>> Peter Choe
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>

RE: dbtags - question

2003-10-28 Thread david . schwartz
I had the same problem - when there were 0 rows returned by the query.
I suggest you switch to the standard tag library - works much better.





Adrian Beech <[EMAIL PROTECTED]>
10/27/2003 06:33 PM
Please respond to "Tag Libraries Users List"

 
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
cc: 
Subject:RE: dbtags -  question


G'day Peter & list,

I'm getting similar behavior with the SQL query string being included as
part of the HTML text even though the SQL statement is definitely
between  and  tags.  I posted a question about
this last Sunday... alas though no response thus far from the list.

The behavior is inconsistent in that I can remove the apps working
directory (under work/standalone/localhost), restart Tomcat and in one
instance the SQL statement is not shown but repeating the process a
second or third time it will appear.  However in all cases the SQL
statement will be included as part of the HTML when ever the page is
reloaded and an empty result set is returned.  In my case I have an
overdue page which is refreshed every 3 minutes.  This is how the
problem first came to light when the page refreshed after it's initial
load.

This doesn't exactly help you with your problem.  Though it does
highlight that something astray is going on.

AB


-Original Message-
From: Peter Choe [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 28 October 2003 6:11 AM
To: Tag Libraries Users List
Subject: Re: dbtags -  question


the problem seems to be that if i use the session.getAttribute("sid"), 
it will display the value on the browser even though it is between the 
 .

so, i am not sure if this is a bug anyone has encountered before or if i

am doing something wrong?

a little help here.

Peter Choe


Manos Papantoniou wrote:

>I am not an expert, but it could be that when you refresh the page, the

><%=request.getParameter("discipline")%> value is empty. Or it could be 
>another variable that only has request-time life and not session-time 
>life duration, so the contents of the variable are empty when the 
>reload happens. Perhaps you want to experiment with changing some of 
>your request.* methods to session.* if possible or at least inspecting 
>their contents when you reload the page. Then again maybe somebody more

>experienced in this forum might have a better idea
>
>
>
>  - Original Message -
>  From: Peter Choe 
>  To: [EMAIL PROTECTED] 
>  Sent: Monday, October 27, 2003 6:04 PM
>  Subject: dbtags -  question
>
>
>  i am using dbtags library in my jsp file.
>
>  i have the following set up:
>
>  
>  CourseDays of WeekTime
>  
>SELECT crs_id, discipline, course_num, days_of_week,
>  time_slot FROM time_slots, wait_list_course WHERE 
>  time_slots.time_id=wait_list_course.t
>  ime_id AND is_available='Yes' AND discipline=? AND 
>  wait_list_course.semester=?
>  position="1"><%=request.getParameter("discipline")%>
><%=semester%> 
>
>   
>  
>  
>  
>  
> 
>SELECT added, removed FROM student_status
WHERE 
>  crs_id=? AND student_id=? AND added is not null
> />
> position="2"><%=(String)session.getAttribute("sid")%>
>   
>   
> value="Add Me" onClick="getOn('', 
>  'add')">
>   Added
> 
>
>
>  colspan="4"><%=request.getParameter("discipline")%> currently has no 
>  courses available for wait list for <%=session.getAttribute(
>  "semester")%> semester.
>  
>href="/registrar_appt/waitlist/menu.jsp">Back to main
menu
>  
>  
>  
>
>  when i run the page in the web browser the value of the 
>   position="2">
<%=(String)session.getAttribute("sid")%> 
>  is shown on the web browser.  but this doesn't occur on a constant 
>  basis.  if i refresh the page, the value is not shown.  is the syntax

>  correct or is there something i need to do to prevent the value from 
>  being processed by the web browser?
>
>  Peter Choe
>
>
>  -
>  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]





Arrays with JSTL

2003-09-19 Thread david . schwartz
I'm trying to set array values using . Always returns 0. Help!

<%@ taglib prefix = "c" uri = "/WEB-INF/c.tld" %>

<%  int[] arrays = new int[1] ;
pageContext.setAttribute("arrays", arrays );
%>