Re: Conditional formatting elements of a collection in c:forEach

2009-02-11 Thread Martin Cooper
On Wed, Feb 11, 2009 at 8:53 AM, Rashmi  wrote:

> Hello everyone,
>
> I'm trying to display a list of items in a collection using JSTL.
>
> Each item in the collection has x, y, z and id variables.
>
> The user can choose whether he wants the display order (of the items
> in the collection) to be
>
> 1) x y z
> 2) z y x
>
> As far as I know the display ordering can be accomplished in two ways:
> 1) as shown in the code snippet below, create two different loops for
> each display format. The drawback with this approach is that a lot of
> the common stuff is duplicated between the two loops.
>
> 2) Have a c:choose , selection within a single loop, which decides
> between the two formats. The drawback is that the the same condition
> checking repeats for each loop iteration.
>
> Is there a way to set the formatting outside the loop , and use that
> format in the loop to address the two drawbacks above.


Assuming you have a resource bundle around somewhere, add two format strings
to the bundle, one for each of your two display orders; use a condition
('when', 'if' or whatever) to set a variable with the appropriate key; then
use that variable to specify the key to  within your loop.

--
Martin Cooper



> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
> 
>  
>
>  
>  
>
>
>
>
> ${item.x} ${item.y} ${item.z}
> show item
> edit item
> delete item
>
>
>
>
> ${item.z} ${item.y} ${item.x}
> show item
> edit item
> delete item
>
>
>
>  
> 
>
> Any input is appreciated.
>
> -Rashmi
>
> -
> To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org
>
>


Re: XTags download

2008-04-14 Thread Martin Cooper
On Mon, Apr 14, 2008 at 9:10 PM, Vijay <[EMAIL PROTECTED]> wrote:

> Hi Henri,
> Thanks for your reply, I have gone through these links
> http://jakarta.apache.org/taglibs/doc/xtags-doc/intro.html
> http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html
> and tried to do some simple xslt application with xtags, but i am unable
> to download tld fies from the download links specified. If xtags is
> deprecated, kindly let me know the latest release for the same.


XTags was deprecated in favour of JSTL, which includes XSLT functionality.

--
Martin Cooper



>
>
> Rgds,
> Vijay
>
>
> Henri Yandell wrote:
>
> > I think your only option is to check the code out from
> > http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated/xtags/trunk/
> > using subversion.
> >
> > I don't believe there was ever a release of xtags, and we've
> > subsequently deprecated it.
> >
> > Hen
> >
> > On Mon, Apr 14, 2008 at 5:32 AM, Vijay <[EMAIL PROTECTED]>
> > wrote:
> >
> >
> > > Hi there,
> > >
> > >  I am unable to download XTags i tried both these links
> > >  http://people.apache.org/builds/jakarta-taglibs/nightly/src/
> > >  http://people.apache.org/builds/jakarta-taglibs/nightly/
> > >  i get "page not found" error.
> > >  pls help me to download XTags.
> > >
> > >  Thank you,
> > >  Vijay.
> > >
> > >
> > >
> > >
> > >  -
> > >  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: c:url and context path completion

2007-11-28 Thread Martin Cooper
On Nov 28, 2007 1:43 PM, Trenton Adams <[EMAIL PROTECTED]> wrote:

> Martin Cooper wrote:
> > On Nov 28, 2007 1:01 PM, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >
> >
> >> Kris Schneider wrote:
> >>
> >>> On 11/28/07, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>> Kris Schneider wrote:
> >>>>
> >>>>
> >>>>> On 11/28/07, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> I was sure that I had read somewhere that " >>>>>> value="/images/pluslittle.gif"/>" usage would automatically cause
> the
> >>>>>> context path to be entered into the output of "c:url".  Is that not
> >>>>>> correct?  Because it's not working!
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> From the JSTL 1.1 Spec for :
> >>>>>
> >>>>> As a consequence, an implementation must prepend the context path to
> a
> >>>>> URL that starts with a slash (e.g. "/page2.jsp") so that such URLs
> can
> >>>>> be properly interpreted by a client browser.
> >>>>>
> >>>>> So, yes, the context should be prepended. What output are you
> actually
> >>>>>
> >> seeing?
> >>
> >>>>>
> >>>>>
> >>>> I'm seeing it produce "/images/pluslittle.gif", and it completely
> >>>> ignores the context path.  I'm using tomcat 6 and java 1.5
> >>>>
> >>>>
> >>> This wouldn't happen to be a JSP sitting in webapps/ROOT, would it?
> >>> Just checking...
> >>>
> >>>
> >>>
> >> No, it's sitting in "webapps/appname/WEB-INF/jsp/otherdir/somejsp.jsp"
> >>
> >
> >
> > Well, that's very likely the cause of what you're seeing. Anything under
> > WEB-INF is not permitted to be accessed directly (i.e. from outside the
> web
> > app itself), so the context is irrelevant for such files, since it could
> > never be used to access them.
> >
> >
> I don't think that is the problem, I do it all the time.  My servlet
> accesses the JSP's through dispatching.  The browser has no need to
> access my JSP files directly, which is why I put them in WEB-INF.
> Perhaps putting everything in WEB-INF is causing the problem, but
> definitely not for the reason you described.  But, I will be looking
> into this to see if putting my JSPs in WEB-INF is causing the problem or
> not.  But, I'm pretty darn sure this worked before.  But, then again,
> maybe it's because I never used anything other than the default context,
> so I never noticed before?!?!?!


Yeah, sorry, I realised a few seconds after I hit Send that I was being a
dope. I'm not sure if this demonstrates that taglibs knowledge "leaks" when
you don't use them for a while, or that I need to break for lunch... ;-)

--
Martin Cooper



> > --
> > Martin Cooper
> >
> >
> >
> >> -
> >> 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: c:url and context path completion

2007-11-28 Thread Martin Cooper
On Nov 28, 2007 1:01 PM, Trenton Adams <[EMAIL PROTECTED]> wrote:

> Kris Schneider wrote:
> > On 11/28/07, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >
> >> Kris Schneider wrote:
> >>
> >>> On 11/28/07, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>> I was sure that I had read somewhere that " >>>> value="/images/pluslittle.gif"/>" usage would automatically cause the
> >>>> context path to be entered into the output of "c:url".  Is that not
> >>>> correct?  Because it's not working!
> >>>>
> >>>>
> >>> From the JSTL 1.1 Spec for :
> >>>
> >>> As a consequence, an implementation must prepend the context path to a
> >>> URL that starts with a slash (e.g. "/page2.jsp") so that such URLs can
> >>> be properly interpreted by a client browser.
> >>>
> >>> So, yes, the context should be prepended. What output are you actually
> seeing?
> >>>
> >>>
> >>>
> >> I'm seeing it produce "/images/pluslittle.gif", and it completely
> >> ignores the context path.  I'm using tomcat 6 and java 1.5
> >>
> >
> > This wouldn't happen to be a JSP sitting in webapps/ROOT, would it?
> > Just checking...
> >
> >
> No, it's sitting in "webapps/appname/WEB-INF/jsp/otherdir/somejsp.jsp"


Well, that's very likely the cause of what you're seeing. Anything under
WEB-INF is not permitted to be accessed directly (i.e. from outside the web
app itself), so the context is irrelevant for such files, since it could
never be used to access them.

--
Martin Cooper


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


Re: Bug

2007-04-28 Thread Martin Cooper

Like I said before, make sure your web.xml file is referencing
Servlets 2.4or later. You can have all the latest software, but if
your
web.xml file is referencing an earlier version of the spec, it won't make
any difference.

--
Martin Cooper


On 4/28/07, Venu Madhav.Yelamanchili <[EMAIL PROTECTED]> wrote:


