Re: Struts creates its own session object?

2006-01-23 Thread Vikrama Sanjeeva
Hi,

  Thanks for the good explanation.

Bye,
Viki.

On 1/19/06, Craig McClanahan [EMAIL PROTECTED] wrote:

 On 1/19/06, Martin Morawetz [EMAIL PROTECTED] wrote:
 
  Hi,
 
  We have two web applications, a Struts-application
  and a strutsless application.
 
  Both web applications have to use the same session.


 This is not possible, either with or without Struts.  The servlet
 specification requires that the sessions for each web application be
 independent of each other.

 When you think about this a little, it is easy to understand the reasons
 for
 this restriction.  The most important one is that the classes visible to
 each application are different, because each app loads its own
 WEB-INF/classes and WEB-INF/lib directories.  Therefore, even if the
 session
 object were shared, a session attribute stored by webapp A might not be
 usable by webapp B, simply because webapp B cannot see the class for that
 object since it exists only in webapp A.

 You will need to use a strategy other than sharing sessions to share
 information between these two apps.

 Craig




validating a single textbox for two mask values

2006-01-23 Thread rama chandrula

Hi,

I have a text box in which I can either enter a E-mail address or the Phone 
number.
I want to use Struts-Validator for validating the format of both the email 
and phone number.


How can I specify the values of both the masks for the same text box.
In the snippet given below, contactID is used to refer the email address.  
Is the following correct ?



form name=myForm
   field property=addContactID
  depends=mask
  arg0 key=prompt.contactID/
  arg1 key=error.invalid.contactID/
  var
  var-namemask/var-name
  var-value(${contactID})|(${phoneNumber})/var-value
  /var
   /field
   /form

_
NRIs, Free Money Transfers to over 30 Million Visa Cards in India. 
http://creative.mediaturf.net/creatives/icicibank/MSN_VISA_TOL.htm



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



Regex works in Java but not in Struts Validator

2006-01-23 Thread rama chandrula

Hi,

I have a regex as given below that works with Java 1.5, But when I use the 
same as the maxk value in Struts-Validator it does not work. Can anyone 
point out the reason


Regards,
chandra

_
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN 
Search http://server1.msn.co.in/Profile/bipashabasu.asp



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



Struts vs JSF decision

2006-01-23 Thread Rivka Shisman
Hello Friends,

 

I've been working with Struts for some months now and I really like the
framework and I especially like the people that participate in the
mailing lists.

Today I spoke with a project manager from IBM (consulting team)
regarding consulting services for developing our web J2EE applications
with Websphere Application Server.

The specialist said he doesn't have development experience with Struts,
but he strongly recommended using JSF. He said that JSF is J2EE standard
and is more comfortable and flexible to work with.

 

I don't have experience with JSF and I really need to get your opinion
on this:

 

1.  Do JSF and struts complete each or replace each other?
2.  For new applications (that are written from scratch) - is it
wise to use Struts or maybe move to JSF?

 

Thanks

Rivka


Re: Struts vs JSF decision

2006-01-23 Thread Sheshadri Patel
On 1/23/06, Rivka Shisman [EMAIL PROTECTED] wrote:

 Hello Friends,



 I've been working with Struts for some months now and I really like the
 framework and I especially like the people that participate in the
 mailing lists.

 Today I spoke with a project manager from IBM (consulting team)
 regarding consulting services for developing our web J2EE applications
 with Websphere Application Server.

 The specialist said he doesn't have development experience with Struts,
 but he strongly recommended using JSF. He said that JSF is J2EE standard
 and is more comfortable and flexible to work with.



 I don't have experience with JSF and I really need to get your opinion
 on this:



 1.  Do JSF and struts complete each or replace each other?


Struts and JSF are entirely different.JavaServer Faces technology simplifies
building user interfaces for JavaServer applications,where as Struts Action
is the original request-based framework.

2.  For new applications (that are written from scratch) - is it
 wise to use Struts or maybe move to JSF?


As I said JSF is different from Struts.
If u want to use JSF use Struts Shale.Bcoz The two frameworks are the *Struts
Action Framework* and the *Struts Shale Framework *different..

*Struts Action *is the original request-based framework.

*Struts Shale *.is a component-based framework based on JavaServer Faces.
For more information use http://struts.apache.org/


Thanks

 Sheshadri Patel.



What JDK version are you using?

2006-01-23 Thread Niall Pemberton
What JDK version are you using?

-
[ ] JDK 1.2
[ ] JDK 1.3
[ ] JDK 1.4
[ ] JDK 1.5 (or JDK 5)
-

I'm mainly interested in the impact of moving Commons Valdator to a
minimum dependency of JDK 1.4 to use the RegExp support rather than
depending on ORO, so it would be useful if you could indicate whether
you are using Validator or not.

tia

Niall

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



Query regardin picklets

2006-01-23 Thread Naveen Sharma
Is it possible to have the correct input selected on Keystrokes using STRUTS


AW: What JDK version are you using?

2006-01-23 Thread Martin Kindler
I'm using 1.4.2 and would like to switch to 1.5.
I am also using the Validator.

Martin

 -Ursprüngliche Nachricht-
 Von: Niall Pemberton [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 23. Januar 2006 12:37
 An: Struts Users Mailing List
 Betreff: What JDK version are you using?
 
 
 What JDK version are you using?
 
 -
 [ ] JDK 1.2
 [ ] JDK 1.3
 [ ] JDK 1.4
 [ ] JDK 1.5 (or JDK 5)
 -
 
 I'm mainly interested in the impact of moving Commons 
 Valdator to a minimum dependency of JDK 1.4 to use the RegExp 
 support rather than depending on ORO, so it would be useful 
 if you could indicate whether you are using Validator or not.
 
 tia
 
 Niall
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



RE: What JDK version are you using?

2006-01-23 Thread Myatluk Andrey
[X] JDK 1.5 (or JDK 5) + Validator

Andrey

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 2:37 PM
To: Struts Users Mailing List
Subject: What JDK version are you using?

What JDK version are you using?

-
[ ] JDK 1.2
[ ] JDK 1.3
[ ] JDK 1.4
[ ] JDK 1.5 (or JDK 5)
-

I'm mainly interested in the impact of moving Commons Valdator to a
minimum dependency of JDK 1.4 to use the RegExp support rather than
depending on ORO, so it would be useful if you could indicate whether
you are using Validator or not.

tia

Niall

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






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



Re: What JDK version are you using?

2006-01-23 Thread Simon Chappell
1.4.1 and Struts 1.1

Ain't corporate standards a wonderful thing? :-)


On 1/23/06, Niall Pemberton [EMAIL PROTECTED] wrote:
 What JDK version are you using?

 -
 [ ] JDK 1.2
 [ ] JDK 1.3
 [ ] JDK 1.4
 [ ] JDK 1.5 (or JDK 5)
 -

 I'm mainly interested in the impact of moving Commons Valdator to a
 minimum dependency of JDK 1.4 to use the RegExp support rather than
 depending on ORO, so it would be useful if you could indicate whether
 you are using Validator or not.

 tia

 Niall

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




--
www.simonpeter.com
uab.blogspot.com

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



Re: What JDK version are you using?

2006-01-23 Thread Wendy Smoak
On 1/23/06, Niall Pemberton [EMAIL PROTECTED] wrote:

 What JDK version are you using?

 [X] JDK 1.5 (or JDK 5)

 And I'm using Validator.

--
Wendy

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



Re: Regex works in Java but not in Struts Validator

2006-01-23 Thread Dave Newton
rama chandrula wrote:
 I have a regex as given below that works with Java 1.5, But when I use
 the same as the maxk value in Struts-Validator it does not work. Can
 anyone point out the reason
I don't see a regular expression.

IIRC Validator uses ORO for its regexes which may not be exactly the
same as 1.5.

Dave



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



Re: Regex works in Java but not in Struts Validator

2006-01-23 Thread Dave Newton
Replied to list.

rama chandrula wrote:
 I have the following Regex in Java
 [A-Za-z0-9]+([_.*-]?[A-Za-z0-9]+)[EMAIL PROTECTED]([.-]?[A-Za-z0-9]+)*

 Any tips to convert so that it will work with ORO.
Yes; use the 'email' built-in validator rule from commons-validator.

Other than that, I am immediately suspicious of . and * in regexes,
especially Perl-ish ones, as they generally need to be escaped before use.

That said, I'm not overly-familiar with regex in Java, so will defer to
those with more knowledge (in other words, everybody :)

Dave



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



Re: What JDK version are you using?

2006-01-23 Thread Dave Newton
Simon Chappell wrote:
 1.4.1 and Struts 1.1
   
You're lucky.

About 2/3 of our deployments are on 1.3.

We use 1.3, 1.4, and new stuff will (hopefully) be 1.5.

I'm using validator via the typical struts validation stuff.
 Ain't corporate standards a wonderful thing? :-)
   
Sure. I tell myself that every day before I try to decide between
driving 45 minutes to work and cutting my wrists.

Dave



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



Re: What JDK version are you using?

2006-01-23 Thread atta-ur rehman
[X] JDK 1.5 (or JDK 5)

No validator.

HTH.

ATTA

On 1/23/06, Dave Newton [EMAIL PROTECTED] wrote:

 Simon Chappell wrote:
  1.4.1 and Struts 1.1
 
 You're lucky.

 About 2/3 of our deployments are on 1.3.

 We use 1.3, 1.4, and new stuff will (hopefully) be 1.5.

 I'm using validator via the typical struts validation stuff.
  Ain't corporate standards a wonderful thing? :-)
 
 Sure. I tell myself that every day before I try to decide between
 driving 45 minutes to work and cutting my wrists.

 Dave



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




Re: What JDK version are you using?

2006-01-23 Thread Emmanouil Batsis


1.4.2

atta-ur rehman wrote:


[X] JDK 1.5 (or JDK 5)

No validator.

HTH.

ATTA

On 1/23/06, Dave Newton [EMAIL PROTECTED] wrote:
 


Simon Chappell wrote:
   


1.4.1 and Struts 1.1

 


You're lucky.

About 2/3 of our deployments are on 1.3.

We use 1.3, 1.4, and new stuff will (hopefully) be 1.5.

I'm using validator via the typical struts validation stuff.
   


Ain't corporate standards a wonderful thing? :-)

 


Sure. I tell myself that every day before I try to decide between
driving 45 minutes to work and cutting my wrists.

Dave



-
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: Validation Security Hole?

2006-01-23 Thread Rick Reumann
I supposed I should reply to this on the dev list but since this
thread is so long now I figured I'd add a bit more on the topic here.
I see Paul/Frank what the concern is, but I think the 'problem' needs
to be clarified a bit more. The problem, in my opinion, really only
occurs when someone is trying to go to an action through a URL and
they intentionally type in the canceled parameter which bypasses the
validation procedure. On an action where you do truly want to support
a cancelled operation, I believe Struts is handling things just fine.
Am I wrong here Paul?

In other words, you definitely would want validation skipped on
actions where you are going to provide a cancel button. That's the
whole point of cancelling - to typically leave the form without having
completed it. You also would still want the execute method to process
so you could handle the 'isCancelled' and do any cleanup or other
things. I think on forms where you provide a Cancel everything works
fine.

It's the fact that you can spoof a canceled to other actions by typing
in the URL that causes the potential problem.

The solution I would like to see is if the canceled param is passed to
the Action, it tries to look for a canceled method in the Action. I
know this makes the Action like a DispatchAction but in this regard I
don't think the non-Dispatch folks would disapprove too much. In other
words, execute is never performed (not is a dispatch method performed)
only the 'cancelled' method is looked for. Validation is skipped as
usual for this cancelled method. This is better than having to use the
current isCancelled since you are never in the your Action's execute
or Action dispatch method.

Another option might be to force an include in the action mapping of
'canCancel=true' for Actions that are cancelable. That might be more
difficult to figure out how to handle though as far as the life-cycle
goes. I haven't thought that one through.

What do you guys think about just making sure a cancelled' method is
looked for when canceling? The problem will be that this won't be
backward compatible now that I think about it. Blah oh well. I tried:)

The description by Laurie below is
On 1/22/06, Laurie Harper [EMAIL PROTECTED] wrote:
 [Moved to a top-level thread, as this doesn't have anything to do with
 (either of) the thread(s) it was nested in! :-)]


 I think this thread deserves discussion on the dev list, but before I
 move it over I thought I'd post a summary to make sure I've captured all
 the arguments. I've also added preliminary thoughts in how to resolve
 the issue at the end of this post, though that discussion definitely
 ought to proceed on the dev list I guess.

 I'll re-post this message to the dev list later today if I haven't
 missed anything important below:



 * Issue: addition of a 'org.apache.struts.action.CANCEL' parameter to
 any request will cause validation to be skipped, but the rest of the
 request processing / action invocation cycle to proceed normally

 * Consequence: any action which proceeds assuming that validation has
 completed successfully and which doesn't explicitly check isCanceled()
 is proceeding on a broken assumption

 * Questions:

 - why doesn't Struts call validate() on a cancelled request?

 If a request is canceled it usually means validations don't
 apply since the implication is that any user input will be
 thrown away. Users shouldn't be required to supply valid
 inputs for actions they are canceling.

 - why does Struts still call Action.execute() for a canceled request?

 Since you may still want to act on a canceled request (e.g.
 to clean up resources stored in the session). (Some of?) the
 DispactAction variants dispatch to a special method and aren't
 subject to the consequences listed above, but most action
 implementations don't.

 - why does Struts still populate the action form on a cancelled request?

 If inputs are going to be thrown away anyway, why process
 them by populating the action form? [Commentary: I believe
 this behaviour makes sense since it preserves a standard
 way to access the request data, should you want to, regardless
 of whether the action was canceled. You could argue that
 either way...]


 Here's my first thoughts on possible approaches to addressing the
 problem, to kick off further discussion on the dev list:

 - SAF1.2 and before: ? document, don't fix? add config req'm'ts on
 action mapping? Refer to discussion on user list for various options.

 - SAF1.3+: make cancel processing a command which you have to include in
 your request processing chain, and perhaps disclude it by default? [I'm
 not familiar enough with how you deploy chains on a per-action basis to
 know if this is the right way to do it...]

 - WW2/SAF2: implement cancel processing as an interceptor and either
 disclude it from default stack or require an action to implement an
 interface declaring that cancel processing should 

