FW: URGENTLY NEEDED

2004-03-24 Thread Indra Gunawan
Dear all, 

 

BaliCamp is a private software development company situated in German
Centre, Bumi Serpong Damai, Tangerang. Our vision is to become a global
community that delivers software of international standards. Due to the fast
growing of our development and expanding of our market, we are looking for a
highly qualified person to share our passion for excellence. We offer the
position of:

 

J2EE PROGRAMMER

 

Requirements:
* Fluent in English (both oral  written)
* Having more than 2 years experience in developing Java application
* Have in depth knowledge of OOP  Development Cycle
* Have in depth knowledge of Java and internet based software development
project
* Have in depth knowledge of EJB
* SCJP or SCJD is preferable

Employment remarks:
1. Selected candidates will be assigned to work in Client's site Jakarta.
2. Length of employment: 10 months
3. Opportunity to extend the employment period will be given to selected
candidates, depends on his/her performance and project needs. 



If you fell qualified, please send your full resume to
mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] and state your current and
expected salary.

Only selected candidates will be invited for further process.

 



RE: Difference between ValidatorForm and ValidatorActionForm

2004-03-24 Thread Janarthan Sathiamurthy
Hi,

ValidatorActionForm -
This class extends ValidatorForm and provides basic field validation based on an XML 
file. The key passed into the validator is the action element's 'path' attribute from 
the struts-config.xml which should match the form element's name attribute in the 
validation.xml.

ValidatorForm - 
This class extends ActionForm and provides basic field validation based on an XML 
file. The key passed into the validator is the action element's 'name' attribute from 
the struts-config.xml which should match the form element's name attribute in the 
validation.xml.
 

See the BOLD words and you will get the difference...

Best Regards,

Janarthan S

-Original Message-
From: Joao Batistella [ mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 3:41 PM
To: 'Struts Users Mailing List'
Subject: Difference between ValidatorForm and ValidatorActionForm


Hello!

I would like to know the difference between ValidatorForm and
ValidatorActionForm. I read the API documentation but the descriptions are
the same.

When should I use each one?

Thanks,
JP




Re: Retrieve a Variable From the DynaActionForm

2004-03-24 Thread Pedro Salgado
On 24/03/2004 06:07, Caroline Jen [EMAIL PROTECTED] wrote:

 In my Struts application, postForm is of the
 DynaActionForm type:
 DynaActionForm postForm = ( DynaActionForm )form;
 
 Later on, I want to save one of the fields receiver,
 which is a String, in the request context. Which is
 the following is the correct syntax?
 
 request.setAttribute( Receiver, postForm.get(
 receiver) );
 
 Or
 
 request.setAttribute( Receiver, ( String
 )postForm.get( receiver) );


  I think they are equivalent.

  Later, if you use request.getAttribute(Receiver); (getAttribute always
returns an object) you would still need to cast to String, if you wanted to
do something with the object.

  If you just want to print you just need to use c:out
value='${request.Receiver}'/ in any of the cases described above.


Pedro Salgado
 
 
 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



Difference between ValidatorForm and ValidatorActionForm

2004-03-24 Thread Joao Batistella
Hello!

I would like to know the difference between ValidatorForm and
ValidatorActionForm. I read the API documentation but the descriptions are
the same.

When should I use each one?

Thanks,
JP


Re: html:messages jstl equivalent

2004-03-24 Thread Pedro Salgado
On 23/03/2004 23:39, Joe Germuska [EMAIL PROTECTED] wrote:

 At 12:06 PM + 3/23/04, Pedro Salgado wrote:
 html:messages id=error
 
  ...
 
 /html:messages
 
   Does anyone know how do I fill the ${???} to have a JSTL equivalent for
 the previous html tag?
 
   c:forEach items='${???}' var='error'
 
...
 
   /c:forEach
 
 The keys are defined in org.apache.struts.Globals:
 
 
 org.apache.struts.Globals.ERROR_KEY = org.apache.struts.action.ERROR
 org.apache.struts.Globals. MESSAGE_KEY  =
 org.apache.struts.action.ACTION_MESSAGE
 
 
 Until recently, the messages were always stored in request scope, so
 
 ${requestScope['org.apache.struts.action.ERROR']}
 

  This was what I was looking for :)

 In recent nightly builds, the ability to store the messages in the
 session instead was added.

  If something changes in the future (it seems like so) then it would only
need a test to check if the messages were on the session or request scope.
Please correct me if I am wrong.

 
 I'm not sure I believe that this is a case where using the JSTL is
 better than using the Struts tags.  It seems to me that leaving the
 coordination inside Struts classes is the way to go.  Also, there is
 no JSTL solution as clean as using the property attribute of
 html:messages to filter to only include messages associated with a
 specific property.
 
 I'm all for people using the JSTL wherever its better, but I'm not
 sure its better here...
 

  You're right but it is easier for someone to start playing with JSTL
(specially if you had experience in JSP), learn the basics and start
producing code and, in parallel, making a step-by-step understanding of how
Struts works. In a team, I think this will work better (at least I hope so).

  To learn Struts tags right away it requires a double effort: understanding
Struts and taglibs (I have seen this happen and it didn't turn out very
well).

  Thank you for your help,

Pedro Salgado


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



Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread James Scrimshire
Currently I have an Action that does the following

 if (isCancelled(request)) {
log.debug(Request Cancelled);
return mapping.findForward(home);
}

ActionErrors errors = new ActionErrors();
if (!isTokenValid(request)) {
log.debug(Invalid Token  );
errors.add(
ActionErrors.GLOBAL_ERROR,
new ActionError(errors.token));
}
else
{
  log.debug(token success);
}
resetToken(request);

if (!errors.isEmpty()) {
saveErrors(request, errors);
saveToken(request);
return (mapping.getInputForward());
}

// Forward to result page
return mapping.findForward(success);

My problem is the pattern doesn't work unless i save the token in a
previous action using the saveToken(rquest) method..
but what about if I want to go from this action to a page to another
action? this action only saves the token on a resubmit. and reset it if it
is the first occurence. so if i want to do the
action-page-action-page-action how do i go abuot saving the token??  how
should it get saved the first time?

does any one even understand waht i'm saying.. cos i'm not sure i do
anymore








For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



Re: Struts Validator

2004-03-24 Thread Niall Pemberton
Whats missing from your question is how are you identifying which client a
user belongs to?

Niall

- Original Message - 
From: Matthew Clark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 12:09 PM
Subject: Struts Validator


Hi there,

I am new to Struts and this mailing list but by no means new to Java.  I
have been reading the Struts in Action book and taken a quick look at
the API etc and have a simple question regarding the Validator in my
environment.

We are an Application Service Provider and serve well over 1000 clients
(who in turn each have between 5 and 1000 end users using the system).
Although each client uses the same core application, they can have very
different views of data and input forms and may have very different
validation requirements.

Is it possible to specify validation config at runtime when using the
struts validator?  So each of our clients could have a configuration
file that specified which validation XML file to use for a given input
form?  We could use a different form for each user but that would be
inefficient and a maintenance nightmare.. I want to call the same
form/servlet but have it display a different look  feel and have
different validation rules client side and server side.  At the moment,
the validation is very much tied to the presentation layer and I want to
decouple it.

This is really the last obstacle standing in the way of our migration to
a pure java solution using Struts..  The use of the validator would
simplify our solution a great deal and I will also be looking into the
possibility of our clients creating their own validation configuration
files (using a web interface of some sort)

any help or advice would be appreciated.

Regards,

Matthew



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



EL Tag Libraries

2004-03-24 Thread Pat Quinn
Hi Guys,

I have an action form with a get method (i.e. getValue(String)) which takes 
a string value, its working fine when i render the data in a text field.

E.g.

c:set var=uniqueKey
c:out value=${CustomerTO.id}/-c:out value=${CustomerTO.orderNo}/
/c:set
html-el:text name=myForm property=value(${uniqueKey})/



Now i want to render the data as a label on screen i've tried using the 
C:out/ tag lib but i cant get it to work

e.g.

c:out value=${myForm.value(${uniqueKey})}/

and c:out value=${myForm.value(uniqueKey)}/

Any ideas how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


RE: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread Takhar, Sandeep
I'm not sure if I understand fully, but if you are using html:link there is a 
transaction attribute.

sandeep

-Original Message-
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 5:41 AM
To: [EMAIL PROTECTED]
Subject: Sycnhronizer Token- can someone explain this?Curre


Currently I have an Action that does the following

 if (isCancelled(request)) {
log.debug(Request Cancelled);
return mapping.findForward(home);
}

ActionErrors errors = new ActionErrors();
if (!isTokenValid(request)) {
log.debug(Invalid Token  );
errors.add(
ActionErrors.GLOBAL_ERROR,
new ActionError(errors.token));
}
else
{
  log.debug(token success);
}
resetToken(request);

if (!errors.isEmpty()) {
saveErrors(request, errors);
saveToken(request);
return (mapping.getInputForward());
}

// Forward to result page
return mapping.findForward(success);

My problem is the pattern doesn't work unless i save the token in a
previous action using the saveToken(rquest) method..
but what about if I want to go from this action to a page to another
action? this action only saves the token on a resubmit. and reset it if it
is the first occurence. so if i want to do the
action-page-action-page-action how do i go abuot saving the token??  how
should it get saved the first time?

does any one even understand waht i'm saying.. cos i'm not sure i do
anymore








For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
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: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread Janarthan Sathiamurthy
Sandeep,

What is this transaction attribute ? Please elaborate..
Regards,
Janarthan S

