Re: Need Help: XML to HTML using java

2004-10-14 Thread Kranti Parisa
thanx alot Andrew


On Fri, 15 Oct 2004 13:22:10 +0800, Andrew Hill
<[EMAIL PROTECTED]> wrote:
> These might help:
> 
> http://stxx.sourceforge.net/
> 
> http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html
> 
> 
> 
> 
> Kranti Parisa wrote:
> 
> > Thanq
> >
> > i will follow ur suggestion
> >
> >
> > On Fri, 15 Oct 2004 10:24:36 +0530, Kailash Vasani <[EMAIL PROTECTED]> wrote:
> >
> >>Hi,
> >>
> >>It seems that all you need is XSL transformation.
> >>
> >>One more suggestion,
> >>Before posting questions to this group, Please put [OT] (including brackets)
> >>as first characters in subject line,
> >>in case the question that you are asking is not relevant to Struts. (like
> >>this question).
> >>
> >>
> >>
> >>
> >>-Original Message-
> >>From: Kranti Parisa [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, October 15, 2004 10:15 AM
> >>To: Struts Users Mailing List
> >>Subject: Need Help: XML to HTML using java
> >>
> >>Hi all,
> >>i have a problem...
> >>
> >>iam having a xml file having the following structure..
> >>
> >>i need to convert this xml file to HTML file having the table of
> >>information..
> >>
> >>so plz help me out...
> >>
> >>
> >>   >>Count="1" ChildCount="1" Show="Y" Refine="B">
> >> 
> >> Sainsbury's aromatherapy
> >>citrus mint
> >> TestPerf
> >> TestPerf001
> >> Ashraf Product
> >> Acb
> >>  
> >>   >>ChildCount="1" Show="Y" Refine="H">
> >> 
> >> Western Europe
> >> Western Europe
> >> Western Europe
> >> Central and Eastern Europe
> >> Central and Eastern Europe
> >>  
> >>   >>Count="3" ChildCount="1" Show="Y" Refine="H">
> >> 
> >> United Kingdom
> >> Belgium
> >> Belgium
> >> Czech Republic
> >> Czech Republic
> >>  
> >>
> >>
> >>TIA,
> >>Kranti
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>"Quinnox is an Award Winning IT services organisation, accredited to CMM
> >>Level 5. We are successfully delivering Application Development,
> >>Integration, Support and Testing services to clients in the Finance,
> >>Manufacturing, Retail and Telecom sectors. Particular focus areas include
> >>e-Business and ERP (notably SAP) solutions."
> >>
> >>-
> >>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]
> 
> 


-- 
-- 
Kranti Kiran Kumar Parisa
Software Engineer [ e-Biz ],
Patni Computer Systems Ltd.,
India
Mobile: +91 98504 45977

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



Re: mechanism to clear objects in the session

2004-10-14 Thread Erik Weber
There was no common solution discussed that I recall. But, the idea is, 
put a class to work in a place where it can monitor every request. For 
example, in a Servlet Filter, or in a Struts RequestProcessor subclass, 
or an Action base class. As far as I know, there is no existing 
framework or common utility for doing this sort of thing. I have found 
that using a common naming convention (or even a common key) for these 
types of session attributes makes programming the cleanup easier. 
Tracking page flow and deciding what's going with the flow and what's 
going against the flow is up to you.

A real simple first implementation might be to clean out all session 
attributes (such as forms) that are considered "working" attributes (not 
those, such as "user" objects, that are needed for the lifetime of the 
session) whenever the user returns to the "home" page (in your "home" 
Action).

It is worth noting that good navigation design inherently makes this 
sort of thing easier. Applications should have "home" views, and 
sections of the application should have their own "home" views. When the 
user finishes a task, he returns to the home view for the section he's 
using, or to the main home view. This is where you can do cleanup (while 
you are preparing the home view).

Or not. The particular design isn't really relevant. The point is to 
design *something*, to think it through ahead of time, instead of just 
drawing pages and making them "work".

Sorry I didn't help much.
Erik

lixin chu wrote:
Hi,
I saw an ealier thread discussing this but still can
not fully understand the solution.
appreciate if any one can provide some more detailed
info on this. basically if the current page flow is
terminated for some reason, how the Struts application
can clear the objects stored in the session ?
thanks
li xin
__
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]
 

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


RE: Null after error message

2004-10-14 Thread Toby Saville
You're a legend! I didn't have an = sign between my errors.footer key
and value.

Thanks.

-Original Message-
From: Shinobu Kawai [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 15, 2004 3:04 PM
To: Struts Users Mailing List
Subject: Re: Null after error message



Hi Toby,

> When I print an error message using
> 
> 
> 
> The error message is correctly displayed (from my ApplicationResources
> file) however after each error message, the word "null" appears. Why 
> is this?
What are you setting for "errors.suffix"?  And the other resources
stated at
http://struts.apache.org/userGuide/struts-html.html#errors

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <[EMAIL PROTECTED]>


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



***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of 
the Department of  Lands.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***


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



Re: Need Help: XML to HTML using java

2004-10-14 Thread Andrew Hill
These might help:
http://stxx.sourceforge.net/
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html

Kranti Parisa wrote:
Thanq
i will follow ur suggestion
On Fri, 15 Oct 2004 10:24:36 +0530, Kailash Vasani <[EMAIL PROTECTED]> wrote:
Hi,
It seems that all you need is XSL transformation.
One more suggestion,
Before posting questions to this group, Please put [OT] (including brackets)
as first characters in subject line,
in case the question that you are asking is not relevant to Struts. (like
this question).

-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 10:15 AM
To: Struts Users Mailing List
Subject: Need Help: XML to HTML using java
Hi all,
i have a problem...
iam having a xml file having the following structure..
i need to convert this xml file to HTML file having the table of
information..
so plz help me out...

 

Sainsbury's aromatherapy
citrus mint
TestPerf
TestPerf001
Ashraf Product
Acb
 
 

Western Europe
Western Europe
Western Europe
Central and Eastern Europe
Central and Eastern Europe
 
 

United Kingdom
Belgium
Belgium
Czech Republic
Czech Republic
 

TIA,
Kranti
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"Quinnox is an Award Winning IT services organisation, accredited to CMM
Level 5. We are successfully delivering Application Development,
Integration, Support and Testing services to clients in the Finance,
Manufacturing, Retail and Telecom sectors. Particular focus areas include
e-Business and ERP (notably SAP) solutions."
-
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]


mechanism to clear objects in the session

2004-10-14 Thread lixin chu
Hi,
I saw an ealier thread discussing this but still can
not fully understand the solution.

appreciate if any one can provide some more detailed
info on this. basically if the current page flow is
terminated for some reason, how the Struts application
can clear the objects stored in the session ?

thanks
li xin

__
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: Need Help: XML to HTML using java

2004-10-14 Thread Kranti Parisa
Thanq

i will follow ur suggestion


On Fri, 15 Oct 2004 10:24:36 +0530, Kailash Vasani <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> It seems that all you need is XSL transformation.
> 
> One more suggestion,
> Before posting questions to this group, Please put [OT] (including brackets)
> as first characters in subject line,
> in case the question that you are asking is not relevant to Struts. (like
> this question).
> 
> 
> 
> 
> -Original Message-
> From: Kranti Parisa [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 10:15 AM
> To: Struts Users Mailing List
> Subject: Need Help: XML to HTML using java
> 
> Hi all,
> i have a problem...
> 
> iam having a xml file having the following structure..
> 
> i need to convert this xml file to HTML file having the table of
> information..
> 
> so plz help me out...
> 
> 
>Count="1" ChildCount="1" Show="Y" Refine="B">
>  
>  Sainsbury's aromatherapy
> citrus mint
>  TestPerf
>  TestPerf001
>  Ashraf Product
>  Acb
>   
>ChildCount="1" Show="Y" Refine="H">
>  
>  Western Europe
>  Western Europe
>  Western Europe
>  Central and Eastern Europe
>  Central and Eastern Europe
>   
>Count="3" ChildCount="1" Show="Y" Refine="H">
>  
>  United Kingdom
>  Belgium
>  Belgium
>  Czech Republic
>  Czech Republic
>   
> 
> 
> TIA,
> Kranti
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> "Quinnox is an Award Winning IT services organisation, accredited to CMM
> Level 5. We are successfully delivering Application Development,
> Integration, Support and Testing services to clients in the Finance,
> Manufacturing, Retail and Telecom sectors. Particular focus areas include
> e-Business and ERP (notably SAP) solutions."
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
-- 
Kranti Kiran Kumar Parisa
Software Engineer [ e-Biz ],
Patni Computer Systems Ltd.,
India
Mobile: +91 98504 45977

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



Re: ActionError deprecated but ActionForm validate() uses ActionErrors

2004-10-14 Thread Shinobu Kawai

Hi Eu Gene,

> Re the title, ActionError was deprecated in Struts 1.2 but ActionForm
> validate() still returns ActionErrors. ActionErrors only has one add()
> method that accepts ActionError, not ActionMessage.
> 
> How do I modify my code in such a way to avoid using the deprecated
> ActionError, but still make use of struts form classes?
Don't worry, ActionErrors extends ActionMessages, which means...  You
know what I mean.  ;)
http://struts.apache.org/api/org/apache/struts/action/ActionErrors.html
http://struts.apache.org/api/org/apache/struts/action/ActionMessages.html

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <[EMAIL PROTECTED]>


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



Re: Null after error message

2004-10-14 Thread Shinobu Kawai

Hi Toby,

> When I print an error message using
> 
> 
> 
> The error message is correctly displayed (from my ApplicationResources
> file) however after each error message, the word "null" appears. Why is
> this?
What are you setting for "errors.suffix"?  And the other resources
stated at
http://struts.apache.org/userGuide/struts-html.html#errors

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <[EMAIL PROTECTED]>


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



Null after error message

2004-10-14 Thread Toby Saville
Hello, 

When I print an error message using



The error message is correctly displayed (from my ApplicationResources
file) however after each error message, the word "null" appears. Why is
this?

When I create an action error I do it like this:

errors.add("myProperty", new ActionError("myProperty.myKey"));

Thanks for your help.

toby


***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of 
the Department of  Lands.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***


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



RE: Need Help: XML to HTML using java

2004-10-14 Thread Kailash Vasani
Hi,

It seems that all you need is XSL transformation.

One more suggestion,
Before posting questions to this group, Please put [OT] (including brackets)
as first characters in subject line,
in case the question that you are asking is not relevant to Struts. (like
this question).


-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 10:15 AM
To: Struts Users Mailing List
Subject: Need Help: XML to HTML using java


Hi all,
i have a problem...

iam having a xml file having the following structure..

i need to convert this xml file to HTML file having the table of
information..

so plz help me out...


   
  
  Sainsbury's aromatherapy
citrus mint
  TestPerf
  TestPerf001
  Ashraf Product
  Acb
   
   
  
  Western Europe
  Western Europe
  Western Europe
  Central and Eastern Europe
  Central and Eastern Europe
   
   
  
  United Kingdom
  Belgium
  Belgium
  Czech Republic
  Czech Republic
   




TIA,
Kranti

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"Quinnox is an Award Winning IT services organisation, accredited to CMM
Level 5. We are successfully delivering Application Development,
Integration, Support and Testing services to clients in the Finance,
Manufacturing, Retail and Telecom sectors. Particular focus areas include
e-Business and ERP (notably SAP) solutions."

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



Need Help: XML to HTML using java

2004-10-14 Thread Kranti Parisa
Hi all,
i have a problem...

iam having a xml file having the following structure..

i need to convert this xml file to HTML file having the table of information..

so plz help me out...


   
  
  Sainsbury's aromatherapy
citrus mint
  TestPerf
  TestPerf001
  Ashraf Product
  Acb
   
   
  
  Western Europe
  Western Europe
  Western Europe
  Central and Eastern Europe
  Central and Eastern Europe
   
   
  
  United Kingdom
  Belgium
  Belgium
  Czech Republic
  Czech Republic
   




TIA,
Kranti

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



RE: problem with element in struts-config.xml

2004-10-14 Thread David G. Friedman
Ashish,

Your action has validate="true" but not input="" parameter to go when
validation fails. So where does the page go?  Is this part of your display
problem?

Regards,
David

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 5:56 PM
To: [EMAIL PROTECTED]
Subject: problem with  element in struts-config.xml


Hi
I am having problem with  element
I have 2 jsp, adminlogin.jsp is in folder pages and
index.jsp is in folder pages\admin
Here is how i have defined my action in
struts-config.xml file




Now the problem if i get error in AdminLoginAction it
tries to display adminlogin.jsp, but the relative path
gets messed up and i dont see any images,
but if i declare it as

it works fine, but then i dont get error messages set
in action class.
So how do i work make it work
Ashish



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

-
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 validation and resource file

2004-10-14 Thread David G. Friedman
Ashish,

I think you want to change your  to include a bundle="approvals"
and resource="true" to use the key name dapproval.006 from the "approvals"
message bundle.  See the javadoc for the commons validator at:

http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/valid
ator/Arg.html