Rashmi Rubdi wrote:
> I'm sorry for mentioning a conflicting configuration of JSP, JSTL in
> my post above.
>
> The latest nightly release of DataGrid was on 20060829, which is much
> more recent than the thread I referred to above which was dated on
> 2004. So, please ignore my replies above.
>
> With very limited information of the problem it is difficult to offer
> a solution, as Martin has mentioned please provide relevant details.
>
> Post the versions JSP, Servlet, Web Server you are using.
>
> Also post full relevant code that will help us in recreating the
problem.
>
> -Rashmi
>
>
> On 4/28/07, Martin Cooper <[EMAIL PROTECTED]> wrote:
>> *item* or *items*? What is the *exact* error message, and what is the
>> *exact* syntax you are using?
>>
>> The "Runtime Expression Evaluation" column in the documentation
>> refers to
>> JSP scripting expressions, not the expression language you are using.
>>
>> If you're not already using JSP 2.x, I would recommending doing so and
>> ensuring that your web.xml file is referencing Servlets 2.4 and not an
>> earlier version.
>>
>> --
>> Martin Cooper
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
Am using JDK 5.0 and JEE 1.4 with
Servlet Spec:2.5
JSP spec:2.1
Server  : Apache Tomcat 5.5.17
JSTL:1.1
I tried to use one of your datagrid examples. But all the examples
showed the same problem. The code is shown below. The code fragment
marked in bold red gave problem for me.


   Jakarta Data Grid Taglib Example 4
   
 th a:link  { text-decoration: none; color: #3C4D81 }

 th a:visited   { text-decoration: none; color: #3C4D81 }

 .item  { background-color: #303D66; color: white;
font-weight: bold }

 .hiliterows{ background-color: #CDBD4F }

 .alternaterows { background-color: #D3C971; border: 1px solid #00
}

 .header{ background-color: #F4F7FC; border-top: 2px solid
#D7E1F2; border-bottom: 2px solid #D7E1F2 }

 .footer{ background-color: #F4F7FC; border-top: 2px solid
#D7E1F2; border-bottom: 2px solid #D7E1F2 }

 .datagrid  { border: 1px solid #AEBBD4; color: #3C4D81;
font-family: arial; font-size: 10pt; font-weight: bold }

   
   


Example 4

  
  
  
  
  
  


  
  
  
  


  
  
  
  


  
  
  
  


  
  

Back to index



--
Regards,

Venu madhav.Yelamanchili

Software Trainee

Miracle Software Systems

Email: [EMAIL PROTECTED]


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




Re: Bug

2007-04-28 Thread Martin Cooper

On 4/28/07, Venu Madhav.Yelamanchili <[EMAIL PROTECTED]> wrote:


Rashmi Rubdi wrote:
> Hi Venu,
>
> What version of JSTL are you using?
>
> This might be a configuration issue, according to the documentation
here:
>
>
http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/index.html#requirements
>
> "This custom tag library requires a servlet container that supports
> the JavaServer Pages Specification, version 1.2 or higher. It also
> requires the Jakarta JSTL Tag Libraries 1.0 and the Common Math
> Library 1.0."
>
> -Regards
> Rashmi
>
>
> On 4/28/07, Venu Madhav.Yelamanchili <[EMAIL PROTECTED]>
> wrote:
>>  Hi,
>>  I tried to use the datagrid tags provided by apache. I found a code
>> segment
>> like ui:dataGrid items="${alist}". But this is not working for me.
>> bcoz the
>> items attribute in gridtaglib is not accepting runtime expressions.
>> please
>> provide the correct usage of your grid taglibs. ?
>>
>> --
>> Regards,
>>
>> Venu madhav.Yelamanchili
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
Hi,
 Am using every thing according to specifications. After
opening link below

http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/index.html#requirements

go to TagReference. There in the first row it was given as attribute
items wont support  RunTime ExpressionEvaluation. But in the example
below that  table  it was given as

|
How is it possible. when i copied the same copied into my editor and
executed . I got an error which states that the attribute ITEM will not
accept
expressions.
|



*item* or *items*? What is the *exact* error message, and what is the
*exact* syntax you are using?

The "Runtime Expression Evaluation" column in the documentation refers to
JSP scripting expressions, not the expression language you are using.

If you're not already using JSP 2.x, I would recommending doing so and
ensuring that your web.xml file is referencing Servlets 2.4 and not an
earlier version.

--
Martin Cooper


--

Regards,

Venu madhav.Yelamanchili

Software Trainee

Miracle Software Systems

Email: [EMAIL PROTECTED]


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




Re: org.apache.taglibs.standard.tag.el.fmt.FormatDateTag question

2007-01-22 Thread Martin Cooper

On 1/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Thank you Rashmi. Yes, I found the FormatDateTag.class following your
suggestions...

My other question is since the way Daylight Savings Time changes in
2007, will this class need to be updated to reflect this change?



No, the fix for that will be in the JDK / JRE you use.

--
Martin Cooper


-Original Message-

From: Rashmi Rubdi [mailto:[EMAIL PROTECTED]
Sent: Monday, January 22, 2007 11:28 AM
To: Tag Libraries Users List
Subject: Re: org.apache.taglibs.standard.tag.el.fmt.FormatDateTag
question


The latest stable release is here:
http://www.apache.org/dist/jakarta/taglibs/standard/

Download:  jakarta-taglibs-standard-current.zip

After unzipping the file,  look under
\jakarta-taglibs-standard-current\jakarta-taglibs-standard-1.1.2\lib\

I think if you are upgrading standard.jar, you may also need to upgrade
jstl.jar - which is also in the same directory.

-Rashmi

- Original Message 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: taglibs-user@jakarta.apache.org
Sent: Monday, January 22, 2007 11:18:35 AM
Subject: org.apache.taglibs.standard.tag.el.fmt.FormatDateTag question


I did do a search before I post this message, I did not find what I am
looking for.

A project I am working on use tag libraries. In one of the tld files, it
has the following:


formatDate

org.apache.taglibs.standard.tag.el.fmt.FormatDateTag
...

I found the FormatDateTag.class in a jar file called standard.jar (maybe
renamed by a previous developer) on the server. The timestamp of
FormatDateTag.class is 7/19/2004.

I want to find an updated version of this jar file. I did not find
anything on this web site. Google did not give me much help either.

Where can I find an updated version for this jar file? What should I
download?

Thank you for your help,

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


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




Re: Var for c:forEach loop is always null

2006-12-11 Thread Martin Cooper

On 12/11/06, Neil Aggarwal <[EMAIL PROTECTED]> wrote:


Hello:

According to the c:forEach doc, the var attribute of the
c:forEach tag has nested visibility.

What does that mean?




From the spec:


"Nested scoped variables are only visible within the body of the action and
are stored in "page" scope."

I am trying to access the current object of the iteration

and always getting null.

Here is an example:

<[EMAIL PROTECTED] language="java" %>
<[EMAIL PROTECTED] import="java.util.*" %>
<[EMAIL PROTECTED] uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

<%
HashSet mySet = new HashSet();
mySet.add("Str1");
mySet.add("Str2");
mySet.add("Str3");
mySet.add("Str4");
mySet.add("Str5");
mySet.add("Str6");
mySet.add("Str7");

request.setAttribute("mySet",mySet);
%>


  <% String str = (String)request.getAttribute("str"); %>

<%= str %>


The value of str is always null.

How can I fix this?



Well, for starters, var is page scoped and not request scoped. But why are
you using JSTL for your loop and then using scripting expressions to access
the iterator values? If you use  or even just ${str}
you won't see this kind of problem.

--
Martin Cooper


Thanks,

Neil

--
Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


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




Re: Are there plans for a Jakarta implementation of the JSTL 1.2 spec

2006-10-17 Thread Martin Cooper

On 10/17/06, Joe Bohn <[EMAIL PROTECTED]> wrote:



Is there currently work underway on a Jakarta implementation of the JSTL
1.2 spec (JSR 52, JEE5 requirement)?



There isn't currently, and there isn't likely to be. JSTL development now
happens over in the Glassfish project.

--
Martin Cooper


Assuming there is (or soon will be), does somebody have a guesstimate on

when that might be available?

Thanks,
Joe


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




Re: Problem with DisplayTag

2006-06-21 Thread Martin Cooper

The Display tag library is not part of Jakarta Taglibs. It's an independent
tag library, with its own web site and its own mailing lists. See:

http://displaytag.sourceforge.net/11/

--
Martin Cooper


On 6/21/06, Juan Jose Lema Cundins <[EMAIL PROTECTED]> wrote:


Hi, I am using DisplayTag Library and I would like to hide the header
banner, I mean, the line which shows the number of obtained results.

Ex:
5 items found, displaying 1 to 3.
[First/Prev] 1, 2 [ Next/ Last]

I need delete "5 items found, displaying 1 to 3" and and keep
"[First/Prev] 1, 2 [ Next/ Last]"

Thank you in advance

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




Re: looping on a list of lists (or accessing custom attributes of a list)

2006-06-03 Thread Martin Cooper

On 6/3/06, Luca Passani <[EMAIL PROTECTED]> wrote:



Hi guys, here is my big problem today.

I have a list the items of two kinds (with and without icons) which gets
turned into a list of lists.

[x , x, y, x,y, y, y, y,x, x,y] becomes  [[x,x],[y],[x],[y,y,y,y],[x],[y]]

When I render the list of lists in my JSP, I need to understand which
kind of list it is I am dealing with.
That's when I had a brilliant idea.



Hmm... ;-)

Two suggestions:

1) Instead of extending ArrayList, just encapsulate it. In other words, add
a property to LinkWithIconList for the list, so that you can access the list
explicitly using ${sub_list.list} or something. This seems like the simplest
approach.

2) The Unstandard taglib in the Taglibs sandbox has an 'instanceOf' tag that
might be useful to you.

--
Martin Cooper


I defined to subclasses of ArrayList:


public class LinkWithIconList extends ArrayList {

public boolean isLinkWithIconList() {
return true;
}
public boolean isLinkWithoutIconList() {
return false;
}
}

(you can probably guess what the other class looks like :). And each
sublist is an object of the respective subclasses.
The rationale was to be able to do something like:



  
 
render list with icons

 
render list without icons

  


Unfortunately this doesn't work. ${sub_list.linkWithIconList} is
interpreted as an attempt to access to an item of the collection (and
not one of its properties):

javax.servlet.ServletException: The "." operator was supplied with
an index value of type "java.lang.String" to be
applied to a List or array, but that value cannot be converted to an
integer.

So,  the question for this respactable forum is:
- is there an easy way to achieve what I am trying to achieve?
- are there other ways to achieve my goals?

Thanks

Luca





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




Re: Runtime expressions with

2006-05-17 Thread Martin Cooper

On 5/17/06, Hassan Schroeder <[EMAIL PROTECTED]> wrote:


Robert Bowen wrote:

> No, "path = ${path} does not work. I am using JSTL 1.0 and Servlet 2.4.
>
> So can I do this? ...Without changing versions of JSTL / Servlet?

short answer: no. Though I'm not sure where that 


Uh, that would be HTML...

--
Martin Cooper


But if you're using a 2.4 deployment descriptor -- check what's at

the beginning of your application's web.xml -- upgrading to JSTL 1.1
is as simple as downloading and replacing a couple of jar files...

And well worth it, IMO -- replacing all those ``
statements with `${path}` cleans up a workspace most wonderfully :-)

FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



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




Re: Runtime expressions with

2006-05-17 Thread Martin Cooper

On 5/17/06, Robert Bowen <[EMAIL PROTECTED]> wrote:


Well how do you like that. Perhaps I should have mentioned I am a JSTL
newbie, but I guess you already got that.

No, "path = ${path} does not work. I am using JSTL 1.0 and Servlet 2.4.

So can I do this? ...Without changing versions of JSTL / Servlet?





--
Martin Cooper


Thanks buckets,

Bob

Hassan Schroeder <[EMAIL PROTECTED]> wrote: Robert Bowen wrote:
> Is this possible? According to the docs it is. But when I try the
following:
>
>
>
>
>
> The page fails saying File Not Found: '${path}'. Meaning it's not
> interpreting the path variable, but rather just spitting it back
> out as plain text. Yes, I have the core jstl libraries working
> properly, since the following statement:
>
> path is

is meaningless :-)  -- does

  path is ${path}

work? If not, you're not using JSTL 1.1 and/or Servlet 2.4, where
the *container* interprets/expands EL statements.

A more precise answer would be possible with actual information
about your configuration...

HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



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




-
How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
rates.



Re: problem with fn:substringBefore

2006-03-17 Thread Martin Cooper
On 3/17/06, Jean-Pierre Astier <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I've got a problem with this jsp code in NetBeans 5 :
>
> 
>   
>  ${fn:substringAfter
> (commerciaux,"__")}
>
> 
>  ${fn:substringAfter(commerciaux,"__")}
>  
> 
>
>
>
> This line :
>
> 
>
> get this error in netbeans :"equal symbol expected"
>
> Any ideas 


You have nested double quotes. Try changing the outer set of quotes to
single quotes.



--
Martin Cooper


Jean-Pierre Astier
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: JSTL-EL question (instanceOf)

2006-03-16 Thread Martin Cooper
On 3/16/06, Luca Passani <[EMAIL PROTECTED]> wrote:
>
> Martin Cooper wrote:
>
> >
> >Not with just EL, but see:
> >
> >
> http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#instanceOf
> >
> >
> >
> that seems powerful. Thanks. Is there an example of usage somewhere?
> how do I combine this with ?


Dunno. Sorry. I haven't used it, I just knew it was there. ;-)

--
Martin Cooper


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


Re: JSTL-EL question (instanceOf)

2006-03-16 Thread Martin Cooper
On 3/16/06, Luca Passani <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> here is my problem today. I am dealing with an API that I have not
> written and that is not very object oriented.
>
> I have a list of objects that have no common super class (or better,
> they have Object).
> In my JSP, which I would love to keep scriptlets-free, I need to loop
> through the list and treat each object differently depending on the
> type. Is there a way to do instanceOf using EL?


Not with just EL, but see:

http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#instanceOf

--
Martin Cooper



> 
> render my special class
> 
>:
>
> it should work on the same version of JSP supported by Tomcat 4 (1.2 if
> my memory doesn't fail me).
>
> Thanks
>
> Luca
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: File download custom tag or bean

2006-03-05 Thread Martin Cooper
Not a tag, but if you're using Struts, you can use DownloadAction:

http://struts.apache.org/struts-extras/apidocs/org/apache/struts/actions/DownloadAction.html

--
Martin Cooper


On 3/5/06, T. Lamine Ba <[EMAIL PROTECTED]> wrote:
>
> I know that you can download a file from a specific location within your
> webapp by writing a servlet using OutputStream services.  However, it
> has been done so many times, somebody must have created a custom tag or
> bean for this feature.
>
> Where can I find a custom tag or bean that would allow me to download
> PDF and PPT files from my webapp and via a dialog box that would allow
> you to either open the file from the browser or store it in your
> desktop?
>
> Thanks,
>
> Lamine.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: JSTL and test for file existence

2005-11-25 Thread Martin Cooper
On 11/25/05, Luca Passani <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> Is there a way to test for file existence with JSTL?


I don't believe so, and I'd be rather surprised if there was. Remember that
there is no guarantee that there even *is* a file system in a webapp
environment, so providing access to such a thing in a standard way doesn't
really make sense.

Of course, you can always create your own function to do this.

--
Martin Cooper


I would like to do something like:
>
> 
>" />
> 
>
> Thanks
>
> Luca
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: c:import for dynamic content

2005-11-03 Thread Martin Cooper
On 11/3/05, Robert Butera <[EMAIL PROTECTED]> wrote:
>
> I am attempting to import a JSP file into a JSP using the  tag.
>
> The line looks something like this:
> ...
> 
> ..
>
> "imported-file.jsp" is being found ok, but it is not being processed as a
> JSP, it is appearing as static text.


That's because, since you are using a file URL, the request is not being
made via HTTP, and thus is not being processed by a container as a JSP page
request. You'll need to use an HTTP (or HTTPS) URL to get the file processed
as JSP.

--
Martin Cooper


I am using some struts tags in "
> imported-file.jsp" that are just getting sent to the browser. Is there
> something I'm doing wrong here? Is there something I need to place around
> the  to make the imported file get processed?
>
> I am running this on jboss 4.0.1 (tomcat 5.0) with JSTL 1.1.
>
> Any help would be greatly appreciated.
>
> Rob
>
>


Re: Votes needed for a bug possibly affecting all tag libs which access the session. Definitely affecting JSTL and Session tag libs

2005-09-13 Thread Martin Cooper
Your crusade would do better to advocate fixing the issue in Tomcat, IMO, 
and therefore voting for the Tomcat bug instead (or in addition).

--
Martin Cooper


On 9/13/05, Wade Chandler <[EMAIL PROTECTED]> wrote:
> 
> Please see bug:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=36586
> 
> for more details. This definitely is affecting JSTL
> and Session tag libs. I have not looked through the
> source for the others.
> 
> Thanks,
> 
> Wade
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: JSTL TLD confusion

2005-09-07 Thread Martin Cooper
On 9/7/05, Woodchuck <[EMAIL PROTECTED]> wrote:
> 
> hihi all,
> 
> in the Struts (1.2.7) distribution it includes what i thought was
> everything you would need to use JSTL. namely, the standard.jar and
> jstl.jar (found under the struts/contrib/struts-el/lib folder).
> 
> however, these jars are missing functions.tld file.
> 
> then i discovered that the Jakarta Standard 1.1 Taglib distribution
> also comes with it's own versions of standard.jar and jstl.jar, and it
> has a fn.tld which contains the JSTL functions i want to use.



Struts 1.2.x ships with JSTL 1.0.2, which is why it's missing the functions 
taglib. That was only added in JSTL 1.1. 

also, i noticed the Struts JSTL tlds have URIs like this:
> http://java.sun.com/jstl/core
> 
> while the Jakarta Standard 1.1 Taglib JSTL have slightly different URIs
> like this:
> http://java.sun.com/jsp/jstl/core
> 
> which is the 'official' version we should be using? why are there such
> differences between these versions?


Because the JSTL spec defines different URLs for JSTL 1.0 and JSTL 1.1. ;-)

--
Martin Cooper


woodchuck
> 
> 
> 
> 
> __
> Click here to donate to the Hurricane Katrina relief effort.
> http://store.yahoo.com/redcross-donate3/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: JSTL, struts and pagination

2005-09-01 Thread Martin Cooper
On 8/31/05, Chandramohan Mani <[EMAIL PROTECTED]> wrote:
> 
> pagination is not a part of view...


I beg to differ. If you're going to divide the world up into M, V and C, it 
is certainly part of the view, since it has to do with which part of the 
model is being presented to the user, and how to navigate within a portion 
of model data.

This, and the first link from the comments, is an interesting discussion of 
Web MVC:

http://osteele.com/archives/2004/08/web-mvc

--
Martin Cooper


On 9/1/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> >
> > people, what's the elegant way to do pagination with JSTL?
> > I am using struts, my Action generates a LinkedList which a JSP page
> > is supposed to visualize:
> >
> > 
> > http://item.name> <http://item.name>}"/> />
> > 
> >
> >
> > I'd like the JSP to recognize long lists and split it in pages, possibly
> > with backward and forward navigation. I would really like to avoid
> > scriptlets.
> > BTW is pagination part of the view or is it part of the business logic
> > according to struts?
> >
> > Thanks
> >
> > Luca
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> Chandramohan Mani
> vMoksha Technologies.,
> [EMAIL PROTECTED]
> +91 (80) 25053500 ext 364
> 
> "Many of life's failure are people
> who did not realize how close
> they were to success when they
> gave up" - Thomas Edison
> 
>


Re: Views outside the servlet container

2005-08-31 Thread Martin Cooper
On 8/31/05, Karianne Berg <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> I'm not sure if this is the right forum to ask this question, but I'll try
> anyway. I'm working on an application that requires me to place some of 
> the
> JSPs outside of the servlet container, or at least in another context than
> the webapp itself. However, I can't find a way to do this. I have tried to
> use core:import, but this doesn't work, as the page at the url given is
> first rendered and then imported into the page. I need something that
> permits use of the variables sent to the including page in the included
> page. I tried with jsp:include, but this could only include pages in the 
> app
> context.
> 
> If anyone has any suggestions, I would greatly appriciate them.


This isn't exactly a taglibs question...

I'm pretty sure there's no way to do this. JSP pages compile to servlets, 
and those really need a servlet container around to operate properly.

One of the main purposes of web apps and war files is to make the 
applications self-contained, but it seems that's working against what you 
are trying to do. When you refer to "another context than the web app 
itself", what do you mean, exactly? If putting the presentation in a jar 
file that lives outside the web app meets this, and JSP is not mandatory, 
then you could try using Velocity instead, and putting the templates in a 
jar somewhere. Exactly where you can put this would depend on the particular 
servlet container you're using.

--
Martin Cooper


Best regards,
> Karianne Berg
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: JSTL and Java Constants

2005-08-31 Thread Martin Cooper
On 8/31/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> Martin Cooper wrote:
> 
> >
> >Done. I think. At least, everything seems to have worked out, so it 
> should
> >be available in the next nightly build of Unstandard.
> >
> >
> will I need to wait tomorrow to download? great. I am eager to try it.


Urk. I just checked, and it looks like Unstandard is not included in the 
nighly builds. Glenn, if you're reading this, could you add it please?

In the meantime, I've put my local build up here:

http://people.apache.org/~martinc/taglibs/unstandard/ 

One little doubt:
> 
> |
> 
> The constants are defined in an interface (not a class).
> ||
> public interface ContentType {
> 
> public static final int FOLDER = 1;||
> public static final int URL = 2;
> :
> }
> 
> 
> ||Will the tag work the same?


Yes, it will work the same.

--
Martin Cooper


Thanks
> 
> Luca
> ||
> |
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Rahul Akolkar <[EMAIL PROTECTED]> wrote:
> 
> On 8/30/05, Martin Cooper <[EMAIL PROTECTED]> wrote:
> > On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> > >
> > > Martin Cooper wrote:
> > >
> > > >
> > > >and then 'TheConstants' contains a map of all constants in the class, 
> so
> > > you
> > > >can use, for example:
> > > >
> > > >${TheConstants.URL}
> > > >
> > > >
> > > >
> > > bang on. That would be cool. I have worked my problem around in my
> > > application, but your solution would be better, since it would 
> decouple
> > > my action from the underlying API. Should I hold my breath?
> >
> >
> > Well, I might have a go at adding it tonight, if I have time. It's been 
> a
> > *long* time since I've tried to build Taglibs, though, so if I have 
> trouble
> > with that, it might not happen, since I don't want to break the nightly
> > builds.
> 
> 
> That can't stop us ;-) I'm happy to jump in, if needed.
> 
> However, couple of data points:
> 1) This issue is listed to be tackled in the EL 2.1-EDR [
> https://jsp-spec-public.dev.java.net/issues/show_bug.cgi?id=134 ]


That's fine. We can just show them how it should be done. ;-)

2) Another approach that some choose is to provide a "Constants" bean
> that supplies getters for the constants, which is what we ended up
> doing for the RDC taglib.


Isn't that effectively the same thing, once all is said and done? Wouldn't 
accessing a Constants bean be identical to accessing the constants from a 
map provided by this tag?

--
Martin Cooper


-Rahul
> 
> 
> >
> > --
> > Martin Cooper
> >
> >
> > Thanks
> > >
> > > Luca
> > >
> > >
> > > -
> > > 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: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Martin Cooper <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> > 
> > Martin Cooper wrote:
> > 
> > >
> > >and then 'TheConstants' contains a map of all constants in the class, 
> > so you
> > >can use, for example:
> > >
> > >${TheConstants.URL}
> > >
> > >
> > >
> > bang on. That would be cool. I have worked my problem around in my 
> > application, but your solution would be better, since it would decouple
> > my action from the underlying API. Should I hold my breath?
> 
> 
> Well, I might have a go at adding it tonight, if I have time. It's been a 
> *long* time since I've tried to build Taglibs, though, so if I have trouble 
> with that, it might not happen, since I don't want to break the nightly 
> builds.
> 

Done. I think. At least, everything seems to have worked out, so it should 
be available in the next nightly build of Unstandard.

--
Martin Cooper


--
> Martin Cooper
> 
> 
> Thanks
> > 
> > Luca
> > 
> > 
> > - 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
>


Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> Martin Cooper wrote:
> 
> >
> >and then 'TheConstants' contains a map of all constants in the class, so 
> you
> >can use, for example:
> >
> >${TheConstants.URL}
> >
> >
> >
> bang on. That would be cool. I have worked my problem around in my
> application, but your solution would be better, since it would decouple
> my action from the underlying API. Should I hold my breath?


Well, I might have a go at adding it tonight, if I have time. It's been a 
*long* time since I've tried to build Taglibs, though, so if I have trouble 
with that, it might not happen, since I don't want to break the nightly 
builds.

--
Martin Cooper


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


Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> Martin Cooper wrote:
> 
> >Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag 
> library.
> >See:
> >
> >
> http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind
> >
> >
> >
> interesting. Do you have an example of how that should be used?


I believe it's something like:



and then you can use 'TheConstant' when you want the value.

My useConstants tag works like this:



and then 'TheConstants' contains a map of all constants in the class, so you 
can use, for example:

${TheConstants.URL}

--
Martin Cooper


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


Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag library. 
See:

http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind

I have a useConstants tag that I've been meaning to donate that exposes all 
of the constants in a class, but I haven't got around to that yet.

--
Martin Cooper


On 8/30/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> 
> Hi there, here is my big problem today. I am using JSTL in some JSPs.
> SInce this is a struts project, I would
> like to keep my views totally separated from the Java APIs. For this
> reason, I need your advice about the
> most elegant to compare a given object "type" (an int constant) with the
> possible values using the COSTANT name,
> instead of the corresponding int.
> The API defines the types of my object as:
> 
> public interface ContentType {
> 
> public static final int FOLDER = 1;
> public static final int URL = 2;
> }
> 
> in my JSP I have (loop over collection of items with getType() returning
> the type int)
> 
> 
> 
> 
> http://item.name>
> }"/>
> 
> :
> 
> I would like to do something like:
> 
> a) 
> 
> This won't work. I could hack it around with a scriptlet and an import
> at the top of my JSP, but that seems to me like
> violating the separation between View and Control
> 
> b) I could do something like this in my action:
> 
> String type_url = "5";
> request.setAttribute("url", type_url);
> 
> and then 
> 
> but makes me wonder if having this code in the action really makes sense.
> 
> Any ideas?
> 
> Thanks
> 
> Luca
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: Urgent: urgent jstl foreach tag is not working

2005-08-25 Thread Martin Cooper
On 8/25/05, Dima Gutzeit <[EMAIL PROTECTED]> wrote:
> Actually it will work outside of  since it is EL expression.

Assuming a JSP 2.0 container, yes. Not on JSP 1.2, though (and of
course functions won't work in an earlier container, either). My guess
at this point is that Suneetha is not using a JSP 2.0 container, hence
the problems.

--
Martin Cooper


> - Original Message -
> From: "Long, Robert" <[EMAIL PROTECTED]>
> To: "Tag Libraries Users List" 
> Sent: Thursday, August 25, 2005 9:56 PM
> Subject: RE: Urgent: urgent jstl foreach tag is not working
> 
> 
> "None of tags will work .They will just print out ${amount} and
> {fn.length(pmts)} instead of values"
> 
> 
> I assume you're putting them within a  and not just expecting
> ${amount} to print something in the JSP.
> 
> 
> 
> 
> -Original Message-
> From: Kurakula, Suneetha (HCF) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 2:47 PM
> To: 'Tag Libraries Users List'
> Subject: RE: Urgent: urgent jstl foreach tag is not working
> 
> Hi,
> 
> I am sorry for pestering you. But I need your help desperately. Please
> let
> me clarify with you about my JSTL setup.
> 
> 1.Downloaded jakarta-taglibs-standard-1.1.2
> 2.Copied jstl.jsr,standard.jar to web-inf/lib
> 3.Copied tlds to web-inf/tlds folder
> 4.Added taglibs to web.xml as below
>  
>http://java.sun.com/jsp/jstl/core
>/WEB-INF/tlds/c.tld
>  
> 
>  
>http://java.sun.com/jsp/jstl/functions
>/WEB-INF/tlds/fn.tld
>  
> 
> If I use below tag uris
> <%@ taglib  uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%>
> 
> None of tags will work .They will just print out ${amount} and
> {fn.length(pmts)} instead of values
> 
> And if I use
> <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="fn"%>
> 
> 
> Alteast core  tags are working and prints values and function tags they
> just
> print {fn.length(pmts)}.
> 
> 
> Can anyone let me know if I am missing anything in my configuration?
> 
> Thanks
> Suneetha
> 
> 
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 3:29 PM
> To: Tag Libraries Users List
> Subject: Re: Urgent: urgent jstl foreach tag is not working
> 
> On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]>
> wrote:
> > Hi All,
> > Great.
> > Thank you very much . I got it resolved by adding getters method to my
> class
> > as suggested by Martin. Thanks Martin.
> >
> > I have one more problem. My core tags are working in the same page but
> > function tags values are not printing
> 
> That's because you're using JSTL 1.0 URIs but trying to use JSTL 1.1
> functionality. If you correct your URIs, it should work (assuming you
> actually have a JSTL 1.1 implementation).
> 
> --
> Martin Cooper
> 
> 
> > <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> > <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="fn"%>
> >
> > 
> > ${fn:length(tempStr)}
> > Payments length = ${fn:length(pmts)}
> >
> > Can anyone please help me out?
> >
> > Thanks,
> > Suneetha.
> >
> > -Original Message-
> > From: Martin Cooper [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 25, 2005 2:32 PM
> > To: Tag Libraries Users List
> > Subject: Re: Urgent: urgent jstl foreach tag is not working
> >
> > On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]>
> wrote:
> > > Hi Martin,
> > >
> > > Thanks for the response. I defined my
> > >
> > > Usebean for the class I am trying to access
> >
> > You don't need that. As I said, what you _do_ need is getters. Like:
> >
> >   public int getAmount() { return amount; }
> >
> > --
> > Martin Cooper
> >
> >
> > >  />
> .But
> > > still I am getting error
> > >
> > > javax.servlet.ServletException: An error occurred while evaluating
> custom
> > > action attribute "value" with value "${pmt.amount}": Unable to find
> a
> > value
> > > for "amount" in object of class
> "scinsurers.server.interfaces.Payment"
> > using
&g

