How can we send parameter's value to javascript function ??

2005-05-20 Thread minhnguyet
Hi all,

I want to send  parameter 's value  to  javascript function  .  When I use  
   , 

 the value is not send  and  this is a result in IE   



But when  use  

everything is work right   :  

. I don't see what is different in html  code .  So , how can we directly send 
parameter value to javascript using  tag ?

Thanks in advance !




Re: [HELP] Couldn't include tag in onClick in

2005-05-20 Thread Pham Anh Tuan
Thanks Nandan,
Ex:
loop
   set MESSAGE = "somevalue"
   set MESSAGE to be value of 1 radio button
end loop
If there's 2 or more radio buttons in 1 loop, so we will have two or more 
values for only 1 MESSAGE variable?, so, the last value which is set to 
MESSAGE variable will be the common value for two or more radio buttons? how 
can we set different values for each radio button in 1 loop?

any solution for this case ?
Anh Tuan
- Original Message - 
From: "Nandan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Friday, May 20, 2005 4:46 PM
Subject: Re: [HELP] Couldn't include  tag in onClick in 



Hello,
Please replace your code with something like this:

var MESSAGE = "" ;


If it does work, I will then explain to you why :)

-Original Message-
From: Pham Anh Tuan [mailto:[EMAIL PROTECTED] Sent: 20 May 2005 05:46
To: Struts Users Mailing List
Subject: [HELP] Couldn't include  tag in onClick in

Hi all,
I couldn't include  tag in onclick attribute of 
like below:

and the result: html source code shows like below:
");">
 is not recognized!
help me, plz :(
Anh Tuan
-
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: DownLoad Action - exceptions

2005-05-20 Thread Lucas Bern
 What I mean is, I have to implement a getStreamInfo method  that returns an 
instance of an implementation of StreamInfo, if during the execution of this 
method some exception is thrown, what to do???

Should I override the "execute" method surrounding a call to "super.execute"
with try catch???
 
I just want to know the best way to do it...
 
Lucas

"Frank W. Zammetti" <[EMAIL PROTECTED]> escribió:
You mean as far as what the user sees goes? I wouldn't think you would 
handle it any differently than you would any other exception that might 
happen in an Action. I personally use the GlobalExceptionHandler 
mechanism in Struts... after the handler writes out some log info and 
such, I forward to a page to display my exception. As long as the user 
clicks the link that calls your DownloadAction rather than right-click 
and Save As, this should work.

Is that what you meant though, or did I misunderstand the question?

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Lucas Bern wrote:
> Hello, I'm lookig for advise...
> 
> How should be managed the exceptions by an acton that extends 
> DownLoadAction
> 
> Thanks
> 
> Lucas
> 
> 
> -
> A tu celular ¿no le falta algo?
> Usá Yahoo! Messenger y Correo Yahoo! en tu teléfono celular.
> Más información aquí.




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


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: [OT] Help with REgular Expressions in Validate()

2005-05-20 Thread Brady Hegberg
I have a small swing application (setup on webstart) for testing regular
expressions here:
http://lili.net/java/test-regex.jnlp

Or I can send you the code to test it yourself if you wish.  it won't
fix your problem but it's a handy tool for narrowing it down.

Brady

> Hi all
> I markled this OT because it's not a Struts question strictly speaking.
> 
> what I'm trying to do is disallow names that contain spaces or special 
> characters in the validate() method of my ActionForm
> 
> Code:
> String pattern = "\\W+";
> log.debug("Testing validity of name "+name+ " against "+pattern);
> if (name!=null){
> if (name.matches(pattern)) {
> log.info("Naming Convention Violated");
> e = new ActionError("error.create.portfolio.name.error");
> errors.add("",new ActionError("error.create.portfolio.name.error"));
> }else{
> log.debug("Valid name chosen");
> }
> }
> What am I missing?!?!?! I always get "valid name chosen" 
>  Again, I want to allow "MyNAme" and disallow "My Name" or "MyName!" (due to 
> spaces or special characters
> 
> 
-- 
Brady Hegberg <[EMAIL PROTECTED]>


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



[OT] Help with REgular Expressions in Validate()

2005-05-20 Thread David Johnson
Hi all
I markled this OT because it's not a Struts question strictly speaking.

what I'm trying to do is disallow names that contain spaces or special 
characters in the validate() method of my ActionForm

Code:
String pattern = "\\W+";
log.debug("Testing validity of name "+name+ " against "+pattern);
if (name!=null){
if (name.matches(pattern)) {
log.info("Naming Convention Violated");
e = new ActionError("error.create.portfolio.name.error");
errors.add("",new ActionError("error.create.portfolio.name.error"));
}else{
log.debug("Valid name chosen");
}
}
What am I missing?!?!?! I always get "valid name chosen" 
 Again, I want to allow "MyNAme" and disallow "My Name" or "MyName!" (due to 
spaces or special characters


-- 
-Dave
[EMAIL PROTECTED]


Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Frank W. Zammetti
Joe Germuska wrote:
I'm not sure I think that would be nice ;-)  Seems kind of risky, in 
that it adds a lot of indeterminacy.  That's the main reason why lots of 
us are down on request chaining too.
Just talking about the chain pattern generically... think about trying 
to implement a recursive problem with a chain implementation... by 
definition you'd want to do the equivalent of restarting the chain, right?

Now, if you want to make the argument that resursive algorithms are 
somewhat risky, I would tend to agree :)  Has never stopped me from 
using one when appropriate though.

That's a gut reaction, but without more demand for it and more 
consideration of possible side effects, it's not something I'd be likely 
to implement for fun on a Saturday afternoon or anything...
And certainly I have in no way thought this through completely.  Plus, 
I'll repeat my refrain once more: I'm not up to speek on chain and 1.3's 
usage of it in particular at this point.  I may in a few days come to 
the conclusion that it's a horrible idea myself :)

Joe
BTW, we are probably creeping into struts-dev turf on this thread here...
Well, I'll tell you what... when I feel like I'm up to speed and know 
what I'm talking about (whether I actually do or not!), if I still think 
my first thought was right, I'll raise the idea on the dev list (commons 
dev I'd think is more appropriate).  Like I said, a few days from now I 
may be completely off the idea :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Joe Germuska
At 3:23 PM -0400 5/20/05, Frank W. Zammetti wrote:
It's interesting to have some more complex use cases to test the 
chain model against...
Absolutely.  One thing that would be nice, and maybe it already is 
and I just don't know enough yet, is to be able to essentially 
restart the chain at any given point.  That of course introduces the 
possibility of endless loops, but it makes it so that I could just 
do like restartChain() instead of forwarding back through tbe whole 
RP cycle.
I'm not sure I think that would be nice ;-)  Seems kind of risky, in 
that it adds a lot of indeterminacy.  That's the main reason why lots 
of us are down on request chaining too.

That's a gut reaction, but without more demand for it and more 
consideration of possible side effects, it's not something I'd be 
likely to implement for fun on a Saturday afternoon or anything...

Joe
BTW, we are probably creeping into struts-dev turf on this thread here...
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: problem in installing struts

2005-05-20 Thread Laurie Harper
Check you have the right version of Ant installed -- or just download a 
pre-built binary.

L.
sharad singh wrote:
Hello Prashant
  I am sharad from IIT-Kanpur.I have just started work on struts
.I am going to install struts .but facing a lot of problem in
installing struts.i have down load struts 1.2.4-src.now i am facing
problem in setting build.properties.after setting build .properties
and compiling by "ant dist" got error
" /home/madhavi/user/sharad/jakarta-struts-1.2.4-src/build.xml:282:
The  task doesn't support the "failonerror" attribute." this
.can u tell how i resolve this error.
 Thanking you.

sharad

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


Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Frank W. Zammetti
Joe Germuska wrote:
Well, the difference between extending PopulateForm and putting a 
command after it which re-populates in the case of a SOAP request is 
small; the only caveat being that in the add-a-command-after model you 
must do it after or the existing PopulateForm action would clobber your 
efforts -- subclassing eliminates any questions about the ordering of 
events.
Yeah, I see your point.  I'm coming at it from a purely gut instinct 
perspective... when I stop and think about it, I agree, the different is 
fairly small.

How does the strutsws kit respond to form validation failures?  Is the 
"input" path overwritten when you clone the ActionMapping?  You could 
keep doing that, or you could use the same model described for the 
forward, that is indicate the failed-validation-path in a property set 
in the ActionMapping.
That's exactly how.  Just like there is a default response template, 
there is a default error template, or you can define your own in 
webservices-config.xml to do something more.  The input is overridden 
with whichever one applies.

I don't know nothing about properness ;-)
It's interesting to have some more complex use cases to test the chain 
model against...
Absolutely.  One thing that would be nice, and maybe it already is and I 
just don't know enough yet, is to be able to essentially restart the 
chain at any given point.  That of course introduces the possibility of 
endless loops, but it makes it so that I could just do like 
restartChain() instead of forwarding back through tbe whole RP cycle.

Well, as I've said all along, I need to get up to speed on chain and 
1.3's use of it before I can do more than stick my foot in my mouth here 
 :)

I have to get beta2 of AjaxTags out the door first, and I also want to 
get my file manager app put up on Sruts Apps.  After that I'll circle 
back around and really get in to StrutsWS on 1.3, unless Marco beats me 
to the punch of course! :)

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


Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Joe Germuska
I'd suggest adding a preprocessing command which recognizes the 
SOAP header, as Frank described, and instead of forwarding, simply 
sets a key/value pair in the ActionContext which other commands can 
interpret.  Then later, you could extend the PopulateForm class to 
look for the flag and to do its population process based on SOAP 
data instead of request parameters.
Yep, that's what I was talking about in terms of changing things... 
extending classes isn't changing them of course, but it's still not 
the "insert some commands and your done" that I was hoping for.  I 
suppose it's not that bad really, I was just hoping for simple 
insertions into the chain config.
Well, the difference between extending PopulateForm and putting a 
command after it which re-populates in the case of a SOAP request is 
small; the only caveat being that in the add-a-command-after model 
you must do it after or the existing PopulateForm action would 
clobber your efforts -- subclassing eliminates any questions about 
the ordering of events.

How does the strutsws kit respond to form validation failures?  Is 
the "input" path overwritten when you clone the ActionMapping?  You 
could keep doing that, or you could use the same model described for 
the forward, that is indicate the failed-validation-path in a 
property set in the ActionMapping.

Typical caveats apply, but I think that would handle it.  I'm not 
totally sure how I feel about a practice of changing the forward 
config in the process-view chain, but I can't see any other way 
you'd handle it without having to bind your code a lot more to the 
specific fact that it might be used in both ways.
Agreed.  As it stands now, I'm doing some rather dicey things to 
make it all work, specifically I'm thinking of the cloning of the 
ActionMapping and altering it on-the-fly for exception handling. 
So, what you suggest is better in terms of "proper-ness" at least :)
I don't know nothing about properness ;-)
It's interesting to have some more complex use cases to test the 
chain model against...

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: Nested Beans