Additionally, this might only work with the Commons validator 1.1.3 which is
available in Struts v1.2.4 release.  I don't have any idea if it works in
1.1 or 1.0.

Regards,
David

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 6:27 PM
To: [EMAIL PROTECTED]
Subject: struts validation and resource file


Hi
Can i specify which message resource should be used to
get the text when performing validation?
I hit the follwoing problem

In my struts-configxml i have defined 2 resource files
like




and in my validation.xml file i have the following
validation

  

where key approval.005 is from resource file
approvals,
but struts is not able to get the replace the value
during validation, on screen i get error message as
"approval.006 is required"


Ashish




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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


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



Re: sending/maintaning a download link

2004-10-14 Thread Richard
Thanks guys for the help.
Thanks for bringing the idea forward Craig. 


On Thu, 14 Oct 2004 11:40:49 -0700, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> You should note that the standard struts-example webapp does exactly
> this ... the "database" is represented as an XML file that is
> initialzed in the init() method of a plugin, and finalized in the
> destroy() method.
> 
> Craig
> 
> 
> On Thu, 14 Oct 2004 09:43:36 -0700, Wiebe de Jong <[EMAIL PROTECTED]> wrote:
> > If you don't have access to a database, then creating some kind of in-memory
> 
> 
> > database and storing it in the servlet context is a good alternative. Use a
> > Struts plugin for setup and cleanup of whatever you use.
> >
> > One thing you will have to be careful of is using up all your memory. If you
> > are storing token/timestamp/status for a large number of users, it will add
> > up.
> >
> > Wiebe
> >
> >
> >
> > -Original Message-
> > From: Andrew Hill [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 13, 2004 8:23 PM
> > To: Struts Users Mailing List
> > Subject: Re: sending/maintaning a download link
> >
> > It wouldnt survive a server restart, but this may well be acceptable if
> > you dont expect the server to restart very often and your token expiry
> > is only a day or two and its easy to get another token if needs be.
> >
> > Im not sure what the deal is with stuff added to servlet context after
> > startup in a clustered environment however. If your in a cluster you
> > would need to check up on that in the docs as it may not be available to
> > all servers in the cluster?
> >
> > Richard wrote:
> >
> > > Hi Wiebe,
> > >
> > > What if im not going to use any database? can I just store this in the
> > > servlet context?
> > >
> > > Thanks
> > > Richard
> > >
> > >
> > > On Wed, 13 Oct 2004 10:12:38 -0700, Wiebe de Jong <[EMAIL PROTECTED]> wrote:
> > >
> > >>The only way to make a link go away is to make it dynamic. That means that
> > >>the link you email will have to be to an action that returns the file.
> > There
> > >>have been quite a few threads recently on this mailing list about how to
> > get
> > >>actions to return files, including .pdf and .csv, so I won't cover that
> > >>here.
> > >>
> > >>Here is a list of steps for how I would go about implementing this
> > feature:
> > >>
> > >>1 - generate a unique token and store it in the database with a
> > >>timestamp=now() and status=valid.
> > >>2 - add this token to the url you send in the email:
> > >>http://www.mycompany.com/myapp/download.do?token=123abc
> > >>3 - when the user calls the action via the supplied url, the action checks
> > >>the database to see if the token is still valid.
> > >>4 - if token is valid, send the file, and then invalidate the token so it
> > >>can't be used again. (status=used)
> > >>5 - if token not valid, display a message to the user telling them that
> > the
> > >>link has either expired or already been used.
> > >>6 - have a background process run periodically (1 per day, every hour,
> > >>whatever) that checks the timestamps in the database and expires tokens if
> > >>the timestamp is more than 24 hours old. (status=expired)
> > >>
> > >>The background process can be run via Quartz, which was also covered
> > >>recently in this list.
> > >>
> > >>Wiebe de Jong
> > >>
> > >>
> > >>
> > >>-Original Message-
> > >>From: Richard [mailto:[EMAIL PROTECTED]
> > >>Sent: Wednesday, October 13, 2004 2:14 AM
> > >>To: Struts Users Mailing List
> > >>Subject: sending/maintaning a download link
> > >>
> > >>hi guys,
> > >>
> > >>how do i do this in struts?
> > >>
> > >>i want to send a download link ( via email - resolved ) to a newly
> > >>registered user and that download link will expire after 24hrs.
> > >>
> > >>is there and apache project for this?
> > >>
> > >>please help
> > >>
> > >>thanks in advance
> > >>richard
> > >>
> > >>-
> > >>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]
> >
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional comm

ActionError deprecated but ActionForm validate() uses ActionErrors

2004-10-14 Thread eugene . lim
Good day,

Re the title, ActionError was deprecated in Struts 1.2 but ActionForm
validate() still returns ActionErrors. ActionErrors only has one add()
method that accepts ActionError, not ActionMessage.

How do I modify my code in such a way to avoid using the deprecated
ActionError, but still make use of struts form classes?

Best regards,
Eu Gene


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



Re: Validator not validating v. 1.2.4

2004-10-14 Thread Vic Cekvenich
Motly I have validate=flase and manualy call it. Consider unit testing 
it like that outside of Tomcat.
.V

Jin Bal wrote:
Hi Guys
My validator config seems to be incorrect somewhere but I'm stumped as to what it is.  
The symptoms are that the validator succeeds in all validations no matter what i enter 
(or don't enter) in the form I am using an extension of ValidatorActionForm to use the 
path attribute in the struts-config
Here are my config snippets- can anybody see a config error?
struts conf:

  

plugin:
  

  
validation.xml







   

the form bean looks like:
public class PasswordReminderForm extends ValidatorActionForm {
public PasswordReminderForm() {
}
private String emailAddress;
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
}
all input is appreciated
TIA
Jin


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


Exposing ActionForm and MVC fields

2004-10-14 Thread Leandro Melo
Hi,
i'd like to hear some opinions.

I got a b2b application. I'm facing a desing problem.
This problems is associated basically to 2 themes:
- MVC
- Exposing AcfionForm fields.

I got a page where the BUYER fills a form to buy an
specific item. The steps are very simple.

1 - He sends a request for a quotation.
2 - After the quotation, he sends a request for an
order.

The point is...
When the SELLER goes to make the quotation he's
supposed to see a very similar page to the one the
BUYER filled the information. This is obvious as the
information is the same for both parts. So, should i
implement the page for the SELLER:

==>>> APPROACH 1 - using the same exact page
as the BUYER for the SELLER. Then i'd make the fields
the BUYER filled disabled (or just make them labels)
using some kind o scriptlet like this. 

   .../> , 

   where sellerVisibility would be something =   
   "disabled=true"

This approach seems nice to but i'd say that it's just
not that cool!!! It doesn't look nice from an MVC
point of view. I'll take the risk of having a lot of
this kind of scripts in pages as the times goes by. 
I know that the Action (control layer) is actually
responsible for setting the "sellerVisibility", what
means that it's also not that bad from the MVC point
of view.
But any way, the major problem with this approah is
that i use BeanUtils to copy data from the ActionForms
to the VOs and vice-versa. So even with the fields
disabled, i would take the risk of some smart guy
cheatting and setting via javascript the fields he's
not supposed to set. And as i copy the data with
BeanUtils, my data will be changed when it's not
supposed to do so.


> APPROACH 2 - just create another page
for the BUYER. This page would look exactly the same
for the BUYER and the SELLER, but they'll be different
pages. This way, i can build this other very similar
page without exposing my ActionForma attributes. This
approach seems to me allright from the MVC point of
view.
But the problem of this approach is that i'd start
building some kind of redundant and duplicated code.


Any opinions...

Leandro.





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

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



[ANN] maven-struts-module-plugin 1.0

2004-10-14 Thread Nathan Coast
The codeczar team is pleased to announce version 1.0 of the 
maven-struts-module-plugin.  A maven plugin that makes it easier to work 
with struts modules.

http://www.codeczar.com/products/maven-struts-module-plugin/
use this plugin to:
1) break complex web-apps into smaller module projects
e.g. http://www.codeczar.com/products/struts-examples/
2) incorporate 3rd party struts-modules into your projects
e.g. http://www.codeczar.com/products/logweb/
why to use it
http://www.codeczar.com/products/maven-struts-module-plugin/benefits.html
how to get it
http://www.codeczar.com/products/maven-struts-module-plugin/install.html
how to use it
http://www.codeczar.com/products/maven-struts-module-plugin/usage.html
INSTALLATION
Modify your [user.home]/build.properties so it contains
maven.repo.remote=http://www.ibiblio.org/maven,http://www.codeczar.com/maven
Execute this command:
maven -DartifactId=maven-struts-module-plugin
  -DgroupId=codeczar-struts
  -Dversion=1.0
  plugin:download
Cheers
Nathan
--
Nathan Coast
Managing Director
codeczar ltd
mobile: (852) 9049 5581
email:  mailto:[EMAIL PROTECTED]
web:http://www.codeczar.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Dissapearing items in cluster

2004-10-14 Thread Ivan Vasquez
Our application has a form with a multiple-selection item. We implemented it by 
including a List in the ActionForm. Each item in the List is a plain-old object, added 
from the corresponding Action.

When this application runs in a 2-node cluster, items in the List dissappear at 
random. Session replication in the cluster is working properly. When either server is 
put down, the application works normally.

Is it OK to use Lists in ActionForms as described? 
Has anybody seen this behavior in a cluster?

Environment:
Tomcat 5.0.28 (cluster)
Struts 1.2.4

Ivan

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

RE: No ActionErrors from Action class

2004-10-14 Thread Toby Saville
I mean I do the following 

mapping.findForward("failure");

And the page set up as the failure forward in the struts-config.xml file
is correctly shown.

toby

-Original Message-
From: Jeff Beal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 14, 2004 10:25 PM
To: [EMAIL PROTECTED]
Subject: Re: No ActionErrors from Action class


When you say 'redirected' do you mean 'redirected'?  If so, that's the 
problem.  Redirecting creates a new request, and the errors are saved in

the request scope, so they would be gone.

I don't see anything else that jumps out at me.

Toby Saville wrote:

> The browser is then correctly redirected to the error page, in which I

> print out the following:
> 
> <%
>   System.out.println( request.getAttribute(Action.ERROR_KEY) ); %>
> 
> Which prints "null"
> 
> What am I missing? Why arent my action class errors being displayed?
> 
> Thanks heaps for your help
> 
> toby
> 
**


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



***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of 
the Department of  Lands.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***


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



Render ActionMessages by a Action Class on a jsp

2004-10-14 Thread daniel weiss
Hi folks, 

i tried to implement render some actionmessages on a jsp by a action class
i found this tutorial at 
http://javaboutique.internet.com/tutorials/excep_struts/index-2.html

I thought, this it'll be the right way to do this, but my result was:

javax.servlet.ServletException: Cannot find bean msg in any scope

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

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)

org.apache.jsp.public_.registration.user_005fregister_jsp._jspService(user_005fregister_jsp.java:238)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

This should be occurec if the bean or object not saved in page, request or session 
scope.
Please have a look on the tutorial and tell me my mistakes 

Thx a lot
geramaya



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



struts validation and resource file

2004-10-14 Thread Ashish Kulkarni
Hi
Can i specify which message resource should be used to
get the text when performing validation?
I hit the follwoing problem

In my struts-configxml i have defined 2 resource files
like




and in my validation.xml file i have the following
validation 

  

where key approval.005 is from resource file
approvals, 
but struts is not able to get the replace the value
during validation, on screen i get error message as
"approval.006 is required"


Ashish




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



problem with element in struts-config.xml

2004-10-14 Thread Ashish Kulkarni
Hi
I am having problem with  element
I have 2 jsp, adminlogin.jsp is in folder pages and
index.jsp is in folder pages\admin
Here is how i have defined my action in
struts-config.xml file




Now the problem if i get error in AdminLoginAction it
tries to display adminlogin.jsp, but the relative path
gets messed up and i dont see any images, 
but if i declare it as

it works fine, but then i dont get error messages set
in action class.
So how do i work make it work
Ashish



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



Re: Sanity check: Struts 1.2.4/Tomcat config

2004-10-14 Thread Craig McClanahan
All you need to do is add a "welcome file" element in web.xml that
points the user at your login action:

  
welcome.do
  

This won't work in Tomcat 4, but does work in Tomcat 5.  (NOTE:  if
you're using Servlet 2.3 or earlier format for your web.xml file, the
order of the elements is defined in the DTD; for Servlet 2.4 or later
you can have them in any order).

Craig