Re: Urgent: urgent jstl foreach tag is not working

2005-08-25 Thread Martin Cooper
On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> Hi All,
> Great.
> Thank you very much . I got it resolved by adding getters method to my class
> as suggested by Martin. Thanks Martin.
> 
> I have one more problem. My core tags are working in the same page but
> function tags values are not printing

That's because you're using JSTL 1.0 URIs but trying to use JSTL 1.1
functionality. If you correct your URIs, it should work (assuming you
actually have a JSTL 1.1 implementation).

--
Martin Cooper


> <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="fn"%>
> 
> 
> ${fn:length(tempStr)}
> Payments length = ${fn:length(pmts)}
> 
> Can anyone please help me out?
> 
> Thanks,
> Suneetha.
> 
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 2:32 PM
> To: Tag Libraries Users List
> Subject: Re: Urgent: urgent jstl foreach tag is not working
> 
> On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> > Hi Martin,
> >
> > Thanks for the response. I defined my
> >
> > Usebean for the class I am trying to access
> 
> You don't need that. As I said, what you _do_ need is getters. Like:
> 
>   public int getAmount() { return amount; }
> 
> --
> Martin Cooper
> 
> 
> >  .But
> > still I am getting error
> >
> > javax.servlet.ServletException: An error occurred while evaluating custom
> > action attribute "value" with value "${pmt.amount}": Unable to find a
> value
> > for "amount" in object of class "scinsurers.server.interfaces.Payment"
> using
> > operator "." (null)
> >
> >
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> > mpl.java:848)
> >
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> > l.java:781)
> >
> >
> org.apache.jsp.view.unmatchedPayments_jsp._jspService(org.apache.jsp.view.un
> > matchedPayments_jsp:457)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > 22)
> >
> > 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:810)
> >
> >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> > va:81)
> >
> >
> > Thanks,
> > Suneetha.
> >
> > -Original Message-
> > From: Martin Cooper [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 25, 2005 2:18 PM
> > To: Tag Libraries Users List
> > Subject: Re: Urgent: urgent jstl foreach tag is not working
> >
> > You need to define getters for the properties you want to access via JSTL.
> >
> > --
> > Martin Cooper
> >
> >
> > On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]>
> wrote:
> > > Hello All,
> > >
> > >
> > >
> > > I would like to thank you all who answered my question . I have
> > > jakarta-taglibs-standard-1.1.2  jars and tlds copied onto my webserver.
> > But
> > > still  I am getting error when I run my jsp
> > >
> > >
> > >
> > > As you all suggested I fixed my  jsp syntactical errors and tag errors.
> > Here
> > > is my updated code.
> > >
> > >
> > >
> > > <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> > >
> > > <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="f"%>
> > >
> > >
> > >
> > > <%!
> > >
> > > public class Payment{
> > >
> > > public  int amount;
> > >
> > > public  String checkDate;
> > >
> > > public  int checkNumber;
> > >
> > > public Payment()
> > >
> > > {
> > >
> > > }
> > >
> > > public Payment(int amount,String checkDate,int
> > > checkNu

Re: Urgent: urgent jstl foreach tag is not working

2005-08-25 Thread Martin Cooper
On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> Hi Martin,
> 
> Thanks for the response. I defined my
> 
> Usebean for the class I am trying to access

You don't need that. As I said, what you _do_ need is getters. Like:

  public int getAmount() { return amount; }

--
Martin Cooper


>  .But
> still I am getting error
> 
> javax.servlet.ServletException: An error occurred while evaluating custom
> action attribute "value" with value "${pmt.amount}": Unable to find a value
> for "amount" in object of class "scinsurers.server.interfaces.Payment" using
> operator "." (null)
> 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> mpl.java:848)
> 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:781)
> 
> org.apache.jsp.view.unmatchedPayments_jsp._jspService(org.apache.jsp.view.un
> matchedPayments_jsp:457)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 22)
> 
> 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:810)
> 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> va:81)
> 
> 
> Thanks,
> Suneetha.
> 
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 2:18 PM
> To: Tag Libraries Users List
> Subject: Re: Urgent: urgent jstl foreach tag is not working
> 
> You need to define getters for the properties you want to access via JSTL.
> 
> --
> Martin Cooper
> 
> 
> On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> > Hello All,
> >
> >
> >
> > I would like to thank you all who answered my question . I have
> > jakarta-taglibs-standard-1.1.2  jars and tlds copied onto my webserver.
> But
> > still  I am getting error when I run my jsp
> >
> >
> >
> > As you all suggested I fixed my  jsp syntactical errors and tag errors.
> Here
> > is my updated code.
> >
> >
> >
> > <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> >
> > <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="f"%>
> >
> >
> >
> > <%!
> >
> > public class Payment{
> >
> > public  int amount;
> >
> > public  String checkDate;
> >
> > public  int checkNumber;
> >
> > public Payment()
> >
> > {
> >
> > }
> >
> > public Payment(int amount,String checkDate,int
> > checkNumber)
> >
> > {
> >
> > this.amount = amount;
> >
> > this.checkDate = checkDate;
> >
> > this.checkNumber = checkNumber;
> >
> > }
> >
> > }
> >
> > Payment pmtone = new Payment(100,"08/12/2005",1000);
> >
> > Payment pmttwo = new Payment(200,"08/13/2005",2000);
> >
> > Payment pmtthree = new Payment(300,"08/15/2005",3000);
> >
> > Payment[] pmts = {pmtone,pmttwo,pmtthree};
> >
> >
> >
> > %>
> >
> > <%
> >
> > pageContext.setAttribute("pmts",pmts);
> >
> > for(int i=0;i >
> > {
> >
> > System.out.println(pmts[i].amount);
> >
> > }
> >
> > %>
> >
> >
> >
> > 
> >
> > 
> >
> >
> > 
> >
> >
> >  > value="${pmt.checknumber}"/>
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > And now I am getting error
> >
> >
> >
> > javax.servlet.ServletException: An error occurred while evaluating custom
> > a

Re: Urgent: urgent jstl foreach tag is not working

2005-08-25 Thread Martin Cooper
You need to define getters for the properties you want to access via JSTL.

--
Martin Cooper


On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> Hello All,
> 
> 
> 
> I would like to thank you all who answered my question . I have
> jakarta-taglibs-standard-1.1.2  jars and tlds copied onto my webserver. But
> still  I am getting error when I run my jsp
> 
> 
> 
> As you all suggested I fixed my  jsp syntactical errors and tag errors. Here
> is my updated code.
> 
> 
> 
> <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> 
> <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="f"%>
> 
> 
> 
> <%!
> 
> public class Payment{
> 
> public  int amount;
> 
> public  String checkDate;
> 
> public  int checkNumber;
> 
> public Payment()
> 
> {
> 
> }
> 
> public Payment(int amount,String checkDate,int
> checkNumber)
> 
> {
> 
> this.amount = amount;
> 
> this.checkDate = checkDate;
> 
> this.checkNumber = checkNumber;
> 
> }
> 
> }
> 
> Payment pmtone = new Payment(100,"08/12/2005",1000);
> 
> Payment pmttwo = new Payment(200,"08/13/2005",2000);
> 
> Payment pmtthree = new Payment(300,"08/15/2005",3000);
> 
> Payment[] pmts = {pmtone,pmttwo,pmtthree};
> 
> 
> 
> %>
> 
> <%
> 
> pageContext.setAttribute("pmts",pmts);
> 
> for(int i=0;i 
> {
> 
> System.out.println(pmts[i].amount);
> 
> }
> 
> %>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  value="${pmt.checknumber}"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> And now I am getting error
> 
> 
> 
> javax.servlet.ServletException: An error occurred while evaluating custom
> action attribute "value" with value "${pmt.amount}": Unable to find a value
> for "amount" in object of class
> "org.apache.jsp.view.unmatchedPayments_jsp$Payment" using operator "."
> (null)
> 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> mpl.java:848)
> 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:781)
> 
> org.apache.jsp.view.unmatchedPayments_jsp._jspService(org.apache.jsp.view.un
> matchedPayments_jsp:464)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 22)
> 
> 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:810)
> 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> va:81)
> 
> root cause
> 
> 
> 
> 
> 
> Can anyone please help me out?
> 
> 
> 
> Thanks,
> 
> Suneetha.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

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



Re: How remove a request parameter

2005-08-16 Thread Martin Cooper
On 8/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> I read some parameters from html form requests using the variable
> 
>   ${param['propertyName']}
> 
> After the reading a need to remove the entry 'propertyName' or the value of
> ${param['propertyName']} should be changed to the empty string. Something
> like
> 
>   
> 
> doesn't work. What can I do? Thanks in advance,

As Muz pointed out, request parameters are immutable, since they are a
representation of the request as sent by the client. If you need to
modify them, you'll need to first copy them to some other location,
and then base your logic on the copy instead.

However, I suspect that there's likely a better solution to your
problem, so you might want to explain what it is that you are
ultimately trying to accomplish.

--
Martin Cooper


> ...Rolf
> 
> 
> -
> 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: Response in Firefox vs IE

2005-08-05 Thread Martin Cooper
On 8/5/05, Marius Botha <[EMAIL PROTECTED]> wrote:
> 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.

The first thing that strikes me is how amazingly slow each of these
steps is for just a couple of hundred rows! That suggests either slow
hardware or lots of opportunity to speed things up. ;-)

I won't try to help you optimise your database query - at least not on
this list - but that has to be possible too, unless it's horribly
complicated. Going from the result set to rendered HTML should be fast
too, unless you're doing a lot of computation along the way, but you
don't say what's involved there, so it's hard to tell what would
improve it. Finally, the browser rendering performance depends a great
deal on how you've structured your HTML, which again you haven't
actually told us about.

So basically, we're going to need more details to be of any help. ;-)

--
Martin Cooper


> Kind regards,
> 
> Marius Botha
> 
> 
> -
> 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: JSTL 1.0 problem with Bayern Ch 11 example...

2005-08-03 Thread Martin Cooper
On 8/3/05, Givler, Eric <[EMAIL PROTECTED]> wrote:
> I'm having a heck of a time trying to get the Bayern example from chapter 11 
> working, and I'm really not sure why
> 

It looks like there's a bug in your container. I just tried out your
code on Resin 3.0.14, and everything works as expected.

--
Martin Cooper


> I created an enterNumber.jsp page:
> 
> <%@ page contentType="text/html;charset=windows-1252"%>
> 
>   
> 
> untitled
>   
>   
>   
>   Enter your favorite number 
>   
>   
>   
> 
> 
> 
> I created an parseNumberCarefully.jsp page:
> 
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
> 
> 
>   
> parseNumberCarefully.jsp
>   
>   
> You entered ""
> 
>   
>   As far as I can tell, this corresponds to the number
> .
>   
>   If you multiply this number by 2 and add 1, you get
> . I like that number better.
>   
> 
> 
>Sorry, this doesn’t look like a number to me. Perhaps 
> you’re in the wrong country?
> 
>   
> 
> 
> 
> If I run the first page, enter a valid#, then click [submit], I get correct 
> results.
> If I run the first page, enter an invalid # (i.e. abcd), then click [submit], 
> I get correct results.
> However, if I enter an invalid#, click [back], then enter a valid number, I 
> keep getting parse errors.  It's as if the  keeps RECREATING the 
> parsingError exception on subsequent requests even though the data has 
> changed and is valid.
> 
> The reason I tried to do this simple example was that I was creating a 
> multi-record entry form, and trying to validate with JSTL.  When I did this, 
> as soon as the form would detect bad data, every record after it would be 
> considered "invalid data".  In these cases, I'd end up either clearing the 
> rest of the data, or it would retain the first "good data" and ovewrite all 
> subsequent records, or I'd get a stack trace.  I thought all of the code that 
> I was writing was "syntactically" correct, but it did not produce the results 
> that I wanted.
> 
> If parseNumberCarefully.jsp has an errorPage attribute defined, and you 
> remove the  tag, and enter an invalid value, an error page is 
> displayed. Now, if you hit [back] to goto the entry page, and enter a valid 
> value, it works fine.
> 
> What am I missing?
> 
> I'd appreciate any assistance on this.
> 
> I'm running this against Oc4J (oracle jdeveloper's embedded server) for 
> Jdeveloper 10g, version 10.1.2, on a Windows 2000 box.
> 
> 
> -
> 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 do this with JSTL

2005-07-26 Thread Martin Cooper
On 7/26/05, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> hello david
>   thanx for your reply...
> there's still something i am missing about this expression language..
> 
> labelProperty="description"/>
> 
> does this means that i have to have in the request
> - a parameter named "EXPENSE_TYPES"

An *attribute* named EXPENSE_TYPES, not a parameter.

If you want to use the name constant from your Java class, you might
want to look at the  tag in the Taglibs sandbox.

--
Martin Cooper


> - a parameter under a constant named EXPENSE_TYPES (whose real value
> can be anything..)?
> 
> i thought that also the second option will do...
> 
> thanks in advance and regards
>   marco
> 
> 
> 
> > > -Original Message-
> > > From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, July 25, 2005 12:08 PM
> > > To: Tag Libraries Users List
> > > Subject: how to do this with JSTL
> > >
> > >
> > > hello all,
> > >   i am trying to port my application from using struts tag
> > > towards using JSTL tags, but i got stuck in a point where i
> > > have to display a selectable list.. below was the original
> > > struts code..
> > >
> > > 
> > >   
> > >   
> > >
> > > Basically,thi swill lproduce a selectable list where the
> > > selected value is the one corresponding to thep roperty..
> > >
> > > am i correct that, if i want ot use JSTL, i have to use  a
> > > c:forEach for displaying the collection, and a c:if to test
> > > teh value for each value in teh collection?
> > >
> > > anyone can give any hints?
> > >
> > > thanx and regards
> > >   marco
> > >
> > > -
> > > 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: Optimizing tag-lib performance

2005-07-23 Thread Martin Cooper
On 7/23/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> Hello again,
> 
> I would like to improve the performance of a tag-lib I have created.

What I would recommend is extracting the "work" of your tags into
methods that do not depend on the container being around. Then you can
write simple JUnit tests for that code, and profile it without the
container.

For example, in your refactored code below, pull all of the code that
builds up the string buffer into a separate method, and then only do
the out.print() from the JSP API method.

--
Martin Cooper


> Some obvious optimizations would be to turn things like:
> ---
>  out.print(" href=\""+href+"\"");
>  //title is optional
>  if (!title.equals("")) {
> out.print(" title=\""+title+"\"");
> }
> ---
> into (is this what they call "string internalization"?):
> ---
> final static String HREF_ATT = " href=\"";
> final static String TITLE_ATT = " title=\"";
> :
>  StringBuffer sb = new StringBuffer();
>:
> sb.append(HREF_ATT);
>:
>  out.print(sb.toString());
> ---
> 
> Before I start applying these changes, though, I would like to be able
> to sort of measure the improvements.
> I tried something as basic as:
> 
> <%
>  long startTime = System.currentTimeMillis();
> 
> %><%@ taglib uri="/WEB-INF/tld/wall.tld" prefix="wall"
> %>
>   :
> 
>  
>http://url1"; title="Games">Games
>http://url2"; title="Horos">Horoscopes
>http://url1"; title="Kids">Kids
>http://url2";
> title="Movies">Movies
>http://url1"; title="Music">Music
>http://url2"; title="Radio">Radio
>http://url2"; title="TV">TV
>  
> 
> 
> <%
>  long stopTime = System.currentTimeMillis();
>  long elapsedTime = stopTime - startTime;
>  System.out.println(elapsedTime);
> %>
> 
> the problem is that when I reload the page,  the number of milliseconds
> is zero and occasionally 8,9 or 10
> (I see output in the tomcat console running on my laptop, so I am sure
> that the browser is not caching).
> 
> Questions:
> 
> - is there something I am getting basically wrong?
> - is my tag-lib optimized enough that I don't need to care about further
> optimization? possibly
>   because the compiler/JVM already did the optimization for me?
> - are there better ways/tools to measure tag-lib performance?
> 
> Thanks
> 
> Luca
> 
> 
> -
> 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: TagSupport vs BodyTagSupport

2005-07-23 Thread Martin Cooper
On 7/23/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> ooops, I felt this was a general taglib question, more than a Struts
> question. It only takes struts as an example,
> but the question is "is there a reason why it makes sense to always
> subclass BodyTagSupport in a tag-library?"

Sorry, I read it as "why are almost all of the Struts tags based on
BodyTagSupport?", which would be a question for the Struts list. But I
guess I'll go ahead and answer that anyway, since it's probably the
simplest way to answer what you're asking.