[OT] advice on resolving an email issue with this list/my hosting provider

2006-01-23 Thread Rick Reumann
Lately I've been having problems with another email account that I've
used to access this list ([EMAIL PROTECTED]). Lately, things will
seem to go fine for a while and then I'll receive no messages to that
list address, then occasionaly one or two will sneak in. I even just
tried to cancel my subscription to that list but never received the
confirm letter. When I email that address directly the messages do
seem to get there, so I'm having trouble figuring out what the problem
is. I'm pretty sure it's on my hosting provider's end but it's
difficult for me to confirm this. Is there anyway I can see if
messages are bouncing to the listserv or what might be going on? I'm
sort of stumped.

--
Rick

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



Re: What JDK version are you using?

2006-01-23 Thread Rick Reumann
Stuck with 1.4 at work for a while.

On 1/23/06, Emmanouil Batsis [EMAIL PROTECTED] wrote:

 1.4.2

 atta-ur rehman wrote:

 [X] JDK 1.5 (or JDK 5)
 
 No validator.
 
 HTH.
 
 ATTA
 
 On 1/23/06, Dave Newton [EMAIL PROTECTED] wrote:
 
 
 Simon Chappell wrote:
 
 
 1.4.1 and Struts 1.1
 
 
 
 You're lucky.
 
 About 2/3 of our deployments are on 1.3.
 
 We use 1.3, 1.4, and new stuff will (hopefully) be 1.5.
 
 I'm using validator via the typical struts validation stuff.
 
 
 Ain't corporate standards a wonderful thing? :-)
 
 
 
 Sure. I tell myself that every day before I try to decide between
 driving 45 minutes to work and cutting my wrists.
 
 Dave
 
 
 
 -
 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]




--
Rick

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



Re: Validation Security Hole?

2006-01-23 Thread Tamas Szabo
On 1/23/06, Rick Reumann [EMAIL PROTECTED] wrote:

 I supposed I should reply to this on the dev list but since this
 thread is so long now I figured I'd add a bit more on the topic here.
 I see Paul/Frank what the concern is, but I think the 'problem' needs
 to be clarified a bit more. The problem, in my opinion, really only
 occurs when someone is trying to go to an action through a URL and
 they intentionally type in the canceled parameter which bypasses the
 validation procedure. On an action where you do truly want to support
 a cancelled operation, I believe Struts is handling things just fine.
 Am I wrong here Paul?

 In other words, you definitely would want validation skipped on
 actions where you are going to provide a cancel button. That's the
 whole point of cancelling - to typically leave the form without having
 completed it. You also would still want the execute method to process
 so you could handle the 'isCancelled' and do any cleanup or other
 things. I think on forms where you provide a Cancel everything works
 fine.

 It's the fact that you can spoof a canceled to other actions by typing
 in the URL that causes the potential problem.

 The solution I would like to see is if the canceled param is passed to
 the Action, it tries to look for a canceled method in the Action. I
 know this makes the Action like a DispatchAction but in this regard I
 don't think the non-Dispatch folks would disapprove too much. In other
 words, execute is never performed (not is a dispatch method performed)
 only the 'cancelled' method is looked for. Validation is skipped as
 usual for this cancelled method. This is better than having to use the
 current isCancelled since you are never in the your Action's execute
 or Action dispatch method.

 Another option might be to force an include in the action mapping of
 'canCancel=true' for Actions that are cancelable. That might be more
 difficult to figure out how to handle though as far as the life-cycle
 goes. I haven't thought that one through.

 What do you guys think about just making sure a cancelled' method is
 looked for when canceling?


I was trying to suggest the same thing in an earlier mail.
My English must be very bad hihi

Tamas


struts and JSTL

2006-01-23 Thread fea jabi
would like to display the value of property amount as $10,00,000. tried 
using the below.


But getting an error/ it doesn't get displayed.

Is this the way to do this. Or is there an easier way to do the same?


td
 bean:define id=amthtml:text name=Form1 property=amount 
styleClass=invisibleInput readonly=true tabindex=-1//bean:define

 % System.out.println(amt);%
 fmt:formatNumber value=${amt} type=currency/
/td


Thanks.

_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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



Tomcat 4.1 vs DynaAddressForm

2006-01-23 Thread Deepak
Hi Guys,

Am getting an exception in tomcat console when try to
install DynaActionForm using below nodes in
struts-config.xml :

 form-bean name=DynaAddressForm   

type=org.apache.struts.action.DynaActionForm
 form-property name=name
type=java.lang.String/
 form-property name=address
type=java.lang.String/
 form-property name=email
type=java.lang.String /
   /form-bean

Error is :

SEVERE: Parse Error at line 40 column 13: The content
of element type form-bean
 must match
(icon?,display-name?,description?,set-property*).
org.xml.sax.SAXParseException: The content of element
type form-bean must matc
h (icon?,display-name?,description?,set-property*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException

Any idea ?

Thanks ,Deepak

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



comunicate different struts

2006-01-23 Thread Alberto Pozos
Hi everybody.

 

My problem is this:

I have different war files. Each war is a Struts based project with his
web.xml, struts-config.xml,.

I would like to know if it's possible to communicate those different war
files.

In other words, could I use a mapping in a.war which is developed in
b.war. Can I use a mapping in a class/jsp inside of a.war which is
programmed in b.war's struts-config.xml file?

 

Any ideas about this?

 

I don't know if I have explained well.

 

Sorry for my English .
Thanks!  :-)

 

 


-- 
Este mensaje ha sido analizado por ITDeustoProtect
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
-
This message has been scanned for viruses and
dangerous content by ITDeustoProtect, and is
believed to be clean.



Forcing URL Rewriting over Cookies in an existing application.

2006-01-23 Thread Jay
Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02 (I guess)) that 
uses Cookies for session handling and has been so for around 3/4 years. I have 
a requirement where I want to force URL Rewriting even if the browser supports 
cookies. Please help! Jay


Broadband interface (RIA) + mail box saftey = 
http://Struts_User_List.roomity.com
*Your* clubs, no sign up to read, ad supported; try broadband internet. 


Re: Forcing URL Rewriting over Cookies in an existing application.

2006-01-23 Thread Emmanouil Batsis

Jay wrote:


Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02 (I guess)) that 
uses Cookies for session handling and has been so for around 3/4 years. I have 
a requirement where I want to force URL Rewriting even if the browser supports 
cookies. Please help! Jay




This is a container (appserver) configuration issue right?

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



RE: Forcing URL Rewriting over Cookies in an existing application.

2006-01-23 Thread David G. Friedman
http://access1.sun.com/techarticles/sessions.iws.html

Regards,
David

-Original Message-
From: Jay [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 10:53 AM
To: user@struts.apache.org
Subject: Forcing URL Rewriting over Cookies in an existing application.


Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02 (I guess)) that 
uses Cookies for session handling and has
been so for around 3/4 years. I have a requirement where I want to force URL 
Rewriting even if the browser supports
cookies. Please help! Jay


Broadband interface (RIA) + mail box saftey = 
http://Struts_User_List.roomity.com
*Your* clubs, no sign up to read, ad supported; try broadband internet.


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



Re: What JDK version are you using?

2006-01-23 Thread Craig McClanahan
On 1/23/06, Niall Pemberton [EMAIL PROTECTED] wrote:
 What JDK version are you using?

 -
 [ ] JDK 1.2
 [ ] JDK 1.3
 [X] JDK 1.4
 [ X JDK 1.5 (or JDK 5)
 -

 I'm mainly interested in the impact of moving Commons Valdator to a
 minimum dependency of JDK 1.4 to use the RegExp support rather than
 depending on ORO, so it would be useful if you could indicate whether
 you are using Validator or not.


One strategy that I'm using on Shale looks like it will be pretty
successful at addressing this ... make the core functionality work on
1.4, and then add an optional layer on top that lets you use features
like annotations (in Shale this is the Tiger Extensions features). 
That way, you can address the needs of both kinds of users.

 tia

 Niall


Craig



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



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



Re: What JDK version are you using?

2006-01-23 Thread Bart Busschots

Using Validation and JDK1.4.2 and will be doing so for at least a year.

Bart.

Niall Pemberton wrote:


What JDK version are you using?

-
[ ] JDK 1.2
[ ] JDK 1.3
[ ] JDK 1.4
[ ] JDK 1.5 (or JDK 5)
-

I'm mainly interested in the impact of moving Commons Valdator to a
minimum dependency of JDK 1.4 to use the RegExp support rather than
depending on ORO, so it would be useful if you could indicate whether
you are using Validator or not.

tia

Niall

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



AW: Forcing URL Rewriting over Cookies in an existing application .

2006-01-23 Thread Bernhard Slominski
OT, but I'm interested, is this available im Tomcat too?

Thanks

Bernhard

 -Ursprüngliche Nachricht-
 Von: David G. Friedman [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 23. Januar 2006 17:08
 An: Struts Users Mailing List
 Betreff: RE: Forcing URL Rewriting over Cookies in an existing
 application.
 
 
 http://access1.sun.com/techarticles/sessions.iws.html
 
 Regards,
 David
 
 -Original Message-
 From: Jay [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 23, 2006 10:53 AM
 To: user@struts.apache.org
 Subject: Forcing URL Rewriting over Cookies in an existing 
 application.
 
 
 Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02 
 (I guess)) that uses Cookies for session handling and has
 been so for around 3/4 years. I have a requirement where I 
 want to force URL Rewriting even if the browser supports
 cookies. Please help! Jay
 
 
 Broadband interface (RIA) + mail box saftey = 
 http://Struts_User_List.roomity.com
 *Your* clubs, no sign up to read, ad supported; try broadband 
 internet.
 
 
 -
 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 vs JSF decision

2006-01-23 Thread Frank W. Zammetti
On Mon, January 23, 2006 6:08 am, Rivka Shisman said:
 The specialist said he doesn't have development experience with Struts,
 but he strongly recommended using JSF. He said that JSF is J2EE standard
 and is more comfortable and flexible to work with.

This is exactly the kind of opinion I would *not* trust... here's someone
who admits to not having much experience with Struts and yet he can say
that JSF is to be highly recommended?  That's like me saying well, I like
beef more than pork, I eat beef all the time, but I've only had pork once
or twice.  Doesn't make much sense, does it? :)

Plus, IMO, you shouldn't put as much weight in anynoes' opinion that says
you should use *anything* simply because it is a standard.  That's a
reason to give something due consideration, and maybe that's the final
weight that tips the scales in its favor, but especially if it's the
*first* reason he states, there is a priority issue there IMO.

 I don't have experience with JSF and I really need to get your opinion
 on this:

And I have only some experience myself, so you shouldn't put a tremendous
amount of weight in my opinion either :)

 1.Do JSF and struts complete each or replace each other?

Depends on who you ask... some are very hard-lined and believe JSF is
*the* future of Java web development.  Others are more reasonable and will
tell you that you should decide which fits your needs better after some
diligent research and perhaps trials (and there are those that say JSF is
crap and should never be used, which is pretty ridiculous too).  My advice
echoes those who say you should decide for yourself.  JSF seems to suit
some people and some projects very well, others feel Struts is much better
for them.  Make up your own mind :)

 2.For new applications (that are written from scratch) - is it
 wise to use Struts or maybe move to JSF?

Again, depends on your needs.  Struts isn't going anywhere for a long
time.  Some have taken to calling it old technology or saying it's past
its prime or such things.  I find those to be ridiculous claims.  Struts
(in some form) and JSF will likely coexist for a long time.  In fact, that
might always be the case...

Whether JSF is a standard or not, there is *no* guarantee that anyone will
be using it five years from now.  There is *no* guarantee that it will
dominate the landscape.  It still has to prove itself to a great many
people.  Struts OTOH has already done his, and for all its supposed flaws,
people continue to use it with great success.  JSF may well be the future,
but it's not a guarantee simply because it's a standard or because it's
got the marketing behind it.

I would hope there is always a choice frankly.  Otherwise, we might as
well all jump to .NET :)  JSF has its pluses and minuses, so does Struts. 
And so does every other framework out there that you could alternatively
choose.  Decide which to use on the merits of your situation, not what
some consultant or marketing drone says.

 Thanks

 Rivka

Frank


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



Re: What JDK version are you using?

2006-01-23 Thread Marcelo Morales

JDK 1.4

This is required by one of my customers. So i use 1.4 for everybody  
else, so i don't have to deal with any other JDK.


Using validator extensively. Validator seems ubiquitous in most of my  
struts projects and i use it beyond action form validation (in  
configuration and some defensive classes)


On Jan 23, 2006, at 7:36 AM, Niall Pemberton wrote:


What JDK version are you using?

I'm mainly interested in the impact of moving Commons Valdator to a
minimum dependency of JDK 1.4 to use the RegExp support rather than
depending on ORO, so it would be useful if you could indicate whether
you are using Validator or not.

