RE: Header for errors (no HTML in the .properties file)

2004-03-06 Thread Karr, David
I think that would be "requestScope", not "request".

Someday someone's going to write a TLV for development that throws an
exception if any symbol referenced in an EL expression doesn't exist
(I'm not even sure that algorithm would have caught your error, though).

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 05, 2004 2:38 PM
To: Struts Users Mailing List
Subject: Header for errors (no HTML in the .properties file)


I'm using this to display errors:
   
 
   
 
   
 
   

How do I put the old "Validation ErrorYou must correct the following
error(s) before proceeding:" text at the top if there are indeed errors
to be displayed?  That used to happen magically with 
using the errors.header & errors.footer in the
ApplicationResources.properties file.

I started to write 

It's late on Friday, I'm probably missing something really simple...

-- 
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: Problem with tags and overloaded methods

2004-02-26 Thread Karr, David
Just so it's clear, I'm assuming that you have the "get" method
overloaded, with the same method name being used for two different
properties (even if you consider them the same conceptual property).

I would guess that's always a bad idea.  I'm somewhat surprised that it
works on one platform with the same appserver, and doesn't on the other.
Are they using the same WLS version and JDK version?

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 10:47 AM
To: Struts User List ([EMAIL PROTECTED])
Subject: Problem with tags and overloaded methods


I've got a FormBean that includes a collection of beans. I have two
getters for this collection: one indexed, and one not indexed. The
non-indexed one returns the entire collection, the indexed one returns a
single member of the collection. The normal arrangement.

I use JSTL tags to refer to the unindexed getter: a  set that tests whether the collection is empty, then a
 tag that puts the contents on the page.

I have a copy of BEA Weblogic on my local machine, for development. In
that environment everything works perfectly. Then there's another copy
of BEA Weblogic on a Unix box that's available to everybody. That's
where I put my WAR file when I've got it working, so others can use it,
and find bugs, etc.

But the application fails on that "public" server. It tells me that it
is "unable to find a value for "allItems" in object of class
"..ItemBeanList". Changing the name of the unindexed getter, so that
it's no longer an overloaded function, makes it work.

I can't figure out why this works on my desktop and fails on the server.
All tld and jar files for the tags are included in the WAR file.


--
Tim Slattery
[EMAIL PROTECTED]


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


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



RE: Problem with tags and overloaded methods

2004-02-26 Thread Karr, David
I reiterate, I believe it's a bad idea to use the same method name for
two different property mappings.  If you can find some documentation
that recommends you do that, I'd like to see it.

WLS = "WebLogic Server".

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 12:35 PM
To: 'Struts Users Mailing List'
Subject: RE: Problem with tags and overloaded methods


> Just so it's clear, I'm assuming that you have the "get"
> method overloaded, with the same method name being used for 
> two different properties (even if you consider them the same 
> conceptual property).

> I would guess that's always a bad idea.

Huh? I thought that's what we were supposed to do for indexed
properties.

> I'm somewhat
> surprised that it works on one platform with the same 
> appserver, and doesn't on the other. Are they using the same 
> WLS version and JDK version?

Hmm..the local server is using JDK  1.3.1_06, and the dev server is
using 1.3.1_10. I don't know what WLS is.

Hmm...we were warned that 1.3.1_10 was more picky that what we had been
using on the dev server in parsing properties. I'll have to look closely
at the page that works in both environments with no changes, I thought
it was doing the same thing in a couple of places.

--
Tim Slattery
[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: Suppresing the generation of blank lines while using logic tags - Ver 1.0.2

2004-02-25 Thread Karr, David
It's the newline between "%>" and "<%" that is causing you problems (not
to mention the design of your page, but that's a different matter).  If
you do things like:

... <%ns:tagname stuff="value"
%><%ns:nothertag morestuff="morevalue"
%><%...

Then you will reduce the newlines in your output.  This gets annoying to
read, however.

-Original Message-
From: Pranay Parsatwar [mailto:[EMAIL PROTECTED] 

We are facing problem of jsp file size exceeding to more than 5 MB at
runtime. The jsp file is full of struts tag with lot many logic:equal,
notEqual in the code. The compiled html when generated takes a lot of
time for browser rendering because of the file size. Looking at the html
source generated it seems the tags generates lots of blank line were
ever used. If the source is modified to remove all the blank lines, the
size reduces to 2 mb.

I would appreciate any help on this issue.

Thanks in advance.

Regards
Pranay Parsatwar 
MphasiS India
2nd Floor,, The Leela Business Park
Andheri Kurla Road,
Andheri (East)
Mumbai - 400 059
Tel: (91)-22-5677
  http://www.mphasis.com/

 


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



RE: EL - can't get access to my constants

2004-02-25 Thread Karr, David
You haven't shown the EL syntax that you're trying to use.  If you're just trying to 
reference normal properties, note that property accessors cannot be static methods, 
they have to be normal instance methods.

If you're trying to reference constants, you might be better off putting the constant 
values into a map, keyed by the symbol name.  You could either do this manually with a 
small number of constants, or automatically using reflection.

I also believe that the JSP 2.0 "function" syntax (which I'm not that familiar with 
yet) might allow you to use a static method.

You might be better off asking about this on the taglibs-user list.

-Original Message-
From: Axel Groß [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 25, 2004 3:02 AM
To: Struts Users Mailing List
Subject: EL - can't get access to my constants


dear friends!

i declared a getter method for a constant, but i can't use it using jsp2.0 Expression 
Language.

public class Constants{
..
public static String getBEAN_PROP_SYSTEM() {
return BEAN_PROP_SYSTEM;
}
..
}

in the jsp:
works fine:
 <%= ((Constants)session.getAttribute("constants")).getBEAN_PROP_SYSTEM() %>

[DEBUG] InsertTag - -[ServletException in:/WEB-INF/contents/System.jsp] Unable to find 
a value for "BEAN_PROP_SYSTEM" in object of class "at.ftw.struts.Constants" using 
operator "."'
javax.servlet.jsp.el.ELException: Unable to find a value for "BEAN_PROP_SYSTEM" in 
object of class "at.ftw.struts.Constants" using operator "."


i attached the full stacktrace

thanks in advance,
Axel

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



RE: Accessing static field using EL

2004-02-20 Thread Karr, David
This is a very FAQ.  You should read the JSTL specification.  The EL can
only reference standard JavaBean properties, collections, and maps.  If
you only have a couple of constants to reference, I would put them into
session or application properties in your application init logic.  If
you have many constants, you might consider having a class use
reflection to grab all the constants in a class and put them into a
hashmap, keyed by the variable name.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric Seynaeve
Sent: Friday, February 20, 2004 1:25 AM
To: [EMAIL PROTECTED]
Subject: Accessing static field using EL


I have problems accessing a static field using the Struts Expression
Language. The goal is to put the names of all the form bean instance
names, ... in static String fields and use those fields throughout as
much files as possible. This to eliminate frantic debugging sessions due
to typo's .

This is a code snippet:
public class SessionNumberForm extends AbisDynaActionForm {
public static final String SESSION_NUMBER = "sessionNr";

...
}

Here I try to access the field:


but it gives following error:
[ServletException in:/WEB-INF/tiles/index.jsp] No getter method for
property ${SessionNumberForm.SESSION_NUMBER} of bean
org.apache.struts.taglib.html.BEAN'

How could this field be accessed?

Thanks,

Eric


-
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: and struts-EL

2004-02-05 Thread Karr, David
I believe this is typically done by keeping track of the current "page number" and 
checking that value in the "reset()" method.  You only reset the fields associated 
with the given page number.

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 05, 2004 6:18 AM
To: 'Struts Users Mailing List'
Subject: RE:  and struts-EL


You're right, I missed an element: the form is split across several pages (a "wizard" 
style form) so I can't reset the checkbox value because I need to mantain the value it 
had. Anyway your hint on the source location is very useful!! Thank you

If you have suggestions about handling such a situation in a different way, please let 
me know Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_________


-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED] 
Sent: mercoledì 4 febbraio 2004 20.46
To: Struts Users Mailing List
Subject: RE:  and struts-EL


I have no clue why you think you needed to write a customized checkbox class.  It's 
not clear to me from your description.  Having your form in session scope has little 
to do with it.  The "reset()" method in the ActionForm is used to clear out checkbox 
values (and others) BEFORE the form is populated from the request.  This is so you 
know that if the parameter associated with the checkbox isn't present, then the 
checkbox wasn't set.  This may be old news to you, but I'm not sure.

In any case, each Struts-EL class has an inheritance relationship with the class in 
the base library.  You can view the source code in the CVSweb interface on the jakarta 
site.

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 04, 2004 8:58 AM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject:  and struts-EL


I'm using a customized version of the checkbox tag that always sets in the property 
field a value of true or false depending on the state of the checkbox, thus avoiding 
the noisy problem of "not checked tags does not reset the property"; this was needed 
to me because the form is in session scope, and so using the reset form method was not 
easy. Anyway, I now need to use such a checkbox inside nested/indexed properties, that 
I access using struts-el. It works fine, but I now think I shoul override the 
struts-el checkbox tag class to obtain the same behavior that's right ? 

Is there any class relationship between the struts-el tags and the corresponding 
struts tags ?? I looked for documentation or javaDoc but couldn't find nothing... Any 
help is appreciated

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



-
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: iteration and EL help needed

2004-02-04 Thread Karr, David
When you say that you got an exception with the "indexed" attribute, I'm
assuming you mean that you tried to add an "indexed" attribute to the
"c:forEach" tag.  The "indexed" attribute goes on the tags being
iterated over, not the iterate/forEach tag.  The tags which are iterated
over should be able to support an "indexed" attribute whether you're
using "logic:iterate" or "c:forEach".

I believe your "html:hidden" and "html:text" elements need a "name"
attribute, probably with a value of "item".

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 04, 2004 12:08 PM
To: 'Struts Users Mailing List'
Subject: iteration and EL help needed


This is the problem I am trying to solve.
I want to submit a DynaValidatorForm with multiple hidden/text inputs
that have the same name. This is a list of items and quantities that I
am trying to update with one submit (e.g. itemId, quantity). Is this
what the 'indexed' input attribute is supposed to help with? Will the
validator understand how to apply the rule for itemId to every indexed
instance of itemId? Will DynaValidatorForm receive an array of itemIds
and quantities?

Since the items are stored in a collection, I want to iterate over them,
outputting the input fields. With c:forEach, I get an exception that the
indexed attribute is not supported. With logic-el:iterate, I get a name
attribute that looks like
name="org.apache.struts.taglib.html.BEAN[1].itemId" - that doesn't look
right at all.

I am using Struts 1.1rel (and the struts-el JAR in the contrib dir) with
JSTL 1.0 in Resin 2.x.x. 
Has anyone seen behavior like this and know how I can fix it? 
Or am I barking up the wrong tree trying to submit my form in this
fashion?

Here's a bit of the JSP code...
<%--c:forEach var="item" items="${context_tray.items}"
varStatus="idx"--%> 




<%--/c:forEach--%>

thx

Andy Kriger | Software Mechanic | Greater Than One, Inc.
28 West 27th Street | 7th Floor | New York, NY 10001
P: 212.252.7197 | F: 212.252.7364 | E: [EMAIL PROTECTED] 


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



RE: out> tag inside tag

2004-02-04 Thread Karr, David
As other posters pointed out, just use Struts-EL, and you'll end up
with:

 

Note that I recommend using the same prefix with Struts-EL as you do
with the base library, although my earlier "documentation" (and I use
the term loosely :) ) implies using "html-el".  Using the same prefix
will make it easier to transition to JSP 2.0, which won't use Struts-EL
(because it's not needed).

-Original Message-
From: Rahul Mohan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 11:48 PM
To: struts
Subject:  tag inside  tag


Hi...I am facing some problems with using JSTL tags inside struts tags.

This is the piece of code I wrote for my application:

 "
 />

the problem is that it is getting traslated to



in the final html page!! 

can anybody please tell me why the  tag is not getting
translated to 

RE: and struts-EL

2004-02-04 Thread Karr, David
I have no clue why you think you needed to write a customized checkbox
class.  It's not clear to me from your description.  Having your form in
session scope has little to do with it.  The "reset()" method in the
ActionForm is used to clear out checkbox values (and others) BEFORE the
form is populated from the request.  This is so you know that if the
parameter associated with the checkbox isn't present, then the checkbox
wasn't set.  This may be old news to you, but I'm not sure.

In any case, each Struts-EL class has an inheritance relationship with
the class in the base library.  You can view the source code in the
CVSweb interface on the jakarta site.

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 04, 2004 8:58 AM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject:  and struts-EL


I'm using a customized version of the checkbox tag that always sets in
the property field a value of true or false depending on the state of
the checkbox, thus avoiding the noisy problem of "not checked tags does
not reset the property"; this was needed to me because the form is in
session scope, and so using the reset form method was not easy. Anyway,
I now need to use such a checkbox inside nested/indexed properties, that
I access using struts-el. It works fine, but I now think I shoul
override the struts-el checkbox tag class to obtain the same behavior
that's right ? 

Is there any class relationship between the struts-el tags and the
corresponding struts tags ?? I looked for documentation or javaDoc but
couldn't find nothing... Any help is appreciated

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



-
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: Detect messages with Jstl

2004-02-01 Thread Karr, David
Why are you trying to avoid the logic taglib?  If there's not much left from it that 
you use, then so be it.  You use what you need and leave the rest.  If you use the 
Struts-EL version, there's not much left in it in the first place.

You'll find that directly referencing most (all?) of the Struts data structures 
through JSTL will be somewhat painful.  Many of them are identified with somewhat long 
dot-separated names, which makes it necessary to reference them explicitly through the 
"scope map" (sessionScope, requestScope, etc.).

-Original Message-
From: Axel Wilhelm Berle [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 31, 2004 1:04 PM
To: [EMAIL PROTECTED]
Subject: Detect messages with Jstl


Hi everybody!

I am experimenting with the  tags of
Struts 1.1. My problem is that I need to discover if
there are any messages. Of course, there is the  tag, but I am 
trying to avoid the logic tag library. So my question is: What would be the elegant 
way to discover the presence of messages using the jstl core taglib?

Thanks in advance!

Axel



=
Axel Wilhelm Berle

e-mail: [EMAIL PROTECTED]
Tel: (office) +55 16 618.0090
 (mobile) +55 16 9964.6343




Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de

-
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: [REPOST] Struts throws exception during load testing

2004-01-16 Thread Karr, David
Actually, the NPE is being thrown from a class/method internal to
WebLogic.  You need to address this with BEA support, not struts-user.

-Original Message-
From: Abhishek Srivastava [mailto:[EMAIL PROTECTED] 

Hello All,

I had posted this yesterday, but didn't receive any response so far.
This error is coming more and more frequently when we increase the load
on struts. Worst thing is that the stack trace shows that this error is
not originated from any of my source. It seems to be an error being
thrown by struts.

The error is coming only during load testing. It doesn't come during a
single user testing.

I am using struts 1.1 on BEA weblogic 8.1 on HP-UX 11i.

Can anyone who is an expert on struts internals have a look at this and
tell me what is going wrong?

Thanks for your help in advance.[Sorry for reposting this... But since
using struts was my idea, now I am being questioned... And I have no
clue about why this error comes]

Here is the stack trace :

   
<[ServletContext(id=28318025,name=testWebApp,context-path=/testWebApp)]
Servlet failed with Exception java.lang.NullPointerException
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvle
tStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java
:387)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java
:305)
at
weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(Reques
tDis
patcherImpl.java:382)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatche
rImp
l.java:286)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:10
69)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProc
esso
r.java:274)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr
oces
sor.java:455)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Tiles
Requ
estProcessor.java:320)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
279)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvle
tStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java
:387)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(W
ebAppServletContext.java:6310)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etCo
ntext.java:3622)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java
:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

Regards,
Abhishek.

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