2005-05-20 Thread Hubert Rabago
Works for me.  If you want, I can send you code later in the day. 
(Will be busy for most of the afternoon).  Or, you can post more of
your code and maybe someone else will spot something.

Hubert

On 5/20/05, Brandon Mercer <[EMAIL PROTECTED]> wrote:
> Hubert Rabago wrote:
> 
> >You might find the nested tags interesting:
> >
> ><%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
> >
> >
> >
> >
> >
> >
> > 
> > 
> >
> >
> >
> >
> Still a bit miffed.  I'm not sure if it's beanutils that is not copying
> the List into the new bean... or if I can't figure out this nested tag.
> I put that code snippet into my JSP and changed the information around
> several times and I still don't see the info being printed on my page.
> I guess my next question is... is the JSP code different if I have a
> list of beans, as opposed to a single Bean stored in my bean.  I have
> the List.  Another OT question is, will beanutils copy a List of Beans
> into the new Bean as a List of beans?  i.e.
> List school = mgr.getSchoolList(id);
> 
> BeanUtils.copyProperties(information,  schools);
> 
> Thanks Guys!
> Brandon
>

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



Re: Submitting form data via redirect

2005-05-20 Thread erikweber
Sorry, the word is idempotent, not indempotent.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Erik



-Original Message-
From: [EMAIL PROTECTED]
Sent: May 20, 2005 2:54 PM
To: Struts Users Mailing List , 
Andrew Thorell <[EMAIL PROTECTED]>
Subject: Re: Submitting form data via redirect

I don't know anything about the logic:redirect tag, but trying to redirect a 
POST transaction brings up other issues. The HTTP RFC, as far as I know, 
doesn't prohibit this behavior, but you are probably going to find browser 
compatibility problems.

The reason is that GET is mainly for indempotent transactions, whereas POST is 
not (although POST is often used for indempotent transactions because of 
disadvantages of GET such as query string length). What if your browser 
submitted your credit card details to a server, that server sent your browser a 
redirect, and your browser just went ahead and sent your credit card details on 
to another server without even asking you for permission?

As I understand it, there is some support for POST redirect in newer browsers, 
so it may be possible, but I would doubt that any browser would do this without 
popping up some sort of alert for the user.

Erik


-Original Message-
From: Andrew Thorell <[EMAIL PROTECTED]>
Sent: May 20, 2005 2:08 PM
To: Struts Mailing List 
Subject: Submitting form data via redirect

Greetings all,

I was wondering if anyone knows of a way to submit form data via a
 action.
The fields are auto populated so the user doesn't need to see
anything. Does the redirect tag already do this?

Any thoughts?

Thanks,

Andrew

-
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: Submitting form data via redirect

2005-05-20 Thread erikweber
I don't know anything about the logic:redirect tag, but trying to redirect a 
POST transaction brings up other issues. The HTTP RFC, as far as I know, 
doesn't prohibit this behavior, but you are probably going to find browser 
compatibility problems.

The reason is that GET is mainly for indempotent transactions, whereas POST is 
not (although POST is often used for indempotent transactions because of 
disadvantages of GET such as query string length). What if your browser 
submitted your credit card details to a server, that server sent your browser a 
redirect, and your browser just went ahead and sent your credit card details on 
to another server without even asking you for permission?

As I understand it, there is some support for POST redirect in newer browsers, 
so it may be possible, but I would doubt that any browser would do this without 
popping up some sort of alert for the user.

Erik


-Original Message-
From: Andrew Thorell <[EMAIL PROTECTED]>
Sent: May 20, 2005 2:08 PM
To: Struts Mailing List 
Subject: Submitting form data via redirect

Greetings all,

I was wondering if anyone knows of a way to submit form data via a
 action.
The fields are auto populated so the user doesn't need to see
anything. Does the redirect tag already do this?

Any thoughts?

Thanks,

Andrew

-
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: Can a servlet receive its own request?

2005-05-20 Thread Dakota Jack
Not something like "browsers" but browsers.  I am not sure why you
find that difficult.

On 5/20/05, li yanjing <[EMAIL PROTECTED]> wrote:
> sorry bothering you:)
> do you mean you are writing something like "browsers" in java?
> I really interested in that.I want a browser (can be without a GUI)
> that can browse the web with applet.I know it's easy in C/C++ or
> delphi ... but I found this is very hard in java...is that true?
> thanks
> 
> 2005/5/19, Dakota Jack <[EMAIL PROTECTED]>:
> > Those classes are "browsers" without a GUI.  I do this sort of thing
> > all the time.
> --
> 李燕京
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~


Submitting form data via redirect

2005-05-20 Thread Andrew Thorell
Greetings all,

I was wondering if anyone knows of a way to submit form data via a
 action.
The fields are auto populated so the user doesn't need to see
anything. Does the redirect tag already do this?

Any thoughts?

Thanks,

Andrew

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



Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Frank W. Zammetti
Joe Germuska wrote:
I do think that it would be much easier in 1.3 than in 1.2 to solve this 
without doing a forward and re-engaging the request processor; I can see 
where the complexity of intervening in arbitrary spots in the request 
process in the "template pattern" approach of the RequestProcessor might 
make the forward a more attractive solution, but that is one of the 
issues solved by composing the request processing logic out of a number 
of small commands.
I started looking a little bit at chain and 1.3 a few minutes ago. 
Still not qualified to really comment though :)

The only thing I will say is that I had hoped StrutsWS could be brought 
to 1.3 by just inserting some commands in the chain, but it seems like 
some other commands might have to be altered.  I could be wrong about 
that, I have more to learn before I could say with any certainty.

I'd suggest adding a preprocessing command which recognizes the SOAP 
header, as Frank described, and instead of forwarding, simply sets a 
key/value pair in the ActionContext which other commands can interpret.  
Then later, you could extend the PopulateForm class to look for the flag 
and to do its population process based on SOAP data instead of request 
parameters.
Yep, that's what I was talking about in terms of changing things... 
extending classes isn't changing them of course, but it's still not the 
"insert some commands and your done" that I was hoping for.  I suppose 
it's not that bad really, I was just hoping for simple insertions into 
the chain config.

I'm curious, how does strutsws deal with the response?  Is it assumed 
that all of these requests are actually only ever serving SOAP clients, 
so that the response is always a SOAP response?  Or is the goal to have 
one action function for both simple HTTP requests as well as SOAP 
requests?  
It is the later.  The idea is that a single Action can transparently be 
called as part of a typical webapp, or by a SOAP client.  In fact, I use 
this in a production app right now in that way... it's a "typical" 
webapp, more or less!, but some parts of it are exposed as Web Services 
for other systems to call on.  Works great!

In it's current form, when the Action completes in the case of a WS 
request, the forward returned is discarded and a new one is used.  The 
forward used can be to the default template (which is a JSP that creates 
a SOAP response from an ActionForm) or one you specify in an optional 
webservices-config.xml, so you can create a more complex SOAP response 
if you need to (the default template has some limitations but generally 
works for relatively simple responses).

If it's the first, then you have nothing else to do; however, 
if you were interested in the second... well, I suppose you could put 
something in after the ExecuteAction stage or at the beginning of the 
process-view chain which consulted the resulting ForwardConfig and, if 
in "SOAP mode", looked up a different ForwardConfig.  Now that you can 
put arbitrary properties in a ForwardConfig, you could even configure it 
in-place:



   
   

Interesting... there is a good argument to be made for doing that 
instead of having the separate webservices-config.xml file... although, 
there are some other things you can specify in that config file as well, 
so there's a reasonable argument for keeping it separate too (might 
clutter up struts-config in a hurry).  The current config file is 
actually optional in any case, you can simply drop the new RP in and the 
plug-in that is required and your Actions can automatically be called by 
SOAP clients (ignoring security restrictions and session requirements). 
 But, rolling it into struts-config is something to think about.

and then this command early in the process-view chain:
public class AdjustForwardConfigForSoap extends ActionCommandBase {
   public boolean execute( ActionContext ctx ) {
   if (ctx.containsKey("SOAPModeFlat")) {
ForwardConfig fc = ctx.getForwardConfig();
String alternatePath = fc.getProperty("SOAP.path");
if (alternatePath == null) throw new IllegalStateException();
ForwardConfig alt = new ForwardConfig();
alt.setPath(alternatePath);
ctx.setForwardConfig(alt);
   }
  }
}
Typical caveats apply, but I think that would handle it.  I'm not 
totally sure how I feel about a practice of changing the forward config 
in the process-view chain, but I can't see any other way you'd handle it 
without having to bind your code a lot more to the specific fact that it 
might be used in both ways.
Agreed.  As it stands now, I'm doing some rather dicey things to make it 
all work, specifically I'm thinking of the cloning of the ActionMapping 
and altering it on-the-fly for exception handling.  So, what you suggest 
is better in terms of "proper-ness" at least :)