The reason is exactly what you noted - that almost all of the tags
extend BaseHandlerTag, which has quite a lot of stuff in it. We needed
a common base class so that we could share all of that code, and not
have to reimplement the common attributes for each tag, and since some
of the tags process their bodies, there's no alternative but for that
base class to extend BodyTagSupport. We could have used two base
classes, but that would have meant duplicating code, and would no
doubt have led to the tags getting out of sync.

Rahul mentioned SimpleTagSupport, and that would have been nice, but
that came along long after the Struts tags, and indeed the Struts tags
still need to support earlier versions of JSP.

Hope that helps.

--
Martin Cooper


> Luca
> 
> Martin Cooper wrote:
> 
> >Once again, please ask questions about Struts on the Struts mailing
> >lists, rather than here.
> >
> >--
> >Martin Cooper
> >
> >
> >On 7/23/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hello, I would love to hear about some taglib theory here.
> >>
> >>My understanding is that, when creating a new tag, I can inherit from
> >>either TagSupport or BodyTagSupport
> >>depending on whether I need to manipulate  the tag content or not.
> >>For this reason, most of my tags (WALL library) inherit from TagSupport
> >>with the exception of one (which inherits from BodyTag).
> >>Looking at the code for the Struts html tag-lib, I see that most tag
> >>inherit from BaseHandlerTag (which looks
> >>totally reasonable to me), which, in turn, inherits from BodyTagSupport,
> >>even for tags that have no particular reason to do so,.
> >>
> >>in fact, in moost cases, doAfterBody() ends up doing domething as simple as,
> >>
> >> if (bodyContent != null) {
> >>String value = bodyContent.getString().trim();
> >>if (value.length() > 0) {
> >>text = value;
> >>}
> >>}
> >>
> >>i..e,  just comsmetic for the returned source markup.
> >>
> >>My question is, in general, what is the rationale for inheriting from
> >>BodyTagSupport everywhere?
> >>what is the performance hit when inheriting from BodyTagSupport as
> >>compared to TagSupport?
> >>
> >>Thank you
> >>
> >>Luca
> >>
> >>
> >>
> >>
> 
> 
> -
> 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: TagSupport vs BodyTagSupport

2005-07-23 Thread Martin Cooper
Once again, please ask questions about Struts on the Struts mailing
lists, rather than here.

--
Martin Cooper


On 7/23/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> Hello, I would love to hear about some taglib theory here.
> 
> My understanding is that, when creating a new tag, I can inherit from
> either TagSupport or BodyTagSupport
> depending on whether I need to manipulate  the tag content or not.
> For this reason, most of my tags (WALL library) inherit from TagSupport
> with the exception of one (which inherits from BodyTag).
> Looking at the code for the Struts html tag-lib, I see that most tag
> inherit from BaseHandlerTag (which looks
> totally reasonable to me), which, in turn, inherits from BodyTagSupport,
> even for tags that have no particular reason to do so,.
> 
> in fact, in moost cases, doAfterBody() ends up doing domething as simple as,
> 
>  if (bodyContent != null) {
> String value = bodyContent.getString().trim();
> if (value.length() > 0) {
> text = value;
> }
> }
> 
> i..e,  just comsmetic for the returned source markup.
> 
> My question is, in general, what is the rationale for inheriting from
> BodyTagSupport everywhere?
> what is the performance hit when inheriting from BodyTagSupport as
> compared to TagSupport?
> 
> Thank you
> 
> Luca
> 
> 
> 
> 
> -
> 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: Integrating Struts with my taglib

2005-07-20 Thread Martin Cooper
On 7/19/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> Martin Cooper wrote:
> 
> >
> >Pointer 1 would be to ask about this on the Struts lists rather than
> >the Taglibs lists, since the Struts taglibs are part of, uh, Struts,
> >not Taglibs. ;-)
> >
> >
> you are right of course. It's just that I knew that you (one of the
> major authors behind the Struts taglibs)
> are on this list too :)

Um, I'm also on the Struts lists, believe it or not... ;-)

> >Pointer 2 would be to create your tag by extending the Struts
> > tag. See:
> >
> >http://struts.apache.org/userGuide/struts-html.html#link
> >
> >
> this does not really apply, I am afraid. WALL is for creating apps for
> mobile devices,
> i.e. multiserving WML, XHTML-MP and CHTML to mobile devices, i.e. not HTML.
> 
> http://wurfl.sourceforge.net/java/tutorial.php
> 
> Please note that  could turn into an hyperlink for
> some devices and
> into an  for other (WML) devices.
> There is no point for me requiring that WALL users install Struts.The to
> things are independent.
> What I really want is to mimic in my tag what html:link does behind the
> scenes to turn the link to an action
> into an actual link.

You probably want to look at the way the Struts tags are implemented,
and especially the latest code in 'trunk'. The code you want has most
likely already been extracted into the RequestUtils and TagUtils
classes, outside the tags themselves.

--
Martin Cooper


> Thanks
> 
> Luca
> 
> 
> 
> 
> 
> -
> 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: Integrating Struts with my taglib

2005-07-19 Thread Martin Cooper
On 7/19/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> Hello,
> 
> I have developed a JSP tag-library to fix mark-ups on mobile phones (WALL).
> Some people are using it with struts and they request that my anchor tag
>  integrates with Struts by being able to mimic the behavior of
> the struts
>  tag:
> http://struts.apache.org/userGuide/struts-html.html#link
> 
> question: where do I start?
> 
> right now I use my tag like this:
> 
> Text
> 
> how do I integrate this so that I can do things like:
> 
> Add An Employee
> 
> I'm ready to do my reading, but a few pointers in the right direction
> would definitely help.

Pointer 1 would be to ask about this on the Struts lists rather than
the Taglibs lists, since the Struts taglibs are part of, uh, Struts,
not Taglibs. ;-)

Pointer 2 would be to create your tag by extending the Struts
 tag. See:

http://struts.apache.org/userGuide/struts-html.html#link

--
Martin Cooper


> Thanks
> 
> Luca
> 
> 
> 
> -
> 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: Simple (but free) calendar tag library

2005-07-17 Thread Martin Cooper
On 7/17/05, Thomas Gaudin <[EMAIL PROTECTED]> wrote:
> Hi folks,
> 
> I've been searching for quite some time and I haven't been able to find
> a free JSP tag library to display calendars.
> I found some, but none was flexible enough to handle all the calendars I
> had to cope with in some projects.
> So I created mine : http://www.thogau.net/myFuse/tgcalendar/
> It is simple, customizable and free.
> 
> After the announcement, the question :
> I want to distribute it under apache licence 2.0.
> I put the license.txt file found on apache website in the root of the
> downloadable archive, is it enough or do I have to do something else?

See the instructions on the web site:

http://www.apache.org/dev/apply-license.html

--
Martin Cooper


> Cheers,
> 
> thogau
> 
> 
> -
> 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: URL for String TagLib source code

2005-07-15 Thread Martin Cooper
On 7/15/05, Robert Taylor <[EMAIL PROTECTED]> wrote:
> Thanks Martin, but at the risk of sounding ignorant.
> 
> The last source link is labeled "archives..." (not very intuitive)
> I clicked on it and then downloaded the file:
> "jakarta-taglibs-string-current.zip "

Sorry, I hadn't realised that what I wrote could be parsed differently
from how I was thinking about it. ;-) I was trying to say "oh, you
_would_ have to go and choose the _last_ link, wouldn't you??",
meaning that, of the three links with "Source" in them in the
Downloads section, the last one is the only one that does _not_ work!
The other two do work, as Rahul has mentioned rather more clearly than
I did.

--
Martin Cooper


> This appears to be a binary distribution.
> 
> /robert
> 
> 
> 
> Martin Cooper wrote:
> > On 7/15/05, Robert Taylor <[EMAIL PROTECTED]> wrote:
> >
> >>It seems I'm having difficulty finding the source code for the String
> >>Taglib.
> >>
> >>I go here:
> >>http://jakarta.apache.org/taglibs/index.html#Downloads
> >>
> >>Click on the link labeled as
> >>"http://jakarta.apache.org/site/sourceindex.html.";.
> >
> >
> > You would choose the *last* source link in that section. ;-) Both of
> > the previous source links will get you the source code, for Taglibs
> > and Taglibs Sandbox. Alternatively, you can retrieve the sources
> > directly from Subversion at:
> >
> > http://svn.apache.org/repos/asf/jakarta/taglibs/
> >
> > --
> > Martin Cooper
> >
> >
> >
> >>Which directs me to http://jakarta.apache.org/site/downloads/index.html.
> >>
> >>I click on Taglibs and am taken here:
> >>http://jakarta.apache.org/site/downloads/downloads_taglibs.html
> >>
> >>I click on String Taglib and am taken here:
> >>http://jakarta.apache.org/site/downloads/downloads_taglibs-string.cgi
> >>
> >>But do not see a source code distribution.
> >>
> >>Any ideas?
> >>
> >>/robert
> >>
> >>
> >>
> >>-
> >>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: URL for String TagLib source code

2005-07-15 Thread Martin Cooper
On 7/15/05, Robert Taylor <[EMAIL PROTECTED]> wrote:
> It seems I'm having difficulty finding the source code for the String
> Taglib.
> 
> I go here:
> http://jakarta.apache.org/taglibs/index.html#Downloads
> 
> Click on the link labeled as
> "http://jakarta.apache.org/site/sourceindex.html.";.

You would choose the *last* source link in that section. ;-) Both of
the previous source links will get you the source code, for Taglibs
and Taglibs Sandbox. Alternatively, you can retrieve the sources
directly from Subversion at:

http://svn.apache.org/repos/asf/jakarta/taglibs/

--
Martin Cooper


> Which directs me to http://jakarta.apache.org/site/downloads/index.html.
> 
> I click on Taglibs and am taken here:
> http://jakarta.apache.org/site/downloads/downloads_taglibs.html
> 
> I click on String Taglib and am taken here:
> http://jakarta.apache.org/site/downloads/downloads_taglibs-string.cgi
> 
> But do not see a source code distribution.
> 
> Any ideas?
> 
> /robert
> 
> 
> 
> -
> 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: combining tags

2005-07-06 Thread Martin Cooper
On 7/6/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "Tom Holmes Jr." <[EMAIL PROTECTED]>
> 
> > I have no idea if it is a JSP Container 2.0 or not.  I can tell you that
> > we are using IBM Websphere 5.1.x Portal Server.
> 
> A quick Google search didn't turn up the info-- I'm trying to determine
> which version of the Servlet specification it implements.  My comment was
> merely that if it's Servlet 2.4/JSP 2.0, you probably would have written
> ${data.roomType}
> instead of .  Not that you wouldn't use
> *any*  tags.
> 
> So, let's assume Servlet 2.3/JSP 1.2 for now.

That would be the correct assumption. ;-) WebSphere 5.x is Servlet
2.3/JSP 1.2, while WebSphere 6.x is Servlet 2.4/JSP 2.0.

> > And we are using Struts.   My boss has told me at one point that he'd
> > wanted to start using JSTL tags more then the older JSP Tag Libraries.
> > To me, that means using more of the  tags, but we still need to use
> > html:? tags.
> 
> My point was that if you're going to add JSTL to a Struts project, you might
> also want to move to Struts-EL in order to gain the ability to use
> expressions within the Struts tags, as well as the JSTL-awareness so that
> indexed properties will work within an enclosing  loop.
> http://struts.apache.org/faqs/struts-el.html

Yep, you'll definitely want to move to the Struts-EL tags. It could
get quite confusing, trying to use the RT tags while you're using JSTL
elsewhere.

--
Martin Cooper


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



[ANNOUNCEMENT] Proposal For Jakarta Sub Project For Web Application Components (fwd)

2005-06-22 Thread Martin Cooper



-- Forwarded message --
Date: Wed, 22 Jun 2005 22:48:24 +0100
From: robert burrell donkin <[EMAIL PROTECTED]>
Reply-To: Jakarta General List 
To: commons-user@jakarta.apache.org,
Jakarta Commons Developers List 
Cc: Jakarta General List 
Subject: [ANNOUNCEMENT] Proposal For Jakarta Sub Project For Web Application
Components

There has been considerable interest over the last few weeks and months
concerning the possibility of a new Jakarta sub project similar to the
Jakarta Commons but aimed at independent reusable web application
components.

There are a number of matters which need to be discussed and ideas
developed. Anyone who is interested is invited to subscribe to the
general list at Jakarta (http://jakarta.apache.org/site/mail.html).

A start has been made at documenting some of these:
http://wiki.apache.org/jakarta/CreatingCommonsForWebComponents.

- robert


-
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: whats up with sql:param

2005-06-16 Thread Martin Cooper
The first thing I would try is taking everything out of the
 except the query string itself and the 
element, so that you're left with:


insert into test_table (testnumber_id) values (?)



--
Martin Cooper


On 6/16/05, Gokhan <[EMAIL PROTECTED]> wrote:
>   Hello,
> 
> I just need to approve just something in site without disturbing general
> MVC logic.
> And decided JSTL sql:query facility.
> 
> I am in test.jsp and i can send user to another page with
> Another Page
> And on another_page.jsp i just need to insert this testnumber to table
> as a parameter.
> 
> I can see the value with . yes
> exactly i can see the number 2 on there.
> it means i can get this value from param.testnumber right?
> 
> When i want to assign this value to sql query
> 
> 
> insert into test_table (testnumber_id) values (?)
> 
>  //Since it is
> integer
> 
> 
> or with <%request.getParameter("testnumber");%>
> or with 
> or assign variable directly to the page scope and get it from there with
> 
> 
> 
> At the end of the all bloody ways i tried, i have this lovely error;
> ERROR: null value in column "testnumber_id" violates not-null constraint
> Because nothing inside of this lovely testnumber variable.
> If i could have type conversion error i would be really happy, but i
> have null.
> 
> My question is, if this variable param.testnumber is empty or null how
> can i see the value of this parameter with c:out ?
> If i can see this bloody value how i can't insert it to the table with
> sql:param with the methods above.
> 
> Would it be related to _rt stuff or something?
> I am using latest jstl 1.1.2 taglibs
> 
> Take care all,
> Gokhan
> 
> 
> -
> 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: DisplayTag - Table header and Option All

2005-05-11 Thread Martin Cooper
Um, stupid question, but do any of these questions have anything to do 
with Jakarta Taglibs? If so, perhaps you could be more explicit about 
which tag libraries you are asking about?

--
Martin Cooper
On Thu, 12 May 2005, Thinh Nguyen wrote:
Hi all,
I just joined this group today, I'd like to ask the following 3 questions
1) How can I configure/write CSS or JSP that has the table headers separated
by one pixel image?
Currently I can set the background of the headers to be blue, and the
cellspacing="1" for the table property to achieve this. However, in doing
so, all other cells in the table including the data row will have the same
effect. The end result is just the header is separated by a one pixel image,
or a space character but not the data row.
2) When I put   in the JSP page, I get the results like
9 Records 1 . How can I get rid of the 1 at the end? I couldn't find it
anywhere
3) Is there anyway that we can display an "All" option that display the
entire list? I know this could be done with set pageSize dynamically, but I
am hoping if there is something available within the taglib?
Thanks & regards
Thinh
_
Update your mobile with a hot polyphonic ringtone: 
http://fun.mobiledownloads.com.au/191191/index.wl?page=template&contentType=PolyphonicRingTone

-
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: License conundrum

2005-05-05 Thread Martin Cooper
On 5/5/05, Patrick Heck <[EMAIL PROTECTED]> wrote:
> I sent this question several days ago, about licensing... would this be
> better addressed to a dev list? I know that many Sun Jars are distributed
> with a license that allows redistribution with a product, but I want to be
> sure. Should I enter the lack of license documentation as a bug?
> 
> -Gus
> 
> Patrick G. Heck
> Cambridge Systematics, Inc.
> 100 CambridgePark Drive, Suite 400
> Cambridge, MA 02140
> tel  617 354 0167
> fax  617 354 1542
> e-mail  [EMAIL PROTECTED]
> www.camsys.com
> 
> Patrick Heck/camsys wrote on 04/26/2005 01:42:27 AM:
> 
> > I am somewhat confused by the jstl.jar distributed with 1.0.5 (I
> > have identified it as being at least the same # of bytes as the one
> > that I am trying to identify and document in our project, and since
> > we also have a jakarta-taglibs 1.0.5 jar I suspect we got this jstl.
> > jar from you :) ).
> >
> > It has a manifest.mf file as follows:
> >
> > Manifest-Version: 1.0
> > Ant-Version: Apache Ant 1.5.3
> > Created-By: 1.4.2-b28 (Sun Microsystems Inc.)
> > Specification-Title: JavaServer Pages Standard Tag Library (JSTL)
> > Specification-Version: 1.0
> > Implementation-Title: JavaServer Pages Standard Tag Library API Refere
> >  nce Implementation
> > Implementation-Version: 1.0.5
> > Implementation-Vendor: Sun Microsystems, Inc.
> > Implementation-Vendor-Id: com.sun
> > Extension-Name: javax.servlet.jsp.jstl
> >
> > I cannot find reference to 1.0.5, or it's license on sun's site

No, you wouldn't. The 1.0.5 version number is the version of the
Apache Jakarta Taglibs implementation of the JSTL 1.0 specification.
It's not a Sun version number.

> > I cannot find any license file relating to a Sun license. I have
> > noticed that other jars from apache are clearly implemented by
> > apache. For example:

I would hazard a guess that the values for 'Implementation-Vendor' and
'Implementation-Vendor-Id' are actually incorrect, and should
reference the ASF instead, since the Jakarta Taglibs implementation is
licensed under the ASL. However, since I'm not one of the JSTL
developers, I can't say definitively; hopefully one of the JSTL team
will chime in here.

--
Martin Cooper