tia

Niall



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



RE: Forcing URL Rewriting over Cookies in an existing application.

2006-01-23 Thread David G. Friedman
The same thing (disable cookies but enable url rewriting) should work on Tomcat 
4.X and 5.X.  See  the cookies
attribute in the below url(s):

http://tomcat.apache.org/tomcat-4.0-doc/config/context.html
http://tomcat.apache.org/tomcat-5.0-doc/config/context.html
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Regards,
David

-Original Message-
From: Bernhard Slominski [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 11:20 AM
To: 'Struts Users Mailing List'
Subject: AW: Forcing URL Rewriting over Cookies in an existing
application.


OT, but I'm interested, is this available im Tomcat too?

Thanks

Bernhard

 -Ursprüngliche Nachricht-
 Von: David G. Friedman [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 23. Januar 2006 17:08
 An: Struts Users Mailing List
 Betreff: RE: Forcing URL Rewriting over Cookies in an existing
 application.


 http://access1.sun.com/techarticles/sessions.iws.html

 Regards,
 David

 -Original Message-
 From: Jay [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 23, 2006 10:53 AM
 To: user@struts.apache.org
 Subject: Forcing URL Rewriting over Cookies in an existing
 application.


 Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02
 (I guess)) that uses Cookies for session handling and has
 been so for around 3/4 years. I have a requirement where I
 want to force URL Rewriting even if the browser supports
 cookies. Please help! Jay


 Broadband interface (RIA) + mail box saftey =
 http://Struts_User_List.roomity.com
 *Your* clubs, no sign up to read, ad supported; try broadband
 internet.


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



AW: Forcing URL Rewriting over Cookies in an existing application .

2006-01-23 Thread Bernhard Slominski
Thank you!
But it's not possible to do it the other way round in Tomcat right ?
Also I think this should belong in the web.xml and shouldn't be
container-specific, what do you think?

Bernhard

 -Ursprüngliche Nachricht-
 Von: David G. Friedman [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 23. Januar 2006 17:28
 An: Struts Users Mailing List
 Betreff: RE: Forcing URL Rewriting over Cookies in an existing
 application.
 
 
 The same thing (disable cookies but enable url rewriting) 
 should work on Tomcat 4.X and 5.X.  See  the cookies
 attribute in the below url(s):
 
 http://tomcat.apache.org/tomcat-4.0-doc/config/context.html
 http://tomcat.apache.org/tomcat-5.0-doc/config/context.html
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
 
 Regards,
 David
 
 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 23, 2006 11:20 AM
 To: 'Struts Users Mailing List'
 Subject: AW: Forcing URL Rewriting over Cookies in an existing
 application.
 
 
 OT, but I'm interested, is this available im Tomcat too?
 
 Thanks
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: David G. Friedman [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 23. Januar 2006 17:08
  An: Struts Users Mailing List
  Betreff: RE: Forcing URL Rewriting over Cookies in an existing
  application.
 
 
  http://access1.sun.com/techarticles/sessions.iws.html
 
  Regards,
  David
 
  -Original Message-
  From: Jay [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 23, 2006 10:53 AM
  To: user@struts.apache.org
  Subject: Forcing URL Rewriting over Cookies in an existing
  application.
 
 
  Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02
  (I guess)) that uses Cookies for session handling and has
  been so for around 3/4 years. I have a requirement where I
  want to force URL Rewriting even if the browser supports
  cookies. Please help! Jay
 
 
  Broadband interface (RIA) + mail box saftey =
  http://Struts_User_List.roomity.com
  *Your* clubs, no sign up to read, ad supported; try broadband
  internet.
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: What JDK version are you using?

2006-01-23 Thread Ulrich Elsner
I am using a minimum of JDK 1.4 for my Struts based applications. 1.5 has
recently been approved so I am considering moving them to Tiger if I can
find a good reason to do so (i.e., not migrating just for the sake of newness).

Ulrich

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



Re: Validation Security Hole?

2006-01-23 Thread Frank W. Zammetti
On Mon, January 23, 2006 9:54 am, Rick Reumann said:
 The solution I would like to see is if the canceled param is passed to
 the Action, it tries to look for a canceled method in the Action. I
 know this makes the Action like a DispatchAction but in this regard I
 don't think the non-Dispatch folks would disapprove too much. In other
 words, execute is never performed (not is a dispatch method performed)
 only the 'cancelled' method is looked for. Validation is skipped as
 usual for this cancelled method. This is better than having to use the
 current isCancelled since you are never in the your Action's execute
 or Action dispatch method.

I'm in the non-DispatchAction camp myself (although who knows, I may be
the only one in that camp!) and I don't have a problem with this.

 What do you guys think about just making sure a cancelled' method is
 looked for when canceling? The problem will be that this won't be
 backward compatible now that I think about it. Blah oh well. I tried:)

That would be my only concern is backwards-compatibility.  Then again,
simply adding the method to the Action class should deal with it always
being present.  I would also suggest a default implementation that
returned null but that rendered a response like so:

htmlheadtitlecancel() not present/title/head
bodyNo cancel() method found in requested Action/body/html

At least that way it's not just a blank screen, the hole is plugged, and a
developer will know what's going on pretty quickly and easily (a nice log
message in the default implementation saying what the requested Action was
would be nice too).

Anyone legitimately using isCancelled() functionality would have to move
that related code to cancelled() now to have it all still work, but I tend
to think that's a relatively small group of people being hurt... I for one
would find this solution acceptable.

Frank

 The description by Laurie below is
 On 1/22/06, Laurie Harper [EMAIL PROTECTED] wrote:
 [Moved to a top-level thread, as this doesn't have anything to do with
 (either of) the thread(s) it was nested in! :-)]


 I think this thread deserves discussion on the dev list, but before I
 move it over I thought I'd post a summary to make sure I've captured all
 the arguments. I've also added preliminary thoughts in how to resolve
 the issue at the end of this post, though that discussion definitely
 ought to proceed on the dev list I guess.

 I'll re-post this message to the dev list later today if I haven't
 missed anything important below:



 * Issue: addition of a 'org.apache.struts.action.CANCEL' parameter to
 any request will cause validation to be skipped, but the rest of the
 request processing / action invocation cycle to proceed normally

 * Consequence: any action which proceeds assuming that validation has
 completed successfully and which doesn't explicitly check isCanceled()
 is proceeding on a broken assumption

 * Questions:

 - why doesn't Struts call validate() on a cancelled request?

 If a request is canceled it usually means validations don't
 apply since the implication is that any user input will be
 thrown away. Users shouldn't be required to supply valid
 inputs for actions they are canceling.

 - why does Struts still call Action.execute() for a canceled request?

 Since you may still want to act on a canceled request (e.g.
 to clean up resources stored in the session). (Some of?) the
 DispactAction variants dispatch to a special method and aren't
 subject to the consequences listed above, but most action
 implementations don't.

 - why does Struts still populate the action form on a cancelled request?

 If inputs are going to be thrown away anyway, why process
 them by populating the action form? [Commentary: I believe
 this behaviour makes sense since it preserves a standard
 way to access the request data, should you want to, regardless
 of whether the action was canceled. You could argue that
 either way...]


 Here's my first thoughts on possible approaches to addressing the
 problem, to kick off further discussion on the dev list:

 - SAF1.2 and before: ? document, don't fix? add config req'm'ts on
 action mapping? Refer to discussion on user list for various options.

 - SAF1.3+: make cancel processing a command which you have to include in
 your request processing chain, and perhaps disclude it by default? [I'm
 not familiar enough with how you deploy chains on a per-action basis to
 know if this is the right way to do it...]

 - WW2/SAF2: implement cancel processing as an interceptor and either
 disclude it from default stack or require an action to implement an
 interface declaring that cancel processing should happen?

 L.


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




 --
 Rick

 -
 

Re: Validation Security Hole?

2006-01-23 Thread Tamas Szabo
But what do you guys mean by lookin for a canceled method in the Action.
I think that the best would be to implement a Cancelable interface if your
Action is cancelable.
You would have to do this in all kind of Actions (DispatchAction too) by the
way.

Or is having interfaces very unstrutsish?

Tamas


On 1/24/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

 On Mon, January 23, 2006 9:54 am, Rick Reumann said:
  The solution I would like to see is if the canceled param is passed to
  the Action, it tries to look for a canceled method in the Action. I
  know this makes the Action like a DispatchAction but in this regard I
  don't think the non-Dispatch folks would disapprove too much. In other
  words, execute is never performed (not is a dispatch method performed)
  only the 'cancelled' method is looked for. Validation is skipped as
  usual for this cancelled method. This is better than having to use the
  current isCancelled since you are never in the your Action's execute
  or Action dispatch method.

 I'm in the non-DispatchAction camp myself (although who knows, I may be
 the only one in that camp!) and I don't have a problem with this.

  What do you guys think about just making sure a cancelled' method is
  looked for when canceling? The problem will be that this won't be
  backward compatible now that I think about it. Blah oh well. I tried:)

 That would be my only concern is backwards-compatibility.  Then again,
 simply adding the method to the Action class should deal with it always
 being present.  I would also suggest a default implementation that
 returned null but that rendered a response like so:

 htmlheadtitlecancel() not present/title/head
 bodyNo cancel() method found in requested Action/body/html

 At least that way it's not just a blank screen, the hole is plugged, and a
 developer will know what's going on pretty quickly and easily (a nice log
 message in the default implementation saying what the requested Action was
 would be nice too).

 Anyone legitimately using isCancelled() functionality would have to move
 that related code to cancelled() now to have it all still work, but I tend
 to think that's a relatively small group of people being hurt... I for one
 would find this solution acceptable.

 Frank

  The description by Laurie below is
  On 1/22/06, Laurie Harper [EMAIL PROTECTED] wrote:
  [Moved to a top-level thread, as this doesn't have anything to do with
  (either of) the thread(s) it was nested in! :-)]
 
 
  I think this thread deserves discussion on the dev list, but before I
  move it over I thought I'd post a summary to make sure I've captured
 all
  the arguments. I've also added preliminary thoughts in how to resolve
  the issue at the end of this post, though that discussion definitely
  ought to proceed on the dev list I guess.
 
  I'll re-post this message to the dev list later today if I haven't
  missed anything important below:
 
 
 
  * Issue: addition of a 'org.apache.struts.action.CANCEL' parameter to
  any request will cause validation to be skipped, but the rest of the
  request processing / action invocation cycle to proceed normally
 
  * Consequence: any action which proceeds assuming that validation has
  completed successfully and which doesn't explicitly check isCanceled()
  is proceeding on a broken assumption
 
  * Questions:
 
  - why doesn't Struts call validate() on a cancelled request?
 
  If a request is canceled it usually means validations don't
  apply since the implication is that any user input will be
  thrown away. Users shouldn't be required to supply valid
  inputs for actions they are canceling.
 
  - why does Struts still call Action.execute() for a canceled request?
 
  Since you may still want to act on a canceled request (e.g.
  to clean up resources stored in the session). (Some of?) the
  DispactAction variants dispatch to a special method and aren't
  subject to the consequences listed above, but most action
  implementations don't.
 
  - why does Struts still populate the action form on a cancelled
 request?
 
  If inputs are going to be thrown away anyway, why process
  them by populating the action form? [Commentary: I believe
  this behaviour makes sense since it preserves a standard
  way to access the request data, should you want to, regardless
  of whether the action was canceled. You could argue that
  either way...]
 
 
  Here's my first thoughts on possible approaches to addressing the
  problem, to kick off further discussion on the dev list:
 
  - SAF1.2 and before: ? document, don't fix? add config req'm'ts on
  action mapping? Refer to discussion on user list for various options.
 
  - SAF1.3+: make cancel processing a command which you have to include
 in
  your request processing chain, and perhaps disclude it by default? [I'm
  not familiar enough with how you deploy chains on a per-action basis to
  know if this is the right way to do it...]
 
  

Tags for Pagination

2006-01-23 Thread Srini Pillai
Hi,

We have a situation where we require to paginate our result list (which
is quite huge, around 1000+ records). We found few tags like DisplayTags
from sourceforge.net but the current version does not support batch
lists (i.e. retrieving the list in batches based on the page the user is
in, instead of retrieving all in once). Is there a tag in Struts/JSTL
that would help display huge lists. Any help is appreciated.

Thanks,
Srini

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



Locale problem...

2006-01-23 Thread Shilpa . Nalgonda
 
Hi All,

I have an application which is used in US, Europe and Asia.
The application should show the date in each regions own local time.
I have to create the time and store it in databsae in GMT and again
while displaying the date back to the browser convert 
The GMT  into the local timezone. What Is the besy way to achieve this,
My application is Struts based.
Can I capture the browsers locale in the jsp and pass it to the backend
and convert it into GMT to insert into database...

Thanks for any suggestions.