Joe
Frank

-
To unsubscribe, e-mail: [EMAIL P

RE: JSTL and Struts together

2005-05-20 Thread Suresh Khatri
Thank You.

found EL jar and tld in contrib folder.



 Original message 
>Date: Fri, 20 May 2005 06:23:18 -0700
>From: "Karr, David" <[EMAIL PROTECTED]>  
>Subject: RE: JSTL and Struts together  
>To: "Struts Users Mailing List" 
>
>If you look in the "contrib" folder of the Struts 
distribution, you'll
>find the "struts-el" distribution.  This provides a taglib 
that just
>wraps the Struts tag library so that all tag attributes are 
passed
>through the JSTL EL engine, so you could do the following:
>
><%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"/>
><%@ taglib uri="/tags/struts-html-el" prefix="html"/>
>
>
>property="name" 
> value="${param.x}"/>
>
>
>> -Original Message-
>> From: Suresh Khatri [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, May 19, 2005 10:16 PM
>> To: user@struts.apache.org
>> Subject: JSTL and Struts together
>> 
>> 
>> <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"/>
>> <%@ taglib uri="/tags/struts-html" prefix="html"/>
>> 
>> 
>>>  property="name" 
>>  value=""/>
>> 
>> 
>> would display the whole thing. Is there a way of making it 
>> evaluate > of html:text
>> 
>> this works but it is because input is not in the namespace 
>> html
>> >name="name" value=""/>
>> 
>> How can this be solved using Struts and JSTL
>> 
>> 
>> ---
--
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: user-
[EMAIL PROTECTED]
>> 
>> 
>
>-

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


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



Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Joe Germuska
However, just to level-set as far as the current 1.2.x version goes...
Thanks, Frank.  That helps a lot.
I do think that it would be much easier in 1.3 than in 1.2 to solve 
this without doing a forward and re-engaging the request processor; I 
can see where the complexity of intervening in arbitrary spots in the 
request process in the "template pattern" approach of the 
RequestProcessor might make the forward a more attractive solution, 
but that is one of the issues solved by composing the request 
processing logic out of a number of small commands.

I'd suggest adding a preprocessing command which recognizes the SOAP 
header, as Frank described, and instead of forwarding, simply sets a 
key/value pair in the ActionContext which other commands can 
interpret.  Then later, you could extend the PopulateForm class to 
look for the flag and to do its population process based on SOAP data 
instead of request parameters.

I'm curious, how does strutsws deal with the response?  Is it assumed 
that all of these requests are actually only ever serving SOAP 
clients, so that the response is always a SOAP response?  Or is the 
goal to have one action function for both simple HTTP requests as 
well as SOAP requests?  If it's the first, then you have nothing else 
to do; however, if you were interested in the second... well, I 
suppose you could put something in after the ExecuteAction stage or 
at the beginning of the process-view chain which consulted the 
resulting ForwardConfig and, if in "SOAP mode", looked up a different 
ForwardConfig.  Now that you can put arbitrary properties in a 
ForwardConfig, you could even configure it in-place:



   
   

and then this command early in the process-view chain:
public class AdjustForwardConfigForSoap extends ActionCommandBase {
   public boolean execute( ActionContext ctx ) {
   if (ctx.containsKey("SOAPModeFlat")) {
ForwardConfig fc = ctx.getForwardConfig();
String alternatePath = fc.getProperty("SOAP.path");
if (alternatePath == null) throw new IllegalStateException();
ForwardConfig alt = new ForwardConfig();
alt.setPath(alternatePath);
ctx.setForwardConfig(alt);
   }
  }
}
Typical caveats apply, but I think that would handle it.  I'm not 
totally sure how I feel about a practice of changing the forward 
config in the process-view chain, but I can't see any other way you'd 
handle it without having to bind your code a lot more to the specific 
fact that it might be used in both ways.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: Template Library? What is it??

2005-05-20 Thread James Mitchell
The template library, originally developed by David Geary, was sort of a 
launch pad for the Tiles Project.  Cedric or others can verify if I've 
missed anything.

Basically, the template library was not kept around or supported after 1.0 
(Jeez, that seems like ages ago ;).  Tiles is the preferred approach for 
what you are asking about.

So, you can tell your client, yes, you are using "templates".  They are 
obviously basing their statements on old (and I mean REALLY old) 
information.

Hope that helps.
--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

- Original Message - 
From: "David Johnson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Friday, May 20, 2005 10:36 AM
Subject: Template Library? What is it??

Hi there all
Please forgive the stupid question, but I'm working with a client who is
telling me that I am not using the "template library" in my struts
application.
The application uses struts and tiles, with all the page definitions stored
in a tiles-defs.xml file
I thought the Template Library was an alternative to Tiles, not something
that worked with tiles.
thoughts? Tiles is working super as is... but this question is making me
wonder if I missed something...
--
-Dave
[EMAIL PROTECTED]

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


Re: How to I check what version of struts I have?

2005-05-20 Thread David Johnson
ty all :)

On 5/20/05, Nitin Mandolkar <[EMAIL PROTECTED]> wrote: 
> 
> You can find it read me file.
> 
> If you have only struts.jar file. Then unzip it with winzip and look for
> manifest file.
> 
> This my manifest file reading.
> Look for your.
> 
> Manifest-Version: 1.0
> Implementation-Version: 1.0.2
> Specification-Title: Struts Framework
> Specification-Version: 1.0
> Implementation-Title: Struts Framework
> Extension-Name: Struts Framework
> Created-By: Ant 1.4.1
> Implementation-Vendor-Id: org.apache
> Implementation-Vendor: Apache Software Foundation
> Specification-Vendor: Apache Software Foundation
> 
> -ni3
> -Original Message-
> From: David Johnson [mailto:[EMAIL PROTECTED]
> Sent: 20 May 2005 15:38
> To: Struts Users Mailing List
> Subject: How to I check what version of struts I have?
> 
> Is there a file in the struts.jar I can check?
> 
> --
> -Dave
> [EMAIL PROTECTED]
> 



-- 
-Dave
[EMAIL PROTECTED]


Re: [struts-faces] Empty Form in Action

2005-05-20 Thread Markus Koivisto

Now, the action is executed all right, but the form that is sent to the 
action is completely empty. Every field is null.  Does anyone have any 
idea why this happens and how to fix it?

   

It sounds like you are not returning an ActionForward from your action execute method.  Make sure that you have a forward configured under your action or a global forward.  Returning null will result in a blank page.
 

Yes. Returning a null forward will  result in a blank page. However, 
that's not what's happening. The Action does return a forward. What's 
happening is that the Servlet apparently creates a new ActionForm object 
that is empty instead of using the one tha user filled in. For clarity, 
the action looks something like this:


   
  

public ActionForward execute(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) {
   log.info(((EventForm)form).getDesc());
   return mapping.findForward("success");
}
No matter what the user writes, the log will show that the the string is 
null.

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


Re: Nested Beans

2005-05-20 Thread Brandon Mercer
Hubert Rabago wrote:

>You might find the nested tags interesting:
>
><%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
>
>
>
>
>
>
> 
> 
>
>
>  
>
Still a bit miffed.  I'm not sure if it's beanutils that is not copying
the List into the new bean... or if I can't figure out this nested tag. 
I put that code snippet into my JSP and changed the information around
several times and I still don't see the info being printed on my page. 
I guess my next question is... is the JSP code different if I have a
list of beans, as opposed to a single Bean stored in my bean.  I have
the List.  Another OT question is, will beanutils copy a List of Beans
into the new Bean as a List of beans?  i.e.
List school = mgr.getSchoolList(id);

BeanUtils.copyProperties(information,  schools);

Thanks Guys!
Brandon

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



Re: DownLoad Action - exceptions

2005-05-20 Thread Frank W. Zammetti
You mean as far as what the user sees goes?  I wouldn't think you would 
handle it any differently than you would any other exception that might 
happen in an Action.  I personally use the GlobalExceptionHandler 
mechanism in Struts... after the handler writes out some log info and 
such, I forward to a page to display my exception.  As long as the user 
clicks the link that calls your DownloadAction rather than right-click 
and Save As, this should work.

Is that what you meant though, or did I misunderstand the question?
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Lucas Bern wrote:
Hello, I'm lookig for advise...
How should be managed the exceptions by an acton that extends DownLoadAction
Thanks
Lucas

-
 A tu celular ¿no le falta algo?
 Usá Yahoo! Messenger y Correo Yahoo! en tu teléfono celular.
 Más información aquí.


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


RE: How to I check what version of struts I have?

2005-05-20 Thread Nitin Mandolkar
You can find it read me file. 

If you have only struts.jar file. Then unzip it with winzip and look for
manifest file.

This my manifest file reading.
Look for your.

Manifest-Version: 1.0
Implementation-Version: 1.0.2
Specification-Title: Struts Framework
Specification-Version: 1.0
Implementation-Title: Struts Framework
Extension-Name: Struts Framework
Created-By: Ant 1.4.1
Implementation-Vendor-Id: org.apache
Implementation-Vendor: Apache Software Foundation
Specification-Vendor: Apache Software Foundation

-ni3
-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: 20 May 2005 15:38
To: Struts Users Mailing List
Subject: How to I check what version of struts I have?

Is there a file in the struts.jar I can check?

-- 
-Dave
[EMAIL PROTECTED]

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



Re: sTRUTS 1.3 - chain flow

2005-05-20 Thread Frank W. Zammetti
I don't want to comment much, if at all, on the chain-based 
implementation Marco is trying to accomplish because I am frankly not up 
to speed on the 1.3 code base and so am not in a position to comment 
intelligently.  I'm trying to help him off the list as best I can, but 
I'm actually having trouble even before the point he gets to, so I fear 
I haven't, and may not be for a while, much help to Marco.

However, just to level-set as far as the current 1.2.x version goes...
StrutsWS allows an Action to handle Web Service requests (SOAP-based) 
without changing them in any way.  Marco explained it correctly, I'll 
just expand a bit...

You have a new RequestProcessor... in processPreprocess(), it looks for 
the SOAPAction header.  If it isn't there, everything proceeds as 
normal, so non-Web Service requests work as always.

If it *is* present though, regardless of its value, the SOAP message 
(which presumably is the body of the request now) is parsed and a query 
string is created from it.  We then do a forward:

doForward(request.getServletPath() + queryString, request, response);
...so then the RP cycle begins again.  At this point, for all intents 
and purposes, it looks like any other request (with some flags set in 
request attributes so the RP knows to not parse the SOAP message again), 
except that all the parameters are on the query string like a GET rather 
than in the body like a POST.  There are some other WS-specific things 
added to the RP, like cloning the ActionMapping (via an overridden 
processMapping() method) and overriding the input attribute so that we 
can be directed to a proper error handling page, some extra stuff after 
the Action completes to forward to a special JSP that actually renders 
the SOAP-based response, etc.  But really the key point is transforming 
the incoming SOAP-based message to a query string and restarting the 
request cycle.

If you want to take a look, feel free: 
http://sourceforge.net/projects/strutsws/

It was always my intent to port StrutsWS to 1.3 when 1.3 was actually 
released, but Marco has taken the bull by the horns because he has a 
need, and I definitely look forward to him getting it working.  I think 
the chain approach is tailor-made for a project like StrutsWS.

Frank
Joe Germuska wrote:
It works, but yes, you are right in the sense that If I override
The struts catalog, everything will screw up... unless I have a look at
Chain-config before, so that I know what commands are supposed to be
In struts chain, and then add mine while keeping original ones..
I think that's the best solution right now..though I don't know if it is
the
Optimal one

For now, any case where one can't use the default chain should begin 
with extracting the default chain from the struts-core JAR and editing 
it, and then explicitly specifying an alternate location for the file in 
the web.xml init parameters.

 >I don't understand how adding parameters to the request path once the
 >Servlet is already processing it could possibly work; does the
pre-existing code perform a redirect after manipulating the path?

That's what the original WSRequstProcessor was doing (Frank, pls comment
if I am saying something wrong)..
It was working in the old way (for some reason, the preprocess method
was then getting executed twice...and that's what I cannot reproduce,
because the second time the request will come into the preprocess
method, form will be populated..

if it does a redirect, that would explain the doubling as well as the 
correct population after the redirect -- but especially in the chain 
model,  I wouldn't advise that as the best way to solve the problem.

However, thanx to your explanation I have one more trial to try then
I will be lost if it does not work  :-)

You always have us here on the list ;-)
Joe
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Using html:text with java.util.Date property