2004-01-15 Thread Karr, David
Put all JSP pages that can't be accessed directly into a security constraint, only 
accessible by the role "nobody", which you will never add a user to.  All accesses of 
JSPs will be through forwards from actions, which will not be blocked by that security 
constraint (unless you either have a broken web container or a Servlet 2.4 container 
where you've enabled auth on forward).

-Original Message-
From: Jürgen Scheffler [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 15, 2004 8:15 AM
To: [EMAIL PROTECTED]
Subject: JSP Protection


Hi,

how do i block URL guessing?
if someone requests abc.com/secret_page.jsp
he gets it. In my Action i check if the user object has the right rights for this 
action and then i forward him. But if guesses the jsp, he opens it.

Help me!

Jürgen


-
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 Tag Lib and Performance

2004-01-11 Thread Karr, David
The JSTL is not part of Struts, but it can easily be used along with it.
There is also a variation of the Struts tag libraries that evaluates
attribute values using the same expression evaluation engine that the
JSTL uses (the Apache implementation, at least).  This is called
"Struts-EL", and it's available in the "contrib" directory of the Struts
distribution.

-Original Message-
From: Raj Yadav [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 11, 2004 11:18 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts Tag Lib and Performance


Thanks for your reply Richard.
At this moment, I don't know how many different types of TagLibs Struts
has to offer. But from what you have mentioned, they can really be of
great help to JSP Developers and can reduce complexity. Can you tell me
little more how using the Struts tags can avoid using scriptlets? Is
JSTL part of Strtus tablibs?

Thanks,
-raj


-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 11, 2004 12:30 PM
To: Struts Users Mailing List
Subject: Re: Struts Tag Lib and Performance

Raj,
Which taglibs do you not want to use? If you don't use the Struts html
taglibs, you will lose a lot of the functionality that they provide,
namely prepopulation of form input values. A lot of the other tags also
provide functionality that lets you avoid having to use scriptlets. Some
functionality is overlapped by the JSTL tags and in those cases, it is
preferable to use JSTL instead of the struts equivalents.

Overall, you probably won't lose much in performance, if you don't use
the Struts tags, but you'll have to do a lot more work yourself and this
may come at the expense of maintainability and readability of your JSP
pages.

Regards,

Richard
At 09:56 AM 1/11/2004, you wrote:
>Hi All,
>I am trying to do a performance/feasibility check of the Struts 
>Framework. I came across this taglib and wanted to ask will there be 
>any performance issue's if the Struts Taglib are not used and we use 
>the rest of the features provided by Struts ?
>
>Thanks in advance
>
>-raj
>
>
>-
>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: Indexed Property in JSP

2004-01-02 Thread Karr, David
Besides the other problem with the order of parameters to the setter,
you also have two setters for the same property.  You'll need to change
the other setter (and the resulting property name) in order for this to
work.

Also, I believe you can remove the 'indexed="true"' attribute, as you're
doing your own indexing.

-Original Message-
From: White, Susan [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 12:11 PM
To: [EMAIL PROTECTED]
Subject: Indexed Property in JSP


The form is not setting the value that the user inputs.  I used some of
the posts from this list to create this code and everything compiles,
throws no exceptions but does not work, either. The setter(s) is(are)
not being called Any ideas? 
PS The indexed='true' parameter seems to have no effect present or
absent. 
Thanks! Susan

JSP:



  Please enter the date of birth for
   
  
 
  
   (MM/DD/)




  




Java:
private String[] dateOfBirth=null;

/**
 * Returns the dateOfBirth by index.
 * @param int index of array
 * @return String date of birth value
 */
public String getDateOfBirth(int idx) {
if (this.dateOfBirth==null) {
return new String("");
} 
else {
if (idx < this.dateOfBirth.length) {
return this.dateOfBirth[idx];
} 
else {
return new String("");
}
}
}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String dateOfBirth, int idx) {
this.dateOfBirth[idx] = dateOfBirth;
}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String[] dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
/**
 * Returns the dateOfBirth array.
 * @return String array
 */
public String[] getDateOfBirth() {
 return dateOfBirth;
}



-
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: JAAS and roles attribute of logic:present

2003-12-31 Thread Karr, David
Are you using basic auth, or form auth?  I would use form auth, but I
don't know that it would make a difference.

You may have to secure the entire application with a role that all users
will be guaranteed to have.

> -Original Message-
> From: Daniel Massie [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, December 30, 2003 4:58 PM
> To: Struts Users Mailing List
> Subject: Re: JAAS and roles attribute of logic:present
> 
> 
> If I firstly go to a secured area, I am redirected to the 
> login page. I 
> log in, get sent to my original request (secure area). If I then go 
> immediately  to an unsecure area, there is no principal or 
> subject (both 
> null).
> 
> If I go to the unsecured area without an existing session, 
> there is also 
> no principal or subject (both null) as expected.
> 
> Daniel
> 
> Karr, David wrote:
> 
> >I'm not sure what problem you're having.  Are you saying 
> that after you
> >specify your login when accessing a secured area, you then 
> immediately
> >(before session timeout) access an unsecured area that checks
> >"role=admin" and thinks you don't have that role (I would be 
> surprised
> >if it did that)?  Or is your first access (without an 
> existing session)
> >to the unsecured area?  If that's the case, then there 
> definitely won't
> >be an existing principal.  Did you think there would be?
> >
> >  
> >
> 
> 
> -
> 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: JAAS and roles attribute of logic:present

2003-12-30 Thread Karr, David
I'm not sure what problem you're having.  Are you saying that after you
specify your login when accessing a secured area, you then immediately
(before session timeout) access an unsecured area that checks
"role=admin" and thinks you don't have that role (I would be surprised
if it did that)?  Or is your first access (without an existing session)
to the unsecured area?  If that's the case, then there definitely won't
be an existing principal.  Did you think there would be?

-Original Message-
From: Daniel Massie [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 4:27 PM
To: [EMAIL PROTECTED]
Subject: JAAS and roles attribute of logic:present


I am using JAAS to login to the secure areas of my application, 
localhost:8080/app/admin with the role admin being required for access. 
Using  within pages with 
localhost:8080/app/admin as the base url works perfectly, but when I try

to use it in any other url localhost:8080/app the principle is null. Is 
it possible to manually add the JAAS subject to the HttpSession so that 
it can be used with the logic tags?If so by which key must it be added 
to the session?

thanks
Daniel
-- 
Daniel Massie
http://www.dmassie.org.uk
http://jbay.dmassie.org.uk


-
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 using tiles-el

2003-12-19 Thread Karr, David
Yup, you're correct.  Could you please file a bug in Bugzilla for this?
I may get to this this weekend.

-Original Message-
From: Narayanan, Sunitha [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 11:45 AM
To: [EMAIL PROTECTED]
Subject: Error using tiles-el


Hello,

I am using Struts 1.2 (nightly build as of 17 Dec 2003) and am trying
out using the tiles-el. When I replace my tiles taglib with tiles-el, I
am getting this error

/WEB-INF/tiles/layout/main_layout.jsp(4): Error in using tag library
uri='/WEB-INF/taglib/struts-tiles-el.tld' prefix='tiles': The Tag class
'org.apache.strutsel.taglib.tiles.ELUseAttributeTag' has no setter
method corresponding to TLD declared attribute 'classname', (JSP 1.1
spec, 5.4.1) probably occurred due to an error in
/WEB-INF/tiles/layout/main_layout.jsp line 4: <%@ taglib
uri="/WEB-INF/taglib/struts-tiles-el.tld" prefix="tiles" %> 

On looking at the source of ELUseAttributeTag.java, am finding that
there is no setter for the classname attribute which has been defined in
the struts-tiles-el.tld file.

Have any of you seen this problem? Is this a known bug?

Thanks,
Sunitha


-
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 EL status

2003-12-16 Thread Karr, David
To summarize a couple of points already stated here:

The base Struts library doesn't use the EL because the JSTL requires JSP
1.2, and Struts is still supported on containers which only provide JSP
1.1.  If you write your JSP code to use the same prefixes as before
("html", "bean", etc.), but referencing the "el" library in your
"taglib" directive, then when your container is upgraded to support JSP
2.0, you can just change the "taglib" directive to point back to the
base library, and the rest of the code will port as-is.

> -Original Message-
> From: Derek Clarkson [mailto:[EMAIL PROTECTED] 
> 
> Hi all,
>   My boss doesn't want to use Struts EL because as he 
> puts it "it's not part of 
> the main development and we can't tell where it might go". 
> Can anyone clarify 
> when and if it is going to take over ? everyone seems to be 
> using it and I've 
> used it in two projects (which didn't make my boss happy!)

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



RE: Error while accessing the application

2003-11-30 Thread Karr, David
Just for clarification to others, your last line abbreviates the fact
that in a Servlet 2.3 container, it's not necessary to include the TLDs,
either in the "/WEB-INF" directory, or referenced in the "web.xml", if
you reference the canonical URI in the "taglib" directives in the JSP
pages.  The "canonical" URI for the tag library is listed in the TLD for
the tag library.  There are differences of opinion on which of these
strategies is preferable.  There are tradeoffs both ways.

-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED] 

Hi Melanie,

don't really see anything wrong right off the bat, but let's walk
through what has to be configured:

Place all your tlds in the WEB-INF directory (looks good here) Place all
required struts library JARs in the lib directory of your web appl
Configure your web.xml to include the TLDs, here's an example of one of
my projects:

  
  index.html
  index.jsp
  
  
  /WEB-INF/c-rt.tld
  /WEB-INF/c-rt.tld
  
  
  /WEB-INF/c.tld
  /WEB-INF/c.tld
  
  
  /WEB-INF/fmt-rt.tld
  /WEB-INF/fmt-rt.tld
  
  
  /WEB-INF/fmt.tld
  /WEB-INF/fmt.tld
  
  
  /WEB-INF/struts-bean.tld
  /WEB-INF/struts-bean.tld
  
  
  /WEB-INF/struts-html.tld
  /WEB-INF/struts-html.tld
  
Finally configure the JSP to include (or point) to the proper tag
definition, here's an example:

  <%@ page import="java.util.*"%>
  <[EMAIL PROTECTED] uri="/WEB-INF/c.tld" prefix="c" %>
  <[EMAIL PROTECTED] uri="/WEB-INF/fmt.tld" prefix="fmt" %>
  <[EMAIL PROTECTED] uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <[EMAIL PROTECTED] uri="/WEB-INF/pager-taglib.tld" prefix="pg" %>
  <%@ taglib uri="/WEB-INF/security.tld" prefix="security" %>
  <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>

I always reference tlds from the /WEB-INF directory, not from within the
library JAR.


Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message - 
From: "Melanie Pfefer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 30, 2003 7:30 AM
Subject: Error while accessing the application


> Hi,
> 
> My application is not able to find the tag libraries.
> The tag libraries lie in the WEB-INF directory of the application and 
> refer to a directory on another server.  These two servers are able to

> connect with one another.
> 
> I am getting exceptions like
> info ( 5840): JSP: JSP1x compiler threw exception
> org.apache.jasper.compiler.CompileException:
> /Mydocs/sun/web/docs/jvNET/Login.jsp(1,0) Unable to
> open taglibrary
> /WEB-INF/struts-bean.tld : Could not locate TLD
> /WEB-INF/struts-bean.tld
> at
>
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars
> eEventListener.java:707)
> at
>
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
> Listener.java:110)
> at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
> at
>
com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.jav
> a:252)
> at
>
com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.j
> ava:173)
> at
>
com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.
> java:416)
> [16/Nov/2003:14:54:22] warning ( 5840): Internal
> error: Failed to get
> GenericServlet.
> (uri=/jvNET/Login.jsp,SCRIPT_NAME=/jvNET/Login.jsp)
> [16/Nov/2003:14:56:02] info ( 5840): Internal Info:
> loading servlet
> /jvNET/Login.jsp
> [16/Nov/2003:14:56:02] info ( 5840): JSP: JSP1x
> compiler threw exception
> org.apache.jasper.compiler.CompileException:
> /Mydocs/sun/web/docs/jvNET/Login.jsp(1,0) Unable to
> open taglibrary
> /WEB-INF/struts-bean.tld : Could not locate TLD
> /WEB-INF/struts-bean.tld
> at
>
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars
> eEventListener.java:707)
> at
>
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
> Listener.java:110)
> at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
> at
>
com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.jav
> a:252)
> at
>
com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.j
> ava:173)
> at
>
com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.
> java:416)
> [16/Nov/2003:14:56:02] warning ( 5840): Internal
> error: Failed to get
> GenericServlet. (uri=/jvNET/Login.jsp,SCRIPT_NAME=/jvNET/Login.jsp)
> 
> __

RE: JSTL

2003-11-30 Thread Karr, David
That's right.  It's important to realize that most non-trivial
applications will often use more than one tag library.  There is no good
reason to try to restrict yourself to a single tag library.