-Original Message-
From: Tamas Szabo [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 11:56 AM
To: Struts Users Mailing List
Subject: Re: Validation Security Hole?

But what do you guys mean by lookin for a canceled method in the Action.
I think that the best would be to implement a Cancelable interface if
your Action is cancelable.
You would have to do this in all kind of Actions (DispatchAction too) by
the way.

Or is having interfaces very unstrutsish?

Tamas


On 1/24/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

 On Mon, January 23, 2006 9:54 am, Rick Reumann said:
  The solution I would like to see is if the canceled param is passed 
  to the Action, it tries to look for a canceled method in the 
  Action. I know this makes the Action like a DispatchAction but in 
  this regard I don't think the non-Dispatch folks would disapprove 
  too much. In other words, execute is never performed (not is a 
  dispatch method performed) only the 'cancelled' method is looked 
  for. Validation is skipped as usual for this cancelled method. This 
  is better than having to use the current isCancelled since you are

  never in the your Action's execute or Action dispatch method.

 I'm in the non-DispatchAction camp myself (although who knows, I may 
 be the only one in that camp!) and I don't have a problem with this.

  What do you guys think about just making sure a cancelled' method 
  is looked for when canceling? The problem will be that this won't be

  backward compatible now that I think about it. Blah oh well. I 
  tried:)

 That would be my only concern is backwards-compatibility.  Then again,

 simply adding the method to the Action class should deal with it 
 always being present.  I would also suggest a default implementation 
 that returned null but that rendered a response like so:

 htmlheadtitlecancel() not present/title/head bodyNo 
 cancel() method found in requested Action/body/html

 At least that way it's not just a blank screen, the hole is plugged, 
 and a developer will know what's going on pretty quickly and easily (a

 nice log message in the default implementation saying what the 
 requested Action was would be nice too).

 Anyone legitimately using isCancelled() functionality would have to 
 move that related code to cancelled() now to have it all still work, 
 but I tend to think that's a relatively small group of people being 
 hurt... I for one would find this solution acceptable.

 Frank

  The description by Laurie below is
  On 1/22/06, Laurie Harper [EMAIL PROTECTED] wrote:
  [Moved to a top-level thread, as this doesn't have anything to do 
  with (either of) the thread(s) it was nested in! :-)]
 
 
  I think this thread deserves discussion on the dev list, but before

  I move it over I thought I'd post a summary to make sure I've 
  captured
 all
  the arguments. I've also added preliminary thoughts in how to 
  resolve the issue at the end of this post, though that discussion 
  definitely ought to proceed on the dev list I guess.
 
  I'll re-post this message to the dev list later today if I haven't 
  missed anything important below:
 
 
 
  * Issue: addition of a 'org.apache.struts.action.CANCEL' parameter 
  to any request will cause validation to be skipped, but the rest of

  the request processing / action invocation cycle to proceed 
  normally
 
  * Consequence: any action which proceeds assuming that validation 
  has completed successfully and which doesn't explicitly check 
  isCanceled() is proceeding on a broken assumption
 
  * Questions:
 
  - why doesn't Struts call validate() on a cancelled request?
 
  If a request is canceled it usually means validations don't
  apply since the implication is that any user input will be
  thrown away. Users shouldn't be required to supply valid
  inputs for actions they are canceling.
 
  - why does Struts still call Action.execute() for a canceled
request?
 
  Since you may still want to act on a canceled request (e.g.
  to clean up resources stored in the session). (Some of?) the
  DispactAction variants dispatch to a special method and aren't
  subject to the consequences listed above, but most action
  implementations don't.
 
  - why does Struts still populate the action form on a cancelled
 request?
 
  If inputs are going to be thrown away anyway, why process
  them by populating the action form? [Commentary: I believe
  this behaviour 

[JSF] Client state

2006-01-23 Thread Michael Jouravlev
Can JSF store component state completely on client, that is, using
Javascript objects? I could not find anything besides _viewstate-like
juggling between client and server.

I think it would be nice if an application could try to save viewstate
on client, and if Javascript were turned off, the viewstate would be
submitted to server and stored there in the session.

Michael.

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



Re: [JSF] Client state

2006-01-23 Thread Frank W. Zammetti
How could you possibly do this without using frames?  Every page request
would obliviate any values you had stored.  Frames allows you to do this,
I've done it many times with a hidden frame for client-side persistence,
but  without frames, I don't see how this could be possible.

(Or AJAX of course... sorry if that first reply without this line got
through!)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Mon, January 23, 2006 12:55 pm, Michael Jouravlev said:
 Can JSF store component state completely on client, that is, using
 Javascript objects? I could not find anything besides _viewstate-like
 juggling between client and server.

 I think it would be nice if an application could try to save viewstate
 on client, and if Javascript were turned off, the viewstate would be
 submitted to server and stored there in the session.

 Michael.

 -
 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: [JSF] Client state

2006-01-23 Thread Michael Jouravlev
On 1/23/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 How could you possibly do this without using frames?  Every page request
 would obliviate any values you had stored.  Frames allows you to do this,
 I've done it many times with a hidden frame for client-side persistence,
 but  without frames, I don't see how this could be possible.

I am not a Javacript pro, yet ;) So, on a new request Javascript
objects are gone? I see.

Michael.

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



Re: struts and JSTL

2006-01-23 Thread Ed Griebel
The problem is that you're putting the 'amount' field into a hidden
field and then trying to use that hidden field as a value, but your
amt bean will actually contain the value of the form field: input
type='hidden' value='123.00'/

Try this instead. First, in your action save this amount value to the
request scope:
   request.setAttribute(amount, yourAmountVar);

Then put in your JSP, assuming a JSP 2.0 container:
td
fmt:formatNumber value=${amount} type=currency/
/td

-ed

On 1/23/06, fea jabi [EMAIL PROTECTED] wrote:
 would like to display the value of property amount as $10,00,000. tried
 using the below.

 But getting an error/ it doesn't get displayed.

 Is this the way to do this. Or is there an easier way to do the same?


 td
   bean:define id=amthtml:text name=Form1 property=amount
 styleClass=invisibleInput readonly=true tabindex=-1//bean:define
   % System.out.println(amt);%
   fmt:formatNumber value=${amt} type=currency/
 /td


 Thanks.

 _
 Is your PC infected? Get a FREE online computer virus scan from McAfee(r)
 Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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




--
The greatest tyrannies are always perpetrated in the name of the
noblest causes. Thomas Paine
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety - Benjamin
Franklin

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



Re: What JDK version are you using?

2006-01-23 Thread Ed Griebel
1.4 (+ Struts 1.2 )

We're locked into this for at least a couple of years, corporate decision.

-ed

On 1/23/06, Niall Pemberton [EMAIL PROTECTED] wrote:
 What JDK version are you using?

 -
 [ ] JDK 1.2
 [ ] JDK 1.3
 [ ] JDK 1.4
 [ ] JDK 1.5 (or JDK 5)
 -

 I'm mainly interested in the impact of moving Commons Valdator to a
 minimum dependency of JDK 1.4 to use the RegExp support rather than
 depending on ORO, so it would be useful if you could indicate whether
 you are using Validator or not.

 tia

 Niall

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




--
The greatest tyrannies are always perpetrated in the name of the
noblest causes. Thomas Paine
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety - Benjamin
Franklin

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



Re: [JSF] Client state

2006-01-23 Thread Gary VanMatre
From: Michael Jouravlev [EMAIL PROTECTED] 

 Can JSF store component state completely on client, that is, using 
 Javascript objects? I could not find anything besides _viewstate-like 
 juggling between client and server. 


JSF has an option to store the state of the page as a hidden field in the 
client.
It's serialized objects that represent the component tree.  Client state is 
more for handling the browser back/ dirty page more than making state available 
for javascript.

 I think it would be nice if an application could try to save viewstate 
 on client, and if Javascript were turned off, the viewstate would be 
 submitted to server and stored there in the session. 


It's a global on or off switch now.  It would be nice if the client state was 
something usable by javascript.

Shale is working on an idea of decorating renders so that you can modify the 
default content without having to know allot about the component.  

For example, you could intercept the generated html and write javascript to 
write dhtml.  Or, add some ajax features to a component.

I was talking with David Geary and he would like to see tiles hook into AJAX so 
that you could control the content of a DIV tag like you might a iframe.  I 
guess this would be like creating a view root as a leaf node in the component 
tree representing the page.

This is still kind of blue-sky stuff.  Craig responded with a few comments from 
planet reality that I'm still trying to get a handle on :-).


 Michael. 
 

Gary

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

Re: [JSF] Client state

2006-01-23 Thread Frank W. Zammetti
On Mon, January 23, 2006 1:11 pm, Michael Jouravlev said:
 I am not a Javacript pro, yet ;) So, on a new request Javascript
 objects are gone? I see.

No problem :)  Yes, that's correct... with every document loaded into the
browser, anything that existed before is wiped out.  I'm not aware of any
way around that (and it sure sounds like a security problem if there was).
 A hidden frame is the typical solution in such cases... Of course, now
you can do it with AJAX... you load one page in the beginning that
contains your AJAX code and a single div... every request you make to
the server goes through an XMLHttpRequest object, and the results are
stuck into that div... this can be a whole page, so in a sense your
creating a browser inside a browser :)

 Michael.

Frank


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



RE: A couple of simple questions

2006-01-23 Thread David Thielen
Asking again - thanks - dave

-Original Message-
Hi;

1) I want my default page to be index.do so I set the following in web.xml:
   welcome-file-list
welcome-fileindex.do/welcome-file
/welcome-file-list

But instead I get a directory of files in my root when I go to the servlet.
I can do this which works:
   welcome-file-list
welcome-fileindex.txt/welcome-file
/welcome-file-list

It appears it wants a file. Not an issue (see item 2) but just wanted to
know what is going on.

2) My main page is a frameset. I tried having that be a do/jsp but when I
pressed refresh on the browser, it went back to the start page. So I made it
a html file and the three frames are .do urls. This works fine, I'm just
asking if this is the best way to do this.

3) I need to have a method called when my servlet first loads. Is a
listener the best way to do this?

Thanks - dave


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



Re: What JDK version are you using?

2006-01-23 Thread Frank W. Zammetti

1.4(.2) here.  Likely to be on that for at least another year, quite
possibly more.

Libraries I use on a regular basis:

Beanutils, Digester, Lang, Code, Collections, FileUpload, HTTPClient,
Logging and Net (and soon EMail as well).

Sticking with Struts 1.2.4 for a while (very slow to upgrade versions of
anything around here).

Frank

On 1/23/06, Niall Pemberton [EMAIL PROTECTED] wrote:
 What JDK version are you using?

 -
 [ ] JDK 1.2
 [ ] JDK 1.3
 [ ] JDK 1.4
 [ ] JDK 1.5 (or JDK 5)
 -

 I'm mainly interested in the impact of moving Commons Valdator to a
 minimum dependency of JDK 1.4 to use the RegExp support rather than
 depending on ORO, so it would be useful if you could indicate whether
 you are using Validator or not.

 tia

 Niall

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




 --
 The greatest tyrannies are always perpetrated in the name of the
 noblest causes. Thomas Paine
 Those who would give up essential Liberty, to purchase a little
 temporary Safety, deserve neither Liberty nor Safety - Benjamin
 Franklin

 -
 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: A couple of simple questions

2006-01-23 Thread [EMAIL PROTECTED]


Yes, you can't use a .do action for the welcome pages.  This is because web.xml 
is lower down than the struts stuff.  The web.xml also configures the strust 
controller servlet to intercept anything ending with .do. If you think about 
this you can understand how, at the web.xml leve, there's no meaning to the .do 
yet.  The best practice is to put an index page that contains only a redirect 
to your first struts action ( your entry point, logon.do or something like that 
)




 --- On Mon 01/23, David Thielen  [EMAIL PROTECTED]  wrote:
From: David Thielen [mailto: [EMAIL PROTECTED]
To: user@struts.apache.org
Date: Mon, 23 Jan 2006 11:39:39 -0700
Subject: RE: A couple of simple questions

Asking again - thanks - dave-Original Message-Hi;1) I want my default 
page to be index.do so I set the following in web.xml:   welcome-file-list
welcome-fileindex.do/welcome-file/welcome-file-listBut instead I 
get a directory of files in my root when I go to the servlet.I can do this 
which works:   welcome-file-list
welcome-fileindex.txt/welcome-file/welcome-file-listIt appears it 
wants a file. Not an issue (see item 2) but just wanted toknow what is going 
on.2) My main page is a frameset. I tried having that be a do/jsp but when 
Ipressed refresh on the browser, it went back to the start page. So I made ita 
html file and the three frames are .do urls. This works fine, I'm justasking if 
this is the best way to do this.3) I need to have a method called when my 
servlet first loads. Is alistener the best way to do this?Thanks - 
dave-To 
unsubscribe, e-mail: 
[EMAIL PROTECTED] additional commands, e-mail: [EMAIL PROTECTED]

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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



Re: What JDK version are you using?

2006-01-23 Thread Rafael Nami
[X] JDK 1.4
[X] JDK 1.5 (or JDK 5)

Best Regards

Rafael Mauricio Nami

2006/1/23, Frank W. Zammetti [EMAIL PROTECTED]:


 1.4(.2) here.  Likely to be on that for at least another year, quite
 possibly more.

 Libraries I use on a regular basis:

 Beanutils, Digester, Lang, Code, Collections, FileUpload, HTTPClient,
 Logging and Net (and soon EMail as well).

 Sticking with Struts 1.2.4 for a while (very slow to upgrade versions of
 anything around here).

 Frank

 On 1/23/06, Niall Pemberton [EMAIL PROTECTED] wrote:
  What JDK version are you using?
 
  -
  [ ] JDK 1.2
  [ ] JDK 1.3
  [ ] JDK 1.4
  [ ] JDK 1.5 (or JDK 5)
  -
 
  I'm mainly interested in the impact of moving Commons Valdator to a
  minimum dependency of JDK 1.4 to use the RegExp support rather than
  depending on ORO, so it would be useful if you could indicate whether
  you are using Validator or not.
 
  tia
 
  Niall
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  The greatest tyrannies are always perpetrated in the name of the
  noblest causes. Thomas Paine
  Those who would give up essential Liberty, to purchase a little
  temporary Safety, deserve neither Liberty nor Safety - Benjamin
  Franklin
 
  -
  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: A couple of simple questions