2005-05-20 Thread Freddy Villalba A.
Hello Nestor,

Personally, I consider it a good practice - and simpler - to handle dates as
String objects (in the presentation layer, that is). This will save you lots
of server-side-headaches and ease your way, especially when you have to face
internationalization issues (for instance, different date formats).
Formatting your data on the server's side will save you some time,
especially when you present the same data in several places. The only
important implication I'd see with this approach is the impact that it could
have on client-side components that depend on this data (such as calendars),
but then, if those also handle i18n issues, then there shouldn't be such
impact (or it should be minimum).

My humble opinion,
Freddy.


-Mensaje original-
De: Néstor Boscán [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 20 de mayo de 2005 16:52
Para: 'Struts Users Mailing List'
Asunto: Using html:text with java.util.Date property


Hi

I'm trying to use the html:text tag with date properties and I'm getting
java.lang.IllegalArgumentException: type mismatch. Any ideas?

Regards,

Néstor Boscán




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



DownLoad Action - exceptions

2005-05-20 Thread Lucas Bern

Hello, I'm lookig for advise...

How should be managed the exceptions by an acton that extends DownLoadAction

Thanks

Lucas


-
 A tu celular ¿no le falta algo?
 Usá Yahoo! Messenger y Correo Yahoo! en tu teléfono celular.
 Más información aquí.

Re: [struts-faces] Empty Form in Action

2005-05-20 Thread gvanmatre
> Hi! I converted a page from struts to jsf, and I'm running to no end of 
> problems using it.
> 
> I previously posted a question about getting LookupDispatchActions to 
> work. Since I received no replies and couldn't figure it out for myself, 
> I made a new action that is specific to this page.
> 
> Now the page is nothing special, jsut a lof of text-fields and a submit 
> button.  So part of it looks like this:
> 
>   
> Start of Problem
>  value="#{equipment.problemStart}"/>   
>  value="#{messages['button.insertEvent']}" immediate="false">
> 
>  
> 
> In the struts-config file, the action maps an anctionform with the name 
> "equipment" to the "/event" action.
> Now, the action is executed all right, but the form that is sent to the 
> action is completely empty. Every field is null.  Does anyone have any 
> idea why this happens and how to fix it?
> 

It sounds like you are not returning an ActionForward from your action execute 
method.  Make sure that you have a forward configured under your action or a 
global forward.  Returning null will result in a blank page.





   

public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {

  
return mapping.findForward("view");
}

Gary


> Besides, I can't execute any action when I access the page 
> "event.faces". When I enter event.faces into the address bar, the page 
> loads correctly, but the action is not performed. When I enter event.do 
> into the address bar, I land on the event page and the event is executed 
> when the form is submitted.
> 
> 
> --
> Markus Koivisto
> 
>   
> 
> 
> -
> 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: Validator inheritance

2005-05-20 Thread Riyaz Mansoor
i asked this same question and the answer i got here is:
this was added to Validator but not public release has been made after this.
u can download a source distro of validator and compile and use it.
> 
the above should work as is - i am using it :)
riyaz
Yaroslav Novytskyy wrote:
Hi!
Does anyone know about the way to "inherit" (1) and "reuse" (2) 
validations for multiple forms in validation.xml
Explanation:
1.
I have a number of myForms: myForm1, myForm2, and so on they are of 
class MyForm (so they all have same fields) and I want them to validate 
the same.
e.g.


property="elementIndex"
depends="integer">




2.
When I inherit MyExtForm from MyForm adding some fields and make 
form-beans myExtForms: myExtForm1, myExtForm2, and so on and would like 
them to "inherit" validation definitions from MyForm.


//!!!validation for elementIndex field
//already inherited!!!

   


Yaroslav Novytskyy
P.S.
this would "compress" size of the validator.xml file
(in my case 10-20 times!)
-
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 html:text with java.util.Date property

2005-05-20 Thread Rick Reumann
Néstor Boscán wrote the following on 5/20/2005 10:52 AM:
I'm trying to use the html:text tag with date properties and I'm getting
java.lang.IllegalArgumentException: type mismatch. Any ideas?
Where are you getting this error, when trying to put your form bean 
properties into a value object? Are you using Bean/PropertyUtils? If so, 
you'll need to register a converter in order to convert your string date 
to a java.util.date (java.sql.date it has by default). I can point you 
in the right direction if that's where you are having the trouble, but 
need a bit more info as to where you are running into the problem.

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


Re: How to I check what version of struts I have?

2005-05-20 Thread Wendy Smoak
From: "Rafael Taboada" <[EMAIL PROTECTED]>


> Yes but which MANIFEST.MF??? In the war files???. Because it shows:

The one in struts.jar (if you're trying to figure out which version of
Struts you're using, that is.)

-- 
Wendy Smoak


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



Re: How to I check what version of struts I have?

2005-05-20 Thread Hubert Rabago
You said it yourself:

On 5/20/05, David Johnson <[EMAIL PROTECTED]> wrote:
> Is there a file in the struts.jar I can check?

Everyone's response:  the META-INF/MANIFEST.MF file.

:)

Hubert


On 5/20/05, Rafael Taboada <[EMAIL PROTECTED]> wrote:
>  Yes but which MANIFEST.MF??? In the war files???. Because it shows:
> 
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.6.1
> Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.)
> 
> 
> --
> 
>  Rafael Taboada
> 
> -
> 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 I check what version of struts I have?

2005-05-20 Thread Rafael Taboada
 Yes but which MANIFEST.MF??? In the war files???. Because it shows:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.)


-- 

 Rafael Taboada

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



Validator inheritance

2005-05-20 Thread Yaroslav Novytskyy
Hi!
Does anyone know about the way to "inherit" (1) and "reuse" (2) 
validations for multiple forms in validation.xml
Explanation:
1.
I have a number of myForms: myForm1, myForm2, and so on they are of 
class MyForm (so they all have same fields) and I want them to validate 
the same.
e.g.

	
		property="elementIndex"
		depends="integer">
		
	


2.
When I inherit MyExtForm from MyForm adding some fields and make 
form-beans myExtForms: myExtForm1, myExtForm2, and so on and would like 
them to "inherit" validation definitions from MyForm.


//!!!validation for elementIndex field
//already inherited!!!

   


Yaroslav Novytskyy
P.S.
this would "compress" size of the validator.xml file
(in my case 10-20 times!)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Using html:text with java.util.Date property

2005-05-20 Thread Néstor Boscán
Hi

I'm trying to use the html:text tag with date properties and I'm getting
java.lang.IllegalArgumentException: type mismatch. Any ideas?

Regards,

Néstor Boscán




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



RE: sTRUTS 1.3 - chain flow

2005-05-20 Thread Joe Germuska
It works, but yes, you are right in the sense that If I override
The struts catalog, everything will screw up... unless I have a look at
Chain-config before, so that I know what commands are supposed to be
In struts chain, and then add mine while keeping original ones..
I think that's the best solution right now..though I don't know if it is
the
Optimal one
For now, any case where one can't use the default chain should begin 
with extracting the default chain from the struts-core JAR and 
editing it, and then explicitly specifying an alternate location for 
the file in the web.xml init parameters.

 >I don't understand how adding parameters to the request path once the
 >Servlet is already processing it could possibly work; does the