On Thu, 14 Oct 2004 14:38:55 -0600, Kevin Clifton
<[EMAIL PROTECTED]> wrote:
> Hello all. I'm just looking for a quick sanity check before I go off
> to build some pieces
> 
> I'm building out a webapp that will use Struts with Tomcat 5.0.2x. I'm
> planning to run everything under Tomcat and avoid deploying Apache for
> handling static content.
> 
> I've prototyped a signup module for the app, and I'm experimenting
> with the behaviour of the module. Currently, the module is at a URL of
> localhost//signup, and the initial action is setup as
> "welcome.do". So to signup, a user would go to
> localhost/webapp/signup/welcome.do.
> 
> Testing this, I entered localhost/webapp/signup as a URL, and Tomcat
> came back with a directory listing. I can disable that in web.xml, but
> then that URL comes back as 404. I tried putting a file named
> index.jsp (which is set up as a welcome file in web.xml) in the
> directory, but I still got a directory listing.
> 
> What I'd like to do is have the incomplete URL automatically append
> the "welcome.do" and forward the user to the start of the signup
> module. Ideally, I'd set this up as a pattern for every module in the
> app.
> 
> I'm thinking the best way to do this is to extend
> org.apache.catalina.servlets.DefaultServlet to simply append
> "welcome.do" when the URL doesn't include an action, and then let
> Struts handle everything from there. But before I go do that, I want
> to make sure I'm not missing an easier alternative, either by changing
> my action mapping patterns or pulling some other Struts and/or Tomcat trick.
> 
> Any and all advice gratefully accepted!
> 
> Thanks,
> Kev
> 
> -
> 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: populating multiple action forms

2004-10-14 Thread Fedor Smirnoff
So you are saying I should use same properties between the two forms and
than copy from one to another? Is it better than just pulling variables from
request and putting them into the second form?

Thanks,
Fedor

-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 14, 2004 12:17 PM
To: Struts Users Mailing List
Subject: Re: populating multiple action forms

He he he, I just thought up a nasty hack to attempt this, though I
haven't tried it yet to see if it would work.  It involves a
BeanValidatorForm that wraps another BeanValidatorForm.  Calling
Niall, would this work?  =p
I wonder if I'll be able to find the time to do it tonight.

Sorry, Fedor, I'm hoping the above paragraph doesn't hijack your thread.

The short answer is, I don't think so.  Struts is designed to work
with the form you declare on the mapping, and the ActionForm is
supposed to represent an html , and you really only submit one
form at a time.  Why not use BeanUtils to copy between forms?  For
your special case, the add'l lines of code to do it shouldn't hurt too
much.

Hubert

On Thu, 14 Oct 2004 12:40:21 -0700, Fedor Smirnoff <[EMAIL PROTECTED]> wrote:
> Can I populate multiple action forms form one jsp file/ one action.
> I know I can access other forms with session and pull variables from
request
> to populate secondary action form, however, is there a better way to do
it?
> 
> Thanks
> Fedor
>

-
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: populating multiple action forms

2004-10-14 Thread Fedor Smirnoff
So you are saying I should use same properties between the two forms and
than copy from one to another? Is it better than just pulling variables from
request and putting them into the second form?

Thanks,
Fedor

-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 14, 2004 12:17 PM
To: Struts Users Mailing List
Subject: Re: populating multiple action forms

He he he, I just thought up a nasty hack to attempt this, though I
haven't tried it yet to see if it would work.  It involves a
BeanValidatorForm that wraps another BeanValidatorForm.  Calling
Niall, would this work?  =p
I wonder if I'll be able to find the time to do it tonight.

Sorry, Fedor, I'm hoping the above paragraph doesn't hijack your thread.

The short answer is, I don't think so.  Struts is designed to work
with the form you declare on the mapping, and the ActionForm is
supposed to represent an html , and you really only submit one
form at a time.  Why not use BeanUtils to copy between forms?  For
your special case, the add'l lines of code to do it shouldn't hurt too
much.

Hubert

On Thu, 14 Oct 2004 12:40:21 -0700, Fedor Smirnoff <[EMAIL PROTECTED]> wrote:
> Can I populate multiple action forms form one jsp file/ one action.
> I know I can access other forms with session and pull variables from
request
> to populate secondary action form, however, is there a better way to do
it?
> 
> Thanks
> Fedor
>

-
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: synchronizer token - double submit problem

2004-10-14 Thread umamaheswara rao
Hi,

   Good to get Response from you Mr. Craig McClanahan.
Please find the following problem I've ...

  I've followed the article mentioned in javaworld