2006-01-23 Thread Dave Newton
David Thielen wrote:
 3) I need to have a method called when my servlet first loads. Is a
 listener the best way to do this?
   
What servlet?

Dave



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



Re: Regex works in Java but not in Struts Validator

2006-01-23 Thread Brett Connor

Dave Newton wrote:


Replied to list.

rama chandrula wrote:
 


I have the following Regex in Java
[A-Za-z0-9]+([_.*-]?[A-Za-z0-9]+)[EMAIL PROTECTED]([.-]?[A-Za-z0-9]+)*

Any tips to convert so that it will work with ORO.
   


Yes; use the 'email' built-in validator rule from commons-validator.
 



I'm not very familiar with ORO so I can't comment on that. I will agree 
with Dave's comment for two reasons:

1) it's there and so why invent the wheel
2) your regexp above will fail to match some legal email names, again 
pushing me towards (1) - someone else has already done the work


For interest, last time I read the RFC (sorry I can't recall the #) the 
local part of the name is supposed to be interpreted by the owning email 
system only, all other sending and forwarding agents should make no 
assumptions about what is or can be in the local part (the part before 
the @). So there are many other characters that can legally appear. If I 
have to do my own regexp I typically use something like

[EMAIL PROTECTED]@[A-Za-z0-9_-]. etc

Regards
Brett Connor


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



html-el:select and tag files

2006-01-23 Thread Clint Popetz
Hello,

This may be more of a jsp 2.0 question than a html-el tag
library question, but here goes.

I have a jsp page that has a list of dates that need to be
entered.  I have a custom tag file that displays a date selector using
three html-el: selects (year/month/day.)  It takes as attributes the
form property name and the index.  The dyna form bean, for legacy
reasons, does not contain an array of date objects, but rather three
arrays of integers, one for date, one for month, and one for year.  So
the form bean looks like:

  form-property name=prop_date type=java.lang.Integer[]/
  form-property name=prop_month type=java.lang.Integer[]/
  form-property name=prop_year type=java.lang.Integer[]/

and the tag library looks like (without its header):

%@ attribute name=property required=true %
%@ attribute name=indexrequired=true %

html-el:select property=${property}_date[${index}]
   !-- bunch of options here --
/html-el:select

html-el:select property=${property}_month[${index}]
  !-- bunch of options here --
/html-el:select

html-el:select property=${property}_year[${index}]
  !-- bunch of options here --
/html-el:select


The problem I face is that let's say the jsp using the tag does this:

c:forEach var=foo items=${someFoos} varStatus=status

myTagLib:dateSelect property=prop index=${status.index}/

/c:forEach

Then I get:

javax.servlet.jsp.JspException: Invalid indexed property 
'prop_date[${status'

presumadely from the html-el:select.  I'm assuming that status.index
isn't getting evaluated when invoking the dateSelect tag, and so when
${property}_month[${index}] is evaluated by the html-el:select tag, it
gets 'prop_date[${status.index}]' and doesn't recursively evaluate to
find the value of status.index.  Any suggestions on the correct way to
deal with this?

Thanks,
-Clint



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



Re: Tags for Pagination

2006-01-23 Thread Rick Reumann
On 1/23/06, Srini Pillai [EMAIL PROTECTED] wrote:

 We have a situation where we require to paginate our result list (which
 is quite huge, around 1000+ records). We found few tags like DisplayTags
 from sourceforge.net but the current version does not support batch
 lists (i.e. retrieving the list in batches based on the page the user is
 in, instead of retrieving all in once). Is there a tag in Struts/JSTL
 that would help display huge lists. Any help is appreciated.

None that I'm aware of:( Although I keep meaning to work on one. Ajax
would really be nice for this actually. You could go to the server to
get your next display and it would repopulate your display without the
whole page refreshing.

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



Re: html-el:select and tag files

2006-01-23 Thread Wendy Smoak
On 1/23/06, Clint Popetz [EMAIL PROTECTED] wrote:

 This may be more of a jsp 2.0 question than a html-el tag
 library question, but here goes.

If you're using JSP 2.0, you should not be using Struts-EL.

Use the plain HTML tags and make sure you've configured your webapp
for Servlet 2.4 so that the container will evaluate the expressions
prior to passing them into the tags.

--
Wendy

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



Re: html-el:select and tag files

2006-01-23 Thread Clint Popetz
On Mon, Jan 23, 2006 at 12:36:02PM -0700, Wendy Smoak wrote:
 On 1/23/06, Clint Popetz [EMAIL PROTECTED] wrote:
 
  This may be more of a jsp 2.0 question than a html-el tag
  library question, but here goes.
 
 If you're using JSP 2.0, you should not be using Struts-EL.
 
 Use the plain HTML tags and make sure you've configured your webapp
 for Servlet 2.4 so that the container will evaluate the expressions
 prior to passing them into the tags.

I had no idea this was even possible.  Can you point me to a reference
on configuring tomcat 5.5.x do that?  I couldn't find anything in

http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html 

to configure the Jsp servlet to do that.  Also, for testing I use the
jasper ant task to compile the jsps, and the resulting java is
definitely not pre-evaluating the strings passed into the html: (or
htm-el:) tags.  How do I convince jasper to do that?

Thanks,
-Clint

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



Re: html-el:select and tag files

2006-01-23 Thread Rahul Akolkar
On 1/23/06, Clint Popetz [EMAIL PROTECTED] wrote:
 On Mon, Jan 23, 2006 at 12:36:02PM -0700, Wendy Smoak wrote:
  On 1/23/06, Clint Popetz [EMAIL PROTECTED] wrote:
 
   This may be more of a jsp 2.0 question than a html-el tag
   library question, but here goes.
 
  If you're using JSP 2.0, you should not be using Struts-EL.
 
  Use the plain HTML tags and make sure you've configured your webapp
  for Servlet 2.4 so that the container will evaluate the expressions
  prior to passing them into the tags.

 I had no idea this was even possible.  Can you point me to a reference
 on configuring tomcat 5.5.x do that?  I couldn't find anything in

http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

 to configure the Jsp servlet to do that.  Also, for testing I use the
 jasper ant task to compile the jsps, and the resulting java is
 definitely not pre-evaluating the strings passed into the html: (or
 htm-el:) tags.  How do I convince jasper to do that?

snip/

Doesn't take much:

http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions

-Rahul


Thanks,
-Clint


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



Re: comunicate different struts

2006-01-23 Thread Marcelo Morales

Hola

On Jan 23, 2006, at 11:50 AM, Alberto Pozos wrote:.


My problem is this:

I have different war files. Each war is a Struts based project  
with his

web.xml, struts-config.xml,.

I would like to know if it's possible to communicate those  
different war

files.

In other words, could I use a mapping in a.war which is developed in
b.war. Can I use a mapping in a class/jsp inside of a.war which is
programmed in b.war's struts-config.xml file?



Assemble both applications into one war file. AFAIK there is no other  
way.


The web applications can be quite different from each other (filters,  
resources, servlets, etc etc) and i guess the integration is not  
going to be easy.


You also might try to just redirect responses to the other  
application.





Any ideas about this?



I don't know if I have explained well.



Sorry for my English .
Thanks!  :-)


Saludos

Marcelo Morales

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



Re: html-el:select and tag files

2006-01-23 Thread Michael Jouravlev
On 1/23/06, Clint Popetz [EMAIL PROTECTED] wrote:
 On Mon, Jan 23, 2006 at 12:36:02PM -0700, Wendy Smoak wrote:
  On 1/23/06, Clint Popetz [EMAIL PROTECTED] wrote:
 
   This may be more of a jsp 2.0 question than a html-el tag
   library question, but here goes.
 
  If you're using JSP 2.0, you should not be using Struts-EL.
 
  Use the plain HTML tags and make sure you've configured your webapp
  for Servlet 2.4 so that the container will evaluate the expressions
  prior to passing them into the tags.

 I had no idea this was even possible.  Can you point me to a reference
 on configuring tomcat 5.5.x do that?  I couldn't find anything in

 http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

 to configure the Jsp servlet to do that.

You don't need to configure it (if you don't want to turn EL off). EL
is simply what JSP 2.0 container does. EL and JSTL are part of JSP 2.0
spec.

Michael.

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



RE: Forcing URL Rewriting over Cookies in an existing application.

2006-01-23 Thread David G. Friedman
What do you mean by do it the other way around ?

URL Rewriting is in the servlet spec 2.2 and beyond, hence the ability in Java 
to determine if the JSessionId was in a
Cookie, URL, or both, but I don't know if there is a standard web.xml syntax.  
I have read that context.xml files are
common on different java web servers so it might work out of the box, depending 
where (which directory) you put your
context.xml file.

Regards,
David