pre-existing code perform a redirect after manipulating the path?
That's what the original WSRequstProcessor was doing (Frank, pls comment
if I am saying something wrong)..
It was working in the old way (for some reason, the preprocess method
was then getting executed twice...and that's what I cannot reproduce,
because the second time the request will come into the preprocess
method, form will be populated..
if it does a redirect, that would explain the doubling as well as the 
correct population after the redirect -- but especially in the chain 
model,  I wouldn't advise that as the best way to solve the problem.

However, thanx to your explanation I have one more trial to try then
I will be lost if it does not work  :-)
You always have us here on the list ;-)
Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: How to I check what version of struts I have?

2005-05-20 Thread Wendy Smoak
From: "David Johnson" <[EMAIL PROTECTED]>

> Is there a file in the struts.jar I can check?

Yes, look at MANIFEST.MF (in META-INF).

-- 
Wendy

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



RE: sTRUTS 1.3 - chain flow

2005-05-20 Thread Marco Mistroni
Hello Joe,
Thanx a lot for your reply...


>If you have time to try this, let me know -- but I'd be afraid that 
>if you defined another catalog with the name "struts", it would 
>overwrite the base "struts" catalog instead of merging with it.  If 
>that's true, then you either must edit the one chain-config.xml which 
>defines the catalog named "struts" or we would have to specify a 
>different catalog name for this lookup.  Perhaps we should just 
>choose "struts.local" or something.  This would allow users to add 
>preprocessing behavior without touching the base chain-config.xml, 
>although it doesn't address the other case of mixing commands within 
>the two main chains -- for the moment, I don't see any road to 
>solving that which isn't a lot more work than it's worth, since I 
>feel that users who are choosing to change the core chains are "power 
>users" -- however, the "preprocessing" seems a bit more appropriate 
>to expose to "less powerful" users.

Yes I have tried, I have defined a servlet-preprocess chain to override
What struts does by default.
It works, but yes, you are right in the sense that If I override
The struts catalog, everything will screw up... unless I have a look at
Chain-config before, so that I know what commands are supposed to be 
In struts chain, and then add mine while keeping original ones..
I think that's the best solution right now..though I don't know if it is
the
Optimal one


>I don't understand how adding parameters to the request path once the 
>Servlet is already processing it could possibly work; does the 
>pre-existing code perform a redirect after manipulating the path? 

That's what the original WSRequstProcessor was doing (Frank, pls comment
if I am saying something wrong)..
It was working in the old way (for some reason, the preprocess method
was then getting executed twice...and that's what I cannot reproduce,
because the second time the request will come into the preprocess
method, form will be populated..
Welll, maybe I need to add another command similar to what I already
have..

>Furthermore, I would think that, at least in SelectAction, if you 
>change the path in that way, it would never find the right Action, 
>because the "getPath" method is really just returning a key for the 
>map of ActionConfig objects -- and changing the key would result in a 
>failed lookup.


Yes, that's exactly what's happening... because I am getting a path of
Action.do?param1=x¶m2=y and that does not map to any actinconfig..

However, thanx to your explanation I have one more trial to try then
I will be lost if it does not work  :-)


Thanx a lot and regards!
marco






I must admit that I've never looked at the strutsws project, so I may 
have more questions than answers.  Is the idea that the same action 
can respond to a WebServices request as to a browser HTTP request? 
If that's the case, then you shouldn't need to change SelectAction -- 
because the same action can "handle" everything.  However, you may 
need to add in new commands or override existing ones so that by the 
time the Action is executed, the ActionContext has been populated the 
same way, whether the request came from one source or the other. 
Thus, isn't the place to change things more like PopulateActionForm? 
Don't bother with a whole redirect -- if you know how to construct a 
new URL, then you could just as easily create a map and use 
BeanUtils.populate(ActionForm, Map) -- then when the Action operates, 
it has no concern for which method was used to invoke the request. 
It just trusts that the ActionForm has the right data.

Now, I'm not sure how the response works -- so maybe you want one 
action (perhaps in preprocess) which simply sets a flag in the 
ActionContext:

context.put("webService", new Boolean(isWebService(request));

Then any later commands could simply test that context value to know 
when they need to operate in a different way to accommodate the 
differences of web services.

Is this making sense?  Without a better handle on the details of 
strutsws, I won't be much more help, but unfortunately I don't have 
time to make a big study of that right now.


>But for some reasons, when the flow arrives to my ValidateActionForm
>subclass (I have extended it to see what was happening) the two
>parameters for the action form are still null.
>
>If instead the request  is not a SOAP request, the chain works as
>normal, and it works just fine (forms get populated & action gets
>executed).
>
>So, I think I am missing one point (or I am not overriding the proper
>methods).
>
>Could you tell me what happens after SelectAction.getPath() gets
>called? Where does the request go? 
>Because if I can find the part of the code that gets request parameters
>and populate the form, maybe I can understand what's going on..
>
>If it's not clear, I can mail you my class privately
>
>Thanx in advance for your reply
>
>Regards
>   marco
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Re: How to I check what version of struts I have?

2005-05-20 Thread Hubert Rabago
Check either the Implementation-Version or Specification-Version in
the META-INF/MANIFEST.MF file.

Hubert

On 5/20/05, David Johnson <[EMAIL PROTECTED]> wrote:
> Is there a file in the struts.jar I can check?
> 
> --
> -Dave
> [EMAIL PROTECTED]
> 
>

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



RE: How to I check what version of struts I have?

2005-05-20 Thread Jay Garala
Check the manifest.mf in meta-inf

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.)
Extension-Name: Struts Framework
Specification-Title: Struts Framework
Specification-Vendor: The Apache Software Foundation
Specification-Version: 1.2.4
Implementation-Title: Struts Framework
Implementation-Vendor: The Apache Software Foundation
Implementation-Vendor-Id: org.apache
Implementation-Version: 1.2.4
Class-Path:  commons-beanutils.jar commons-collections.jar commons-dig
 ester.jar commons-logging.jar commons-validator.jar jakarta-oro.jar


-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 20, 2005 10:38 AM
To: Struts Users Mailing List
Subject: How to I check what version of struts I have?

Is there a file in the struts.jar I can check?

-- 
-Dave
[EMAIL PROTECTED]



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



RE: How to I check what version of struts I have?

2005-05-20 Thread Jay Garala
Check the manifest.mf in meta-inf

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.)
Extension-Name: Struts Framework
Specification-Title: Struts Framework
Specification-Vendor: The Apache Software Foundation
Specification-Version: 1.2.4
Implementation-Title: Struts Framework
Implementation-Vendor: The Apache Software Foundation
Implementation-Vendor-Id: org.apache
Implementation-Version: 1.2.4
Class-Path:  commons-beanutils.jar commons-collections.jar commons-dig
 ester.jar commons-logging.jar commons-validator.jar jakarta-oro.jar


-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 20, 2005 10:38 AM
To: Struts Users Mailing List
Subject: How to I check what version of struts I have?

Is there a file in the struts.jar I can check?

-- 
-Dave
[EMAIL PROTECTED]



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



Re: Template Library? What is it??

2005-05-20 Thread David Johnson
It helps a lot! Thanks
 Apparently I had the following in one of my JSPs
 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template"; 
prefix="template" %>

So.. I removed it :) I want using it anyway.


 On 5/20/05, James Mitchell <[EMAIL PROTECTED]> wrote: 
> 
> The template library, originally developed by David Geary, was sort of a
> launch pad for the Tiles Project. Cedric or others can verify if I've
> missed anything.
> 
> Basically, the template library was not kept around or supported after 1.0
> (Jeez, that seems like ages ago ;). Tiles is the preferred approach for
> what you are asking about.
> 
> So, you can tell your client, yes, you are using "templates". They are
> obviously basing their statements on old (and I mean REALLY old)
> information.
> 
> Hope that helps.
> 
> 
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> Consulting / Mentoring / Freelance
> EdgeTech, Inc.
> http://www.edgetechservices.net/
> 678.910.8017
> AIM: jmitchtx
> Yahoo: jmitchtx
> MSN: [EMAIL PROTECTED]
> 
> 
> 
> 
> - Original Message -
> From: "David Johnson" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Friday, May 20, 2005 10:36 AM
> Subject: Template Library? What is it??
> 
> 
> Hi there all
> Please forgive the stupid question, but I'm working with a client who is
> telling me that I am not using the "template library" in my struts
> application.
> The application uses struts and tiles, with all the page definitions 
> stored
> in a tiles-defs.xml file
> I thought the Template Library was an alternative to Tiles, not something
> that worked with tiles.
> thoughts? Tiles is working super as is... but this question is making me
> wonder if I missed something...
> 
> --
> -Dave
> [EMAIL PROTECTED]
> 
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


How to I check what version of struts I have?

2005-05-20 Thread David Johnson
Is there a file in the struts.jar I can check?

-- 
-Dave
[EMAIL PROTECTED]


Template Library? What is it??

2005-05-20 Thread David Johnson
Hi there all
 Please forgive the stupid question, but I'm working with a client who is 
telling me that I am not using the "template library" in my struts 
application.
 The application uses struts and tiles, with all the page definitions stored 
in a tiles-defs.xml file 
 I thought the Template Library was an alternative to Tiles, not something 
that worked with tiles.
 thoughts? Tiles is working super as is... but this question is making me 
wonder if I missed something...

-- 
-Dave
[EMAIL PROTECTED]


FRIDAY - WebGVO Struts-Groove app - help wanted

2005-05-20 Thread Neil Finlayson
People,

I'm looking for bug/enhancement assistance on the following Struts app which
is I believe the first J2EE connector to the very cool Microsoft Groove
virtual office.

http://mrquintron.gla.mysterian.com/WebGVO/execute/listWorkspaceSetup

Its built on John Carnell's very nice Struts starter project from that Wrox
book of a couple of years ago.

I hope I haven't broken protocol on the list with this request and by
mentioning Microsoft!!