-Original Message-
From: Takhar, Sandeep [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 5:47 PM
To: Struts Users Mailing List
Subject: RE: Sycnhronizer Token- can someone explain this?Curre


I'm not sure if I understand fully, but if you are using html:link there is a 
transaction attribute.

sandeep

-Original Message-
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 5:41 AM
To: [EMAIL PROTECTED]
Subject: Sycnhronizer Token- can someone explain this?Curre


Currently I have an Action that does the following

 if (isCancelled(request)) {
log.debug(Request Cancelled);
return mapping.findForward(home);
}

ActionErrors errors = new ActionErrors();
if (!isTokenValid(request)) {
log.debug(Invalid Token  );
errors.add(
ActionErrors.GLOBAL_ERROR,
new ActionError(errors.token));
}
else
{
  log.debug(token success);
}
resetToken(request);

if (!errors.isEmpty()) {
saveErrors(request, errors);
saveToken(request);
return (mapping.getInputForward());
}

// Forward to result page
return mapping.findForward(success);

My problem is the pattern doesn't work unless i save the token in a
previous action using the saveToken(rquest) method..
but what about if I want to go from this action to a page to another
action? this action only saves the token on a resubmit. and reset it if it
is the first occurence. so if i want to do the
action-page-action-page-action how do i go abuot saving the token??  how
should it get saved the first time?

does any one even understand waht i'm saying.. cos i'm not sure i do
anymore








For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
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: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread James Scrimshire

i have tried transaction=true from the html link but it doesn't appear
to work unless i have called saveToken(requset)




For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



html:javascript question

2004-03-24 Thread Daniel
I want to put the msg inside a javasript alert (popup with error message ),some one 
know how can I make it ???

font color=red

html:messages id=msg message=true bundle=geral

bean:write name=msg /br

/html:messages

/font



Validator and Resourcebundles and modules

2004-03-24 Thread hermod . opstvedt
Hi

Is there a way of telling the Validator which Resourcebundle it should
get its resources from? I have multi-module Strut application, each
module has its own Resourcebundle (ApplicationResources-moda.poperties,
ApplicationResources-modb.poperties etc). I have not been able to figure
out how to make it read from the various bundles. It insists on looking
in the default (ApplicationResources.poperties).

Hermod


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



AW: html:javascript question

2004-03-24 Thread Andreas Solarik
Well, I believe that you are not allowed to mix static and dynamic text
within a JSP, so something like

alert(Error message: bean:write name=msg/);

should fail. I read once that enclosing the dynamic text in single quotes
whould work (never tried it though). One solution that I do know is:

snip
%
  String tempString=Error message:  + whateverBean.getWhatever();
%

alert(%= tempString %);
/snip

Its ugly, but it works. Anyone know of a more elegant solution? Note that
you need to get to the data contained in the bean you are writing from,
possibly with a request.getAtribute(attributeName);

Good luck,

Andreas


-Ursprüngliche Nachricht-
Von: Daniel [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 24. März 2004 13:53
An: Struts Users Mailing List
Betreff: html:javascript question


I want to put the msg inside a javasript alert (popup with error
message ),some one know how can I make it ???

font color=red

html:messages id=msg message=true bundle=geral

bean:write name=msg /br

/html:messages

/font



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



Automatically detecting struts-config changes and reload app.

2004-03-24 Thread Antony Paul
Is it possible to automatically detect changes in struts-config.xml and
reload the application ?. I know that Log4J(or Tomcat) detects changes to
log4j.properties and reload the application.

Antony Paul

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



RE: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread James Scrimshire

i have the transaction attribute

i check to see if the token is Valid..  this method says the token is not
valid






For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



Re: Automatically detecting struts-config changes and reload app.

2004-03-24 Thread Geeta Ramani
Hey Antony:

Check out the struts admin functionality: Make sure you have the admin
mappings in your struts-config.xml, then point your browser to
/yourContext/admin/reload.do and you'll see the magic..:)

Regards,
Geeta

Antony Paul wrote:

 Is it possible to automatically detect changes in struts-config.xml and
 reload the application ?. I know that Log4J(or Tomcat) detects changes to
 log4j.properties and reload the application.

 Antony Paul

 -
 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: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread James Scrimshire

sandeep.

using transaction=true..  this is what i get from the action the link
submits too

as you can see the session token is null, and only gets set when i
explicitly call saveToken(request) from a prior action


2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Request
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Session
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,089 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Invalid
Token




For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



RE: EL Tag Libraries

2004-03-24 Thread Pady Srinivasan

Why not use c:out value=${uniqueKey} / instead of
c:out value=${myForm.value(${uniqueKey})} / ???


This works for me:

c:set var=testVar value=Hello  /
c:set var=testVar1 value=World /
c:set var=hello
c:out value=${testVar} /-c:out value=${testVar1} /
/c:set
c:out value=${hello} /



Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 7:11 AM
To: [EMAIL PROTECTED]
Subject: EL Tag Libraries

Hi Guys,

I have an action form with a get method (i.e. getValue(String)) which takes 
a string value, its working fine when i render the data in a text field.

E.g.

c:set var=uniqueKey
c:out value=${CustomerTO.id}/-c:out
value=${CustomerTO.orderNo}/
/c:set


html-el:text name=myForm property=value(${uniqueKey})/



Now i want to render the data as a label on screen i've tried using the 
C:out/ tag lib but i cant get it to work

e.g.

c:out value=${myForm.value(${uniqueKey})}/

and c:out value=${myForm.value(uniqueKey)}/


Any ideas how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the Heroix e-mail Security System
__

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



RE: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread Takhar, Sandeep
I'm not sure how it worked in 1.1, but what you're saying makes sense.

Basically there is a computeURL function that add the transaction attribute only if it 
is set (in 1.1).  This is for the html:link that I am talking about:

// Add our transaction control token (if requested)
if (transaction) {
HttpSession session = pageContext.getSession();
String token = null;
if (session != null) {
token = (String) session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
}
if (token != null) {
results.put(Constants.TOKEN_KEY, token);
}
}

So that is good I guess, but I don't know what you are trying to do

someaction - saveToken - jsp

jsp has transaction = true which means that it will propagate to the next action that 
it submits to.

I may be missing something...

sandeep

-Original Message-
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 8:39 AM
To: [EMAIL PROTECTED]
Subject: RE: Sycnhronizer Token- can someone explain this?Curre



sandeep.

using transaction=true..  this is what i get from the action the link
submits too

as you can see the session token is null, and only gets set when i
explicitly call saveToken(request) from a prior action


2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Request
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Session
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,089 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Invalid
Token




For the latest data on the economy and society 
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
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: EL Tag Libraries

2004-03-24 Thread Pat Quinn
I want to pass uniqueKey as a parameter to the getValue method on my action 
form, i dont want to render the uniqueKey value i want to render the return 
value from the getValue(String) method call


From: Pady Srinivasan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: EL Tag Libraries
Date: Wed, 24 Mar 2004 08:57:41 -0500
Why not use c:out value=${uniqueKey} / instead of
c:out value=${myForm.value(${uniqueKey})} / ???
This works for me:

c:set var=testVar value=Hello  /
c:set var=testVar1 value=World /
c:set var=hello
c:out value=${testVar} /-c:out value=${testVar1} /
/c:set
c:out value=${hello} /


Thanks

-- pady
[EMAIL PROTECTED]
-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 7:11 AM
To: [EMAIL PROTECTED]
Subject: EL Tag Libraries
Hi Guys,

I have an action form with a get method (i.e. getValue(String)) which takes
a string value, its working fine when i render the data in a text field.
E.g.

c:set var=uniqueKey
c:out value=${CustomerTO.id}/-c:out
value=${CustomerTO.orderNo}/
/c:set
html-el:text name=myForm property=value(${uniqueKey})/



Now i want to render the data as a label on screen i've tried using the
C:out/ tag lib but i cant get it to work
e.g.

c:out value=${myForm.value(${uniqueKey})}/

and c:out value=${myForm.value(uniqueKey)}/

Any ideas how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__
__
This email has been scanned by the Heroix e-mail Security System
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


RE: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread James Scrimshire

well at the moment i'm just trying to get it to work from an html page that
submits to an action
so the html has the transaction=true and the action checks the token

i have been debugged the value of the session attribute
Globals.TRANSACTION_TOKEN_KEY  at the start of the action the page submits
to..

the isValidToken fails beacuse the session token is null. the only way It
is not null is if I save the token in a previous action

what i want to know is how does this work for a single action? what if i
only hadf one action? (admittedly i wouldn't need the pattern then)



   

  [EMAIL PROTECTED]

  BC.caTo:   [EMAIL PROTECTED] 
   
   cc: 

  24/03/04 14:01   Subject:  RE: Sycnhronizer Token- can 
someone explain this?Curre
  Please respond to

  struts-user  

   

   





I'm not sure how it worked in 1.1, but what you're saying makes sense.

Basically there is a computeURL function that add the transaction attribute
only if it is set (in 1.1).  This is for the html:link that I am talking
about:

// Add our transaction control token (if requested)
if (transaction) {
HttpSession session = pageContext.getSession();
String token = null;
if (session != null) {
token = (String)
session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
}
if (token != null) {
results.put(Constants.TOKEN_KEY, token);
}
}

So that is good I guess, but I don't know what you are trying to do

someaction - saveToken - jsp

jsp has transaction = true which means that it will propagate to the next
action that it submits to.

I may be missing something...

sandeep

-Original Message-
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 8:39 AM
To: [EMAIL PROTECTED]
Subject: RE: Sycnhronizer Token- can someone explain this?Curre



sandeep.

using transaction=true..  this is what i get from the action the link
submits too

as you can see the session token is null, and only gets set when i
explicitly call saveToken(request) from a prior action


2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Request
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Session
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,089 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Invalid
Token




For the latest data on the economy and society
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__

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

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

LookupDispatchAction default

2004-03-24 Thread Brian Sayatovic/AMIG
I'd like to be able to have someone hit my action, /admin/list.do, without 
having to specify a submit paramater.  However, the action is a subclass 
of LookupDispatchAction whci requires that the request parameter be 
supplied.  Looking in the struts source code, it would be nice if the 
LookupDispatchAction could fall back to a default or not consider 'null' 
to be a bad value and just use 'null' as a key to the lookup Map.  For 
now, any link or redirect to the page must specify what I consider to be 
the default action -- refresh -- on the URL: 
/admin/list/do?submit=Refresh.

Is there another way to do this?  Is it worth suggesting that 
LookupDispatchAction support a default or null mapping?

Regards,
Brian.

generating a text file

2004-03-24 Thread Otvio Augusto
Hi all. I have to generate a text file (filled with a
pre-formated text) after a certain action is finished.
this file is a kind of confirmation of a certain
business action. so, as my application is web-based, I 
think I should let the user download this text file
when it is generated. how to automatically start the
download? I mean ,fire up the download confirmation
menu, so the user confirms he wants to receive the text
file or not.

thanks in advance


Otávio Augusto 
 
__
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/



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



Re: LookupDispatchAction default

2004-03-24 Thread Mark Lowe
unspecified() is the method you want look at the javadoc.

you do need the method name though

/admin/list.do?method

I saw that using submit as the parameter name causes problems so i 
wouldn't use that.

On 24 Mar 2004, at 15:16, Brian Sayatovic/AMIG wrote:

I'd like to be able to have someone hit my action, /admin/list.do, 
without
having to specify a submit paramater.  However, the action is a 
subclass
of LookupDispatchAction whci requires that the request parameter be
supplied.  Looking in the struts source code, it would be nice if the
LookupDispatchAction could fall back to a default or not consider 
'null'
to be a bad value and just use 'null' as a key to the lookup Map.  For
now, any link or redirect to the page must specify what I consider to 
be
the default action -- refresh -- on the URL:
/admin/list/do?submit=Refresh.

Is there another way to do this?  Is it worth suggesting that
LookupDispatchAction support a default or null mapping?
Regards,
Brian.


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


RE: LookupDispatchAction default

2004-03-24 Thread Wendy Smoak
 From: Brian Sayatovic/AMIG [mailto:[EMAIL PROTECTED] 
 I'd like to be able to have someone hit my action, 
 /admin/list.do, without having to specify a submit paramater.
 Is there another way to do this?  Is it worth suggesting that 
 LookupDispatchAction support a default or null mapping?

I'm not sure what version you're on, but look for the 'unspecified'
method in DispatchAction, which is inherited by LookupDispatchAction.  

From the javadoc:
http://jakarta.apache.org/struts/api/org/apache/struts/actions/Dispatch
Action.html
Method which is dispatched to when there is no value for specified
request parameter included in the request. Subclasses of DispatchAction
should override this method if they wish to provide default behavior
different than throwing a ServletException.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 


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



RE: LookupDispatchAction default

2004-03-24 Thread Wendy Smoak
 From: Mark Lowe [mailto:[EMAIL PROTECTED] 
 unspecified() is the method you want look at the javadoc.
 you do need the method name though
 /admin/list.do?method
 I saw that using submit as the parameter name causes problems so i 
 wouldn't use that.

I agree about not using submit, if you end up needing to use JavaScript
to change the value, you run into problems since submit() is already
function.  Calling either document.forms[0].submit.value=something or
document.forms[0].submit() gives an error, I can't remember which.  Bad
idea, avoid it. ;)  

However, I have plenty of /admin/list.do links with no request
parameters at all, and the unspecified method is called as described.
(I use nightly builds, so I don't know when it started working that
way...)

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 



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



Using Tomcat declarative security for my app

2004-03-24 Thread Sipe Informática
Hi!, first of all excuse my poor english... I have this problem:

My idea for securing my app was using Tomcat, so i have two directories: 
administrator and user, with their own jsp's.
In the web.xml i was pretending to do this:

   servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/administrator/*.do/url-pattern
   /servlet-mapping
   servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/user/*.do/url-pattern
   /servlet-mapping
and protrect administrative and user directories with tomcat:

security-constraint
   web-resource-collection
   web-resource-name
   Menu Administrador
   /web-resource-name
   url-pattern
   /administrator/*
   /url-pattern
   /web-resource-collection
   auth-constraint
   role-nameadministrador/role-name
   /auth-constraint
   /security-constraint
  
   login-config
   auth-methodFORM/auth-method
   form-login-config
   form-login-page
   /pagLogin.jsp
   /form-login-page
   form-error-page
   /errorLogin.jsp
   /form-error-page
   /form-login-config
   /login-config
  
 But, even it seems to login correctly, always returns to me a 400 
error (Invalid path) and I can`t access to any .do...
that url-pattern is correct? can i filter by /administrator/*.do? (I 
have tried also by /administrator/ and returns de same message).

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


RE: generating a text file

2004-03-24 Thread Pady Srinivasan

This is what we did in our Action:

// generate the file
File file = generate();
// download
response.setContentType(text/plain);
response.addHeader(Content-Disposition, attachment;filename= +
file.getName());
return new ActionForward(/logs/ + file.getName());


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 9:16 AM
To: struts-user
Subject: generating a text file

Hi all. I have to generate a text file (filled with a 
pre-formated text) after a certain action is finished. 
this file is a kind of confirmation of a certain 
business action. so, as my application is web-based, I 
think I should let the user download this text file 
when it is generated. how to automatically start the 
download? I mean ,fire up the download confirmation 
menu, so the user confirms he wants to receive the text 
file or not.

thanks in advance


Otávio Augusto 
 
__
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/



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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the Heroix e-mail Security System
__

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



Basic question about ActionForms

2004-03-24 Thread Marco Mistroni
Hi all,
In my app I am using a  DynaActionForm with scope = session.
When I am calling the action for the first time, obviously the 
Form is 'emtpy', so I populate it with all the values..
When I am redirected to the action class again, the actionform
Should be in the session (in theory).
However, what is in the session looks like an 'empty' actionform as it
Was before.
Now the question: if my actionform has scope of session, do I have to 
Put the value in the session explicitly or struts will do it for me?


IT LOOKS like all the values are erased all the time, no matter if I
have
Specified as scope session..

Anyone has any clues of what's going on?

Regards 
marco


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



Re: EL Tag Libraries

2004-03-24 Thread Shaul Siboni
It is not working because JSTL think that you are trying to call a 
function.   To make it work you will need to define this function in a TLD 
file and use the namespace to call it.

Take a look at TOMCAT\webapps\jsp-examples\jsp2\el\functions.jsp

HTH
--Shaul
Pat Quinn wrote:

I want to pass uniqueKey as a parameter to the getValue method on my 
action form, i dont want to render the uniqueKey value i want to render 
the return value from the getValue(String) method call


From: Pady Srinivasan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: EL Tag Libraries
Date: Wed, 24 Mar 2004 08:57:41 -0500
Why not use c:out value=${uniqueKey} / instead of
c:out value=${myForm.value(${uniqueKey})} / ???
This works for me:

c:set var=testVar value=Hello  /
c:set var=testVar1 value=World /
c:set var=hello
c:out value=${testVar} /-c:out value=${testVar1} /
/c:set
c:out value=${hello} /


Thanks

-- pady
[EMAIL PROTECTED]
-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 7:11 AM
To: [EMAIL PROTECTED]
Subject: EL Tag Libraries
Hi Guys,

I have an action form with a get method (i.e. getValue(String)) which 
takes
a string value, its working fine when i render the data in a text field.

E.g.

c:set var=uniqueKey
c:out value=${CustomerTO.id}/-c:out
value=${CustomerTO.orderNo}/
/c:set
html-el:text name=myForm property=value(${uniqueKey})/



Now i want to render the data as a label on screen i've tried using the
C:out/ tag lib but i cant get it to work
e.g.

c:out value=${myForm.value(${uniqueKey})}/

and c:out value=${myForm.value(uniqueKey)}/

Any ideas how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__
__
This email has been scanned by the Heroix e-mail Security System
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


***
This Mail Was Scanned By Mail-seCure System in  Matrix 
Herzeliya
***




***
This Mail Was Scanned By Mail-seCure System in 
 Matrix Herzeliya
***

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


Re: LookupDispatchAction default

2004-03-24 Thread Mark Lowe
I agree about not using submit, if you end up needing to use JavaScript
to change the value, you run into problems since submit() is already
function.  Calling either document.forms[0].submit.value=something or
document.forms[0].submit() gives an error, I can't remember which.  Bad
idea, avoid it. ;)
It was you post on the thread last week where i pick it up.

However, I have plenty of /admin/list.do links with no request
parameters at all, and the unspecified method is called as described.
(I use nightly builds, so I don't know when it started working that
way...)
Good to know that its been addressed, but I'm on whatever the stable 
release of 1.1 is. I'd like to be taking the source of 1.2 from cvs and 
helping to test it but i just cant be arsed with all that maven stuf. 
But i think i'd still stick to the stable release rather then get 
caught up in all that unknown territory stuff.



On 24 Mar 2004, at 15:30, Wendy Smoak wrote:

From: Mark Lowe [mailto:[EMAIL PROTECTED]
unspecified() is the method you want look at the javadoc.
you do need the method name though
/admin/list.do?method
I saw that using submit as the parameter name causes problems so i
wouldn't use that.
I agree about not using submit, if you end up needing to use JavaScript
to change the value, you run into problems since submit() is already
function.  Calling either document.forms[0].submit.value=something or
document.forms[0].submit() gives an error, I can't remember which.  Bad
idea, avoid it. ;)
However, I have plenty of /admin/list.do links with no request
parameters at all, and the unspecified method is called as described.
(I use nightly builds, so I don't know when it started working that
way...)
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management


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


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


RE: html:javascript question

2004-03-24 Thread Janarthan Sathiamurthy
var myMessage = bean:write name=msg /;
alert(myMessage)

-Original Message-
From: Daniel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 6:23 PM
To: Struts Users Mailing List
Subject: html:javascript question


I want to put the msg inside a javasript alert (popup with error message ),some one 
know how can I make it ???

font color=red

html:messages id=msg message=true bundle=geral

bean:write name=msg /br

/html:messages

/font


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



RE: LookupDispatchAction default

2004-03-24 Thread Wendy Smoak
 From: Mark Lowe [mailto:[EMAIL PROTECTED] 

 It was you post on the thread last week where i pick it up.

Sorry, I'm apparently repeating myself!  I can't remember last week this
early in the morning.

 Good to know that its been addressed, but I'm on whatever the stable 
 release of 1.1 is. I'd like to be taking the source of 1.2 
 from cvs and 
 helping to test it but i just cant be arsed with all that maven stuf. 
 But i think i'd still stick to the stable release rather then get 
 caught up in all that unknown territory stuff.

I've been using nightly builds since forever, and I've never once built
it from source.  There's always a compiled version available along with
the source.  I do download the source and occasionally look at it or use
it with JSwat, but building it is definitely not a prerequisite for
using the latest and greatest.

I have an Ant task that copies the .jars over from where I download and
unzip the nightly builds.  If I were really clever, I could probably
convince Ant to figure out the filename and go get and expand the .zip
files, then copy the .jar files. ;)

The only weirdness with 1.2.0 I've found is that ActionError is
deprecated but there is no replacement, so you get a bunch of warnings
if you use it.  I don't think you'll have a big problem going from 1.1
to 1.2.  

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



AW: html:javascript question

2004-03-24 Thread Andreas Solarik
nice one, didn't even occur to me to do this.

Andreas

-Ursprüngliche Nachricht-
Von: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 24. März 2004 16:05
An: Struts Users Mailing List
Betreff: RE: html:javascript question


var myMessage = bean:write name=msg /;
alert(myMessage)

-Original Message-
From: Daniel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 6:23 PM
To: Struts Users Mailing List
Subject: html:javascript question


I want to put the msg inside a javasript alert (popup with error message
),some one know how can I make it ???

font color=red

html:messages id=msg message=true bundle=geral

bean:write name=msg /br

/html:messages

/font


-
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: Automatically detecting struts-config changes and reload app.

2004-03-24 Thread Pady Srinivasan

Anybody have an example of this ? I searched in the user/developer guides
and Google and couldn't find much.


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 8:32 AM
To: Struts Users Mailing List
Subject: Re: Automatically detecting struts-config changes and reload app.

Hey Antony:

Check out the struts admin functionality: Make sure you have the admin
mappings in your struts-config.xml, then point your browser to
/yourContext/admin/reload.do and you'll see the magic..:)

Regards,
Geeta

Antony Paul wrote:

 Is it possible to automatically detect changes in struts-config.xml and
 reload the application ?. I know that Log4J(or Tomcat) detects changes to
 log4j.properties and reload the application.

 Antony Paul

 -
 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 email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the Heroix e-mail Security System
__

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



RE: Sycnhronizer Token- can someone explain this?Curre

2004-03-24 Thread Takhar, Sandeep
there would have to be an if statement somewhere

if (view)
saveToken
...


if (submit)
...

you wouldn't need the html:link thing then that is for double clicking the link I 
believe.

Search the archives for how tokens work exactly.  I believe Ted Husted's site may
have some insight as well.  

(I can't remember, but I think html:form is in the puzzle as well)

sandeep

-Original Message-
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:07 AM
To: [EMAIL PROTECTED]
Subject: RE: Sycnhronizer Token- can someone explain this?Curre



well at the moment i'm just trying to get it to work from an html page that
submits to an action
so the html has the transaction=true and the action checks the token

i have been debugged the value of the session attribute
Globals.TRANSACTION_TOKEN_KEY  at the start of the action the page submits
to..

the isValidToken fails beacuse the session token is null. the only way It
is not null is if I save the token in a previous action

what i want to know is how does this work for a single action? what if i
only hadf one action? (admittedly i wouldn't need the pattern then)



   

  [EMAIL PROTECTED]

  BC.caTo:   [EMAIL PROTECTED] 
   
   cc: 

  24/03/04 14:01   Subject:  RE: Sycnhronizer Token- can 
someone explain this?Curre
  Please respond to

  struts-user  

   

   





I'm not sure how it worked in 1.1, but what you're saying makes sense.

Basically there is a computeURL function that add the transaction attribute
only if it is set (in 1.1).  This is for the html:link that I am talking
about:

// Add our transaction control token (if requested)
if (transaction) {
HttpSession session = pageContext.getSession();
String token = null;
if (session != null) {
token = (String)
session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
}
if (token != null) {
results.put(Constants.TOKEN_KEY, token);
}
}

So that is good I guess, but I don't know what you are trying to do

someaction - saveToken - jsp

jsp has transaction = true which means that it will propagate to the next
action that it submits to.

I may be missing something...

sandeep

-Original Message-
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 8:39 AM
To: [EMAIL PROTECTED]
Subject: RE: Sycnhronizer Token- can someone explain this?Curre



sandeep.

using transaction=true..  this is what i get from the action the link
submits too

as you can see the session token is null, and only gets set when i
explicitly call saveToken(request) from a prior action


2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Request
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Session
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:

2004-03-24 13:36:34,089 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Invalid
Token




For the latest data on the economy and society
consult National Statistics at http://www.statistics.gov.uk

**
Please Note:  Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**
Legal Disclaimer  :  Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**


FIFO ordering of ActionErrors

2004-03-24 Thread Haroon Rafique
Hi listers,

I have been working on this issue for the last couple of days but haven't 
found any satisfactory answers through the usual channels (mailing list 
archives, API, and some source code perusal as well).

As I understand it, post struts 1.1, ActionErrors were supposed to keep 
their FIFO ordering. I have tried a nightly from 2004-01-27 and just 
recently 2004-03-23 and here's what I experience:

* all of my forms extend ValidatorForm
* In one of those forms I override the validate method which first makes a 
call to super.validate()
* If the above call returns any errors, I wanted to stick a prefix 
(or suffix) message in front of the errors shown by validator. For the 
sake of simplicity, the rest of discussion will focus on adding a suffix 
message (as its a lot easier to describe how I added the suffix message).

So, instead of seeing the regular (boring :-)) messages from validator 
like:

* 'Postal Code' is a required field.
* 'City' is a required field.

the user would instead see:

* 'Postal Code' is a required field.
* 'City' is a required field.
* Invalid and/or incomplete input. Please provide the correct information 
as instructed:

Here's a look at the errors object from the debug log before the insertion 
of the suffix message.

{
postalCode=[errors.required[Postal Code, null, null, null]],
city=[errors.required[City, null, null, null]]
}

(BTW, to make the message appear before the other ones as a prefix, I had
to create a new errors object and then add the original ones to it).

So the following code line example just tries to add an ActionMessage 
with resource errors.validator.prefix [sic] at the end.

So, after making my super.validate() call, I added a call to:

errors.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage(errors.validator.prefix));

I would have expected the above line to just add a 3rd property at the 
end. Unfortunately, the errors object now looks like:

{
postalCode=[errors.required[Postal Code, null, null, null]],
org.apache.struts.action.GLOBAL_MESSAGE=[errors.validator.prefix[]],
city=[errors.required[City, null, null, null]]
}

(Notice the GLOBAL_MESSAGE property stuck in the middle)

With the result being that the user sees:

* 'Postal Code' is a required field.
* Invalid and/or incomplete input. Please provide the correct information 
as instructed:
* 'City' is a required field.

Did I understand the FIFO capability of ActionErrors incorrectly? If this 
helps any, postalCode is one of the only few fields that I have discovered 
in all of my forms which bubbles up to the top.

Any help is appreciated.

Thanks,
--
Haroon Rafique
[EMAIL PROTECTED]


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



Re: i18n with Japanese characters and tags....

2004-03-24 Thread carlo latasa
I just checked the example application and did not see anything on Japanese 
characters. I'm at:
http://localhost:8080/struts-example/tour.do

Did you mean that if I were to just take this code and modify it to display 
these characters? Or is the example somewhere else?


From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 16:12:20 +0900
Carlo,

Have you checked the example application included in Struts1.1(or
current CVS)? It can show Japanese characters correctly without any
special implementations.
I think it will be a help for your problem.
The most frequent mistake in such case is lack of unicode escape
to their message resource files.
Don't forget native2ascii when you make your resource files.
see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org
carlo latasa [EMAIL PROTECTED] wrote:

 Hello,

 I'm trying to show Japanese characters on my jsp pages however the 
 character of the charset is coming back as amp; which is preventing the
 characters from being displayed correctly. They look like:
 ƒLƒJƒXƒn

 Note, the bean:write tag renders the characters correctly when the 
filter
 attribute is set to false.

 I've got a struts application using both Tomcat and Jrun and I've set my
 controller element of the struts-config.xml as:

 controller contentType=text/html; charset=JISAutoDetect/

 and at the top of a tiles.jsp that's at the head of every page I've got 
a:

 %@ page contentType=html/text; charset=JISAutoDetect %

 head
   META HTTP-EQUIV=Content-Type CONTENT=text/html; 
charset=JISAutoDetect
 %

 . to set the encoding.

 My hunch is that this is something that Struts is doing to the in the
 RequestProcessor or Controller.
 Could/should I write a Filter to override this issue?

 Is this something I chould set in a .css called in the tiles.jsp?

 Any help is much appreciated.


 Carlo Latasa -

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


Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/

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


RE: Using Tomcat declarative security for my app

2004-03-24 Thread Pady Srinivasan

1. Make sure you define a security-role element for 'administrator' in
web.xml. Also the auth-constraint has role-name as 'administrador'. Maybe a
spelling error ?
2. And the role should be defined in tomcat-users.xml also. And the users in
this role would alone be allowed access.


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Sipe Informática [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 9:40 AM
To: Struts Users Mailing List
Subject: Using Tomcat declarative security for my app

Hi!, first of all excuse my poor english... I have this problem:

My idea for securing my app was using Tomcat, so i have two directories: 
administrator and user, with their own jsp's.
In the web.xml i was pretending to do this:

 
servlet-mapping
servlet-nameaction/servlet-name
url-pattern/administrator/*.do/url-pattern
/servlet-mapping

servlet-mapping
servlet-nameaction/servlet-name
url-pattern/user/*.do/url-pattern
/servlet-mapping

and protrect administrative and user directories with tomcat:

security-constraint
web-resource-collection
web-resource-name
Menu Administrador
/web-resource-name
url-pattern
/administrator/*
/url-pattern
/web-resource-collection
auth-constraint
role-nameadministrador/role-name
/auth-constraint
/security-constraint
   
login-config
auth-methodFORM/auth-method
form-login-config
form-login-page
/pagLogin.jsp
/form-login-page
form-error-page
/errorLogin.jsp
/form-error-page
/form-login-config
/login-config
   
  But, even it seems to login correctly, always returns to me a 400 
error (Invalid path) and I can`t access to any .do...
that url-pattern is correct? can i filter by /administrator/*.do? (I 
have tried also by /administrator/ and returns de same message).

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the Heroix e-mail Security System
__

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



Re: File upload location

2004-03-24 Thread Mark Shifman
Deepak wrote:

Hi,
   What is the default location of a file uploaded using html:file ? Can I upload it to one of the folders in my context path ?
 

It goes someplace temporary. If you look at the src for the UploadAction 
example in Struts, it shows how to save the temporary file.

I create a temporary dir with sessionCreated() in the 
HttpSessionListener ie myapp/temp/sessionID

then you can get to it via 
session.getServletContext().getRealPath(temp) + /+ session.getId();

and create an outputstream that goes there.

When the session is destroyed I remove the files and the dir 
myapp/temp/sessionID

thanks
Deepak
 



--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: are you sure?

2004-03-24 Thread McCormack, Chris
If you need this to be in a confirmation box as you say, look in to using a modal 
window that has 2 javascript backed buttons on it.

hth
Chris McCormack

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: 23 March 2004 12:22
To: Struts Users Mailing List
Subject: Re: are you sure?


+1
-Martin
- Original Message - 
From: Colm Garvey [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 5:00 AM
Subject: RE: are you sure?


 Simplest thing to do here is make the method handle the submit for you.
 Replace the submit button with :
 
 html:button property=dummySubmit
 onclick=areyousure();Submit/html:button
 
 Then change the javascript to use
 
 ...if (agree){formname.submit();}
 
 Good Luck,
 
 Colm
 
 -Original Message-
 From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2004 09:44
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: are you sure?
 
 
 Try with this -
 html:form action=/adddate
   name=dateForm
   type=nl.rinke.DateForm
   onsubmit=return areyousure() 
 
 Should work
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 23, 2004 3:10 PM
 To: [EMAIL PROTECTED]
 Subject: are you sure?
 
 
 Hi list,
 
 Still a struts newbie, I try to write an are you sure javascript
 confirmation box for my submit button.
 
 The question is: how can I prevent the form from being submitted
 when the user clicks no?
 
 In the Jsp, I put the following code in the head:
 
 SCRIPT LANGUAGE=javascript
function areyousure(){
   var agree = false;
   agree = confirm(are you sure?);
   if(agree){
  ... some code which is not important
   }
   return agree;
}
 /SCRIPT
 
 
 And the form tag looks like this:
 
 html:form action=/adddate
   name=dateForm
   type=nl.rinke.DateForm
   onsubmit=areyousure() 
 
 
 Whatever the user clicks, yes or no, the form
 gets submitted. I want to stop submitting the
 form when the user click no.
 
 thanks, Rinke
 
 
 -
 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]


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



html:rewrite action problem

2004-03-24 Thread Ruben Pardo
i've got the next tag
html:rewrite
action=/SomeAction?prefix=page=/SomePage

and in the actionConfig  action path=/SomeAction
type=org.apache.type=org.apache.struts.actions.SwitchAction
/action

but i always get an error saying that attribute action
does not defined in the tld?
what could it be?
thanks in advance. 

___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es

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



Re: html:rewrite action problem

2004-03-24 Thread Mark Lowe
try page=/SomeAction.do

On 24 Mar 2004, at 17:50, Ruben Pardo wrote:

i've got the next tag
html:rewrite
action=/SomeAction?prefix=page=/SomePage
and in the actionConfig  action path=/SomeAction
type=org.apache.type=org.apache.struts.actions.SwitchAction
/action
but i always get an error saying that attribute action
does not defined in the tld?
what could it be?
thanks in advance.
___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es
-
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: LookupDispatchAction default

2004-03-24 Thread Mark Lowe
On 24 Mar 2004, at 16:13, Wendy Smoak wrote:

From: Mark Lowe [mailto:[EMAIL PROTECTED]

It was you post on the thread last week where i pick it up.
Sorry, I'm apparently repeating myself!  I can't remember last week 
this
early in the morning.

Good to know that its been addressed, but I'm on whatever the stable
release of 1.1 is. I'd like to be taking the source of 1.2
from cvs and
helping to test it but i just cant be arsed with all that maven stuf.
But i think i'd still stick to the stable release rather then get
caught up in all that unknown territory stuff.
I've been using nightly builds since forever, and I've never once built
it from source.  There's always a compiled version available along with
the source.  I do download the source and occasionally look at it or 
use
it with JSwat, but building it is definitely not a prerequisite for
using the latest and greatest.

I have an Ant task that copies the .jars over from where I download and
unzip the nightly builds.  If I were really clever, I could probably
convince Ant to figure out the filename and go get and expand the .zip
files, then copy the .jar files. ;)
The only weirdness with 1.2.0 I've found is that ActionError is
deprecated but there is no replacement, so you get a bunch of warnings
if you use it.  I don't think you'll have a big problem going from 1.1
to 1.2.
Yeah .. I tried to make my 1.1 apps forward compatible with this by 
using ActionMessages but to no avail, which is really quite a pain. I 
was using html:errors tag to display but this is supposed to be okay 
but wasn't.


--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Using Tomcat declarative security for my app

2004-03-24 Thread Sipe Informática
Thanks for your help, but it is not the problem... I deleted all about 
security in my web.xml to test only de filter mapping of the
struts action servlet:

servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/administrator/*.do/url-pattern
   /servlet-mapping
With this mapping always returns to me a 400 error (Invalid Path)... I 
have tried also /app/administrator/*.do, but it returns
the same error... any idea?

Thanks ...

Pady Srinivasan wrote:

1. Make sure you define a security-role element for 'administrator' in
web.xml. Also the auth-constraint has role-name as 'administrador'. Maybe a
spelling error ?
2. And the role should be defined in tomcat-users.xml also. And the users in
this role would alone be allowed access.
Thanks

-- pady
[EMAIL PROTECTED]
 



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


Re: Using Tomcat declarative security for my app

2004-03-24 Thread Mark Lowe
If you're using a javax.servlet.Filter and you then

  filter-mapping
filter-nameMyFilter/filter-name
url-pattern/administrator/*.do/url-pattern
  /filter-mapping
you can also map to a servlet name rather than a url pattern but this 
seems what you want.

On 24 Mar 2004, at 18:10, Sipe Informática wrote:

Thanks for your help, but it is not the problem... I deleted all about 
security in my web.xml to test only de filter mapping of the
struts action servlet:

servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/administrator/*.do/url-pattern
   /servlet-mapping
With this mapping always returns to me a 400 error (Invalid Path)... I 
have tried also /app/administrator/*.do, but it returns
the same error... any idea?

Thanks ...

Pady Srinivasan wrote:

1. Make sure you define a security-role element for 'administrator' in
web.xml. Also the auth-constraint has role-name as 'administrador'. 
Maybe a
spelling error ?
2. And the role should be defined in tomcat-users.xml also. And the 
users in
this role would alone be allowed access.

Thanks
-- pady
[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: html:rewrite action problem

2004-03-24 Thread ruben
It works well, thanks.

try page=/SomeAction.do

On 24 Mar 2004, at 17:50, Ruben Pardo wrote:

i've got the next tag
html:rewrite
action=/SomeAction?prefix=page=/SomePage
and in the actionConfig  action path=/SomeAction
type=org.apache.type=org.apache.struts.actions.SwitchAction
/action


but i always get an error saying that attribute action
does not defined in the tld?
what could it be?
thanks in advance.
___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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



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


Re: Using Tomcat declarative security for my app

2004-03-24 Thread Kris Schneider
You can use either path or extension mapping, but not a combination of both. So
/administrator/* is okay and *.do is okay but /administrator/*.do is not.

Quoting Mark Lowe [EMAIL PROTECTED]:

 If you're using a javax.servlet.Filter and you then
 
filter-mapping
  filter-nameMyFilter/filter-name
  url-pattern/administrator/*.do/url-pattern
/filter-mapping
 
 you can also map to a servlet name rather than a url pattern but this 
 seems what you want.
 
 
 On 24 Mar 2004, at 18:10, Sipe Informática wrote:
 
  Thanks for your help, but it is not the problem... I deleted all about 
  security in my web.xml to test only de filter mapping of the
  struts action servlet:
 
  servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern/administrator/*.do/url-pattern
 /servlet-mapping
 
  With this mapping always returns to me a 400 error (Invalid Path)... I 
  have tried also /app/administrator/*.do, but it returns
  the same error... any idea?
 
  Thanks ...
 
  Pady Srinivasan wrote:
 
  1. Make sure you define a security-role element for 'administrator' in
  web.xml. Also the auth-constraint has role-name as 'administrador'. 
  Maybe a
  spelling error ?
  2. And the role should be defined in tomcat-users.xml also. And the 
  users in
  this role would alone be allowed access.
 
 
  Thanks
  -- pady
  [EMAIL PROTECTED]

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Re: Using Tomcat declarative security for my app

2004-03-24 Thread Mark Lowe
opps..

sorry for the dodgy info. in fact mine follow the /dir/* pattern.

On 24 Mar 2004, at 18:45, Kris Schneider wrote:

You can use either path or extension mapping, but not a combination of 
both. So
/administrator/* is okay and *.do is okay but /administrator/*.do is 
not.

Quoting Mark Lowe [EMAIL PROTECTED]:

If you're using a javax.servlet.Filter and you then

   filter-mapping
 filter-nameMyFilter/filter-name
 url-pattern/administrator/*.do/url-pattern
   /filter-mapping
you can also map to a servlet name rather than a url pattern but this
seems what you want.
On 24 Mar 2004, at 18:10, Sipe Informática wrote:

Thanks for your help, but it is not the problem... I deleted all 
about
security in my web.xml to test only de filter mapping of the
struts action servlet:

servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern/administrator/*.do/url-pattern
   /servlet-mapping
With this mapping always returns to me a 400 error (Invalid Path)... 
I
have tried also /app/administrator/*.do, but it returns
the same error... any idea?

Thanks ...

Pady Srinivasan wrote:

1. Make sure you define a security-role element for 'administrator' 
in
web.xml. Also the auth-constraint has role-name as 'administrador'.
Maybe a
spelling error ?
2. And the role should be defined in tomcat-users.xml also. And the
users in
this role would alone be allowed access.

Thanks
-- pady
[EMAIL PROTECTED]
--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


.swf file

2004-03-24 Thread Jignesh Patel
Dear Friends,
Can anybody explain me how to use .swf file as a button in struts framework.

-Jignesh

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



Struts Training Recommendations

2004-03-24 Thread Ashi Sharma
Could anyone please recommend any good training
options (esp. in the classroom setting) for Struts for
someone with Java experience?

Thanks
Ashi

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



RE: Struts Training Recommendations

2004-03-24 Thread Jeffrey Pearson
www.smart-soft.com

Jeff Pearson
Software Interface Specialist
University of Southern California
213.821.0894
[EMAIL PROTECTED]

 -Original Message-
From:   Ashi Sharma [mailto:[EMAIL PROTECTED] 
Sent:   Wednesday, March 24, 2004 10:01 AM
To: [EMAIL PROTECTED]
Subject:Struts Training Recommendations

Could anyone please recommend any good training
options (esp. in the classroom setting) for Struts for
someone with Java experience?

Thanks
Ashi

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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




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



redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
Dear all,

I've been struggling with this problem for about two days now; I hope
somebody here would be able to help me. In one of my actions I've
implemented Struts token functionality to keep user from using browser
Refresh button. Every thing works as promised except for when invalid token
message is shown and you press the Refresh button, browser pops up a message
saying that there is POSTDATA in the request do you want to sumbit; clicking
yes again calls the source action and user again ends up the invalid token
message.

now my question is how can I get rid of this post data and browser's
confirmation message? I thought setting rediect=true to forward should to
the trick; but it doesn't! Last night while going thru the archives, I
figured that this does work when you forward to /someAction.do or
/somePage.jsp but doesn't work for Tiles definitions!!!

Any help would be greatly appreciated.

here are my global forward and action mappings in the struts config file:

global-forwards
forward name=invalidToken path=showInvalidTokenMessage.do
redirect=true /
/global-forwards

action path=test class=test.TokenedAction name=testForm
forward name=success path=greetingsTile redirect=true /
/action

Its from within the test.TokenAction that I forward to global forward
invalidToken.

Again, thanks in anticipation for any help.

ATTA



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



Dynamic forward in tiles

2004-03-24 Thread Mariano García González

Hi all,

I am newbie using tiles, so maybe this question is too easy for you.

I want to use a tile definition in which, one of the attribute values is
dynamic. It is something like this:

definition name=tracebox.def.encoderconfig extends=tracebox.def.menu
  put name=title value=encoderconfig /
  put name=body value=DYNAMIC CONTENT /
/definition

I want to use a dynamic url in body attribute, depending of a bean
attribute.

I hope you understand me. Could you help me?

Thanks,
Mariano.

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



blocking bookmarked actions

2004-03-24 Thread Mark Shifman
Suppose someone bookmarked an action such as 
/yourhost/yourapp/someAction.do and you really want them to only go 
through the html pages.

How do your block or catch these actions and redirect them to the 
appropriate place?

mas

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


RE: blocking bookmarked actions

2004-03-24 Thread Paul McCulloch
You code code your app to always use http POST, but block GETs. This may not
be suitable if you've already written the app though!

Paul

 -Original Message-
 From: Mark Shifman [mailto:[EMAIL PROTECTED]
 Sent: 24 March 2004 18:17
 To: Struts Users Mailing List
 Subject: blocking bookmarked actions
 
 
 Suppose someone bookmarked an action such as 
 /yourhost/yourapp/someAction.do and you really want them to only go 
 through the html pages.
 
 How do your block or catch these actions and redirect them to the 
 appropriate place?
 
 mas
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


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



Re: blocking bookmarked actions

2004-03-24 Thread Mark Shifman
where do I do the blocking?  The action I am having problems with is a 
LookupDispatchAction and I get this kind of error message

javax.servlet.ServletException: Request[/RechartFiles] does not contain handler 
parameter named method

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:199)
...

Paul McCulloch wrote:

You code code your app to always use http POST, but block GETs. This may not
be suitable if you've already written the app though!
Paul

 

-Original Message-
From: Mark Shifman [mailto:[EMAIL PROTECTED]
Sent: 24 March 2004 18:17
To: Struts Users Mailing List
Subject: blocking bookmarked actions
Suppose someone bookmarked an action such as 
/yourhost/yourapp/someAction.do and you really want them to only go 
through the html pages.

How do your block or catch these actions and redirect them to the 
appropriate place?

mas

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


Struts validator Regular Expressions

2004-03-24 Thread Joao Batistella
Hello!

Do you know any document where can I learn how to build regular expressions
for Struts Validator?

I need to validate an IP address and I don't know how is the syntax in the
validator config file.

Thanks,
JP


RE: blocking bookmarked actions

2004-03-24 Thread Pady Srinivasan

Use only HTTP POST and send a hidden parameter which identifies the request
origin. So if this is not set, redirect to some default page.

Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Mark Shifman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 1:17 PM
To: Struts Users Mailing List
Subject: blocking bookmarked actions

Suppose someone bookmarked an action such as 
/yourhost/yourapp/someAction.do and you really want them to only go 
through the html pages.

How do your block or catch these actions and redirect them to the 
appropriate place?

mas


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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the Heroix e-mail Security System
__

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



RE: blocking bookmarked actions

2004-03-24 Thread Paul McCulloch
The way I achieved this was to extend ActionServlet so that a GET or POST
parameter was added to the request, and extended RequestProcessor to deal
with the get's differently.

If you just need to catch calls to dispatch actions without a method then
override execute() in your base DispatchAction class.

Paul

 -Original Message-
 From: Mark Shifman [mailto:[EMAIL PROTECTED]
 Sent: 24 March 2004 18:32
 To: Struts Users Mailing List
 Subject: Re: blocking bookmarked actions
 
 
 where do I do the blocking?  The action I am having problems 
 with is a 
 LookupDispatchAction and I get this kind of error message
 
 javax.servlet.ServletException: Request[/RechartFiles] does 
 not contain handler parameter named method
   
 org.apache.struts.actions.LookupDispatchAction.execute(LookupD
 ispatchAction.java:199)
 
 ...
 
 Paul McCulloch wrote:
 
 You code code your app to always use http POST, but block 
 GETs. This may not
 be suitable if you've already written the app though!
 
 Paul
 
   
 
 -Original Message-
 From: Mark Shifman [mailto:[EMAIL PROTECTED]
 Sent: 24 March 2004 18:17
 To: Struts Users Mailing List
 Subject: blocking bookmarked actions
 
 
 Suppose someone bookmarked an action such as 
 /yourhost/yourapp/someAction.do and you really want them to only go 
 through the html pages.
 
 How do your block or catch these actions and redirect them to the 
 appropriate place?
 
 mas
 
 
 
 -
 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]
 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


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



RE: Struts validator Regular Expressions

2004-03-24 Thread Takhar, Sandeep
don't quote me but the javadocs for jakarta's regular expression's RE class are ok.

Also I believe everything is based on jakarta's oro.

sandeep

-Original Message-
From: Joao Batistella [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 1:33 PM
To: 'Struts Users Mailing List'
Subject: Struts validator Regular Expressions


Hello!

Do you know any document where can I learn how to build regular expressions
for Struts Validator?

I need to validate an IP address and I don't know how is the syntax in the
validator config file.

Thanks,
JP

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



RE: blocking bookmarked actions

2004-03-24 Thread Paul McCulloch
Actually, it's simpler than that (as I just saw on another thread). Just
implement unspecified() in your action to override the default behaviour
when no dispatch method is provided.

Paul

 -Original Message-
 From: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Sent: 24 March 2004 18:49
 To: 'Struts Users Mailing List'
 Subject: RE: blocking bookmarked actions
 
 
 The way I achieved this was to extend ActionServlet so that a 
 GET or POST
 parameter was added to the request, and extended 
 RequestProcessor to deal
 with the get's differently.
 
 If you just need to catch calls to dispatch actions without a 
 method then
 override execute() in your base DispatchAction class.
 
 Paul
 
  -Original Message-
  From: Mark Shifman [mailto:[EMAIL PROTECTED]
  Sent: 24 March 2004 18:32
  To: Struts Users Mailing List
  Subject: Re: blocking bookmarked actions
  
  
  where do I do the blocking?  The action I am having problems 
  with is a 
  LookupDispatchAction and I get this kind of error message
  
  javax.servlet.ServletException: Request[/RechartFiles] does 
  not contain handler parameter named method
  
  org.apache.struts.actions.LookupDispatchAction.execute(LookupD
  ispatchAction.java:199)
  
  ...
  
  Paul McCulloch wrote:
  
  You code code your app to always use http POST, but block 
  GETs. This may not
  be suitable if you've already written the app though!
  
  Paul
  

  
  -Original Message-
  From: Mark Shifman [mailto:[EMAIL PROTECTED]
  Sent: 24 March 2004 18:17
  To: Struts Users Mailing List
  Subject: blocking bookmarked actions
  
  
  Suppose someone bookmarked an action such as 
  /yourhost/yourapp/someAction.do and you really want them 
 to only go 
  through the html pages.
  
  How do your block or catch these actions and redirect them to the 
  appropriate place?
  
  mas
  
  
  
  -
  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]
  
 
 
 **
 Axios Email Confidentiality Footer
 Privileged/Confidential Information may be contained in this 
 message. If you are not the addressee indicated in this 
 message (or responsible for delivery of the message to such 
 person), you may not copy or deliver this message to anyone. 
 In such case, you should destroy this message, and notify us 
 immediately. If you or your employer does not consent to 
 Internet email messages of this kind, please advise us 
 immediately. Opinions, conclusions and other information 
 expressed in this message are not given or endorsed by my 
 Company or employer unless otherwise indicated by an 
 authorised representative independent of this message.
 WARNING:
 While Axios Systems Ltd takes steps to prevent computer 
 viruses from being transmitted via electronic mail 
 attachments we cannot guarantee that attachments do not 
 contain computer virus code.  You are therefore strongly 
 advised to undertake anti virus checks prior to accessing the 
 attachment to this electronic mail.  Axios Systems Ltd grants 
 no warranties regarding performance use or quality of any 
 attachment and undertakes no liability for loss or damage 
 howsoever caused.
 
 
 -
 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: blocking bookmarked actions

2004-03-24 Thread Wendy Smoak
 From: Mark Shifman [mailto:[EMAIL PROTECTED] 
 where do I do the blocking?  The action I am having problems 
 with is a LookupDispatchAction and I get this kind of error message
 javax.servlet.ServletException: Request[/RechartFiles] does 
 not contain handler parameter named method
 org.apache.struts.actions.LookupDispatchAction.execute(LookupD
 ispatchAction.java:199)

We were just talking about that earlier today... Are you using a version
of LDA that has the 'unspecified' method inherited from Dispatch Action?
Implementing that method will stop the errors, and you may not need to
force them to go through the HTML page if you can do the default
behavior with no user input.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



Re: Dynamic forward in tiles

2004-03-24 Thread Pedro Salgado

  Below is a reply sent to this mailing list about something very similar to
what you are looking for.

  Hope it helps,

Pedro Salgado


Hi Robert..

I guess you could achieve the same using the controllerClass attribute and
building your class.. For instance, I have this definition in the
tiles-defs.xml file:
---
   definition name=.layout
   path=/common/layout.jsp
controllerClass='com.dars.XTileAction'
 put name=title   value=Encabezado primario/
 put name=leftsidevalue=/common/leftside.jsp/
 put name=rightside   value=/common/rightside.jsp/
 put name=header  value=/common/header.jsp/
 put name=footer  value=/common/footer.jsp/
 put name=bodyvalue=/common/body.jsp/
   /definition
---
  And I have this controllerClass
---
package com.dars;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.IOException;

public class XTileAction extends TilesAction implements Controller{
public void perform(ComponentContext tilesctx,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servctx)
throws ServletException, IOException{
 /* GetAttributes */
 String titulo= (String)tilesctx.getAttribute(title);
 String derecha= (String)tilesctx.getAttribute(rightside);
 /* GetAttributes */
 System.out.println(  Titulo: +titulo);
 System.out.println( Derecha: +derecha);
 /* SetAttributes */
   tilesctx.putAttribute(title, Titulo nuevo de esta vaina..);
   tilesctx.putAttribute(rightside, /common/footer.jsp);
 /* SetAttributes */
}
}
---
You can change the values of those attributes at runtime. I prefer to do
it using this method.

Atte.
Domingo A. Rodriguez S.


 --- Robert Taylor [EMAIL PROTECTED] escribió:  Greetings, I have a
tiles definition in my tiles-defs.xml similar to
 below:
 
  definition name=search extends=layout
 put name=heading value={0}Search type=string /
 put name=content value=/search.jsp type=page /
   /definition
 
 which I would like to be able to modify the heading value such that
 at runtime I could substitute a value for {0}.
 
 For example, it would be ideal to use a JSTL type of syntax such as:
 
 definition name=search extends=layout
 put name=heading value=${param.myValue}Search type=string /
 put name=content value=/search.jsp type=page /
   /definition
 
 but this does not work.
 
 
 
 robert
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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


On 24/03/2004 18:14, Mariano García González
[EMAIL PROTECTED] wrote:

 
 Hi all,
 
 I am newbie using tiles, so maybe this question is too easy for you.
 
 I want to use a tile definition in which, one of the attribute values is
 dynamic. It is something like this:
 
 definition name=tracebox.def.encoderconfig extends=tracebox.def.menu
 put name=title value=encoderconfig /
 put name=body value=DYNAMIC CONTENT /
 /definition
 
 I want to use a dynamic url in body attribute, depending of a bean
 attribute.
 
 I hope you understand me. Could you help me?
 
 Thanks,
 Mariano.
 
 -
 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: blocking bookmarked actions

2004-03-24 Thread Mark Shifman
Thanks.
Unfortunately LookupDispatchAction checks for the parameter an throws an 
error before it gets a chance to use unspecified(), but it should
be easy enough to modify it and then override dispatchActions unspecified().

mas

Wendy Smoak wrote:

From: Mark Shifman [mailto:[EMAIL PROTECTED] 
where do I do the blocking?  The action I am having problems 
with is a LookupDispatchAction and I get this kind of error message
javax.servlet.ServletException: Request[/RechartFiles] does 
not contain handler parameter named method
org.apache.struts.actions.LookupDispatchAction.execute(LookupD
ispatchAction.java:199)
   

We were just talking about that earlier today... Are you using a version
of LDA that has the 'unspecified' method inherited from Dispatch Action?
Implementing that method will stop the errors, and you may not need to
force them to go through the HTML page if you can do the default
behavior with no user input.
 



--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Frank Schaare
Hi,

just read this article on husted.com and it seems to be good advice.

When the user submits a page, passes validation without errors, is there 
a chance to validate business logic in the action ?

Therefor i need to
- make my validation,
- get an errors object,
- store the error,
- put the errors object in the request and
- return to input page.
Has anyone some sample code / suggestions / articles / sources hoe to 
achieve this ?

Thx

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


RE: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Pady Srinivasan

I don't have sample code but are you looking for something like this:

// in Action execute...
ActionErrors errors = new ActionErrors();
// add errors...
...
// set in request
request.setAttribute(org.apache.struts.action.ERROR, errors);
// forward to same page...


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Frank Schaare [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 24, 2004 3:35 PM
To: Struts Users Mailing List
Subject: Submit Once, Validate Twice -- but how ?

Hi,

just read this article on husted.com and it seems to be good advice.

When the user submits a page, passes validation without errors, is there 
a chance to validate business logic in the action ?

Therefor i need to
- make my validation,
- get an errors object,
- store the error,
- put the errors object in the request and
- return to input page.

Has anyone some sample code / suggestions / articles / sources hoe to 
achieve this ?

Thx

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the Heroix e-mail Security System
__

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



Re: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Frank Schaare
Hi,

thank you, that helps.

Now i still need to know how to access the input page (set in action 
mapping with the input=sample.jsp tag)...

I don't have sample code but are you looking for something like this:

// in Action execute...
ActionErrors errors = new ActionErrors();
// add errors...
...
// set in request
request.setAttribute(org.apache.struts.action.ERROR, errors);
// forward to same page...
Thanks


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


RE: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Joe Germuska
At 3:58 PM -0500 3/24/04, Pady Srinivasan wrote:
I don't have sample code but are you looking for something like this:

// in Action execute...
ActionErrors errors = new ActionErrors();
// add errors...
...
// set in request
request.setAttribute(org.apache.struts.action.ERROR, errors);
// forward to same page...
When executing validation in an Action, you should use the Action 
method saveErrors rather than directly manipulating the request 
attributes; this guarantees that the errors will be placed in the 
same place that other code is looking for them.

Here's the response I was drafting when this came in:

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws 
Exception
{
  ActionMessages errors = processBusinessValidation(...);
  if (!errors.isEmpty())
  {
saveErrors(request,errors);
return mapping.getInputForward();
  }
  // normal business logic
  return mapping.findForward(...);
}

private ActionMessages processBusinessValidation(...)
{
  ActionMessages errors = new ActionMessages();
  // execute validation, populate errors if necessary
  return errors;
}


--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
-- Jef Raskin

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


RE: blocking bookmarked actions

2004-03-24 Thread Wendy Smoak
 From: Mark Shifman [mailto:[EMAIL PROTECTED] 
 Unfortunately LookupDispatchAction checks for the parameter 
 an throws an 
 error before it gets a chance to use unspecified(), but it should
 be easy enough to modify it and then override dispatchActions 
 unspecified().

What version?  I think unspecified works right at least since 1.2.0,
probably before that.

But you can use the fact that execute is always called first, so
override execute and check for the parameter.  If it's there, just call
super.execute() and things will work, if it's not there, look
up/construct an ActionForward and return that.

Looking at some old code, that's what I used to do... The newer project
doesn't have an execute method and it works fine when the parameter for
a LookupDispatchAction is not in the request.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



html:rewrite action problem

2004-03-24 Thread ruben
i've got the next tag
html:rewrite action=/SomeAction?prefix=page=/SomePage
and in the actionConfig  
action path=/SomeAction 
type=org.apache.type=org.apache.struts.actions.SwitchAction /action

but i always get an error saying that attribute action does not defined 
in the tld?
what could it be?
thanks in advance.

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


Re: Struts validator Regular Expressions

2004-03-24 Thread Frank Schaare
Hi,

this should be very close to \d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}
I need to validate an IP address and I don't know how is the syntax in the
validator config file.
take your time to study this: 
http://java.sun.com/docs/books/tutorial/extra/regex/
It's worth the trouble, regex rox !

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


Re: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Haroon Rafique
On Today at 9:58pm, FS=Frank Schaare [EMAIL PROTECTED] wrote:

FS Hi,
FS 
FS thank you, that helps.
FS 
FS Now i still need to know how to access the input page (set in action 
FS mapping with the input=sample.jsp tag)...

Hopefully you will see Joe's response in the same thread, which has the 
following line in it:

 return mapping.getInputForward();

Later,
--
Haroon Rafique
[EMAIL PROTECTED]


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



Re: i18n with Japanese characters and tags....

2004-03-24 Thread Jason Lea
He was saying it 'can' display Japanese characters. The example doesn't
have any Japanese characters in in (if i remember correctly), but if
they are put into the properties files for the locale they will be
displayed.

You should look into that http://www.anassina.com/struts/i18n/i18n.html
page as it explains a lot.

I think the main problem is you have the Japanese characters already
converted into HTML in your application as yuo have them in the format
#12495;. When you use a bean to write it out, the bean tried to escape
any characters that are significant to HTML, and the '' character is
one of them. That is why it replaces your '' with 'amp;'. The bean is
trying to help by displaying the text you provided in HTML so that it
will appear as #12495; on the page. The 'filter=false' stops it doing
this, but also means if you have some other characters like '' in your
text then they won't be escaped and could cause the page to be rendered
incorrectly.

When I display Japanese characters on my pages I store them in Japanese
in a .properties file, then use native2ascii to convert those japanese
characters into the Java Unicode properties file format of \u. When
java reads them in, the actual unicode character is passed around in
java and output directly into the html page. The page encoding is set to
UTF-8, and the browser can display it correctly. The bean:write will
also still escape the characters that need it such as '' and ''. This
also means I am not dealing with HTML formatting inside my Java code,
and can happily store the same characters in files, databases etc or
output to another device instead of HTML.

-- 
Jason Lea



carlo latasa wrote:

I just checked the example application and did not see anything on Japanese 
characters. I'm at:
http://localhost:8080/struts-example/tour.do

Did you mean that if I were to just take this code and modify it to display 
these characters? Or is the example somewhere else?


  

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 16:12:20 +0900

Carlo,

Have you checked the example application included in Struts1.1(or
current CVS)? It can show Japanese characters correctly without any
special implementations.
I think it will be a help for your problem.

The most frequent mistake in such case is lack of unicode escape
to their message resource files.
Don't forget native2ascii when you make your resource files.

see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org


carlo latasa [EMAIL PROTECTED] wrote:



Hello,

I'm trying to show Japanese characters on my jsp pages however the 
character of the charset is coming back as amp; which is preventing the
characters from being displayed correctly. They look like:


Note, the bean:write tag renders the characters correctly when the 
  

filter


attribute is set to false.

I've got a struts application using both Tomcat and Jrun and I've set my
controller element of the struts-config.xml as:

controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got 
  

a:


%@ page contentType=html/text; charset=JISAutoDetect %

head
  META HTTP-EQUIV=Content-Type CONTENT=text/html; 
  

charset=JISAutoDetect


%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?

Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.


Carlo Latasa -
  

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






Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


-
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: Basic question about ActionForms

2004-03-24 Thread Hubert Rabago
Marco,

This could be caused by how your mappings are configured.  If you can send
more information, someone might spot the cause.

Hubert

--- Marco Mistroni [EMAIL PROTECTED] wrote:
 Hi all,
   In my app I am using a  DynaActionForm with scope = session.
 When I am calling the action for the first time, obviously the 
 Form is 'emtpy', so I populate it with all the values..
 When I am redirected to the action class again, the actionform
 Should be in the session (in theory).
 However, what is in the session looks like an 'empty' actionform as it
 Was before.
 Now the question: if my actionform has scope of session, do I have to 
 Put the value in the session explicitly or struts will do it for me?
 
 
 IT LOOKS like all the values are erased all the time, no matter if I
 have
 Specified as scope session..
 
 Anyone has any clues of what's going on?
 
 Regards   
   marco
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Errors resolving html:text property attribute

2004-03-24 Thread McClung, Brian
I've tracked down the internal PD error message to the use of a bean within
a bean within a bean.  For some reason, html:text is no longer able to
handle the following statement:

html:text name=regForm property=user.user.userName /

It is able to handle:
html:text name=regForm property=user.userName /

When using the first line of code the following exception is thrown:
java.lang.Error: PropertyDescriptor: internal error while merging PDs: type
mismatch between read and write methods at
java.beans.PropertyDescriptor.init(PropertyDescriptor.java:343) at
java.beans.Introspector.processPropertyDescriptors(Introspector.java:649) at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:572) at
java.beans.Introspector.getBeanInfo(Introspector.java:372) at
java.beans.Introspector.getBeanInfo(Introspector.java:144) at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUt
ils.java:949) at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUt
ils.java:979) at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUti
ls.java:887) at
org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.j
ava:1172) at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
ava:772) at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
1) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:952) at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:176)
at
_sharedcontent._registration._register__jsp._jspService(/sharedcontent/regis
tration/templates/register.jsp:17) at
com.caucho.jsp.JavaPage.service(JavaPage.java:75) at
com.caucho.jsp.Page.pageservice(Page.java:555) at
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:155
) at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:1
77) at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:
221) at
com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:392) at
com.caucho.server.port.TcpConnection.run(TcpConnection.java:315) at
com.caucho.util.ThreadPool.runTasks(ThreadPool.java:353) at
com.caucho.util.ThreadPool.run(ThreadPool.java:302) at
java.lang.Thread.run(Thread.java:534) 