> > Manifest-Version: 1.0
> > Ant-Version: Apache Ant 1.6.1
> > Created-By: 1.4.2-b28 (Sun Microsystems Inc.)
> >
> > Name: javax/servlet/jsp/
> > Specification-Title: Java API for JavaServer Pages
> > Specification-Version: 2.0
> > Specification-Vendor: Sun Microsystems, Inc.
> > Implementation-Title: javax.servlet.jsp
> > Implementation-Version: 2.0.public_draft
> > Implementation-Vendor: Apache Software Foundation
> >
> > Can someone please help me locate the license for the jstl.jar fom
> > 1.0.5... I'm probably blind or something...
> >
> > -Gus
> >
> > Patrick G. Heck
> > Cambridge Systematics, Inc.
> > 100 CambridgePark Drive, Suite 400
> > Cambridge, MA 02140
> > tel  617 354 0167
> > fax  617 354 1542
> > e-mail  [EMAIL PROTECTED]
> > www.camsys.com
>

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



Re: Dynamic Evaluation

2005-04-28 Thread Martin Cooper
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]



Re: packing images and style sheets with a taglib

2005-04-19 Thread Martin Cooper
On 4/19/05, Rahul P Akolkar <[EMAIL PROTECTED]> wrote:
> > I have a taglib that I am packaging up as a jar
> > and I'm trying to figure out how I can package it
> > with images and style sheets that could be
> > referenced in a relative path like  > src="/mytaglibimages/car.gif"> in the taglib code.
> 
> Not sure if you can get relative paths to work with no overhead to the
> taglib user.
> 
> One possibility is to serve the resources using a servlet that maps to the
> url pattern /mytaglibimages/* (or some such). This allows you to pack the
> resources and the servlet in your distro, but the user needs to add the
> servlet definition/mapping to the deployment descriptor (which, arguably,
> might be less error-prone, less of an overhead and easier to document).

It also means you have to deal with cache headers, so that you're not
serving up the same images to the same browser again and again.

--
Martin Cooper


> -Rahul
> 
> P.S.- If you choose to put the servlet in, package java.util.jar provides
> the necessary classes.
> 
>

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



Re: Retrieve a session attribute

2005-04-14 Thread Martin Cooper
On 4/14/05, Vernon <[EMAIL PROTECTED]> wrote:
> 
> --- Martin Cooper <[EMAIL PROTECTED]> wrote:
> 
> >
> > In a servlet, a session will be created on a call to
> > getSession() or
> > getSession(true) if one did not already exist. In a
> > JSP, if a session
> > does not exist and the page has session="true", one
> > will be created.
> >
> > --
> 
> I thought a JSP would share the same session within
> the servlet if a session already exists in the
> container. JSP is eventually translated into servlet
> code, doesn't it?

Yes, they share the session. It really wouldn't make much sense
otherwise. ;-) But by specifying 'session="false"' you have asked the
JSP container to deny that page access to the session, even if it
exists.

--
Martin Cooper


> I insert the log message code in the servlet before
> getting to the JSP and find that a session already
> exists at the point. If a session in JSP is unrelated
> with a session in servlet, how these two share session
> attributes?
> 
> __
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
>

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



Re: Retrieve a session attribute

2005-04-14 Thread Martin Cooper
On 4/14/05, Vernon <[EMAIL PROTECTED]> wrote:
> 
> --- Don Albertson <[EMAIL PROTECTED]> wrote:
> > Vernon wrote:
> > > In Servlet, I have
> > >
> > > request.getSession().getAttribute("cc");
> > >
> > > The code returns the right result.
> > >
> > > In JSP, when I have
> > >
> > > 
> > >
> > > I get
> > >
> > > java.lang.IllegalStateException: Cannot access
> > session
> > > scope in page that does not participate in any
> > session
> > >
> > > I think the reason is that I have
> > >
> > > <%@ page session="false"%> in the JSP file.
> >
> > Is there a reason why you are trying to use session
> > scope when there is no session?
> >
> 
> My understanding of how the servlet works in term of a
> session creation is that the container will create a
> session every time when a new user access the server.
> It seems to be correct from my short test with the
> session ID. A session exists before accessing the JSP
> file.

In a servlet, a session will be created on a call to getSession() or
getSession(true) if one did not already exist. In a JSP, if a session
does not exist and the page has session="true", one will be created.

--
Martin Cooper


> >
> >
> > >
> > > I have tried to retrieve the session attribute in
> > some
> > > other ways like the follogins I can think with a
> > > success. What is the right way to get the
> > attribute
> > > with the JSTL?
> > >
> > > 
> > >
> > > 
> > >
> > > The both yeild ??cc.??
> > >
> > >
> > > Thanks.
> > >
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Small Business - Try our new resources
> > site!
> > > http://smallbusiness.yahoo.com/resources/
> > >
> > >
> >
> -
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > In the elder days of art
> > Builders wrought with greatest care
> > Each minute and unseen part
> > For the Gods are everywhere.
> > Longfellow.
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
> 
> __
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
> 
> -
> 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: Retrieve a session attribute

2005-04-14 Thread Martin Cooper
On 4/14/05, Vernon <[EMAIL PROTECTED]> wrote:
> In Servlet, I have
> 
> request.getSession().getAttribute("cc");
> 
> The code returns the right result.
> 
> In JSP, when I have
> 
> 
> 
> I get
> 
> java.lang.IllegalStateException: Cannot access session
> scope in page that does not participate in any session
> 
> I think the reason is that I have
> 
> <%@ page session="false"%> in the JSP file.

By specifying that the page does not participate in a session, you are
deliberately stating that no session be accessible from the page. If
you want to access the session, you need to change this to "true".

--
Martin Cooper


> I have tried to retrieve the session attribute in some
> other ways like the follogins I can think with a
> success. What is the right way to get the attribute
> with the JSTL?
> 
> 
> 
> 
> 
> The both yeild ??cc.??
> 
> Thanks.
> 
> __
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
> 
> -
> 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: Error: javax/servlet/jsp/tagext/TagLibraryValidator

2005-03-04 Thread Martin Cooper
On Fri,  4 Mar 2005 08:43:54 -0500, Kris Schneider <[EMAIL PROTECTED]> wrote:
> From http://jakarta.apache.org/tomcat/tomcat-5.5-doc/setup.html
> 
> If using a J2SE 1.4 JRE, the compatibility package must be downloaded and
> expanded inside the folder where Tomcat was installed.
> 
> Have you done that? You may also want to grab the lates TC 5.5 version 
> (5.5.7).

Alternatively, you could switch to "matching" versions - Tomcat 5.0.x
on JDK 1.4.x or Tomcat 5.5.x on JDK 1.5.x.

--
Martin Cooper


> For the last couple versions of JSP, there really isn't any reason to install
> TLD files and use  elements in web.xml for packaged taglibs. So, 
> delete
> the TLD files from WEB-INF and remove the  elements from web.xml. The
> standard taglib directive for JSTL 1.1's core taglib is:
> 
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
> 
> Placing jstl.jar and standard.jar in WEB-INF/lib is correct.
> 
> Quoting [EMAIL PROTECTED]:
> 
> > Hi There,
> > i need some help working out how to fix the above error.
> >
> > When i code the following line:
> > <%@ taglib uri="/jstl-c" prefix="c" %>
> > in my jsp page i  get some crazy errors:
> >
> >
> > exception
> > javax.servlet.ServletException: javax/servlet/jsp/tagext/TagLibraryValidator
> >
> >
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
> >
> >
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > root  cause
> > java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
> >
> > java.lang.ClassLoader.defineClass0(Native
> > Method)
> >
> >
> > java.lang.ClassLoader.defineClass(ClassLoader.java:539)
> >
> >
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> >
> >
> > java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
> >
> >
> >
> > etc.
> >
> >
> > I have downloaded jakarta-tomcat-5.5.4 &  jakarta-taglibs-standard-1.1.2.
> > Also i have ammended web.xml to:
> >
> > 
> > 
> > /jstl-c
> > /WEB-INF/c.tld
> > 
> >
> >
> > And i have copied standard.jar & jstl.jar to  ROOT/WEB-INF/lib  ( is this 
> > the
> >
> > right place) & the all the  tld's to /WEB-INF.  Also i'm running 1.4.2_07.
> >
> > how do i get taglibs to work propoerly. I've seem numerous posts on the web
> >
> > about this but never a fix..
> >
> > thanks in advance pg
> 
> --
> 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: Agent/Log4J Question

2005-02-04 Thread Martin Cooper
Did you mean to post this to the *Tomcat* mailing list, rather than
the *Taglibs* mailing list? ;-)

--
Martin Cooper


On Fri, 4 Feb 2005 15:43:10 -0600, Kalyan Inuganti <[EMAIL PROTECTED]> wrote:
> All,
> 
> Let us say that I have an agent running on localhost:9092. I have my
> Java Serverside App running on Tomcat (4.x) - localhost:8080. I am
> using Log4J for logging in my App. I would like to know how my MBean
> implementation class associated with the Agent, can access the Level
> property (logger.getLevel()) of my app's Logger.
> 
> Also, anybody know of a way I can expose stuff like -
> 1. The last time Tomcat was bounced
> 2. Version # of the App's source that is currently running (manifest?)
> 
> Please suggest.
> 
> Thanks,
> Kalyan
> 
> -
> 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: setting values from current date

2005-01-23 Thread Martin Cooper
How about:





Adjust for whatever patterns work for you. ;-)

--
Martin Cooper


On Sun, 23 Jan 2005 12:57:24 -0500, Kralidis,Tom [Burlington]
<[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> I'm writing an HTML page (from JSP/JSTL) which provides two select boxes
> for day/month/year for a temporal query.
> 
> What I would like to do is set the 2nd select box with today's
> day/month/year values.  I am able to get today's date from:
> 
> 
> Date: 
> 
> How can I isolate the day/month/year values into seperate variables, so
> that I can use them when looping over to create my select box
> (basically, when the select box value equals today's day/month/year, add
> "SELECTED".
> 
> Cheers
> 
> ..Tom
> 
> -
> 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: Struts integration

2005-01-17 Thread Martin Cooper
On Mon, 17 Jan 2005 22:17:43 +0100, luca <[EMAIL PROTECTED]> wrote:
> 
> apologies if I continue this thread on this list. Martin,
> what's the name of the Struts list you mentioned?

http://struts.apache.org/using.html#Lists

--
Martin Cooper


> Rahul P Akolkar wrote:
> > I will assume that you want to give differential treatment for struts vs.
> > non-struts "href"s (though I can't be sure this is even required without
> > looking at the code).
> 
> well, how else would I know if that's just a string I need
> to send verbatim to the client, or if I need to retieve the actual
> URL another way?  of course, the resul will be an href attribute
> sent to the client anyway.
> 
> > Given that you have are planning on having different
> > attribute names (href, action), you should be able to simply do this when
> > provided with an action attribute:
> >
> > ((PageContext) getJspContext()).forward(action);
> 
> are you saying that I don't need to import any Struts specific Jars?
> 
> 
> > The RDC tag library in the jakarta-taglibs sandbox has a
> >  tag that does something similar. The important part of
> > that piece of code however, is equivalent to the above line. More
> > importantly, a "struts submit" will also have associated "form data" that
> > is passed along to the ActionForm via the request, so your anchor tag
> > should submit the appropriate data as well.
> 
> thank you, Rahul
> 
> Luca
> 
> -
> 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: Struts integration

2005-01-17 Thread Martin Cooper
On Mon, 17 Jan 2005 21:05:58 +0100, luca <[EMAIL PROTECTED]> wrote:
> 
> Hallo everyone again, I maintain and develop a tag-library (WALL)
> 
> Among other things I have a tag called a ().
> 
> Someone told me that they would like to use WALL with struts,
> but they have no easy way to invoke actions
> ().
> 
> Unfortunately, I have no idea about how to go about doing this
> kind of integrations (also, I don't really know if I want to do it.
> It depends on how tightly I would need to couple my lib with struts).
> 
> I imagine that I need to ask some Struts class to return a URL,
> given an action name. Am I right? anyone who has pointers to where I can look?
> 
> For good measure I just downloaded the struts source code...

That's a good start. Depending on what you are trying to accomplish,
you might want to look at how the Struts-EL tags are built, as an
example of how to extend the existing Struts tags.

Questions about Struts, and the Struts taglibs, though, are much
better asked on the Struts mailing lists than here. They really don't
have any relation to the Jakarta Taglibs project.

--
Martin Cooper


> Thanks
> 
> Luca
> 
> PS: Martin, thanks for your answer to the other question.
> 
> -
> 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: question about integration with log4j

2005-01-16 Thread Martin Cooper
On Sun, 16 Jan 2005 22:12:44 +0100, luca <[EMAIL PROTECTED]> wrote:
> 
> Hallo everyone, I maintain and develop a tag-library
> (WALL: http://wurfl.sourceforge.net/java/tutorial.php).
> 
> Lately someone asked me why I don't enable log4j
> in my tags. The reason why I don't do it is performance.
> Without being a log4J expert, here is my thinking:
> A WALL JSP average page could easily generate 1 or 2.000
> log messages.

I would say that is your problem right there. You should take another
look at your logging requirements and log what you need, when you need
it. This sounds like you're logging every action that ever happens,
all the time.

> Since deep into the log4J lib, there must be an
> if..then..else to decide if a message should be logged depending on the
> debug level, that would mean that those 2000 if..then are executed
> for each request to the JSP.
> 
> Questions for you:
> 
> - am I missing something about the way log4j works?

Other than that it's really fast and you shouldn't have to worry about
it, probably not. But consider that logging is generally not going to
be happening unless something goes wrong, or you have debugging
enabled.

> - do the Struts tags use log4J?

Struts uses Commons Logging, so whether or not it uses Log4j is up to you. ;-)

> - if not, do struts tag use some other strategy for logging?
> 
> - where do I find the source code of the Struts tag? I guess I could
>   probably learn a lot by looking at them :)

Um, in the Struts project. ;-)

http://struts.apache.org/

--
Martin Cooper


> Thanks
> 
> Luca
> 
> -
> 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: question about integration with Tiles

2005-01-06 Thread Martin Cooper
A long time ago, we had the exact same issue with the Struts
 tag, since the form element tags wanted to talk to the
form tag itself. The problem also manifests itself when using
, as well as Tiles. The solution we chose was similar to
what you suggested, except that we didn't bother with the
findAncestorWithClass() step.

I would recommend that you do the same. Just have your 'document' tag
store itself in request scope. There's no advantage to looking for the
class directly using findAncestorWithClass(), and there is some
performance hit for doing so.

--
Martin Cooper


On Thu, 06 Jan 2005 19:20:06 +0100, luca <[EMAIL PROTECTED]> wrote:
> 
> Hallo everyone, I maintain and develop a tag-library
> (WALL: http://wurfl.sourceforge.net/java/tutorial.php).
> 
> Lately someone asked me if there is any way WALL can be used
> with tiles. My problem is that in order to do its magic
> WALL tags need to talk to one another. In particular, many
> tags communicate with the containing top-level wall:document tag.
> 
> When a tag in a tile does a findAncestorWithClass(this, WallDocument.class)
> to find the document tag, this obvously fails, because the tag is not there.
> I think I have a workaround to this, but since tiles are not my
> speciality and performance traps are always there,
> I am about to ask this honorable forum for advice.
> 
> My workaround would be to have the document tag perform:
> 
> pageContext.setAttribute("wall-doc-ref-key", this,PageContext.REQUEST_SCOPE)
> 
> all the tags which need to refer to 'wall:document', could get a reference
> to the tag through:
> 
>  WallDocument document = (WallDocument) findAncestorWithClass(this, 
> WallDocument.class);
>  if (document == null) {
>  document = 
> (WallDocument)pageContext.getAttribute("wall-doc-ref-key",PageContext.REQUEST_SCOPE));
>  if (document == null) {
>  throw new JspTagException("tag 'menu' must be nested inside a 
> 'document' tag");
>  }
>  }
> 
> Questions:
> 
> - Will this work, as far as you can tell?
> 
> - is there a performance hit in doing this?
> 
> - can someone think of other solutions?
> 
> Thank you
> 
> Luca
> 
> -
> 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: vs. onclick result

2004-11-10 Thread Martin Cooper
On Wed, 10 Nov 2004 11:10:48 -0800, Cook, Lori A <[EMAIL PROTECTED]> wrote:
> I am experiencing difficulty using tag libraries and the passing through
> of scripting variables in attributes. Specifically I'm trying to add an
> onclick value to an  tag but this is generic for any tag in
> the Struts libraries where the user can supply a value to an attribute.
> 
> When the following markup is used in a jsp:
>
> pathParam + ");\"" %> />
> The resulting HTML is:
>
>
> 
> As you can see either one of the jsp versions 'work' to create a good
> onclick method.
> 
> But when the code is changed to use the  tag it doesn't work.
> That is with the following jsp markup:
>

This doesn't work because it is not legal to mix literals and
expressions in the value of an attribute. If part of it needs to be an
expression, then all of it needs to be an expression, as you tried to
do below.

> pathParam + ");\"" %> />

You have the right idea here, but you have the quotes in the wrong
place. Try this instead:



--
Martin Cooper


> The resulting HTML is:
>
>
> 
> While the first instance of  gets changed into the 
> markup the scripting variable pathParam does not get resolved. In the
> second case the scripting variable gets resolved but the  does
> not get changed into its appropriate .
> 
> Why? And how do you get the correct behavior?
> 
> Any help is greatly appreciated.
> Lori Cook
> 
> -
> 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: source code

2004-11-09 Thread Martin Cooper
On Mon, 8 Nov 2004 08:50:12 -0800, glennm2 <[EMAIL PROTECTED]> wrote:
> Where is the source code, ie. .java code for the examples in JSTL IN ACTION? 
> I need to see the code where the data is read and saved.

See page xxvi.

--
Martin Cooper


> Thanks. Marge
>

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



Re: standard taglib documentation

2004-11-02 Thread Martin Cooper
Well, there's the spec itself, which is actually very readable.

There's also the (freely available) Appendix A from Shawn Bayern's
"JSTL In Action", which is what I tend to use:

http://www.manning.com/bayern

--
Martin Cooper


On Tue, 2 Nov 2004 16:30:48 -0500, Chris Gow <[EMAIL PROTECTED]> wrote:
> On November 2, 2004 04:18 pm, Bill Siggelkow wrote:
> > http://www.jadecove.com/jstl-quick-reference.pdf
> Cool. Thanks.
> 
> 
> 
> >
> > Chris Gow wrote:
> > > Hi:
> > >
> > > I've just recently started using/learning JSTL and I'm trying to locate
> > > some sort of documentation describing what the various tags are and their
> > > attributes etc (sort of like a Javadoc for taglibs). I noticed that some
> > > of the taglibs in the sandbox have a link to their own taglib
> > > documentation but I can't seem to find any for the standard ones (eg. the
> > > out tag does XXX and has the following attributes YYY, ZZZ) that sort of
> > > thing. The binary distribution just appears to include only Javadoc. If
> > > someone could point me in the right direction, I'd really appreciate it.
> Not to be anal or anything, but shouldn't this sort of documentation be part
> of the binary distribution? Not a quick reference guide in pdf format, but
> some sort of HTML documentation like javadoc?
> 
> In any case, thanks for the link. It'll come in handy as learn how to use it.
> 
> 
> 
> -- chris
> 
> -
> 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: fmt:message not using correct locale

2004-10-16 Thread Martin Cooper
On Sat, 16 Oct 2004 11:15:26 -0600, Kumar V Kadiyala
<[EMAIL PROTECTED]> wrote:
> Hi Martin,
> 
> Thanks for the response. I use struts as the controller in my webapp (for
> my Action classes). When you say struts and jstl should not be mixed are
> you talking about the view? In my jsps I use jstl and struts-el. This is
> where I should be sticking to one approach? I don't understand how jstl
> can pick up the correct resources when I don't use struts.

I didn't mean Struts and JSTL shouldn't be mixed, I meant that you
should either have Struts load your resources and use Struts tags to
access them, or use JSTL to load them and use JSTL tags to access
them.

Otherwise it's just fine - and in fact recommended - to use JSTL for
anything else in your Struts apps.

--
Martin Cooper


> 
> Kumar
> Please respond to "Tag Libraries Users List"
> <[EMAIL PROTECTED]>
> To: Tag Libraries Users List <[EMAIL PROTECTED]>
> cc:
> Subject:Re: fmt:message not using correct locale
> 
> 
> 
> 
> JSTL and Struts use different mechanisms to load their resource
> bundles, and cache them under different attribute keys, so it's not
> surprising that JSTL tags do not pick up Struts resource bundles.
> 
> I would recommend that you pick one approach and stick with it, rather
> than trying to mix the two approaches.
> 
> --
> Martin Cooper
> 
> On Fri, 15 Oct 2004 15:23:37 -0600, Kumar V Kadiyala
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I have a webapp which uses struts and jstl. I use the following code
> > snippet to display localized strings
> >
> > <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> > <%@ taglib uri="http://java.sun.com/jstl/fmt"; prefix="fmt" %>
> > <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el"%>
> > 
> >
> > My resource file is specified in struts-config.xml as follows:
> > 
> > I currently have the base file PSDText.properties and a German version
> > PSDText.properties_de.
> >
> > If I have the language setting in my browser to de, I see the German
> > strings. However if I set the languages to en-us followed by German, I
> > still see the German strings. It seems like fmt:message is using the
> wrong
> > locale. Just out of curiosity I replaced fmt:message to bean:message and
> I
> > see the right localized strings. I have to use fmt:message. Am I missing
> > some configuration setting or something?
> >
> > Thanks in advance,
> > Kumar
> >
> 
> -
> 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: fmt:message not using correct locale

2004-10-15 Thread Martin Cooper
JSTL and Struts use different mechanisms to load their resource
bundles, and cache them under different attribute keys, so it's not
surprising that JSTL tags do not pick up Struts resource bundles.

I would recommend that you pick one approach and stick with it, rather
than trying to mix the two approaches.

--
Martin Cooper


On Fri, 15 Oct 2004 15:23:37 -0600, Kumar V Kadiyala
<[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I have a webapp which uses struts and jstl. I use the following code
> snippet to display localized strings
> 
> <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> <%@ taglib uri="http://java.sun.com/jstl/fmt"; prefix="fmt" %>
> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el"%>
> 
> 
> My resource file is specified in struts-config.xml as follows:
> 
> I currently have the base file PSDText.properties and a German version
> PSDText.properties_de.
> 
> If I have the language setting in my browser to de, I see the German
> strings. However if I set the languages to en-us followed by German, I
> still see the German strings. It seems like fmt:message is using the wrong
> locale. Just out of curiosity I replaced fmt:message to bean:message and I
> see the right localized strings. I have to use fmt:message. Am I missing
> some configuration setting or something?
> 
> Thanks in advance,
> Kumar
>

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



Re: POP3 tag?

2004-09-28 Thread Martin Cooper
On Tue, 28 Sep 2004 19:03:00 +0100, Digby <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I may have missed it, but I've search Google for ages - is there are
> good taglib for reading POP3 accounts?
> 
> I'm very surprised thare aren't tons of them, and that there isn't a
> Jakarta Taglib one. The only one I could find was the ColdTags one,
> which I didn't like much (it doesn't seem very polished).

I'm not at all surprised that there isn't one, since, IMHO, this is
not something that you should be doing from within a JSP page in the
first place. You'd be much better off putting this kind of code in a
servlet than in a JSP.

--
Martin Cooper


> 
> I might try writing one, but if there is one out there...that's what
> it's for.
> 
> TIA
> 
> Digby
> 
> -
> 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: last element in collection

2004-09-22 Thread Martin Cooper
On Wed, 22 Sep 2004 15:43:09 -0400, Kris Schneider <[EMAIL PROTECTED]> wrote:
> 

That would be 'varStatus' rather than 'status'. ;-)

--
Martin Cooper


>  ...
>  
>...
>  
> 
> 
> Quoting Ben Anderson <[EMAIL PROTECTED]>:
> 
> > Hi,
> > Is there a way for me to tell when I'm in the last iteration of a forEach?
> >
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> > 
> > <%
> >   myList.add("1");
> >   myList.add("2");
> >   myList.add("3");
> > %>
> > 
> > 
> >   
> >   
> > 
> >
> > I know it'd be better if my logic didn't need to know this, but I'm just
> > wondering if there's a way to do it.  I thought maybe I could get the size
> > and stick it in a var like
> > 
> > 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: Looping with paramValues

2004-09-14 Thread Martin Cooper
On Tue, 14 Sep 2004 17:31:17 -0400, Ross, Douglas <[EMAIL PROTECTED]> wrote:
> Nic,
> 
> I don't know how Struts or JSTL deals with arrays of request parameters
> but the following might be helpful:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On the server, you can access the arrays as follows:
> 
> <%
>String[] colors = request.getParameterValues("colors");
>String[] textures = request.getParameterValues("textures");
>if(null != colors){
>for(int i=0; i%>color[<%=String.valueOf(i)%>] is <%=colors[i]%><%
>}}
>if(null != textures){
>for(int i=0; i%>texture[<%=String.valueOf(i)%>] is
> <%=textures[i]%><%
>}}
> %>
> 
> I would like to know how to access these in Struts, the ActionForm, if
> anyone knows if this is possible.

Yes, it's possible. Just make your action form properties string
arrays instead of strings, and it will "just work". ;-)

--
Martin Cooper


> 
> Thanks,
> 
> Doug
> 
> 
> 
> -Original Message-
> From: Nic Werner [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 14, 2004 5:08 PM
> To: Tag Libraries Users List
> Subject: Re: Looping with paramValues
> 
> I had to depend on the order in my instance. I had 15 params that were
> repeated three times (each for a different variant), so I wanted to loop
> 
> through each param, and also know if I was on the first,second or third
> set of data. So basically, I wanted
> param.currentparam[current_set].value.
> 
> I couldn't merely name each param with a signifier in front, ie
> X-param,Y-param,Z-param because (as asked previously), there is no way
> to dynamically
> create a variable name and then access its data
> 
> - Nic.
> 
> Helios Alonso wrote:
> 
> > In this case, ignoring the order the order is not defensive
> > programming (avoiding not expectable bad cases) but avoiding coupling
> > with the implementation of the server (Tomcat) and avoiding extra
> > requiriments for the calling entity (call me with this params *and in
> > this order*).
> >
> > [9] works if the implementation of params implements List (or is an
> > array).
> >
> > At 16:20 14/09/2004 -0400, you wrote:
> >
> >> Defensive programming might suggest that one presume the worst not
> the
> >> spec.
> >>
> >> At any rate, presuming you intend and design the nth element is
> *always*
> >> the one you use from the request, does the following work?
> >>
> >> 
> >>
> >> I don't use el enough to remember all the nuances.
> >>
> >> Doug
> >>
> >>
> >> -Original Message-
> >> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, September 14, 2004 4:02 PM
> >> To: Kris Schneider
> >> Cc: Tag Libraries Users List
> >> Subject: Re: Looping with paramValues
> >>
> >> On Tue, 14 Sep 2004 15:18:24 -0400, Kris Schneider <[EMAIL PROTECTED]>
> >> wrote:
> >> > I was thinking more along the lines of the HTTP spec not
> guaranteeing
> >> the order.
> >> > So that if you made the same request with parameters "foo" and
> "bar",
> >> in some
> >> > cases "foo" might be first and in other cases it might be "bar".
> >>
> >> Clearly the HTTP spec can't say anything about the order; that
> >> wouldn't be meaningful. However, the HTML spec does state that the
> >> order of parameters is preserved. Taken together with the Servlet
> spec
> >> requirements, that does state that the order of parameters as
> received
> >> by the servlet is the same as the order of fields in the submitted
> >> form.
> >>
> >> --
> >> Martin Cooper
> >>
> >>
> >> >
> >> > Quoting Martin Cooper <[EMAIL PROTECTED]>:
> >> >
> >> > > On Tue, 14 Sep 2004 13:31:22 -0400, Kris Schneider
> <[EMAIL PROTECTED]>
> >> wrote:
> >> > > > Well, even if you could do it cleanly, there's no guarantee on
> the
> >> ordering
> >> > > of
> >> > > > request parameters.
> >> > >
> >> > > Although the Servlet spec doesn't state it explicitly, it does
> >> > > actually specify that the order of values for a given parameter,
> as
> >> > &

Re: Looping with paramValues

2004-09-14 Thread Martin Cooper
On Tue, 14 Sep 2004 15:18:24 -0400, Kris Schneider <[EMAIL PROTECTED]> wrote:
> I was thinking more along the lines of the HTTP spec not guaranteeing the order.
> So that if you made the same request with parameters "foo" and "bar", in some
> cases "foo" might be first and in other cases it might be "bar".

Clearly the HTTP spec can't say anything about the order; that
wouldn't be meaningful. However, the HTML spec does state that the
order of parameters is preserved. Taken together with the Servlet spec
requirements, that does state that the order of parameters as received
by the servlet is the same as the order of fields in the submitted
form.

--
Martin Cooper


> 
> Quoting Martin Cooper <[EMAIL PROTECTED]>:
> 
> > On Tue, 14 Sep 2004 13:31:22 -0400, Kris Schneider <[EMAIL PROTECTED]> wrote:
> > > Well, even if you could do it cleanly, there's no guarantee on the ordering
> > of
> > > request parameters.
> >
> > Although the Servlet spec doesn't state it explicitly, it does
> > actually specify that the order of values for a given parameter, as
> > returned by getParameterValues(), is the same as the order in which
> > they are submitted.
> >
> > --
> > Martin Cooper
> >
> >
> > > Are you really just checking to see if a particular
> > > parameter has been passed? If so, you should be able to do that with just:
> > >
> > > 
> > >  ...
> > > 
> > >
> > > Quoting Nic Werner <[EMAIL PROTECTED]>:
> > >
> > > > Thanks everyone for the help. I ended up taking your examples, and just
> > > > 'on the side' iterating through the paramValues until I found the
> > > > matching one, and then setting a temp flag. Its unfortunate that I
> > > > couldn't just use an index to access the nth param and its nth value.
> > > >
> > > > - Nic.
> > > >
> > > > Helios Alonso wrote:
> > > >
> > > > > Oops.  Exactly.
> > > > >
> > > > > At 11:56 13/09/2004 -0400, you wrote:
> > > > >
> > > > >> Helios,
> > > > >>
> > > > >> Small correction (I think), did you mean ...
> > > > >> >
> > > > >> >   
> > > > >> >   
> > > > >> >
> > > > >> Note: I switched var and items values.
> > >
> > > --
> > > 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]



Re: Looping with paramValues

2004-09-14 Thread Martin Cooper
On Tue, 14 Sep 2004 13:31:22 -0400, Kris Schneider <[EMAIL PROTECTED]> wrote:
> Well, even if you could do it cleanly, there's no guarantee on the ordering of
> request parameters.

Although the Servlet spec doesn't state it explicitly, it does
actually specify that the order of values for a given parameter, as
returned by getParameterValues(), is the same as the order in which
they are submitted.

--
Martin Cooper


> Are you really just checking to see if a particular
> parameter has been passed? If so, you should be able to do that with just:
> 
> 
>  ...
> 
> 
> Quoting Nic Werner <[EMAIL PROTECTED]>:
> 
> > Thanks everyone for the help. I ended up taking your examples, and just
> > 'on the side' iterating through the paramValues until I found the
> > matching one, and then setting a temp flag. Its unfortunate that I
> > couldn't just use an index to access the nth param and its nth value.
> >
> > - Nic.
> >
> > Helios Alonso wrote:
> >
> > > Oops.  Exactly.
> > >
> > > At 11:56 13/09/2004 -0400, you wrote:
> > >
> > >> Helios,
> > >>
> > >> Small correction (I think), did you mean ...
> > >> >
> > >> >   
> > >> >   
> > >> >
> > >> Note: I switched var and items values.
> 
> -- 
> 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: Looping with paramValues

2004-09-10 Thread Martin Cooper
I'm not totally sure what you're asking either, but you should note
that the only difference between 'param' and 'paramValues' is that the
values in 'param' are strings while the values in 'paramValues' are
arrays of strings. In all other respects, they are the same.

--
Martin Cooper


On Fri, 10 Sep 2004 10:23:14 -0700, Nic Werner <[EMAIL PROTECTED]> wrote:
> Hi,
>Is there a '.key' accessor for paramValues? Basically I only want to
> access the variables that match a certain index and do comparison work
> with them
> 
>I'm familiar with accessing data using paramValues.var_name[index],
> and I'm familiar with looping through params with only one value:
> 
> 
>
>
> 
> The problem with paramValues is that I have to specify a variable name,
> while params lets me use '.key'.
> 
> Thanks for your help,
> 
> - 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: taglib: tags embedded in output

2004-09-02 Thread Martin Cooper
Really the only way to do this is by modifying your own tag to
incorporate the functionality of the Struts tags. It's not possible to
output JSP code from a tag and have that evaluated. We had the same
discussion a couple of days ago in a separate thread:

http://www.mail-archive.com/taglibs-user%40jakarta.apache.org/msg07615.html

--
Martin Cooper


On Thu, 2 Sep 2004 18:47:42 +0530, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have written a customized taglib and there is a tag say ABC.
> 
> If my tag ABC returns a struts tag embedded in the writer output (here
> in this example html taglib) for a page, then can JSP container evaluate
> this tag?
> 
> Example... my tag ABC evaluates to:
> 
> 
> 
> 
> 
> 
> 
> I have used TagSupport class, it returns the above string to the JSP,
> but I want the output of it to be displayed. How to do that?
> 
> Regards,
> 
> Kalika P. Patil
> 
> DISCLAIMER:
> This message contains privileged and confidential information and is intended only 
> for the individual named.If you are not the intended recipient you should not 
> disseminate,distribute,store,print, copy or deliver this message.Please notify the 
> sender immediately by e-mail if you have received this e-mail by mistake and delete 
> this e-mail from your system.E-mail transmission cannot be guaranteed to be secure 
> or error-free as information could be intercepted,corrupted,lost,destroyed,arrive 
> late or incomplete or contain viruses.The sender therefore does not accept liability 
> for any errors or omissions in the contents of this message which arise as a result 
> of e-mail transmission. If verification is required please request a hard-copy 
> version.
>

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



Re: c:out inside value attribute of c:set

2004-09-01 Thread Martin Cooper
I'm not sure what you're trying to accomplish with the 
embedded in the attribute value. Don't you just want the value of the
variable you set in the first line?



--
Martin Cooper


On Wed, 01 Sep 2004 09:47:41 -0700, Somashish Gupta
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
>   Can I use a  inside the value attribute of
> another  or  tag.
> 
> For ex the following code
> 
>  />
>  value="${sessionScope.modelRoot.financialBenefit.FBTypeMap['1'].FBEntries[' value='${_id1}'/>'].id}" />
> 
> doesnt seem to work. In the second line I am trying to use
> c:out inside the value attribute of c:set . However it is
> not evaluating that c:out.
> 
> Any clue how to solve this problem?
> 
> Thanks
> Somashish
> 
> -
> 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: Processing output as JSP

2004-08-31 Thread Martin Cooper
It may be complicated, but it's the only way it's going to work. ;-)
That is, short of modifying the container itself...

If you think about it, it's not all that surprising. The page compiler
generates Java code from the JSP page, and that Java code is compiled
into a servlet. What you are asking for is the resultant servlet
itself to have the capability to dynamically (at execution time) run
the page compiler and then the Java compiler without actually having
source files to start from, or class files to write to. Theoretically
possible, but a huge amount of work - and a lot more complicated than
generating JSP pages and running them through the container in the
normal way! ;-)

--
Martin Cooper


On Tue, 31 Aug 2004 20:01:25 +0100, Graeme Andrews <[EMAIL PROTECTED]> wrote:
> >>Try saving the output to another jsp file (dynamic.jsp) and redirecting
> the client to that page
> 
> It would be complicated to save the output to another jsp file and redirect
> to that because:
> 
> (a) the output from  is only a fragment of an XHTML page
> (b) in a multiuser environment I would be creating separate temporary files
> for each session and that starts to sound like maintenance nightmare.
> 
> 
> 
> Graeme
> 
> -
> 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: String custom tag library. Capitalize work erroneously.

2004-08-21 Thread Martin Cooper
That would be a bug. Looking at the source code, I see that the code
for capitalize and capitalizeAllWords is actually identical, so I'm
not surprised that they behave the same way. ;-)

If you could file a bug in the bug database, that would ensure that
the problem doesn't get forgotten.

--
Martin Cooper


On Sat, 21 Aug 2004 09:51:52 +0300, lis <[EMAIL PROTECTED]> wrote:
> Hi all!
> 
> <%@ page  pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" language="java" 
> %>
> <%@ taglib prefix="str" uri="http://jakarta.apache.org/taglibs/string-1.1"; %>
> beautiful life
> 
> produce: Beautiful Lifeinstead of expected: Beautiful life
> 
> in other words  behave as 
> 
> any suggestions ?
> 
> --
> Best regards,
> lis  mailto:[EMAIL PROTECTED]
>

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



Re: Nested expressions

2004-08-20 Thread Martin Cooper
Uh, your condition is what's wrong. The parameter key is *always*
going to be either not 'view' or not 'perPage' - it can't be both at
the same time. I think you mean AND instead of OR...

--
Martin Cooper


On Fri, 20 Aug 2004 09:33:32 -0700, Nic Werner <[EMAIL PROTECTED]> wrote:
> You'd think it would, but JSTL is still allowing them to pass through.
> Anyone want to point out where I'm just missing this?
> 
> This code is generating the url string to be used later, but stripping
> out two of the params. If I don't use the OR, one will always strip out,
> but put it in and it ignores it.
> 
> 
>
> value="${url}&${params.key}=${params.value}" escapeXml="false"/>
>
> <%-- Output to test --%>
>
> 
> 
> Any suggestions guys? You've never failed me before!
> 
> Thanks,
> 
> - Nic.
> 
> 
> 
> 
> Derek wrote:
> 
> > You were on the right path.  This should do it...
> >
> > 
> >
> > Derek
> >
> >
> > On Aug 19, 2004, at 7:47 PM, Nic Werner wrote:
> >
> >> I'm sure I'm just looking at this the wrong way, and I can't find it
> >> in Shawns book, but I want to evaluate two variables with an OR
> >> condition:
> >>
> >> 
> >>
> >> Basically, if params.key doesn't equal  the words 'view' or
> >> 'perPage', go ahead...
> >>
> >> What am I doing wrong here?!
> >>
> >> 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: Question about Mailer Tag library.

2004-08-04 Thread Martin Cooper
I'm not in a position to try this out right now, but you should be
able to do this, since the address strings are passed directly to
InternetAddress.parse(). You will need to be careful with the '<' and
'>' characters, though, so that they're not interpreted as HTML or
XML.

--
Martin Cooper


On Wed, 4 Aug 2004 15:14:16 -0500 , [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi, all,
> 
> I am writing a simple jsp making use of the Mailer Tag Library to send out
> emails.My question is: Is there any way to put the sender email address in a
> format like: "Myname <[EMAIL PROTECTED]>" instead of "[EMAIL PROTECTED]"
> only? I tried the former one but the tag library complained about the
> unknown format of a email address, is there any way to do that?
> 
> Thanks.
> Bing
> 
> -
> 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: Cannot load class error

2004-08-02 Thread Martin Cooper
You haven't exactly given us much to go on... ;-)

My first guess is that you don't have all of the JSTL 1.0.x jars in
your WEB-INF/lib directory, as required.

Beyond that, we're going to need more information about what the exact
error is, and what your app config looks like, before we can help you.
Unfortunately, most of us are not mind-readers. ;-)

--
Martin Cooper


On Mon, 02 Aug 2004 05:17:35 +, emily chen <[EMAIL PROTECTED]> wrote:
> Hi there,
> when I use  in my jsp code,( on apache2 and tomcat4.1.30) it
> has "Cannot load class set" error. It's not because of the c.tld cannot be
> found, I've checked path and it's a different error if c.tld cannot be
> found.
> Anyone know how to solve this?
> Thanks,
> Emily
> 
> _
> Is your PC infected? Get a FREE online computer virus scan from McAfee®
> Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> -
> 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: javax.servlet.jsp.tagext package binary download

2004-07-09 Thread Martin Cooper

On Fri, 9 Jul 2004, Puneet Monga wrote:
 I browsed jakarta's apache site. I have downloaded the JSTL and that supports JSTL1.1 and JSP2.0. But i didnt found the tagext package in it. Please forward me the appropriate download link for this package or for the tag lib that contains this package
As you might expect from the package name (javax.servlet...), this is part 
of the servlet / JSP API, and so is not part of any particular taglib. 
Note that packages from Jakarta Taglibs would be org.apache... anyway.

As for where to get this, it will be included as part of your container, 
but the specific jar name depends on the container you are using. You can 
also download the servlet / JSP API from the Tomcat distribution 
directories - see the Tomcat web site for details.

--
Martin Cooper
Thanx in advance
Puneet Monga
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Xtags Id Variable is Obscured

2004-07-08 Thread Martin Cooper
I don't know how to solve your problem, I'm afraid. I just wanted to point 
out that I've noticed similar behaviour when using the  tag, and 
not using xtags. I believe there is something odd happening under the 
covers when  is used that can interfere with the behaviour of 
subsequent parts of the page.

It's probably worth filing a bug, if you have a brief example that 
demonstrates the problem that you could include in the bug report.

--
Martin Cooper
On Thu, 8 Jul 2004, Malcolm Cowe wrote:
I am trying to wrap an xtags:parse command in a catch tag, so that I can trap 
errors without Tomcat hurling all over the browser. This is fine, but I need 
to apply an XSL stylesheet to the parsed document, and this fails if the 
c:catch tag is in place. Code fragment follows:


 http://some/place/x.xml"; id="x"/>

<%-- Some intermediate XML processing stuff deleted --%>

How can I reference the id "x" from the xtags:style tag?
I parse the XML file in this way in order that I can manipulate the XML 
before sending it to the XSL processor. Unfortunately, the manipulation 
cannot be accommodated by XSLT. Take the c:catch tag away and everything 
works fine.

Regards,
Malcolm Cowe.
-
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: Jsp 2.0 taglib conversion problem

2004-07-07 Thread Martin Cooper

On Wed, 7 Jul 2004, Bruce Dempsey wrote:
You correct. JSP 2.0 is only supported on Websphere 6.0 . We are using
Sun's JDK and I downloaded JDK1.4 in error which uses JSP2.0. I download
JDK1.3. Our original code is not working again.
I assume that, when you say JDK, you actually mean J2EE? The JDK per se 
does not include (or use) JSP - it's J2EE that does.

--
Martin Cooper

Thank you all for your help.


Martin Cooper <[EMAIL PROTECTED]>
07/06/2004 04:49 PM
Please respond to "Tag Libraries Users List"
   To: Tag Libraries Users List <[EMAIL PROTECTED]>
   cc:
   Subject:RE: Jsp 2.0 taglib conversion problem

On Mon, 5 Jul 2004, Bruce Dempsey wrote:
Hi,
Thank you for your response.
Using my original code which was working before the upgade, we now get
the
following error:
[7/5/04 9:42:01:318 EDT] 68e72fa4 WebGroup  E SRVE0026E: [Servlet
Error]-[javax/servlet/jsp/JspContext]: java.lang.NoClassDefFoundError:
javax/servlet/jsp/JspContext
Any ideas as to what caused this or where to look?
You must not be using your original code. The JspContext class was
introduced with JSP 2.0, and so does not exist in JSP 1.2. As someone else
mentioned, WebSphere 5.1 supports only JSP 1.2, and not JSP 2.0.
--
Martin Cooper

Thank you,
Bruce Dempsey
Systems Analyst
Food Directorate / Direction des aliments
Health Canada / Santé Canada
Tel. (613) 954-9430
Fax (613) 957-1574

"Martin van Dijken" <[EMAIL PROTECTED]>
07/05/2004 08:46 AM
Please respond to "Tag Libraries Users List"
   To: "'Tag Libraries Users List'"
<[EMAIL PROTECTED]>
   cc:
   Subject:RE: Jsp 2.0 taglib conversion problem
Hey Bruce,
Not entirely certain, but isn't it WS 6.0 that supports JSP 2.0? I was
under
the impression that WS 5.x only supports version 1.2 of JSP, which still
works with a doctype and a dtd.
Grtz,
Martin
-Original Message-
From: Bruce Dempsey [mailto:[EMAIL PROTECTED]
Sent: maandag 5 juli 2004 13:58
To: [EMAIL PROTECTED]
Subject: Jsp 2.0 taglib conversion problem
Our Websphere server was upgraded to 5.1.3 and we are now using JDK
1.4 and JSP 2. Our taglibraries have stopped working.
I am tryin to upgrade the libraries to use the SimpleTagSupport classes,
etc
but am having a problem with our tld descriptor
Is this the proper way to declare the V2.0 of the taglibrary?
The error I am getting is:
Error JspTranslate: : XML parsing error on file /WEB-INF/tagLib.tld:
(line 3, col 117): Document root element "taglib", must match DOCTYPE
root
"null".. e_accountSignup.jsp ZSERIES_HCCFIA/WebContent line 8
Any ideas are greatly appreciated??

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-jsptaglibrary_2_0.xs
d"
version="2.0">
1.0
HCCFIA Tag Library

isElements
taglib.IsElementsHandler
JSP

listName
true



getMessage
taglib.getMessageHandler
empty


getReqParam
taglib.getReqParamHandler
empty

name
true



getParam
taglib.getParamHandler
empty

field
true


object
true



initializeList
taglib.InitializeListHandler
empty

listName
true


type
false



isChecked
taglib.IsCheckedHandler
empty

listName
true


type
false



isSelected
taglib.IsSelectedHandler
empty

listName
true


type
false



iterateOverObjects
taglib.IterateOverObjectsHandler
JSP

listName
true


splitList
false



getObjectMessage
taglib.getObjectMessageHandler
empty

listName
true


fieldName
true


type
false



isNew
taglib.IsNewHandler
JSP

doctype
true



alternateColors
taglib.alternateColorsHandler
empty


isLoggedIn
taglib.IsLoggedInHandler
JSP

currentPage
true


checkStatus
false



isRoleEnabled
taglib.IsRoleEnabledHandler
JSP

roleName
true


HideSearchArrow
taglib.HideSearchArrowHandler
JSP

arrowType
true


listName
true



getSpecial
taglib.getSpecialHandler
JSP

listName
true


fieldName
true


Fax (613) 957-1574
-
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: Using struts-nested tags

2004-07-06 Thread Martin Cooper
I would recommend asking Struts questions on the Struts mailing lists, 
since there are likely many more people there who will understand the 
issue you are trying to resolve, and be able to help you solve it.

--
Martin Cooper
On Tue, 6 Jul 2004, Paride Perazzolo wrote:
thanks for your answer.

1) The bean is placed in the page as part of an action form and exists
because it is declared in the associated action. UseBean is not normally
 used to create struts FormBeans.
the point is:
1) beanContainer was put into session by another jsp previously.
2)I need to fetch his values, display them in a form, let the user
modifying them.
3) Finally, I have to post data to an action which will make some stuff
and update beanContainer into session.

2) Nothing initializes the ArrayList except the default constructor -
you  are better off a map based method than a DynaValidatorActionForm
I will try this solution, even if, as I told you before, I'm dealing with
a pre-existent bean the property of which I need to read/modify is a
ArrayList.
3) Not of this discussion makes sense without more of struts config and
the  resultant page>

what I'm trying to realize is accessing a Collection-typed property of a
session scope bean, visualize it to the user, let the user modifying it
and finally submitting the changes the struts way (using a form-bean as
trait d'union between my jsp and the controller) and update the bean in
session.
I'm looking for a elegant procedure to make it, ie I'd like to use
DynaActionForms. But if that isn't possible I'm ready to define a form of
my own.
But I need first to understand if and how the session beanContainer's
listaDanneggiati property is mapped onto the form-bean defined into my
struts-config.xml. My suspect is that they are two different objects and
that they will never be managed automatically. Maybe I should define a
form which
1) populates an ArrayList whith that extracted from session
2) use it to make stuff
3) finally update the form in session with data submitted by the user
thanks
--
Paride Perazzolo
[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: Jsp 2.0 taglib conversion problem

2004-07-06 Thread Martin Cooper

On Mon, 5 Jul 2004, Bruce Dempsey wrote:
Hi,
Thank you for your response.
Using my original code which was working before the upgade, we now get the
following error:
[7/5/04 9:42:01:318 EDT] 68e72fa4 WebGroup  E SRVE0026E: [Servlet
Error]-[javax/servlet/jsp/JspContext]: java.lang.NoClassDefFoundError:
javax/servlet/jsp/JspContext
Any ideas as to what caused this or where to look?
You must not be using your original code. The JspContext class was 
introduced with JSP 2.0, and so does not exist in JSP 1.2. As someone else 
mentioned, WebSphere 5.1 supports only JSP 1.2, and not JSP 2.0.

--
Martin Cooper

Thank you,
Bruce Dempsey
Systems Analyst
Food Directorate / Direction des aliments
Health Canada / Santé Canada
Tel. (613) 954-9430
Fax (613) 957-1574

"Martin van Dijken" <[EMAIL PROTECTED]>
07/05/2004 08:46 AM
Please respond to "Tag Libraries Users List"
   To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
   cc:
   Subject:RE: Jsp 2.0 taglib conversion problem
Hey Bruce,
Not entirely certain, but isn't it WS 6.0 that supports JSP 2.0? I was
under
the impression that WS 5.x only supports version 1.2 of JSP, which still
works with a doctype and a dtd.
Grtz,
Martin
-Original Message-
From: Bruce Dempsey [mailto:[EMAIL PROTECTED]
Sent: maandag 5 juli 2004 13:58
To: [EMAIL PROTECTED]
Subject: Jsp 2.0 taglib conversion problem
Our Websphere server was upgraded to 5.1.3 and we are now using JDK
1.4 and JSP 2. Our taglibraries have stopped working.
I am tryin to upgrade the libraries to use the SimpleTagSupport classes,
etc
but am having a problem with our tld descriptor
Is this the proper way to declare the V2.0 of the taglibrary?
The error I am getting is:
Error JspTranslate: : XML parsing error on file /WEB-INF/tagLib.tld:
(line 3, col 117): Document root element "taglib", must match DOCTYPE root
"null".. e_accountSignup.jsp ZSERIES_HCCFIA/WebContent line 8
Any ideas are greatly appreciated??

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-jsptaglibrary_2_0.xs
d"
version="2.0">
1.0
HCCFIA Tag Library

isElements
taglib.IsElementsHandler
JSP

listName
true



getMessage
taglib.getMessageHandler
empty


getReqParam
taglib.getReqParamHandler
empty

name
true



getParam
taglib.getParamHandler
empty

field
true


object
true



initializeList
taglib.InitializeListHandler
empty

listName
true


type
false



isChecked
taglib.IsCheckedHandler
empty

listName
true


type
false



isSelected
taglib.IsSelectedHandler
empty

listName
true


type
false



iterateOverObjects
taglib.IterateOverObjectsHandler
JSP

listName
true


splitList
false



getObjectMessage
taglib.getObjectMessageHandler
empty

listName
true


fieldName
true


type
false



isNew
taglib.IsNewHandler
JSP

doctype
true



alternateColors
taglib.alternateColorsHandler
empty


isLoggedIn
taglib.IsLoggedInHandler
JSP

currentPage
true


checkStatus
false



isRoleEnabled
taglib.IsRoleEnabledHandler
JSP

roleName
true


HideSearchArrow
taglib.HideSearchArrowHandler
JSP

arrowType
true


listName
true



getSpecial
taglib.getSpecialHandler
JSP

listName
true


fieldName
true


Fax (613) 957-1574
-
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: What is the method of direct acces to an array element?

2004-06-24 Thread Martin Cooper

On Thu, 24 Jun 2004, Wendy Smoak wrote:

From: Sergei P. Volin [mailto:[EMAIL PROTECTED]
I have a set of arrays of the same length and i want to
iterate over all of them in a turn.
So what is the best practice to do this?
Is there any direct method of direct acces to the element of an array?
Like this: 
Are you sure this is the best design?  If the arrays belong together,
then they probably shouldn't be lying around loose.  Are they properties
of some object?
If this is the best design (or you can't change it), I think you can use
the 'varStatus' of  to address the other arrays.  Off the top
of my head, and probably not quite correct...

   
   
   

It might need single quotes around 'myLoopIndex'.  Or not, play around
with it and see what works!
At the very least, you'll want to change the 'varStatus' value to 'status' 
and change the 'myLoopIndex' usage to 'status.index'. The 'varStatus' 
attribute exposes a structure rather than an index.

--
Martin Cooper
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
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: Undeterministic Reflection Exception, Using EL, JSTL, and Torque Objects

2004-06-24 Thread Martin Cooper
Something doesn't jibe here. You are saying that the evaluation of 
${User.userName} is failing, but the stack trace you provide shows 
ArraySuffix in the call stack. I can't see how that class could be 
involved in evaluating the expression you give. Are you sure that is the 
expression that's failing?

--
Martin Cooper
On Thu, 24 Jun 2004, Georg Filios wrote:
Hi,
I do hope that I am here in the right group.
I have a unpleasent error, for which I havent found a solution on several 
days research.

Here is my Scenario:
I do have a bug i.e. an Exception which occurs ocassionally but not always.
Using Tomcat 5.0.24 and Servlet 2.4 I try to display a User-Object with
the 
The User-Object was generated with Torque, has different getters and setters.
The setters in my User-Object class are Torque generated. I have listed these 
setters below.
Only 3 of them have different parameters for the same Name - the 
setPrimaryKey setters,
which I cant unfortunately not change (since generated by Torque).

Sometimes, but not always, I get during the display with 
a java.lang.NoClassDefFoundError Exception.

Any Ideas how to solve this and what might be the cause??
This is a bit annoying, since I I dont want to wrap all my Torque Classes.
Thanks,
Georg
Here is the exception:
2004-06-24 20:26:18 StandardWrapperValve[action]: Servlet.service() for 
servlet action threw exception
java.lang.NoClassDefFoundError
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:314)
	at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
	at 
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluat 
orImpl.java:263)
	at 
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluat 
orImpl.java:190)
	at 
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContex 
tImpl.java:899)
	at 
org.apache.jsp.WEB_002dINF.jsp.app.security.manage.user_jsp._jspx_meth_c 
_out_0(user_jsp.java:338)



Here are the setters
setAccessCounterForSessionOUT=void   IN=int
setAccessCounterOUT=void   IN=int
setCityOUT=void   IN=java.lang.String
setConfirmedBoolOUT=void   IN=boolean
setConfirmedOUT=void   IN=java.lang.String
setCountryOUT=void   IN=java.lang.String
setCreateDateOUT=void   IN=java.util.Date
setEmailOUT=void   IN=java.lang.String
setFirstNameOUT=void   IN=java.lang.String
setIdOUT=void   IN=int
setLastAccessDateOUT=void   IN=
setLastAccessDateOUT=void   IN=java.util.Date
setLastLoginOUT=void   IN=java.util.Date
setLastModifiedOUT=void   IN=java.util.Date
setLastNameOUT=void   IN=java.lang.String
setLoggedInOUT=void   IN=boolean
setModifiedOUT=void   IN=boolean
setNameOUT=void   IN=java.lang.String
setNewOUT=void   IN=boolean
setPasswordOUT=void   IN=java.lang.String
setPhoneOUT=void   IN=java.lang.String
setPostCodeOUT=void   IN=java.lang.String
setPrimaryKeyOUT=void   IN=[Lorg.apache.torque.om.SimpleKey;
setPrimaryKeyOUT=void   IN=java.lang.String
setPrimaryKeyOUT=void   IN=org.apache.torque.om.ObjectKey
setStreetOUT=void   IN=java.lang.String
setUserIdOUT=void   IN=int
setUserNameOUT=void   IN=java.lang.String
-
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: Form question

2004-06-13 Thread Martin Cooper

On Sun, 13 Jun 2004, Jack Lauman wrote:
Is there a way to clear all the form fields after a JSTL form is successfully 
submitted so that if the user hits the back button and redisplays the form 
its fields will be empty?
JSTL doesn't have the concept of forms, so I assume you're referring to 
HTML forms. A couple of things to note about the Back button:

* If the request was a GET and the page was allowed to be cached by the 
browser (as determined by the HTTP response headers), then the Back 
button will not cause a request to the server, so there's nothing you can 
do.

* If the request was a GET and the page was not allowed to be cached, a 
new request will be made to the server with the same parameters as the 
previous request. Then it's up to you to decide what to do.

* If the request was a POST, the user will be asked if they want the same 
form data posted a second time. If they accede, the request will be 
reposted with the same data, and you're in the same boat as above.

--
Martin Cooper

Jack
-
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: JSTL 1.0.5 Update Question

2004-06-13 Thread Martin Cooper

On Sun, 13 Jun 2004, Jack Lauman wrote:
I'm using the following code to insert data from a form.
The first to fields in the data base don't come from form fields but from 
entries in the web.xml file.  How do you insert the web.xml value of: 
<%application.getInitParameter("descriptiveName")%> when updating a record?
    
  

--
Martin Cooper

<--- snip -->
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml"; %>
<%@ taglib prefix="nwc" uri="http://nwcascades.com"; %>

/">





	



	
		
			var="restaurants"
			dataSource="jdbc/RestaurantDS"/>
		
			INSERT INTO SignMeUp
			(website, code, name, cuisine, owner, address1, 
address2, city, state, zip, country, email, phone, fax, message, submit_date, 
submit_time)
			VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?)
			"/>
			"/>
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		


-
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: Where is the Input tag library?

2004-06-04 Thread Martin Cooper


> -Original Message-
> From: Derek Mahar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 01, 2004 8:22 AM
> To: Tag Libraries Users List
> Subject: Where is the Input tag library?
>
>
> Where may I find the Input tag library binary distribution?  The Input
> tag library is absent from the following Taglibs mirrors:
>
> http://apache.sunsite.ualberta.ca/jakarta/taglibs/input/
> http://apache.mirror.mcgill.ca/jakarta/taglibs/input/binaries/

Good question. It's actually missing from the main Apache site, which is why
it's missing from the mirrors. It's not the only one that's missing,
either - at least io and i18n, and quite possibly others, are also missing.
I have no idea where they went (assuming they were really there at some
point).

Anyone have any ideas? (Copying -dev so all the committers see this.)

--
Martin Cooper


> Derek
>
>
>
>
> NOTICE: This email contains privileged and confidential
> information and is intended only for the individual to whom it is
> addressed. If you are not the named addressee, you should not
> disseminate, distribute or copy this e-mail. Please notify the
> sender immediately by e-mail if you have received this
> transmission by mistake and delete this communication from your
> system. E-mail transmission cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses.
>
> AVIS: Le prisent courriel contient des renseignements de nature
> priviligiie et confidentielle et nest destini qu'` la personne `
> qui il est adressi. Si vous njtes pas le destinataire privu,
> vous jtes par les prisentes avisis que toute diffusion,
> distribution ou reproduction de cette communication est
> strictement interdite.  Si vous avez regu ce courriel par erreur,
> veuillez en aviser immidiatement lexpiditeur et le supprimer de
> votre systhme. Notez que la transmission de courriel ne peut en
> aucun cas jtre considiri comme inviolable ou exempt derreur
> puisque les informations quil contient pourraient jtre
> interceptis, corrompues, perdues, ditruites, arrivies en retard
> ou incomplhtes ou contenir un virus.
>
> -
> 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: xmlrpc and parse

2004-04-22 Thread Martin Cooper

"Benedetto Dell'Ariccia" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is it goog even for XML-RPC?
> Are you sure?

XTags parses and manipulates XML. The JSTL XML tags parse and manipulate
XML. There's no difference there, except in the details of the individual
tags, and that the latter is standard, and will work in Tomcat.

If you use the IO tags for the XML-RPC part of what you're doing, there
should be no question of whether or not JSTL is good for XML-RPC, any more
than there's a question of whether or nor XTags is good for XML-RPC.

--
Martin Cooper


>
> Benny
>
> Martin Cooper wrote:
>
> >"Benedetto Dell'Ariccia" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> >
> >
> >>Hi,
> >>I need to call an XML-RPC  url and parse the output.
> >>I use tomcat 5.018 (genrally 5.xx)
> >>
> >>I tried with the IO and XTAGS library but there is a problem of
> >>incompatibility between XTAGS and TOMCAT,
> >>could you suggest me another solution?
> >>
> >>
> >
> >If the IO taglib works for the XML-RPC invocation, then you should be
able
> >to use JSTL instead of XTags to parse the output.
> >
> >--
> >Martin Cooper
> >
> >
> >
> >
> >>Tnx
> >>Benny
> >>
> >>
> >
> >
> >
> >
> >-
> >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: jspc

2004-04-21 Thread Martin Cooper
This is a question for tomcat-user, not taglibs-user (assuming you mean
Tomcat 5.0.19, since the major version number isn't up to 9 yet! ;).

--
Martin Cooper


"Martin Nad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi!
>
> I run win-bin-Tomcat 9.0.19 and there is not jspc in
> tomcat/bin/!!!???
>
> How can i get jspc!
>
> Cheers
>
>
>
>
>
> __
> 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]



Re: xmlrpc and parse

2004-04-21 Thread Martin Cooper

"Benedetto Dell'Ariccia" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I need to call an XML-RPC  url and parse the output.
> I use tomcat 5.018 (genrally 5.xx)
>
> I tried with the IO and XTAGS library but there is a problem of
> incompatibility between XTAGS and TOMCAT,
> could you suggest me another solution?

If the IO taglib works for the XML-RPC invocation, then you should be able
to use JSTL instead of XTags to parse the output.

--
Martin Cooper


>
> Tnx
> Benny




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



RE: ${param.something} ... feature or bug?

2004-04-18 Thread Martin Cooper


> -Original Message-
> From: Andrew Stevens [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 18, 2004 11:13 PM
> To: '[EMAIL PROTECTED]'
> Subject: ${param.something} ... feature or bug?
>
>
>
> Hi,
>
> I am used to accessing form and URL parameters from JSTL using
> ${param.something}.
> However, I've found if a form is enctype="multipart/form-data" then the
> parameters defined within the form tags are not accessible.
> Say if I had a form field that was type=text (or hidden) then the value is
> always empty when accessed from the JSTL.
>
> I can see why this might be the case, due to the multi part and binary
> files. Can anyone confirm that I will not ever be able to access these
> simple form fields using JSLT when writing mlutipart forms? Or is there an
> alternate syntax to do so?

The issue is that the Servlet spec does not address handling of multipart
requests, and so containers, in general, do not include transparent support
for that. Unless your container does have built-in support, or you have some
other pre-processor in place for multipart requests, you're not going to be
able to access parameters in such requests in the usual manner in JSTL.

--
Martin Cooper


>
> Thanks in advance,
> AS
>
>
> GOLDMAN SACHS JBWERE PTY LTD DISCLAIMER
>
> Goldman Sachs JBWere Pty Ltd and its related entities
> distributing this document and each of their respective
> directors, officers and agents ("the Goldman Sachs JBWere Group")
> believe that the information contained in this document is
> correct and that any estimates, opinions, conclusions or
> recommendations contained in this document are reasonably held or
> made as at the time of compilation.  However, no warranty is made
> as to the accuracy or reliability of any estimates, opinions,
> conclusions, recommendations (which may change without notice) or
> other information contained in this document and, to the maximum
> extent permitted by law, the Goldman Sachs JBWere Group disclaims
> all liability and responsibility for any direct or indirect loss
> or damage which may be suffered by any recipient through relying
> on anything contained or omitted from this document.
>
> Goldman Sachs JBWere does not represent or warrant the attached
> files are free from computer viruses or other defects.  The
> attached files are provided, and may only be used, on the basis
> that the user assumes all responsibility for any loss, damage or
> consequence resulting directly or indirectly from use.
>
>
> -
> 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 set the session of pageContext without the TagSupport in the custom taglib?

2004-04-17 Thread Martin Cooper
I'd suggest reading up on JSTL a bit, since it seems you're missing some of
the basics. The expression language (EL) in JSTL isn't Java, and the
implicit objects are not the same as those in JSP scriptlets.

To learn JSTL properly, I'd suggest reading "JSTL In Action" by Shawn
Bayern, or just reading the spec, if you're not up for buying (or borrowing)
a book. If you want to short-circuit learning it properly and just solve
your immediate problem (which I would not recommend), you could refer to
Appendix A of Shawn's book, which is freely available on the Manning web
site.

--
Martin Cooper


> -Original Message-
> From: Ricky Lee [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 17, 2004 6:04 PM
> To: [EMAIL PROTECTED]
> Subject: how to set the session of pageContext without the TagSupport in
> the custom taglib?
>
>
> hi, thanks for reading..
>
> i have a problem about set the seesion(pageContext) in
> the action class..
>
> i know that set the seesion in the request, just like
> request.getSession().setAttribute("login_username",userForm.getUse
> rname());
>
> and in the JSP page, we can use the code to get the
> seesion:
>
> <%=request.getSession().getAttribute("login_username")%>
>
> but, i want to use the pageContext to set the session
> so as to load the attribute in JSTL
>
> ...
>
> if i use ...  it can't work...
>
> because there isn't login_username in the session
> pageContext.
>
> if i use  test="${request.getSession().getAttribute("login_username")
> == null}">..
>
> it still cause a errorsyntax error...
>
> i know in the custom taglib, we can use the the
>
>  pageContext.setAttribute(String,Object,scope) the
> scope can set to "session"
>
> and in the JSP page, we can use the JSTL to get the
> attribute..
>
>
> but in the Action class , there isn't pageContext
> object to set the session in the pageContext, just has
> the request to set pageContext, how to set the session
> of pageContext without the TagSupport in the custom
> taglib?
>
>
> please help methanks!
>
>
>
>
>
>
>
> __
> 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: String TagLib Dynamic String Replacement

2004-04-15 Thread Martin Cooper
It's not legal to mix string literals and scripting expressions in the value
of a single attribute. The value must be one or the other.

Paraphrasing your example a bit, to simplify, you have something like this:



which mixes the two, so you need to convert it entirely to a scripting
expression like this:



--
Martin Cooper


> -Original Message-
> From: Joe Dittmann [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 15, 2004 2:27 PM
> To: [EMAIL PROTECTED]
> Subject: String TagLib Dynamic String Replacement
>
>
> Hello,
>
>
>
> I am having a problem replacing data dynamically in a string.
>
>
>
> \" class=\"more\">More
> "><%=childGroup.getDescription()%>
>
>
>
> None of the scriptlets are evaluated.
>
>
>
> Throwing this error:
>
>
>
> /tiles/productCategory_content.jsp(120,14) jsp.error.unterminated.tag'
>
>
>
>
>
> Here is the tld:
>
>
>
>   
>
> truncateNicely
>
> org.apache.taglibs.string.TruncateNicelyTag
>
> JSP
>
> 
>
>   var
>
>   false
>
>   true
>
> 
>
> 
>
>   lower
>
>   false
>
>   true
>
> 
>
> 
>
>   upper
>
>   false
>
>   true
>
> 
>
> 
>
>   appendToEnd
>
>   false
>
>   true
>
> 
>
>   
>
>
>
> Many thanks in advance,
>
>
>
> Joe
>
>
>
>



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



Re: IOException: Stream closed error when using custom tags

2004-04-15 Thread Martin Cooper
Without seeing any of your JSP page or the code for your custom tag, it's a
little hard for us to help you out... ;-)

If you could provide more information, we might be able to help.

--
Martin Cooper


"shanmugampl" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
>I have a custom tag, which iterates through a data and provides a url
> to be included during every iteration. When i display the url as  a
> string, everything works fine. But when i try to include it through the
>  tag i am getting the following error.
>
> java.io.IOException: Stream closed
>
org.apache.jasper.runtime.BodyContentImpl.ensureOpen(BodyContentImpl.java:62
4)
>
>
> Once i get this error, reverting back to the old case(displaying the url
> as a string) also throws the same error.
> I cannot figure out the problem.
>
> Also i have disabled tagpooling. Can anyone help me out on this.
>
> Thanks
> Shanmugam PL




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



RE: JSTL Tags Vs. JavaBeans

2004-04-11 Thread Martin Cooper


> -Original Message-
> From: Jeff Brewer [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 11, 2004 11:27 AM
> To: [EMAIL PROTECTED]
> Subject: JSTL Tags Vs. JavaBeans
>
>
> In the process of trying to get my site up and running I came
> across a page that I'd written a year ago (not a big site--just a
> slow programmer) before I learned about JSTL that uses JavaBeans,
> which led me to ask the question "Should I redo this page using
> JSTL tags?"
>
> What's the current "State of the (JSP) Art" with respect to JSTL
> vs. JavaBeans? Is one preferred over the other?

I'm not sure what you mean. JSTL can use and manipulate JavaBeans - they're
complimentary technologies, rather than alternatives. Perhaps if you could
describe a little about what your page is doing, or even provide a piece of
it for us to look at, we'd be able to better help you decide on the best
approach.

--
Martin Cooper


>
>



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



RE: jstl output

2004-04-09 Thread Martin Cooper
Depending on your usage, you might be able to put a whitespace-stripping
filter in front of your JSP pages, to collapse all this down.

Alternatively, you could adopt the funky JSP coding style I've seen some
people use, ensuring that you don't have whitespace between your tags.

So instead of this:




you would do this:



The first example causes the line break between the tags to be output into
your page, which is where a lot of your "\r"s are coming from. The second
example ensures that there is no whitespace between the tags.

The obvious downside to this is the substantial decrease in readability...

--
Martin Cooper


> -Original Message-
> From: Lorenzo Sicilia [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 09, 2004 3:28 AM
> To: Tag Libraries Users List
> Subject: jstl output
>
>
> Hi to the list,
>
> I have a jsp with jstl. The goal is generate a 100% xml ouput.
> In Macromedia flash I get this output from jstl:
>
>
> \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\t\r\r
> \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\t\t
> \r\r\t\t\t\t
> \r\r\t\t\t\r\r\r\r\r\r\r\r\r\r\r\r\r\r\t\r\r\t\r\r\t\r\r\t\r\r\t\t
> \r\r\t\t\r\r\t\t\r\r\t\t\t\r\r\t\t\t\t\r\r\t\t\t\t\r\r\t\t\t\t\r\r
> \t\t\t\r\r\t\t\t\t\r\r\t\t\t\t\r\r\t\t\t\t\r\r\t\t\t\t\r\r\t\t\t\t
> \r\r\t\t\t\t\r\r\t\t\t\t\t\r\r\t\t\t\t\t\t\r\r\t\t\t\t\t\t\r\r\t\t
> \t\t\t\t\r\r\t\t\t\t\t
>
> \r\r\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\r\r\t\t\t\t
> \t\t\t\r\r\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\r\r\t\t
> \t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t
> \r\r\t\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t\r\r\t
> \t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\t\r\r\t\t\t\t
> \t\t\t\t\r\r\t\t\t\t\t\t\t\r\r\t\t\t\t\t\t\t\r\r\t\t\t\t\t\r\r\t\t
> \t\t\t\r\r\t\t\t\t\t\t\t\t\t\t\r\r\t\t\t\r\r\t\t\t\r\r\t\t\r\r\t\r
> \r\t\r\r\t\r\r\t\r\r\t\r\r\t\t\t\r\r\t\r\r\t\r\r\r\r\r\r\r\r\r\r type=\"1\"> value=\"0.5415515086218432\" /> value=\"true\" />.\r
>
>
> Does it is possible remove newline chars in jstl?
>
> Thanks in advance
>
> regards Lorenzo
>
>
> -
> 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 nest a taglib in another taglib?

2004-04-07 Thread Martin Cooper


> -Original Message-
> From: Ricky Lee [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 07, 2004 7:58 PM
> To: [EMAIL PROTECTED]
> Subject: how to nest a taglib in another taglib?
>
>
> hi, thanks for reading..
>
> i have a problem about nest a taglib in another
> taglib, just like this, what should i do?
>
> the "attribute" in the page context.
>
>  />">

This is not legal JSP (or XML) syntax. You cannot use an element as the
value of an attribute.

> i know that has a way to do like this:
>
> 
>  content="<=new_id.toString()>">
>
> but there is another way to do it?

That depends on how the  tag is implemented. If that is
your own tag, and you are free to modify it, you could EL-enable that tag,
which would allow you to do:



A good example of how to EL-enable tags can be seen in the Struts-EL tag
library, the source code for which is available here:

http://cvs.apache.org/viewcvs.cgi/jakarta-struts/contrib/struts-el/

On the other hand, if the  tag is not under your control,
then you're probably stuck with providing a scripting expression (rtexpr),
which would look just like the example you give above.

--
Martin Cooper


> please help methanks!
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
> -
> 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]



  1   2   3   >