Regards,

Neil Finlayson
__
Dr. Neil Finlayson
Technical Director, AtlanticShack
Website: http://www.atlanticshack.com/
Weblog: http://radio.weblogs.com/0112316/
Tel: +44 (01851) 810124
Mobile: 07919 445909



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



RE: sTRUTS 1.3 - chain flow

2005-05-20 Thread Joe Germuska
At 2:43 PM +0100 5/20/05, Marco Mistroni wrote:
Hello Joe,
As an aside, I think reveals an unfortunate (though minor)
shortcoming of the basic chain model: either way, you must edit the
struts chain-config.xml in order to use this behavior.  I would
prefer if there were a way for users to register their preprocessing
command without having to extract the chain-config and edit it.  That
in itself isn't so bad, but it also makes it harder to track future
changes in the chain-config.xml as distributed and integrate your
local details with newer versions.  It almost calls for an AOP-like
configuration realm.
Hold on the 'editing' of chain config was my mistake because I
didn't want to have too many files while I was testing my app.
Now that I remember, in that famous article of Bill Siggelkow it was
explained how to 'override' chain processing by just specifying
The chain that you want to override..
In that case, I could just write my own custom-config.xml which contains
The chain servlet-preprocess (or whatever chain I want to override) and
Just declare it.. (like I have done in another very simple app), though
I don't know if this will solve problems that you have identified above.
If you have time to try this, let me know -- but I'd be afraid that 
if you defined another catalog with the name "struts", it would 
overwrite the base "struts" catalog instead of merging with it.  If 
that's true, then you either must edit the one chain-config.xml which 
defines the catalog named "struts" or we would have to specify a 
different catalog name for this lookup.  Perhaps we should just 
choose "struts.local" or something.  This would allow users to add 
preprocessing behavior without touching the base chain-config.xml, 
although it doesn't address the other case of mixing commands within 
the two main chains -- for the moment, I don't see any road to 
solving that which isn't a lot more work than it's worth, since I 
feel that users who are choosing to change the core chains are "power 
users" -- however, the "preprocessing" seems a bit more appropriate 
to expose to "less powerful" users.

Sorry if I add another question..because there's something that has been
bothering me since I am trying to port my app to 1.3.
App was frank zammetti's strutsws, that allows to call Struts action
using
SOAP requests.
Without going into details, RequestProcessor.preProcess(), if identifies
an incoming XML request, it will extract those parameters and add them
to the URL (e.g. /myAction.do)
If the request was an XML request, it will extract the parameters from
the SOAP request, and produce a new URL /myAction.do?param1=x¶m2=y
I Have extended the SelectAction.getPath(Context ctx) command so that it
does exactly
What the original RequestPreprocessor.preProcess() was doing, so that
the path returned by   getPath(Context ctx) will be
/myAction.do?param1=x¶m2=y).
I don't understand how adding parameters to the request path once the 
Servlet is already processing it could possibly work; does the 
pre-existing code perform a redirect after manipulating the path? 
Furthermore, I would think that, at least in SelectAction, if you 
change the path in that way, it would never find the right Action, 
because the "getPath" method is really just returning a key for the 
map of ActionConfig objects -- and changing the key would result in a 
failed lookup.

I must admit that I've never looked at the strutsws project, so I may 
have more questions than answers.  Is the idea that the same action 
can respond to a WebServices request as to a browser HTTP request? 
If that's the case, then you shouldn't need to change SelectAction -- 
because the same action can "handle" everything.  However, you may 
need to add in new commands or override existing ones so that by the 
time the Action is executed, the ActionContext has been populated the 
same way, whether the request came from one source or the other. 
Thus, isn't the place to change things more like PopulateActionForm? 
Don't bother with a whole redirect -- if you know how to construct a 
new URL, then you could just as easily create a map and use 
BeanUtils.populate(ActionForm, Map) -- then when the Action operates, 
it has no concern for which method was used to invoke the request. 
It just trusts that the ActionForm has the right data.

Now, I'm not sure how the response works -- so maybe you want one 
action (perhaps in preprocess) which simply sets a flag in the 
ActionContext:

context.put("webService", new Boolean(isWebService(request));
Then any later commands could simply test that context value to know 
when they need to operate in a different way to accommodate the 
differences of web services.

Is this making sense?  Without a better handle on the details of 
strutsws, I won't be much more help, but unfortunately I don't have 
time to make a big study of that right now.


But for some reasons, when the flow arrives to my ValidateActionForm
subclass (I have extended it to see what wa

Re: Easy form populate question for gurus

2005-05-20 Thread Randy Kennedy
Here is a snippet from my initializing action before it goes to the form 
view:

...
   LazyValidatorForm ppForm = (LazyValidatorForm)form;
   ProtectedPersonLocal ppl = null;
   ProtectedPersonDTO dto = null;
   String sid = null;
  
   sid = request.getParameter("sid");
  
   ppl = 
(ProtectedPersonLocal)EJBHelper.getLocalInstance(ProtectedPersonLocalHome.JNDI_NAME);
   dto = ppl.getProtectedPersonBySid(sid);
   BeanUtils.copyProperties(ppForm, dto);


The values in question are java.lang.String objects.  Should be basic 
stuff right?  I stepped through the debugger, and the LazyValidatorForm 
object is being set correctly for the null strings from my VO; however, 
when it comes to displaying the form for editing, the "null" fields 
contain an object reference like [EMAIL PROTECTED]  If I update 
the form with any type of text values, it'll show correctly the next 
time that I go to update the data.  It's only happening when there are 
null values involved.

Hubert Rabago wrote:
Please provide more information.  How is your form configured/written?
Are there "initial" values?  What is the type of the data from which
you're copying a value?
Hubert
On 5/20/05, Randy Kennedy <[EMAIL PROTECTED]> wrote:
 

Why does an object reference (e.g. [EMAIL PROTECTED]) show up in
my text fields when I prepopulate the form using Jakarta commons
BeanUtils.copyProperties(...)?  The values in the database are null, and
I know this has something to do with it, so I guess my real question is,
"How do I fix it?".
--
Randy Kennedy
Appriss, Inc.
   

--
Randy Kennedy
Software Engineer
Appriss, Inc. (Provider of the VINE Service)
10401 Linn Station Road, Suite 200
Louisville, KY  40223-3842
Web   : http://www.vineco.com, http://www.appriss.com
Email : [EMAIL PROTECTED]

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


RE: sTRUTS 1.3 - chain flow

2005-05-20 Thread Marco Mistroni
Hello Joe,

>As an aside, I think reveals an unfortunate (though minor) 
>shortcoming of the basic chain model: either way, you must edit the 
>struts chain-config.xml in order to use this behavior.  I would 
>prefer if there were a way for users to register their preprocessing 
>command without having to extract the chain-config and edit it.  That 
>in itself isn't so bad, but it also makes it harder to track future 
>changes in the chain-config.xml as distributed and integrate your 
>local details with newer versions.  It almost calls for an AOP-like 
>configuration realm.

Hold on the 'editing' of chain config was my mistake because I
didn't want to have too many files while I was testing my app.
Now that I remember, in that famous article of Bill Siggelkow it was
explained how to 'override' chain processing by just specifying 
The chain that you want to override..
In that case, I could just write my own custom-config.xml which contains
The chain servlet-preprocess (or whatever chain I want to override) and
Just declare it.. (like I have done in another very simple app), though
I don't know if this will solve problems that you have identified above.

>If you changed the behavior of 
>org.apache.commons.chain.generic.LookupCommand, you would impact 
>Struts in each of the places where it has a  element -- 
>looking up the preprocessing command, looking up the process-action 
>chain, and looking up the process-view chain.  That's probably not 
>

yep, I have noticed it :-)

Sorry if I add another question..because there's something that has been
bothering me since I am trying to port my app to 1.3.

App was frank zammetti's strutsws, that allows to call Struts action
using
SOAP requests.
Without going into details, RequestProcessor.preProcess(), if identifies
an incoming XML request, it will extract those parameters and add them
to the URL (e.g. /myAction.do)
If the request was an XML request, it will extract the parameters from
the SOAP request, and produce a new URL /myAction.do?param1=x¶m2=y

I Have extended the SelectAction.getPath(Context ctx) command so that it
does exactly
What the original RequestPreprocessor.preProcess() was doing, so that
the path returned by   getPath(Context ctx) will be
/myAction.do?param1=x¶m2=y).

But for some reasons, when the flow arrives to my ValidateActionForm
subclass (I have extended it to see what was happening) the two
parameters for the action form are still null.

If instead the request  is not a SOAP request, the chain works as
normal, and it works just fine (forms get populated & action gets
executed).

So, I think I am missing one point (or I am not overriding the proper
methods).

Could you tell me what happens after SelectAction.getPath() gets
called? Where does the request go?  
Because if I can find the part of the code that gets request parameters
and populate the form, maybe I can understand what's going on..

If it's not clear, I can mail you my class privately

Thanx in advance for your reply

Regards
marco


























thanx and regards
marco


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



Re: Nested Beans

2005-05-20 Thread Brandon Mercer
Hubert Rabago wrote:

>You might find the nested tags interesting:
>
><%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
>
>
>
>
>
>
> 
> 
>
>
>
>Hubert
>  
>
Looks like what I want to do.  I'll go check it out, thanks for the link.
Brandon


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



Re: Nested Beans

2005-05-20 Thread Hubert Rabago
You might find the nested tags interesting:

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






 
 



Hubert