-Original Message-
From: Bernhard Slominski [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 11:34 AM
To: 'Struts Users Mailing List'
Subject: AW: Forcing URL Rewriting over Cookies in an existing
application.


Thank you!
But it's not possible to do it the other way round in Tomcat right ?
Also I think this should belong in the web.xml and shouldn't be
container-specific, what do you think?

Bernhard

 -Ursprüngliche Nachricht-
 Von: David G. Friedman [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 23. Januar 2006 17:28
 An: Struts Users Mailing List
 Betreff: RE: Forcing URL Rewriting over Cookies in an existing
 application.


 The same thing (disable cookies but enable url rewriting)
 should work on Tomcat 4.X and 5.X.  See  the cookies
 attribute in the below url(s):

 http://tomcat.apache.org/tomcat-4.0-doc/config/context.html
 http://tomcat.apache.org/tomcat-5.0-doc/config/context.html
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

 Regards,
 David

 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 23, 2006 11:20 AM
 To: 'Struts Users Mailing List'
 Subject: AW: Forcing URL Rewriting over Cookies in an existing
 application.


 OT, but I'm interested, is this available im Tomcat too?

 Thanks

 Bernhard

  -Ursprüngliche Nachricht-
  Von: David G. Friedman [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 23. Januar 2006 17:08
  An: Struts Users Mailing List
  Betreff: RE: Forcing URL Rewriting over Cookies in an existing
  application.
 
 
  http://access1.sun.com/techarticles/sessions.iws.html
 
  Regards,
  David
 
  -Original Message-
  From: Jay [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 23, 2006 10:53 AM
  To: user@struts.apache.org
  Subject: Forcing URL Rewriting over Cookies in an existing
  application.
 
 
  Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02
  (I guess)) that uses Cookies for session handling and has
  been so for around 3/4 years. I have a requirement where I
  want to force URL Rewriting even if the browser supports
  cookies. Please help! Jay
 
 
  Broadband interface (RIA) + mail box saftey =
  http://Struts_User_List.roomity.com
  *Your* clubs, no sign up to read, ad supported; try broadband
  internet.
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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


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


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


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



Re: Tags for Pagination

2006-01-23 Thread Gary VanMatre
From: Rick Reumann [EMAIL PROTECTED] 

 On 1/23/06, Srini Pillai wrote: 
 
  We have a situation where we require to paginate our result list (which 
  is quite huge, around 1000+ records). We found few tags like DisplayTags 
  from sourceforge.net but the current version does not support batch 
  lists (i.e. retrieving the list in batches based on the page the user is 
  in, instead of retrieving all in once). Is there a tag in Struts/JSTL 
  that would help display huge lists. Any help is appreciated. 
 
 None that I'm aware of:( Although I keep meaning to work on one. Ajax 
 would really be nice for this actually. You could go to the server to 
 get your next display and it would repopulate your display without the 
 whole page refreshing. 
 

That would be slick but you would still have the problem of deciding how
to batch up your results without actually retrieving the full set.  You still 
need
to determine how many rows you want to display and how many pages.  

Are you thinking of using something like a keyset cursor? Something 
similar could be implemented using the standard DAO/VO pattern.

I've heard this described as ghost objects.  The first data retrieval only 
returns 
the primary keys populating ghost objects.  The set of keys are used to 
retrieve 
the details/rest of the object per page.  Your initial inquiry returns the full 
set of 
keys matching the criteria.

Gary




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

Re: html-el:select and tag files

2006-01-23 Thread Rahul Akolkar
On 1/23/06, Michael Jouravlev [EMAIL PROTECTED] wrote:
snip/

 You don't need to configure it (if you don't want to turn EL off). EL
 is simply what JSP 2.0 container does. EL and JSTL are part of JSP 2.0
 spec.

snap/

JSTL is not part of JSP 2.0. They're separate JSRs (52 and 152 respectively).

-Rahul



 Michael.


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



Re: Tags for Pagination

2006-01-23 Thread Srini Pillai
Gary,

We were thinking of executing an initial query to get the total count
for the criteria (using  count(*)) and then page it using the offset and
range that would be passed as part of the query string when clicked on
the page numbers. Also we are using hibernate, which has the facility to
specify offset and maxresults to retrieve the range of records to be
displayed on the page. 

The DisplayTag was impressive but the batch part of the implementation
is still in the development stage. We couldn't find any tags that could
function with a batch list... 

- Srini

 [EMAIL PROTECTED] 1/23/2006 3:11:24 PM 
From: Rick Reumann [EMAIL PROTECTED] 

 On 1/23/06, Srini Pillai wrote: 
 
  We have a situation where we require to paginate our result list
(which 
  is quite huge, around 1000+ records). We found few tags like
DisplayTags 
  from sourceforge.net but the current version does not support batch

  lists (i.e. retrieving the list in batches based on the page the
user is 
  in, instead of retrieving all in once). Is there a tag in
Struts/JSTL 
  that would help display huge lists. Any help is appreciated. 
 
 None that I'm aware of:( Although I keep meaning to work on one. Ajax

 would really be nice for this actually. You could go to the server to

 get your next display and it would repopulate your display without
the 
 whole page refreshing. 
 

That would be slick but you would still have the problem of deciding
how
to batch up your results without actually retrieving the full set.  You
still need
to determine how many rows you want to display and how many pages.  

Are you thinking of using something like a keyset cursor? Something 
similar could be implemented using the standard DAO/VO pattern.

I've heard this described as ghost objects.  The first data retrieval
only returns 
the primary keys populating ghost objects.  The set of keys are used to
retrieve 
the details/rest of the object per page.  Your initial inquiry returns
the full set of 
keys matching the criteria.

Gary




 -

 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: [JSF] Client state

2006-01-23 Thread Frank W. Zammetti
 On 1/23/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Yes, that's correct... with every document loaded into the
 browser, anything that existed before is wiped out.  I'm not aware of
 any
 way around that (and it sure sounds like a security problem if there
 was).
 A hidden frame is the typical solution in such cases...

 So, there are ways besides Ajax? This is good to hear.

Yep, but they tend to be flowned upon by most.  For whatever reason,
frames have gotten a really bad rap over the years.  The three options I
am aware of are frames, hidden fields and URL rewriting, and AJAX.

 Of course, now
 you can do it with AJAX... you load one page in the beginning that
 contains your AJAX code and a single div... every request you make to
 the server goes through an XMLHttpRequest object, and the results are
 stuck into that div... this can be a whole page, so in a sense your
 creating a browser inside a browser :)

 Yeah, I know, I do that myself. I was curious about independent pages.
 This hidden frame thing... Can it work while actual page content is
 changed *and* page address is updated in the address line?

Frames are in essence separate browser instances crammed together... well,
not *quite*, I suppose it's more like multiple tabs in a browser where the
content of each tab is shown together.  So, if you change the content of
one, even if its redirecting to another URL, the content of the other is
completely unaffected.

With frames, the URL you see in the address bar rarely corresponds to
anything useful...  That's one of the reasons people started to dislike
frames... it tended to make bookmarking more difficult, i.e., if you have
two frames, they each build up their own history, so if you try and
bookmark a page, you may have content in one frame that doesn't correspond
to what's in the other (think of a menu frame that changes according to
what page is dislpayed in the other frame)... usually what you bookmark
was the address of only a single frame anyway, and that doesn't really get
you what you want because then the content of the other is underfined (and
more than likely when you try and go back to the bookmark, it's not a
frameset any more because that's likely not what got bookmarked anyway).

To get around these problems requires you to write Javascript that can
properly be sure all frames involved are updated.  For instance, if you
click a link that brings you to page A in frame A, and you need page A1 in
frame A1 to be present, you would need to write code in page A that,
onLoad, loaded page A1 into frame A1 as well.  It allows you to do some
really cool things, but it's definitely more work and more error-prone.

 Michael.

Frank

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



Re: Tags for Pagination

2006-01-23 Thread Adam Hardy

Gary VanMatre on 23/01/06 20:11, wrote:
We have a situation where we require to paginate our result list (which 
is quite huge, around 1000+ records). We found few tags like DisplayTags 
from sourceforge.net but the current version does not support batch 
lists (i.e. retrieving the list in batches based on the page the user is 
in, instead of retrieving all in once). Is there a tag in Struts/JSTL 
that would help display huge lists. Any help is appreciated. 


None that I'm aware of:( Although I keep meaning to work on one. Ajax 
would really be nice for this actually. You could go to the server to 
get your next display and it would repopulate your display without the 
whole page refreshing. 


That would be slick but you would still have the problem of deciding how
to batch up your results without actually retrieving the full set.  You still 
need
to determine how many rows you want to display and how many pages.  

Are you thinking of using something like a keyset cursor? Something 
similar could be implemented using the standard DAO/VO pattern.


I've heard this described as ghost objects.  The first data retrieval only returns 
the primary keys populating ghost objects.  The set of keys are used to retrieve 
the details/rest of the object per page.  Your initial inquiry returns the full set of 
keys matching the criteria.


I implemented pagination with batched retrieval using Hibernate, which 
takes a couple of parameters on its fetch methods, maxCount and 
firstRecord.


It's fairly easy except the logic at the front-end was tricky when 
trying to implement backwards and forward buttons and setting the new 
firstRecord parameter to store on the jsp for the next submit.




Adam

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



Re: Tags for Pagination

2006-01-23 Thread Ryan Wynn
On 1/23/06, Srini Pillai [EMAIL PROTECTED] wrote:
 Gary,

 We were thinking of executing an initial query to get the total count
 for the criteria (using  count(*)) and then page it using the offset and
 range that would be passed as part of the query string when clicked on
 the page numbers. Also we are using hibernate, which has the facility to
 specify offset and maxresults to retrieve the range of records to be
 displayed on the page.

 The DisplayTag was impressive but the batch part of the implementation
 is still in the development stage. We couldn't find any tags that could
 function with a batch list...

 - Srini

Srini, you might find this link helpful.

http://wiki.apache.org/myfaces/WorkingWithLargeTables


tabs struts tutorial

2006-01-23 Thread Garner, Shawn
Is there a way to do page tabs in struts?

I seem to recall somebody saying there was.

 

Also does anyone know of a good struts tutorial/refresher?

I'm starting up a project with a person who hasn't worked with struts for a
few years.

 

Shawn

 


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



Re: Tags for Pagination

2006-01-23 Thread Srini Pillai
Adam,

Did you use your own custom tag to display the results or did u extend
any tags available in the web ?

- Srini

=

I implemented pagination with batched retrieval using Hibernate, which

takes a couple of parameters on its fetch methods, maxCount and 
firstRecord.

It's fairly easy except the logic at the front-end was tricky when 
trying to implement backwards and forward buttons and setting the new 
firstRecord parameter to store on the jsp for the next submit.



Adam

-
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: Tags for Pagination

2006-01-23 Thread Srini Pillai
Thanks, it was quite helpful... I am looking for more of a component
(tag) that could plugin nicely without much customization...but looks
like we have to code our own tag... Thanks anyway :)

- Srini

 [EMAIL PROTECTED] 1/23/2006 3:31:52 PM 
On 1/23/06, Srini Pillai [EMAIL PROTECTED] wrote:
 Gary,

 We were thinking of executing an initial query to get the total
count
 for the criteria (using  count(*)) and then page it using the offset
and
 range that would be passed as part of the query string when clicked
on
 the page numbers. Also we are using hibernate, which has the facility
to
 specify offset and maxresults to retrieve the range of records to be
 displayed on the page.

 The DisplayTag was impressive but the batch part of the
implementation
 is still in the development stage. We couldn't find any tags that
could
 function with a batch list...

 - Srini

Srini, you might find this link helpful.

http://wiki.apache.org/myfaces/WorkingWithLargeTables

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



[Struts EL JSTL]

2006-01-23 Thread Garner, Shawn
I'm not sure what exactly is Struts EL and how it compares to the JSTL tags.

I've used JSTL 1.0 tags and see how there is overlap between some of the
Struts logic/bean tags but I fail to see what exactly Struts EL is.

I've read http://struts.apache.org/struts-el/index.html
http://struts.apache.org/struts-el/index.html  but I still fail to see
what it is.

 

Can somebody clarify this for me?

 

Shawn


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



Re: struts and JSTL

2006-01-23 Thread fea jabi

Thank you for your response. I have set the value in the formbean.

hence, tried this instead
td
fmt:formatNumber value=${Form1.amount} type=currency/
/td

But only half of JSP is getting displayed. Not sure why? any idea why this 
happening?



When tried to debug I see an EL exception being thrown

Unable to find a value for \amount\ in object of class 
\org.apache.struts.validator.DynaValidatorForm\ using operator \.\


The form-bean does have the form-property amount. Not sure why it can't find 
it.


Thanks.




From: Ed Griebel [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: Re: struts and JSTL
Date: Mon, 23 Jan 2006 13:17:07 -0500

The problem is that you're putting the 'amount' field into a hidden
field and then trying to use that hidden field as a value, but your
amt bean will actually contain the value of the form field: input
type='hidden' value='123.00'/

Try this instead. First, in your action save this amount value to the
request scope:
   request.setAttribute(amount, yourAmountVar);

Then put in your JSP, assuming a JSP 2.0 container:
td
fmt:formatNumber value=${amount} type=currency/
/td

-ed

On 1/23/06, fea jabi [EMAIL PROTECTED] wrote:
 would like to display the value of property amount as $10,00,000. tried
 using the below.

 But getting an error/ it doesn't get displayed.

 Is this the way to do this. Or is there an easier way to do the same?


 td
   bean:define id=amthtml:text name=Form1 property=amount
 styleClass=invisibleInput readonly=true 
tabindex=-1//bean:define

   % System.out.println(amt);%
   fmt:formatNumber value=${amt} type=currency/
 /td


 Thanks.

 _
 Is your PC infected? Get a FREE online computer virus scan from 
McAfee(r)

 Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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




--
The greatest tyrannies are always perpetrated in the name of the
noblest causes. Thomas Paine
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety - Benjamin
Franklin

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



_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



Re: What JDK version are you using?

2006-01-23 Thread Laurie Harper

Niall Pemberton wrote:

-
[ ] JDK 1.2
[ ] JDK 1.3
[X] JDK 1.4
[X] JDK 1.5 (or JDK 5)
-


And yes, using Validator.

L.


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



Re: Tomcat 4.1 vs DynaAddressForm

2006-01-23 Thread Laurie Harper

Deepak wrote:

Hi Guys,

Am getting an exception in tomcat console when try to
install DynaActionForm using below nodes in
struts-config.xml :

 form-bean name=DynaAddressForm   

type=org.apache.struts.action.DynaActionForm

 form-property name=name
type=java.lang.String/
 form-property name=address
type=java.lang.String/
 form-property name=email
type=java.lang.String /
   /form-bean

Error is :

SEVERE: Parse Error at line 40 column 13: The content
of element type form-bean
 must match
(icon?,display-name?,description?,set-property*).
org.xml.sax.SAXParseException: The content of element
type form-bean must matc
h (icon?,display-name?,description?,set-property*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException

Any idea ?



What does your DOCTYPE look like in struts-config.xml? And where did you 
put the form-bean element? (i.e. is it within a form-beans element?)


L.


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



Shale: not calling prerender or preprocess, and Navigation issue

2006-01-23 Thread Jason Vincent
Hey there,

I've got some unexpected navigation stuff going on, that I was hoping
someone can help explain.

Here is my use-case:
1) Home page is requested.
2) user isn't logged in, so redirect to login url.
3) after login, navigate to home.

In my logs, I'm seeing this behavior, which is wierd... This is just
the initial request to the home page, I didn't hit the login button,
just yet.

HomeVC.init(), requestURI=/cpt/home.jsf
HomeVC.prerender(), requestURI=/cpt/home.jsf
BaseViewController - /cpt/home.jsf is a secure url and not logged in,
redirecting to login: /login/login.jsf
HomeVC.destroy(), requestURI=/cpt/home.jsf
HomeVC.init(), requestURI=/cpt/home.jsf
HomeVC.prerender(), requestURI=/cpt/home.jsf
BaseViewController - /cpt/home.jsf is a secure url and not logged in,
redirecting to login: /login/login.jsf
HomeVC.destroy(), requestURI=/cpt/home.jsf

The init,prerender,destroy are not called for LoginVC - Why not?

The wierd part is that the browser behavior is working as expected -
up to a point.
Once I hit the login button, the user is logged in, but the navigation
rule in faces-config, isn't sending the browser to the home url.

Another interesting thing... after the login form is displayed, and I
Manually enter the login URL - the init,prerender, and destroy methods
are not called by ANY ViewController.

PS... I do have no-cache meta tags in the jsps, and I also set the
headers in my baseViewControler.prerender method - so at least the
browser shouldn't be caching anything.

Can anyone explain what is going on?

Any help is appreciated.
Thanks,
Jason

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



Re: returning a non-html file as response

2006-01-23 Thread Laurie Harper

[EMAIL PROTECTED] wrote:
I need to return a differnt kind of resposne type.  Its an excel file if your curious.  I think I understand how to do this with a plain servlet, but I am trying to fit it into the structure of the struts architecture.  Can someone explain to me how to do this?  In particular, can I just grab the response stream from the response object I get in the execute method and start writing to it.  If so, what becomes of the forward I'm supposed to return.  


Feel free to inform me of my misuse of the platform if that's the case.


You might find this helpful too:

http://wiki.apache.org/struts/StrutsFileDownload

L.


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



Struts Please Wait processor and dispatch actions

2006-01-23 Thread Randy Shepherd

http://wiki.apache.org/struts/StrutsPleaseWait

I implemented this a while back on an order processing page using a  
plain old Action. I would like to now use it with a dispatch action,  
however there are struts config problems. Specifically, the parameter  
attribute that is used to trigger the Please Wait request processor  
can not be in the action definition, as a dispatch action sets  
method in the parameter attribute.


Has anyone used the Please Wait processor with a dispatch action?

-Randy 


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



RE: A couple of simple questions

2006-01-23 Thread David Thielen
The servlet that I have created and am accessing via struts. (So it might be
more correct to say when my struts app is first called via the struts
servlet.)

Thanks - dave

 
David Thielen
www.windwardreports.com
303-499-2544
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 11:53 AM
To: Struts Users Mailing List
Subject: Re: A couple of simple questions

David Thielen wrote:
 3) I need to have a method called when my servlet first loads. Is a
 listener the best way to do this?
   