Has anybody encountered this problem before?  I have verified that the
accessor methods are returning and accepting the same Object.
Does anyone have a suggestion on how to fix this?  This code has been
running fine for almost 2 years now.

Thanks,

Brian McClung
Senior Programmer
Belo Interactive
214-977-4083



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
Any takers?

ATTA

- Original Message - 
From: atta-ur rehman [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 10:17 AM
Subject: redirect=true and Tiles; does it work?


 Dear all,

 I've been struggling with this problem for about two days now; I hope
 somebody here would be able to help me. In one of my actions I've
 implemented Struts token functionality to keep user from using browser
 Refresh button. Every thing works as promised except for when invalid
token
 message is shown and you press the Refresh button, browser pops up a
message
 saying that there is POSTDATA in the request do you want to sumbit;
clicking
 yes again calls the source action and user again ends up the invalid token
 message.

 now my question is how can I get rid of this post data and browser's
 confirmation message? I thought setting rediect=true to forward should
to
 the trick; but it doesn't! Last night while going thru the archives, I
 figured that this does work when you forward to /someAction.do or
 /somePage.jsp but doesn't work for Tiles definitions!!!

 Any help would be greatly appreciated.

 here are my global forward and action mappings in the struts config file:

 global-forwards
 forward name=invalidToken path=showInvalidTokenMessage.do
 redirect=true /
 /global-forwards

 action path=test class=test.TokenedAction name=testForm
 forward name=success path=greetingsTile redirect=true /
 /action

 Its from within the test.TokenAction that I forward to global forward
 invalidToken.

 Again, thanks in anticipation for any help.

 ATTA



 -
 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: redirect=true and Tiles; does it work?

2004-03-24 Thread Hubert Rabago

--- atta-ur rehman [EMAIL PROTECTED] wrote:
 Any takers?
 

I'll give it a shot.

 ATTA
 
 - Original Message - 
 From: atta-ur rehman [EMAIL PROTECTED]
 
  global-forwards
  forward name=invalidToken path=showInvalidTokenMessage.do
  redirect=true /
  /global-forwards

I believe the path should begin with /.  This should mean you have an
action path=/showInvalidTokenMessage somewhere in the same module.

 
  action path=test class=test.TokenedAction name=testForm
  forward name=success path=greetingsTile redirect=true /
  /action
 

Are you using this success forward as well?  You're redirecting to a tile
definition?  Not sure how that would work.

  Its from within the test.TokenAction that I forward to global forward
  invalidToken.
 
  Again, thanks in anticipation for any help.
 
  ATTA


Hubert


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: Dynamic forward in tiles

2004-03-24 Thread Mike Foody
I have a similar question.  I would like to insert at runtime multiple 
instances of the same layout and set a property at that time.  I didn't 
see a way to do this via the documentation and so extended the TilesTool 
with the following code.  Is there something I've missed?  If not is the 
code below a reasonable way to do this?

Thank you,

Mike

public class TilesTool extends org.apache.velocity.tools.struts.TilesTool {
  
   public String get(Object obj)
   {
   if (obj instanceof ComponentDefinition)
   {
   try
   {
   return processDefinition((ComponentDefinition)obj);
   }
   catch (Exception e)
   {
   Velocity.error(Exception while rendering 
ComponentDefinition + e.getMessage());
   }
   }
   return super.get(obj);
   }
  
   public ComponentDefinition getDefinition(String name)
   {
   ComponentDefinition definition = null;
   try
   {
   definition = TilesUtil.getDefinition(name, this.request, 
this.application);
   }
   catch (DefinitionsFactoryException dfe)
   {
  
   }
   return definition;
   }
  
  
}

Pedro Salgado wrote:

 Below is a reply sent to this mailing list about something very similar to
what you are looking for.
 Hope it helps,

Pedro Salgado

Hi Robert..

I guess you could achieve the same using the controllerClass attribute and
building your class.. For instance, I have this definition in the
tiles-defs.xml file:
---
  definition name=.layout
  path=/common/layout.jsp
   controllerClass='com.dars.XTileAction'
put name=title   value=Encabezado primario/
put name=leftsidevalue=/common/leftside.jsp/
put name=rightside   value=/common/rightside.jsp/
put name=header  value=/common/header.jsp/
put name=footer  value=/common/footer.jsp/
put name=bodyvalue=/common/body.jsp/
  /definition
---
 And I have this controllerClass
---
package com.dars;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.IOException;
public class XTileAction extends TilesAction implements Controller{
   public void perform(ComponentContext tilesctx,
   HttpServletRequest request,
   HttpServletResponse response,
   ServletContext servctx)
   throws ServletException, IOException{
/* GetAttributes */
String titulo= (String)tilesctx.getAttribute(title);
String derecha= (String)tilesctx.getAttribute(rightside);
/* GetAttributes */
System.out.println(  Titulo: +titulo);
System.out.println( Derecha: +derecha);
/* SetAttributes */
  tilesctx.putAttribute(title, Titulo nuevo de esta vaina..);
  tilesctx.putAttribute(rightside, /common/footer.jsp);
/* SetAttributes */
   }
}
---
You can change the values of those attributes at runtime. I prefer to do
it using this method.
Atte.
Domingo A. Rodriguez S.
--- Robert Taylor [EMAIL PROTECTED] escribió:  Greetings, I have a
tiles definition in my tiles-defs.xml similar to
 

below:

definition name=search extends=layout
   put name=heading value={0}Search type=string /
   put name=content value=/search.jsp type=page /
 /definition
which I would like to be able to modify the heading value such that
at runtime I could substitute a value for {0}.
For example, it would be ideal to use a JSTL type of syntax such as:

definition name=search extends=layout
   put name=heading value=${param.myValue}Search type=string /
   put name=content value=/search.jsp type=page /
 /definition
but this does not work.



robert

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

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 24/03/2004 18:14, Mariano García González
[EMAIL PROTECTED] wrote:
 

Hi all,

I am newbie using tiles, so maybe this question is too easy for you.

I want to use a tile definition in which, one of the attribute values is
dynamic. It is something like this:
definition name=tracebox.def.encoderconfig extends=tracebox.def.menu
put name=title value=encoderconfig /
put name=body value=DYNAMIC CONTENT /
/definition
I want to use a dynamic url in body attribute, depending of a bean
attribute.
I hope you understand me. Could you help me?

Thanks,
Mariano.

Re: Dynamic forward in tiles

2004-03-24 Thread Mike Foody
I apologize if I didn't mention it but I'm using the Velocity tiles 
tool.  Maybe that would be a better place for this question. 

Mike



Mike Foody wrote:

I have a similar question.  I would like to insert at runtime multiple 
instances of the same layout and set a property at that time.  I 
didn't see a way to do this via the documentation and so extended the 
TilesTool with the following code.  Is there something I've missed?  
If not is the code below a reasonable way to do this?

Thank you,

Mike

public class TilesTool extends 
org.apache.velocity.tools.struts.TilesTool {
 public String get(Object obj)
   {
   if (obj instanceof ComponentDefinition)
   {
   try
   {
   return processDefinition((ComponentDefinition)obj);
   }
   catch (Exception e)
   {
   Velocity.error(Exception while rendering 
ComponentDefinition + e.getMessage());
   }
   }
   return super.get(obj);
   }
 public ComponentDefinition getDefinition(String name)
   {
   ComponentDefinition definition = null;
   try
   {
   definition = TilesUtil.getDefinition(name, this.request, 
this.application);
   }
   catch (DefinitionsFactoryException dfe)
   {
 }
   return definition;
   }
}

Pedro Salgado wrote:

 Below is a reply sent to this mailing list about something very 
similar to
what you are looking for.

 Hope it helps,

Pedro Salgado

Hi Robert..

I guess you could achieve the same using the controllerClass 
attribute and
building your class.. For instance, I have this definition in the
tiles-defs.xml file:
---
  definition name=.layout
  path=/common/layout.jsp
   controllerClass='com.dars.XTileAction'
put name=title   value=Encabezado primario/
put name=leftsidevalue=/common/leftside.jsp/
put name=rightside   value=/common/rightside.jsp/
put name=header  value=/common/header.jsp/
put name=footer  value=/common/footer.jsp/
put name=bodyvalue=/common/body.jsp/
  /definition
---
 And I have this controllerClass
---
package com.dars;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.IOException;

public class XTileAction extends TilesAction implements Controller{
   public void perform(ComponentContext tilesctx,
   HttpServletRequest request,
   HttpServletResponse response,
   ServletContext servctx)
   throws ServletException, IOException{
/* GetAttributes */
String titulo= (String)tilesctx.getAttribute(title);
String derecha= (String)tilesctx.getAttribute(rightside);
/* GetAttributes */
System.out.println(  Titulo: +titulo);
System.out.println( Derecha: +derecha);
/* SetAttributes */
  tilesctx.putAttribute(title, Titulo nuevo de esta 
vaina..);
  tilesctx.putAttribute(rightside, /common/footer.jsp);
/* SetAttributes */
   }
}
---
You can change the values of those attributes at runtime. I prefer to do
it using this method.

Atte.
Domingo A. Rodriguez S.
--- Robert Taylor [EMAIL PROTECTED] escribió:  Greetings, I have a
tiles definition in my tiles-defs.xml similar to
 

below:

definition name=search extends=layout
   put name=heading value={0}Search type=string /
   put name=content value=/search.jsp type=page /
 /definition
which I would like to be able to modify the heading value such that
at runtime I could substitute a value for {0}.
For example, it would be ideal to use a JSTL type of syntax such as:

definition name=search extends=layout
   put name=heading value=${param.myValue}Search type=string /
   put name=content value=/search.jsp type=page /
 /definition
but this does not work.



robert

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


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 24/03/2004 18:14, Mariano García González
[EMAIL PROTECTED] wrote:
 

Hi all,

I am newbie using tiles, so maybe this question is too easy for you.

I want to use a tile definition in which, one of the attribute 
values is
dynamic. It is something like this:

definition name=tracebox.def.encoderconfig 
extends=tracebox.def.menu
put name=title value=encoderconfig /
put name=body value=DYNAMIC 

RE: redirect=true and Tiles; does it work?

2004-03-24 Thread David Friedman
Atta,

A redirect in a tile cannot possibly work (and I've tried  researched it
months ago).  To use a redirect in a forward, you must have a file system
object to reach such as an html file, a jsp, or an application mapping (i.e.
struts *.do).  Since a tile is only internal to Struts, and not an external
item, your tile cannot work as the server and file system would not have a
.mytileDefinition mapped to anything concrete.

That said, you can make a JSP pull in and show a tile so your redirect can
be to showtile.jsp with contents such as the below 2 lines:
%@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles
%
tiles:insert beanName=someDefinition flush=true /

I might be off with one or two parameters of the tiles:insert because I
haven't needed to do that in a long time.

I just read your note about velocity tiles but since I haven't used them, I
can't answer that.  I suppose if you had a servlet mapping for *.vm files
you could redirect to your someDefinition.vm and it would work as that is an
application mapping, as I mentioned above (2nd sentence).

Regards,
David

-Original Message-
From: atta-ur rehman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 5:12 PM
To: Struts Users Mailing List
Subject: Re: redirect=true and Tiles; does it work?


Any takers?

ATTA

- Original Message -
From: atta-ur rehman [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 10:17 AM
Subject: redirect=true and Tiles; does it work?


 Dear all,

 I've been struggling with this problem for about two days now; I hope
 somebody here would be able to help me. In one of my actions I've
 implemented Struts token functionality to keep user from using browser
 Refresh button. Every thing works as promised except for when invalid
token
 message is shown and you press the Refresh button, browser pops up a
message
 saying that there is POSTDATA in the request do you want to sumbit;
clicking
 yes again calls the source action and user again ends up the invalid token
 message.

 now my question is how can I get rid of this post data and browser's
 confirmation message? I thought setting rediect=true to forward should
to
 the trick; but it doesn't! Last night while going thru the archives, I
 figured that this does work when you forward to /someAction.do or
 /somePage.jsp but doesn't work for Tiles definitions!!!

 Any help would be greatly appreciated.

 here are my global forward and action mappings in the struts config file:

 global-forwards
 forward name=invalidToken path=showInvalidTokenMessage.do
 redirect=true /
 /global-forwards

 action path=test class=test.TokenedAction name=testForm
 forward name=success path=greetingsTile redirect=true /
 /action

 Its from within the test.TokenAction that I forward to global forward
 invalidToken.

 Again, thanks in anticipation for any help.

 ATTA



 -
 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: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
Oh, thanks, Hubert. In the mentioned last night archive brwosing I remember
seeing your post on the topic; I think we can make it happen!!!

I should have copied these lines from config file instead of using my head:

global-forwards
 forward name=invalidToken path=/showInvalidTokenMessage.do
redirect=true/
/global-forwards

action path=/showInvalidTokenMessage
type=org.apache.struts.actions.ForwardAction
parameter=invalidTokenMessageTile/

action path=/processTest type=com.open.webapp.test.TestProcessAction
name=testForm input=testTile scope=request
forward name=success path=greetingsTile redirect=true/
 /action

TestProcessAction just forwards to success forward. But before it does
that it check for the valid token and in the case of an invalid token it
just forwards (redirects) to the invalidToken global forward.

On invalid token message press refresh again calls the test action with the
browser confirmation.

Does it make better sense now?

Thanks for your help.

ATTA

- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 2:13 PM
Subject: Re: redirect=true and Tiles; does it work?



 --- atta-ur rehman [EMAIL PROTECTED] wrote:
  Any takers?
 

 I'll give it a shot.

  ATTA
 
  - Original Message - 
  From: atta-ur rehman [EMAIL PROTECTED]
 
   global-forwards
   forward name=invalidToken path=showInvalidTokenMessage.do
   redirect=true /
   /global-forwards

 I believe the path should begin with /.  This should mean you have an
 action path=/showInvalidTokenMessage somewhere in the same module.

  
   action path=test class=test.TokenedAction name=testForm
   forward name=success path=greetingsTile redirect=true /
   /action
  

 Are you using this success forward as well?  You're redirecting to a
tile
 definition?  Not sure how that would work.

   Its from within the test.TokenAction that I forward to global forward
   invalidToken.
  
   Again, thanks in anticipation for any help.
  
   ATTA


 Hubert


 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html

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





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



Re: Dynamic forward in tiles

2004-03-24 Thread Pedro Salgado
On 24/03/2004 22:45, Mike Foody [EMAIL PROTECTED] wrote:

 I apologize if I didn't mention it but I'm using the Velocity tiles
 tool.  Maybe that would be a better place for this question.
 

  Well the solution for your problem is the one below.
I don't if your using velocity to generate your tiles file (I use velocity
just to build SQL/DAOs with the OJB framework).
If this is true, then you just have to make it generate a tiles file with a
controller class defined by you.

  The runtime argument must be handled by you, programatically, in your own
tiles controller class.



Pedro Salgado

 Mike
 
 
 
 
 Mike Foody wrote:
 
 I have a similar question.  I would like to insert at runtime multiple
 instances of the same layout and set a property at that time.  I
 didn't see a way to do this via the documentation and so extended the
 TilesTool with the following code.  Is there something I've missed?
 If not is the code below a reasonable way to do this?
 
 Thank you,
 
 Mike
 
 
 public class TilesTool extends
 org.apache.velocity.tools.struts.TilesTool {
  public String get(Object obj)
{
if (obj instanceof ComponentDefinition)
{
try
{
return processDefinition((ComponentDefinition)obj);
}
catch (Exception e)
{
Velocity.error(Exception while rendering
 ComponentDefinition + e.getMessage());
}
}
return super.get(obj);
}
  public ComponentDefinition getDefinition(String name)
{
ComponentDefinition definition = null;
try
{
definition = TilesUtil.getDefinition(name, this.request,
 this.application);
}
catch (DefinitionsFactoryException dfe)
{
  }
return definition;
}
 }
 
 Pedro Salgado wrote:
 
  Below is a reply sent to this mailing list about something very
 similar to
 what you are looking for.
 
  Hope it helps,
 
 Pedro Salgado
 
 
 Hi Robert..
 
 I guess you could achieve the same using the controllerClass
 attribute and
 building your class.. For instance, I have this definition in the
 tiles-defs.xml file:
 ---
   definition name=.layout
   path=/common/layout.jsp
controllerClass='com.dars.XTileAction'
 put name=title   value=Encabezado primario/
 put name=leftsidevalue=/common/leftside.jsp/
 put name=rightside   value=/common/rightside.jsp/
 put name=header  value=/common/header.jsp/
 put name=footer  value=/common/footer.jsp/
 put name=bodyvalue=/common/body.jsp/
   /definition
 ---
  And I have this controllerClass
 ---
 package com.dars;
 import org.apache.struts.tiles.actions.TilesAction;
 import org.apache.struts.tiles.ComponentContext;
 import org.apache.struts.tiles.Controller;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import java.io.IOException;
 
 public class XTileAction extends TilesAction implements Controller{
public void perform(ComponentContext tilesctx,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servctx)
throws ServletException, IOException{
 /* GetAttributes */
 String titulo= (String)tilesctx.getAttribute(title);
 String derecha= (String)tilesctx.getAttribute(rightside);
 /* GetAttributes */
 System.out.println(  Titulo: +titulo);
 System.out.println( Derecha: +derecha);
 /* SetAttributes */
   tilesctx.putAttribute(title, Titulo nuevo de esta
 vaina..);
   tilesctx.putAttribute(rightside, /common/footer.jsp);
 /* SetAttributes */
}
 }
 ---
 You can change the values of those attributes at runtime. I prefer to do
 it using this method.
 
 Atte.
 Domingo A. Rodriguez S.
 
 
 --- Robert Taylor [EMAIL PROTECTED] escribió:  Greetings, I have a
 tiles definition in my tiles-defs.xml similar to
  
 
 below:
 
 definition name=search extends=layout
put name=heading value={0}Search type=string /
put name=content value=/search.jsp type=page /
  /definition
 
 which I would like to be able to modify the heading value such that
 at runtime I could substitute a value for {0}.
 
 For example, it would be ideal to use a JSTL type of syntax such as:
 
 definition name=search extends=layout
put name=heading value=${param.myValue}Search type=string /
put name=content value=/search.jsp type=page /
  /definition
 
 but this does not work.
 
 
 
 robert
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
   
 
 
 _
 Do You Yahoo!?
 Información de Estados Unidos y América Latina, en Yahoo! 

Re: html:options where values have embedded quotes

2004-03-24 Thread Doug
Anyone?

Doug wrote:

We have some customer-supplied selection options that have double quotes 
in their values, and Struts 1.1 isn't seeming to handle this correctly.

Best I can tell from the HTML spec, these should be placed on the page 
as quot; , which will submit them as %22 , which *should* be seen on 
the server side as double quotes again, right?  And Struts should be 
able to match that to an existing entry so it can properly set the 
selected value.

Instead, it seems the options tag isn't escaping the quotes at all 
(changing them to quot;) and that if we manually do it ourselves, the 
selected item still isn't being set when the page is reloaded.  IIRC, 
the tag is just leaving the quotes inside the attribute value, which 
outputs invalid HTML.

Am I missing something?  Is there a better way to do this?  Thanks.

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


Re: redirect=true and Tiles; does it work?

2004-03-24 Thread Hubert Rabago

--- atta-ur rehman [EMAIL PROTECTED] wrote:
 TestProcessAction just forwards to success forward. But before it does
 that it check for the valid token and in the case of an invalid token it
 just forwards (redirects) to the invalidToken global forward.
 
 On invalid token message press refresh again calls the test action with the
 browser confirmation.

After the redirect and before pressing refresh, what's the URL shown on the
browser?


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
http://localhost:8080/test/processTest.do

and if and press Refresh here the url changes to:
http://localhost:8080/test/showInvalidTokenMessage.do

ATTA
- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 3:07 PM
Subject: Re: redirect=true and Tiles; does it work?



 --- atta-ur rehman [EMAIL PROTECTED] wrote:
  TestProcessAction just forwards to success forward. But before it does
  that it check for the valid token and in the case of an invalid token it
  just forwards (redirects) to the invalidToken global forward.
 
  On invalid token message press refresh again calls the test action with
the
  browser confirmation.

 After the redirect and before pressing refresh, what's the URL shown on
the
 browser?


 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html

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





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



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread Hubert Rabago
Is this correct?

1. User submits the form to /processTest.do

2. The action for /processTest.do, TestProcessAction, sees that the token is
invalid and returns an ActionForward that redirects to
/showInvalidTokenMessage.do

3. /showInvalidTokenMessage.do forwards to the invalidTokenMessageTile
tile, at which time the browser shows
http://localhost:8080/test/showInvalidTokenMessage.do; on the address bar

4. The user sees the invalidTokenMessageTile tile and clicks on refresh

And you're saying that with
http://localhost:8080/test/showInvalidTokenMessage.do; on the address bar,
the user clicks on refresh and causes TestProcessAction to execute again?


--- atta-ur rehman [EMAIL PROTECTED] wrote:
 http://localhost:8080/test/processTest.do
 
 and if and press Refresh here the url changes to:
 http://localhost:8080/test/showInvalidTokenMessage.do
 
 ATTA
 - Original Message - 
 From: Hubert Rabago [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, March 24, 2004 3:07 PM
 Subject: Re: redirect=true and Tiles; does it work?
 
 
 
  --- atta-ur rehman [EMAIL PROTECTED] wrote:
   TestProcessAction just forwards to success forward. But before it
 does
   that it check for the valid token and in the case of an invalid token
 it
   just forwards (redirects) to the invalidToken global forward.
  
   On invalid token message press refresh again calls the test action with
 the
   browser confirmation.
 
  After the redirect and before pressing refresh, what's the URL shown on
 the
  browser?


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
See inline, please.

- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 3:56 PM
Subject: Re: redirect=true and Tiles; does it work?


 Is this correct?

 1. User submits the form to /processTest.do

TRUE.

 2. The action for /processTest.do, TestProcessAction, sees that the token
is
 invalid and returns an ActionForward that redirects to
 /showInvalidTokenMessage.do

Actually to mapping.findForward(invalidToken) which is global forward to
/showInvalidTokenMessage.do. So I assume the answer is TRUE; though i'm not
sure.


 3. /showInvalidTokenMessage.do forwards to the invalidTokenMessageTile
 tile, at which time the browser shows
 http://localhost:8080/test/showInvalidTokenMessage.do; on the address bar

TRUE.


 4. The user sees the invalidTokenMessageTile tile and clicks on refresh

 And you're saying that with
 http://localhost:8080/test/showInvalidTokenMessage.do; on the address
bar,
 the user clicks on refresh and causes TestProcessAction to execute again?

TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In between
these messages I thought I should give IE try and on IE 6.0.2800 the action
is not called neither do I see the confrimation message of posting again!

Boils down to Browser?



 --- atta-ur rehman [EMAIL PROTECTED] wrote:
  http://localhost:8080/test/processTest.do
  and if and press Refresh here the url changes to:
  http://localhost:8080/test/showInvalidTokenMessage.do
 
  ATTA
  - Original Message - 
  From: Hubert Rabago [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, March 24, 2004 3:07 PM
  Subject: Re: redirect=true and Tiles; does it work?
 
 
  
   --- atta-ur rehman [EMAIL PROTECTED] wrote:
TestProcessAction just forwards to success forward. But before it
  does
that it check for the valid token and in the case of an invalid
token
  it
just forwards (redirects) to the invalidToken global forward.
   
On invalid token message press refresh again calls the test action
with
  the
browser confirmation.
  
   After the redirect and before pressing refresh, what's the URL shown
on
  the
   browser?


 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html

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





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



RE: pre-populating DynaValidatorForm

2004-03-24 Thread Yee, Richard K,,DMDCWEST
Dean,
Here's the essential code in order to instantiate a DynaActionForm from
within an Action class.

 FormBeanConfig fbc = new FormBeanConfig();
 fbc.setName(myForm);
 DynaActionFormClass dafc =
 DynaActionFormClass.createDynaActionFormClass(fbc);
 DynaActionForm formBean = (DynaActionForm) dafc.newInstance();
 formBean.set(myProperty, someValue);
 request.setAttribute(myDynaForm,formBean);

-Richard
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 7:48 AM
To: Struts Users Mailing List
Subject: Re: pre-populating DynaValidatorForm


See http://www.mail-archive.com/[EMAIL PROTECTED]/msg96035.html

hth,
Hubert

--- Dean A. Hoover [EMAIL PROTECTED] wrote:
 I am using struts 1.1, and I am directly instantiating a
 DynaValidatorForm in
 my Action class. I am hesitant to embrace struts 1.2 at this time, 
 especially if
 the difference between 1.1 and 1.2 is as large as betwee 1.0 and 1.1. Is 
 there
 some other way to accomplish it?
 
 Dean Hoover
 
 Hubert Rabago wrote:
 
 What version of Struts are you using?  How are you instantiating your 
 Dyna*Form?  Struts 1.1 didn't really have direct support for 
 instantiating DyanForms from an Action object.  Struts 1.2.0/nightly 
 build does.  Is it possible that you're using 1.1 and instantiating the
form incorrectly?
 
   
 


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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

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



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
I'm sorry, I spoke too soon:

  3. /showInvalidTokenMessage.do forwards to the
invalidTokenMessageTile
  tile, at which time the browser shows
  http://localhost:8080/test/showInvalidTokenMessage.do; on the address
bar

TRUE in Mozilla FireBird 0.7. In IE 6.0 I still see /processTest.do!


- Original Message - 
From: atta-ur rehman [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 4:11 PM
Subject: Re: redirect=true and Tiles; does it work?


 See inline, please.

 - Original Message - 
 From: Hubert Rabago [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, March 24, 2004 3:56 PM
 Subject: Re: redirect=true and Tiles; does it work?


  Is this correct?
 
  1. User submits the form to /processTest.do

 TRUE.
 
  2. The action for /processTest.do, TestProcessAction, sees that the
token
 is
  invalid and returns an ActionForward that redirects to
  /showInvalidTokenMessage.do

 Actually to mapping.findForward(invalidToken) which is global forward to
 /showInvalidTokenMessage.do. So I assume the answer is TRUE; though i'm
not
 sure.

 
  3. /showInvalidTokenMessage.do forwards to the
invalidTokenMessageTile
  tile, at which time the browser shows
  http://localhost:8080/test/showInvalidTokenMessage.do; on the address
bar

 TRUE.

 
  4. The user sees the invalidTokenMessageTile tile and clicks on
refresh
 
  And you're saying that with
  http://localhost:8080/test/showInvalidTokenMessage.do; on the address
 bar,
  the user clicks on refresh and causes TestProcessAction to execute
again?

 TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In between
 these messages I thought I should give IE try and on IE 6.0.2800 the
action
 is not called neither do I see the confrimation message of posting again!

 Boils down to Browser?

 
 
  --- atta-ur rehman [EMAIL PROTECTED] wrote:
   http://localhost:8080/test/processTest.do
   and if and press Refresh here the url changes to:
   http://localhost:8080/test/showInvalidTokenMessage.do
  
   ATTA
   - Original Message - 
   From: Hubert Rabago [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Sent: Wednesday, March 24, 2004 3:07 PM
   Subject: Re: redirect=true and Tiles; does it work?
  
  
   
--- atta-ur rehman [EMAIL PROTECTED] wrote:
 TestProcessAction just forwards to success forward. But before
it
   does
 that it check for the valid token and in the case of an invalid
 token
   it
 just forwards (redirects) to the invalidToken global forward.

 On invalid token message press refresh again calls the test action
 with
   the
 browser confirmation.
   
After the redirect and before pressing refresh, what's the URL shown
 on
   the
browser?
 
 
  __
  Do you Yahoo!?
  Yahoo! Finance Tax Center - File online. File on time.
  http://taxes.yahoo.com/filing.html
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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





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



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
I can confirm the stated behavior for both Mozilla FireFox 0.8 and Netscape
7.1 too.

- Original Message - 
From: atta-ur rehman [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 4:15 PM
Subject: Re: redirect=true and Tiles; does it work?


 I'm sorry, I spoke too soon:

   3. /showInvalidTokenMessage.do forwards to the
 invalidTokenMessageTile
   tile, at which time the browser shows
   http://localhost:8080/test/showInvalidTokenMessage.do; on the address
 bar

 TRUE in Mozilla FireBird 0.7. In IE 6.0 I still see /processTest.do!


 - Original Message - 
 From: atta-ur rehman [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, March 24, 2004 4:11 PM
 Subject: Re: redirect=true and Tiles; does it work?


  See inline, please.
 
  - Original Message - 
  From: Hubert Rabago [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, March 24, 2004 3:56 PM
  Subject: Re: redirect=true and Tiles; does it work?
 
 
   Is this correct?
  
   1. User submits the form to /processTest.do
 
  TRUE.
  
   2. The action for /processTest.do, TestProcessAction, sees that the
 token
  is
   invalid and returns an ActionForward that redirects to
   /showInvalidTokenMessage.do
 
  Actually to mapping.findForward(invalidToken) which is global forward
to
  /showInvalidTokenMessage.do. So I assume the answer is TRUE; though i'm
 not
  sure.
 
  
   3. /showInvalidTokenMessage.do forwards to the
 invalidTokenMessageTile
   tile, at which time the browser shows
   http://localhost:8080/test/showInvalidTokenMessage.do; on the address
 bar
 
  TRUE.
 
  
   4. The user sees the invalidTokenMessageTile tile and clicks on
 refresh
  
   And you're saying that with
   http://localhost:8080/test/showInvalidTokenMessage.do; on the address
  bar,
   the user clicks on refresh and causes TestProcessAction to execute
 again?
 
  TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In
between
  these messages I thought I should give IE try and on IE 6.0.2800 the
 action
  is not called neither do I see the confrimation message of posting
again!
 
  Boils down to Browser?
 
  
  
   --- atta-ur rehman [EMAIL PROTECTED] wrote:
http://localhost:8080/test/processTest.do
and if and press Refresh here the url changes to:
http://localhost:8080/test/showInvalidTokenMessage.do
   
ATTA
- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 3:07 PM
Subject: Re: redirect=true and Tiles; does it work?
   
   

 --- atta-ur rehman [EMAIL PROTECTED] wrote:
  TestProcessAction just forwards to success forward. But before
 it
does
  that it check for the valid token and in the case of an invalid
  token
it
  just forwards (redirects) to the invalidToken global forward.
 
  On invalid token message press refresh again calls the test
action
  with
the
  browser confirmation.

 After the redirect and before pressing refresh, what's the URL
shown
  on
the
 browser?
  
  
   __
   Do you Yahoo!?
   Yahoo! Finance Tax Center - File online. File on time.
   http://taxes.yahoo.com/filing.html
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 -
 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: redirect=true and Tiles; does it work?

2004-03-24 Thread Hubert Rabago
  And you're saying that with
  http://localhost:8080/test/showInvalidTokenMessage.do; on the address
 bar,
  the user clicks on refresh and causes TestProcessAction to execute again?
 
 TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In between
 these messages I thought I should give IE try and on IE 6.0.2800 the action
 is not called neither do I see the confrimation message of posting again!
 
 Boils down to Browser?

That's the way I see it.  My interpretation of how it should work is the
browser should refresh the last request, and the server already told the
browser to request /showInvalidTokenMessage.do and in fact that's what's on
the address bar.  If my interpretation is incorrect, somebody please let me
know.  If this is a browser bug, maybe it's time to upgrade to Firefox 0.8.

confused/,
Hubert

--- atta-ur rehman [EMAIL PROTECTED] wrote:
 See inline, please.
 
 - Original Message - 
 From: Hubert Rabago [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, March 24, 2004 3:56 PM
 Subject: Re: redirect=true and Tiles; does it work?
 
 
  Is this correct?
 
  1. User submits the form to /processTest.do
 
 TRUE.
 
  2. The action for /processTest.do, TestProcessAction, sees that the token
 is
  invalid and returns an ActionForward that redirects to
  /showInvalidTokenMessage.do
 
 Actually to mapping.findForward(invalidToken) which is global forward to
 /showInvalidTokenMessage.do. So I assume the answer is TRUE; though i'm not
 sure.
 
 
  3. /showInvalidTokenMessage.do forwards to the
 invalidTokenMessageTile
  tile, at which time the browser shows
  http://localhost:8080/test/showInvalidTokenMessage.do; on the address
 bar
 
 TRUE.
 
 
  4. The user sees the invalidTokenMessageTile tile and clicks on refresh
 
  And you're saying that with
  http://localhost:8080/test/showInvalidTokenMessage.do; on the address
 bar,
  the user clicks on refresh and causes TestProcessAction to execute again?
 
 TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In between
 these messages I thought I should give IE try and on IE 6.0.2800 the action
 is not called neither do I see the confrimation message of posting again!
 
 Boils down to Browser?
 
 
 


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: redirect=true and Tiles; does it work?

2004-03-24 Thread atta-ur rehman
I'm confused too!

for invalid token message, IE show /processTest.do in the address bar. but
when i click the refresh button, a quick look at the status bar show that
its calling /showInvalidTokenMessage.do! Yet, refresh after refresh, IE
still shows /processTest.do in the address bar.

FireBird, FireFox and Netscape 7.1 show /showInvalidTokenMessage.do in the
address bar but also popup the dialog to confir repost!

I'm only afraid to have screwed up something real bad here :)


ATTA

- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 4:13 PM
Subject: Re: redirect=true and Tiles; does it work?


   And you're saying that with
   http://localhost:8080/test/showInvalidTokenMessage.do; on the address
  bar,
   the user clicks on refresh and causes TestProcessAction to execute
again?
 
  TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In
between
  these messages I thought I should give IE try and on IE 6.0.2800 the
action
  is not called neither do I see the confrimation message of posting
again!
 
  Boils down to Browser?

 That's the way I see it.  My interpretation of how it should work is the
 browser should refresh the last request, and the server already told the
 browser to request /showInvalidTokenMessage.do and in fact that's what's
on
 the address bar.  If my interpretation is incorrect, somebody please let
me
 know.  If this is a browser bug, maybe it's time to upgrade to Firefox
0.8.

 confused/,
 Hubert

 --- atta-ur rehman [EMAIL PROTECTED] wrote:
  See inline, please.
 
  - Original Message - 
  From: Hubert Rabago [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, March 24, 2004 3:56 PM
  Subject: Re: redirect=true and Tiles; does it work?
 
 
   Is this correct?
  
   1. User submits the form to /processTest.do
 
  TRUE.
  
   2. The action for /processTest.do, TestProcessAction, sees that the
token
  is
   invalid and returns an ActionForward that redirects to
   /showInvalidTokenMessage.do
 
  Actually to mapping.findForward(invalidToken) which is global forward
to
  /showInvalidTokenMessage.do. So I assume the answer is TRUE; though i'm
not
  sure.
 
  
   3. /showInvalidTokenMessage.do forwards to the
  invalidTokenMessageTile
   tile, at which time the browser shows
   http://localhost:8080/test/showInvalidTokenMessage.do; on the address
  bar
 
  TRUE.
 
  
   4. The user sees the invalidTokenMessageTile tile and clicks on
refresh
  
   And you're saying that with
   http://localhost:8080/test/showInvalidTokenMessage.do; on the address
  bar,
   the user clicks on refresh and causes TestProcessAction to execute
again?
 
  TRUE in Mozilla FireBird 0.7!!! And that's my default browser. In
between
  these messages I thought I should give IE try and on IE 6.0.2800 the
action
  is not called neither do I see the confrimation message of posting
again!
 
  Boils down to Browser?
 
  
  


 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html

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





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



Re: i18n with Japanese characters and tags....

2004-03-24 Thread carlo latasa
Thanks so much Jason!

I'll try that out when I get a chance. I'm fairly sure that was the first 
thing that I tried but I probably forgot something.

Thanks again-


From: Jason Lea [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Thu, 25 Mar 2004 09:39:40 +1200
He was saying it 'can' display Japanese characters. The example doesn't
have any Japanese characters in in (if i remember correctly), but if
they are put into the properties files for the locale they will be
displayed.
You should look into that http://www.anassina.com/struts/i18n/i18n.html
page as it explains a lot.
I think the main problem is you have the Japanese characters already
converted into HTML in your application as yuo have them in the format
#12495;. When you use a bean to write it out, the bean tried to escape
any characters that are significant to HTML, and the '' character is
one of them. That is why it replaces your '' with 'amp;'. The bean is
trying to help by displaying the text you provided in HTML so that it
will appear as #12495; on the page. The 'filter=false' stops it doing
this, but also means if you have some other characters like '' in your
text then they won't be escaped and could cause the page to be rendered
incorrectly.
When I display Japanese characters on my pages I store them in Japanese
in a .properties file, then use native2ascii to convert those japanese
characters into the Java Unicode properties file format of \u. When
java reads them in, the actual unicode character is passed around in
java and output directly into the html page. The page encoding is set to
UTF-8, and the browser can display it correctly. The bean:write will
also still escape the characters that need it such as '' and ''. This
also means I am not dealing with HTML formatting inside my Java code,
and can happily store the same characters in files, databases etc or
output to another device instead of HTML.
--
Jason Lea


carlo latasa wrote:

I just checked the example application and did not see anything on 
Japanese
characters. I'm at:
http://localhost:8080/struts-example/tour.do

Did you mean that if I were to just take this code and modify it to 
display
these characters? Or is the example somewhere else?




From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 16:12:20 +0900

Carlo,

Have you checked the example application included in Struts1.1(or
current CVS)? It can show Japanese characters correctly without any
special implementations.
I think it will be a help for your problem.

The most frequent mistake in such case is lack of unicode escape
to their message resource files.
Don't forget native2ascii when you make your resource files.

see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org


carlo latasa [EMAIL PROTECTED] wrote:



Hello,

I'm trying to show Japanese characters on my jsp pages however the 
character of the charset is coming back as amp; which is preventing 
the
characters from being displayed correctly. They look like:
ƒLƒJƒXƒn

Note, the bean:write tag renders the characters correctly when the


filter


attribute is set to false.

I've got a struts application using both Tomcat and Jrun and I've set 
my
controller element of the struts-config.xml as:

controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got


a:


%@ page contentType=html/text; charset=JISAutoDetect %

head
  META HTTP-EQUIV=Content-Type CONTENT=text/html;


charset=JISAutoDetect


%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?

Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.


Carlo Latasa -


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






Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page EFREE
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


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


Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567


Re: Struts validator Regular Expressions

2004-03-24 Thread Niall Pemberton
Validator does use ORO - There is an applet you can play with to test your
regexp:

http://jakarta.apache.org/oro/demo.html

Choose the contains option and start/end your regular expressions with ^
and $

Niall

- Original Message - 
From: Takhar, Sandeep [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 6:52 PM
Subject: RE: Struts validator Regular Expressions


don't quote me but the javadocs for jakarta's regular expression's RE class
are ok.

Also I believe everything is based on jakarta's oro.

sandeep

-Original Message-
From: Joao Batistella [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 1:33 PM
To: 'Struts Users Mailing List'
Subject: Struts validator Regular Expressions


Hello!

Do you know any document where can I learn how to build regular expressions
for Struts Validator?

I need to validate an IP address and I don't know how is the syntax in the
validator config file.

Thanks,
JP

-
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: Automatically detecting struts-config changes and reload app.

2004-03-24 Thread Antony Paul
I could not understand what is admin mappings. I am using Struts 1.1
downloaded few months ago. There is nothing like admin in struts-config.xml
included with struts-blank.war. If you please explain it it will be usefule.
I presume that it is similar to Tomcat manager application and I have to
reload it every time by pointing the browser to it. I want it to
automatically detect the change and reload the context . What are other
developers doing to reload the context on struts-config change ?.

Antony Paul

- Original Message -
From: Geeta Ramani [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 7:01 PM
Subject: Re: Automatically detecting struts-config changes and reload app.


 Hey Antony:

 Check out the struts admin functionality: Make sure you have the admin
 mappings in your struts-config.xml, then point your browser to
 /yourContext/admin/reload.do and you'll see the magic..:)

 Regards,
 Geeta

 Antony Paul wrote:

  Is it possible to automatically detect changes in struts-config.xml and
  reload the application ?. I know that Log4J(or Tomcat) detects changes
to
  log4j.properties and reload the application.
 
  Antony Paul
 
  -
  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]



Tile Problem

2004-03-24 Thread Caroline Jen
In general, the tile works fine for me except the
title piece.
  
[CODE]
.
BODY
tiles:getAsString name=title/
tiles:get name=header/
tiles:get name=message/
tiles:get name=content/
tiles:get name=navbar/
/BODY
.
[/CODE]

In my tiles-def.xml, I have:

[CODE]
   definition name=.article.Menu
extends=.article.Base
  put name=title
value=article.Menu.title/
  put name=content  
value=/article/content/menu.jsp/
  put name=navbar   
value=/article/common/navbarMenu.jsp/
   /definition
[/CODE]

The problem is that my application displays 

article.Menu.title

in the browser, instead of going to the
application.properties (which is in the
ApplicationRoot/WEB-INF/classes/resources folder) to
get 

article.Menu.title=Registered Members

What should I do?

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



RE: Struts validator Regular Expressions

2004-03-24 Thread Janarthan Sathiamurthy
Hi,

This is a good one to get started -
http://weblogtoolscollection.com/regex/regex.php

Best Regards,
Janarthan S

-Original Message-
From: Joao Batistella [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 12:03 AM
To: 'Struts Users Mailing List'
Subject: Struts validator Regular Expressions


Hello!

Do you know any document where can I learn how to build regular expressions
for Struts Validator?

I need to validate an IP address and I don't know how is the syntax in the
validator config file.

Thanks,
JP

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



Re: Tile Problem

2004-03-24 Thread Jason Lea
If you are using JSTL you can do this:

tile:useAttribute id=titleKey name=titlebean:message 
key=${titleKey}/

if that doesn't work, try this:

c:set var=titleKeytiles:getAsString 
name=title//c:setbean:message key=${titleKey}/



Caroline Jen wrote:

In general, the tile works fine for me except the
title piece.
 
[CODE]
.
BODY
tiles:getAsString name=title/
tiles:get name=header/
tiles:get name=message/
tiles:get name=content/
tiles:get name=navbar/
/BODY
.
[/CODE]

In my tiles-def.xml, I have:

[CODE]
  definition name=.article.Menu
extends=.article.Base
 put name=title
value=article.Menu.title/
 put name=content  
value=/article/content/menu.jsp/
 put name=navbar   
value=/article/common/navbarMenu.jsp/
  /definition
[/CODE]

The problem is that my application displays 

article.Menu.title

in the browser, instead of going to the
application.properties (which is in the
ApplicationRoot/WEB-INF/classes/resources folder) to
get 

article.Menu.title=Registered Members

What should I do?

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--
Jason Lea


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


  1   2   >