On 5/20/05, Brandon Mercer <[EMAIL PROTECTED]> wrote:
> Hello Everyone,
> I've got an easy one, that is stupifying me because of my tiredness.
> I've got a POJO with a List in it.  The List is a list of beans.  In my
> JSP page I'm trying to iterate over the list of beans.  Here goes:
> 
> public class Information {
> private String name = null;
> private String addr = null;
> private List School = null;
> 
> 
> School is a bean that looks like:
> 
> public class School {
> private String schoolname = null;
> private String location = null;
> }
> 
> Then I set that information in the session:
> session.setAttribute("information", information);
> 
> Each information bean will have a list of schools in it and I'd like to
> iterate over that list on the JSP page but I'm not sure how far I am
> from the truth!  :-P  Right now I've got:
> 
> 
> 
> 
>  
> Thanks for your help everyone.
> Brandon
>

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



[struts-faces] Empty Form in Action

2005-05-20 Thread Markus Koivisto
Hi! I converted a page from struts to jsf, and I'm running to no end of 
problems using it.

I previously posted a question about getting LookupDispatchActions to 
work. Since I received no replies and couldn't figure it out for myself, 
I made a new action that is specific to this page.

Now the page is nothing special, jsut a lof of text-fields and a submit 
button.  So part of it looks like this:

 
   Start of Problem
  
   



In the struts-config file, the action maps an anctionform with the name 
"equipment" to the "/event" action.
Now, the action is executed all right, but the form that is sent to the 
action is completely empty. Every field is null.  Does anyone have any 
idea why this happens and how to fix it?

Besides, I can't execute any action when I access the page 
"event.faces". When I enter event.faces into the address bar, the page 
loads correctly, but the action is not performed. When I enter event.do 
into the address bar, I land on the event page and the event is executed 
when the form is submitted.

--
Markus Koivisto
 

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


RE: JSTL and Struts together

2005-05-20 Thread Karr, David
If you look in the "contrib" folder of the Struts distribution, you'll
find the "struts-el" distribution.  This provides a taglib that just
wraps the Struts tag library so that all tag attributes are passed
through the JSTL EL engine, so you could do the following:

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"/>
<%@ taglib uri="/tags/struts-html-el" prefix="html"/>


   


> -Original Message-
> From: Suresh Khatri [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 19, 2005 10:16 PM
> To: user@struts.apache.org
> Subject: JSTL and Struts together
> 
> 
> <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"/>
> <%@ taglib uri="/tags/struts-html" prefix="html"/>
> 
> 
>  property="name" 
>  value=""/>
> 
> 
> would display the whole thing. Is there a way of making it 
> evaluate  of html:text
> 
> this works but it is because input is not in the namespace 
> html
> name="name" value=""/>
> 
> How can this be solved using Struts and JSTL
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Nested Beans

2005-05-20 Thread Brandon Mercer
Hello Everyone,
I've got an easy one, that is stupifying me because of my tiredness. 
I've got a POJO with a List in it.  The List is a list of beans.  In my
JSP page I'm trying to iterate over the list of beans.  Here goes:

public class Information {
private String name = null;
private String addr = null;
private List School = null;


School is a bean that looks like:

public class School {
private String schoolname = null;
private String location = null;
}

Then I set that information in the session:
session.setAttribute("information", information);

Each information bean will have a list of schools in it and I'd like to
iterate over that list on the JSP page but I'm not sure how far I am
from the truth!  :-P  Right now I've got:






ActionErrors & ActionMessages bif problem

2005-05-20 Thread Vinicius Caldeira Carvalho
Hello there! I'm really, really confused with this. Being a struts user 
for a quite some time, I must say, it's a great framework but its 
warning system sux big time.
Here's my problem:

I have 2 types of errors in my system (general are displayed on top of 
page, detailed in front of each property)

So this is a typical piece of code:
ActionErrors errors = new ActionErrors();
errors.add("org.struts.action.ERROR",new ActionMessage("general.error"); 
//this shall be displayed on top

errors.add("invalidUser", newActionMessage("user.invalid"));
saveErrors(errors,request);
so here's my jsp :

   
  
   


and then

Well this works for this case, but when my ValidtorForm puts messages to 
the error stack they are not displayed.
So I cameup with this stupid idea :


the code in front of the text field remains the same. And now, I've got 
the invalid username error displayed twice ...

I've got on a dead end. How can I combine ValidatorForm errors + my 
custom errors messages?

This issue is causing a really big problem.
Best regards
Vinicius
 

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


Re: JSTL and Struts together

2005-05-20 Thread Hubert Rabago
Suresh, I would recommend you still use "html" as prefix instead of
"html-el".  This way, when you switch to a web container that supports
EL and decide to drop the struts-el.jar, you can just modify your <%@
taglib %> declaration to reconfigure (or, depending on how configure
tags, just your web.xml file).

Of course there's nothing wrong with using the "html-el" prefix, but I
prefer sticking with the usual prefixes.

Hubert

On 5/20/05, David Johnson <[EMAIL PROTECTED]> wrote:
> you can use the  control to
> accomplish just that I'm doing that in a bunch of places.
> 
> On 5/20/05, Shey Rab Pawo <[EMAIL PROTECTED]> wrote:
> >
> >  etc.
> >
> > On 5/19/05, Suresh Khatri <[EMAIL PROTECTED]> wrote:
> > > <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"/>
> > > <%@ taglib uri="/tags/struts-html" prefix="html"/>
> > >
> > > http://dynaadd.do>">
> > >  > > property="name"
> > > value=""/>
> > > 
> > >
> > > would display the whole thing. Is there a way of making it
> > > evaluate  > > of html:text
> > >
> > > this works but it is because input is not in the namespace
> > > html
> > >  > > name="name" value=""/>
> > >
> > > How can this be solved using Struts and JSTL
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > No one ever went blind looking at the bright side of life.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> -Dave
> [EMAIL PROTECTED]
> 
>

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



RE: sTRUTS 1.3 - chain flow

2005-05-20 Thread Joe Germuska
No, rather than changing LookupCommand, you would put your logic into 
one or more classes that are clean implementations of Command and 
configure in a catalog with a name so that the existing lookup 
command would find them -- either put them in catalog "struts"  under 
the name "servlet-standard-preprocess" or change the configuration of 
the lookup command to find them:
  
catalogName="*your catalog*"
   name="*your command name*"
   optional="true"/>

You shouldn't need to change the behavior of LookupCommand itself -- 
you just need to give it the right information to do its job.

As an aside, I think reveals an unfortunate (though minor) 
shortcoming of the basic chain model: either way, you must edit the 
struts chain-config.xml in order to use this behavior.  I would 
prefer if there were a way for users to register their preprocessing 
command without having to extract the chain-config and edit it.  That 
in itself isn't so bad, but it also makes it harder to track future 
changes in the chain-config.xml as distributed and integrate your 
local details with newer versions.  It almost calls for an AOP-like 
configuration realm.

Also, to clarify:
And so, I will need to replace this entry in chain-config.xml

with

This  element is just a bit of syntactic sugar that Craig 
came up with in the chain-config digesting process that allows you to 
do this once and then later have simpler configuration, say for 
example if you use a given command frequently.  It's comparable to 
the  tag in Ant.  But again, the whole intention of the 
LookupCommand is that instead of changing its behavior, you point it 
at the other commands which you want executed.

If you changed the behavior of 
org.apache.commons.chain.generic.LookupCommand, you would impact 
Struts in each of the places where it has a  element -- 
looking up the preprocessing command, looking up the process-action 
chain, and looking up the process-view chain.  That's probably not 
what you want.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: JSTL and Struts together

2005-05-20 Thread David Johnson
you can use the  control to 
accomplish just that I'm doing that in a bunch of places.

On 5/20/05, Shey Rab Pawo <[EMAIL PROTECTED]> wrote: 
> 
>  etc.
> 
> On 5/19/05, Suresh Khatri <[EMAIL PROTECTED]> wrote:
> > <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"/>
> > <%@ taglib uri="/tags/struts-html" prefix="html"/>
> >
> > http://dynaadd.do>">
> >  > property="name"
> > value=""/>
> > 
> >
> > would display the whole thing. Is there a way of making it
> > evaluate  > of html:text
> >
> > this works but it is because input is not in the namespace
> > html
> >  > name="name" value=""/>
> >
> > How can this be solved using Struts and JSTL
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> No one ever went blind looking at the bright side of life.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


Re: Opening a Form in a New Window - Help!

2005-05-20 Thread David Johnson
hey there
 What meant was that I wanted to open a new browser that had these options 
set:
 > window.height=400;
> window.width=300;
> window.status=yes;
> window.toolbar=no;
> window.menubar=no;
> window.location=no;
so that it isnt just another same size browser with tiny help text in it.

 On 5/19/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: 
> 
> Hello,
> 
> In order to set those options you will have to use Javascript. The
> target attribute is a fairly dumb animal in that it just opens said
> target with the location you specify. Anything more requires scripting.
> 
> I wasn't clear on what you meant by:
> 
> "Does anyone know how I might specify these options when opening up a
> new window, then submitting a struts form to said window?"
> 
> Specifically, the part about submitting a struts form to said window...
> can you explain that a different way because I'm not sure what your
> trying to accomplish from that.
> 
> Frank
> 
> David Johnson wrote:
> > Hi there
> > I'm trying to open up a new window from my struts application which will
> > contain "help" information. The link opening the window looks like this 
> so
> > far
> >
> > http://help.do> " 
> target="_help">Help
> > What I'd like to do is specify the following options
> >
> > window.height=400;
> > window.width=300;
> > window.status=yes;
> > window.toolbar=no;
> > window.menubar=no;
> > window.location=no;
> > which I'd normally do using a javascript method... like this:
> >
> > 
> > function openHelpWindow(){
> > var helpWindow = window.open("","_help",
> > "height=300,width=450,status=yes,toolbar=no,menubar=no,location=no");
> > return helpWindow;
> > }
> > 
> > Does anyone know how I might specify these options when opening up a new
> > window, then submitting a struts form to said window?
> >
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


Re: set-property?

2005-05-20 Thread Hubert Rabago
The  element is used to set properties when using custom
configuration objects.  For your particular example, check the custom
ActionMapping configuration object declared in the 
tag.

The /WEB-INF/struts-config.xml that comes with struts-examples.war
illustrates this:

   





  

If you look at the CustomActionMapping source code, you'll see it has
an "example" property with accessors.  You can access this value in
your action via the ActionMapping parameter provided to the execute()
method:

public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

CustomActionMapping cam = (CustomActionMapping) mapping;
String example = cam.getExample();
...

}

The struts-examples.war app comes with the Struts binary distribution.
 (The war itself includes its source.)  It shows other config elements
(form-bean, forward) using arbitrary properties as well.


Note that starting with Struts 1.3, you can provide arbitrary
properties to configuration elements without requiring a custom
object.  This is done by using the key attribute:



Then in the action:

String example = mapping.getProperty("example");


Hubert


On 5/20/05, Nitin Mandolkar <[EMAIL PROTECTED]> wrote:
> In this action mapping. What is mean by set-property. What it will do.
> How we can use this one.
> 
> In which condition this is useful.
> 
>  name="LoginForm"
> type="com.myapp.LoginAction"
> scope="session">
> 
> 
> 
> 
> 
> 
> 
>
>

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



Re: Easy form populate question for gurus

2005-05-20 Thread Hubert Rabago
Please provide more information.  How is your form configured/written?
 Are there "initial" values?  What is the type of the data from which
you're copying a value?

Hubert


On 5/20/05, Randy Kennedy <[EMAIL PROTECTED]> wrote:
> Why does an object reference (e.g. [EMAIL PROTECTED]) show up in
> my text fields when I prepopulate the form using Jakarta commons
> BeanUtils.copyProperties(...)?  The values in the database are null, and
> I know this has something to do with it, so I guess my real question is,
> "How do I fix it?".
> 
> --
> Randy Kennedy
> Appriss, Inc.
> 
>

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



RE: Easy form populate question for gurus

2005-05-20 Thread Mark Benussi
If your Database values are null then the corresponding Object should be
null and not an Object Reference.

Make sure when you read a ResultSet you call

Integer column = null;

int tmpColumn = results.getInteger("COLUMN");
if(!results.wasNull()) {
// I think it is wasNull(). You don't need to worry about it with
Strings.
column = new Integer(tmpColumn);
}

// Assuming column was the property you were attempting to populate your
form with using BeanUtils.

I placed a method in my DBHelper for all the data type gets to avoid
duplicating all this code.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Randy Kennedy
Sent: 20 May 2005 13:20
To: user@struts.apache.org
Subject: Easy form populate question for gurus

Why does an object reference (e.g. [EMAIL PROTECTED]) show up in 
my text fields when I prepopulate the form using Jakarta commons 
BeanUtils.copyProperties(...)?  The values in the database are null, and 
I know this has something to do with it, so I guess my real question is, 
"How do I fix it?".

--
Randy Kennedy
Appriss, 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: Easy form populate question for gurus

2005-05-20 Thread DGraham
Did you observe any odd behavior when you started the debugger and stepped 
through the source for BeanUtils.copyProperties(Object dest, Object orig)?


Randy Kennedy <[EMAIL PROTECTED]> 
Sent by: news <[EMAIL PROTECTED]>
05/20/2005 08:20 AM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Easy form populate question for gurus






Why does an object reference (e.g. [EMAIL PROTECTED]) show up in 
my text fields when I prepopulate the form using Jakarta commons 
BeanUtils.copyProperties(...)?  The values in the database are null, and 
I know this has something to do with it, so I guess my real question is, 
"How do I fix it?".

--
Randy Kennedy
Appriss, Inc.


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



Easy form populate question for gurus

2005-05-20 Thread Randy Kennedy
Why does an object reference (e.g. [EMAIL PROTECTED]) show up in 
my text fields when I prepopulate the form using Jakarta commons 
BeanUtils.copyProperties(...)?  The values in the database are null, and 
I know this has something to do with it, so I guess my real question is, 
"How do I fix it?".

--
Randy Kennedy
Appriss, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP + CSS

2005-05-20 Thread Stein Erik Berget
On Fri, 20 May 2005 10:34:17 +, draegoon Z <[EMAIL PROTECTED]>  
wrote:

Is there any way to use a JSP page as a CSS stylesheet?
Like: @import url("./css/TEST.jsp");
What I'm trying to do is actually use tiles tags inside the stylesheet  
to make a template
so as to seriously reduce the amount of CSS.

Anybody got any good solutions out there for this?
Sure. Just add <%@ page language="java" contentType="text/css" %> on top  
in the file 'css/TEST.jsp'. You could skip the language part if you like...

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


set-property?

2005-05-20 Thread Nitin Mandolkar
In this action mapping. What is mean by set-property. What it will do.
How we can use this one. 

In which condition this is useful.

 













   

 

 



problem in installing struts

2005-05-20 Thread sharad singh
Hello Prashant

  I am sharad from IIT-Kanpur.I have just started work on struts
.I am going to install struts .but facing a lot of problem in
installing struts.i have down load struts 1.2.4-src.now i am facing
problem in setting build.properties.after setting build .properties
and compiling by "ant dist" got error
" /home/madhavi/user/sharad/jakarta-struts-1.2.4-src/build.xml:282:
The  task doesn't support the "failonerror" attribute." this
.can u tell how i resolve this error.


 Thanking you.



sharad

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



Re: JSP + CSS

2005-05-20 Thread Leon Rosenberg

like: 


regards
Leon

On Fri, 2005-05-20 at 10:34 +, draegoon Z wrote:
> Is there any way to use a JSP page as a CSS stylesheet?
> 
> Like: @import url("./css/TEST.jsp");
> 
> What I'm trying to do is actually use tiles tags inside the stylesheet to 
> make a template
> so as to seriously reduce the amount of CSS.
> 
> Anybody got any good solutions out there for this?
> 
> Thanx
> 
> 
> 
> -
> 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]



JSP + CSS

2005-05-20 Thread draegoon Z
Is there any way to use a JSP page as a CSS stylesheet?
Like: @import url("./css/TEST.jsp");
What I'm trying to do is actually use tiles tags inside the stylesheet to 
make a template
so as to seriously reduce the amount of CSS.

Anybody got any good solutions out there for this?
Thanx

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


RE: sTRUTS 1.3 - chain flow

2005-05-20 Thread Marco Mistroni
Hello Joe,
I have read in a sample chain-config.xml that I have downloaded,
That RequestProcessor.processPreprocess maps now to  'LookupCommand with
optional="true"'

Does that mean that, If in my webapp my
RequestProcessor.processPreProcess was doing some logic, now I have to
put that logic into a
Class that extends LookUpCommand?

And so, I will need to replace this entry in chain-config.xml 


with


?

thanx in advance and regards
 marco


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



RE: Can't Undeploy Struts Applications

2005-05-20 Thread Prashant Reddy

+1. Same here,

For me struts-applications dont get re-deployed because the jar -
commons-digester.jar is still locked.

Donot think its a tomcat problem, coz I am using a different Servlet engine.

-Prashant
-Original Message-
From: Harry Hartley [mailto:[EMAIL PROTECTED]
Sent: Friday, May 20, 2005 10:24 AM
To: user@struts.apache.org; tomcat-user@jakarta.apache.org
Subject: Can't Undeploy Struts Applications


Is this a bug?



So, I deploy the struts-blank webapp to my webapps directory under tomcat.
Everything works fine.



Then I try to undeploy it under the manager, and it responds the a message,
context undeployed.



But when I do a list under the tomcat manager it is still there.



If I look under the webapps directory, my struts-blank directory is still
there.



I look under the application directory under webapps, and I find that the
commons-digester.jar, commons-validator.jar, and struts.jar are still there.
If I try to delete them, I cannot. My operating complains that these files
are still in use by another application.



I shut down tomcat, and presto, the application is really undeployed.



I actually found this problem working on my own application, and found that
the build script failed to (re) deploy even though I undeployed an
application.



Thus I have two questions:

1)   If an application is not fully undeployed, shouldn't the tomcat
manager complain about it with a message or warning, rather than just ok?

2)   Is there a known issue/bug with tomcat not releasing .jar resources
(specifically the ones mentioned above) of applications being undeployed?



I have searched under bugzilla, and there seems to be a undeploy bug
identified and fixed, but I am not sure if it applies to what I have
identified here or not.



Versions:

Struts 1.2.4

Tomcat: 5.5

J2SE: 5.0



Any Help?!?!?



Warm Regards,



Harry











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



Re: [HELP] Couldn't include tag in onClick in

2005-05-20 Thread Nandan
Hello,
Please replace your code with something like this:

var MESSAGE = "" ;


   value="<%= (String)rId%>"
   onclick='javascript:whichAuctionType("MESSAGE");'
/>

If it does work, I will then explain to you why :)