What servlet?

Dave



-
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: Tags for Pagination

2006-01-23 Thread Rick Reumann
On 1/23/06, Srini Pillai [EMAIL PROTECTED] wrote:
  ...but looks
 like we have to code our own tag... Thanks anyway :)

At least for the display of pages and the whole next/last stuff, make
this an open source tag:) I just haven't gotten around to making one
myself. It should take something like:

sizeOfCollection
maxRowsDisplayed
currentPage
url

based on that information it should be pretty easy to create a nice
tag that generates google-like page numbers, first, next, last,
previous. etc. My thought was the tag would generate those links using
the url passed in and append the appropriate pageNumber.

On the server side there would be the use of a PagationObject that
holds that same information listed above in Session scope. When the
user clicks on one of the links from the tag it can figure out based
on the pageNumber submited in the link what rows to retrieve from the
db.

The display part into the table should be pretty easy. For that we
could just steal and tweak the display tag code. To me this would be a
really nice tag.

If you/we/whoever wanted to really go crazy, we could provide a
PagationServlet that handles almost all of this but it would obviously
then mean a lot more information would have to be passed into the tag
such as...

collectionName
classNameToCallForCollection
methodNameToCall

or something along those lines. Then our Servlet along with the
Pagation object could use reflection to execute the appropriate 
method to get the List and put it into request scope. (Obviously the
developer would still have to make sure to code an appropriate method
somewhere that got the Collection based off the row range passed to
it).

Tie this all in with Ajax to update the display and you have a real winner:)

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



Re: struts and JSTL

2006-01-23 Thread Rahul Akolkar
On 1/23/06, fea jabi [EMAIL PROTECTED] wrote:
 Thank you for your response. I have set the value in the formbean.

 hence, tried this instead
 td
 fmt:formatNumber value=${Form1.amount} type=currency/
 /td

snip/

... value=${Form1.map.amount} ...

-Rahul


 But only half of JSP is getting displayed. Not sure why? any idea why this
 happening?


 When tried to debug I see an EL exception being thrown

 Unable to find a value for \amount\ in object of class
 \org.apache.struts.validator.DynaValidatorForm\ using operator \.\

 The form-bean does have the form-property amount. Not sure why it can't find
 it.

 Thanks.


snap/

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



Re: Tags for Pagination

2006-01-23 Thread Srini Pillai
Thanks anyway...

 [EMAIL PROTECTED] 1/23/2006 4:39:49 PM 
Srini Pillai on 23/01/06 20:45, wrote:
 Did you use your own custom tag to display the results or did u
extend
 any tags available in the web ?
 =
 
 I implemented pagination with batched retrieval using Hibernate,
which
 
 takes a couple of parameters on its fetch methods, maxCount and 
 firstRecord.
 
 It's fairly easy except the logic at the front-end was tricky when 
 trying to implement backwards and forward buttons and setting the new

 firstRecord parameter to store on the jsp for the next submit.

I wrote a tag for it. Pretty horrible I'm afraid, and that's even 
without page numbers a la google to click back or forwards to.


Adam

-
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: Validation Security Hole?

2006-01-23 Thread Laurie Harper

Oops, noted...

Paul Benedict wrote:

Laurie, one thing to correct:

Issue: addition of a 'org.apache.struts.action.CANCEL' parameter to any request 
will cause
validation to be skipped, but the rest of the request processing / action 
invocation cycle to
proceed normally

Should read:

Issue: addition of a 'org.apache.struts.taglib.html.CANCEL' parameter to any 
request will cause
automatic validation to be skipped, but the rest of the request processing / 
action invocation
cycle to proceed normally

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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



Re: struts and JSTL

2006-01-23 Thread Laurie Harper
Since you're using a DynaValidatorForm you need to specify the property 
slightly differently:


fmt:formatNumber value=${Form1.map.amount} type=currency/

L.

fea jabi wrote:

Thank you for your response. I have set the value in the formbean.

hence, tried this instead
td
fmt:formatNumber value=${Form1.amount} type=currency/
/td

But only half of JSP is getting displayed. Not sure why? any idea why 
this happening?



When tried to debug I see an EL exception being thrown

Unable to find a value for \amount\ in object of class 
\org.apache.struts.validator.DynaValidatorForm\ using operator \.\


The form-bean does have the form-property amount. Not sure why it can't 
find it.


Thanks.




From: Ed Griebel [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: Re: struts and JSTL
Date: Mon, 23 Jan 2006 13:17:07 -0500

The problem is that you're putting the 'amount' field into a hidden
field and then trying to use that hidden field as a value, but your
amt bean will actually contain the value of the form field: input
type='hidden' value='123.00'/

Try this instead. First, in your action save this amount value to the
request scope:
   request.setAttribute(amount, yourAmountVar);

Then put in your JSP, assuming a JSP 2.0 container:
td
fmt:formatNumber value=${amount} type=currency/
/td

-ed

On 1/23/06, fea jabi [EMAIL PROTECTED] wrote:
 would like to display the value of property amount as $10,00,000. tried
 using the below.

 But getting an error/ it doesn't get displayed.

 Is this the way to do this. Or is there an easier way to do the same?


 td
   bean:define id=amthtml:text name=Form1 property=amount
 styleClass=invisibleInput readonly=true 
tabindex=-1//bean:define

   % System.out.println(amt);%
   fmt:formatNumber value=${amt} type=currency/
 /td


 Thanks.

 _
 Is your PC infected? Get a FREE online computer virus scan from 
McAfee(r)

 Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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




--
The greatest tyrannies are always perpetrated in the name of the
noblest causes. Thomas Paine
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety - Benjamin
Franklin

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



_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




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



Re: validating a single textbox for two mask values

2006-01-23 Thread Laurie Harper

rama chandrula wrote:

Hi,

I have a text box in which I can either enter a E-mail address or the 
Phone number.
I want to use Struts-Validator for validating the format of both the 
email and phone number.


How can I specify the values of both the masks for the same text box.
In the snippet given below, contactID is used to refer the email 
address.  Is the following correct ?



form name=myForm
   field property=addContactID
  depends=mask
  arg0 key=prompt.contactID/
  arg1 key=error.invalid.contactID/
  var
  var-namemask/var-name
  var-value(${contactID})|(${phoneNumber})/var-value
  /var
   /field
   /form


var-value should contain a regular expression. I'm not sure what 
${contactID} and ${phoneNumber} are, but you need to replace them with 
the appropriate regular expressions.


L.


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



RE: A couple of simple questions

2006-01-23 Thread David G. Friedman
I bet you wish more web servers were like WebLogic which have provisions for.
allows Servlets to be used for welcome pages.  If interested, the link is:
http://e-docs.bea.com/wls/docs81/webapp/components.html#109211

I remember trying this on Tomcat 5.X after reading that note but I really don't 
remember if it worked or not.  Probably
not.

Regards,
David Friedman / [EMAIL PROTECTED]

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper
Sent: Monday, January 23, 2006 4:43 PM
To: user@struts.apache.org
Subject: Re: A couple of simple questions


David Thielen wrote:
 Asking again - thanks - dave

 -Original Message-
 Hi;

 1) I want my default page to be index.do so I set the following in web.xml:
welcome-file-list
 welcome-fileindex.do/welcome-file
 /welcome-file-list

 But instead I get a directory of files in my root when I go to the servlet.
 I can do this which works:
welcome-file-list
 welcome-fileindex.txt/welcome-file
 /welcome-file-list

 It appears it wants a file. Not an issue (see item 2) but just wanted to
 know what is going on.

You're right, you can only use physical files as welcome files. The
servlet spec doesn't support dynamic resources for this use. The
standard solution is to use an index.jsp that simply forwards or
redirects to a Struts action.

 2) My main page is a frameset. I tried having that be a do/jsp but when I
 pressed refresh on the browser, it went back to the start page. So I made it
 a html file and the three frames are .do urls. This works fine, I'm just
 asking if this is the best way to do this.

What do you mean 'went back to the start page'? Remember that refreshing
a page that uses framesets refreshes the *frameset*, not the frames
within it.

 3) I need to have a method called when my servlet first loads. Is a
 listener the best way to do this?

If it's your servlet, just implement its init() method. If you want to
call other code on load of an arbitrary servlet there are various
listener interfaces you can implement and register in web.xml.
ServletContextListener [1] is probably the one you want in this case.

L.

[1]
http://tomcat.apache.org/tomcat-5.0-doc/servletapi/javax/servlet/ServletContextListener.html


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


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



Re: [Struts EL JSTL]

2006-01-23 Thread Laurie Harper

Garner, Shawn wrote:

I'm not sure what exactly is Struts EL and how it compares to the JSTL tags.

I've used JSTL 1.0 tags and see how there is overlap between some of the
Struts logic/bean tags but I fail to see what exactly Struts EL is.

I've read http://struts.apache.org/struts-el/index.html
http://struts.apache.org/struts-el/index.html  but I still fail to see
what it is.


The EL tags are variants of the standard tags that know how to evaluate 
JSTL expressions. They're useful when you're running on a pre-JSP 2.0 
container which doesn't do this automatically.


L.


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



RE: A couple of simple questions

2006-01-23 Thread David Thielen
2) That's what I thought too. What is weird is if my main page in a html
file and I click refresh, it does not change the pages in each frameset
(which is what I want). But if that main page was a jsp page, then it set
the frameset pages to what the main page set them too, as opposed to what
they had been changed to by my menu.

3) I am using struts so struts is the servlet and owns the init method,
unless I have missed something. So my understanding is there is no init
method for my code???

Thanks - dave


 2) My main page is a frameset. I tried having that be a do/jsp but when I
 pressed refresh on the browser, it went back to the start page. So I made
it
 a html file and the three frames are .do urls. This works fine, I'm just
 asking if this is the best way to do this.

What do you mean 'went back to the start page'? Remember that refreshing 
a page that uses framesets refreshes the *frameset*, not the frames 
within it.

 3) I need to have a method called when my servlet first loads. Is a
 listener the best way to do this?

If it's your servlet, just implement its init() method. If you want to 
call other code on load of an arbitrary servlet there are various 
listener interfaces you can implement and register in web.xml. 
ServletContextListener [1] is probably the one you want in this case.


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



Re: returning a non-html file as response

2006-01-23 Thread Frank W. Zammetti

Here comes my unhelpful response for the day...

[EMAIL PROTECTED] wrote:


I've got the thing to work returning null as my forward.  That leaves a couple 
of questions though.

1) Does struts write anything to the response before calling you action class?


I don't think so.


2) Does calling flush() on the response output stream cause the response to be 
sent? I kind of think it doesn't, but what exactly does flush() do in this 
instance.


I don't think so.

AND 

3)  Does struts close the response output stream for me? 


I don't think so.

:)

On the first point, I very much doubt it... some headers may get set, 
but I don't think anything gets written outside your Action.


On the second point, I looked at some code I wrote that does this and 
some of it calls flush(), some of it doesn't, and both seem to work.  I 
think it's probably a better idea to call it yourself to be safe, but it 
doesn't seem to matter.


On the first point, I'm almost certain Struts wouldn't do that, but your 
container certainly may (and perhaps correctly should).


Frank





 --- On Mon 01/23, Frank W. Zammetti  [EMAIL PROTECTED]  wrote:
From: Frank W. Zammetti [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
 Cc: user@struts.apache.org
Date: Mon, 23 Jan 2006 14:00:15 -0500 (EST)
Subject: Re: returning a non-html file as response

Hi,If you are writing the response from an Action (which yes, you can do asyou describe), you should return null from execute().  This indicates toStruts that you have taken responsibility for rendering the response andno forward should take place, the response should simply be returned as itexists at that point.-- Frank W. ZammettiFounder and Chief Software ArchitectOmnytex Technologieshttp://www.omnytex.comAIM: fzammettiYahoo: fzammettiMSN: [EMAIL PROTECTED] Mon, January 23, 2006 1:55 pm, [EMAIL PROTECTED] said: I need to return a differnt kind of resposne type.  Its an excel file if your curious.  I think I understand how to do this with a plain servlet, but I am trying to fit it into the structure of the struts architecture. Can someone explain to me how to do this?  In particular, can I just grab the response stream from the response object I get in the execute method and start writing to it.  If so, what becomes of the forward I'm supposed to 
return. Feel free to inform me of my misuse of the platform if that's the case. ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: Tags for Pagination

2006-01-23 Thread Srini Pillai
Rick,

Thanks for the guidance...It is a good start for me...

- Srini

 [EMAIL PROTECTED] 1/23/2006 4:37:53 PM 
On 1/23/06, Srini Pillai [EMAIL PROTECTED] wrote:
  ...but looks
 like we have to code our own tag... Thanks anyway :)

At least for the display of pages and the whole next/last stuff, make
this an open source tag:) I just haven't gotten around to making one
myself. It should take something like:

sizeOfCollection
maxRowsDisplayed
currentPage
url

based on that information it should be pretty easy to create a nice
tag that generates google-like page numbers, first, next, last,
previous. etc. My thought was the tag would generate those links using
the url passed in and append the appropriate pageNumber.

On the server side there would be the use of a PagationObject that
holds that same information listed above in Session scope. When the
user clicks on one of the links from the tag it can figure out based
on the pageNumber submited in the link what rows to retrieve from the
db.

The display part into the table should be pretty easy. For that we
could just steal and tweak the display tag code. To me this would be a
really nice tag.

If you/we/whoever wanted to really go crazy, we could provide a
PagationServlet that handles almost all of this but it would obviously
then mean a lot more information would have to be passed into the tag
such as...