(http://www.javaworld.com/javatips/jw-javatip136_p.html),
Since I have BaseActionClass which extends Action
class 

following are the Action classes  before modifing for
Synchronizer Token.

ShoppingAction extends BaseAction..
ProcessOrderAction  extends ShoppingAction 
CheckOutAction   extends ShoppingAction 

After modifying I've modified as per the article...

SynchroAction extends ShoppingAction

ProcessOrderAction(calling saveToken(request)) extends
SynchroAction

CheckOutAction(calling isValidToken(request)) extends
SychroAction


so that, even if the user double clicks to process the
order I should be handling the situation to not to
process two orders for a customer..

But, following are the values from the logs I
observed... 

Process Order Action :: Session Token is
::8121dcb84a3734bb5a4ee

CheckOutAction
Request : null
Session token: 3df5a196f87876ae863089039968f
Current token: null



So where did my Request token go ? any wrong in
implementation...I appreciate your valuable time ...

Best Regards,
Uma.

--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> Once you've called saveToken(), the  tag
> will automatically
> create a hidden field with a name that is known to
> the isTokenValid()
> and resetToken() methods -- you do not have to do
> anything at all in
> the JSP page for this to work.
> 
> Craig
> 
> 
> On Thu, 14 Oct 2004 11:30:28 -0700 (PDT),
> umamaheswara rao
> <[EMAIL PROTECTED]> wrote:
> > Hi ,
> > 
> >   Your help is apprciated.
> > 
> >How do I set a token it to JSP ? do I need to
> have
> > to set
> > the token to the form bean(form.setToken("value
> from
> > session with saveToken method")) in the action
> class
> > which calls saveToken(request) method ?
> > 
> > I understand the following process...but I got
> stuck
> > here with isTokenValid(request) method ...if at
> all I
> > need to set the token in hidden field what name
> should
> > I use...
> > 
> > saveToken(request)
> > on the return trip,
> > isTokenValid(request)
> > resetToken(request)
> > 
> > Thanks
> > Uma
> > 
> > ___
> > Do you Yahoo!?
> > Declare Yourself - Register online to vote today!
> > http://vote.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



Sanity check: Struts 1.2.4/Tomcat config

2004-10-14 Thread Kevin Clifton
Hello all. I'm just looking for a quick sanity check before I go off
to build some pieces

I'm building out a webapp that will use Struts with Tomcat 5.0.2x. I'm
planning to run everything under Tomcat and avoid deploying Apache for
handling static content.

I've prototyped a signup module for the app, and I'm experimenting
with the behaviour of the module. Currently, the module is at a URL of
localhost//signup, and the initial action is setup as
"welcome.do". So to signup, a user would go to
localhost/webapp/signup/welcome.do.

Testing this, I entered localhost/webapp/signup as a URL, and Tomcat
came back with a directory listing. I can disable that in web.xml, but
then that URL comes back as 404. I tried putting a file named
index.jsp (which is set up as a welcome file in web.xml) in the
directory, but I still got a directory listing.

What I'd like to do is have the incomplete URL automatically append
the "welcome.do" and forward the user to the start of the signup
module. Ideally, I'd set this up as a pattern for every module in the
app.

I'm thinking the best way to do this is to extend
org.apache.catalina.servlets.DefaultServlet to simply append
"welcome.do" when the URL doesn't include an action, and then let
Struts handle everything from there. But before I go do that, I want
to make sure I'm not missing an easier alternative, either by changing
my action mapping patterns or pulling some other Struts and/or Tomcat trick.

Any and all advice gratefully accepted!

Thanks,
Kev

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



problem with table of radio buttons on Unix

2004-10-14 Thread Shyam Anand
Hi,

I have a scenario where I have a table of radio
buttons for a set of questions (Yes/No) on a page. I'm
using indexed properties for the same.

Each question on my JSP is represented by an object
called YesNoQuestion, and my ActionForm uses an
ArrayList of YesNoQuestions called yesNoList. 

In my ActionForm I have:


 /**
* Access method for the yesNoList property.
* 
* @return   the current value of the yesNoList
property
*/
   public ArrayList getYesNoList() 
   {
  return yesNoList;
   }
   
   /**
* Sets the value of the yesNoList property.
* 
* @param aYesNoList the new value of the yesNoList
property
*/
   public void setYesNoList(ArrayList aYesNoList) 
   {  
  yesNoList = aYesNoList;   
   }


/**
* Access method for the yesNoList property.
* 
*/
   public YesNoQuestion getYesNoList(int index) 
   {
  return (YesNoQuestion)yesNoList.get(index);
   }


/**
* Sets the value of the yesNoList property.
* 
*/
   public void setYesNoList(int index,YesNoQuestion
yesNoQuestion) 
   {  
  yesNoList.set(index,yesNoQuestion);   
   }

--

In my JSP, I have:




   


   
 
Yes 
 
No
 
Abstain
   

http://mail.yahoo.com 

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



Re: and Problem

2004-10-14 Thread Hubert Rabago
Try "enctype":
http://struts.apache.org/userGuide/struts-html.html#form


On Thu, 14 Oct 2004 13:22:24 -0700 (PDT), Caroline Jen
<[EMAIL PROTECTED]> wrote:
> I have a form with a drop-down menu in it.  The
> drop-down menu is created using the  tag.
> 
> Everything displays well this way:
> 
>
>-Select-
> property="idAndName" labelProperty="name"/>
>
> 
> 
> But, if I add this attribute;
> ENCTYPE="multipart/form-data", in the  ...> tag like this:
> 
>  action="/content/AddFiles">
> 
> I get this runtime error in the browser:
> Attribute ENCTYPE invalid for tag form according to
> TLD'
> 
> If I use the  action="/content/AddFiles"> together with the
> , ,
>  tags, I do not get runtime error
> message; nonethess, the drop-down menu "cannot" be
> displayed.
> 
> What should I do?
>

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



and Problem

2004-10-14 Thread Caroline Jen
I have a form with a drop-down menu in it.  The
drop-down menu is created using the  tag.

Everything displays well this way:


-Select-




But, if I add this attribute;
ENCTYPE="multipart/form-data", in the  tag like this:
 


I get this runtime error in the browser:
Attribute ENCTYPE invalid for tag form according to
TLD'

If I use the  together with the
, ,
 tags, I do not get runtime error
message; nonethess, the drop-down menu "cannot" be
displayed.

What should I do?

 

__
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: ActionForm Does Not Pick Up the Value of Check Boxes

2004-10-14 Thread Hubert Rabago
I haven't tried this yet, but I do know that the Struts docs say you
need to use the multibox tag instead of the checkbox tag if you want
to use a string array.

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


On Thu, 14 Oct 2004 11:36:29 -0700 (PDT), Caroline Jen
<[EMAIL PROTECTED]> wrote:
> I have a web page that displays check boxes for user
> to make multiple selection:
> [code]
> 
> ..
> ..
> 
>  property="recipients[${status.index}].selected" />
> 
> 
>  property="recipients[${status.index}].emailAddress" />
> 
> 
> ..
> ..
> 
> [/code]
> 
> For testing purpose, I made 6 selections of e-mail
> addresses among all check boxes displayed, Those 6
> e-mail addresses are my friends'.
> 
> Then, the SelectRecipientForm.java extends the
> ActionForm class.  In the ActionForm class, the
> multiple selection of check boxes by users are
> supposed to populate a String Array.
> 
> However, the values of the selected check boxes are
> not picked up.  Here is the code of the
> SelectRecipientsForm.java:
> 
> import java.util.ArrayList;
> import java.util.HashMap;
> import java.util.Iterator;
> import java.util.List;
> import java.util.Map;
> import javax.servlet.http.HttpServletRequest;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionForm;
> 
> public class selectRecipientsForm extends ActionForm
> {
>// Map of RecipientField objects.
>private Map recipientFieldMap = new HashMap();
> 
>private String[] recipients = new String[0];
>private String[] selectedEmailAddresses;
> 
>public RecipientField getRecipients( int index )
>{
>   RecipientField recipientField = (
> RecipientField ) recipientFieldMap.get( new Integer(
> index ) );
>   if ( recipientField == null )
>   {
> recipientField = new RecipientField();
> recipientFieldMap.put( new Integer( index ),
> recipientField );
>   }
>   return recipientField;
>}
> 
>public String[] getSelectedEmailAddresses()
>{
>   List theEmailAddressList = new ArrayList();
> 
>   Iterator i =
> recipientFieldMap.values().iterator();
>   while( i.hasNext() )
>   {
>  RecipientField recipientField = (
> RecipientField ) i.next();
>  if ( recipientField.isSelected() )
>  {
> theEmailAddressList.add( "\"" +
> recipientField.getEmailAddress() + "\"" );
>  }
>   }
>   return ( String[] )theEmailAddressList.toArray(
> new String[theEmailAddressList.size()] );
>   }
> 
>   public void reset( ActionMapping mapping,
> HttpServletRequest request)
>   {
>   recipients = new String[0];
>   selectedEmailAddresses = new String[0];
>   }
> }
> 
> Of course, I have this RecipientField.java:
> 
> public class RecipientField
> {
>   private String emailAddress = "";
> 
>   public String getEmailAddress()
>   {
>  return emailAddress;
>   }
> 
>   public void setEmailAddress( String newValue )
>   {
>  emailAddress = newValue;
>   }
> 
>   private boolean selected = false;
> 
>   public boolean isSelected()
>   {
>  return selected;
>   }
> 
>   public void setSelected( boolean newValue )
>   {
>  selected = newValue;
>   }
> }
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
> 
> -
> 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: populating multiple action forms

2004-10-14 Thread Hubert Rabago
He he he, I just thought up a nasty hack to attempt this, though I
haven't tried it yet to see if it would work.  It involves a
BeanValidatorForm that wraps another BeanValidatorForm.  Calling
Niall, would this work?  =p
I wonder if I'll be able to find the time to do it tonight.

Sorry, Fedor, I'm hoping the above paragraph doesn't hijack your thread.

The short answer is, I don't think so.  Struts is designed to work
with the form you declare on the mapping, and the ActionForm is
supposed to represent an html , and you really only submit one
form at a time.  Why not use BeanUtils to copy between forms?  For
your special case, the add'l lines of code to do it shouldn't hurt too
much.

Hubert

On Thu, 14 Oct 2004 12:40:21 -0700, Fedor Smirnoff <[EMAIL PROTECTED]> wrote:
> Can I populate multiple action forms form one jsp file/ one action.
> I know I can access other forms with session and pull variables from request
> to populate secondary action form, however, is there a better way to do it?
> 
> Thanks
> Fedor
>

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



struts and caching

2004-10-14 Thread hicnar_struts_list
Hi, 

Are there any cache libraries that work with Struts (or any other
known and working techniques)??
In the app I'm working on I'd like to minimize the interaction with
database. I was thinking of using OSCache, but I'm affraid it
doesn't make sense, because interaction with the database takes
place in the struts action class which is obviously before the
answer page is rendered.

Thanx in advance for any suggestions.
Chris


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



populating multiple action forms

2004-10-14 Thread Fedor Smirnoff
Can I populate multiple action forms form one jsp file/ one action. 
I know I can access other forms with session and pull variables from request
to populate secondary action form, however, is there a better way to do it?


Thanks
Fedor




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



populating multiple action forms

2004-10-14 Thread Fedor Smirnoff
Can I populate multiple action forms form one jsp file/ one action. 
I know I can access other forms with session and pull variables from request
to populate secondary action form, however, is there a better way to do it?


Thanks
Fedor




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



Re: synchronizer token - double submit problem

2004-10-14 Thread Jeff Beal
The  tag inserts the token as a hidden field.
umamaheswara rao wrote:
Hi ,
  Your help is apprciated.
   How do I set a token it to JSP ? do I need to have 
to set
the token to the form bean(form.setToken("value from
session with saveToken method")) in the action class
which calls saveToken(request) method ?

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


Re: synchronizer token - double submit problem

2004-10-14 Thread Craig McClanahan
Once you've called saveToken(), the  tag will automatically
create a hidden field with a name that is known to the isTokenValid()
and resetToken() methods -- you do not have to do anything at all in
the JSP page for this to work.

Craig


On Thu, 14 Oct 2004 11:30:28 -0700 (PDT), umamaheswara rao
<[EMAIL PROTECTED]> wrote:
> Hi ,
> 
>   Your help is apprciated.
> 
>How do I set a token it to JSP ? do I need to have
> to set
> the token to the form bean(form.setToken("value from
> session with saveToken method")) in the action class
> which calls saveToken(request) method ?
> 
> I understand the following process...but I got stuck
> here with isTokenValid(request) method ...if at all I
> need to set the token in hidden field what name should
> I use...
> 
> saveToken(request)
> on the return trip,
> isTokenValid(request)
> resetToken(request)
> 
> Thanks
> Uma
> 
> ___
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: sending/maintaning a download link

2004-10-14 Thread Craig McClanahan
You should note that the standard struts-example webapp does exactly
this ... the "database" is represented as an XML file that is
initialzed in the init() method of a plugin, and finalized in the
destroy() method.

Craig


On Thu, 14 Oct 2004 09:43:36 -0700, Wiebe de Jong <[EMAIL PROTECTED]> wrote:
> If you don't have access to a database, then creating some kind of in-memory
> database and storing it in the servlet context is a good alternative. Use a
> Struts plugin for setup and cleanup of whatever you use.
> 
> One thing you will have to be careful of is using up all your memory. If you
> are storing token/timestamp/status for a large number of users, it will add
> up.
> 
> Wiebe
> 
> 
> 
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 8:23 PM
> To: Struts Users Mailing List
> Subject: Re: sending/maintaning a download link
> 
> It wouldnt survive a server restart, but this may well be acceptable if
> you dont expect the server to restart very often and your token expiry
> is only a day or two and its easy to get another token if needs be.
> 
> Im not sure what the deal is with stuff added to servlet context after
> startup in a clustered environment however. If your in a cluster you
> would need to check up on that in the docs as it may not be available to
> all servers in the cluster?
> 
> Richard wrote:
> 
> > Hi Wiebe,
> >
> > What if im not going to use any database? can I just store this in the
> > servlet context?
> >
> > Thanks
> > Richard
> >
> >
> > On Wed, 13 Oct 2004 10:12:38 -0700, Wiebe de Jong <[EMAIL PROTECTED]> wrote:
> >
> >>The only way to make a link go away is to make it dynamic. That means that
> >>the link you email will have to be to an action that returns the file.
> There
> >>have been quite a few threads recently on this mailing list about how to
> get
> >>actions to return files, including .pdf and .csv, so I won't cover that
> >>here.
> >>
> >>Here is a list of steps for how I would go about implementing this
> feature:
> >>
> >>1 - generate a unique token and store it in the database with a
> >>timestamp=now() and status=valid.
> >>2 - add this token to the url you send in the email:
> >>http://www.mycompany.com/myapp/download.do?token=123abc
> >>3 - when the user calls the action via the supplied url, the action checks
> >>the database to see if the token is still valid.
> >>4 - if token is valid, send the file, and then invalidate the token so it
> >>can't be used again. (status=used)
> >>5 - if token not valid, display a message to the user telling them that
> the
> >>link has either expired or already been used.
> >>6 - have a background process run periodically (1 per day, every hour,
> >>whatever) that checks the timestamps in the database and expires tokens if
> >>the timestamp is more than 24 hours old. (status=expired)
> >>
> >>The background process can be run via Quartz, which was also covered
> >>recently in this list.
> >>
> >>Wiebe de Jong
> >>
> >>
> >>
> >>-Original Message-
> >>From: Richard [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, October 13, 2004 2:14 AM
> >>To: Struts Users Mailing List
> >>Subject: sending/maintaning a download link
> >>
> >>hi guys,
> >>
> >>how do i do this in struts?
> >>
> >>i want to send a download link ( via email - resolved ) to a newly
> >>registered user and that download link will expire after 24hrs.
> >>
> >>is there and apache project for this?
> >>
> >>please help
> >>
> >>thanks in advance
> >>richard
> >>
> >>-
> >>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]
> 
>

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



ActionForm Does Not Pick Up the Value of Check Boxes

2004-10-14 Thread Caroline Jen
I have a web page that displays check boxes for user
to make multiple selection: 
[code]

..
..







..
..

[/code]

For testing purpose, I made 6 selections of e-mail
addresses among all check boxes displayed, Those 6
e-mail addresses are my friends'.

Then, the SelectRecipientForm.java extends the
ActionForm class.  In the ActionForm class, the
multiple selection of check boxes by users are
supposed to populate a String Array.

However, the values of the selected check boxes are
not picked up.  Here is the code of the
SelectRecipientsForm.java:

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

public class selectRecipientsForm extends ActionForm
{
// Map of RecipientField objects.
private Map recipientFieldMap = new HashMap();

private String[] recipients = new String[0];
private String[] selectedEmailAddresses;

public RecipientField getRecipients( int index )
{
   RecipientField recipientField = (
RecipientField ) recipientFieldMap.get( new Integer(
index ) );
   if ( recipientField == null )
   {
 recipientField = new RecipientField();
 recipientFieldMap.put( new Integer( index ),
recipientField );
   }
   return recipientField;
}

public String[] getSelectedEmailAddresses()
{
   List theEmailAddressList = new ArrayList();

   Iterator i =
recipientFieldMap.values().iterator();
   while( i.hasNext() )
   {
  RecipientField recipientField = (
RecipientField ) i.next();
  if ( recipientField.isSelected() )
  {
 theEmailAddressList.add( "\"" +
recipientField.getEmailAddress() + "\"" );
  }
   }
   return ( String[] )theEmailAddressList.toArray(
new String[theEmailAddressList.size()] );
   }

   public void reset( ActionMapping mapping,
HttpServletRequest request)
   {
   recipients = new String[0];
   selectedEmailAddresses = new String[0];
   }
} 

Of course, I have this RecipientField.java:

public class RecipientField
{
   private String emailAddress = "";

   public String getEmailAddress()
   {
  return emailAddress;
   }

   public void setEmailAddress( String newValue )
   {
  emailAddress = newValue;
   }

   private boolean selected = false;

   public boolean isSelected()
   {
  return selected;
   }

   public void setSelected( boolean newValue )
   {
  selected = newValue;
   }
}
 




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



synchronizer token - double submit problem

2004-10-14 Thread umamaheswara rao
Hi ,

  Your help is apprciated.

   How do I set a token it to JSP ? do I need to have 
to set
the token to the form bean(form.setToken("value from
session with saveToken method")) in the action class
which calls saveToken(request) method ?



I understand the following process...but I got stuck
here with isTokenValid(request) method ...if at all I
need to set the token in hidden field what name should
I use...

saveToken(request) 
on the return trip, 
isTokenValid(request) 
resetToken(request)

Thanks
Uma





___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



RE: Streaming an attachment from an Action not working with Internet Explorer

2004-10-14 Thread Moynihan, Edward
Hi,
   Thanks for the suggestions.  I've found that if I set the following, then the 
correct File Download dialog appears

 response.setHeader("Pragma", "");
 response.setHeader("Expires", "");

-Ed.


-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 9:30 AM
To: Struts Users Mailing List
Subject: Re: Streaming an attachment from an Action not working with
Internet Explorer


Ed
My experience is that the majority of Microsoft programs (IE) default to
saving contents to %USERPROFILE% folder
I would suggest using fully qualified pathname
%TOMCAT_HOME%\\webapps\\testDownload\\TextDownloadByOctectStreamWithoutForwa
rd.txt
(instead of relative path..)
Anyone else?
Martin-
- Original Message -
From: "Susan Bradeen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 8:56 AM
Subject: Re: Streaming an attachment from an Action not working with
Internet Explorer


> On Wed, 13 Oct 2004 13:12:23 -0400, Moynihan, Edward
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >Can anyone point me in the right direction with the following problem
that I am experiencing.
> >
> >I've written a very simple action that streams back to the client an
attachment.  So, here is a code snippet from the action to illustrate what I
am doing.  Assume that the URL to hit the action is /testDownloadAction.do
and I am using https instead of http.
> >
> > response.setContentType("application/octet-stream");
> > response.setHeader("Pragma", "no-cache");
> > response.setHeader("Expires", "-1");
> >
> > buf = new StringBuffer();
> >
buf.append("attachment;filename=").append("TextDownloadByOctectStreamWithout
Forward.txt");
> > response.setHeader("Content-Disposition", buf.toString());
> >
>
> I don't have reason to believe that StringBuffer is working here, but
> just in case have you tried something like:
>
> response.setHeader("Content-Disposition", "attachment; filename=\"" +
> "TextDownloadByOctectStreamWithoutForward.txt;" + "\"");
>
> or perhaps you are just missing some escaped quotes around your filename?
>
>
> > writer = response.getWriter();
> > writer.write("Sending down some text.  This is a text
download without a forward");
> > writer.flush();
> > writer.close();
> >
> > actionForward = null;
> >
> > When I use FireFox, I get a FileDownload dialog and I am allowed to save
the file of name "TextDownloadByOctectStreamWithoutForward.txt".
> > However, when I use IE 6.0 the FileDialog pops up and says that the file
name is "testDownloadAction.do".  If I try to hit Save, IE comes back with
an error.
> >
> > Does anyone have any resources to help me understand why this is not
working in IE?
> >
> > Thanks.
> >
> > -Ed.
> >
> > -
> > 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: sending/maintaning a download link

2004-10-14 Thread Wiebe de Jong
If you don't have access to a database, then creating some kind of in-memory
database and storing it in the servlet context is a good alternative. Use a
Struts plugin for setup and cleanup of whatever you use.

One thing you will have to be careful of is using up all your memory. If you
are storing token/timestamp/status for a large number of users, it will add
up.

Wiebe

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 13, 2004 8:23 PM
To: Struts Users Mailing List
Subject: Re: sending/maintaning a download link

It wouldnt survive a server restart, but this may well be acceptable if 
you dont expect the server to restart very often and your token expiry 
is only a day or two and its easy to get another token if needs be.

Im not sure what the deal is with stuff added to servlet context after 
startup in a clustered environment however. If your in a cluster you 
would need to check up on that in the docs as it may not be available to 
all servers in the cluster?

Richard wrote:

> Hi Wiebe,
> 
> What if im not going to use any database? can I just store this in the
> servlet context?
> 
> Thanks
> Richard
> 
> 
> On Wed, 13 Oct 2004 10:12:38 -0700, Wiebe de Jong <[EMAIL PROTECTED]> wrote:
> 
>>The only way to make a link go away is to make it dynamic. That means that
>>the link you email will have to be to an action that returns the file.
There
>>have been quite a few threads recently on this mailing list about how to
get
>>actions to return files, including .pdf and .csv, so I won't cover that
>>here.
>>
>>Here is a list of steps for how I would go about implementing this
feature:
>>
>>1 - generate a unique token and store it in the database with a
>>timestamp=now() and status=valid.
>>2 - add this token to the url you send in the email:
>>http://www.mycompany.com/myapp/download.do?token=123abc
>>3 - when the user calls the action via the supplied url, the action checks
>>the database to see if the token is still valid.
>>4 - if token is valid, send the file, and then invalidate the token so it
>>can't be used again. (status=used)
>>5 - if token not valid, display a message to the user telling them that
the
>>link has either expired or already been used.
>>6 - have a background process run periodically (1 per day, every hour,
>>whatever) that checks the timestamps in the database and expires tokens if
>>the timestamp is more than 24 hours old. (status=expired)
>>
>>The background process can be run via Quartz, which was also covered
>>recently in this list.
>>
>>Wiebe de Jong
>>
>>
>>
>>-Original Message-
>>From: Richard [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, October 13, 2004 2:14 AM
>>To: Struts Users Mailing List
>>Subject: sending/maintaning a download link
>>
>>hi guys,
>>
>>how do i do this in struts?
>>
>>i want to send a download link ( via email - resolved ) to a newly
>>registered user and that download link will expire after 24hrs.
>>
>>is there and apache project for this?
>>
>>please help
>>
>>thanks in advance
>>richard
>>
>>-
>>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: An Eclipse Like WebApp Framework? -- a proposal

2004-10-14 Thread Michael McGrady
Looks like looking at what is being done with chain 
would be the first thing.  I have a question and a
comment.  If you don't have time for the qeustion, 
I certainly will understand.


QUESTION: Component drag and drop?

Is the drag and drop for apps using
the chaing of responsibility framework or for 
alternative coding of the framework parts themselves? 
I.e. is this like dropping a war into Tomcat or
like dynamically updating a class without restarting
the client of the class?


COMMENT

I understand entirely on the committers already being
on their own path at this point in time.  I am sure the
product will be cool.  I have always believed criticism
is more useful and usually more honest than praise, 
but I am well aware of the considerable accomplishments
of this and other Apache teams.  Apache is somewhat of
a minor miracle.

Michael McGrady
On Wed, 06 Oct 2004 08:26:20 -0700, Michael McGrady wrote:
PROPOSAL/SUGGESTION
If you were interested, we might try doing this as a Struts Branch,
maybe calling it "Branch" or "Struts Branch", with a really up-to-
date modular structure along the lines indicated in Stuart Dabbs
Halloway's "Component Development for the Java Program", keeping
only a real kernel as the base.  We could pop it up on SourceForge.
 I bet we could even recruit The Halloway Himself, even though he
has gone elsewhere for the majority of his time right now.  I don't
think this presently exists.  I do think that it would "sell" like
wildfire to users.  This would allow the user, in effect, to become
automatic developers through their plugins and extensions.  This
would build a framework without ego in the core.
If you come up with some actual code to commit, consisder setting up shop at Struts SourceForge. 

We'll be bringing Struts Control Flow and Struts Scripting over soon, so they will some vacancies :) 

Incidentally, the Chain of Responsibility, which is the core of the upcoming Struts 1.3 request processor, does support drag-and-drop components. You can build a JAR so that Chain will automatically plug it into the catalog. 

One reason Struts Committers aren't "chaffing at the bit" to explore other proposals is that many of the things people mention would already be supported by Struts chain. We think Chain is going to scratch most of our itches, and so we don't feel the need to shop. 

Getting a 1.2.x stable release was a long time coming, but now we can finally get back to business. 

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

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


Re: Validator not validating v. 1.2.4 - solved

2004-10-14 Thread Jin Bal
It was an old version of validator-rules.xml
thanks for the help
Jin
- Original Message - 
From: "Hollaway, Shedrick CIV (TRFKB C600)" 
<[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 5:06 PM
Subject: RE: Validator not validating v. 1.2.4


Is this the complete form bean?
the form bean looks like:
public class PasswordReminderForm extends ValidatorActionForm {
public PasswordReminderForm() {
}
private String emailAddress;
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
}
all input is appreciated
TIA
Jin

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

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


RE: Validator not validating v. 1.2.4

2004-10-14 Thread Hollaway, Shedrick CIV (TRFKB C600)
Is this the complete form bean?
> the form bean looks like:
> 
> public class PasswordReminderForm extends ValidatorActionForm {
> public PasswordReminderForm() {
> }
> private String emailAddress;
> public String getEmailAddress() {
> return emailAddress;
> }
> public void setEmailAddress(String emailAddress) {
> this.emailAddress = emailAddress;
> }
> }
> 
> all input is appreciated
> 
> TIA
> Jin
> 
> 

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



Re: How to read MessageResources.

2004-10-14 Thread Alan Pocklington
Bill, 

Thanks for the pointer.  I have already downloaded the source and have 
extended Struts successfully many times.  The MessageResources thing was 
something I couldn't quite get my head around, so I figured I'd ask the 
experts.  Now I have the code, it didn't seem so complicated after all.

Cheers,

Alan.

Bill Siggelkow <[EMAIL PROTECTED]> wrote in news:ckjkjn$nqs$1
@sea.gmane.org:

> Alan  -- I strongly encourage you (if you haven't already) to download 
> the Struts source and use it as you develop.  You will be amazed at how 
> much quicker you can grok Struts.
> 
> -Bill Siggelkow
> 
> Alan Pocklington wrote:
> 
>> Oh okay, I'll look into that.  Thanks for your help.
>> 
>> Hubert Rabago <[EMAIL PROTECTED]> wrote in
>> news:[EMAIL PROTECTED]: 
>> 
>> 
>>>Struts has some special treatment for locales.  You'd wanna abide by
>>>that for consistency with what its internal engine uses for the
>>>resource files.
>>>
>>>
>>>On Wed, 13 Oct 2004 15:54:02 + (UTC), Alan Pocklington
>>><[EMAIL PROTECTED]> wrote:
>>>
Cheers for pointing that out.  As of yet I don't need message
arguments so that'll be fine.

Was there any reason for having a getLocale(request) method? I'm
guessing the implementation was different from just
request.getLocale(). 


Hubert Rabago <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:




>On Wed, 13 Oct 2004 10:38:09 -0500, Hubert Rabago
><[EMAIL PROTECTED]> wrote:
>
>>Yup, copy/paste from existing code works fast.  :)
>
>It's also not foolproof.  This excerpt was specific to the needs of
>the class I took it from.  Check the getMessage() method -- it can
>actually accept message arguments, but the evaluateMessage()
>doesn't use them.  If you do need them, just modify
>evaluateMessage() to also accept an argument parameter.
>Sorry about that.
>
>
>>On Wed, 13 Oct 2004 15:35:24 + (UTC), Alan Pocklington
>><[EMAIL PROTECTED]> wrote:
>>
>>>Wow, thanks for the quick reply. Will do!
>>
>>
>>>Hubert Rabago <[EMAIL PROTECTED]> wrote in
>>>news:[EMAIL PROTECTED]:
>>>
>>>
>>>
>>>
Put this in a util class and call evaluateMessage():

/**
 * Evaluate the given message resource key.
 *
 * @param messageKey the name of the resource entry to
 retrieve * @param bundle The key specified in the
 *   element for the
 *  resource bundle to use
 * @param request the request being processed
 * @param servletContext the current [EMAIL PROTECTED]
 ServletContext} * @return the value of paramName from the
 message resources */
public String evaluateMessage(
String messageKey,
String bundle,
HttpServletRequest request,
ServletContext servletContext) {
// get the message resources
MessageResources resources;
if (bundle != null) {
resources = getResources(bundle, request,
servletContext);
} else {
resources = getResources(request);
}
// evaluate the message
String messageString = getMessage(messageKey, null,
request,
resources);

// add it to the redirect parameters
if ((messageString != null) && (messageString.length()
> 0)) {
return messageString;
}
return null;
}


/**
 * Look for the ActionMessage in the provided
 MessageResources. *
 * @param messageKey the key to look for
 * @param args the arguments to be used in evaluating the
 message * @param request the request being processed
 * @param resources the application's message resources
 * @return the message formed from the given ActionMessage
 */
protected String getMessage(String messageKey,
Object[] args,
HttpServletRequest request,
MessageResources resources) {
if (messageKey == null) {
//log.warn("Call to getMessage() with a null
messageKey."); return null;
}

String result = null;
try {
// first, get the locale from the request
Locale userLocale = getLocale(request);

// then, get the message
if (args == null) {
result = (resource

Re: FieldChecks change signature and no longer returns value

2004-10-14 Thread Mick Wever
> Gentoo now has the latest version.
You're responsible for the ebuild? Thanks!
But doesn't build:

>>> Source unpacked.
Buildfile: build.xml does not exist!
Build failed

Mick.
-- 
--- "The reward of patience is patience." St. Augustine

http://www.harryspractice.com.au>Harry's Practice
--- 



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



RE: Problem with struts validator../ Struts 1.2

2004-10-14 Thread Marco Mistroni
Hello,
Thanx... actually after finding it out, I needed anyway
To update my validation files..
It turned out that I had to replace validation-rules.xml with the one
that
Comes with struts-examples 1.2, as well as change the dtd in
validation.xml file...

Thanx anyway and regards
marco

-Original Message-
From: Hollaway, Shedrick CIV (TRFKB C600)
[mailto:[EMAIL PROTECTED] 
Sent: 14 October 2004 15:13
To: 'Struts Users Mailing List'
Subject: RE: Problem with struts validator../ Struts 1.2

Marco, 
 is missing.

> my validation.xml Is as follows..
> 
> 
>   
>  
> 
> key="error.field.required"/>
>
>
> 
>  
> 
> 
>

-
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: Navigation and forms submit

2004-10-14 Thread fzlists
Can you smiply have all the forms named the same thing (say, "theForm"), and then on 
your links, do:

onClick="theForm.submit();"

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

On Thu, October 14, 2004 10:59 am, Karsten Krieg said:
> Hi!
> 
> I've a navigation bar on the left side of my application which consists
> mostly of  tags with an action named /navigateMenu, which
> performs the task of passing  the control to the target action, depending
> on the index.
> 
>   
> 
>   
> 
> Our application design now requires that the actual form is to be
> submitted
> when the user clicks on one of these links. Any idea how to do this?
> 
> onclick=submit does not seem like a good idea, since each page has an
> individual form. The navigateMenuAction doesn't now anything about the
> actual form bean (class, attributes etc).
> 
> 
> Thanks alot
> Karsten Krieg
> intarsys consulting GmbH
> 
> Fon +49 (0)721 3 84 79 - 28
> Fax +49 (0)721 3 84 79 - 60
> e-mail [EMAIL PROTECTED]
> http://www.intarsys.de
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Re: Cannot call more than once!

2004-10-14 Thread Mick Wever
On Thu, 14 Oct 2004 07:17:34 -0400, Kris Schneider wrote:

> It's got nothing to do with JSTL and everything to do with your Struts
> action. The Struts controller effectively performs the forward with the
> result of your action's execute method. Yes,  can work perfectly
> well when used multiple times in a page. For URLs that are within the same
> context (same app), the semantics are pretty much the same as
> RequestDispatcher.include.

Delving deeper into the JSTL defintion for c:import it does mentioned that
if the url is relative and within the same context then the
RequestProcessor.include is used, and the entire environment is available.

There is a simple solution. In the c:import specify an absolute URL.
So the code below works just fine:

<%@ taglib uri="c.tld" prefix="c" %>


http://myServer/myContext/myAction.do?number=${number}"/>




Mick.

ps Thanks for your explanation and reference to RequestProcessor.include, without 
this I would not have found the small print ;=)


-- 
--- "Great spirits have always encountered violent opposition from mediocre 
minds." 
Albert Einstein

http://www.harryspractice.com.au>Harry's Practice
--- 



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



RE: Problem with struts validator../ Struts 1.2

2004-10-14 Thread Hollaway, Shedrick CIV (TRFKB C600)
Marco, 
 is missing.

> my validation.xml Is as follows..
> 
> 
>   
>  
> 
> key="error.field.required"/>
>
>
> 
>  
> 
> 
>

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



OT: RiA/Soa - was OT Re: Back Button Woes!!!!

2004-10-14 Thread Vic Cekvenich
Rick Reumann wrote:
Vic Cekvenich wrote the following on 10/11/2004 7:34 PM:
"Walk toward the light"
http://theserverside.com/articles/article.tss?l=RiA

Vic, I briefly read over the article. 
I was hoping people would do the 3 pages of code to check out, or 
download it. It's for programing more than reading.

I agree that we'll see more and
more rich clients, 
Oh, yeah!
but one of the problems is people aren't going to
want to always install stuff on their desktop in order to run an 
application
Yes, if somone coded it, you'd realize that people don't have to do 
that. JNLP and netx, etc.  make it just as easy. We both have the same 
clients, and I am aware of those issues.

 - so I wouldn't go so far as to say HTML will be "dead."
Of course, existing projects need to be maintained. But new projects 
that take 6 months to develop and one would operate for 3 years to get 
ROI. I suggest that a year from now you want to say that you have 12 
monhts of RiA/SoA experience. HTML is a 10 year old technology, and all 
technolgies have early adopteros and late adaptors. In '93, 1% of 
internet traffic was http, people could not belive that it would take over.
No need to learn new HTML skill I think, like bying a portelt book, you 
won't get use out it.

Flash is nice because it runs almost seemlessly within the browser since 
the plugin is so easy to install. 
Yes, Flash runs in a borwser. What if JDNC let you bypass the browser. 
The thing about disruptive techologies is that no one sees them coming.
Like FM radio, all the big borcasters could not belive it.

I'm not convinced, yet, that something
like Java Desktop will be that ubiquitous that it will replace the likes 
of the browser as a client.
Some RiA will end up dominating. Candiates include Flash, XAML, JDNC, 
XUL, Visual Basic, 

I see advantages of JDNC, so please consider witing a hello world.
My predction: Within 6 months there will be tutorial on your site of how 
to do "RiA".

;-)
.V



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


Re: Using JSTL 1.1 with Struts 1.2.4 and JBoss 3.2.5 or 4.0?

2004-10-14 Thread Satish Talim
Karr I did as per your explanation. This is the result:

if you look at my success.jsp page, I had to use core_rt in the uri to get
the output. If I use just core in the uri, I get an error as:
"According to TLD or attribute directive in tag file, attribute value does
not accept any expressions"


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

  
jauth Application
  
  
The User Entering the application is : 
  


Why do I need to use core_rt and not core. I think core_rt is for JSTL 1.0
and
not 1.1 ?

Any ideas?

- Original Message -
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 7:03 PM
Subject: RE: Using JSTL 1.1 with Struts 1.2.4 and JBoss 3.2.5 or 4.0?


> -Original Message-
> From: Satish Talim [mailto:[EMAIL PROTECTED]
>
> However, I am still unclear. Karr mentioned "The features
> provided by Struts-EL are all natively provided in the
> container. " - so how does this JBoss container evaluate
>  jar file? Any ideas?

Sorry, I was unclear. What JSP 2.0 provides is native evaluation of EL
expressions (and many other things).  It does not directly provide the
JSTL.  So, if you want to use the EL with Struts in a JSP 2.0 container,
just use Struts, not Struts-EL.  You'll be able to use the EL in Struts
tag attributes.  If you want to also use the JSTL in this environment,
use the JSTL 1.1.  Just put "jstl.jar" and "standard.jar" in
WEB-INF/lib, and use the "taglib" directive in your JSP pages.  You
don't need to extract the TLD files, and you don't need to specify the
taglib in your web.xml.

> - Original Message -
> From: "Rick Reumann" <[EMAIL PROTECTED]>
>
> A much more important question is why are you doing this db
> stuff in your JSP!
>
> Satish Talim wrote the following on 10/13/2004 2:00 AM:
> > I am using JBoss 4.0 (which I believe is a Servlet 2.4 / JSP 2.0
> container) and Struts 1.2.4.
> >
> > I want to use JSTL 1.1 with Struts and JBoss. For example, I would
> > like to
> use something like this:
> >
> > <%@ taglib prefix="c"
> uri="http://java.sun.com/jsp/jstl/core"; %> <%@
> > taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"; %> <%@
> > taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %> ..
> > 
> >   
> > 
> >   INSERT INTO Employee
> > (UserName, Password, FirstName, LastName, Dept,
> >   EmpDate, EmailAddr, ModDate)
> > VALUES(?, ?, ?, ?, ?, ?, ?, ?)
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >   
> >   
> > 
> >   UPDATE Employee
> > SET Password = ?,
> > FirstName = ?,
> > LastName = ?,
> > Dept = ?,
> > EmpDate = ?,
> > EmailAddr = ?,
> > ModDate = ?
> > WHERE UserName = ?
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >   
> > 
>
>
>
> --
> Rick
>
> -
> 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]



Navigation and forms submit

2004-10-14 Thread Karsten Krieg
Hi!

I've a navigation bar on the left side of my application which consists
mostly of  tags with an action named /navigateMenu, which
performs the task of passing  the control to the target action, depending
on the index.

  

  

Our application design now requires that the actual form is to be submitted
when the user clicks on one of these links. Any idea how to do this?

onclick=submit does not seem like a good idea, since each page has an
individual form. The navigateMenuAction doesn't now anything about the
actual form bean (class, attributes etc).


Thanks alot
Karsten Krieg
intarsys consulting GmbH

Fon +49 (0)721 3 84 79 - 28
Fax +49 (0)721 3 84 79 - 60
e-mail [EMAIL PROTECTED]
http://www.intarsys.de




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



Re: Validator not validating v. 1.2.4

2004-10-14 Thread Jin Bal
Thanks for your reply:
the "/" is that hte form name matche the path attribute in the struts config 
and follows the example in the docs.

thanks
Jin

Should your formname start with a "/" ?
Lee
On Thu, 14 Oct 2004 13:35:54 +0100, Jin Bal <[EMAIL PROTECTED]> wrote:
Hi Guys
My validator config seems to be incorrect somewhere but I'm stumped as to 
what it is.  The symptoms are that the validator succeeds in all 
validations no matter what i enter (or don't enter) in the form I am 
using an extension of ValidatorActionForm to use the path attribute in 
the struts-config

Here are my config snippets- can anybody see a config error?
struts conf:

  


plugin:
  

  

validation.xml







   

the form bean looks like:
public class PasswordReminderForm extends ValidatorActionForm {
public PasswordReminderForm() {
}
private String emailAddress;
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
}
all input is appreciated
TIA
Jin

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

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


Re: Using JSTL 1.1 with Struts 1.2.4 and JBoss 3.2.5 or 4.0?

2004-10-14 Thread Satish Talim
Rick, well if you look at myjsppage.jsp, I had to use core_rt in the uri. If
I use just core in the uri, I get an error as:
"According to TLD or attribute directive in tag file, attribute value does
not accept any expressions"


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

  
jauth Application
  
  
The User Entering the application is : 
  


Why do I need to use core_rt and not core. I think core_rt is for JSTL 1 and
not 1.1 ?

Any ideas?


- Original Message -
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 8:17 AM
Subject: Re: Using JSTL 1.1 with Struts 1.2.4 and JBoss 3.2.5 or 4.0?


Satish Talim wrote the following on 10/13/2004 9:39 PM:
> Rick, I ain't doing this db stuff in my jsp - I know it's bad practice; I
> had just put some code here that was there in some jsp test application
that
> did not use Struts.

I figured:) I was just being a dork by opening my mouth:)

> However, I am still unclear. Karr mentioned "The features provided by
> Struts-EL are all natively provided in the container. " - so how does this
> JBoss container evaluate  required jar file? Any ideas?

The latest container uses Tomcat 5 which is JSP2.0 compliant so all that
  el stuff you'd need c:out for is built in.

--
Rick

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



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



Re: Validator not validating v. 1.2.4

2004-10-14 Thread Lee Harrington
Should your formname start with a "/" ?

Lee


On Thu, 14 Oct 2004 13:35:54 +0100, Jin Bal <[EMAIL PROTECTED]> wrote:
> Hi Guys
> 
> My validator config seems to be incorrect somewhere but I'm stumped as to what it 
> is.  The symptoms are that the validator succeeds in all validations no matter what 
> i enter (or don't enter) in the form I am using an extension of ValidatorActionForm 
> to use the path attribute in the struts-config
> 
> Here are my config snippets- can anybody see a config error?
> 
> struts conf:
> 
>  path="/PasswordReminder" scope="request" 
>   
> type="com.buyacar.actions.ForgottenPasswordAction" validate="true" >
>/>
> 
> 
> plugin:
> 
>   
>  value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
>   
> 
> validation.xml
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> the form bean looks like:
> 
> public class PasswordReminderForm extends ValidatorActionForm {
> public PasswordReminderForm() {
> }
> private String emailAddress;
> public String getEmailAddress() {
> return emailAddress;
> }
> public void setEmailAddress(String emailAddress) {
> this.emailAddress = emailAddress;
> }
> }
> 
> all input is appreciated
> 
> TIA
> Jin
> 
>

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



RE: Using JSTL 1.1 with Struts 1.2.4 and JBoss 3.2.5 or 4.0?

2004-10-14 Thread Karr, David
> -Original Message-
> From: Satish Talim [mailto:[EMAIL PROTECTED] 
> 
> However, I am still unclear. Karr mentioned "The features 
> provided by Struts-EL are all natively provided in the 
> container. " - so how does this JBoss container evaluate 
>  jar file? Any ideas?

Sorry, I was unclear. What JSP 2.0 provides is native evaluation of EL
expressions (and many other things).  It does not directly provide the
JSTL.  So, if you want to use the EL with Struts in a JSP 2.0 container,
just use Struts, not Struts-EL.  You'll be able to use the EL in Struts
tag attributes.  If you want to also use the JSTL in this environment,
use the JSTL 1.1.  Just put "jstl.jar" and "standard.jar" in
WEB-INF/lib, and use the "taglib" directive in your JSP pages.  You
don't need to extract the TLD files, and you don't need to specify the
taglib in your web.xml.

> - Original Message -
> From: "Rick Reumann" <[EMAIL PROTECTED]>
> 
> A much more important question is why are you doing this db 
> stuff in your JSP!
> 
> Satish Talim wrote the following on 10/13/2004 2:00 AM:
> > I am using JBoss 4.0 (which I believe is a Servlet 2.4 / JSP 2.0
> container) and Struts 1.2.4.
> >
> > I want to use JSTL 1.1 with Struts and JBoss. For example, I would 
> > like to
> use something like this:
> >
> > <%@ taglib prefix="c" 
> uri="http://java.sun.com/jsp/jstl/core"; %> <%@ 
> > taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"; %> <%@ 
> > taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %> ..
> > 
> >   
> > 
> >   INSERT INTO Employee
> > (UserName, Password, FirstName, LastName, Dept,
> >   EmpDate, EmailAddr, ModDate)
> > VALUES(?, ?, ?, ?, ?, ?, ?, ?)
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >   
> >   
> > 
> >   UPDATE Employee
> > SET Password = ?,
> > FirstName = ?,
> > LastName = ?,
> > Dept = ?,
> > EmpDate = ?,
> > EmailAddr = ?,
> > ModDate = ?
> > WHERE UserName = ?
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >   
> > 
> 
> 
> 
> --
> Rick
> 
> -
> 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: Streaming an attachment from an Action not working with Internet Explorer

2004-10-14 Thread Martin Gainty
Ed
My experience is that the majority of Microsoft programs (IE) default to
saving contents to %USERPROFILE% folder
I would suggest using fully qualified pathname
%TOMCAT_HOME%\\webapps\\testDownload\\TextDownloadByOctectStreamWithoutForwa
rd.txt
(instead of relative path..)
Anyone else?
Martin-
- Original Message -
From: "Susan Bradeen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 8:56 AM
Subject: Re: Streaming an attachment from an Action not working with
Internet Explorer


> On Wed, 13 Oct 2004 13:12:23 -0400, Moynihan, Edward
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >Can anyone point me in the right direction with the following problem
that I am experiencing.
> >
> >I've written a very simple action that streams back to the client an
attachment.  So, here is a code snippet from the action to illustrate what I
am doing.  Assume that the URL to hit the action is /testDownloadAction.do
and I am using https instead of http.
> >
> > response.setContentType("application/octet-stream");
> > response.setHeader("Pragma", "no-cache");
> > response.setHeader("Expires", "-1");
> >
> > buf = new StringBuffer();
> >
buf.append("attachment;filename=").append("TextDownloadByOctectStreamWithout
Forward.txt");
> > response.setHeader("Content-Disposition", buf.toString());
> >
>
> I don't have reason to believe that StringBuffer is working here, but
> just in case have you tried something like:
>
> response.setHeader("Content-Disposition", "attachment; filename=\"" +
> "TextDownloadByOctectStreamWithoutForward.txt;" + "\"");
>
> or perhaps you are just missing some escaped quotes around your filename?
>
>
> > writer = response.getWriter();
> > writer.write("Sending down some text.  This is a text
download without a forward");
> > writer.flush();
> > writer.close();
> >
> > actionForward = null;
> >
> > When I use FireFox, I get a FileDownload dialog and I am allowed to save
the file of name "TextDownloadByOctectStreamWithoutForward.txt".
> > However, when I use IE 6.0 the FileDialog pops up and says that the file
name is "testDownloadAction.do".  If I try to hit Save, IE comes back with
an error.
> >
> > Does anyone have any resources to help me understand why this is not
working in IE?
> >
> > Thanks.
> >
> > -Ed.
> >
> > -
> > 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: An Eclipse Like WebApp Framework? -- a proposal

2004-10-14 Thread Ted Husted
On Wed, 06 Oct 2004 08:26:20 -0700, Michael McGrady wrote:
> PROPOSAL/SUGGESTION
>
>
> If you were interested, we might try doing this as a Struts Branch,
> maybe calling it "Branch" or "Struts Branch", with a really up-to-
> date modular structure along the lines indicated in Stuart Dabbs
> Halloway's "Component Development for the Java Program", keeping
> only a real kernel as the base.  We could pop it up on SourceForge.
>  I bet we could even recruit The Halloway Himself, even though he
> has gone elsewhere for the majority of his time right now.  I don't
> think this presently exists.  I do think that it would "sell" like
> wildfire to users.  This would allow the user, in effect, to become
> automatic developers through their plugins and extensions.  This
> would build a framework without ego in the core.

If you come up with some actual code to commit, consisder setting up shop at Struts 
SourceForge.

We'll be bringing Struts Control Flow and Struts Scripting over soon, so they will 
some vacancies :)

Incidentally, the Chain of Responsibility, which is the core of the upcoming Struts 
1.3 request processor, does support drag-and-drop components. You can build a JAR so 
that Chain will automatically plug it into the catalog.

One reason Struts Committers aren't "chaffing at the bit" to explore other proposals 
is that many of the things people mention would already be supported by Struts chain. 
We think Chain is going to scratch most of our itches, and so we don't feel the need 
to shop.

Getting a 1.2.x stable release was a long time coming, but now we can finally get back 
to business.

-Ted.


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



Re: Streaming an attachment from an Action not working with Internet Explorer

2004-10-14 Thread Susan Bradeen
On Wed, 13 Oct 2004 13:12:23 -0400, Moynihan, Edward
<[EMAIL PROTECTED]> wrote:
> Hi,
>Can anyone point me in the right direction with the following problem that I am 
> experiencing.
> 
>I've written a very simple action that streams back to the client an attachment.  
> So, here is a code snippet from the action to illustrate what I am doing.  Assume 
> that the URL to hit the action is /testDownloadAction.do and I am using https 
> instead of http.
> 
> response.setContentType("application/octet-stream");
> response.setHeader("Pragma", "no-cache");
> response.setHeader("Expires", "-1");
> 
> buf = new StringBuffer();
> 
> buf.append("attachment;filename=").append("TextDownloadByOctectStreamWithoutForward.txt");
> response.setHeader("Content-Disposition", buf.toString());
>

I don't have reason to believe that StringBuffer is working here, but
just in case have you tried something like:

response.setHeader("Content-Disposition", "attachment; filename=\"" + 
"TextDownloadByOctectStreamWithoutForward.txt;" + "\"");

or perhaps you are just missing some escaped quotes around your filename? 

 
> writer = response.getWriter();
> writer.write("Sending down some text.  This is a text download without a 
> forward");
> writer.flush();
> writer.close();
> 
> actionForward = null;
> 
> When I use FireFox, I get a FileDownload dialog and I am allowed to save the file of 
> name "TextDownloadByOctectStreamWithoutForward.txt".
> However, when I use IE 6.0 the FileDialog pops up and says that the file name is 
> "testDownloadAction.do".  If I try to hit Save, IE comes back with an error.
> 
> Does anyone have any resources to help me understand why this is not working in IE?
> 
> Thanks.
> 
> -Ed.
> 
> -
> 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]



Validator not validating v. 1.2.4

2004-10-14 Thread Jin Bal
Hi Guys

My validator config seems to be incorrect somewhere but I'm stumped as to what it is.  
The symptoms are that the validator succeeds in all validations no matter what i enter 
(or don't enter) in the form I am using an extension of ValidatorActionForm to use the 
path attribute in the struts-config

Here are my config snippets- can anybody see a config error?

struts conf:


  


plugin:

  

  

validation.xml







   



the form bean looks like:

public class PasswordReminderForm extends ValidatorActionForm {
public PasswordReminderForm() {
}
private String emailAddress;
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
}

all input is appreciated

TIA
Jin



Re: The old 'please wait' issue

2004-10-14 Thread Jeff Beal
I had something worked up on a former project that allowed me to add 
extra header information on a page-by-page basis to Tiles.  I don't have 
access to the source code any more, but it looked something like this:

Tiles definition file:

 
  
  
  
  
 
 
  
  
 

I don't think that I used the extra.head.content parameter in exactly 
this way and I haven't used Tiles in a while, but you may be able to get 
something put together this way.

-- Jeff
andy wix wrote:
The problem is that I am using Tiles and so cannot have (as far as I 
know) a meta-refresh tag as this should go in the head of the document.  
Likewise I can't use on-load javascipt as I don't have a body tag.

Thanks,
Andy

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


Re: No ActionErrors from Action class

2004-10-14 Thread Jeff Beal
When you say 'redirected' do you mean 'redirected'?  If so, that's the 
problem.  Redirecting creates a new request, and the errors are saved in 
the request scope, so they would be gone.

I don't see anything else that jumps out at me.
Toby Saville wrote:
The browser is then correctly redirected to the error page, in which I
print out the following:
<%
  System.out.println( request.getAttribute(Action.ERROR_KEY) );
%>
Which prints "null"
What am I missing? Why arent my action class errors being displayed?
Thanks heaps for your help
toby
**
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cannot call more than once!

2004-10-14 Thread Mick Wever
> It's got nothing to do with JSTL and everything to do with your Struts
> action. The Struts controller effectively performs the forward with the
> result of your action's execute method. Yes,  can work perfectly
> well when used multiple times in a page. For URLs that are within the same
> context (same app), the semantics are pretty much the same as
> RequestDispatcher.include.

This is awkward. Is there no way that the Struts could avoid committing
the response when it is called from the import tag.
Simply avoiding the commit, or cloning the response so the original
response is not altered?
Mick



-- 
--- "The turtle only makes progress when it's neck is stuck out" Rollo May

http://www.harryspractice.com.au>Harry's Practice
--- 



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



Re: Cannot call more than once!

2004-10-14 Thread Kris Schneider
It's got nothing to do with JSTL and everything to do with your Struts action.
The Struts controller effectively performs the forward with the result of your
action's execute method. Yes,  can work perfectly well when used
multiple times in a page. For URLs that are within the same context (same app),
the semantics are pretty much the same as RequestDispatcher.include.

Quoting Mick Wever <[EMAIL PROTECTED]>:

> On Wed, 13 Oct 2004 13:59:32 -0400, Kris Schneider wrote:
> 
> > I'm not sure he actually intended to do multiple forwards, it seems like
> > he just wanted to reuse an action to generate some common output. The
> > fact that Struts is performing an implicit forward in response to each
> > of those imports can be easy to overlook.
> 
> 
> Well bugger.
> I would go so far as to say that struts is not honouring the contract of
> c:import. Nowhere (that I can find, and please quickly point it out if you
> can) in the JSTL documentation can I find spec or definition that c:import
> 'forwards'. It is clearly stated that it imports a URL and never mentions
> forwarding.
> Taking this further, examples in Sun's 'core JSTL' book actually use
> multiple c:import's! So there is the clear indication that the import does
> not forward, and struts is breaking this contract...
> 
> Should I enter a bug?
> 
> Mick.
> 
> 
> -- 
> --- "Everything you can imagine is real." Pablo Picasso
> 
> http://www.harryspractice.com.au>Harry's Practice
> --- 

-- 
Kris Schneider 
D.O.Tech   

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



Re: Cannot call more than once!

2004-10-14 Thread Mick Wever
On Wed, 13 Oct 2004 13:59:32 -0400, Kris Schneider wrote:

> I'm not sure he actually intended to do multiple forwards, it seems like
> he just wanted to reuse an action to generate some common output. The
> fact that Struts is performing an implicit forward in response to each
> of those imports can be easy to overlook.


Well bugger.
I would go so far as to say that struts is not honouring the contract of
c:import. Nowhere (that I can find, and please quickly point it out if you
can) in the JSTL documentation can I find spec or definition that c:import
'forwards'. It is clearly stated that it imports a URL and never mentions
forwarding.
Taking this further, examples in Sun's 'core JSTL' book actually use
multiple c:import's! So there is the clear indication that the import does
not forward, and struts is breaking this contract...

Should I enter a bug?

Mick.


-- 
--- "Everything you can imagine is real." Pablo Picasso

http://www.harryspractice.com.au>Harry's Practice
--- 



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



Re: The old 'please wait' issue

2004-10-14 Thread Lionel
andy wix wrote:

> The problem is that I am using Tiles and so cannot have (as far as I
> know) a meta-refresh tag as this should go in the head of the
> document.  Likewise I can't use on-load javascipt as I don't have a
> body tag.

response.setHeader("Refresh", "...");




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



Re: Passing non-simple Bean to tiles context?

2004-10-14 Thread David Farrell
using 

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


Passing non-simple Bean to tiles context?

2004-10-14 Thread David Farrell
Hi,
I'm attempting to use Tiles at present.
My layout page looks like this:
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>

the page that uses that layout has a bit like this:

   
   
   
   
   


the tile itself (as specificed in /text_template.jsp) looks like this
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
   
   
   
   
   
   

the 'loopModule thing is something I put in the request from an Action.  
In the page that 'calls' everything loops round my module vector and 
each iteration of the loop is called loopModule.

I want the tile to render the form based on loopModule's parameters.
It doesn't work as it stands because the loopModule bean is not in the 
context available to the tile - because the logic:iterate tag puts the 
'loopModule' into the page context, not the request or session.

How do I pass the individula loopModule into the tiles context so that 
the form on the other side can manipulate it?

David

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


RE: i18n and  

2004-10-14 Thread Hiran.Chaudhuri
Hi, Andrew.

I'm not a CSS crack, but perhaps use google with "white-space:nowrap" to get further.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED] 
> Sent: Donnerstag, 14. Oktober 2004 09:57
> To: Struts Users Mailing List
> Subject: Re: i18n and  
> 
> 
> a user with bad eyes may choose to use bigger fonts 
> 
> I have perfect eyesight but Ive been making a lot of use of 
> firefox's font resizing abilities lately since my work PC got 
> upgraded to one that can handle 1600 * 1200 resolution... 
> (great for working in eclipse, bad for reading long pages in 
> browsers...(especially at 60hz) )
> 
> Im wondering is there any kind of css style a designer can 
> apply to a tag to force it not to wrap? (I know there is for 
> table cells but Im not sure for the general case...)
> 
> [EMAIL PROTECTED] wrote:
> 
> > Hi, Joe.
> > 
> > I'd rather not add any non breaking spaces to the messages. 
> You don't know how long a message might become (typically 
> each language needs another amount of words to express the 
> same, and english is pretty short compared to others). The 
> problem you actually have is a layout problem, and it should 
> be dealt with in the UI.
> > 
> > So you better leave that problem to your HTML designer, who 
> may choose 
> > to
> > - make a layout that allows long messages
> > - hack all the JSPs
> > - delegate the problem to the browser that tries to word 
> wrap everything so it fits on the user's screen.
> > 
> > I prefer the last one, since a user with bad eyes may 
> choose to use bigger fonts and accepts to read more lines of 
> text. Personally I use such features when I present some web 
> application on a beamer
> > 
> > Hiran
> > 
> > -
> > Hiran Chaudhuri
> > SAG Systemhaus GmbH
> > Elsenheimer Straße 11
> > 80867 München
> > Phone +49-89-54 74 21 34
> > Fax   +49-89-54 74 21 99
> > 
> > 
> >  
> > 
> > 
> >>-Original Message-
> >>From: Joe Hertz [mailto:[EMAIL PROTECTED]
> >>Sent: Mittwoch, 13. Oktober 2004 23:12
> >>To: 'Struts Users Mailing List'
> >>Subject: i18n and  
> >>
> >>I have a number of property values that will be 
> internationalized and 
> >>need non-breaking spaces between each word in them.
> >>
> >>I could put   into each space, but that
> >>
> >>1) is going to confuse my native language translators who 
> know nothing 
> >>of HTML. 2 words in english could be 3 in language-x).
> >>
> >>2) would be wrong.
> >>
> >>There doesn't appear to be any built in method of handling 
> this with 
> >>bean:message or anything else, so I'm about to write a custom 
> >>configuration class for a separate Message Resource Bundle 
> that will 
> >>contain the properties where I want spaces displayed as " "'s
> >>
> >>I have a hard time believing no one else has run into 
> this...so I ask 
> >>the
> >>following:
> >>
> >>Do I need to do this? Is there a way of doing it without writing a 
> >>custom handler? or a better way of doing it? And if not, 
> who wants to 
> >>see the code when it's done? :-)
> >>
> >>-Joe
> >>
> >>
> >>
> >>
> -
> >>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: i18n and  

2004-10-14 Thread Andrew Hill

a user with bad eyes may choose to use bigger fonts

I have perfect eyesight but Ive been making a lot of use of firefox's 
font resizing abilities lately since my work PC got upgraded to one that 
can handle 1600 * 1200 resolution... (great for working in eclipse, bad 
for reading long pages in browsers...(especially at 60hz) )

Im wondering is there any kind of css style a designer can apply to a 
tag to force it not to wrap? (I know there is for table cells but Im not 
sure for the general case...)

[EMAIL PROTECTED] wrote:
Hi, Joe.
I'd rather not add any non breaking spaces to the messages. You don't know how long a 
message might become (typically each language needs another amount of words to express 
the same, and english is pretty short compared to others). The problem you actually 
have is a layout problem, and it should be dealt with in the UI.
So you better leave that problem to your HTML designer, who may choose to
- make a layout that allows long messages
- hack all the JSPs
- delegate the problem to the browser that tries to word wrap everything so it fits on 
the user's screen.
I prefer the last one, since a user with bad eyes may choose to use bigger fonts and 
accepts to read more lines of text. Personally I use such features when I present some 
web application on a beamer
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99
 


-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 13. Oktober 2004 23:12
To: 'Struts Users Mailing List'
Subject: i18n and  

I have a number of property values that will be 
internationalized and need non-breaking spaces between each 
word in them.

I could put   into each space, but that
1) is going to confuse my native language translators who 
know nothing of HTML. 2 words in english could be 3 in language-x).

2) would be wrong.
There doesn't appear to be any built in method of handling 
this with bean:message or anything else, so I'm about to 
write a custom configuration class for a separate Message 
Resource Bundle that will contain the properties where I want 
spaces displayed as " "'s

I have a hard time believing no one else has run into 
this...so I ask the
following:

Do I need to do this? Is there a way of doing it without 
writing a custom handler? or a better way of doing it? And if 
not, who wants to see the code when it's done? :-)

-Joe

-
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: Where Is the Best Place To Store Files?

2004-10-14 Thread McCormack, Chris
Why not have have your httpd serve the static content and leave the application to be 
handled by your app server (if you have this configuration).

This is what the httpd was designed for :) 
This gives you the independence of leaving your static content to reside on a disk 
server (or seperate box etc) and the application code to live inside the app server 
which can be deployed to without effecting the static content.

Chris McCormack

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 14 October 2004 09:49
To: [EMAIL PROTECTED]
Subject: RE: Where Is the Best Place To Store Files?


Hi, guys.

Calm down a bit. The original question never said that these files need to be uploaded 
by the client, or did I miss that bit?
All I know is there are readonly files that need to be served via HTTP without access 
restriction and are already there at deployment time so a database is not the option 
to store them. And the superior said a database is not the option to store them.

If it's just static content, the answer has already been given: place it anywhere 
inside the webapp but outside WEB-INF.
The rest is speculation.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

> -Original Message-
> From: Michael McGrady [mailto:[EMAIL PROTECTED] 
> Sent: Mittwoch, 13. Oktober 2004 21:42
> To: Struts Users Mailing List
> Subject: Re: Where Is the Best Place To Store Files?
> 
> Durham David R Jr Contr 805 CSPTS/SCE wrote:
> 
> >I personally opt to store uploaded files outside of the web-app's 
> >file-system altogether.  This has to do with how easy it is 
> to serve up 
> >content with Java (and other languages, I'm sure) and the need to 
> >physically separate the application's persistent data from the 
> >application code.  This has to do with deployment and backup 
> processes, 
> >though.
> >
> >
> >- Dave
> >
> 
> There is a lot of sense in doing this, as well. 
> 
> 
> I don't do it and opt for inside WEB-INF because of business 
> reasons having to do with operating system independence that 
> are special requirements.  This might be your most sensible 
> option.  I am fairly clear in my mind that, if you have gone 
> far enough to use a framework like Struts, that you don't 
> want to expose any resources outside your control.  Others, 
> maybe Dave, would disagree, and maybe they are right.
> 
> Michael McGrady
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



RE: i18n and  

2004-10-14 Thread Hiran.Chaudhuri
Hi, Joe.

I'd rather not add any non breaking spaces to the messages. You don't know how long a 
message might become (typically each language needs another amount of words to express 
the same, and english is pretty short compared to others). The problem you actually 
have is a layout problem, and it should be dealt with in the UI.

So you better leave that problem to your HTML designer, who may choose to
- make a layout that allows long messages
- hack all the JSPs
- delegate the problem to the browser that tries to word wrap everything so it fits on 
the user's screen.

I prefer the last one, since a user with bad eyes may choose to use bigger fonts and 
accepts to read more lines of text. Personally I use such features when I present some 
web application on a beamer

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED] 
> Sent: Mittwoch, 13. Oktober 2004 23:12
> To: 'Struts Users Mailing List'
> Subject: i18n and  
> 
> I have a number of property values that will be 
> internationalized and need non-breaking spaces between each 
> word in them.
> 
> I could put   into each space, but that
> 
> 1) is going to confuse my native language translators who 
> know nothing of HTML. 2 words in english could be 3 in language-x).
> 
> 2) would be wrong.
> 
> There doesn't appear to be any built in method of handling 
> this with bean:message or anything else, so I'm about to 
> write a custom configuration class for a separate Message 
> Resource Bundle that will contain the properties where I want 
> spaces displayed as " "'s
> 
> I have a hard time believing no one else has run into 
> this...so I ask the
> following:
> 
> Do I need to do this? Is there a way of doing it without 
> writing a custom handler? or a better way of doing it? And if 
> not, who wants to see the code when it's done? :-)
> 
> -Joe
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Where Is the Best Place To Store Files?

2004-10-14 Thread Hiran.Chaudhuri
Hi, guys.

Calm down a bit. The original question never said that these files need to be uploaded 
by the client, or did I miss that bit?
All I know is there are readonly files that need to be served via HTTP without access 
restriction and are already there at deployment time so a database is not the option 
to store them. And the superior said a database is not the option to store them.

If it's just static content, the answer has already been given: place it anywhere 
inside the webapp but outside WEB-INF.
The rest is speculation.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

> -Original Message-
> From: Michael McGrady [mailto:[EMAIL PROTECTED] 
> Sent: Mittwoch, 13. Oktober 2004 21:42
> To: Struts Users Mailing List
> Subject: Re: Where Is the Best Place To Store Files?
> 
> Durham David R Jr Contr 805 CSPTS/SCE wrote:
> 
> >I personally opt to store uploaded files outside of the web-app's 
> >file-system altogether.  This has to do with how easy it is 
> to serve up 
> >content with Java (and other languages, I'm sure) and the need to 
> >physically separate the application's persistent data from the 
> >application code.  This has to do with deployment and backup 
> processes, 
> >though.
> >
> >
> >- Dave
> >
> 
> There is a lot of sense in doing this, as well. 
> 
> 
> I don't do it and opt for inside WEB-INF because of business 
> reasons having to do with operating system independence that 
> are special requirements.  This might be your most sensible 
> option.  I am fairly clear in my mind that, if you have gone 
> far enough to use a framework like Struts, that you don't 
> want to expose any resources outside your control.  Others, 
> maybe Dave, would disagree, and maybe they are right.
> 
> Michael McGrady
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Where Is the Best Place To Store Files?

2004-10-14 Thread Hiran.Chaudhuri
Hi, Carline.

You answered the question already. As a database is out of the question, and the files 
must be downloadable (no database, no WEB-INF subdirectory) you need the filesystem, 
preferrable inside your webapp but outside of WEB-INF. Just pick a directory.

If your superior does not agree, then ask him where else to store the files.
Or pick /dev/null. (sorry, read too much of BOFH...)

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Mittwoch, 13. Oktober 2004 19:29
> To: Struts Users Mailing List
> Subject: RE: Where Is the Best Place To Store Files?
> 
> The files are supposed to be read-only and downloadable.
> 
> If I store files in the WEB-INF folder, then, the folder 
> won't be an accessible directory from html pages. I have to 
> read the content via streams and send it to the browser. That 
> would be too much overhead. 
> 
> I am already told by my superior "do not save those files 
> into the database".
> 
> What should I do?
> --- Ivan Vasquez <[EMAIL PROTECTED]> wrote:
> 
> > Unless the tomcat server(s) has fileserver capabilities, you can 
> > create an NFS mount to a fileserver share and have your code create 
> > Files there.
> > 
> > Better yet (IMO), store them in the database as BLOBs so 
> all your data 
> > lives at a single location. The decision depends on what 
> use is given 
> > to those files (are they likely to be modified? ready only? etc)
> > 
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 13, 2004 11:30 AM
> > To: [EMAIL PROTECTED]
> > Subject: Where Is the Best Place To Store Files?
> > 
> > I am using the Struts to build a web application.  I am 
> going to store 
> > some files (the files can be .doc, .txt, .pdf, .jpg, 
> whatever) on the 
> > server; e.g.
> > somewhere in my web application.
> > 
> > Where is the proper and best place to store files? 
> > $TOMCAT\webapps\MyApplication\
> > 
> > Thanks for suggestions.
> > 
> > 
> > 
> > ___
> > Do you Yahoo!?
> > Declare Yourself - Register online to vote today!
> > http://vote.yahoo.com
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>   
> ___
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



AW: Validator: Using "<" and ">" in a mask

2004-10-14 Thread Niebert, Tanja
It works! Great, thanks a lot

Tanja

-Ursprungliche Nachricht-
Von: Arnaud Vandyck [mailto:[EMAIL PROTECTED] Im Auftrag von Arnaud Vandyck
Gesendet: Donnerstag, 14. Oktober 2004 10:18
An: Struts Users Mailing List
Betreff: Re: Validator: Using "<" and ">" in a mask


Thu, 14 Oct 2004 08:13:21 +0200, 
"Niebert, Tanja" <[EMAIL PROTECTED]> wrote: 

> Hi,
>
> I want to create a mask validation where I allow alphanumeric 
> characters plus the "<" and ">" signs. Using "\<" and "\>" doesn't 
> work. I get an exception saying, that the XML-File is not well formed.
>
> This is how my expression looks like:
>
> 
>  mask
>  ^[0-9a-zA-Z\<\>]*$

This is not valide xml, maybe you can try:

 ^[0-9a-zA-Z<>]*$

> 
>
> Thanks for your help

Hope this will help, I did not test it.

-- 
Arnaud Vandyck
http://fosdem.org/
Free and Open Source Developers' European Meeting
February 26-27 2005,
Bruxelles, Belgium

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

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



Re: Validator: Using "<" and ">" in a mask

2004-10-14 Thread Arnaud Vandyck
Thu, 14 Oct 2004 08:13:21 +0200, 
"Niebert, Tanja" <[EMAIL PROTECTED]> wrote: 

> Hi,
>
> I want to create a mask validation where I allow alphanumeric
> characters plus the "<" and ">" signs. Using "\<" and "\>" doesn't
> work. I get an exception saying, that the XML-File is not well formed.
>
> This is how my expression looks like:
>
> 
>  mask
>  ^[0-9a-zA-Z\<\>]*$

This is not valide xml, maybe you can try:

 ^[0-9a-zA-Z<>]*$

> 
>
> Thanks for your help

Hope this will help, I did not test it.

-- 
Arnaud Vandyck
http://fosdem.org/
Free and Open Source Developers' European Meeting
February 26-27 2005,
Bruxelles, Belgium

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



Re: Arzttermin

2004-10-14 Thread Christoph Kutzinski
Markus Heck wrote:
Hallo Andreas,
ich hab um 9:50 Uhr einen Arzttermin; ich meld mich dann noch mal
und sag Bescheid, wann und ob ich heute noch komme.
Zu MAP:
Dein Programm hab ich gestern noch getestet (mit einer Schleife über
alle Sätze aus vip_products), ich hab noch eine Änderung eingebaut,
dann war's korrekt. Programm steht unter h:\orawork\map\stringpattern3.sql
zu Excel-Reports:
Da hab ich gestern das mit dem Password gemacht, hab das aber nur einmal
kurz in der Entwicklung getestet. Da stehen die aktuellen Sourcen unter
h:\work\java\article\reports\src...\servlet (3 neue Servlets). Falls Ihr
eine Übergabe machen müßt.
für Stefan zu Kostenlieferanten (hab weder Telefonnummer noch Emailadresse):
Die Patche, ich meine *9320 und *9360 stehen im Project-Verzeichnis und
sind bis auf die Änderungen vom Torsten vollständig. Die müssen nur in
PVCS eingecheckt werden und können hochgeschickt werden.
Damit Du noch an meine Sachen rankommst, mein Password (alles
kleingeschrieben):
Stadt, wo ich letzte Woche war mit angehängter vierstelliger Jahreszahl.
LOL
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]