In the case of Struts, it's very beneficial to use the Struts tag
library along with the JSTL.  In addition, the "Struts-EL" contrib
package (in the "contrib" directory) is a port of the Struts tags (the
ones that aren't directly served by the JSTL), using the expression
evaluation engine of the Jakarta Taglibs JSTL implementation.

-Original Message-
From: Tarek M. Nabil [mailto:[EMAIL PROTECTED] 

You mean there are no equivalents for the Struts HTML tags in the JSTL?

-Original Message-
From: Manish Singla [mailto:[EMAIL PROTECTED]

You may replace most of Logic tags/Bean tags with JSTL.

You may still want to use HTML tags of struts
Your decision may get affected in few cases if you are thinking of 
migrating to JSF in future

Tarek M. Nabil wrote:
> Hi everyone,
> 
> I'm getting ready to move from Struts 1.0.2 to Struts 1.1. Since, 
> also, I now guarantee a J2EE 1.3 container, I'm considering replacing 
> Struts tag libraries with the JSTL. Before I make this move, I wanted 
> to know whether, from your experiences, the JSTL gives the same 
> capabilities as the tag libraries provided with Struts, especially 
> that I know that the tag libs shipped with Struts 1.1 fix a lot of the

> shortcomings of the tag libs shipped with 1.0.2. So, is going with the

> standards worth the move?

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



RE: This code works in Tomcat & Sun One 7 Appsvr but not WLS 8.1

2003-11-10 Thread Karr, David
This is likely going to be "CR112789".  Call BEA Support and describe your problem, 
and mention that this patch might be related.

-Original Message-
From: Joshua White [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 1:51 PM
To: Struts Users Mailing List
Subject: Re: This code works in Tomcat & Sun One 7 Appsvr but not WLS 8.1


Is there a patch number or other information you could provide me with?
 
Thanks,
 
Joshua

Bjørn T Johansen <[EMAIL PROTECTED]> wrote:
This is a bug in WLS 8.1 which is going to be fixed in SP 2.. Meanwhile a patch is 
available from BEA...

BTJ

On Fri, 2003-11-07 at 13:37, Joshua White wrote:
> Has anyone else had a problem with the bean:define tag?
> 
> 
> 
> 
> 
> This is a little frustrating! Any help would be appreciated.
> 
> Following code works in Tomcat & Sun One 7 Appserver but not in WLS 
> 8.1.
> 
> 
> 
> > property="someProperty" scope="session" toScope="page" /> value="">
> ...
> 
> 
> The first line works in all environments and demonstrates that the 
> form bean is there and that the property is not null. (No problem 
> here) The next line, I define a page scoped variable (I have tried 
> omitting the toSocpe attribute all togeather as well). No errors are 
> generated from this line.
> 
> An error gets generated from the third line. The error message 
> explains that the "propertyThatCausesProblems" is not defined.
> 
> If I sneek a line between lines two and three which defines a string 
> named "propertyThatCausesProblems", the problem goes away.
> 
> I am not sure what to do here. It seem as though the bean:define tag 
> does not every create a variable (Only when deployed on WLS 8.1).
> 
> Any ideas?
> 
> Regards,
> 
> Joshua
> 
> 
> 
> 


-
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 variables not reset

2003-11-06 Thread Karr, David
It's a little hard to understand exactly what's happening here, but did
you try setting a breakpoint in one or more of the setter methods on
actionform B?  If I'm understanding what you're saying, I think I would
expect the setter methods of B to be called with similar values as you
had in form A (after the reset method is called).

-Original Message-
From: Rajani Gudi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 06, 2003 5:11 PM
To: Struts Users Mailing List
Subject: Form variables not reset


Hi 
I have 2 form beans in request scope. Say formbean A and formBean B. I
have some fields common  in both the jsps and so I have identical 
getter/setter methods in both beans. When Action Form A is called, it
has non null values for these fields. It performs the business logic and
forwards it to actionform B. The reset method of B is called where I am
setting all the fields of Form bean B to null...( I can see that in the
debug mode)... But once it comes to actionForm B, it still has the same
values in all the common variables

I thought the form values are tied to the form bean, so even though the
second form bean has some fields same as the first bean, it is a new
different bean and so I would expect all the value parameters to be
reset.

I am not able to understand why one form beans values are retained in
another form bean? 

Thanks
r

-
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: Which version of Commons Digester released with Struts 1.1

2003-11-06 Thread Karr, David
Well, you should be able to open up the "commons-digester.jar" file and
inspect the "manifest.mf" file.  It has a version number, which appears
to be "1.5" in Struts 1.1.

> -Original Message-
> From: Philip Mark Donaghy [mailto:[EMAIL PROTECTED] 
> 
> I would like to debug a problem that I have with
> Digester. The error is :
> 
> java.lang.NoSuchMethodException: No such accessible
> method: addFormBeanConfig() on object:
> java.lang.String
> 
> How can I get the version number of Commons Digester
> that is distributed with Struts 1.1.
> 
> Phil

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



RE: why jstl does not work rightly

2003-11-04 Thread Karr, David
Ok, let's see.

Are you sure you have a valid "taglib" directive in your JSP page (not
in the web.xml)?  Do a "view source" on the generated page to make sure
you don't have " -Original Message-
> From: javen fang [mailto:[EMAIL PROTECTED] 
> 
> hi, all
> 
> 
> 
> USER is a user session
> 
>  can work,and prints myname
>  can not work, and prints   ${USER.username}
> 
> Because of the output  ${USER.username}  , my config
> about JSTL may be right. and now , why it does not
> work rightly 
> 
> my container is tomcat 5.0

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



RE: Runtime Evaluation Order of struts tags and jsp expressions

2003-11-03 Thread Karr, David
> -Original Message-
> From: Swaminathan Gurumoorthy [mailto:[EMAIL PROTECTED] 
>  
> I have a problem with the way I thought struts tags and jsp 
> expressions are evaluated.
>  
> I have a sample code like this:
> 
> <% int tabIndexCtr = 1; %> 
> 
>  styleClass="textboxfont"/>
> 
> I am trying to design my jsp's to have dynamic tab indexes so 
> that I don't have to hard code them.
> 
> But I get an error like this:
> 
> [javac] inquireOrderBody_jsp.java:191: 
> setTabindex(java.lang.String) in 
> org.apache.struts.taglib.html.BaseHandlerTag cannot be 
> applied to (int)
> [javac]   _jspx_th_html_text_0.setTabindex( 
> tabIndexCtr++ );

Try changing this:

"<%=tabIndexCtr++ %>"
To:
'<%=tabIndexCtr++ + "" %>'

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



RE: Re[2]: EL Expression in html:hidden tag

2003-11-03 Thread Karr, David
Oh, duh.  Good point.

> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> 
> I'm jumping in late on this thread, but why bother using 
> Struts-EL at all under
> JSP 2.0? The original (RT) tags should be magically EL-aware 
> as long as the app
> uses a Servlet 2.4 format web.xml, right?
> 
> 
> http://java.sun.com/xml/ns/j2ee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
>  version="2.4">
>   ...
> 
> 
> Quoting "Karr, David" <[EMAIL PROTECTED]>:
> 
> > > -Original Message-
> > > From: Arne Brutschy [mailto:[EMAIL PROTECTED] 
> > > 
> > > Thursday, October 30, 2003, 3:53:39 PM, you wrote:
> > > RB> Is ${pageContext.request.servletPath} returning anything?
> > > Yes, it is returning the right path.
> > > 
> > > RB>  Try something like
> > > RB>  > > RB> value="${pageContext.request.servletPath}"/>
> > > I already tried this, it does not work. Basically, it 
> should be the
> > > same as
> > > 
> > >   
> > > ${pageContext.request.servletPath}
> > >   
> > > or
> > >> > value="${pageContext.request.servletPath}"/>
> > > 
> > > which are both not working. Is this some stutsbug? Why is the
> > > html:hidden tag marked in the tld file with a rtexpressions=false?
> > 
> > OH.  Sigh.  I had originally set all the attributes on the 
> EL tags to
> > have that set to "false", because in JSP 1.2 that refers to 
> whether it
> > will use scriptlet expressions or not, and I wanted to 
> discourage the
> > use of those.  I had recently decided to change those back 
> to "true" out
> > of a sudden attack of pragmatism, but now I see that this 
> (the "false"
> > setting) is causing a more serious problem.  In JSP 2.0, 
> the meaning of
> > this flag is slightly different (I'm assuming) in that it appears a
> > setting of "false" means it won't evaluate EL expressions.
> > 
> > I'll try to get to fixing these tonight and getting it into 
> the nightly
> > build, at least.
> 
> -- 
> 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: Struts1.1 & Oracle 9iAS

2003-11-03 Thread Karr, David
> -Original Message-
> From: Tim Clotworthy [mailto:[EMAIL PROTECTED] 
> 
> I am saddled with having to re-implement a struts-based architecture
> designed to run on a Tomcat web container, to an Oracle 9iAS Release2
> (Tomcat is out, end-of-discussion). Unfortunately, 9iAS 
> support Struts1.0
> framework, but does not seem to support the various Struts1.1 
> capabilities
> that our system already leverages, which include:
> 
> 1) the RequestProcessor (specifically using ProcessRoles extension)
> 2) Tiles
> 3) LookupDispatchAction class
> 4) some other things..
> 
> If anyone else may be in a similarly unfortunate position, 
> and can share any
> insights on how they either:
> 
> 1) figured out how to get 9iAS Release2 to work with Struts1.1,
> 
> Or else:
> 
> 2) can share any insights on how they got around similar 
> problems, it would
> be greatly appreciated. Thanks.

First of all, what release of 9iAS are you using (9.0.2, 9.0.3, etc.)?

When you say it doesn't "support" those features, what exactly do you
mean?  Are you getting particular error messages?

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



RE: Re[2]: EL Expression in html:hidden tag

2003-11-03 Thread Karr, David
> -Original Message-
> From: Arne Brutschy [mailto:[EMAIL PROTECTED] 
> 
> Thursday, October 30, 2003, 3:53:39 PM, you wrote:
> RB> Is ${pageContext.request.servletPath} returning anything?
> Yes, it is returning the right path.
> 
> RB>  Try something like
> RB>  RB> value="${pageContext.request.servletPath}"/>
> I already tried this, it does not work. Basically, it should be the
> same as
> 
>   
> ${pageContext.request.servletPath}
>   
> or
>value="${pageContext.request.servletPath}"/>
> 
> which are both not working. Is this some stutsbug? Why is the
> html:hidden tag marked in the tld file with a rtexpressions=false?

OH.  Sigh.  I had originally set all the attributes on the EL tags to
have that set to "false", because in JSP 1.2 that refers to whether it
will use scriptlet expressions or not, and I wanted to discourage the
use of those.  I had recently decided to change those back to "true" out
of a sudden attack of pragmatism, but now I see that this (the "false"
setting) is causing a more serious problem.  In JSP 2.0, the meaning of
this flag is slightly different (I'm assuming) in that it appears a
setting of "false" means it won't evaluate EL expressions.

I'll try to get to fixing these tonight and getting it into the nightly
build, at least.

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



RE: Two basic questions regarding logic:equal

2003-11-02 Thread Karr, David
If you can use a Servlet 2.3 web container, you could instead use the
JSTL and Struts-EL.  Then, you could use the more powerful expression
language in the JSTL.  You can easily do boolean (multi-element)
comparisons in the EL.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED] 

1.)How do you compare one property of a bean with two values by a single
logic:equal tag?I want to achieve the following logic:

if(str.equals("astr") || str.equals("anotherstr"))

I guess logic:equal tag is for only one comparison...so what you  people
think is the most efficient way to achieve this?

2.)How do you compare one property of a bean with a value ignoring the
case by a logic:equal tag?I want to achieve the following logic:

if(str.equalsIgnoreCase("astr"))


Thanks,
Jitesh

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



RE: query on tag

2003-10-29 Thread Karr, David
If I'm understanding you correctly, "OrgChartImageAction.do" is the
action that on submission will GENERATE the coordinates that you need in
the REFERENCE to "OrgChartImageAction.do".  It seems like this won't
work.  You need to have your setup action for this page generate the
coordinates for the map, and then have this page submit to a different
action.

> -Original Message-
> From: Yoganarasimha G [mailto:[EMAIL PROTECTED] 
> 
> I'm trying to use  tag to display dynamically 
> generated image. here's the code
> 
>  here i want to 
> use "usemap" attribute.
> The coordinates for use map is generated dynamically when the 
> 'src="/path1/OrgChartImageAction.do"' 
> is triggered and i'm storing the imagemap string in session. 
> Can any one tell me how do i 
> specify "usemap" attribute so that finally i get html as follows..
> 
> 
> 
> 
> 

RE: upgrading Struts 1.1 to jdk 1.4 and weblogic 8.1 -Compilation errors

2003-10-27 Thread Karr, David
I doubt the JDK version upgrade is relevant here.  Are you using WLS 8.1
or 8.1 SP1?  Check with BEA support to get any relevant patches.  It's
possible that patch "CR112789" will resolve this.

> -Original Message-
> From: Ruta Thakkar [mailto:[EMAIL PROTECTED] 
> 
> Dear All,
> 
> I have been using Struts 1.1(stable release) with weblogic 
> 6.1,jdk1.3..now we are upgrading to weblogic 8.1/jdk1.4
> 
> Here is the code that i was using earlier to pass multiple 
> parameters in html:link:
> 
> 
>  property="airportCode" />
> 
> 
> <%
>   java.util.HashMap params = new 
> java.util.HashMap();
>   params.put("method", "getAirportDetails");
>   params.put("airportCode", airportCode );
>   pageContext.setAttribute("paramsName", params);
> %>
> 
>  property="airportCode" />
> 
> 
> 
>   
> 
> 
> 
> 
> this works fine with Weblogic 6.1 and jdk 1.3, But when i 
> upgraded to jdk 1.4 /weblogic 8.1,
> it gives me an error:
> cannot resolve symbol airportCode at line : 
> params.put("airportCode", airportCode );
> 
> 
> I know that jdk1.4 is stricter when it comes to compilation, 
> but does this imply that the bean:define tag is not compiant 
> with jdk1.4??
> 
> Pls guide me on how to proceed forward
> 
> 
> Regds
> Ruta
> 
> 
> DISCLAIMER:
> 
> Information contained and transmitted by this E-MAIL is 
> proprietary to Hexaware Technologies Limited and is intended 
> for use only by the individual or entity to which it is 
> addressed and may contain information that is privileged, 
> confidential or exempt from disclosure under applicable law. 
> If this is a forwarded message, the content of this E-MAIL 
> may not have been sent with the authority of the Company. If 
> you are not the intended recipient, an agent of the intended 
> recipient or a person responsible for delivering the 
> information to the named recipient, you are notified that any 
> use, distribution, transmission, printing, copying or 
> dissemination of this information in any way or in any manner 
> is strictly prohibited. If you have received this 
> communication in error, please delete this mail & notify us 
> immediately at [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:

2003-10-25 Thread Karr, David
The issue you're referring to is that you can't nest custom tags inside
custom tags.  The HTML "input" tag is not a custom tag, it's not
processed by the server in any way.  Also note that if you just use the
"html:hidden" tag from Struts-EL, you can do the same thing in less code
by using an EL expression for the attribute value (instead of an
embedded "c:out" element).

-Original Message-
From: Barry Volpe [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2003 3:39 PM
To: Struts Users Mailing List
Subject: Re: )

Barry

- Original Message - 
From: "Yong Tze Chi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 24, 2003 3:30 PM
Subject: Re:  How about this?
>
>  />">
>
> I'm still new to JSTL, Struts and all... so if I'm wrong, please
correct...
>
> Yong-Tze
>
> Barry Volpe wrote:
>
> >I am able to initialize a standard html hidden tag in a struts tag.
> >
> >
> >
> >
> >
> >
> >
> >Was wondering if all standard html tags can be used in struts html 
> >form
tags?
> >
> >I am using a request parameter
> >
> >myrequest.jsp?type=type1
> >
> >to do the following:
> >
> >
> >
> >   
> >
> >
> >
> >   
> >
> >
> >
> >   
> >
> >I want to avoid using an action to initialize form values.
> >
> >Any suggestions on doing this differently?
> >
> >Thanks,
> >Barry
> >
> >
> >
> >
> >
> >
> >
>
>
>
> -
> 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: Weird form! No data to action but all seems ok. Others work!

2003-10-23 Thread Karr, David
It might be your property names.  They appear to begin with multiple uppercase 
letters.  Try changing them to begin with at least two lowercase letters, and make 
your setters/getters uppercase the first character of the property name part.

-Original Message-
From: Jim Bruno Goldberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 3:18 AM
To: [EMAIL PROTECTED]
Subject: Weird form! No data to action but all seems ok. Others work!



Hi, All!

I am having some kind of weird problem. 
I have 54738276256347 jsp forms working ok, but one is not woirking. This "not 
working form" is just like the others, I revised that 324 times 
But it does not work and the others work. :(((
I am expend 2 days now trying to determine the problem, but unsucessfull. 
:((
I discover somethings:
- The form object is instanciated on JSP loading and again when JSP is 
submitted
- The JSP fields are not copyed to form object fields (that is the 
problem!!!)
- The request have a non filled form object
- Text fields does not work, too. :((
- The JSP is rendered property.
- The validation method on form object is executed, but none of the setters. 
:

PLEASE!! I really need some help.
Thanks for all.


The struts-config.xml 
have:--

  

   




End of 
file---

The Form 
Page:-
<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

   

Relatorios:


Pontos de Negócios:
 
 
 Natureza:
 
 Todas
 
  
  
 
 
 Tipo:
 
 Todas
 
  
 
 
 Grupo:
 
 Todas
 
  
 
 
 Especie:
 
 Todas
 
  
 
 
 Categoria:
 
 Todas
 
  
 
 
 
 Ordenação:
 
 
  







End of 
file---

The Form 
Object:-
/*
 * Created on 16/10/2003
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments  */ package 
athena.form.sell;

import java.sql.Date;


import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionMapping;

import org.apache.struts.validator.ValidatorForm;

import org.apache.commons.logging.*;

/**
 * @author Jim Bruno Goldberg
 *
 * MD5 Serviços Internet (C) 2003 (R) All right reserved
 */
public class ReportForm extends ActionForm {

int order;

long btype;
long bespecie;
long bcategory;
long bnature;
long bgroup;

Log log=LogFactory.getLog("SellReportForm");

/* CONSTRUCTORS */
public ReportForm() {
}


/* GETTERS */
public long getBPType() {
log.info("Type returned:"+btype);   
return btype;
}
public long getBPEspecie() {
log.info("Especie returned:"+bespecie);
return bespecie;
}
public long getBPCategory() {
log.info("Category returned:"+bcategory);
return bcategory;
}
public long getBPNature() {
log.info("Nature returned:"+bnature);
return bnature;
}
public long getBPGroup() {
log.info("Group returned:"+bgroup);
return bgroup;
}
public int getOrder() {
log.info("Order returned:"+order);
return order;
}

/* SETTERS */
public void setPBType(long a) {
log.info("Type set to "+a); 
btype = a;  
}
public void setPBNature(long a) {
log.info("Nature set to "+a);
bnature = a;
}
public void setPBGroup(long a) {
log.info("Group set to "+a);
bgroup = a;
}
public void setPBEspecie(long a) {
log.info("Especie set to "+a);
bespecie = a;
}

public void setOrder(int a) {
log.info("Order set to "+a);
   

RE: Good list for JSTL questions?

2003-10-23 Thread Karr, David
"taglibs-user"

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 3:34 PM
To: Struts Users Mailing List
Subject: Good list for JSTL questions?


What's a good list to address JSTL questions to?

Thanks.

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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

2003-10-23 Thread Karr, David
Do you only have one form tag on the page?

Have you walked through the ELFormTag execution in your debugger?

-Original Message-
From: Barry Volpe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 12:48 PM
To: Struts Users Mailing List
Subject: Re: 


The error I get is

cannot retrieve mapping for action /Results
so  
translates to /Results  (when type=Results)

but when type=ViewResults and I use



translates to /ViewResults

/View is disregarded in the first example??

Barry





- Original Message - 
From: "Chen, Gin" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 23, 2003 11:47 AM
Subject: RE: 


> What's the exact error that it gives you?
> -Tim
> 
> -Original Message-
> From: Barry Volpe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 23, 2003 2:45 PM
> To: Struts Users Mailing List
> Subject: 
> 
> 
> Hi,
> 
> 
> In my example
>  
> type=ViewResults
> 
>  and the following line will work
> (I could not get it to work with a c:out or a bean:write):
> 
> 
> 
> ${param.type} is translated into /ViewResults and that's okay.
> 
> Not complaining since I can directly put the JSTL in the action.
> 
> My question is how can I have type=Results and embed
> the word "View" in the action I tried the following but get an error.
> 
> 
> 
> would expect this to be evaluated to /ViewResults but again get an 
> error?
> 
> Any suggestions?
> 
> Barry
> 
> -
> 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:

2003-10-23 Thread Karr, David
Tomcat 4 or 5?

-Original Message-
From: Barry Volpe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 1:06 PM
To: Struts Users Mailing List
Subject: Re: 


Tomcat 

Barry
- Original Message - 
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 23, 2003 1:03 PM
Subject: RE: 


> What web container are you using?  Whenever I see fishy behavior from 
> the EL, I wonder if you're using Resin.
> 
> -Original Message-
> From: Barry Volpe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 23, 2003 12:48 PM
> To: Struts Users Mailing List
> Subject: Re: 
> 
> 
> The error I get is
> 
> cannot retrieve mapping for action /Results
> so  
> translates to /Results  (when type=Results)
> 
> but when type=ViewResults and I use
> 
> 
> 
> translates to /ViewResults
> 
> /View is disregarded in the first example??
> 
> Barry
> 
> 
> 
> 
> 
> - Original Message -
> From: "Chen, Gin" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, October 23, 2003 11:47 AM
> Subject: RE: 
> 
> 
> > What's the exact error that it gives you?
> > -Tim
> > 
> > -Original Message-
> > From: Barry Volpe [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 23, 2003 2:45 PM
> > To: Struts Users Mailing List
> > Subject: 
> > 
> > 
> > Hi,
> > 
> > 
> > In my example
> >  
> > type=ViewResults
> > 
> >  and the following line will work
> > (I could not get it to work with a c:out or a bean:write):
> > 
> > 
> > 
> > ${param.type} is translated into /ViewResults and that's okay.
> > 
> > Not complaining since I can directly put the JSTL in the action.
> > 
> > My question is how can I have type=Results and embed
> > the word "View" in the action I tried the following but get an 
> > error.
> > 
> > 
> > 
> > would expect this to be evaluated to /ViewResults but again get an
> > error?
> > 
> > Any suggestions?
> > 
> > Barry
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 


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


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



RE:

2003-10-23 Thread Karr, David
What web container are you using?  Whenever I see fishy behavior from
the EL, I wonder if you're using Resin.

-Original Message-
From: Barry Volpe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 12:48 PM
To: Struts Users Mailing List
Subject: Re: 


The error I get is

cannot retrieve mapping for action /Results
so  
translates to /Results  (when type=Results)

but when type=ViewResults and I use



translates to /ViewResults

/View is disregarded in the first example??

Barry





- Original Message - 
From: "Chen, Gin" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 23, 2003 11:47 AM
Subject: RE: 


> What's the exact error that it gives you?
> -Tim
> 
> -Original Message-
> From: Barry Volpe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 23, 2003 2:45 PM
> To: Struts Users Mailing List
> Subject: 
> 
> 
> Hi,
> 
> 
> In my example
>  
> type=ViewResults
> 
>  and the following line will work
> (I could not get it to work with a c:out or a bean:write):
> 
> 
> 
> ${param.type} is translated into /ViewResults and that's okay.
> 
> Not complaining since I can directly put the JSTL in the action.
> 
> My question is how can I have type=Results and embed
> the word "View" in the action I tried the following but get an error.
> 
> 
> 
> would expect this to be evaluated to /ViewResults but again get an 
> error?
> 
> Any suggestions?
> 
> Barry
> 
> -
> 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: Calling a javascript function with the tag

2003-10-16 Thread Karr, David
This is a very good reason to start using Struts-EL, the contrib tag
library that integrates the expression language of the JSTL with Struts
tags.

Your "bean:write" call in the attribute of the "html:link" tag doesn't
work because you can't embed custom tags in the attributes of custom
tags.

If you move to using Struts-EL (and the JSTL), your original code would
now look like this (and should work):





> -Original Message-
> From: Frederic Dernbach [mailto:[EMAIL PROTECTED] 
> 
> How can I call a javascript function with one parameter using a
>  tag (the parameter being different from row to row).
> 
> Below is a simple JSP snipplet which uses an iteration. Its first
> item prints a "code" property with an hyperlink with a "onclick"
> attribute that points to a javascript function with ONE parameter
> (closeWindowWithOK).
> 
> As you can see, I would like to pass the "code" property to the
> javascript function when the link is clicked on. 
> 
> How can I do this ? How should I write the "onclick" attribute of the
>  tag ? Obviously waht I write is wrong since I do 
> not get the
> expected result. 
> 
> Thanks in advance for your help.
> 
> Fred
> 
> 
> 
>   function closeWindowWithCode(myparameter)
>   {
>   opener.updateWith(myparameter);
>   window.close();
>   }
> 
> 
> 
> 
>   Code
> 
>property="signals"
>   id="signal" 
>   type="com.rubis.web.system.bean.SignalBean">
>   
> 
> 
>  href=''
>   onclick='closeWindowWithCode( property="code"/>)' >
>   
>   
> 
>  
>   
>   
> 
> 
> 
> 
> 
> 
> -
> 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: Indexed Properties examples?

2003-10-14 Thread Karr, David
Try changing the property value reference in your JSP to reference
"awardIndexed" instead of "AwardIndexed".  That might help, but I'm not
certain.

> -Original Message-
> From: Michael Blair [mailto:[EMAIL PROTECTED] 
> 
> I am still trying to get this to work. I simply want to 
> display records in
> table format in a browser and be able to change the data, do 
> a submit and
> have access to the changes back in the action. Currently I am 
> getting :
> "HTTP ERROR: 500 No getter method for property 
> AwardIndexed[0].safAwardCode
> of bean awards"
> 
> If I can offer anymore info, please ask. Also, if anyone has a working
> example of this I would love to see the snippets of the jsp, 
> formbean and
> any other relevant parts.
> 
> Mike
> 
> Here are some snippets.
> .jsp -
>  id="awards"
> scope="session" indexId="ctr">
>
>
> 
> form bean -
>   private ArrayList awards;
>  public void setAwardIndexed(int index, AwardMasView ob){
>   System.out.println("setAward");
>   this.awards.set(index, ob);
>  }
> 
>  public AwardMasView getAwardIndexed(int index){
>   System.out.println("getAward");
>   return (AwardMasView)this.awards.get(index);
>  }

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



RE: Using logic:iterate with twin Collections

2003-10-06 Thread Karr, David
You say you're getting the error page with no stack trace.  Are you
saying the exception object is null?  Have you executed this in your
debugger to see if it gets to the setter method?

> -Original Message-
> From: Justin Mahoney [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 03, 2003 5:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Using logic:iterate with twin Collections
> 
> 
> Edit: the class should really be:
> 
> public class PrimaryKeyIndexedProperty {
> private PrimaryKey[] primaryKeys;
> 
> public PrimaryKeyIndexedProperty(int size) {
> primaryKeys = new PrimaryKey[size];
> }
> 
> public PrimaryKey getIndexedPrimaryKey(int index) {
> return primaryKeys[index];
> }
> 
> public void setIndexedPrimaryKey(int index, PrimaryKey value) {
> primaryKeys[index] = value;
> }
> }
> 
> and I tried both ways in the JSP:
> property="indexedPrimaryKey[index]"
> property='<%= "indexedPrimaryKey[" + index + "]" %>'
> 
> But still no luck, I'm still getting the error.jsp page.
> Any ideas?
> 
> -Original Message-
> From: Justin Mahoney 
> Sent: Friday, October 03, 2003 4:57 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Using logic:iterate with twin Collections
> 
> 
> I tried changing the property attribute as suggested, but no 
> luck. I'm just
> being forwarded to the global error page with no stack trace 
> when it tries
> to execute the JSP (in either case).
> Is this an appropriate class for the keyFields property?:
> 
> public class PrimaryKeyIndexedProperty {
> private PrimaryKey[] primaryKeys;
> 
> public PrimaryKeyIndexedProperty(int size) {
> primaryKeys = new PrimaryKey[size];
> }
> 
> public PrimaryKey getIndexed(int index) {
> return primaryKeys[index];
> }
> 
> public void setIndexed(int index, PrimaryKey value) {
> primaryKeys[index] = value;
> }
> }
> 
> Thanks,
> Justin
> 
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 01, 2003 2:43 PM
> To: Struts Users Mailing List
> Subject: RE: Using logic:iterate with twin Collections
> 
> 
> Try changing your "property" attribute to the following:
>   '<%= "keyFields[" + index + "]" %>'
> 
> This is assuming you really do have an indexed property setter for the
> "keyFields" property.
> 
> > -Original Message-
> > From: Justin Mahoney [mailto:[EMAIL PROTECTED] 
> > 
> > Thanks David,
> > I tried doing that, along the following lines:
> > 
> >> property="keyFields[index]">
> > 
> > But I get:
> >   
> > <[WebAppServletContext(3016177,mywebapp,/mywebapp)] Root cause of
> > ServletException
> > java.lang.IllegalArgumentException: Invalid indexed property
> > 'keyFields[index]'
> > -Original Message-
> > From: Karr, David [mailto:[EMAIL PROTECTED]
> > 
> > You'll have to use the "indexId" attribute to allow you to 
> > reference the
> > index value, and then directly reference the entry of the other
> > collection using that value.
> > 
> > > -Original Message-
> > > From: Justin Mahoney [mailto:[EMAIL PROTECTED] 
> > > 
> > > Hi,
> > > I have two Collections (ArrayLists) with an equal number of 
> > > elements that
> > > are directly related to each other, but the child elements have no
> > > references to each other. How can I use the logic:iterate tag 
> > > to iterate
> > > over the first and pull out the corresponding element from 
> > > the other for use
> > > in the html:link tag?
> > > Specifically, the second Collection is an ArrayList of 
> Maps for the
> > > html:link tag's use with the 'property' attribute.
> > > Thanks,
> > > Justin
> > > 
> > 
> > 
> -
> > 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: Handling Exceptions in ActionForm

2003-10-02 Thread Karr, David
> -Original Message-
> From: Shane Mingins [mailto:[EMAIL PROTECTED] 
> 
> Using Struts, if I have an ActionForm implement the view 
> interface, how
> would it create an ActionError or ActionMessage?  It seems 
> that from an
> ActionForm the validate() method can do it, and an Action can 
> do it but is
> it possible to create an ActionError and save it from my
> duplicateException() method?

Any validation logic in the ActionForm should only be basic syntactical
validation, and no semantic validation.  Semantic validation belongs in
your Action class, and likely in business logic called from your Action
class.

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



RE: can not get bean property, help!!

2003-10-02 Thread Karr, David
That's a different error.  You always have to quote attribute values.
Start with that, and focus on the other problem.  Try restating your
problem, showing exactly what you have and what error you're getting.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> 
> thank you, David, actually i tried single quote '   ...' 
> before, however 
> it doesnt work, always  gave me
> Cannot retrieve mapping for action /'  error
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> > 
> > Hi, I have an attribute called "actionName" in my actionformbean
> > and I set it properly in my action class before forward to my jsp
> > in the jsp I try to retrieve it like this:
> > >
> > ...
> > ...
> > 
> > 
> > it always gives me "Attribute value must be quoted" error 
> message in 
> > action.jsp
> > anything wrong ?
> 
> Well, I don't know how much clearer that error message could be.  You
> need to change this:
> 
> >
> 
> To:
> 
> 

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



RE: can not get bean property, help!!

2003-10-02 Thread Karr, David
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> 
> Hi, I have an attribute called "actionName" in my actionformbean
> and I set it properly in my action class before forward to my jsp
> in the jsp I try to retrieve it like this:
> >
> ...
> ...
> 
> 
> it always gives me "Attribute value must be quoted" error message in 
> action.jsp
> anything wrong ?

Well, I don't know how much clearer that error message could be.  You
need to change this:

>

To:



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



RE: Using logic:iterate with twin Collections

2003-10-01 Thread Karr, David
Try changing your "property" attribute to the following:
  '<%= "keyFields[" + index + "]" %>'

This is assuming you really do have an indexed property setter for the
"keyFields" property.

> -Original Message-
> From: Justin Mahoney [mailto:[EMAIL PROTECTED] 
> 
> Thanks David,
> I tried doing that, along the following lines:
> 
>property="keyFields[index]">
> 
> But I get:
>   
> <[WebAppServletContext(3016177,mywebapp,/mywebapp)] Root cause of
> ServletException
> java.lang.IllegalArgumentException: Invalid indexed property
> 'keyFields[index]'
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> 
> You'll have to use the "indexId" attribute to allow you to 
> reference the
> index value, and then directly reference the entry of the other
> collection using that value.
> 
> > -Original Message-
> > From: Justin Mahoney [mailto:[EMAIL PROTECTED] 
> > 
> > Hi,
> > I have two Collections (ArrayLists) with an equal number of 
> > elements that
> > are directly related to each other, but the child elements have no
> > references to each other. How can I use the logic:iterate tag 
> > to iterate
> > over the first and pull out the corresponding element from 
> > the other for use
> > in the html:link tag?
> > Specifically, the second Collection is an ArrayList of Maps for the
> > html:link tag's use with the 'property' attribute.
> > Thanks,
> > Justin
> > 
> 
> -
> 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 logic:iterate with twin Collections

2003-10-01 Thread Karr, David
You'll have to use the "indexId" attribute to allow you to reference the
index value, and then directly reference the entry of the other
collection using that value.

> -Original Message-
> From: Justin Mahoney [mailto:[EMAIL PROTECTED] 
> 
> Hi,
> I have two Collections (ArrayLists) with an equal number of 
> elements that
> are directly related to each other, but the child elements have no
> references to each other. How can I use the logic:iterate tag 
> to iterate
> over the first and pull out the corresponding element from 
> the other for use
> in the html:link tag?
> Specifically, the second Collection is an ArrayList of Maps for the
> html:link tag's use with the 'property' attribute.
> Thanks,
> Justin
> 

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



RE: Deploying web app (.ear = .jar + .war) under Weblogic with Struts

2003-10-01 Thread Karr, David
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> 
> I am trying to deploy a .ear application under Bea Weblogic 7.0 using
> Struts 1.1.
> 
> What happens (funny) is that if I deploy my webapp.war 
> (containing the web
> module and Struts library) and webapp.jar (containing ejbs) 
> at the same
> time, everything works properly and the web application 
> integrates happily
> with ejbs.
> 
> But if I merge the two files into a .ear, it deploys 
> correctly, but when I
> launch the application I get the following error message:
> 
> java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm

I'm assuming you're pursuing this with BEA Support?

You might turn on "-verbose:class" on the JVM.  It might give you a
clue.

Check to see what other jars are in the EAR classpath (like in the
appserver).

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



RE: Problems executing an action twice ...

2003-09-30 Thread Karr, David
> -Original Message-
> From: Michel Bertrand [mailto:[EMAIL PROTECTED] 
> 
> I'm facing something I call "strange struts behavior". I have 
> the following
> situation : 
> 
> 1) I have a list iterator on a form. Each list member has a 
> link calling a 
> href="./someAction.do?parameter=value".
> 
> 2) When I execute the action once everything works fine. It goes to 
> the URL set by the action, loads the form, executes and go 
> back to my list.
> 
> 3) When I try to execute the action again Struts doesn't do anything
> and shows me a blank page with the URL to my action.
> 
> What's up ? Am I doing something wrong ? Should I have a special
> implementation or configuration to execute an action twice ? 

Yes, you're doing something wrong :) .  We just don't have enough
information to know for sure what that is.

Is that really the "href" attribute value, beginning with "./"?  That
period doesn't make any sense.

You can be sure that "Struts doesn't do anything" is certainly false,
you just haven't looked closely enough to see what it did.  Can you
verify whether it got into the "execute" method of your Action?  Did it
find a non-null ActionForward to return?

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



RE: Retrieving value of java script variable in a Scriplet

2003-09-30 Thread Karr, David
I'm afraid you've misunderstood the lifecycle of scriplet code vs.
JavaScript code.  Scriptlets are executed on the server side, and
generate output which is processed on the client side, which includes
the JavaScript that you've generated. The JavaScript is then executed on
the client side.  Thus, the scriptlet code and the JavaScript code are
executed at completely different times, in very different environments.

> -Original Message-
> From: Raghu.Ramakrishnan [mailto:[EMAIL PROTECTED] 
> 
> Does any one know how I could retrive a Java script variable between a
> scriplet code
> 
> Eg:
> 
> for (var i = 0; i<= (listSize-1); i++) 
>   {
>   var pay = '<%= orgAmcStmt %>';
>   alert ("The current Index is Before the Scriplet is:" +
> pay);
>   <%  
>   if (list.size()!= 0)
>   {
>   // I would like to get the Value of i
> here 
>   }
>   %>
> }
> 
> I would like to get the value of i withing the scriplet

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



RE: No Error Message But A Blank Page Is Displayed.

2003-09-30 Thread Karr, David
I would want to see your "web.xml", and any information that shows up in
the Tomcat console (not log file).

> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> 
> I am experimenting a basic application - logon.  I got
> the first two screens working without problem. 
> However, the third screen displays a blank page (no
> error message).  I am having a very difficult time to
> figure out the problem; henceforth, seeking help. 
> Here is the history of my application:
> 
> 1. http://localhost:8080/LogonPractice/index.jsp (no
> problem and I clicked on "Sign in")
> 2.
> http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50
> E4D8E07EE36290E98342E8BF9C
> (no problem and the screen asked for username and
> password.  I filled out the information and clicked on
> "Submit")  
> 3. http://localhost:8080/LogonPractice/LogonSubmit.do
> (displayed a blank page)
> 
> The Tomcat log file shows the following (no error
> message at all):
> 
> 2003-09-29 23:29:26 action: Processing a GET for
> /Logon
> 2003-09-29 23:29:26 action:  Looking for Action
> instance for class
> org.apache.struts.actions.ForwardAction
> 2003-09-29 23:29:26 action:   Double checking for
> Action instance already there
> 2003-09-29 23:29:26 action:   Creating new Action
> instance
> 2003-09-29 23:29:35 action: Processing a POST for
> /LogonSubmit
> 2003-09-29 23:29:35 action:  Looking for ActionForm
> bean under attribute 'logonForm'
> 2003-09-29 23:29:35 action:  Creating new ActionForm
> instance of class 'org.apache.artimus.logon.LogonForm'
> 2003-09-29 23:29:35 action:  Storing instance under
> attribute 'logonForm' in scope 'request'
> 2003-09-29 23:29:35 action:  Populating bean
> properties from this request
> 2003-09-29 23:29:35 action:  Validating input form
> properties
> 2003-09-29 23:29:35 action:   No errors detected,
> accepting input
> 2003-09-29 23:29:35 action:  Looking for Action
> instance for class
> org.apache.artimus.logon.LogonAction
> 2003-09-29 23:29:35 action:   Double checking for
> Action instance already there
> 2003-09-29 23:29:35 action:   Creating new Action
> instance
> 
> in my struts-config.xml, I have:
> 
>  path="/LogonSubmit"
>
> type="org.apache.artimus.logon.LogonAction"
> name="logonForm"
> scope="request"
> validate="true"
> input="/signin/Logon.jsp">
>  name="valid"
> path="/signin/Welcome.jsp"/>
> 
> 
> and my LogonAction.java is:
> 
> package org.apache.artimus.logon;
> 
> import java.io.IOException;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionError;
> import org.apache.struts.action.ActionErrors;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionServlet;
> 
> import org.apache.artimus.lang.Constants;
> 
> public final class LogonAction extends Action {
> 
> public boolean isUserLogon(String username,
> String password) throws UserDirectoryException
> {
> 
> return
> (UserDirectory.getInstance().isValidPassword(username,password));
> // return true;
> 
> }
> 
> 
> public ActionForward execute(ActionMapping
> mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
> 
> // Obtain username and password from web tier
> String username = ((LogonForm)
> form).getUsername();
> String password = ((LogonForm)
> form).getPassword();
> 
> // Validate credentials with business tier
> boolean validated = false;
> try {
> 
> validated =
> isUserLogon(username,password);
> }
> 
> catch (UserDirectoryException ude) {
> // couldn't connect to user directory
> ActionErrors errors = new ActionErrors();
> errors.add(ActionErrors.GLOBAL_ERROR,
> new ActionError("error.logon.connect"));
> saveErrors(request,errors);
> // return to input page
> return (new
> ActionForward(mapping.getInput()));
> }
> 
> if (!validated) {
> // credentials don't match
> ActionErrors errors = new ActionErrors();
> errors.add(ActionErrors.GLOBAL_ERROR,
> new ActionError("error.logon.invalid"));
> saveErrors(request,errors);
> // return to input page
> return (new
> ActionForward(mapping.getInput()));
> }
> 
> // Save our logged-in user in the session,
> // because we use it again later.
> HttpS

RE: How-to hide JSPs in WEB-INF (OT?)

2003-09-29 Thread Karr, David
Yup.  However, there is a possible trick (which I haven't tried) which
is related to this.  You could still set your welcome file to "index.do"
(along with the security constraint for JSPs) if you just create a plain
file named "index.do", whose contents are irrelevant.  Apparently, the
container starts to serve the plain file, but the servlet mapping
handles it first.  One of these days I should actually try that :) , to
verify whether it works for me.

> -Original Message-
> From: Chen, Gin [mailto:[EMAIL PROTECTED] 
> 
> Ahh.. Interesting.. But doesn't that stop the welcome-file too?
> -Tim
> 
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED] 
> 
> > -Original Message-
> > From: Fenderbosch, Eric [mailto:[EMAIL PROTECTED] 
> > 
> > Is there a how-to on hiding JSPs in WEB-INF?  I keep getting 
> > 404 errors after moving them there.  I google'd the problem, 
> > but didn't really find a how-to, but did find a couple posts 
> > that say this might be impossible with WebLogic 6.1.  Can 
> > anyone confirm or deny that?
> 
> This is one of those aspects that BEA interpreted a little differently
> than other vendors.  The spec says (paraphrased) that you can't serve
> content from the WEB-INF directory.  BEA took that to mean even
> "forward" references, but most other vendors allow that.
> 
> The other strategy for protecting direct access to JSP urls, 
> is adding a
> security constraint for all JSP pages, for the role "nobody". 
>  That will
> allow you to prevent direct URL references to JSP pages, but 
> still allow
> forwards to them.

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



RE: How-to hide JSPs in WEB-INF (OT?)

2003-09-29 Thread Karr, David
> -Original Message-
> From: Fenderbosch, Eric [mailto:[EMAIL PROTECTED] 
> 
> Is there a how-to on hiding JSPs in WEB-INF?  I keep getting 
> 404 errors after moving them there.  I google'd the problem, 
> but didn't really find a how-to, but did find a couple posts 
> that say this might be impossible with WebLogic 6.1.  Can 
> anyone confirm or deny that?

This is one of those aspects that BEA interpreted a little differently
than other vendors.  The spec says (paraphrased) that you can't serve
content from the WEB-INF directory.  BEA took that to mean even
"forward" references, but most other vendors allow that.

The other strategy for protecting direct access to JSP urls, is adding a
security constraint for all JSP pages, for the role "nobody".  That will
allow you to prevent direct URL references to JSP pages, but still allow
forwards to them.

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



RE: Urgent: No Getter Method found

2003-09-26 Thread Karr, David
> -Original Message-
> From: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] 
> 
> txtUserGroupCode of bean org.apache.struts.taglib.html.BEAN]: 
> javax.servlet.jsp.JspException: No getter method for property 
> txtUserGroupCode of bean org.apache.struts.taglib.html.BEAN
> 
> i have following code in the Action Clas...  still i am 
> getting the error please Sugest solution for this...
> 
>  public String getTxtUserGroupCode()
>  {
>   return this.txtusergroupcode ;
>  }
> 
>  public void setTxtUserGroupCode(String s)
>  {
>   this.txtusergroupcode = s ;
>  }

There are two clues here.  First, the fact that it says the bean is
"org.apache.struts.taglib.html.BEAN" means that you haven't associated
the reference with an existing ActionForm or bean.  Second, these
accessors have to go in your ActionForm or bean class, not in the Action
class.

The name of your instance variable is irrelevant (in reference to other
responses to this question).

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



RE: Disabling Buttons on View

2003-09-25 Thread Karr, David
> -Original Message-
> From: Shane Mingins [mailto:[EMAIL PROTECTED] 
> 
> I have not used any of the JSTL tags which I am assuming 
>  is??  
> 
> So I downloaded the JSTL library and included the core 
> library EL:  <%@
> taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> in my JSP
> 
> The  is recognized :-)
> 
> But the  ... disabled="<%=disable %> ... is not found.

What do you mean "is not found"?  Are you getting an error message?  If
so, what's the error message?  Are you including the taglib directives
for the Struts tag libraries?  It's hard to help if you don't tell us
exactly what happened.

> So is a preferred way of doing things when it comes to tags?  
> Is there an
> explanation of these options anywhere?  Am I making any sense *grin* ?

The best advice I could give would be to read the JSP specification, the
JSTL specification, and the Struts user guide and api reference.

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



RE: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Karr, David
(If I were you, I wouldn't CC people on notes to this list (and many
other lists).)

> -Original Message-
> From: Jing Zhou [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 22, 2003 12:20 PM
> To: Struts Users Mailing List
> Cc: Craig R. McClanahan
> Subject: Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts
> 
> Craig,
> 
> Thanks for your confirmation. It does appear to be a bug in 
> WebLogic 8.1.
> I programmed a filter to work around this problem and some other
> issues in Oracle OC4J 9.0.3. It works fine. But I discovered 
> the following
> behavioral differences between different vendors:

Did you find a bug report describing this in the BEA Support database?

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



RE: how to replace

2003-09-23 Thread Karr, David
You can use "" and specify a "var" attribute to put the
result into a scoped variable.  Note that part of the setup for the
"fmt" tag library is setting the
"javax.servlet.jsp.jstl.fmt.localizationContext" context parameter to
the "class name" of your properties file (normally just the base name).

> -Original Message-
> From: Dom [mailto:[EMAIL PROTECTED] 
> 
> I want to use one of the attributes in 
> ApplicationMessages.properties as an
> attribute in a JSTL tag. How can I implement it in the jsp only ?

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



RE: form is always null in action

2003-09-11 Thread Karr, David
It may seem odd, but the "name" attribute of the "action" element is
associated with the form bean.  If you change the value from
"shoppingCart" to "ShoppingCartForm" (or vice versa), then they will
match up.

> -Original Message-
> From: Stephane Grenier [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 1:23 PM
> To: Struts Users Mailing List
> Subject: form is always null in action
> 
> 
> Hello all.
> 
> I can't seem to figure this one out. My form object in my 
> action class is always null. Any help would be greatly 
> appreciated. Here are my settings of importance:
> 
> Struts-config.xml:
> 
> 
>  type="com.rana.release.forms.ShoppingCartForm" />
> 
> 
> 
> type="com.rana.release.actions.ShoppingCartAction"
>   name="shoppingCart"
>   scope="session">
>   
>   
>  
> 
> 
> what I do to get to this page is call the following from a 
> jsp this way:
> 
> shopping cart
> 
> And the purchase.jsp contains the following:
> 
> name="ShoppingCartForm" 
> type="com.rana.release.forms.ShoppingCartForm" scope="session">
>  
>  Checkout
>
> 
> For my action, the code is simply:
> ShoppingCartForm shoppingCartForm = (ShoppingCartForm)form;
> 
> System.out.println(form);
> 
> And this results always in a null object. Any help would be 
> greatly appreciated.
> 
> Thanks,
> 
> Stephane
> 
> 
> 
> 
> 

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



RE: [OT] JSTL question

2003-09-11 Thread Karr, David
Actually, in this case, "loop.index" is probably more appropriate.  They
are similar, but different.

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 1:54 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] JSTL question
> 
> 
> You need to put loop.COUNT : 
> 
>  
> 
> Erez
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 9:50 PM
> To: Struts Users Mailing List
> Subject: [OT] JSTL question
> 
> Ok, i have a map named selectBox that contains a number of ArrayLists
> keyed by strings.
> 
> When I try to iterate over it, nothing happens!
> 
>   
> Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
> java.com.blah.bean]
> 
> 
> shows something like: java.com.blah.bean
> 
> 
> shows the value stored in the bean under the property key.
> 
> 
> However when i try to do this:
> 
> 
> 
>  
>  
> 
> 
> nothing shows.
> 
> I am really confused.  What am I doing wrong?
> 
> Thanks.
> 
> Denis
> 
> 
> 
> -
> 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]



Mapped properties call setter method twice?

2003-09-11 Thread Karr, David
Gee, it's been a while since I've gotten to write some code actually
USING Struts instead of inside of it (the EL part, at least).

I'm using Struts 1.1, with WebLogic 8.1.

I have a multibox that is using a mapped property.  The setter in the
bean properly gets called with the key and value.  The odd thing is that
the setter gets called twice.  The stack trace is identical between the
two calls.  In my test case, I have two checked checkboxes, and I see
the setter get called first with the first checkbox value, then with the
second checkbox value, then it does them both again.

This isn't critical, as each call is sending the same data, I'm just
trying to understand why it would be calling the method twice.

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



RE: Combining struts and JSTL tags...

2003-09-09 Thread Karr, David
Well, I don't know exactly what your parse exception is, but you
probably want to use "Struts-EL" instead of plain Struts, if you're
using JSTL.  It integrates better with the JSTL than plain Struts.

Also, you appear to be using the TLD from Struts 1.0.2, not Struts 1.1.

> -Original Message-
> From: Loren Hall [mailto:[EMAIL PROTECTED] 
> 
> i haven't found a resolution to a problem previously posted 
> under another
> subject, since it fits this topic I thought
> i'd put it out there again.
> 
> I started my app using struts tags, and recently incorporated jstl.
> 
> Unfortunately I get an error when I import both 
> struts-bean.tld and c.tld
> 
> c.tld:   http://java.sun.com/jstl/core)
> struts-bean.tld:
> http://jakarta.apache.org/struts/tags-bean-1.0.2)
> 
> i.e. when these 2 taglib directives appear on a single .jsp
> 
> <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> 
> i get the following exception:  jsp.error.tlv.invalid.page
> 
> null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" 
> was already
> specified for element "jsp:root".
> 
> 
> 
> FULL ERROR MESSAGE
> ```
> 
> HTTP Status 500 -
> type Exception report
> message
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
> 
> exception
> 
> org.apache.jasper.JasperException:
> 
> jsp.error.tlv.invalid.page
> 
> null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" 
> was already
> specified for element "jsp:root".
> 
>   at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(Defaul
> tErrorHandler.
> java:105)
>   at
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispa
> tcher.java:430
> )
>   at
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispa
> tcher.java:112
> )
>   at
> org.apache.jasper.compiler.Validator.validateXmlView(Validator
> .java:661)
>   at
> org.apache.jasper.compiler.Validator.validate(Validator.java:613)
>   at
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
>   at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
>   at
> org.apache.jasper.JspCompilationContext.compile(JspCompilation
> Context.java:4
> 73)
>   at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:1
> 90)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:295)
>   at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
>   at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:256)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:191)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2415)
>   at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180
> )
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.
> java:171)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>   at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:172
> )
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java
> :174)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalin

RE: Problem converting from Struts tags to JSTL

2003-08-27 Thread Karr, David
> -Original Message-
> From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] 
> 
> Thanks for the pointer to the user guide, but unfortunately it doesn't
> help.
> 
> I tried:
> 
> 
> 
> And
> 
> 
> 
> And
> 
> 
> 
> But those didn't work either.
> 
> I think the problem is with the nested evaluation - combining the
> scriptlet and the EL.
> 
> Any other ideas?

First of all, if noone's mentioned this yet, the "taglibs-user" list is
a better place to discuss this.

I believe that the following will do what you want:

  

The similar expression of:

  

Doesn't do the same thing.

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



RE: JSTL in html-el:option

2003-07-31 Thread Karr, David
This may have nothing to do with your problem, but the "value" attribute
of "html-el:option" should be "${status.count}" and not "".
That's the whole point of the library :) .

What web container are you using?

> -Original Message-
> From: Barry Volpe [mailto:[EMAIL PROTECTED]
> 
> I get the same problem:
> 
> Attribute ${status.count} has no value
> 
> Barry
> 
> - Original Message -
> From: "Steve Raeburn" <[EMAIL PROTECTED]>
> 
> > You need to use varStatus to get the current index:
> >
> > 
> > 
> > ">
> > 
> > 
> > 
> > 
> >
> > Steve
> >
> > > -Original Message-
> > > From: struts [mailto:[EMAIL PROTECTED]
> > >
> > > The following yields Attribute ${i} has no value (first
occurrence)
> error.
> > >
> > > 
> > >  
> > >  "> > > value="${i}"/>
> > >  
> > > 
> > >
> > > Any suggestions on alternative syntax?

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



RE: JSTL and Struts

2003-07-31 Thread Karr, David
I think it would help if you spelled out for yourself exactly what "this
functionality" really means.

> -Original Message-
> From: Mainguy, Mike [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 7:44 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL and Struts
> 
> I did it that way in a previous application and it seemed to work
well,
> but
> it just seems like this functionality is so necessary that it
would be
> built into the presentation taglib (and perhaps with the validator
> framework).
> 
> Is it safe to say that perhaps it has not been implemented or
discussed
> because it is an obvious shortcoming and something that will be better
> addressed by JSF than by rewriting chunks of the delivered stuff?
> 
> 
> -Original Message-
> From: Vic Cekvencih [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 10:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: JSTL and Struts
> 
> One way is to localize inside the getter of the formbean.
> .V
> 
> Mainguy, Mike wrote:
> > I'm in a quandary.  We're examining a way to do simple formatting of
our
> > model data.  For example, when currency data comes out of the
database,
> > it needs to be rendered as $1,000.00 or whatever.  This is a very
common
> > thing and we where going to do it using a custom formatting object
to do
> > this when we move the data from the model into the form (and visa
> > versa).  After some examination, it turns out the JSTL does this,
but it
> > doesn't appear to support it for  tags.
> >
> >
> >
> > How is this possible!?  Am I missing something?  Why would that not
be
> > the case, how often (in a business app) would you need to format
data
> > for display, but not for edit?
> >
> >
> >
> > Does anyone have any insight on best practices/direction in this
arena?
> > Typically we would do this in a utility class in the manner
described
> > above, but it seems a little clunky doing it this way given the
state of
> > the current tag-libs.
> >
> >
> >
> > This message and its contents (to include attachments) are the
property
> > of Kmart Corporation (Kmart) and may contain confidential and
> > proprietary information. You are hereby notified that any
disclosure,
> > copying, or distribution of this message, or the taking of any
action
> > based on information contained herein is strictly prohibited.
> > Unauthorized use of information contained herein may subject you to
> > civil and criminal prosecution and penalties. If you are not the
> > intended recipient, you should delete this message immediately.
> >
> >
> >

> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> This message and its contents (to include attachments) are the
property of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> information contained herein is strictly prohibited. Unauthorized use
of
> information contained herein may subject you to civil and criminal
> prosecution and penalties. If you are not the intended recipient, you
> should delete this message immediately.
> 
> 
> 
> -
> 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 Action in Welcome File List

2003-07-30 Thread Karr, David
Well, I haven't tried this, but I did notice someone a while ago saying
that this DOES work, as long as you use a small trick.  The
"welcome-file" does have to specify a file that exists, but that doesn't
mean the web container will actually SERVE that file.  The person who
mentioned this said that they just created the named file and gave it
arbitrary contents (like "This will never be served to the client").
The web container then passed the URL to the controller, which forwarded
to the appropriate action.

> -Original Message-
> From: Suzette Daniel [mailto:[EMAIL PROTECTED]
> 
> Nope this is not supported, the web.xml must map to a file.
> 
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> 
> Can't you just do this:
> 
> 
>/PMTAction.do
> 
> 
> I do it with JRun4.  Not sure if all containers will do an action
instead
> of
> a JSP.
> 
> -Original Message-
> From: Jon Wynacht [mailto:[EMAIL PROTECTED]
> 
> Hmmm...tried that but still blanks out after a while...I'm wondering
if
> there's an issue with my use of sessions...would that come into play
> here?

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



RE: ServletMapping and possible bug in getActionMappingURL()

2003-07-28 Thread Karr, David
Change "/*.do" to "*.do" and you should be ok.

> -Original Message-
> From: Canning, Chuck [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 3:56 PM
> To: 'Struts Users Mailing List'
> Subject: ServletMapping and possible bug in getActionMappingURL()
> 
> Is this a valid servlet mapping?
> 
> 
> StrutsController
> /*.do
> 
> 
> if so, the RequestUtils.getActionMappingURL() will not handle it in
> struts1.1 (not sure about earlier versions). It causes it to ignore
the
> action mapping.
> 
> Chuck
> 
> -
> 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 use JSTL taglib with struts html taglib

2003-07-28 Thread Karr, David
In the "contrib" directory of the Struts distribution, you'll find the
"Struts-EL" distribution, which is a "port" of the Struts tag library
that uses the JSTL EL engine to evaluate attribute values.  Search the
archives for "Struts-EL".  There is a "README" in the Struts-EL
distribution, and there's a few paragraphs in the Struts website
documentation.  Despite the extreme paucity of documentation for it, it
should be relatively clear how to use it, along with references from the
archives.

> -Original Message-
> From: White, Joshua A (HTSC, CASD)
[mailto:[EMAIL PROTECTED]
> 
> I would like to use the struts html taglig to generate a bunch of
> checkboxes.  While the following is not correct, it encapsulates what
I
> would like to do:
> 
> 
> 
> 
> 
> I am looping throught the collection using the jstl forEach tag.  The
> problem is that c:out is not evaluated as a runtime expression
(actually,
> it
> is not evaluated at all).  Using c:set to set a page level variable
that
> you
> could use in a runtime expression does not work either.
> 
> Is there a way to use both jstl and the struts html taglib here?  How
can
> it
> be done?
> 
> Regards,
> 
> Joshua
> 
> 
> 
> This communication, including attachments, is for the exclusive use of
> addressee and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, any use, copying,
> disclosure, dissemination or distribution is strictly prohibited. If
> you are not the intended recipient, please notify the sender
> immediately by return email and delete this communication and destroy
all
> copies.
> 
> 
> -
> 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 and JSTL - Basic Questions

2003-07-17 Thread Karr, David
You can use the Struts tag library with the JSTL, although you'd get
better integration with the "Struts-EL" tag library, which is part of
the Struts distribution.  This is an integration of the Struts tag
library with the EL engine in the JSTL.

The pre-JSP2.0 version of the JSTL can be used with Struts 1.1 on
JSP1.2-compliant containers.

> -Original Message-
> From: Mike Duffy [mailto:[EMAIL PROTECTED]
> 
> I am just starting to explore JSTL.
> 
> I can see how JSTL will replace the Struts logic tags, but what about
> the Struts html tags?
> 
> Will Struts html tags be used along with JSTL?
> 
> A map can be used with JSTL to create the select options for a drop
> down list.  Will the select tag itself reamin an html:select tag
> (will we mix both Struts and JSTL tags)?
> 
> Finally, can the latest version of JSTL be used with the latest
> version of Struts?
> 
> Does any know of an article or book that provides guidance on, "Using
> JSTL with Struts."
> 
> Thanks.
> 
> Mike
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.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: Upgrading to Struts 1.1

2003-07-01 Thread Karr, David
Why does it say "apche"?  You didn't type this in manually, did you?

> -Original Message-
> From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]
> 
> If you look near the bottom of your error messages, it says:
> 
> Caused by: java.lang.ClassNotFoundException:
> org.apche.commons.logging.impl.SimpleLog
> 
> Possibly you don't have commons-logging in your project any more?
> 
> -Original Message-
> From: Natalie D Rassmann [mailto:[EMAIL PROTECTED]
> 
> Hi,
> 
> Is anyone having trouble upgrading to Struts 1.1?  I upgraded to
Struts
> RC2 a few weeks ago no problem but when I try and upgrade to Struts
1.1;
> I gett the following errors.  Can anyone help?
> 
> java.lang.ClassNotFoundException:
> org.apche.commons.logging.impl.SimpleLog
>  at
>
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFact
or
> yImpl.java:416)

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



RE: Struts 1.1 bean:write problem

2003-06-30 Thread Karr, David
Have we seen your web.xml and struts-config.xml file yet?

> -Original Message-
> From: Steve Raeburn [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 30, 2003 4:01 PM
> To: Struts Users Mailing List
> Subject: RE: Struts 1.1 bean:write problem
> 
> Could you post the code that's causing the problem? The section of the
> action that places the object you're trying to display and the jsp
code
> that
> displays it would be helpful.
> 
> Also, try getting the struts-blank application to work. Then at least
> we'll
> know that Struts release 1.1 (it's good to be able to say that ;-) )
works
> on your setup. If it does, then maybe you could try  add just the bean
> setup
> and display code that you think is causing the problem.
> 
> Steve
> 
> > -Original Message-
> > From: David Jiao [mailto:[EMAIL PROTECTED]
> > Sent: June 30, 2003 1:52 PM
> > To: Struts Users Mailing List
> > Subject: RE: Struts 1.1 bean:write problem
> >
> >
> > My initial guess was not because of the bean:write. But then I found
out
> > the error only happens when I use the bean:write for a long type.
> >
> > I checked the log file and the only message there are the same as
listed
> > on the page.
> >
> > I am sure that it's the bean:write problem or has something to do
with
> > that because after I remove that line of code, it works.
> >
> > BTW, I am using jdk1.3.1 and tomcat 4.1.18.
> >
> > Thanks
> >
> > David
> >
> >
> >
> > On Mon, 2003-06-30 at 15:32, Steve Raeburn wrote:
> > > Works for me with both Long and long properties.
> > >
> > > The exception message doesn't seem to be anything to do with this.
> Often
> > > it's a sympton that the ActionServlet has not initialised
properly.
> > > Check your logs for other error messages that may have prevented
> > > ActionServlet from loading.
> > >
> > > Steve
> > >
> > > > -Original Message-
> > > > From: David Jiao [mailto:[EMAIL PROTECTED]
> > > > Sent: June 30, 2003 1:06 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Struts 1.1 bean:write problem
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I developed my application using struts 1.0.2. Today I updated
it to
> > > > struts 1.1 and found the following error messages (listed the
end of
> > > > this mail).
> > > >
> > > > I found the problem is in here.
> > > > 
> > > > When property is a long (maybe numeric) value, it throws the
> > exception.
> > > > It's ok when the property is a string.
> > > >
> > > > Can somebody told my why they made this change and how I fix
this?
> > > >
> > > > Thanks,
> > > >
> > > > David
> > > >
> > > >
> > > > org.apache.jasper.JasperException: Cannot find message resources
> under
> > > > key org.apache.struts.action.MESSAGE
> > > > at
> > > >
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrap
> > > > per.java:254)
> > > > at
> > > >
> >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > > > at
> > > >
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > > at
> > > >
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationD
> > > > ispatcher.java:684)
> > > > at
> > > >
org.apache.catalina.core.ApplicationDispatcher.doForward(Applicati
> > > > onDispatcher.java:432)
> > > > at
> > > >
org.apache.catalina.core.ApplicationDispatcher.forward(Application
> > > > Dispatcher.java:356)
> > > > at
> > > >
org.apache.struts.action.RequestProcessor.doForward(RequestProcess
> > > > or.java:1069)
> > > > at
> > > >
org.apache.struts.action.RequestProcessor.processForwardConfig(Req
> > > > uestProcessor.java:455)
> > > > at
> > > >
org.apache.struts.action.RequestProcessor.process(RequestProcessor
> > > > .java:279)
> > > > at
> > > >
> >
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> > > > at
> > > >
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> > > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > > at
> > > >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> > > pplicationFilterChain.java:247)
> > > > at
> > > >
org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> > > > onFilterChain.java:193)
> > > > at
> > > >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> > > > erValve.java:256)
> > > > at
> > > >
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> > > > text.invokeNext(StandardPipeline.java:643)
> > > > at
> > > >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> > > > java:480)
> > > > at
> > > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > > > at
> > > >
org.apache.catalina.core.StandardContextValve.inv

RE: Struts-EL w/Resin

2003-06-26 Thread Karr, David
Struts-EL depends on the Apache Taglibs implementation of the JSTL.

> -Original Message-
> From: Martin Naskovski [mailto:[EMAIL PROTECTED]
> 
> I noticed that Struts comes with an implementation of JSTL as well in
the
> contrib directory. Do I need to install this JSTL library w/Resin and
> disable Resin's 'fast-jstl' implementation or is all I need the
> struts-el.jar and the *el-tld's to use Struts-EL?


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



RE: tag causing 500 error under OC4J

2003-06-20 Thread Karr, David
If you're getting a 500 error, that means your server had an error.
Check the server log to see what broke.

You aren't by any chance mapping "html" to the "html-el" tag library,
are you?

> -Original Message-
> From: frankgriffithiii [mailto:[EMAIL PROTECTED]
> 
> When I use the  tag under OC4J, I get a 500 error. All
> other html tags work fine. Has anyone had this type of problem before?
> 
> Thanks

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



RE: html:reset and DynaValidatorForm / LookupDispatchAction

2003-06-16 Thread Karr, David
Uh, no, they really do have nothing to do with each other.  The "reset" tag is used 
entirely on the client side.  The "reset" method is used on the server side, just 
before populating the ActionForm from request parameters.  Clicking the reset button 
does not call the reset method.

> -Original Message-
> From: Gregory F. March [mailto:[EMAIL PROTECTED]
> 
> On Jun 16, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:
> 
>  |2003-06-16, h keltezéssel Gregory F. March ezt írta:
>  |
>  |> Ok, and since the DynaValidatorForm's reset doesn't do anything, this
>  |> tag is meaningless in this case.  Ug.
>  |
>  |The reset method of a form, and the 
>  |has nothing to do w/ each other at all. They have the same name, and
>  |nothing else.
> 
> I understand that, but in this case, the  will call
> the DynaValidatorForm's reset() method which, according to the javadoc,
> doesn't do anything.  That's what I meant by the html:reset tag being
> meaningless in this case, e.g. it's a no-op.  Perhaps my choice of words
> was not optimal...

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



RE: what setters do i implement in an indexedtag--NewBiequestion

2003-06-12 Thread Karr, David
> -Original Message-
> From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
> 
> I had a question on how to do the prep action.
> 
> [This assumes the prep action that entered the jsp figured out the
size
> of the list and set it into a hidden in the jsp in a field named
> personListLength.]
> 
> I tried like this but not sure if this is right
> 
> In my action  i added these lines
> 
> ArrayList personList=new ArrayList();
>   personList.add(new PersonBean());
>   request.setAttribute("personList",personList);
>return mapping.findForward("success");
> 
> I tried to retrieve it in the JSP page but did not get the value. I
must
> be doing something wrong.

If it isn't working, then show us what you did, and show exactly what
happened.  It's hard for us to help if we don't know what you did.


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



RE: Nested taglib and JSTL

2003-06-12 Thread Karr, David

> -Original Message-
> From: Ludovic Maitre [mailto:[EMAIL PROTECTED]
> 
> Hello,
> 
> Could somebody answer to 2 little questions :
> 1- why there is no nested-el taglib ?

When I built Struts-EL, I just concentrated on the three core libraries.
After the 1.1 release, I'm going to try to build both "tiles-el" and
"nested-el".

> 2- Is it possible to reference the current nested property in an
> el-expression ? Because actually i cannot use JSTL in my nests.
> I would write a tag for doing this (put the current nest in page scope
> where he's accessible by jstl tag [i think]) but perhaps there is a
> better solution (which is already coded).

The only way the EL can reference the nested information is if the
information is stored in bean properties in one of the valid scopes.  I
haven't examined how and where the nested tags do this.


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



RE: JSTL or Struts taglib: on a large project

2003-06-11 Thread Karr, David
> -Original Message-
> From: Hohlen, John C [mailto:[EMAIL PROTECTED]
> 
> We always try to use the JSTL tags when an equivalent Struts tag
exists.
> We've looked at using the "Struts-EL" tag library.  Unfortunately,
that
> subproject has never been released with corresponding versions for
Struts
> 1.1 B1, B2, B3, RC1, or RC2.  So every time I try to use Struts-EL,
there
> is
> always a tag that blows up.  So we haven't had much success with
Struts-
> EL,
> but the concept behind the library is good.  Maybe it's better now, I
> haven't tried it in a while.

There were some particular problems with Struts-EL in RC1, but RC2
should be fine.  I haven't heard of any more issues.

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



RE: Checkbox problem?

2003-06-10 Thread Karr, David
Generally, a good strategy is to have a "prepare" action and a "process" action.  Your 
"prepare" action is where you would set your boolean form properties.  You then 
forward to the JSP, which renders the checkboxes.  The "process" action (from 
submitting the form) will determine whether the checkboxes are set or not.

> -Original Message-
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 12:38 PM
> To: Struts Users Mailing List
> Subject: Re: Checkbox problem?
> 
> oki, maybe my explanation isn't the best :) (I know that I can't do it
> in the reset method, as it is clearly not working)  but I am still not
> sure where to put the code to set the checkbox to true then.
> As far as I know, the action class isn't called before after the form
> bean has called the reset method and the page has been rendered (and the
> submit button has been pressed), or is it something I am missing?
> 
> BTJ
> 
> On Tue, 2003-06-10 at 20:28, James Mitchell wrote:
> > On Tuesday 10 June 2003 14:11, Bjørn T Johansen wrote:
> > > You are missing my point! If I just could set the checkbox value to
> > > false in the reset method, everything is fine. But there are times
> when
> > > that value has to be reset to true and not false and if I do that in
> my
> > > reset method, I am not able to see of the user unchek the checkbox,
> > > because the boolean variable is still true after the form has been
> > > posted!
> >
> > No, actually *YOU* are missing the point!  Several people have tried to
> > explain how this works to you.
> >
> > So, for one last effort
> >
> > 
> > DO *NOT* SET THE FIELDS YOU INTENT TO USE AS CHECKBOXES (booleans) TO
> TRUE IN
> > THE RESET METHOD!
> > 
> >
> > If you want the field to be true when the page is rendered, set it to
> true
> > from your action class, NOT in the reset of your formbean.
> >
> > I hope that clears it up for you.
> >
> >
> > >
> > >
> > > BTJ
> > >
> > > On Tue, 2003-06-10 at 19:22, Tor Henrik Hanken wrote:
> > > > [EMAIL PROTECTED]
> > > >
> > > > | Yes, but to clarify...
> > > > | I am showing a jsp page with values read from a database. If the
> > > > | checkbox value is true, how do I then make the checkbox on my jsp-
> page
> > > > | checked and how do I then find out if the checkbox has been
> unchecked?
> > > > | Do I have to manually read the posted data and see if the checkbox
> > > > | attribute is missing or is there a better way?
> > > >
> > > > I assume that you are using an Action with an ActionForm.
> > > >
> > > > To make the value of the checkbox come up correctly, import
> > > > struts tags into your jsp-page:
> > > >
> > > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="strb" %>
> > > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="strh" %>
> > > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="strl" %>
> > > >
> > > > Then use the Struts checkbox tag:
> > > >
> > > > 
> > > >
> > > > Assuming that your form has the methods getDone and setDone,
> > > > these methods will be used to render the value of the checkbox
> > > > correctly.
> > > >
> > > > As to the question of boolean values that are set to false by the
> > > > user: You don't have to parse the posted data manually.  The
> > > > method reset() in ActionForm is run before the posted data is
> > > > used to populate the form.  Write your own reset() method where
> > > > you set the boolean fields to false.
> 
> 
> 
> -
> 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 are "indexed" struts-html tags and how to use them?

2003-06-10 Thread Karr, David
I wrote a long FAQ description in the documentation about this, and I'm
still not sure I can adequately answer this question, as it can be
somewhat confusing.  You could read that at <
http://jakarta.apache.org/struts/faqs/index.html>.  Select the "indexed
properties" link.

Basically, you use indexed tags when you want the resulting "name" of an
HTML component to reference array indexes, so you can move values in and
out of a collection/array in your form bean instead of scalars.

The indexed tags work along with either the "logic:iterate" or
"c:forEach" tags.

> -Original Message-
> From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 8:38 AM
> To: [EMAIL PROTECTED]
> Subject: What are "indexed" struts-html tags and how to use them?
> 
> Can somebody explain how these work, or is there any example of this.
> 
> Thanks

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



RE: formtag error

2003-06-10 Thread Karr, David
Try adding the "load-on-startup" element to your "22ban" servlet (this
is normally called "action", by convention).

> -Original Message-
> From: Richard Raquepo [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2003 11:05 PM
> To: Struts Users Mailing List
> Subject: Re: formtag error
> 
> 
> sorry about that...
> 
> accessing input.jsp i get this error:
> 
> 500 Servlet Exception
> javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans
> collection
>  at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:712)
>  at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:500)
>  at _input__jsp._jspService(/input.jsp:9)
>  at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
>  at com.caucho.jsp.Page.subservice(Page.java:497)
>  at
>
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182
)
>  at com.caucho.server.http.Invocation.service(Invocation.java:312)
>  at
>
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
>  at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
>  at
>
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163
)
>  at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
>  at java.lang.Thread.run(Thread.java:534)
> 
> 
> 
> my input.jsp looks like this:
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> 
> 
>
>   Test
>
> 
>
>  
>
> 
>First Name:
>
> 
> 
>Last Name:
>
> 
>  
>   
> 
>
> 
> 
> 
> my struts-config.xml looks like this:
> 
> 
>  Configuration 1.1//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
> 
>   
>
> 
>  />
>  value="com.microsoft.jdbc.sqlserver.SQLServerDriver" />
>  value="jdbc:microsoft:sqlserver://Crmserver;DatabaseName=22banDB" />
> 
> 
> 
> 
>
>   
> 
>   
> type="com.myform.TestForm"/>
> 
>   
> 
>   
> input="main.jsp"
> name="testForm"
> path="/param"
> type="org.apache.struts.action.Action">
>
> 
> path="/test"
> type="com.myaction.TestAction"
> name="testForm"
> scope="request">
> 
>
> 
>   
> 
>   
> 
>  
> 
> my web.xml looks like this:
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> 
> 22ban - Development site
> 
>   Under heavy construction
> 
> 
> 
> 22ban
> 
> org.apache.struts.action.ActionServlet
>   
>config
>/WEB-INF/struts-config.xml
> 
>   
>   
>application
>22BanResources
>   
> 
> 
> 
> 22ban
> *.do
> 
> 
> 
> index.jsp
> 
> 
>  
>   /core
>   /WEB-INF/c.tld
> 
>  
>   /sql
>   /WEB-INF/sql.tld
> 
> 
>   
> /WEB-INF/struts-html.tld
> /WEB-INF/struts-html.tld
>   
> 
>   
> /WEB-INF/struts-logic.tld
> /WEB-INF/struts-logic.tld
>   
> 
>   
> /WEB-INF/struts-bean.tld
> /WEB-INF/struts-bean.tld
>   
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Problem with ExpressionEvaluatorManager in a custom jstl tag

2003-06-10 Thread Karr, David
First of all, you'll get better luck asking this on the "taglibs-user" list.

I'm assuming you have the call to EEM in a try/catch, and you're not seeing an 
exception there, which would indicate that EEM is throwing a RuntimeException 
subclass.  You might temporarily add a catch for that so you can look at it a little 
closer.

> -Original Message-
> From: Dom [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 2:42 AM
> To: Struts Users Mailing List
> Subject: Problem with ExpressionEvaluatorManager in a custom jstl tag
> 
> Hi
> 
> I've created a tag using rt expression without trouble.
> 
> I 've created the same tag using jstl : in doEndTag(), I call
> ExpressionEvaluatorManager.evaluate with the right parameters, but running
> it, i get (in a try catch):
> 
> 2003-06-10 11:19:59,963 ERROR [org.jboss.web.localhost.Engine]
> ApplicationDispatcher[/wassWEB] "Servlet.service()" pour la servlet jsp a
> lancé une exception
> org.apache.jasper.JasperException:
> org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager
>  at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :2
> 54)
>  at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatche
> r.
> java:684)
>  at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispat
> ch
> er.java:432)
>  at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatch
> er
> .java:356)
>  at
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:
> 10
> 69)
> ..
> 2003-06-10 11:20:00,213 ERROR [org.jboss.web.localhost.Engine] - Root
> Cause -
> javax.servlet.ServletException:
> org/apache/taglibs/standard/lang/support/ExpressionEvaluatorManager
>  at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
> mp
> l.java:536)
>  at org.apache.jsp.client_jsp._jspService(client_jsp.java:323)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :2
> 10)
>  at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatche
> r.
> java:684)
> ...
> 
> I can't debug it, the exception is not catched.
> 
> I'm using other standard jstl tags (c, html-el, etc) without problem
> 
> What's happening there ?
> 
> Dom
> 
> 
> -
> 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: calling actions directly

2003-06-06 Thread Karr, David
Unfortunately, not all web containers will support this.  There was
apparent disagreement on the interpretation of the specification in this
area.  In particular, WebLogic does not support this.  I believe,
however, that in version 8.1 it's possible to do this, although I
believe you have to set some non-standard configuration flag.  I don't
know the details.

The alternative is to put all JSP pages into a security constraint on a
role that no user is set to.

> -Original Message-
> From: Nathan Pitts [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2003 8:02 AM
> To: Struts Users Mailing List
> Subject: Re: calling actions directly
> 
> Brian,
> 
> If you put all your jsp's inside a the WEB-INF directory, they will
not
> be accessible directly -- only through an action.  I think this is
part
> of the jsp specification that nothing can be directly served out of
> this special directory..Otherwise, a user could pull up configuration
> files that reside there -- web.xml for example.For example, I have
> a directory structure containing jsp's under WEB-INF/jsp in my current
> web applicationHope this helps!
> --nathan
> 
> 
> On Thursday, June 5, 2003, at 09:47 AM, Brian McSweeney wrote:
> 
> > Ah yes,
> >
> >> Perhaps what you're thinking of is that JSP files should not be
called
> >> directly or bookmarked. They should be hidden from the user
> >> completely,
> > and
> >> only accessible through an action.
> >
> > that was it - sorry - stupid of me.
> > Could you tell me how to secure the jsps so that they are only a
> > result of
> > the action?
> > cheers,
> > Brian
> >
> >
> > - Original Message -
> > From: "Kruse, Matt" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, June 05, 2003 3:12 PM
> > Subject: RE: calling actions directly
> >
> >
> >>> I read that one of the things about struts is the actions are
> >>> only able to be called from the pages directly. Ie, you
> >>> shouldn't be able to bookmark the actions themselves like:
> >>> http://myhost/myaction.do
> >>
> >> Where did you hear this? That's totally not true - any action can
be
> > called
> >> directly as long as it has a mapping. It's just a URL. Otherwise,
how
> > would
> >> you enter the first action? :)
> >>
> >> Perhaps what you're thinking of is that JSP files should not be
called
> >> directly or bookmarked. They should be hidden from the user
> >> completely,
> > and
> >> only accessible through an action.
> >>
> >> Matt Kruse
> >>
> >>
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> =
> Nathan Pitts
> Programmer Analyst
> Texas Animal Health Commission
> =
> 
> 
> -
> 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 Logic iterate vs JSTL Code forEach

2003-06-06 Thread Karr, David
It will stay in the contrib directory, or move out to a separate
release.  It will never go into the base Struts distribution, for good
reason.  Once JSP 2.0 is commonly available, the EL notation will be
natively supported, and Struts-EL won't be needed.

> -Original Message-
> From: Derek Richardson [mailto:[EMAIL PROTECTED]
> 
> Thanks. I submitted a patch to bugzilla.
> 
> What does it mean that struts-el is still in the contrib directory? At
> what point will it migrate to struts-proper? I find it amazingly
useful
> and forward-looking and so am puzzled that it is placed in an
apparently
> peripheral position. Is this just on hold until after 1.1 final?

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



RE: struts-el question

2003-06-06 Thread Karr, David
Look at the description of the "c:forEach" tag in the JSTL specification
(or one of the books).  You'll see the "varStatus" attribute.

> -Original Message-
> From: Matthew Van Horn [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2003 6:50 PM
> To: Struts Users Mailing List
> Subject: Re: struts-el question
> 
> > Is there a property in class MyForm named "columns"?
> It's in the base class that MyForm extends.
> >
> > Can you post the block using tags and the error?
> 
> I got it working, although it is not what I would think of as elegant.
> here:
> 
>  step="7">
>   
>step="1">
>   
>   
>value="${candidateSearchForm.candidateColumns[cell]}"/>
>   
>   
>   
>   
>value="${candidateSearchForm.candidateColumns[cell]}"/>
>   
>   
>   
>   
>   
> 
> 
> I wish I had a solution that didn't need the !empty test, or the "row
=
> row + 1" bit.
> 
> 
> 
> 
> 
> > Matthew Van Horn wrote:
> >
> >> How do I access the form bean properties from my jsp page?
> >>
> >> I have a property called columns which is a String[] array.
> >> I'd like to do the equivalent of the following using tags.
> >>
> >> <%
> >> String[] myArray = myForm.getColumns();
> >> for (int i=0; i < myArray.length; i = i+7) {
> >> out.print("");
> >> for (int j=0; j < 7; j++) {
> >> out.print(""+ myArray[(i*7)+j] +"");
> >> }
> >> out.print("");
> >> }
> >> %>
> >>
> >> I tried this (saw it online) -  but I get an error about accessing
the
> >> columns property.
> >>
> >> 
> >>
> >> If it matters, columns is inherited from a BaseForm class.
> >>
> >> Thanks for helping,
> >> Matt
> >>
> >
> 
> 
> -
> 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 (and JSTL) expression language questions

2003-06-05 Thread Karr, David
Read the JSTL specification.  It should clarify some of these issues.
If you write pages that avoid using scriptlets (perhaps by concentrating
on the MVC paradigm), you won't have these issues (except for the
constants issue).

If you have specific questions about the JSTL, it would be better to ask
them on the "taglibs-user" list.

> -Original Message-
> From: Dan Eklund [mailto:[EMAIL PROTECTED]
> 
> Hello all,
> 
> I'm a bit concerned (after spending a few days spinning my wheels) on
> a few aspects of the EL implementation both with the struts-el
libraries
> and the JSTL core EL implementation.
> The following are a few of my observations.  I was wondering if people
> here could confirm these as problematic, or tell me I'm smoking crack.

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



RE: Struts Logic iterate vs JSTL Code forEach

2003-06-05 Thread Karr, David
The "iterate" tag was originally ported because the indexed tag
functionality wouldn't work with "c:forEach".  This has since been
rectified, but I didn't think it would be a good idea to remove it from
the library after I released it (even though it's never been in a
released version of Struts).

> -Original Message-
> From: Derek Richardson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2003 2:23 PM
> To: Struts Users Mailing List
> Subject: Struts Logic iterate vs JSTL Code forEach
> 
> The Logic taglib iterate tag was ported to struts-el. This indicates
that
> it has some functionality that cannot be reproduced by the JSTL
forEach.
> However, after reading through the documentation for these tags, I
cannot
> find anything that iterate can do that forEach cannot. So I am clearly
> missing the boat. Can someone help me out and explain what cases
require
> using iterate instead of forEach?
> 
> If someone will enlighten me, I'll write it up and figure out how to
> submit a patch for the README.txt in the struts-el directory. :)
> 
> Thanks,
> 
> Derek Richardson
> 
> -
> 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] Hashtable

2003-05-31 Thread Karr, David
Ask questions about the JSTL on the "taglibs-user" list.  You can also
read the JSTL specification for clear answers to these questions.

> -Original Message-
> From: Denis Avdic [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 29, 2003 8:02 AM
> To: Struts Users Mailing List
> Subject: [JSTL] Hashtable
> 
> Hello group,
> 
> Does anyone know how to retrieve particular elements of a hash table
> using JSTL?
> I've triedbut that does not
> work.
> 
> Any ideas?
> 
> TIA,
> 
> Denis
> 
> 
> -
> 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]



Somehow change PropertyMessageResources to enhance testability?

2003-05-29 Thread Karr, David
It's easy to see that in normal operation, it's a good idea for
"PropertyMessageResources" to be a read-only repository.  There's no
good reason to change message properties at runtime.  However, it would
be really nice to be able to write Cactus tests that are self-contained,
so I can manually create the properties that a tag will use, so I can
clearly verify the result.

Is there any strategy for doing this?  Does StrutsTestCase have any way
to do this?


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



RE: [OT] intermittent build and deploy Struts application to WLS problem

2003-04-04 Thread Karr, David
Another alternative would be to use WebLogic Express, which is WebLogic
without the EJB container.  It should be much cheaper than WebLogic
platform, and will satisfy the suits.

> -Original Message-
> From: Miriam Aguirre [mailto:[EMAIL PROTECTED]
> 
>  we're currently struggling with this as well, I'm all for dumping
iplanet
> and move to jboss, but other people in the organization do not feel
> comfortable with switching over to a non-sun-certified-freeware-app
> server..
> so far, "so what, it's better!" is not working, any suggestions from
the
> group??
> 
> -Original Message-
> From: Daniel Jaffa [mailto:[EMAIL PROTECTED]
> 
> Dump WLS and go over to JBOSS in production.  We are currenly going to
> save
> something like
> 500k  by not upgrading to wls 7.0 or wls 8.0 and go directly to Jboss
in
> production.

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



RE: Tiles Insert tag using EL expression

2003-04-04 Thread Karr, David
The problem is that we haven't built a "tiles-el" library.  That's one
of the things I'd like to accomplish in the 1.2 (1.1.1?) time frame.
It's not that difficult, but I don't want to implement any more major
changes for 1.1.  Until then, I guess that attribute has to take a
scriptlet expression, however you build it.

> -Original Message-
> From: Trevor Nightingale [mailto:[EMAIL PROTECTED]
> 
> The jsp page listed below fails with
> 
> [ServletException in:/tiles/common/sasWizardDataSource.jsp] Error -
Tag
> Insert : Can't get definition '${map["selectedConnection"]}'. Check if
> this name exist in definitions factory.'
> 
> The expression '${map["selectedConnection"]}' is not being resolved
prior
> to the insert tag being actioned. Why is this and does anyone have any
> suggestions on how to work around it ?
> 
> Thanks is advance,
> Trevor
> 
> Here is the page source.
> 
> 
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> 
> JSTL 
> JSTL  value="${sessionScope.wizardController.wizardParameters}" />
> JSTL 
> 
> 

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



RE: Netscape and struts-html.tld-Eventhandler

2003-04-04 Thread Karr, David
The "onclick" in "" is not a "handler", it is a custom tag
attribute.  The Tag Library Descriptor describes those attributes,
including their exact spelling.  If the TLD specifies a particular
spelling, then you have to use that spelling.  If you want to write
JavaScript functions that follow that convention you describe, then
that's fine.  Reference those function names in the value of the
"onclick" attribute.

> -Original Message-
> From: Mouratidis, Georg [mailto:[EMAIL PROTECTED]
> 
> Hi @ all,
> 
> I have aproblem with Netscape 4.7, 6.0 and 6.1 and the eventhandler.
> 
> according to the W3C an eventhandler schould start with lowercase
> characters. The next character should be capitalized.
> e.g. onClick, onBlur. But Struts allows only lowercase characters.
> . If i use "onClick" an error occurs of
course.
> 
> Is there any solution except avoid using STRUTS-tlds.
> I know i can solve the problem by using  but
this
> is not the basic idea of STRUTS.

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



RE: 'org.apache.strutsel.taglib.html.ELImgTag' has no setter methodcorresponding to TLD declared attribute 'onkeypress'

2003-04-03 Thread Karr, David
Let me guess, you're using Struts 1.1RC1?  This was fixed after RC1 was
tagged.  If you use the nightly build, this should be fixed.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 
> hello,
> 
> what I'm missing?
> 
> I'm trying to run strutsel-exercise-taglib example of struts-el.
> I'm getting :
> 
> Parsing of JSP File '/html-indexed.jsp' failed:
> 
> /html-indexed.jsp(4): Error in using tag library
> uri='/WEB-INF/struts-html-el.tld' prefix='html-el': The Tag class
> 'org.apache.strutsel.taglib.html.ELImgTag' has no setter method
> corresponding to TLD declared attribute 'onkeypress', (JSP 1.1 spec,
> 5.4.1)
> probably occurred due to an error in /html-indexed.jsp line 4:
> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
> 
> I'm using WLS 6.1 SP4

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



RE: A question

2003-04-01 Thread Karr, David
This might work:





> -Original Message-
> From: Binaghi Mauro [mailto:[EMAIL PROTECTED]
> 
> Hi
> I have the "user.name" property in my "ApplicationResource.properties"
> file.
> Can I take its value with the following instrucition in my JSP page?
> 
> 
>%>.name"/>
> 
> 
> Of course, I call my JSP with this URI
"/myPage.jsp?httpParameter=user"

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



RE: [OT] JavaScript Debugger For Client-Side Validation

2003-03-31 Thread Karr, David
If you can use Mozilla, it comes with a nice integrated javascript
debugger.  If you've built a non-standard application that only works in
IE, then that won't help you very much.

> -Original Message-
> From: Hohlen, John C [mailto:[EMAIL PROTECTED]
> 
> Can anyone recommend a good (and free) JavaScript debugger for
Internet
> Explorer?  We have a situation where the Required Field Validation is
not
> working properly. It's a simple form with about 6 input fields, all
> required.  When some of the required fields aren't entered, the form
still
> gets submitted. I know the JavaScript is getting called b/c I added
some
> alert pop-ups.  But somewhere, the missing fields aren't getting
flagged.
> I
> thought a JavaScript debugger might help me since my JavaScript skills
are
> lacking.  I'd like to step through the JavaScript code.

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



RE: Setting up JSTL---How?

2003-03-31 Thread Karr, David
One step you need to take care of, if you haven't yet, is reading the
JSTL specification.  If you had, you would have noticed that
"$param.userName" should be "${param.userName}".  I'm not certain
whether this the cause of your exception, however.

> -Original Message-
> From: joni santoso [mailto:[EMAIL PROTECTED]
> 
> here is my test.jsp :
> 
> 
> 
> when i ran it, errors happened. this is the error:
> 
> root cause
> java.lang.NoClassDefFoundError
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:140)
>   at
>
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.getE
va
> luatorByName(ExpressionEvaluatorManager.java:146)
>   at
>
org.apache.taglibs.standard.tlv.JstlBaseTLV.validateExpression(JstlBaseT
LV
> .java:202)

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



RE: Imbeding a struts tag in another ?

2003-03-27 Thread Karr, David
The Struts-EL library is in the "contrib" directory of the distribution.
It first appeared in the 1.1beta3 release, although until the next RC or
final 1.1 release comes out, I recommend using the nightly build, to
avoid a couple of bugs that have been fixed since that release.  The
Struts-EL library evaluates attributes values using the expression
language engine used in the Jakarta Taglibs implementation of the JSTL.

> -Original Message-
> From: Jean-Michel Auguste [mailto:[EMAIL PROTECTED]
> 
> Sorry, I'm new with Struts. What's Struts-EL tags?
> Where can I find info please ?
> Thanks
> 
> - Original Message -
> From: "Wendy Smoak" <[EMAIL PROTECTED]>
> 
> > > I'm having the following problem.
> > > I need to display a radio button in a Jsp but the attribute
> > > "value" of this radio button must be set with the property of a
bean
> > located in the request.
> > > How can I code that using struts tags only ?
> > > I tried the following but does not work.
> > >  > property="prop"  />"  />
> >
> > Can you use the Struts-EL tags?
> > 

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



RE:

2003-03-27 Thread Karr, David
You were close to one solution, if you used "".  You just didn't
fully read the usage information for this tag.  If you supply a "var"
attribute, you can specify the name of the page-scoped attribute to set
with the resulting URL string.  You can then reference this in the
"href" attribute of the "html-el:link" tag.

> -Original Message-
> From: Ray Madigan [mailto:[EMAIL PROTECTED]
> 
> This may be more html related - if so forgive me.
> 
> I am working on a project where i have a set of jsp pages that
> i want want to generate a href link to.  I have tried a bunch of
> ways, and nothing but brute force seems to work.
> 
> The pages require at least five parameters to be passed to the
> page, retrieved from either a form bean or from the environment
> based upon the context of the use of the jsp.
> 
> What i want to know:  Is there a way other then the following to
> pass the parameters.  It seems to me this is not very maintainable?
> 
> 

RE: [OT] JSP custom tags

2003-03-25 Thread Karr, David
Are you bringing down the server?  Can you look at the servlet code
generated from the JSP to see whether it is using the new code (you'd
only notice this if your change changed the tag interface in certain
ways).

> -Original Message-
> From: Becky Norum [mailto:[EMAIL PROTECTED]
> 
> I've been beating my head against this problem for the last two hours;
> I'm hoping someone here can point me in the right direction.
> 
> I have created a custom tag in the class CheckOwnerTag .
> I have defined the custom tag in the tld file app.tld
> 
> Everything was working correctly until...
> 
> I tried to make changes in "CheckOwnerTag".  These changes are not
being
> reflected in the web application when deployed.  I'm using ant to
build
> the app; I tried deleteing the ant build directory and the directory
in
> my $TOMCAT_HOME/webapps and rebuilding - still the same error - my
> changes aren't there! (I made a change to an SQL statement and logged
> that statement).
> 
> Does anyone have a suggestion for where else Tomcat might be caching
> this tag?

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



RE: Why have ?

2003-03-25 Thread Karr, David
It's not much, but I believe the "roles" attribute isn't strictly
available with the JSTL.  For most uses, the EL works fine.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 
> The README.txt file in the contrib/struts-el folder explains what JSTL
> tags to use in place of the "missing" Struts tags.
> 
> But I'm not sure why  and  were
> implemented in Struts-EL.
> 
> What can you do with those tags that you cannot do with JSTL?
> 
> How does using logic-el:present/notPresent differ from:
> 
>   
> display something
>   
>   
> display something else
>   
> 
> 
> Just want to make sure I know what I'm missing by preferring the JSTL
tags
> to something in Struts-EL.

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



RE: not showing anything!

2003-03-25 Thread Karr, David
After you wrote this, I tried to get a new version of that utility, and
the download link is working fine.

On your original problem, exactly what version of Struts are you using?
Is it 1.1RC1, or the nightly build?

> -Original Message-
> From: Alonso, Damian [mailto:[EMAIL PROTECTED]
> 
> Yes I do have the file 'application.properties' in my
> WEB-INF/classes/resources folder.  Unfortunately I could not download
that
> tool you suggested (must be a missing link in their site) so any other
> suggestions would be grateful.
> 
> Thanks for the feedback,
> 
> Damian.
> 
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 9:50 AM
> To: Struts Users Mailing List
> Subject: RE:  not showing anything!
> 
> And in your deployed WAR file, a file named "application.properties"
is
> in the directory "WEB-INF/classes/resources"?
> 
> In times like this, if I can't figure out why something isn't finding
a
> file I think it should find, I like to set up a "file I/O monitor",
that
> basically tracks all system calls, and allows filtering or searching
for
> various strings in the output.  In Windows, I tend to use a tool
called
> "FileMon", you can get from http://www.sysinternals.com.  Unices have
> similar tools.
> 
> > -Original Message-
> > From: Alonso, Damian [mailto:[EMAIL PROTECTED]
> >
> > I currently have a Struts 1.1 application that I am currently moving
> to
> > use
> > frames and tiles.  I am still not sure if my  is not
> working
> > because I am using frames, or because it is not reading the
> > application.properties.  This is where I need your help! :-)
> >
> > When I expect an error, I was getting the expected error on my form
> page.
> > As read in other posts, I wanted to check if my errors where
actually
> > getting processed, so in my struts-config.xml file, I added the
> following
> > to
> > my message-resources definition.
> >
> > 
> >
> > After putting the null="false", I was able to get my Error Key to
> appear
> > in
> > the page but it didn't translate to the message I have in my
> > application.properties file.
> >
> > This is what I now see:
> >
> > ???en_US.ALL_FIELDS_NULL???
> >
> > Any ideas on why I cannot see my error messages??
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> www.sensis.com.au
> 
> A leading Australian advertising, information
> and directories business.
> 
> www.yellowpages.com.au
> www.whitepages.com.au
> www.citysearch.com.au
> www.whereis.com.au
> www.telstra.com.au
> 
> This email and any attachments are intended only for the use of the
> recipient and may be confidential and/or legally privileged.
> Sensis Pty Ltd disclaims liability for any errors, omissions, viruses,
> loss and/or damage arising from using, opening or transmitting this
email.
> If you are not the intended recipient you must not use, interfere
with,
> disclose, copy or retain this email and you should notify the sender
> immediately by return email or by contacting Sensis Pty Ltd by
telephone
> on [+61 3 9201 4888]
> 
> -
> 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: not showing anything!

2003-03-25 Thread Karr, David
And in your deployed WAR file, a file named "application.properties" is
in the directory "WEB-INF/classes/resources"?

In times like this, if I can't figure out why something isn't finding a
file I think it should find, I like to set up a "file I/O monitor", that
basically tracks all system calls, and allows filtering or searching for
various strings in the output.  In Windows, I tend to use a tool called
"FileMon", you can get from http://www.sysinternals.com.  Unices have
similar tools.

> -Original Message-
> From: Alonso, Damian [mailto:[EMAIL PROTECTED]
> 
> I currently have a Struts 1.1 application that I am currently moving
to
> use
> frames and tiles.  I am still not sure if my  is not
working
> because I am using frames, or because it is not reading the
> application.properties.  This is where I need your help! :-)
> 
> When I expect an error, I was getting the expected error on my form
page.
> As read in other posts, I wanted to check if my errors where actually
> getting processed, so in my struts-config.xml file, I added the
following
> to
> my message-resources definition.
> 
> 
> 
> After putting the null="false", I was able to get my Error Key to
appear
> in
> the page but it didn't translate to the message I have in my
> application.properties file.
> 
> This is what I now see:
> 
> ???en_US.ALL_FIELDS_NULL???
> 
> Any ideas on why I cannot see my error messages??

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



RE: Question on

2003-03-25 Thread Karr, David
In your case, I think the message isn't quite accurate.  The message should say 
something like "... needs to contain EXACTLY one of ...".  You aren't using any of 
"name", "value", or body content.  This has nothing to do with your JDK upgrade.

> -Original Message-
> From: Binaghi Mauro [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 6:51 AM
> To: [EMAIL PROTECTED]
> Subject: Question on 
> 
> I've just upgraded my jdk to 1.4.1_02 version.
> 
> Now, where I use (in JSP pages) the instruction:
> 
> 
> ...I receive the following error:
>  javax.servlet.jsp.JspException: Define tag can contain only one of name
>  attribute, value attribute, or body content
>at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:257)
> 
> Somebidy knows the problem? :-(
> 
> Thx
> Mauro
> 
> --
> ° Mauro L. Binaghi - Matrix S.p.A.
> ° Technology - Web Developer & Coordinator
> ° e-mail: [EMAIL PROTECTED]
> ° Phone: +39 0229047.656
> ° FAX: +39 0229047.564
> ° C.so Garibaldi, 99
> ° 20121 Milano, ITALY
> ° http://www.matrix.it/
> ° http://www.seat.it/
> ° http://www.virgilio.it/
> --
> 
> -
> 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   4   >