collectionName
classNameToCallForCollection
methodNameToCall

or something along those lines. Then our Servlet along with the
Pagation object could use reflection to execute the appropriate 
method to get the List and put it into request scope. (Obviously the
developer would still have to make sure to code an appropriate method
somewhere that got the Collection based off the row range passed to
it).

Tie this all in with Ajax to update the display and you have a real
winner:)

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


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



RE: [Struts EL JSTL]

2006-01-23 Thread Karr, David
To answer this a little differently than Laurie did, the Struts-EL tag
library is a collection of tags that all inherit the behavior of the
Struts tags they replace, except the tag attribute values are passed
through the JSTL expression evaluation engine implemented by the Jakarta
standard taglib implementation.

The Struts-EL tag library is only useful in a JSP 1.2 container (or in a
JSP 2.0 container if not specifying the Servlet 2.4 spec).  If you have
a JSP 2.0 container, and you specify the Servlet 2.4 spec, then EL
evaluation is done natively in the container, so you don't need a
special tag library to implement it (and it would probably cause
unexpected problems if you used it).

If you just used the Struts tag library, then attribute values in the
Struts tags like ${stuff} would just produce the value ${stuff}.  If
you were instead to use Struts-EL, then it would produce a value based
on the value of the stuff scoped attribute.

In fact, the Java classes in the Struts-EL library all inherit from the
corresponding Java classes from the Struts tag library, it's just their
setters/getters that cause the values to be passed through the EL
engine.

 -Original Message-
 From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
 
 I'm not sure what exactly is Struts EL and how it compares to 
 the JSTL tags.
 
 I've used JSTL 1.0 tags and see how there is overlap between 
 some of the Struts logic/bean tags but I fail to see what 
 exactly Struts EL is.
 
 I've read http://struts.apache.org/struts-el/index.html
 http://struts.apache.org/struts-el/index.html  but I still 
 fail to see what it is.
 
 Can somebody clarify this for me?

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



Re: Shale: not calling prerender or preprocess, and Navigation issue

2006-01-23 Thread Craig McClanahan
On 1/23/06, Jason Vincent [EMAIL PROTECTED] wrote:
 Thanks for the response...

 The url in the browser is changing to /login/login.jsf... I call the
 redirect, from the the BaseViewController.prerender method...
 externalContext.redirect(toUrl); where in my case the toUrl is
 /cpt/login/login.jsf.

OK, that implies that the redirect did indeed work.  (It's also
possible to do this sort of is the user logged on checking with a
PhaseListener, so you don't have to embed it in every view controller,
but let's not complicate the diagnosis by changing that just yet :-).

  /cpt is my application context.

 ExternalContext externalContext = getExternalContext();
 String webappPath = externalContext.getRequestContextPath();
 String toUrl = webappPath+url;
 externalContext.redirect(toUrl);

 I was under the impression that navigation rules don't come into play
 until some commandLink or commandBotton is clicked.  Is that not true?


Yes, that is true ... More precisely, JSF navigation doesn't happen
until after a submit fires off one of your action methods, and it
returns a logical outcome string.  In the case at hand, we would be
waiting for the button handling the submit of the logon form to say
what outcome happened.

 But, I think my navigation rules are indeed wrong. Which may explain
 why the login button isn't going anywhere.  Here are my current
 navigation rules...

 navigation-rule
 from-view-id*/from-view-id
 navigation-case
 from-outcomehome/from-outcome
 to-view-id/home.jsf/to-view-id
 redirect/
 /navigation-case
 /navigation-rule


 navigation-rule
 from-view-id/login/login.jsf/from-view-id
 navigation-case
 from-outcomesuccess/from-outcome
 to-view-id/home.jsf/to-view-id
 /navigation-case
 navigation-case
 from-outcomefailed/from-outcome
 to-view-id/login/logon.jsf/to-view-id
 redirect/
 /navigation-case
 /navigation-rule

 Thanks so much.

There *is* a set of errors in your navigation rules ... view
identifiers should be using the JSP extension, not the JSF_mapped one.
 For example:

  from-view-id/login/login.jsp/from-view-id

since that is the real page that did the rendering.  Same thing goes
for to-view-id settings.


 Jason

Craig

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



Re: tabs struts tutorial

2006-01-23 Thread Michael Jouravlev
On 1/23/06, Garner, Shawn [EMAIL PROTECTED] wrote:
 Is there a way to do page tabs in struts?
 I seem to recall somebody saying there was.

There are common-controls.com, but they are not free, and if you ask
me they have their limitations - they are not just page drop-ins.
There is http://209.61.157.8:8080/taglibs/ project, pretty nice but
afaik these tabs are not drop-ins too.

What I mean by drop-ins is that they are not independent from the rest
of a page.

Take a look at my tab template, maybe it will work for you. You just
include your tab component into a page, and this is it.

How-to: http://jroller.com/page/javadujour?entry=create_tab_component_in_jsp
Project page: http://jspcontrols.sourceforge.net/
Struts integration: http://jspcontrols.sourceforge.net/jsptaglib/struts.html

Next version will contain a ready-to-use component that will
encapsulate tab rendering. Currently, you need to render tabs
yourself, but check out the how-to, Tigris-style tabs are really
simple.

Don't forget:
* you MUST define your tab component in a separate JSP file because
this file will be navigated to when you click on tabs.
* The page where tab component resides, must allow explicit refresh,
it will be redirected to each time you switch tabs, if Javascript is
not available.

Write back if you have questions.

Michael.

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



Re: returning a non-html file as response

2006-01-23 Thread Michael Jouravlev
On 1/23/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Here comes my unhelpful response for the day...

 [EMAIL PROTECTED] wrote:
 
  I've got the thing to work returning null as my forward.  That leaves a 
  couple of questions though.
 
  1) Does struts write anything to the response before calling you action 
  class?

 I don't think so.

Cache-control headers if controller nocache=true /  ?

Michael.

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



Re: returning a non-html file as response

2006-01-23 Thread Frank W. Zammetti

Craig McClanahan wrote:

Let's try to be a bit more helpful here :-).


No object :)


The only thing Struts itself might do is try to set the no-cache
headers if you have them configured.  It does not, by itself, ever
write to the response stream or response print writer.  That's the
responsibility of whatever your action forwards to.


Right, that's what I thought, thanks for confirming it!


Calling flush() doesn't necessarily cause the *entire* response to be
sent, because you might still be creating more output.  But it *does*
cause the HTTP headers, and any output content you've written to be
transmitted.  From the perspective of the servlet API, this response
has now been committed so you cannot later decide to do a redirect
or forward.

In general, the only use case I can think of for calling flush()
yourself is if you have something like a Request In Progress - Please
Wait at the beginning of your page, and you want that to show to the
user while a time-consuming process is performed to create the
remainder of the content.


Interesting... I would have thought just the opposite, but this makes 
sense.  I suppose one could imagine a problem with a filter that does 
some post-processing occurring if you flush() yourself.


So, leave flushing to the next guy, contrary to what everyday etiquette 
would seem to indicate ;) LOL



Struts doesn't but the servlet container will, once your processing
has finished.


This is a guarantee of the servlet API I would assume?  It seems like it 
logically would be, but I wasn't sure.



Craig


Frank

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



Re: returning a non-html file as response

2006-01-23 Thread Frank W. Zammetti

Frank W. Zammetti wrote:

Craig McClanahan wrote:

Let's try to be a bit more helpful here :-).


No object :)


Err, no OBJECTION!

D'oh :)

Frank

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



Re: [OT] Anyone else mess around with Wicket?

2006-01-23 Thread Michael Jouravlev
On 1/21/06, Craig McClanahan [EMAIL PROTECTED] wrote:
 On 1/20/06, Michael Jouravlev [EMAIL PROTECTED] wrote:
 
  If all that JSF rendereres produce are divs and spans with proper ids,
  then dressing up a page would be a weekend fun a-la Zen Garden. Anyone
  from JSF team hears me? ;-

 Building such renderers would be trivially easy, and would make a very nice
 library.  Why don't you code up some renderers like this and show the JSFers
 how to do it, instead of just complaining about this issue?  :-)

There is a Russian saying, You suggest it, you will be chosen to
implement it, you will be punished for doing it wrong ;-)) I do not
actually use JSF right now. I might give it a try, but I am no Dave
Shea ;-)

Michael.

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



tiles is this url still valid

2006-01-23 Thread Werner Punz

Hi group
As it seems the tiles url refers to http://struts.apache.org/tags-tiles
on the tiles website. But it seems to me the url itself is not reachable 
anymore.


Is this url still valid?


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



Re: returning a non-html file as response

2006-01-23 Thread Craig McClanahan
On 1/23/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Craig McClanahan wrote:

[snip]

  Calling flush() doesn't necessarily cause the *entire* response to be
  sent, because you might still be creating more output.  But it *does*
  cause the HTTP headers, and any output content you've written to be
  transmitted.  From the perspective of the servlet API, this response
  has now been committed so you cannot later decide to do a redirect
  or forward.
 
  In general, the only use case I can think of for calling flush()
  yourself is if you have something like a Request In Progress - Please
  Wait at the beginning of your page, and you want that to show to the
  user while a time-consuming process is performed to create the
  remainder of the content.

 Interesting... I would have thought just the opposite, but this makes
 sense.  I suppose one could imagine a problem with a filter that does
 some post-processing occurring if you flush() yourself.


Yah, I suppose that's a potential use case, but I've never needed it.

By the way, you also have control over how much output content is
buffered before the container commits the response even if it's not
done yet ... see methods like getBufferSize() and setBufferSize() on
ServletResponse.  You can also ask if the response has indeed been
committed yet.

 So, leave flushing to the next guy, contrary to what everyday etiquette
 would seem to indicate ;) LOL

  Struts doesn't but the servlet container will, once your processing
  has finished.

 This is a guarantee of the servlet API I would assume?  It seems like it
 logically would be, but I wasn't sure.

Section SRV.5.5 of the servlet spec :-).


  Craig

 Frank


Craig

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



Re: returning a non-html file as response

2006-01-23 Thread Frank W. Zammetti
A compression filter does exactly that, that's the reason it occurred to 
me :)  I remember facing *precisely* that problem a few months back with 
the JWP sample app.  I know I solved it, but I guess I had forgotten the 
root cause :)


Frank

Craig McClanahan wrote:

On 1/23/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Craig McClanahan wrote:


[snip]


Calling flush() doesn't necessarily cause the *entire* response to be
sent, because you might still be creating more output.  But it *does*
cause the HTTP headers, and any output content you've written to be
transmitted.  From the perspective of the servlet API, this response
has now been committed so you cannot later decide to do a redirect
or forward.

In general, the only use case I can think of for calling flush()
yourself is if you have something like a Request In Progress - Please
Wait at the beginning of your page, and you want that to show to the
user while a time-consuming process is performed to create the
remainder of the content.

Interesting... I would have thought just the opposite, but this makes
sense.  I suppose one could imagine a problem with a filter that does
some post-processing occurring if you flush() yourself.



Yah, I suppose that's a potential use case, but I've never needed it.

By the way, you also have control over how much output content is
buffered before the container commits the response even if it's not
done yet ... see methods like getBufferSize() and setBufferSize() on
ServletResponse.  You can also ask if the response has indeed been
committed yet.


So, leave flushing to the next guy, contrary to what everyday etiquette
would seem to indicate ;) LOL


Struts doesn't but the servlet container will, once your processing
has finished.

This is a guarantee of the servlet API I would assume?  It seems like it
logically would be, but I wasn't sure.


Section SRV.5.5 of the servlet spec :-).


Craig

Frank



Craig

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: returning a non-html file as response

2006-01-23 Thread Max Cooper
On Mon, 2006-01-23 at 16:27 -0800, Craig McClanahan wrote:
 On 1/23/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
  Craig McClanahan wrote:
 
 [snip]
 
   Calling flush() doesn't necessarily cause the *entire* response to be
   sent, because you might still be creating more output.  But it *does*
   cause the HTTP headers, and any output content you've written to be
   transmitted.  From the perspective of the servlet API, this response
   has now been committed so you cannot later decide to do a redirect
   or forward.
  
   In general, the only use case I can think of for calling flush()
   yourself is if you have something like a Request In Progress - Please
   Wait at the beginning of your page, and you want that to show to the
   user while a time-consuming process is performed to create the
   remainder of the content.
 
  Interesting... I would have thought just the opposite, but this makes
  sense.  I suppose one could imagine a problem with a filter that does
  some post-processing occurring if you flush() yourself.
 
 
 Yah, I suppose that's a potential use case, but I've never needed it.

If someone were to write such a filter, they should override flush() in
the wrapped response.

-Max


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



jstl tutorial/reference?

2006-01-23 Thread Deep Chand
Hi,

I'm developing a struts based application and would like to use jstl
tags instead of custom tags specified with struts tag lib. Is there a
good JSTL tutorial/reference available which gives good example usage
also of how to use the jstl tags.

Thanks
Deep

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



Re: jstl tutorial/reference?

2006-01-23 Thread Rahul Akolkar
On 1/23/06, Deep Chand [EMAIL PROTECTED] wrote:
 Hi,

 I'm developing a struts based application and would like to use jstl
 tags instead of custom tags specified with struts tag lib. Is there a
 good JSTL tutorial/reference available which gives good example usage
 also of how to use the jstl tags.

snip/

The only reference you need is the set of documents published via
JSR-52 [ http://www.jcp.org/en/jsr/detail?id=52 ].

Everything else is gravy ;-)

-Rahul


 Thanks
 Deep


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



  1   2   >