-Original Message-
From: Pham Anh Tuan [mailto:[EMAIL PROTECTED] 
Sent: 20 May 2005 05:46
To: Struts Users Mailing List
Subject: [HELP] Couldn't include  tag in onClick in


Hi all,
I couldn't include  tag in onclick attribute of 
like below:

and the result: html source code shows like below:
");">
 is not recognized!
help me, plz :(
Anh Tuan
-
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]


file upload struts - pdf corrupted

2005-05-20 Thread Nandan
Hello,
I am using struts 1.0.2 to upload files. However sometimes a PDF file gets 
corrupted after a file upload. I see that random characters are replaced a hex 
0A. Is this is a known bug? Please let me know
GP

RE: [HELP] Couldn't include tag in onClick in

2005-05-20 Thread Nitin Mandolkar
You are trying to use struts tag in java script. Please check how to use
struts tag in java script. 



-Original Message-
From: Pham Anh Tuan [mailto:[EMAIL PROTECTED] 
Sent: 20 May 2005 05:46
To: Struts Users Mailing List
Subject: [HELP] Couldn't include  tag in onClick in


Hi all,

I couldn't include  tag in onclick attribute of 
like below:



and the result: html source code shows like below:

");">

 is not recognized!

help me, plz :(

Anh Tuan

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