About Action Form

2004-10-15 Thread Koon Yue Lam
Hi, suppose I have 2 actions which each has its own action form
A1 will have F1
A2 will have F2

and we have JSP1, JSP2 and JSP3

it is like a 2 steps wizard, 
user first access JSP1 and when submit, A1 is executed and populate
F1, it then forward to JSP2

user will select some data in JSP2 and when submit, A2 is executed and
populate F2

The question is the data need to populate F2 is determined by what
user select on F1, but only one action form can be associated to
action. How do A2 know what user has selected??

any help will be appreciated

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



Struts-Faces

2004-10-15 Thread Ratnakar Parakala
Hi,
 
I started implementing Struts-Faces integration library. I looked at the examples 
provided with the library. I have few doubts:
 
1. Does the library support using action paths for validations in  tag? I was using it for quite long time in a standalone struts 
application. If I use it the same way, the page is not getting displayed and throwing 
page compilation errors.
 
2. Does all the struts 1.2.4 features are supported in Struts-Faces? For example, 
token reload etc.
 
3. How can I call an action from a JSF page and submit the data to the database?
 
4. Can I use Frames in JSF page? I have a requirement - Left side frame display a tree 
and right frame displays the details page and buttons to add new node. When I add a 
new node in the right frame, the new record should appear in the tree. How can I 
achieve this?
 
5. I would like to use standard HTML tags in a JSF page like table, tr etc. This is 
because to have same look and feel generated by the JSF page. How can I achieve it 
using JSF?
 
6. When Struts-Faces next release is scheduled? 
 
Thanx
Ratnakar

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

RE: [REPOST] Get Raw Action Path.

2004-10-15 Thread David G. Friedman
A solution in Struts v1.2.4 is at hand, too bad it's not some quick method
call like getPattern().  If you can figure out what I did, you can use it.
:)  Seriously, I obtained a raw list of Action Mappings (unprocessed paths,
as in Struts config files), then I used a Struts util class WildCardHelper
to match the patterns, and viola!

WARNING: Since my webapp has only one struts config file, I haven't tested
this code with Modules.  If it doesn't work and you have modules, you'll
have to figure out how to check the ActionConfig's in each module's
ModuleConfig (and how to get each modules ModuleConfig).

WARNING #2: Use the below code at your own risk.

WARNING #3: If I find you using my package name, I'm going to beat you with
my copy of Struts In Action! (Am I joking?)

package com.friedsoftware.struts;

import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.config.ActionConfig;
import org.apache.struts.util.WildcardHelper;

/**
 * @author David
 * @struts.action path = "/hello" validate = "false" name = "DavidForm"
 * @struts.action path = "/hi_there" validate = "false"
 * @struts.action path = "/testpatt/**" validate = "false"
 * @struts.action-forward name = "success" path = "/index.jsp"
 */

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

int counter = 0, pattern[];
boolean result;
ActionConfig[] aConfig = mapping.getModuleConfig().findActionConfigs();
HashMap hm = new HashMap();
String myPath = request.getPathInfo();
WildcardHelper wh = new WildcardHelper();

while (counter < aConfig.length) {
pattern = wh.compilePattern(aConfig[counter].getPath());

//  HERE IT COMES **
result = wh.match(hm, myPath, pattern);
if (result) {

// ** Okay, now what do YOU want
// to do here? Now that you've found
// the regular pattern, or wildcard
// expression?
break;
}
counter++;
}
return (mapping.findForward("success"));
};
}
// End of Class

Regards,
David

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Alan Pocklington
Sent: Friday, October 15, 2004 10:55 AM
To: [EMAIL PROTECTED]
Subject: Re: [REPOST] Get Raw Action Path.


Thanks for the pointer.  I've been looking through the RequestProcessor
source without any luck so far.  Maybe I'll stumble across it soon.

Erik Weber <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:

> I don't know the specific answer to your question, but I learned a lot
> by writing a method that prints out the key and value for every
> attribute in every scope, and calling that method at various points
> along the RequestProcessor timeline (by overriding various methods of
> RequestProcessor). RequestProcessor invokes a dozen or so methods on
> itself for every request, and during that time many attributes are set
> and/or removed from various scopes.
>
> I do recall that the controller Servlet mapping was available. Not
> sure about specific Action mappings.
>
> Erik
>
>
>
> Alan Pocklington wrote:
>
>>I have an Action defined as:
>>
>>  >  path="/myaction/**"
>>  type="...MyAction"/>
>>
>>Within the Action class itself I want to get at the path attribute as
>>defined in the config file, i.e.
>>/myaction/**.
>>
>>I can get the requested path, for example /myaction/somepath/xxx.do
>>via actionMapping.getPath() but not the original path to which the
>>action was mapped.  Is there any way I can get at this?
>>
>>Thanks in advance.
>>
>>
>>-
>>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]



logic:iterate and table display

2004-10-15 Thread Vijay Vishvas Dharap
Hi all,

I have following scenario.. 
I have FormBean which has getter and setter for my VO object

In VO I have a list of another VO.

Now on this form I want to display the contents of the list using
logic.iterate tags.

I will make matter simpler saying...

aFormBean has aVO which as list of bVO. bVO has attributes like xAttr,
yAttr, zAttr.

now aForm should show on the page table where contents of list of bVO
will be giving one one row of the table.


Any help is appreciated.

Thanks,
Vijay dharap


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



Re: Where Is the Best Place To Store Files?

2004-10-15 Thread Eddie Bush
It doesn't necessarily have anything to do with being superior or inferior. 
Perhaps they have the DBs living on a small farm and that farm is already 
being used heavily.  Perhaps the absolutely cannot justify sucking bandwidth 
on the route between the web server and db server.  There's tons of reasons 
this might not be the most sound architecture.

I'd always heard to save the files to disk, save a reference (path) to them 
in the DB and then serve them off disk.  You could stick them under WEB-INF 
as suggested earlier and that would protect them from direct access, but, 
yes, you're right, you'd have to have an action stream them out then.

Do they just need to be accessible after upload?  Do you care who accesses 
them?  There are actually ways to protect your files that do not involve 
sticking them below WEB-INF and streaming them.  You might want to consider 
setting up a security-constraint.  If you're not familiar with those, check 
the Servlet specification.  Jason Hunter mentions them in his book, "Java 
Servlet Programming".  Indeed, there are many resources for this.

Regards,
Eddie
- Original Message - 
From: "Michael McGrady" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 13, 2004 3:06 PM
Subject: Re: Where Is the Best Place To Store Files?


Unless, of course, you are using something like HSQLdb, in which case, 
tell him he is a smart-ass.  Seriously, there are difficulties with some 
databases in this respect.  Don't know what you are using, and Vic if 
probably right that your "superior" is "inferior".

Michael McGrady
Vic Cekvenich wrote:
Caroline Jen wrote:
I am already told by my superior "do not save those
files into the database".
What should I do?

Tell him he is a dumb-ass?
;-)
.V
-
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]


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0442-3, 10/15/2004
Tested on: 10/15/2004 8:26:36 PM
avast! - copyright (c) 2000-2004 ALWIL Software.
http://www.avast.com

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


Re: The old 'please wait' issue

2004-10-15 Thread Eddie Bush
You've got a template somewhere that dictates the layout for your pages, 
right?  So, what's to keep you from having a template -- exactly like that 
one -- with a meta refresh tag in the head?  Hrm ... that might be too easy 
though.  You might even see some reuse out of it if you have other time you 
wish to do this same thing.

Regards,
Eddie
- Original Message - 
From: "andy wix" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 13, 2004 10:29 AM
Subject: The old 'please wait' issue


Hi,
I am trying to implement a 'please wait' page and have seen the stuff in 
the archives.
The method of choice seems to be:

* The Action that is currently doing the work should instead fire  off a 
background thread to do it.  It  then forwards to a "Please Wait" page.

* The background thread does its work then sets a flag in the user's 
session when it's done.

* The "Please Wait" uses a meta-refresh tag to automatically submit itself 
every few seconds, with the destination being a "Done Yet" action.

* The "Done Yet" action will consult the flag variable in the user's 
session.
If its not there, forward back to the "Please Wait" page again.  If it's 
done, forward to the view from the original action.

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

Thanks,
Andy 

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0442-3, 10/15/2004
Tested on: 10/15/2004 8:17:09 PM
avast! - copyright (c) 2000-2004 ALWIL Software.
http://www.avast.com

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


RE: mechanism to clear objects in the session

2004-10-15 Thread David G. Friedman
Have you tried making any objects you intend to keep in session implement
the javax.servlet.http.HttpSessionListener interface? Then, when an object
is destroyed, you could have defined the "void
sessionDestroyed(HttpSessionEvent se)" method to close down any dependencies
or zero out any data before garbage collection.

I think this is a servlet 2.X thing so various Java applications servers
probably support it.

Regards,
David

-Original Message-
From: lixin chu [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 8:33 PM
To: Struts Users Mailing List
Subject: RE: mechanism to clear objects in the session


thanks. I will think about it. it is new to me.
googled, and find
http://www.codeguru.com/java/tij/tij0051.shtml
whih has an example.

--- "McCormack, Chris"
<[EMAIL PROTECTED]> wrote:

> I haven't tried this yet, but maybe any objects that
> you intend to put in the session should have a nice
> finalize section to tidy themselves up before being
> removed by GC. You could then effectively force GC
> on these objects by System.runFinalization() when
> you needed without keeping track of what you are
> putting in the session.
>
> Just having a muse over morning coffee, don't know
> how practical/viable this solution is :)
>
> Chris McCormack
>
> -Original Message-
> From: lixin chu [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 10:05
> To: Struts Users Mailing List
> Subject: Re: mechanism to clear objects in the
> session
>
>
> thanks. it indeed helps me, in fact the points are
> critical - i need to think my use cases twice, and
> you
> have also pointed out a couple of choices. i will
> try
> to come out a cleaner implementation in my system.
> thanks again !
>
>
>
> --- Erik Weber <[EMAIL PROTECTED]> wrote:
>
> > There was no common solution discussed that I
> > recall. But, the idea is,
> > put a class to work in a place where it can
> monitor
> > every request. For
> > example, in a Servlet Filter, or in a Struts
> > RequestProcessor subclass,
> > or an Action base class. As far as I know, there
> is
> > no existing
> > framework or common utility for doing this sort of
> > thing. I have found
> > that using a common naming convention (or even a
> > common key) for these
> > types of session attributes makes programming the
> > cleanup easier.
> > Tracking page flow and deciding what's going with
> > the flow and what's
> > going against the flow is up to you.
> >
> > A real simple first implementation might be to
> clean
> > out all session
> > attributes (such as forms) that are considered
> > "working" attributes (not
> > those, such as "user" objects, that are needed for
> > the lifetime of the
> > session) whenever the user returns to the "home"
> > page (in your "home"
> > Action).
> >
> > It is worth noting that good navigation design
> > inherently makes this
> > sort of thing easier. Applications should have
> > "home" views, and
> > sections of the application should have their own
> > "home" views. When the
> > user finishes a task, he returns to the home view
> > for the section he's
> > using, or to the main home view. This is where you
> > can do cleanup (while
> > you are preparing the home view).
> >
> > Or not. The particular design isn't really
> relevant.
> > The point is to
> > design *something*, to think it through ahead of
> > time, instead of just
> > drawing pages and making them "work".
> >
> > Sorry I didn't help much.
> >
> > Erik
> >
> >
> >
> > lixin chu wrote:
> >
> > >Hi,
> > >I saw an ealier thread discussing this but still
> > can
> > >not fully understand the solution.
> > >
> > >appreciate if any one can provide some more
> > detailed
> > >info on this. basically if the current page flow
> is
> > >terminated for some reason, how the Struts
> > application
> > >can clear the objects stored in the session ?
> > >
> > >thanks
> > >li xin
> > >
> >
> >__
> > >Do You Yahoo!?
> > >Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > >http://mail.yahoo.com
> > >
> >
>
>-
> > >To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> >
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
> ***
> This e-mail and its attachments are confidential
> and are intended for the above named recipient
> only. If this has come to you 

RE: mechanism to clear objects in the session

2004-10-15 Thread lixin chu
thanks. I will think about it. it is new to me.
googled, and find
http://www.codeguru.com/java/tij/tij0051.shtml
whih has an example. 

--- "McCormack, Chris"
<[EMAIL PROTECTED]> wrote:

> I haven't tried this yet, but maybe any objects that
> you intend to put in the session should have a nice
> finalize section to tidy themselves up before being
> removed by GC. You could then effectively force GC
> on these objects by System.runFinalization() when
> you needed without keeping track of what you are
> putting in the session.
> 
> Just having a muse over morning coffee, don't know
> how practical/viable this solution is :)
> 
> Chris McCormack
> 
> -Original Message-
> From: lixin chu [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 10:05
> To: Struts Users Mailing List
> Subject: Re: mechanism to clear objects in the
> session
> 
> 
> thanks. it indeed helps me, in fact the points are
> critical - i need to think my use cases twice, and
> you
> have also pointed out a couple of choices. i will
> try
> to come out a cleaner implementation in my system.
> thanks again !
> 
> 
> 
> --- Erik Weber <[EMAIL PROTECTED]> wrote:
> 
> > There was no common solution discussed that I
> > recall. But, the idea is, 
> > put a class to work in a place where it can
> monitor
> > every request. For 
> > example, in a Servlet Filter, or in a Struts
> > RequestProcessor subclass, 
> > or an Action base class. As far as I know, there
> is
> > no existing 
> > framework or common utility for doing this sort of
> > thing. I have found 
> > that using a common naming convention (or even a
> > common key) for these 
> > types of session attributes makes programming the
> > cleanup easier. 
> > Tracking page flow and deciding what's going with
> > the flow and what's 
> > going against the flow is up to you.
> > 
> > A real simple first implementation might be to
> clean
> > out all session 
> > attributes (such as forms) that are considered
> > "working" attributes (not 
> > those, such as "user" objects, that are needed for
> > the lifetime of the 
> > session) whenever the user returns to the "home"
> > page (in your "home" 
> > Action).
> > 
> > It is worth noting that good navigation design
> > inherently makes this 
> > sort of thing easier. Applications should have
> > "home" views, and 
> > sections of the application should have their own
> > "home" views. When the 
> > user finishes a task, he returns to the home view
> > for the section he's 
> > using, or to the main home view. This is where you
> > can do cleanup (while 
> > you are preparing the home view).
> > 
> > Or not. The particular design isn't really
> relevant.
> > The point is to 
> > design *something*, to think it through ahead of
> > time, instead of just 
> > drawing pages and making them "work".
> > 
> > Sorry I didn't help much.
> > 
> > Erik
> > 
> > 
> > 
> > lixin chu wrote:
> > 
> > >Hi,
> > >I saw an ealier thread discussing this but still
> > can
> > >not fully understand the solution.
> > >
> > >appreciate if any one can provide some more
> > detailed
> > >info on this. basically if the current page flow
> is
> > >terminated for some reason, how the Struts
> > application
> > >can clear the objects stored in the session ?
> > >
> > >thanks
> > >li xin
> > >
> >
> >__
> > >Do You Yahoo!?
> > >Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > >http://mail.yahoo.com 
> > >
> >
>
>-
> > >To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> > >  
> > >
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> ***
> 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.
> *

RE: struts and caching

2004-10-15 Thread David G. Friedman
Same goes for an alternative O/R and query mapper named Hibernate. :) 
At http://www.hibernate.org

Regards,
David

-Original Message-
From: Paul Woods [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 11:53 AM
To: Struts Users Mailing List
Subject: Re: struts and caching


Have you seen iBatis?  It lets you configure how the cache works on a
per query basis if you want.  You can put your sql into xml files as
well, very handy.  http://www.ibatis.com/


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


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



Re: Using the checkbox tag with java.lang.Boolean

2004-10-15 Thread Shinobu Kawai
Hi Brantley,

> I have a form which has a Map of properties.  I use the Map just fine
> with every field on the form, except for my checkboxes.



> When I look at the form contents, I see that the value of that property
> never changes from "false", even though the form was submitted with a
> checked box.
> 
> Can the checkbox tag handle java.lang.Boolean or is this something weird
> with it being a mapped value?
Yeah, the HTML spec is weird:
http://www.w3.org/TR/html401/interact/forms.html#checkbox
Only checked checkboxes get submitted, so there's no way of telling
that a checkbox was unchecked.

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai <[EMAIL PROTECTED]>

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



RE: The Type of a Form Property is of org.apache.struts.upload.FormFile

2004-10-15 Thread Joe Hertz

> From: Caroline Jen
> A property in my form, 'theFile',is of the
> org.apache.struts.upload.FormFile type.
>
> In my struts-config.xml file, do I still give a
> java.lang.String type:

Nope.

You said it yourself. Since it's a FormFile in your form, you declare it as
a FormFile in the form. :-)

> and then use the BeanUtils.copyProperties( ... ) in
> the Action to convert it to the FormFile type?

No. What the users sends you will come into your request on the form as an
instance of a FormFile.

You'll use the FormFile class methods to do what you need to with it (get
the data, etc).



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



Re: Sanity check: Struts 1.2.4/Tomcat config

2004-10-15 Thread Kevin Clifton
Doh -should have thought of that! That was the next logical thing to
try, wasn't it?

Thanks, that fixed it! 

Kev

On Fri, 15 Oct 2004 11:31:04 -0700 (PDT), Brian Showalter
<[EMAIL PROTECTED]> wrote:
> Did you create an actual welcome.do file (it could be empty) in your
> directory?
> 
> 
> 
> 
> --- Kevin Clifton <[EMAIL PROTECTED]> wrote:
> 
> > Maybe it's the lack of caffeine, but I can't make this work. I've
> > got
> > a  element in web.xml, and I've added welcome.do
> > as
> > a file in that list, but Tomcat (5.0.27) isn't attempting to load
> > that
> > URL, as far as I can tell.
> 
>

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



The Type of a Form Property is of org.apache.struts.upload.FormFile

2004-10-15 Thread Caroline Jen
A property in my form, 'theFile',is of the
org.apache.struts.upload.FormFile type.

In my struts-config.xml file, do I still give a
java.lang.String type:

  
  

and then use the BeanUtils.copyProperties( ... ) in
the Action to convert it to the FormFile type?

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

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



RE: Sanity check: Struts 1.2.4/Tomcat config

2004-10-15 Thread Durham David R Jr Contr 805 CSPTS/SCE
Try /welcome.do


- Dave 

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



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread Leandro Melo
It's seems allright.


 --- David Suarez <[EMAIL PROTECTED]>
escreveu: 
> How about creating a hash/digest when you send the
> page down with your
> read-only fields and save it to session/hidden (you
> know the +/-), then
> compare it on the re-submit to see if any of the
> values have changed.
> If so, throw SecurityException or something similar?
> 
> Would that work for you...djsuarez
> 
> -Original Message-
> From: Lee Harrington [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 15, 2004 8:52 AM
> To: Struts Users Mailing List
> Subject: Re: Exposing ActionForm and MVC fields
> 
> >  In this case, i`m still suceptible to be
> > hacked by javascript, because of the ActionForm
> fields
> > exposure.
> > What about that???
> 
> Different actions.  I'd reccomend a dispatch action
> class...with
> different methods depending on whether the buyer or
> seller submitted. 
> That way, in the seller method, even if they did
> hack the submit form
> you action would not be doing anything with those
> fields.
> 
> Lee
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  

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

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



Re: Sanity check: Struts 1.2.4/Tomcat config

2004-10-15 Thread Brian Showalter
Did you create an actual welcome.do file (it could be empty) in your
directory?


--- Kevin Clifton <[EMAIL PROTECTED]> wrote:

> Maybe it's the lack of caffeine, but I can't make this work. I've
> got
> a  element in web.xml, and I've added welcome.do
> as
> a file in that list, but Tomcat (5.0.27) isn't attempting to load
> that
> URL, as far as I can tell.


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



Re: Still cannot get it thru with Tiles

2004-10-15 Thread Caroline Jen
Do you have the statement below toward the very end of
the struts-config.xml file?

  




  

-Caroline
--- PC Leung <[EMAIL PROTECTED]> wrote:

> Can anyone give me a simple enough example
> so that I can modify my little app of using Tiles?
> 
> my little app has basic tiles config
> header, menu, content and footer.
> 
> When a URL in JSP of the content layout is clicked,
> the content layout is expected to change with
> another
> JSP. Header, menu and footer is expected to be kept
> unchanged.
> Simple enough.
> 
> However after clicking in the first page, nothing is
> changed!!!
> It stays at the welcome page; it does not go to
> login page.
> 
> Someone suggests to use ComponentContext
> so that content layout JSP can be changed
> dynamically.
> But I do not know how to define in Struts-Config.xml
> and where to put the ComponentContext
> (in a separate class file or in the same Action
> class)?
> 
> My first page:
> <%@ page contentType="text/html;charset=UTF-8"
> language="java" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld"
> prefix="tiles" %>
> 
>  flush="true" />
> 
> My tiles-defs.xml:
>path="/layout/classicLayout.jsp">
> 
> 
> 
> 
> 
>   
> 
> My Main.jsp content layout (Welcome page):
> ...
> 
> 
> 
> 
> ...
> 
> My struts-config.xml:
> type="com.security.user.LoginAction"
>name="loginForm"
>  scope="request" 
>  validate="true" 
>input="/Login.jsp">
>path="/SecurityMaint.jsp"/>
>   
>   
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




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

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



Re: Sanity check: Struts 1.2.4/Tomcat config

2004-10-15 Thread Kevin Clifton
Thanks Craig.

Maybe it's the lack of caffeine, but I can't make this work. I've got
a  element in web.xml, and I've added welcome.do as
a file in that list, but Tomcat (5.0.27) isn't attempting to load that
URL, as far as I can tell.

I did add an "index.jsp" element to the welcome-file-list, and dropped
an index.jsp file into the directory, and that works, so I at least
have a workaround hack that I can use. But I'd like to get a pure
mapping solution to this, so that I don't have to keep an index.jsp in
each module that I build.

I thought that maybe Tomcat was getting confused between trying to
find file named welcome.do vs. just having a mapping, so I also tested
by remapping my signin module to a different URL. Here's what I did:

1) Duplicate the signup module's  element in the Struts
ActionServlet config, mapping it to config/test.
2) Redeploy the webapp and hit localhost/webapp/test, and got a 404 from Tomcat.
3) Hit localhost/webapp/test/welcome.do, and got the first screen of
my signup module.

Under this setup, there's no directory on the server that matches the
/webapp/test URL, so it's all a soft mapping. And it behaves exactly
the same as when I have it pointed at my /signup module, which does
have a matching directory. FWIW, I also tried this with directory
listings enabled and disabled, with no change in outcome. Also FWIW, 
this is Tomcat 5.0.27 with a 2.4 DTD for web.xml.

Can you see anything blatently wrong that I'm doing?

Thanks,
Kev

On Thu, 14 Oct 2004 14:51:05 -0700, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> All you need to do is add a "welcome file" element in web.xml that
> points the user at your login action:
> 
>   
> welcome.do
>   
> 
> This won't work in Tomcat 4, but does work in Tomcat 5.  (NOTE:  if
> you're using Servlet 2.3 or earlier format for your web.xml file, the
> order of the elements is defined in the DTD; for Servlet 2.4 or later
> you can have them in any order).
> 
> Craig
> 
> 
> 



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



Semantic Search - Software Company Needs Feedback

2004-10-15 Thread David Watson
We are looking for java developers and architects to try a new product
that we are developing.  Think of it as Google for IT.  Our product has
the ability to crawl through source code and provide a powerful search
capability that is powered by semantics.  In this case, we have crawled
through several java development frameworks (Struts, JDK, Eclipse,
NetBeans, JUnit) and are trying to get some product feedback.

 

If you are interested, setup is easy.  Send an email to
[EMAIL PROTECTED] and we'll send you login credentials and a URL.
Try it out and let us know what you think.

 

Thanks in advance for your help.

 



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread Leandro Melo
Hi Freddy, i agree with you in parts.
Actually, i don`t have a formal workflow graph, but i
do have it in some sketches.
I think the point here is more about workflow
implementations details, isn`t it???



 --- "Freddy Villalba A." <[EMAIL PROTECTED]>
escreveu: 
> Hi,
> 
> 
> I believe you shouldn't abuse neither from the MVC
> pattern or the Struts'
> framework. All the issues regarding buyer's actions
> as well as seller's are
> part of an specific area: workflow management.
> 
> Implement a basic WF Management subsystem (or
> integrate one into your
> application), define the roles (buyer / seller /
> whatever...), the actions
> (along with the corresponding pre- and post-), the
> nodes, etc... and yes,
> have your presentation layer (Struts) integrate with
> it. I know it's not
> simple or cheap... yet, I'm almost convinced that,
> at the end, it would've
> been a good investment for you and your project.
> 
> Save yourself from trying to convert Struts into an
> all-mighty-god-who-knows-and-solves-everything tool.
> 
> For me, that's the bottom-line for all these issues.
> 
> Again, just my oppinion. HTH.
> 
> Cheers,
> Freddy.
> 
> 
> -Mensaje original-
> De: David Suarez [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 15 de octubre de 2004 17:06
> Para: [EMAIL PROTECTED]; Struts Users Mailing List
> Asunto: RE: Exposing ActionForm and MVC fields
> 
> 
> How about creating a hash/digest when you send the
> page down with your
> read-only fields and save it to session/hidden (you
> know the +/-), then
> compare it on the re-submit to see if any of the
> values have changed.
> If so, throw SecurityException or something similar?
> 
> Would that work for you...djsuarez
> 
> -Original Message-
> From: Lee Harrington [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 8:52 AM
> To: Struts Users Mailing List
> Subject: Re: Exposing ActionForm and MVC fields
> 
> >  In this case, i`m still suceptible to be
> > hacked by javascript, because of the ActionForm
> fields
> > exposure.
> > What about that???
> 
> Different actions.  I'd reccomend a dispatch action
> class...with
> different methods depending on whether the buyer or
> seller submitted.
> That way, in the seller method, even if they did
> hack the submit form
> you action would not be doing anything with those
> fields.
> 
> Lee
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  

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

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



Re: FieldChecks change signature and no longer returns value

2004-10-15 Thread Niall Pemberton
No, I'm not responsible - all I did was let them know they didn't have the
current release of struts on their site.

I don't know much about gentoo (first I heard of it was from you!), but its
probably best to post a bug here:

http://bugs.gentoo.org

Niall

- Original Message - 
From: "Mick Wever" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 4:28 PM
Subject: Re: FieldChecks change signature and no longer returns value


> > Gentoo now has the latest version.
> You're responsible for the ebuild? Thanks!
> But doesn't build:
>
> >>> Source unpacked.
> Buildfile: build.xml does not exist!
> Build failed
>
> Mick.



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



Re: Setting order on populate of form

2004-10-15 Thread Honza Spurný
Thanks for answer.

This is I was afraid of .

:o(

Thanks.
Honza S.

Jeff Beal wrote:
> Anything's possible.  You'll have to re-write the processPopulate
> method
> in a custom RequestProcessor to enforce the order of properties that
> you want.  That doesn't mean it's a good idea.  I would **strongly**
> suggest re-writing your ActionForm so that it doesn't need to behave
> that way.
>
> -- Jeff
>
> Honza Spurný wrote:
>> Hi there
>> I have the problem I'm not able to solve:
>>
>> I have form and formBean and I need to set one attribute to be saved
>> into the bean as a first attribute at all.
>>
>> That's mean, that I have form with two hidden values: value1 and
>> value2. After submiting the form I need value1 to be saved into the
>> bean BEFORE value2...
>>
>> Is there any way how do it? I'm trying to do it for few hours and I
>> didn't find how to do it.
>>
>> Thanks a lot for helps.
>>
>>
>> Honza Spurny
>
>
> -
> 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: Setting order on populate of form

2004-10-15 Thread Jeff Beal
Anything's possible.  You'll have to re-write the processPopulate method 
in a custom RequestProcessor to enforce the order of properties that you 
want.  That doesn't mean it's a good idea.  I would **strongly** suggest 
re-writing your ActionForm so that it doesn't need to behave that way.

-- Jeff
Honza Spurný wrote:
Hi there
I have the problem I'm not able to solve:
I have form and formBean and I need to set one attribute to be saved into
the bean as a first attribute at all.
That's mean, that I have form with two hidden values: value1 and value2.
After submiting the form I need value1 to be saved into the bean BEFORE
value2...
Is there any way how do it? I'm trying to do it for few hours and I didn't
find how to do it.
Thanks a lot for helps.
Honza Spurny

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


Re: streaming binary data to client

2004-10-15 Thread Hubert Rabago
Sure you can.
You already have access to the HttpServletResponse in your Action
class, just use that the way you would in a regular servlet, and have
the Action return null.


On Fri, 15 Oct 2004 10:46:56 -0500, josh <[EMAIL PROTECTED]> wrote:
> Is it possible to stream binary data like a pdf to the client browser
> using struts?  I was reading somewhere that I will need to have a
> seperate servlet to do that part because you can't change the mime type
> using the struts framework.
> 
> --
> Joshua Cronemeyer
> 
> 
>

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



Re: struts and caching

2004-10-15 Thread Paul Woods
Have you seen iBatis?  It lets you configure how the cache works on a
per query basis if you want.  You can put your sql into xml files as
well, very handy.  http://www.ibatis.com/


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



Re: Still cannot get it thru with Tiles

2004-10-15 Thread Jeff Beal
You should be using action="login" not forward="login" in your 
html:link.  The forward attribute uses a global forward to direct the 
request.  (And I forget if the forward slash is required or not.)

-- Jeff
PC Leung wrote:
My Main.jsp content layout (Welcome page):
...




...
My struts-config.xml:

   type="com.security.user.LoginAction"
   name="loginForm"
	   scope="request" 
	   validate="true" 
   input="/Login.jsp">
  
  
  


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


streaming binary data to client

2004-10-15 Thread josh
Is it possible to stream binary data like a pdf to the client browser
using struts?  I was reading somewhere that I will need to have a
seperate servlet to do that part because you can't change the mime type
using the struts framework.

-- 
Joshua Cronemeyer



signature.asc
Description: This is a digitally signed message part


Setting order on populate of form

2004-10-15 Thread Honza Spurný
Hi there
I have the problem I'm not able to solve:

I have form and formBean and I need to set one attribute to be saved into
the bean as a first attribute at all.

That's mean, that I have form with two hidden values: value1 and value2.
After submiting the form I need value1 to be saved into the bean BEFORE
value2...

Is there any way how do it? I'm trying to do it for few hours and I didn't
find how to do it.

Thanks a lot for helps.


Honza Spurny



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



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread Freddy Villalba A.
Hi,


I believe you shouldn't abuse neither from the MVC pattern or the Struts'
framework. All the issues regarding buyer's actions as well as seller's are
part of an specific area: workflow management.

Implement a basic WF Management subsystem (or integrate one into your
application), define the roles (buyer / seller / whatever...), the actions
(along with the corresponding pre- and post-), the nodes, etc... and yes,
have your presentation layer (Struts) integrate with it. I know it's not
simple or cheap... yet, I'm almost convinced that, at the end, it would've
been a good investment for you and your project.

Save yourself from trying to convert Struts into an
all-mighty-god-who-knows-and-solves-everything tool.

For me, that's the bottom-line for all these issues.

Again, just my oppinion. HTH.

Cheers,
Freddy.


-Mensaje original-
De: David Suarez [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 15 de octubre de 2004 17:06
Para: [EMAIL PROTECTED]; Struts Users Mailing List
Asunto: RE: Exposing ActionForm and MVC fields


How about creating a hash/digest when you send the page down with your
read-only fields and save it to session/hidden (you know the +/-), then
compare it on the re-submit to see if any of the values have changed.
If so, throw SecurityException or something similar?

Would that work for you...djsuarez

-Original Message-
From: Lee Harrington [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 8:52 AM
To: Struts Users Mailing List
Subject: Re: Exposing ActionForm and MVC fields

>  In this case, i`m still suceptible to be
> hacked by javascript, because of the ActionForm fields
> exposure.
> What about that???

Different actions.  I'd reccomend a dispatch action class...with
different methods depending on whether the buyer or seller submitted.
That way, in the seller method, even if they did hack the submit form
you action would not be doing anything with those fields.

Lee

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

2004-10-15 Thread John Fitzpatrick
Thanks for the response.

I was doing some more thinking about this after posting the question -- What
I really need is the request parameters to be preserved. As I'm using
DynaActionForms, I think I could just store a copy of the form after each
request; and, then if I intercept a login/language change, simply substitute
the stored form for the submitted one. Obviously I'd need to ensure that the
form is for the page being requested now, but I think that should work. Any
problems you see?


On 20041015 11:17 AM, "Kris Schneider" <[EMAIL PROTECTED]> wrote:

> As to storing the request instances, here's something of interest from the
> Servlet 2.3 spec:
> 
> ===
> SRV.4.10 Lifetime of the Request Object
> Each request object is valid only within the scpoe of a servlet’s service
> method, or within the scope of a filter’s doFilter method. Containers commonly
> recycle request objects in order to avoid the performance overhead of request
> object creation. The developer must be aware that maintaining references to
> request objects outside the scope described above may lead to
> non-deterministic
> behavior.
> ===
> 
> You can certainly pull some data out of the request (params, properties, etc.)
> and store that, but do not maintain a reference to the actual request object.
> 
> Quoting John Fitzpatrick <[EMAIL PROTECTED]>:
> 
>> This may be slightly off-topic for this list, but here goes anyway:
>> 
>> I'm working on a Struts site which must be i18n compatible and have a login
>> system where some of the pages are protected. What I'm looking to accomplish
>> is two fold:
>> 
>> 1. When viewing any page, including query results, be able to select a
>> language from the pull-down menu and get the page the same page back in the
>> new language.
>> 
>> 2. When requesting a page that is protected, have the user be prompted to
>> authenticate and then receive the originally requested page. Or, have a
>> login form on each page which will return the same page with just the login
>> details changed.
>> 
>> To accomplish this, I attempted to store each HttpServletRequest in the
>> session and then check for a language change, or login request, in an
>> ancestor of each action, process that change and then serve the previous
>> request. However, when I take the stored request out of the session, it's
>> handle to the Session is now 'null.'
>> 
>> Has anyone had some experience attempting something like this, or am I
>> barking up entirely the wrong tree here?
>> 
>> FWIW, I've looked at JAAS and don't feel that it suits our needs. The role
>> handling is simply too coarse. 


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



RE: help : Thanks Joe - chaining actions in Struts -

2004-10-15 Thread Joe Germuska
At 7:24 PM +0530 10/15/04, sachin wrote:
Thanks Joe
I have quit the idea of chaining actions.
It is true that Struts was never designed to for action forwarding.
My main concern was to have some common functionality independantly
which i can do better by creating own replica of Action , ActionForm and
ActionServlet etc . . and chaining can be avoided altogether ..
Note that where you might extend ActionServlet, you might also be 
able to use Struts PlugIns or J2EE ServletContextListeners to 
initialize supporting classes at application startup time instead. 
The reason to choose PlugIns is if you want your PlugIn to be aware 
of the Struts Module in which it was configured, or if you are still 
using Servlet 2.2, which didn't have ServletContextListener (or, if 
you're like me and you've been using PlugIns for a long time and are 
too lazy to switch.)

Typically, a PlugIn (or SCL) gets instantiated and triggered during 
the setup process of the ServletContext.  The way I typically use it 
is to instantiate and configure some business expert class and put 
that class in the ServletContext under a well known key.  Then, my 
Actions can reliably get that class out of the ServletContext and use 
it as a facade over business processes about which they shouldn't 
know any more than necessary.(I'll often have a base Action class 
which provides a typesafe "getXXXExpert" method which knows the 
ServletContext key and makes that all a little cleaner.  More 
recently, we've inverted that model to make a base action which 
builds an ActionContext bean which encapsulates the request, 
response, form, and mapping, and which then has property accessors 
for these kinds of experts as well.  It's a little more setup ahead 
of time, but I'm finding it a nice way to do things.  On the dev 
list, we've talked a bit about making this something that is built in 
to Struts, but it hasn't gotten much past talk.

I suppose strictly speaking, this isn't all that different from your 
actions getting a custom subclass of ActionServlet and using it as 
the expert, but I'm more comfortable with a sharper separation of 
concerns.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

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


Re: HttpServletRequest Question

2004-10-15 Thread Kris Schneider
As to storing the request instances, here's something of interest from the
Servlet 2.3 spec:

===
SRV.4.10 Lifetime of the Request Object
Each request object is valid only within the scpoe of a servlet’s service
method, or within the scope of a filter’s doFilter method. Containers commonly
recycle request objects in order to avoid the performance overhead of request
object creation. The developer must be aware that maintaining references to
request objects outside the scope described above may lead to non-deterministic
behavior.
===

You can certainly pull some data out of the request (params, properties, etc.)
and store that, but do not maintain a reference to the actual request object.

Quoting John Fitzpatrick <[EMAIL PROTECTED]>:

> This may be slightly off-topic for this list, but here goes anyway:
> 
> I'm working on a Struts site which must be i18n compatible and have a login
> system where some of the pages are protected. What I'm looking to accomplish
> is two fold:
> 
> 1. When viewing any page, including query results, be able to select a
> language from the pull-down menu and get the page the same page back in the
> new language.
> 
> 2. When requesting a page that is protected, have the user be prompted to
> authenticate and then receive the originally requested page. Or, have a
> login form on each page which will return the same page with just the login
> details changed.
> 
> To accomplish this, I attempted to store each HttpServletRequest in the
> session and then check for a language change, or login request, in an
> ancestor of each action, process that change and then serve the previous
> request. However, when I take the stored request out of the session, it's
> handle to the Session is now 'null.'
> 
> Has anyone had some experience attempting something like this, or am I
> barking up entirely the wrong tree here?
> 
> FWIW, I've looked at JAAS and don't feel that it suits our needs. The role
> handling is simply too coarse. 

-- 
Kris Schneider 
D.O.Tech   

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



Still cannot get it thru with Tiles

2004-10-15 Thread PC Leung
Can anyone give me a simple enough example
so that I can modify my little app of using Tiles?

my little app has basic tiles config
header, menu, content and footer.

When a URL in JSP of the content layout is clicked,
the content layout is expected to change with another
JSP. Header, menu and footer is expected to be kept unchanged.
Simple enough.

However after clicking in the first page, nothing is changed!!!
It stays at the welcome page; it does not go to login page.

Someone suggests to use ComponentContext
so that content layout JSP can be changed dynamically.
But I do not know how to define in Struts-Config.xml
and where to put the ComponentContext
(in a separate class file or in the same Action class)?

My first page:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>



My tiles-defs.xml:
  
  
  
  
  
  
  

My Main.jsp content layout (Welcome page):
...




...

My struts-config.xml:

  
  
  


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



Using the checkbox tag with java.lang.Boolean

2004-10-15 Thread Brantley Hobbs
All,

I have a form which has a Map of properties.  I use the Map just fine
with every field on the form, except for my checkboxes.

The values in the Map must be objects, so I used java.lang.Boolean to
represent the Boolean value for the checkbox.

In my JSP I use the tag thusly:

 -
Essential Facility

As I said before, the object represented by value(essential) is a
java.lang.Boolean.

When I look at the form contents, I see that the value of that property
never changes from "false", even though the form was submitted with a
checked box.

Can the checkbox tag handle java.lang.Boolean or is this something weird
with it being a mapped value?
 
Thanks,
Brantley


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



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread David Suarez
How about creating a hash/digest when you send the page down with your
read-only fields and save it to session/hidden (you know the +/-), then
compare it on the re-submit to see if any of the values have changed.
If so, throw SecurityException or something similar?

Would that work for you...djsuarez

-Original Message-
From: Lee Harrington [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 15, 2004 8:52 AM
To: Struts Users Mailing List
Subject: Re: Exposing ActionForm and MVC fields

>  In this case, i`m still suceptible to be
> hacked by javascript, because of the ActionForm fields
> exposure.
> What about that???

Different actions.  I'd reccomend a dispatch action class...with
different methods depending on whether the buyer or seller submitted. 
That way, in the seller method, even if they did hack the submit form
you action would not be doing anything with those fields.

Lee


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



Re: Exposing ActionForm and MVC fields

2004-10-15 Thread Hubert Rabago
If you're that concerned about it, then it's worth the effort to use
different form beans that only expose the properties you feel
comfortable with.  I remember reading somewhere that BeanUtils will
only copy properties that are present in both beans, so that would
help you transfer values between the superset business object and the
form bean subset.


On Fri, 15 Oct 2004 11:53:20 -0300 (ART), Leandro Melo
<[EMAIL PROTECTED]> wrote:
> Do you other sugestion then Hubert?
> 
> --- Hubert Rabago <[EMAIL PROTECTED]> escreveu:
> 
> 
> > Hmm... you'd have to check how BeanUtils works if
> > you do this.
> > BeanUtils will just copy properties without checking
> > for the declared
> > type, and in fact it can't check for the declared
> > type.  Even if you
> > just pass an interface declaration, the instance
> > itself will expose
> > the properties and BeanUtils will still populate
> > them.
> >
> > > ***
> > > This e-mail and its attachments are not
> > confidential
> > > and are intended for anyone who will believe what
> > > I've written without holding me liable.
> > > If this has come to you in error, please
> > > don't notify me at any given time and just delete
> > this
> > > e-mail from your system.
> > > You must take no action that you will blame me for
> > > later, though if you want you can 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 people who
> > > pay me. Please note that e-mail
> > > communications may be monitored by those
> > > who have nothing better to do than read other
> > people's e-mail.
> > > 
> >
> > On Fri, 15 Oct 2004 15:24:21 +0100, McCormack, Chris
> > <[EMAIL PROTECTED]> wrote:
> > > Like this:
> > >
> > > MainDataObj implements ISeller, IBuyer
> > >
> > > Seller implements ISeller
> > >
> > > Buyer implements IBuyer
> > >
> > > Seller seller = (ISeller)mainDataObj;
> > >
> > > then add seller to the request and populate your
> > form from that for the Seller view and vice versa
> > for the Buyer view.
> > >
> > > Friday pub lunch may have tarred my brain but I
> > think that will work :)
> > >
> > > Chris
> > >
> > >
> > >
> > > -Original Message-
> > > From: Leandro Melo
> > [mailto:[EMAIL PROTECTED]
> > > Sent: 15 October 2004 14:49
> > > To: Struts Users Mailing List
> > > Subject: RE: Exposing ActionForm and MVC fields
> > >
> > > Hi Chris, what do you mean by "interfaces to
> > filter"
> > > (sorry for the stupidness)???
> > > Is it an ordinary Servlet filter??
> > > If so, i remember once using a few filters but i
> > > coulnd`t get a reference to the request it self,
> > only
> > > to the context as a whole. Could you give an
> > example?
> > >
> > > --- "McCormack, Chris"
> > > <[EMAIL PROTECTED]> escreveu:
> > > > Look at using interfaces to filter the sensitive
> > > > data away from each user when putting the data
> > > > object in the request.
> > > >
> > > > Chris McCormack
> > > >
> > >
> > > ***
> > > 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]
> >
> >
> 
>
> ___
> 
> 
> Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
> http://br.acesso.yahoo.com/
>

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



Re: upgrading from struts1.1 to struts 1.2.4

2004-10-15 Thread Hubert Rabago
http://wiki.apache.org/struts/StrutsUpgradeNotes11to124


On Fri, 15 Oct 2004 07:50:38 -0700 (PDT), Ashish Kulkarni
<[EMAIL PROTECTED]> wrote:
> Hi
> Is there any place where i can find all the changes
> between struts 1.2.4 and struts1.1,
> and any documentation for upgrading to 1.2.4
> 
> Ashish
> 
> =
> A$HI$H
>

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



RE: Newbie never displays errors

2004-10-15 Thread Nadia Kunkov
Yes, but I don't think you can call saveMessages inside validate method.  You can call 
it within your Action but not an Actionform.  Should I not use validate at all and do 
everything in my Action?
Thanks
Nadia

-Original Message-
From: Hollaway, Shedrick CIV (TRFKB C600)
[mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 10:49 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbie  never displays errors


Without seeing your validation code I'm guessing you have this or want to
have this:

public ActionErrors validate (ActionMapping actionMapping,
HttpServletRequest httpServletRequest)
{
ActionErrors errors = new ActionErrors();
if (getCountryName() == null || getCountryName().length() <
1)
{
errors.add("countryName", new
ActionError("errors.required","Country Name"));
}
if (getCountryCapital() == null ||
getCountryCapital().length() < 1)
{
errors.add("countryCapital", new
ActionError("errors.required","Country Capital"));
}
saveMessages(request, (ActionMessages) errors);
return (errors);
}

Shed.

> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 10:13 AM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Do I add saveMessages(request, (ActionMessages) errors); to 
> the Validate method of ActionForm?  Since that is where the 
> validation is happening.
> Thanks
> 
> 
> -Original Message-
> From: Hollaway, Shedrick CIV (TRFKB C600)
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 10:00 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Newbie  never displays errors
> 
> 
> Looks like you are not saving your errors. Try this after errors.add:
> 
> saveMessages(request, (ActionMessages) errors);
> 
> > -Original Message-
> > From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 15, 2004 9:01 AM
> > To: Struts Users Mailing List
> > Subject: RE: Newbie  never displays errors
> > 
> > 
> > David,
> > 
> > I followed your suggestions.  I have everything set up the 
> > way you said.
> > I have a default error: 
> > errors.add("countryName", new 
> > ActionError("errors.required","Country Name"));
> > 
> > I'm displaying the error using
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I get the following error:
> >  javax.servlet.ServletException: Cannot find bean error in any scope
> > 
> > I also tried doing the following:
> > logic:messagesPresent>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I still get an error :
> > javax.servlet.ServletException: Cannot find bean countryName 
> > in any scope
> > 
> > 
> > It seems like the error doesn't get added to the session or request.
> > Anything else you could suggest?
> > Thanks
> > Nadia
> > 
> > -Original Message-
> > From: David G. Friedman [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 13, 2004 3:26 PM
> > To: Struts Users Mailing List
> > Subject: RE: Newbie  never displays errors
> > 
> > 
> > Nadia,
> > 
> > Are you sure you have the 3 important pieces?
> > 
> > A) a struts-config.xml (or module) define message resources 
> > file?  Mine is
> > the file WEB-INF/classes/application.properties, which 
> > contains the line:
> > 
> > errors.required={0} is required.
> > 
> > My struts-config.xml includes this resource with the line:
> > 
> > 
> > B) Have you put a 'default' error message in your 
> > ActionForm's validate()
> > method for testing purposes so your method does not end with:
> > return(errors);
> > 
> > but with:
> > 
> > 
> > C) You have JSP Code like this:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I got this to work but only AFTER I made sure I had step A 
> configured
> > properly.
> > 
> > Since you used property key names when you added each error 
> > instead of using
> > the Globals.ERROR key, a.k.a. the string "error".  You added 
> > each item under
> > keys like "countryName" and "countryCapital" so you could 
> access them
> > individually like this:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > AND
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Regards,
> > David
> > 
> > -Original Message-
> > From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 13, 2004 1:20 PM
> > To: Struts Users Mailing List
> > Subject: RE: Newbie  never displays errors
> > 
> > 
> > Nooo...  I guess that's it!
> > I thought you need to call saveErrors only when you create 
> > ActionErrors
> > inside Action and not in Validate...
> > Here is my Action  (I'm using DispatchAction):
> > 
> > public ActionForward Add (ActionMapping actionMapping, ActionForm
> > actionForm,
> > HttpServletRequest req,
> >   

Re: Exposing ActionForm and MVC fields

2004-10-15 Thread Leandro Melo
Lee, even if i use different Actions i wil be still
using BeanUtils and still suceptible to hacking.


 --- Lee Harrington <[EMAIL PROTECTED]> escreveu: 
> >  In this case, i`m still suceptible to be
> > hacked by javascript, because of the ActionForm
> fields
> > exposure.
> > What about that???
> 
> Different actions.  I'd reccomend a dispatch action
> class...with
> different methods depending on whether the buyer or
> seller submitted. 
> That way, in the seller method, even if they did
> hack the submit form
> you action would not be doing anything with those
> fields.
> 
> Lee
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  





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

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



[FRIDAY] Re: Exposing ActionForm and MVC fields

2004-10-15 Thread Hubert Rabago
Well, not really, but disclaimers are interesting, aren't they?
It's like the package of peanuts in airplanes that actually carry
instructions: "Open package.  Eat peanuts."

On Fri, 15 Oct 2004 15:42:06 +0100, McCormack, Chris
<[EMAIL PROTECTED]> wrote:
> Nice rewording there, you in Law by any chance ;)
> 
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 15:33
> To: Struts Users Mailing List
> Subject: Re: Exposing ActionForm and MVC fields
> 
> > ***
> > This e-mail and its attachments are not confidential
> > and are intended for anyone who will believe what
> > I've written without holding me liable.
> > If this has come to you in error, please
> > don't notify me at any given time and just delete this
> > e-mail from your system.
> > You must take no action that you will blame me for
> > later, though if you want you can 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 people who
> > pay me. Please note that e-mail
> > communications may be monitored by those
> > who have nothing better to do than read other people's e-mail.
> > 
> 
> ***
> 
> 
> This e-mail and its attachments are confidential
> and are intended for the above named recipient
> only. If this has come to you in error, please
> notify the sender immediately and delete this
> e-mail from your system.
> You must take no action based on this, nor must
> you copy or disclose it or any part of its contents
> to any person or organisation.
> Statements and opinions contained in this email may
> not necessarily represent those of Littlewoods.
> Please note that e-mail communications may be monitored.
> The registered office of Littlewoods Limited and its
> subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> Registered number of Littlewoods Limited is 262152.
> 
> 
>

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



Re: [REPOST] Get Raw Action Path.

2004-10-15 Thread Alan Pocklington
Thanks for the pointer.  I've been looking through the RequestProcessor 
source without any luck so far.  Maybe I'll stumble across it soon.

Erik Weber <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> I don't know the specific answer to your question, but I learned a lot
> by writing a method that prints out the key and value for every 
> attribute in every scope, and calling that method at various points 
> along the RequestProcessor timeline (by overriding various methods of 
> RequestProcessor). RequestProcessor invokes a dozen or so methods on 
> itself for every request, and during that time many attributes are set
> and/or removed from various scopes.
> 
> I do recall that the controller Servlet mapping was available. Not
> sure about specific Action mappings.
> 
> Erik
> 
> 
> 
> Alan Pocklington wrote:
> 
>>I have an Action defined as:
>>
>>  >  path="/myaction/**"  
>>  type="...MyAction"/>
>>  
>>Within the Action class itself I want to get at the path attribute as 
>>defined in the config file, i.e. 
>>/myaction/**.  
>>
>>I can get the requested path, for example /myaction/somepath/xxx.do
>>via actionMapping.getPath() but not the original path to which the
>>action was mapped.  Is there any way I can get at this?
>>
>>Thanks in advance. 
>>
>>
>>-
>>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]



HttpServletRequest Question

2004-10-15 Thread John Fitzpatrick
This may be slightly off-topic for this list, but here goes anyway:

I'm working on a Struts site which must be i18n compatible and have a login
system where some of the pages are protected. What I'm looking to accomplish
is two fold:

1. When viewing any page, including query results, be able to select a
language from the pull-down menu and get the page the same page back in the
new language.

2. When requesting a page that is protected, have the user be prompted to
authenticate and then receive the originally requested page. Or, have a
login form on each page which will return the same page with just the login
details changed.

To accomplish this, I attempted to store each HttpServletRequest in the
session and then check for a language change, or login request, in an
ancestor of each action, process that change and then serve the previous
request. However, when I take the stored request out of the session, it's
handle to the Session is now 'null.'

Has anyone had some experience attempting something like this, or am I
barking up entirely the wrong tree here?

FWIW, I've looked at JAAS and don't feel that it suits our needs. The role
handling is simply too coarse. 


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



Re: Exposing ActionForm and MVC fields

2004-10-15 Thread Leandro Melo
Do you other sugestion then Hubert?


 --- Hubert Rabago <[EMAIL PROTECTED]> escreveu: 
> Hmm... you'd have to check how BeanUtils works if
> you do this. 
> BeanUtils will just copy properties without checking
> for the declared
> type, and in fact it can't check for the declared
> type.  Even if you
> just pass an interface declaration, the instance
> itself will expose
> the properties and BeanUtils will still populate
> them.
> 
> > ***
> > This e-mail and its attachments are not
> confidential
> > and are intended for anyone who will believe what 
> > I've written without holding me liable. 
> > If this has come to you in error, please
> > don't notify me at any given time and just delete
> this
> > e-mail from your system.
> > You must take no action that you will blame me for
> > later, though if you want you can 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 people who 
> > pay me. Please note that e-mail 
> > communications may be monitored by those
> > who have nothing better to do than read other
> people's e-mail.
> > 
> 
> On Fri, 15 Oct 2004 15:24:21 +0100, McCormack, Chris
> <[EMAIL PROTECTED]> wrote:
> > Like this:
> > 
> > MainDataObj implements ISeller, IBuyer
> > 
> > Seller implements ISeller
> > 
> > Buyer implements IBuyer
> > 
> > Seller seller = (ISeller)mainDataObj;
> > 
> > then add seller to the request and populate your
> form from that for the Seller view and vice versa
> for the Buyer view.
> > 
> > Friday pub lunch may have tarred my brain but I
> think that will work :)
> > 
> > Chris
> > 
> > 
> > 
> > -Original Message-
> > From: Leandro Melo
> [mailto:[EMAIL PROTECTED]
> > Sent: 15 October 2004 14:49
> > To: Struts Users Mailing List
> > Subject: RE: Exposing ActionForm and MVC fields
> > 
> > Hi Chris, what do you mean by "interfaces to
> filter"
> > (sorry for the stupidness)???
> > Is it an ordinary Servlet filter??
> > If so, i remember once using a few filters but i
> > coulnd`t get a reference to the request it self,
> only
> > to the context as a whole. Could you give an
> example?
> > 
> > --- "McCormack, Chris"
> > <[EMAIL PROTECTED]> escreveu:
> > > Look at using interfaces to filter the sensitive
> > > data away from each user when putting the data
> > > object in the request.
> > >
> > > Chris McCormack
> > >
> > 
> > ***
> > 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]
> 
>  





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

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



upgrading from struts1.1 to struts 1.2.4

2004-10-15 Thread Ashish Kulkarni
Hi
Is there any place where i can find all the changes
between struts 1.2.4 and struts1.1, 
and any documentation for upgrading to 1.2.4

Ashish


=
A$HI$H



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

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



RE: Newbie never displays errors

2004-10-15 Thread Hollaway, Shedrick CIV (TRFKB C600)
Without seeing your validation code I'm guessing you have this or want to
have this:

public ActionErrors validate (ActionMapping actionMapping,
HttpServletRequest httpServletRequest)
{
ActionErrors errors = new ActionErrors();
if (getCountryName() == null || getCountryName().length() <
1)
{
errors.add("countryName", new
ActionError("errors.required","Country Name"));
}
if (getCountryCapital() == null ||
getCountryCapital().length() < 1)
{
errors.add("countryCapital", new
ActionError("errors.required","Country Capital"));
}
saveMessages(request, (ActionMessages) errors);
return (errors);
}

Shed.

> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 10:13 AM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Do I add saveMessages(request, (ActionMessages) errors); to 
> the Validate method of ActionForm?  Since that is where the 
> validation is happening.
> Thanks
> 
> 
> -Original Message-
> From: Hollaway, Shedrick CIV (TRFKB C600)
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 10:00 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Newbie  never displays errors
> 
> 
> Looks like you are not saving your errors. Try this after errors.add:
> 
> saveMessages(request, (ActionMessages) errors);
> 
> > -Original Message-
> > From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 15, 2004 9:01 AM
> > To: Struts Users Mailing List
> > Subject: RE: Newbie  never displays errors
> > 
> > 
> > David,
> > 
> > I followed your suggestions.  I have everything set up the 
> > way you said.
> > I have a default error: 
> > errors.add("countryName", new 
> > ActionError("errors.required","Country Name"));
> > 
> > I'm displaying the error using
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I get the following error:
> >  javax.servlet.ServletException: Cannot find bean error in any scope
> > 
> > I also tried doing the following:
> > logic:messagesPresent>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I still get an error :
> > javax.servlet.ServletException: Cannot find bean countryName 
> > in any scope
> > 
> > 
> > It seems like the error doesn't get added to the session or request.
> > Anything else you could suggest?
> > Thanks
> > Nadia
> > 
> > -Original Message-
> > From: David G. Friedman [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 13, 2004 3:26 PM
> > To: Struts Users Mailing List
> > Subject: RE: Newbie  never displays errors
> > 
> > 
> > Nadia,
> > 
> > Are you sure you have the 3 important pieces?
> > 
> > A) a struts-config.xml (or module) define message resources 
> > file?  Mine is
> > the file WEB-INF/classes/application.properties, which 
> > contains the line:
> > 
> > errors.required={0} is required.
> > 
> > My struts-config.xml includes this resource with the line:
> > 
> > 
> > B) Have you put a 'default' error message in your 
> > ActionForm's validate()
> > method for testing purposes so your method does not end with:
> > return(errors);
> > 
> > but with:
> > 
> > 
> > C) You have JSP Code like this:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I got this to work but only AFTER I made sure I had step A 
> configured
> > properly.
> > 
> > Since you used property key names when you added each error 
> > instead of using
> > the Globals.ERROR key, a.k.a. the string "error".  You added 
> > each item under
> > keys like "countryName" and "countryCapital" so you could 
> access them
> > individually like this:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > AND
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Regards,
> > David
> > 
> > -Original Message-
> > From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 13, 2004 1:20 PM
> > To: Struts Users Mailing List
> > Subject: RE: Newbie  never displays errors
> > 
> > 
> > Nooo...  I guess that's it!
> > I thought you need to call saveErrors only when you create 
> > ActionErrors
> > inside Action and not in Validate...
> > Here is my Action  (I'm using DispatchAction):
> > 
> > public ActionForward Add (ActionMapping actionMapping, ActionForm
> > actionForm,
> > HttpServletRequest req,
> > HttpServletResponse res)
> > throws Exception
> > {
> > 
> > javax.sql.DataSource dataSource;
> > 
> > dataSource = (DataSource)
> > servlet.getServletContext().getAttribute(org.apache.struts.Glo
> > bals.DATA_SOUR
> > CE_KEY);
> > CountryService countryService = new CountryService();
> > CountryDTO country = new CountryDTO();
> >

Re: problem with element in struts-config.xml

2004-10-15 Thread Ashish Kulkarni
Hi
Thanx for the reply,  does solve all my
issues with forward
Ashish
--- Jeff Beal <[EMAIL PROTECTED]> wrote:

> When redirect is "true" a message is sent to the
> browser to get the new 
> resource.  This means that the browser is aware of
> the path of your 
> error.jsp.  When redirect is false, the browser is
> not aware of the 
> location of the JSP that is actually displaying the
> results.  To get 
> around the problem, the  tag will tell
> the browser to 
> resolve all URI's contained in the HTML document
> against a different 
> location.  I'm pretty sure (though I haven't used
> this) that all you 
> need to do is include  at the top of
> your error.jsp file to 
> have everything resolve correctly.
> 
> -- Jeff
> 
> Ashish Kulkarni wrote:
> > Hi
> > I am having problem with  element
> > I have 2 jsp, adminlogin.jsp is in folder pages
> and
> > index.jsp is in folder pages\admin
> > Here is how i have defined my action in
> > struts-config.xml file
> >  type="admin.AdminLoginAction"
> > validate="true" scope="request"   
> > path="/pages/admin/adminlogin">
> >  > path="/pages/admin/index.jsp"/>
> >   />
> > 
> > Now the problem if i get error in AdminLoginAction
> it
> > tries to display adminlogin.jsp, but the relative
> path
> > gets messed up and i dont see any images, 
> > but if i declare it as
> >  
> > redirect="true"/>
> > it works fine, but then i dont get error messages
> set
> > in action class.
> > So how do i work make it work
> > Ashish
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Mail Address AutoComplete - You start. We
> finish.
> > http://promotions.yahoo.com/new_mail 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


=
A$HI$H



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

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



Re: Newbie never displays errors

2004-10-15 Thread Erik Weber
Nadia, have you ever looked at this site?
http://www.reumann.net/do/struts/main
Should be some good examples of using ActionMessages and ActionErrors in 
there.

Erik
Nadia Kunkov wrote:
Do I add saveMessages(request, (ActionMessages) errors); to the Validate method of 
ActionForm?  Since that is where the validation is happening.
Thanks
-Original Message-
From: Hollaway, Shedrick CIV (TRFKB C600)
[mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 10:00 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbie  never displays errors
Looks like you are not saving your errors. Try this after errors.add:
saveMessages(request, (ActionMessages) errors);
 

-Original Message-
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 9:01 AM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors
David,
I followed your suggestions.  I have everything set up the 
way you said.
I have a default error: 
errors.add("countryName", new 
ActionError("errors.required","Country Name"));

I'm displaying the error using







I get the following error:
javax.servlet.ServletException: Cannot find bean error in any scope
I also tried doing the following:
logic:messagesPresent>






I still get an error :
javax.servlet.ServletException: Cannot find bean countryName 
in any scope

It seems like the error doesn't get added to the session or request.
Anything else you could suggest?
Thanks
Nadia
-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 3:26 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors
Nadia,
Are you sure you have the 3 important pieces?
A) a struts-config.xml (or module) define message resources 
file?  Mine is
the file WEB-INF/classes/application.properties, which 
contains the line:

errors.required={0} is required.
My struts-config.xml includes this resource with the line:

B) Have you put a 'default' error message in your 
ActionForm's validate()
method for testing purposes so your method does not end with:
	return(errors);

but with:
	errors.add("countryName", new 
ActionError("errors.required","Country
Name"));
	return(errors);

C) You have JSP Code like this:







I got this to work but only AFTER I made sure I had step A configured
properly.
Since you used property key names when you added each error 
instead of using
the Globals.ERROR key, a.k.a. the string "error".  You added 
each item under
keys like "countryName" and "countryCapital" so you could access them
individually like this:








AND







Regards,
David
-Original Message-
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 1:20 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors
Nooo...  I guess that's it!
I thought you need to call saveErrors only when you create 
ActionErrors
inside Action and not in Validate...
Here is my Action  (I'm using DispatchAction):

public ActionForward Add (ActionMapping actionMapping, ActionForm
actionForm,
HttpServletRequest req,
HttpServletResponse res)
throws Exception
{
javax.sql.DataSource dataSource;
		dataSource = (DataSource)
servlet.getServletContext().getAttribute(org.apache.struts.Glo
bals.DATA_SOUR
CE_KEY);
		CountryService countryService = new CountryService();
		CountryDTO country = new CountryDTO();
		BeanUtils.copyProperties( 
country,(AddCountryNewForm) actionForm);
		countryService.addCountry(country,dataSource);

return actionMapping.findForward("newcountrylisting");
}
Where do I save the errors generated by the validate?
Thanks
-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 1:10 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors
Did you call saveErrors() or saveMessages() in your Action to save the
messages into the (request) scope for use in the JSP?
-Original Message-
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 12:59 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors
Yes, here is what I tried:

  
  
 
  
  

I get an error: can't find bean "error" in any scope :(
This drives me nuts.
Thanks for helping me.
-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 12:56 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors
Nadia,
The bean:write's name attribute must match the id parameter of the
html:messages tag. That's why I suggested your html:messages tag be:
 
This means it should pull the errors from the area 
"countryName

RE: Exposing ActionForm and MVC fields

2004-10-15 Thread McCormack, Chris
Nice rewording there, you in Law by any chance ;)

-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 15:33
To: Struts Users Mailing List
Subject: Re: Exposing ActionForm and MVC fields


> ***
> This e-mail and its attachments are not confidential
> and are intended for anyone who will believe what 
> I've written without holding me liable. 
> If this has come to you in error, please
> don't notify me at any given time and just delete this
> e-mail from your system.
> You must take no action that you will blame me for
> later, though if you want you can 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 people who 
> pay me. Please note that e-mail 
> communications may be monitored by those
> who have nothing better to do than read other people's e-mail.
> 

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



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



Re: Struts validation issue

2004-10-15 Thread Andy Richards
Thanks, pedro
Couldnt resolve this one! upgraded to struts 1.2.4 and used a reqular 
expression to validate instead.

Not quite the method i wanted to take but one which resolved the issue.
Thanks for your contribution
Andy
Pedro Salgado wrote:
 Have you checked if you aren't duplicating configurations on more than 1
file? (configFile1, ..., configFileN... N replaces configurations that are
also present (duplicate) in 1).
 Are you working with modules?
 Is the forward pointing to a correct action? (try putting validate =
false... and see if it calls the correct action)
 This is the best I can do...
Pedro
On 11/10/04 2:57 pm, "Andy Richards" <[EMAIL PROTECTED]> wrote:
 

hi,
i have created my own validator class for validating certain fields
which are
beyond the default validation scope (e.g. telephone, postcode, username
already
exists etc.) and have linked it to the validator-rules.xml file.
when the input field is invalid, i do get the appropriate error msg so this
works ok. however, the problem is when all fields have valid input. In this
instance, the flow goes to my validator class and returns true, but
instead of
going to the action, it returns to the original jsp page. there are no
errors displayed,
just that it wont move to the action.
i've checked my struts-config, validator-rules and validation files and
they are
identical to those in the 'how-to's on the struts site. the only
difference is
that i have several struts config files, but the validator plugin is
only in the
main struts-config.xml
i am completly stumped on this one.
cheers,
andy
-
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: [REPOST] Get Raw Action Path.

2004-10-15 Thread Erik Weber
I don't know the specific answer to your question, but I learned a lot 
by writing a method that prints out the key and value for every 
attribute in every scope, and calling that method at various points 
along the RequestProcessor timeline (by overriding various methods of 
RequestProcessor). RequestProcessor invokes a dozen or so methods on 
itself for every request, and during that time many attributes are set 
and/or removed from various scopes.

I do recall that the controller Servlet mapping was available. Not sure 
about specific Action mappings.

Erik

Alan Pocklington wrote:
I have an Action defined as:
 
 
Within the Action class itself I want to get at the path attribute as 
defined in the config file, i.e. 
/myaction/**.  

I can get the requested path, for example /myaction/somepath/xxx.do via 
actionMapping.getPath() but not the original path to which the action was 
mapped.  Is there any way I can get at this?

Thanks in advance. 

-
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: Exposing ActionForm and MVC fields

2004-10-15 Thread Hubert Rabago
Hmm... you'd have to check how BeanUtils works if you do this. 
BeanUtils will just copy properties without checking for the declared
type, and in fact it can't check for the declared type.  Even if you
just pass an interface declaration, the instance itself will expose
the properties and BeanUtils will still populate them.

> ***
> This e-mail and its attachments are not confidential
> and are intended for anyone who will believe what 
> I've written without holding me liable. 
> If this has come to you in error, please
> don't notify me at any given time and just delete this
> e-mail from your system.
> You must take no action that you will blame me for
> later, though if you want you can 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 people who 
> pay me. Please note that e-mail 
> communications may be monitored by those
> who have nothing better to do than read other people's e-mail.
> 

On Fri, 15 Oct 2004 15:24:21 +0100, McCormack, Chris
<[EMAIL PROTECTED]> wrote:
> Like this:
> 
> MainDataObj implements ISeller, IBuyer
> 
> Seller implements ISeller
> 
> Buyer implements IBuyer
> 
> Seller seller = (ISeller)mainDataObj;
> 
> then add seller to the request and populate your form from that for the Seller view 
> and vice versa for the Buyer view.
> 
> Friday pub lunch may have tarred my brain but I think that will work :)
> 
> Chris
> 
> 
> 
> -Original Message-
> From: Leandro Melo [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 14:49
> To: Struts Users Mailing List
> Subject: RE: Exposing ActionForm and MVC fields
> 
> Hi Chris, what do you mean by "interfaces to filter"
> (sorry for the stupidness)???
> Is it an ordinary Servlet filter??
> If so, i remember once using a few filters but i
> coulnd`t get a reference to the request it self, only
> to the context as a whole. Could you give an example?
> 
> --- "McCormack, Chris"
> <[EMAIL PROTECTED]> escreveu:
> > Look at using interfaces to filter the sensitive
> > data away from each user when putting the data
> > object in the request.
> >
> > Chris McCormack
> >
> 
> ***
> This e-mail and its attachments are confidential
> and are intended for the above named recipient
> only. If this has come to you in error, please
> notify the sender immediately and delete this
> e-mail from your system.
> You must take no action based on this, nor must
> you copy or disclose it or any part of its contents
> to any person or organisation.
> Statements and opinions contained in this email may
> not necessarily represent those of Littlewoods.
> Please note that e-mail communications may be monitored.
> The registered office of Littlewoods Limited and its
> subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> Registered number of Littlewoods Limited is 262152.
> 
>

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



Re: problem with table of radio buttons on Unix

2004-10-15 Thread Shyam Anand
Hello,

Could somebody help me out with this? Any insights on
what could be causing this problem would be greatly
appreciated.

Thanks,
Shyam

--- Shyam Anand <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have a scenario where I have a table of radio
> buttons for a set of questions (Yes/No) on a page.
> I'm
> using indexed properties for the same.
> 
> Each question on my JSP is represented by an object
> called YesNoQuestion, and my ActionForm uses an
> ArrayList of YesNoQuestions called yesNoList. 
> 
> In my ActionForm I have:
> 
> 
>  /**
> * Access method for the yesNoList property.
> * 
> * @return   the current value of the yesNoList
> property
> */
>public ArrayList getYesNoList() 
>{
>   return yesNoList;
>}
>
>/**
> * Sets the value of the yesNoList property.
> * 
> * @param aYesNoList the new value of the
> yesNoList
> property
> */
>public void setYesNoList(ArrayList aYesNoList) 
>{
>   yesNoList = aYesNoList; 
>}
> 
> 
> /**
> * Access method for the yesNoList property.
> * 
> */
>public YesNoQuestion getYesNoList(int index) 
>{
>   return (YesNoQuestion)yesNoList.get(index);
>}
> 
> 
> /**
> * Sets the value of the yesNoList property.
> * 
> */
>public void setYesNoList(int index,YesNoQuestion
> yesNoQuestion) 
>{
>   yesNoList.set(index,yesNoQuestion); 
>}
> 
> --
> 
> In my JSP, I have:
> 
> 
>  property="yesNoList" id="yesNoList" scope="session">
> 
>   
>property="qno"/> 
>property="question"/>
>   
>  
>  
>property="yesNoFlag"
> value="Y" indexed="true" />Yes 
>    
>property="yesNoFlag"
> value="N" indexed="true" />No
>    
>property="yesNoFlag"
> value="A" indexed="true"/>Abstain
>  
>   
>
> 
> 
> The above code works fine when I deploy it on a
> Windows machine. But, on a Unix machine (Sun
> Solaris),
> I get the following error when I try to access my
> JSP:
> 
> "No getter method for property yesNoList of bean
> castYesNoBallotForm "
> 
> Could somebody tell me what I'm doing wrong?
> 
> Any help will be greatly appreciated.
> 
> Thanks,
> Shyam
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




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

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



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread McCormack, Chris
Like this:

MainDataObj implements ISeller, IBuyer

Seller implements ISeller

Buyer implements IBuyer

Seller seller = (ISeller)mainDataObj;

then add seller to the request and populate your form from that for the Seller view 
and vice versa for the Buyer view.

Friday pub lunch may have tarred my brain but I think that will work :)

Chris

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 14:49
To: Struts Users Mailing List
Subject: RE: Exposing ActionForm and MVC fields


Hi Chris, what do you mean by "interfaces to filter"
(sorry for the stupidness)???
Is it an ordinary Servlet filter??
If so, i remember once using a few filters but i
coulnd`t get a reference to the request it self, only
to the context as a whole. Could you give an example?



 --- "McCormack, Chris"
<[EMAIL PROTECTED]> escreveu: 
> Look at using interfaces to filter the sensitive
> data away from each user when putting the data
> object in the request.
> 
> Chris McCormack
> 

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



[REPOST] Get Raw Action Path.

2004-10-15 Thread Alan Pocklington
I have an Action defined as:

  
  
Within the Action class itself I want to get at the path attribute as 
defined in the config file, i.e. 
/myaction/**.  

I can get the requested path, for example /myaction/somepath/xxx.do via 
actionMapping.getPath() but not the original path to which the action was 
mapped.  Is there any way I can get at this?

Thanks in advance. 


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



RE: Newbie never displays errors

2004-10-15 Thread Nadia Kunkov
Do I add saveMessages(request, (ActionMessages) errors); to the Validate method of 
ActionForm?  Since that is where the validation is happening.
Thanks


-Original Message-
From: Hollaway, Shedrick CIV (TRFKB C600)
[mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 10:00 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbie  never displays errors


Looks like you are not saving your errors. Try this after errors.add:

saveMessages(request, (ActionMessages) errors);

> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 9:01 AM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> David,
> 
> I followed your suggestions.  I have everything set up the 
> way you said.
> I have a default error: 
> errors.add("countryName", new 
> ActionError("errors.required","Country Name"));
> 
> I'm displaying the error using
> 
> 
> 
>   
>   
>   
> 
> 
> 
> I get the following error:
>  javax.servlet.ServletException: Cannot find bean error in any scope
> 
> I also tried doing the following:
> logic:messagesPresent>
> 
>   
>   
>   
> 
> 
> 
> I still get an error :
> javax.servlet.ServletException: Cannot find bean countryName 
> in any scope
> 
> 
> It seems like the error doesn't get added to the session or request.
> Anything else you could suggest?
> Thanks
> Nadia
> 
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 3:26 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Nadia,
> 
> Are you sure you have the 3 important pieces?
> 
> A) a struts-config.xml (or module) define message resources 
> file?  Mine is
> the file WEB-INF/classes/application.properties, which 
> contains the line:
> 
> errors.required={0} is required.
> 
> My struts-config.xml includes this resource with the line:
> 
> 
> B) Have you put a 'default' error message in your 
> ActionForm's validate()
> method for testing purposes so your method does not end with:
>   return(errors);
> 
> but with:
>   errors.add("countryName", new 
> ActionError("errors.required","Country
> Name"));
>   return(errors);
> 
> C) You have JSP Code like this:
> 
> 
> 
>   
>   
>   
> 
> 
> 
> I got this to work but only AFTER I made sure I had step A configured
> properly.
> 
> Since you used property key names when you added each error 
> instead of using
> the Globals.ERROR key, a.k.a. the string "error".  You added 
> each item under
> keys like "countryName" and "countryCapital" so you could access them
> individually like this:
> 
> 
> 
>   
>   
>   
> 
> 
> 
> AND
> 
> 
> 
>   
>   
>   
> 
> 
> 
> Regards,
> David
> 
> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 1:20 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Nooo...  I guess that's it!
> I thought you need to call saveErrors only when you create 
> ActionErrors
> inside Action and not in Validate...
> Here is my Action  (I'm using DispatchAction):
> 
> public ActionForward Add (ActionMapping actionMapping, ActionForm
> actionForm,
>   HttpServletRequest req,
>   HttpServletResponse res)
>   throws Exception
>   {
> 
>   javax.sql.DataSource dataSource;
> 
>   dataSource = (DataSource)
> servlet.getServletContext().getAttribute(org.apache.struts.Glo
> bals.DATA_SOUR
> CE_KEY);
>   CountryService countryService = new CountryService();
>   CountryDTO country = new CountryDTO();
>   BeanUtils.copyProperties( 
> country,(AddCountryNewForm) actionForm);
>   countryService.addCountry(country,dataSource);
> 
>   return actionMapping.findForward("newcountrylisting");
>   }
> 
> 
> Where do I save the errors generated by the validate?
> 
> Thanks
> 
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 1:10 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Did you call saveErrors() or saveMessages() in your Action to save the
> messages into the (request) scope for use in the JSP?
> 
> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 12:59 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Yes, here is what I tried:
> 
> 
>
>
>   
>
>
>   
> 
> I get an error: can't find bean "error" in any scope :(
> This drives me nuts.
> Thanks for helping me.
> 
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 12:56 PM
> To:

Re: Need Help: XML to HTML using java

2004-10-15 Thread Erik Weber
Check out the JSTL XML tag library! I haven't tried it myself but it 
looks cool.

Erik
Kranti Parisa wrote:
thanx alot Andrew
On Fri, 15 Oct 2004 13:22:10 +0800, Andrew Hill
<[EMAIL PROTECTED]> wrote:
 

These might help:
http://stxx.sourceforge.net/
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html

Kranti Parisa wrote:
   

Thanq
i will follow ur suggestion
On Fri, 15 Oct 2004 10:24:36 +0530, Kailash Vasani <[EMAIL PROTECTED]> wrote:
 

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

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


   
   Sainsbury's aromatherapy
citrus mint
   TestPerf
   TestPerf001
   Ashraf Product
   Acb


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


   
   United Kingdom
   Belgium
   Belgium
   Czech Republic
   Czech Republic


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

 

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


 

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


RE: Newbie never displays errors

2004-10-15 Thread Hollaway, Shedrick CIV (TRFKB C600)
Looks like you are not saving your errors. Try this after errors.add:

saveMessages(request, (ActionMessages) errors);

> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 9:01 AM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> David,
> 
> I followed your suggestions.  I have everything set up the 
> way you said.
> I have a default error: 
> errors.add("countryName", new 
> ActionError("errors.required","Country Name"));
> 
> I'm displaying the error using
> 
> 
> 
>   
>   
>   
> 
> 
> 
> I get the following error:
>  javax.servlet.ServletException: Cannot find bean error in any scope
> 
> I also tried doing the following:
> logic:messagesPresent>
> 
>   
>   
>   
> 
> 
> 
> I still get an error :
> javax.servlet.ServletException: Cannot find bean countryName 
> in any scope
> 
> 
> It seems like the error doesn't get added to the session or request.
> Anything else you could suggest?
> Thanks
> Nadia
> 
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 3:26 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Nadia,
> 
> Are you sure you have the 3 important pieces?
> 
> A) a struts-config.xml (or module) define message resources 
> file?  Mine is
> the file WEB-INF/classes/application.properties, which 
> contains the line:
> 
> errors.required={0} is required.
> 
> My struts-config.xml includes this resource with the line:
> 
> 
> B) Have you put a 'default' error message in your 
> ActionForm's validate()
> method for testing purposes so your method does not end with:
>   return(errors);
> 
> but with:
>   errors.add("countryName", new 
> ActionError("errors.required","Country
> Name"));
>   return(errors);
> 
> C) You have JSP Code like this:
> 
> 
> 
>   
>   
>   
> 
> 
> 
> I got this to work but only AFTER I made sure I had step A configured
> properly.
> 
> Since you used property key names when you added each error 
> instead of using
> the Globals.ERROR key, a.k.a. the string "error".  You added 
> each item under
> keys like "countryName" and "countryCapital" so you could access them
> individually like this:
> 
> 
> 
>   
>   
>   
> 
> 
> 
> AND
> 
> 
> 
>   
>   
>   
> 
> 
> 
> Regards,
> David
> 
> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 1:20 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Nooo...  I guess that's it!
> I thought you need to call saveErrors only when you create 
> ActionErrors
> inside Action and not in Validate...
> Here is my Action  (I'm using DispatchAction):
> 
> public ActionForward Add (ActionMapping actionMapping, ActionForm
> actionForm,
>   HttpServletRequest req,
>   HttpServletResponse res)
>   throws Exception
>   {
> 
>   javax.sql.DataSource dataSource;
> 
>   dataSource = (DataSource)
> servlet.getServletContext().getAttribute(org.apache.struts.Glo
> bals.DATA_SOUR
> CE_KEY);
>   CountryService countryService = new CountryService();
>   CountryDTO country = new CountryDTO();
>   BeanUtils.copyProperties( 
> country,(AddCountryNewForm) actionForm);
>   countryService.addCountry(country,dataSource);
> 
>   return actionMapping.findForward("newcountrylisting");
>   }
> 
> 
> Where do I save the errors generated by the validate?
> 
> Thanks
> 
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 1:10 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Did you call saveErrors() or saveMessages() in your Action to save the
> messages into the (request) scope for use in the JSP?
> 
> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 12:59 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Yes, here is what I tried:
> 
> 
>
>
>   
>
>
>   
> 
> I get an error: can't find bean "error" in any scope :(
> This drives me nuts.
> Thanks for helping me.
> 
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 13, 2004 12:56 PM
> To: Struts Users Mailing List
> Subject: RE: Newbie  never displays errors
> 
> 
> Nadia,
> 
> The bean:write's name attribute must match the id parameter of the
> html:messages tag. That's why I suggested your html:messages tag be:
> 
>   
> 
> This means it should pull the errors from the area 
> "countryName" and present
> them for the bean:write tag to use as the 

Re: Exposing ActionForm and MVC fields

2004-10-15 Thread Lee Harrington
>  In this case, i`m still suceptible to be
> hacked by javascript, because of the ActionForm fields
> exposure.
> What about that???

Different actions.  I'd reccomend a dispatch action class...with
different methods depending on whether the buyer or seller submitted. 
That way, in the seller method, even if they did hack the submit form
you action would not be doing anything with those fields.

Lee

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



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread Leandro Melo
Hi Chris, what do you mean by "interfaces to filter"
(sorry for the stupidness)???
Is it an ordinary Servlet filter??
If so, i remember once using a few filters but i
coulnd`t get a reference to the request it self, only
to the context as a whole. Could you give an example?



 --- "McCormack, Chris"
<[EMAIL PROTECTED]> escreveu: 
> Look at using interfaces to filter the sensitive
> data away from each user when putting the data
> object in the request.
> 
> Chris McCormack
> 
> -Original Message-
> From: Leandro Melo
> [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 13:53
> To: Struts Users Mailing List
> Subject: RE: Exposing ActionForm and MVC fields
> 
> 
> Hi guys, thanks for  your opinions, it seems that
> both
> of you stick with approach 2.
> 
> However, none of you mentioned that "exposing
> ActionForm fields" problem.
> 
> Suppose if build then 2 different pages (as you
> adviced me). I guess my Action for this both pages
> would still be the same, it will only send the
> request
> to 2 different pages depending the type of the
> company. Usually, i set the jsps pages form`s inside
> this Action (normally with BeanUtils), what will
> force
> me to give the correct names for the jsp form fields
> (even if they are labels for the case the user
> cannot
> alter them). In this case, i`m still suceptible to
> be
> hacked by javascript, because of the ActionForm
> fields
> exposure.
> What about that???
> 
> 
> 
>  --- "McCormack, Chris"
> <[EMAIL PROTECTED]> escreveu: 
> > +1
> > 
> > You could still create common elements to both
> pages
> > which will help maintain a look and feel and reuse
> > existing code, look at using different tile
> layouts
> > for each user type but the elements in the page
> are
> > common jsp/tile definitions.
> > If the spec for one user changes then you could
> > simply just copy the tile fragment that was
> changing
> > to a new location and work on it, then change the
> > tile definition for that user to point to the
> > updated fragement.
> > You would still maintain a majority of common code
> > and in the long run even if both user views
> totally
> > change you can deal with it as and when the
> changes
> > happen by copying and altering each tile fragment
> > that is changing and updating the tile definition
> to
> > point to the new fragment.
> > 
> > Chris McCormack
> > 
> > -Original Message-
> > From: Freddy Villalba A.
> > [mailto:[EMAIL PROTECTED]
> > Sent: 15 October 2004 11:54
> > To: Struts Users Mailing List
> > Subject: RE: Exposing ActionForm and MVC fields
> > 
> > 
> > Hi,
> > 
> > I'd go for approach #2. After all, they are
> > different VIEWS of the same
> > Model.
> > 
> > I've faced this situation in a couple of projects
> > before, and in both cases
> > buyer's and seller's views differed in the long
> run.
> > The more complex your
> > business rules / model gets, the higher is the
> > chance for that happening. It
> > may seem the right way to go at first (specially
> if
> > the differences are
> > insignificant), but after a few meetings with the
> > corporate managers, you'll
> > realize it was not such a smart move after all! :P
> > 
> > My humble oppinion,
> > Freddy.
> > 
> > -Mensaje original-
> > De: Leandro Melo
> [mailto:[EMAIL PROTECTED]
> > Enviado el: viernes, 15 de octubre de 2004 3:30
> > Para: struts jakarta
> > Asunto: Exposing ActionForm and MVC fields
> > 
> > 
> > Hi,
> > i'd like to hear some opinions.
> > 
> > I got a b2b application. I'm facing a desing
> > problem.
> > This problems is associated basically to 2 themes:
> > - MVC
> > - Exposing AcfionForm fields.
> > 
> > I got a page where the BUYER fills a form to buy
> an
> > specific item. The steps are very simple.
> > 
> > 1 - He sends a request for a quotation.
> > 2 - After the quotation, he sends a request for an
> > order.
> > 
> > The point is...
> > When the SELLER goes to make the quotation he's
> > supposed to see a very similar page to the one the
> > BUYER filled the information. This is obvious as
> the
> > information is the same for both parts. So, should
> i
> > implement the page for the SELLER:
> > 
> > ==>>> APPROACH 1 - using the same exact
> page
> > as the BUYER for the SELLER. Then i'd make the
> > fields
> > the BUYER filled disabled (or just make them
> labels)
> > using some kind o scriptlet like this.
> > 
> >.../> ,
> > 
> >where sellerVisibility would be something =
> >"disabled=true"
> > 
> > This approach seems nice to but i'd say that it's
> > just
> > not that cool!!! It doesn't look nice from an MVC
> > point of view. I'll take the risk of having a lot
> of
> > this kind of scripts in pages as the times goes
> by.
> > I know that the Action (control layer) is actually
> > responsible for setting the "sellerVisibility",
> what
> > means that it's also not that bad from the MVC
> point
> > of view.
> > But any way, the major problem with this approah
> is
> > that i use BeanUtils to copy dat

RE: help : Thanks Joe - chaining actions in Struts -

2004-10-15 Thread sachin
Thanks Joe

I have quit the idea of chaining actions.
It is true that Struts was never designed to for action forwarding.
My main concern was to have some common functionality independantly
which i can do better by creating own replica of Action , ActionForm and 
ActionServlet etc . . and chaining can be avoided altogether .. 

Regards,
Sachin Hegde
Software Developer
Paradyne Infotech Limited
Mumbai
022-38546711


-- Original Message ---
From: Joe Germuska <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Fri, 15 Oct 2004 08:08:54 -0500
Subject: RE: help : chaining actions in Struts

> I guess I'll post the obligatory "that isn't considered a good idea" 
> message.  Clearly, you've gotten feedback from people who do it, so 
> I can't just tell you that it doesn't work.  However, I can tell you 
> that Struts was never designed to for action forwarding, and by 
> forwarding from one action to another, you trigger a second complete 
> pass through the entire RequestProcessor cycle, which can sometimes 
> have unexpected effects on the request context.
> 
> So, while action chaining sometimes works for some people in some 
> cases, Struts wasn't designed to do it, and bugs relating to it are 
> considered "invalid".
> 
> There are usually other ways to achieve the same goal, especially if 
> you are being conscientious about putting your business logic in a 
> layer that is relatively independent of Struts and keeping Struts 
> focused on translating HTTP requests into business requests and 
> making calls against your business layer.
> 
> Note also that the Struts RequestProcessor is evolving into a more 
> flexibly composable "chain" model of request processing.  Once that 
> code is merged into the main branch of development, you may find 
> that it provides a way that you could line up multiple action 
> executions without triggering all of the pre-processing that comes 
> before the action execution.  This isn't something anyone has 
> tackled yet, but the basic changes to the design make it something 
> much more readily achievable.
> 
> The Chain-based request processor is currently in Struts contrib,
>  and is thoroughly usable already, and Don Brown has said he may 
> find time this weekend (or soon) to change the development Struts 
> code to use it as the standard processing mechanism.
> 
> Joe
> 
> At 3:40 PM +0530 10/15/04, sachin wrote:
> >  > Have the first action's success forward on to the next action in
> >>  struts config.
> >
> >but will the same bean be populated ?
> >
> >Regards ,
> >sachin
> >
> >
> >-- Original Message ---
> >From: "McCormack, Chris" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Fri, 15 Oct 2004 10:42:04 +0100
> >Subject: RE: help : chaining actions in Struts
> >
> >>  Have the first action's success forward on to the next action in
> >>  struts config.
> >>
> >>  Chris McCormack
> >>
> >>  -Original Message-
> >>  From: sachin [mailto:[EMAIL PROTECTED]
> >>  Sent: 15 October 2004 10:46
> >>  To: Struts Users Mailing List
> >>  Subject: help : chaining actions in Struts
> >>
> >>  hi all ,
> >>
> >>  i have a common bean , which i need to use for two Actions classes
> >>  which will execute one after another and populate the bean.
> >>
> >>  Now how can i configure the struts so that both the action will run
> >>  one after another ?
> >>
> >>  Any help is welcome . .
> >>
> >>  Regards,
> >>  Sachin Hegde
> >>
> >>  -
> >>  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]
> >--- End of Original Message ---
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> Joe Germuska   

RE: Exposing ActionForm and MVC fields

2004-10-15 Thread McCormack, Chris
Look at using interfaces to filter the sensitive data away from each user when putting 
the data object in the request.

Chris McCormack

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 13:53
To: Struts Users Mailing List
Subject: RE: Exposing ActionForm and MVC fields


Hi guys, thanks for  your opinions, it seems that both
of you stick with approach 2.

However, none of you mentioned that "exposing
ActionForm fields" problem.

Suppose if build then 2 different pages (as you
adviced me). I guess my Action for this both pages
would still be the same, it will only send the request
to 2 different pages depending the type of the
company. Usually, i set the jsps pages form`s inside
this Action (normally with BeanUtils), what will force
me to give the correct names for the jsp form fields
(even if they are labels for the case the user cannot
alter them). In this case, i`m still suceptible to be
hacked by javascript, because of the ActionForm fields
exposure.
What about that???



 --- "McCormack, Chris"
<[EMAIL PROTECTED]> escreveu: 
> +1
> 
> You could still create common elements to both pages
> which will help maintain a look and feel and reuse
> existing code, look at using different tile layouts
> for each user type but the elements in the page are
> common jsp/tile definitions.
> If the spec for one user changes then you could
> simply just copy the tile fragment that was changing
> to a new location and work on it, then change the
> tile definition for that user to point to the
> updated fragement.
> You would still maintain a majority of common code
> and in the long run even if both user views totally
> change you can deal with it as and when the changes
> happen by copying and altering each tile fragment
> that is changing and updating the tile definition to
> point to the new fragment.
> 
> Chris McCormack
> 
> -Original Message-
> From: Freddy Villalba A.
> [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 11:54
> To: Struts Users Mailing List
> Subject: RE: Exposing ActionForm and MVC fields
> 
> 
> Hi,
> 
> I'd go for approach #2. After all, they are
> different VIEWS of the same
> Model.
> 
> I've faced this situation in a couple of projects
> before, and in both cases
> buyer's and seller's views differed in the long run.
> The more complex your
> business rules / model gets, the higher is the
> chance for that happening. It
> may seem the right way to go at first (specially if
> the differences are
> insignificant), but after a few meetings with the
> corporate managers, you'll
> realize it was not such a smart move after all! :P
> 
> My humble oppinion,
> Freddy.
> 
> -Mensaje original-
> De: Leandro Melo [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 15 de octubre de 2004 3:30
> Para: struts jakarta
> Asunto: Exposing ActionForm and MVC fields
> 
> 
> Hi,
> i'd like to hear some opinions.
> 
> I got a b2b application. I'm facing a desing
> problem.
> This problems is associated basically to 2 themes:
> - MVC
> - Exposing AcfionForm fields.
> 
> I got a page where the BUYER fills a form to buy an
> specific item. The steps are very simple.
> 
> 1 - He sends a request for a quotation.
> 2 - After the quotation, he sends a request for an
> order.
> 
> The point is...
> When the SELLER goes to make the quotation he's
> supposed to see a very similar page to the one the
> BUYER filled the information. This is obvious as the
> information is the same for both parts. So, should i
> implement the page for the SELLER:
> 
> ==>>> APPROACH 1 - using the same exact page
> as the BUYER for the SELLER. Then i'd make the
> fields
> the BUYER filled disabled (or just make them labels)
> using some kind o scriptlet like this.
> 
>.../> ,
> 
>where sellerVisibility would be something =
>"disabled=true"
> 
> This approach seems nice to but i'd say that it's
> just
> not that cool!!! It doesn't look nice from an MVC
> point of view. I'll take the risk of having a lot of
> this kind of scripts in pages as the times goes by.
> I know that the Action (control layer) is actually
> responsible for setting the "sellerVisibility", what
> means that it's also not that bad from the MVC point
> of view.
> But any way, the major problem with this approah is
> that i use BeanUtils to copy data from the
> ActionForms
> to the VOs and vice-versa. So even with the fields
> disabled, i would take the risk of some smart guy
> cheatting and setting via javascript the fields he's
> not supposed to set. And as i copy the data with
> BeanUtils, my data will be changed when it's not
> supposed to do so.
> 
> 
> > APPROACH 2 - just create another page
> for the BUYER. This page would look exactly the same
> for the BUYER and the SELLER, but they'll be
> different
> pages. This way, i can build this other very similar
> page without exposing my ActionForma attributes.
> This
> approach seems to me allright from the MVC point of
> view.
> But

RE: help : chaining actions in Struts

2004-10-15 Thread Joe Germuska
I guess I'll post the obligatory "that isn't considered a good idea" 
message.  Clearly, you've gotten feedback from people who do it, so I 
can't just tell you that it doesn't work.  However, I can tell you 
that Struts was never designed to for action forwarding, and by 
forwarding from one action to another, you trigger a second complete 
pass through the entire RequestProcessor cycle, which can sometimes 
have unexpected effects on the request context.

So, while action chaining sometimes works for some people in some 
cases, Struts wasn't designed to do it, and bugs relating to it are 
considered "invalid".

There are usually other ways to achieve the same goal, especially if 
you are being conscientious about putting your business logic in a 
layer that is relatively independent of Struts and keeping Struts 
focused on translating HTTP requests into business requests and 
making calls against your business layer.

Note also that the Struts RequestProcessor is evolving into a more 
flexibly composable "chain" model of request processing.  Once that 
code is merged into the main branch of development, you may find that 
it provides a way that you could line up multiple action executions 
without triggering all of the pre-processing that comes before the 
action execution.  This isn't something anyone has tackled yet, but 
the basic changes to the design make it something much more readily 
achievable.

The Chain-based request processor is currently in Struts contrib, and 
is thoroughly usable already, and Don Brown has said he may find time 
this weekend (or soon) to change the development Struts code to use 
it as the standard processing mechanism.

Joe

At 3:40 PM +0530 10/15/04, sachin wrote:
 > Have the first action's success forward on to the next action in
 struts config.
but will the same bean be populated ?
Regards ,
sachin
-- Original Message ---
From: "McCormack, Chris" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Fri, 15 Oct 2004 10:42:04 +0100
Subject: RE: help : chaining actions in Struts
 Have the first action's success forward on to the next action in
 struts config.
 Chris McCormack
 -Original Message-
 From: sachin [mailto:[EMAIL PROTECTED]
 Sent: 15 October 2004 10:46
 To: Struts Users Mailing List
 Subject: help : chaining actions in Struts
 hi all ,
 i have a common bean , which i need to use for two Actions classes
 which will execute one after another and populate the bean.
 Now how can i configure the struts so that both the action will run
 one after another ?
 Any help is welcome . .
 Regards,
 Sachin Hegde
 -
 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]
--- End of Original Message ---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

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


RE: Newbie never displays errors

2004-10-15 Thread Nadia Kunkov
David,

I followed your suggestions.  I have everything set up the way you said.
I have a default error: 
errors.add("countryName", new ActionError("errors.required","Country Name"));

I'm displaying the error using









I get the following error:
 javax.servlet.ServletException: Cannot find bean error in any scope

I also tried doing the following:
logic:messagesPresent>







I still get an error :
javax.servlet.ServletException: Cannot find bean countryName in any scope


It seems like the error doesn't get added to the session or request.
Anything else you could suggest?
Thanks
Nadia

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 3:26 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Nadia,

Are you sure you have the 3 important pieces?

A) a struts-config.xml (or module) define message resources file?  Mine is
the file WEB-INF/classes/application.properties, which contains the line:

errors.required={0} is required.

My struts-config.xml includes this resource with the line:


B) Have you put a 'default' error message in your ActionForm's validate()
method for testing purposes so your method does not end with:
return(errors);

but with:
errors.add("countryName", new ActionError("errors.required","Country
Name"));
return(errors);

C) You have JSP Code like this:









I got this to work but only AFTER I made sure I had step A configured
properly.

Since you used property key names when you added each error instead of using
the Globals.ERROR key, a.k.a. the string "error".  You added each item under
keys like "countryName" and "countryCapital" so you could access them
individually like this:









AND









Regards,
David

-Original Message-
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 1:20 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Nooo...  I guess that's it!
I thought you need to call saveErrors only when you create ActionErrors
inside Action and not in Validate...
Here is my Action  (I'm using DispatchAction):

public ActionForward Add (ActionMapping actionMapping, ActionForm
actionForm,
HttpServletRequest req,
HttpServletResponse res)
throws Exception
{

javax.sql.DataSource dataSource;

dataSource = (DataSource)
servlet.getServletContext().getAttribute(org.apache.struts.Globals.DATA_SOUR
CE_KEY);
CountryService countryService = new CountryService();
CountryDTO country = new CountryDTO();
BeanUtils.copyProperties( country,(AddCountryNewForm) actionForm);
countryService.addCountry(country,dataSource);

return actionMapping.findForward("newcountrylisting");
}


Where do I save the errors generated by the validate?

Thanks

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 1:10 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Did you call saveErrors() or saveMessages() in your Action to save the
messages into the (request) scope for use in the JSP?

-Original Message-
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 12:59 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Yes, here is what I tried:


   
   
  
   
   


I get an error: can't find bean "error" in any scope :(
This drives me nuts.
Thanks for helping me.

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 12:56 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Nadia,

The bean:write's name attribute must match the id parameter of the
html:messages tag. That's why I suggested your html:messages tag be:

  

This means it should pull the errors from the area "countryName" and present
them for the bean:write tag to use as the name "error" (see id="..").  Have
you tried this yet?

Regards,
David

-Original Message-
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 12:46 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Here is my jsp:
  ..
.














Thanks for your help

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 12:35 PM
To: Struts Users Mailing List
Subject: RE: Newbie  never displays errors


Please show your JSP code.  I think this should have worked:


   
   
  
   
   


Remember, the 

Re: No ActionErrors from Action class

2004-10-15 Thread Jeff Beal
Is redirect='true' on the forward in struts-config.xml?  If it is not, 
try using the exact print statement in your JSP page that you used in 
your Action class.  The one that you have in your JSP page is going to 
use the toString() method on the ActionErrors class, and that may have 
just printed 'null' in Struts 1.0.2.  (I can't imagine why it would have 
done that, but you never know.)

-- Jeff
Toby Saville wrote:
I mean I do the following 

mapping.findForward("failure");
And the page set up as the failure forward in the struts-config.xml file
is correctly shown.
toby
-Original Message-
From: Jeff Beal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 14, 2004 10:25 PM
To: [EMAIL PROTECTED]
Subject: Re: No ActionErrors from Action class

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

the request scope, so they would be gone.
I don't see anything else that jumps out at me.
Toby Saville wrote:

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

print out the following:
<%
 System.out.println( request.getAttribute(Action.ERROR_KEY) ); %>
Which prints "null"
What am I missing? Why arent my action class errors being displayed?
Thanks heaps for your help
toby
**
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

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

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


RE: Exposing ActionForm and MVC fields

2004-10-15 Thread Leandro Melo
Hi guys, thanks for  your opinions, it seems that both
of you stick with approach 2.

However, none of you mentioned that "exposing
ActionForm fields" problem.

Suppose if build then 2 different pages (as you
adviced me). I guess my Action for this both pages
would still be the same, it will only send the request
to 2 different pages depending the type of the
company. Usually, i set the jsps pages form`s inside
this Action (normally with BeanUtils), what will force
me to give the correct names for the jsp form fields
(even if they are labels for the case the user cannot
alter them). In this case, i`m still suceptible to be
hacked by javascript, because of the ActionForm fields
exposure.
What about that???



 --- "McCormack, Chris"
<[EMAIL PROTECTED]> escreveu: 
> +1
> 
> You could still create common elements to both pages
> which will help maintain a look and feel and reuse
> existing code, look at using different tile layouts
> for each user type but the elements in the page are
> common jsp/tile definitions.
> If the spec for one user changes then you could
> simply just copy the tile fragment that was changing
> to a new location and work on it, then change the
> tile definition for that user to point to the
> updated fragement.
> You would still maintain a majority of common code
> and in the long run even if both user views totally
> change you can deal with it as and when the changes
> happen by copying and altering each tile fragment
> that is changing and updating the tile definition to
> point to the new fragment.
> 
> Chris McCormack
> 
> -Original Message-
> From: Freddy Villalba A.
> [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 11:54
> To: Struts Users Mailing List
> Subject: RE: Exposing ActionForm and MVC fields
> 
> 
> Hi,
> 
> I'd go for approach #2. After all, they are
> different VIEWS of the same
> Model.
> 
> I've faced this situation in a couple of projects
> before, and in both cases
> buyer's and seller's views differed in the long run.
> The more complex your
> business rules / model gets, the higher is the
> chance for that happening. It
> may seem the right way to go at first (specially if
> the differences are
> insignificant), but after a few meetings with the
> corporate managers, you'll
> realize it was not such a smart move after all! :P
> 
> My humble oppinion,
> Freddy.
> 
> -Mensaje original-
> De: Leandro Melo [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 15 de octubre de 2004 3:30
> Para: struts jakarta
> Asunto: Exposing ActionForm and MVC fields
> 
> 
> Hi,
> i'd like to hear some opinions.
> 
> I got a b2b application. I'm facing a desing
> problem.
> This problems is associated basically to 2 themes:
> - MVC
> - Exposing AcfionForm fields.
> 
> I got a page where the BUYER fills a form to buy an
> specific item. The steps are very simple.
> 
> 1 - He sends a request for a quotation.
> 2 - After the quotation, he sends a request for an
> order.
> 
> The point is...
> When the SELLER goes to make the quotation he's
> supposed to see a very similar page to the one the
> BUYER filled the information. This is obvious as the
> information is the same for both parts. So, should i
> implement the page for the SELLER:
> 
> ==>>> APPROACH 1 - using the same exact page
> as the BUYER for the SELLER. Then i'd make the
> fields
> the BUYER filled disabled (or just make them labels)
> using some kind o scriptlet like this.
> 
>.../> ,
> 
>where sellerVisibility would be something =
>"disabled=true"
> 
> This approach seems nice to but i'd say that it's
> just
> not that cool!!! It doesn't look nice from an MVC
> point of view. I'll take the risk of having a lot of
> this kind of scripts in pages as the times goes by.
> I know that the Action (control layer) is actually
> responsible for setting the "sellerVisibility", what
> means that it's also not that bad from the MVC point
> of view.
> But any way, the major problem with this approah is
> that i use BeanUtils to copy data from the
> ActionForms
> to the VOs and vice-versa. So even with the fields
> disabled, i would take the risk of some smart guy
> cheatting and setting via javascript the fields he's
> not supposed to set. And as i copy the data with
> BeanUtils, my data will be changed when it's not
> supposed to do so.
> 
> 
> > APPROACH 2 - just create another page
> for the BUYER. This page would look exactly the same
> for the BUYER and the SELLER, but they'll be
> different
> pages. This way, i can build this other very similar
> page without exposing my ActionForma attributes.
> This
> approach seems to me allright from the MVC point of
> view.
> But the problem of this approach is that i'd start
> building some kind of redundant and duplicated code.
> 
> 
> Any opinions...
> 
> Leandro.
> 
> 
> 
> 
> 
>
___
> Yahoo! Acesso Grátis - Internet rápida e grátis.
> Instale o discador agora!
> http://br.acesso.ya

Re: problem with element in struts-config.xml

2004-10-15 Thread Jeff Beal
When redirect is "true" a message is sent to the browser to get the new 
resource.  This means that the browser is aware of the path of your 
error.jsp.  When redirect is false, the browser is not aware of the 
location of the JSP that is actually displaying the results.  To get 
around the problem, the  tag will tell the browser to 
resolve all URI's contained in the HTML document against a different 
location.  I'm pretty sure (though I haven't used this) that all you 
need to do is include  at the top of your error.jsp file to 
have everything resolve correctly.

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

validate="true" scope="request"   
path="/pages/admin/adminlogin">

path="/pages/admin/index.jsp"/>


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

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

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

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


Re: Problem with message resources by FormValidator

2004-10-15 Thread daniel weiss

Hi sachin, 

The attribute it doesn't declared by struts1_1.dtd. 
I can't use it :-)
The xml validation produced an error.


Regards
geramaya



--- sachin <[EMAIL PROTECTED]> wrote:

> 
> the solution to this problem is that when u define message-resource tag in 
> struts-config file mention a key tag like 
> 
>   null="false" />
> 
> and when u retrive the message from message-recource mention this key again
> like 
> 
> 
> 
> it will definaletly work
> 
> Regards,
> Sachin Hegde
> 
> 
> -- Original Message ---
> From: daniel weiss <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Fri, 15 Oct 2004 03:20:05 -0700 (PDT)
> Subject: Problem with message resources by FormValidator
> 
> > Hi,
> > 
> > i got a prob with validation.xml and my resources.
> > My submitted snipplet shows you a example for one validation 
> > condition. If set this rule without a argument statement e.g. "{0} 
> > your date is invalid", it'll be render as "???my.key.name??? your 
> > date is invalid"
> > 
> > Its doesn't matter if set the resource attribute in arg0 or not, the 
> > result was the same. This behavior only comes up on our unix machine,
> >  on my local windows machine it'll be execute respectable. I thougt, 
> > this could something to do with the Locale object or some configuration
> > on the host.
> > 
> > Knows somebody also this problem or could tell a solution etc. to 
> > fix this problem ?!
> > 
> > Thx in advance
> > geramaya
> > 
> > [SNIPPLET]
> > 
> >   
> >   
> > datePatternStrict
> > dd.MM.
> >   
> > 
> > 
> > 
> > ___
> > Do you Yahoo!?
> > Declare Yourself - Register online to vote today!
> > http://vote.yahoo.com
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> --- End of Original Message ---
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

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



RE: [FRIDAY] RE: Arzttermin

2004-10-15 Thread Hiran.Chaudhuri


 

> -Original Message-
> From: Pilgrim, Peter [mailto:[EMAIL PROTECTED] 
> Sent: Freitag, 15. Oktober 2004 10:52
> To: 'Struts Users Mailing List'
> Subject: OT: [FRIDAY] RE: Arzttermin
[...]
> Verwirrendend laecherlich!
> 
> Well that is the extent of my spoken and written German, 
> which I have forgetten in the past decade. 
> So I guess it is quite crap now.

Not too crappy - enough to understand what you meant to say.
All you need is a chance to practice.

Hiran

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

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



RE: Exposing ActionForm and MVC fields

2004-10-15 Thread McCormack, Chris
+1

You could still create common elements to both pages which will help maintain a look 
and feel and reuse existing code, look at using different tile layouts for each user 
type but the elements in the page are common jsp/tile definitions.
If the spec for one user changes then you could simply just copy the tile fragment 
that was changing to a new location and work on it, then change the tile definition 
for that user to point to the updated fragement.
You would still maintain a majority of common code and in the long run even if both 
user views totally change you can deal with it as and when the changes happen by 
copying and altering each tile fragment that is changing and updating the tile 
definition to point to the new fragment.

Chris McCormack

-Original Message-
From: Freddy Villalba A. [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 11:54
To: Struts Users Mailing List
Subject: RE: Exposing ActionForm and MVC fields


Hi,

I'd go for approach #2. After all, they are different VIEWS of the same
Model.

I've faced this situation in a couple of projects before, and in both cases
buyer's and seller's views differed in the long run. The more complex your
business rules / model gets, the higher is the chance for that happening. It
may seem the right way to go at first (specially if the differences are
insignificant), but after a few meetings with the corporate managers, you'll
realize it was not such a smart move after all! :P

My humble oppinion,
Freddy.

-Mensaje original-
De: Leandro Melo [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 15 de octubre de 2004 3:30
Para: struts jakarta
Asunto: Exposing ActionForm and MVC fields


Hi,
i'd like to hear some opinions.

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

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

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

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

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

   .../> ,

   where sellerVisibility would be something =
   "disabled=true"

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


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


Any opinions...

Leandro.





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

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


-
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 

RE: Exposing ActionForm and MVC fields

2004-10-15 Thread Freddy Villalba A.
Hi,

I'd go for approach #2. After all, they are different VIEWS of the same
Model.

I've faced this situation in a couple of projects before, and in both cases
buyer's and seller's views differed in the long run. The more complex your
business rules / model gets, the higher is the chance for that happening. It
may seem the right way to go at first (specially if the differences are
insignificant), but after a few meetings with the corporate managers, you'll
realize it was not such a smart move after all! :P

My humble oppinion,
Freddy.

-Mensaje original-
De: Leandro Melo [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 15 de octubre de 2004 3:30
Para: struts jakarta
Asunto: Exposing ActionForm and MVC fields


Hi,
i'd like to hear some opinions.

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

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

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

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

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

   .../> ,

   where sellerVisibility would be something =
   "disabled=true"

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


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


Any opinions...

Leandro.





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

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


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



RE: help : creating own ActionForm

2004-10-15 Thread McCormack, Chris
You shouldn't have to make any configuration changes to use and extended ActionForm 
with your Actions.

Just extend ActionForm with your own base implementation and then create your beans by
extending your base implementation. Make sure to include each bean declaration in the 
 
section of struts-config.xml

Chris McCormack

-Original Message-
From: sachin [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 11:38
To: Struts Users Mailing List
Subject: help : creating own ActionForm


hi , 

I want to crete my own ActionForm and let all the bean extend it instead of 
default ActionForm . 
For this what configuration and changes i will have to make ? 

Regards,
Sachin Hegde



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


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



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



Re: Problem with message resources by FormValidator

2004-10-15 Thread sachin

the solution to this problem is that when u define message-resource tag in 
struts-config file mention a key tag like 

 

and when u retrive the message from message-recource mention this key again
like 



it will definaletly work

Regards,
Sachin Hegde


-- Original Message ---
From: daniel weiss <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Fri, 15 Oct 2004 03:20:05 -0700 (PDT)
Subject: Problem with message resources by FormValidator

> Hi,
> 
> i got a prob with validation.xml and my resources.
> My submitted snipplet shows you a example for one validation 
> condition. If set this rule without a argument statement e.g. "{0} 
> your date is invalid", it'll be render as "???my.key.name??? your 
> date is invalid"
> 
> Its doesn't matter if set the resource attribute in arg0 or not, the 
> result was the same. This behavior only comes up on our unix machine,
>  on my local windows machine it'll be execute respectable. I thougt, 
> this could something to do with the Locale object or some configuration
> on the host.
> 
> Knows somebody also this problem or could tell a solution etc. to 
> fix this problem ?!
> 
> Thx in advance
> geramaya
> 
> [SNIPPLET]
> 
>   
>   
> datePatternStrict
> dd.MM.
> 
> 
> 
>   
> ___
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--- End of Original Message ---


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



RE: help : creating own ActionForm

2004-10-15 Thread Kailash Vasani
If you mean that you want to have all your "Action Classes" extend new
Action class that you
would be writing, then you dont need any configuration change, as long as
you extend 
struts Action class in your parent action class.

-Original Message-
From: sachin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 4:08 PM
To: Struts Users Mailing List
Subject: help : creating own ActionForm


hi , 

I want to crete my own ActionForm and let all the bean extend it instead of 
default ActionForm . 
For this what configuration and changes i will have to make ? 

Regards,
Sachin Hegde



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

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



RE: help : chaining actions in Struts

2004-10-15 Thread sachin

> in first action class, put the bean in request before forwarding.
i got it working . 

thanks McCormack Chris and Kailash

regards , 
sachin

-- Original Message ---
From: Kailash Vasani <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Fri, 15 Oct 2004 15:51:32 +0530
Subject: RE: help : chaining actions in Struts

> in first action class, put the bean in request before forwarding.
> 
> -Original Message-
> From: sachin [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 15, 2004 3:41 PM
> To: Struts Users Mailing List
> Subject: RE: help : chaining actions in Struts
> 
> > Have the first action's success forward on to the next action in 
> > struts config.
> 
> but will the same bean be populated ?
> 
> Regards , 
> sachin
> 
> -- Original Message ---
> From: "McCormack, Chris" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Fri, 15 Oct 2004 10:42:04 +0100
> Subject: RE: help : chaining actions in Struts
> 
> > Have the first action's success forward on to the next action in 
> > struts config.
> > 
> > Chris McCormack
> > 
> > -Original Message-
> > From: sachin [mailto:[EMAIL PROTECTED]
> > Sent: 15 October 2004 10:46
> > To: Struts Users Mailing List
> > Subject: help : chaining actions in Struts
> > 
> > hi all ,
> > 
> > i have a common bean , which i need to use for two Actions classes 
> > which will execute one after another and populate the bean.
> > 
> > Now how can i configure the struts so that both the action will run 
> > one after another ?
> > 
> > Any help is welcome . .
> > 
> > Regards,
> > Sachin Hegde
> > 
> > -
> > 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]
> --- End of Original Message ---
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> "Quinnox is an Award Winning IT services organisation, accredited to 
> CMM Level 5. We are successfully delivering Application Development, 
> Integration, Support and Testing services to clients in the Finance, 
> Manufacturing, Retail and Telecom sectors. Particular focus areas include
> e-Business and ERP (notably SAP) solutions."
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--- End of Original Message ---


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



help : creating own ActionForm

2004-10-15 Thread sachin
hi , 

I want to crete my own ActionForm and let all the bean extend it instead of 
default ActionForm . 
For this what configuration and changes i will have to make ? 

Regards,
Sachin Hegde



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



Problem with message resources by FormValidator

2004-10-15 Thread daniel weiss
Hi,

i got a prob with validation.xml and my resources.
My submitted snipplet shows you a example for one validation condition. If
set this rule without a argument statement e.g. "{0} your date is invalid", 
it'll be render as "???my.key.name??? your date is invalid"

Its doesn't matter if set the resource attribute in arg0 or not, the result was the 
same.
This behavior only comes up on our unix machine, on my local windows machine it'll be 
execute
respectable. I thougt, this could something to do with the Locale object or some 
configuration
on the host.

Knows somebody also this problem or could tell a solution etc. to fix this problem ?!

Thx in advance
geramaya


[SNIPPLET]

  
  
datePatternStrict
dd.MM.
  





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

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



RE: help : chaining actions in Struts

2004-10-15 Thread Kailash Vasani
in first action class, put the bean in request before forwarding.


-Original Message-
From: sachin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 3:41 PM
To: Struts Users Mailing List
Subject: RE: help : chaining actions in Struts



> Have the first action's success forward on to the next action in 
> struts config.

but will the same bean be populated ?

Regards , 
sachin


-- Original Message ---
From: "McCormack, Chris" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Fri, 15 Oct 2004 10:42:04 +0100
Subject: RE: help : chaining actions in Struts

> Have the first action's success forward on to the next action in 
> struts config.
> 
> Chris McCormack
> 
> -Original Message-
> From: sachin [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 10:46
> To: Struts Users Mailing List
> Subject: help : chaining actions in Struts
> 
> hi all ,
> 
> i have a common bean , which i need to use for two Actions classes 
> which will execute one after another and populate the bean.
> 
> Now how can i configure the struts so that both the action will run 
> one after another ?
> 
> Any help is welcome . .
> 
> Regards,
> Sachin Hegde
> 
> -
> 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]
--- End of Original Message ---


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

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



RE: help : chaining actions in Struts

2004-10-15 Thread McCormack, Chris
Set the bean on the request in the first action and retrieve it in the second action.

Chris McCormack

-Original Message-
From: sachin [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 11:11
To: Struts Users Mailing List
Subject: RE: help : chaining actions in Struts



> Have the first action's success forward on to the next action in 
> struts config.

but will the same bean be populated ?

Regards , 
sachin


-- Original Message ---
From: "McCormack, Chris" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Fri, 15 Oct 2004 10:42:04 +0100
Subject: RE: help : chaining actions in Struts

> Have the first action's success forward on to the next action in 
> struts config.
> 
> Chris McCormack
> 
> -Original Message-
> From: sachin [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 10:46
> To: Struts Users Mailing List
> Subject: help : chaining actions in Struts
> 
> hi all ,
> 
> i have a common bean , which i need to use for two Actions classes 
> which will execute one after another and populate the bean.
> 
> Now how can i configure the struts so that both the action will run 
> one after another ?
> 
> Any help is welcome . .
> 
> Regards,
> Sachin Hegde
> 
> -
> 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]
--- End of Original Message ---


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


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



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



RE: help : chaining actions in Struts

2004-10-15 Thread sachin

> Have the first action's success forward on to the next action in 
> struts config.

but will the same bean be populated ?

Regards , 
sachin


-- Original Message ---
From: "McCormack, Chris" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Fri, 15 Oct 2004 10:42:04 +0100
Subject: RE: help : chaining actions in Struts

> Have the first action's success forward on to the next action in 
> struts config.
> 
> Chris McCormack
> 
> -Original Message-
> From: sachin [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 10:46
> To: Struts Users Mailing List
> Subject: help : chaining actions in Struts
> 
> hi all ,
> 
> i have a common bean , which i need to use for two Actions classes 
> which will execute one after another and populate the bean.
> 
> Now how can i configure the struts so that both the action will run 
> one after another ?
> 
> Any help is welcome . .
> 
> Regards,
> Sachin Hegde
> 
> -
> 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]
--- End of Original Message ---


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



OT: [FRIDAY] RE: Arzttermin

2004-10-15 Thread Pilgrim, Peter

> -Original Message-
> From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> Sent: 14 October 2004 08:31
> To: Struts Users Mailing List
> Subject: Re: Arzttermin
> 
> 
> Markus Heck wrote:
> > Hallo Andreas,
> > 
> > ich hab um 9:50 Uhr einen Arzttermin; ich meld mich dann noch mal
> > und sag Bescheid, wann und ob ich heute noch komme.
> > 

Na Ja! Da tut mir auch leid, aber es ist bei mir egal ob Du kommst or
nicht kommst.

> > Zu MAP:
> > Dein Programm hab ich gestern noch getestet (mit einer Schleife über
> > alle Sätze aus vip_products), ich hab noch eine Änderung eingebaut,
> > dann war's korrekt. Programm steht unter 
> h:\orawork\map\stringpattern3.sql
> > 

Warum ist mein Programm immer gar nichts angetestet. Ich bitte ein Bit.

> > zu Excel-Reports:
> > Da hab ich gestern das mit dem Password gemacht, hab das 
> aber nur einmal
> > kurz in der Entwicklung getestet. Da stehen die aktuellen 
> Sourcen unter
> > h:\work\java\article\reports\src...\servlet (3 neue 
> Servlets). Falls Ihr
> > eine Übergabe machen müßt.
> > 

Na das Quelle steht under den Verzeichniss H:\dem\naechste\galaxy\oder\winkel

> > für Stefan zu Kostenlieferanten (hab weder Telefonnummer 
> noch Emailadresse):
> > Die Patche, ich meine *9320 und *9360 stehen im 
> Project-Verzeichnis und
> > sind bis auf die Änderungen vom Torsten vollständig. Die 
> müssen nur in
> > PVCS eingecheckt werden und können hochgeschickt werden.
> > 

Warum benutzen Sie, die Gruppen, solche beschiessenden software als PCVS.
Haben Sie nicht nocht ClearCase gehoren?

Grussen Toersten an

> > Damit Du noch an meine Sachen rankommst, mein Password (alles
> > kleingeschrieben):
> > Stadt, wo ich letzte Woche war mit angehängter 
> vierstelliger Jahreszahl.
> 
> LOL
> 
Verwirrendend laecherlich!

Well that is the extent of my spoken and written German, 
which I have forgetten in the past decade. 
So I guess it is quite crap now.


--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44 (0)207 883 4447


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

==
This message is for the sole use of the intended recipient. If you received this 
message in error please delete it and notify us. If this message was misdirected, CSFB 
does not waive any confidentiality or privilege. CSFB retains and monitors electronic 
communications sent through its network. Instructions transmitted over this system are 
not binding on CSFB until they are confirmed by us. Message transmission is not 
guaranteed to be secure.
==


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



RE: help : chaining actions in Struts

2004-10-15 Thread McCormack, Chris
Have the first action's success forward on to the next action in struts config.

Chris McCormack

-Original Message-
From: sachin [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 10:46
To: Struts Users Mailing List
Subject: help : chaining actions in Struts


hi all ,

i have a common bean , which i need to use for two Actions classes which will 
execute one after another and populate the bean.

Now how can i configure the struts so that both the action will run one after 
another ? 

Any help is welcome . . 

Regards,
Sachin Hegde

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



help : chaining actions in Struts

2004-10-15 Thread sachin
hi all ,

i have a common bean , which i need to use for two Actions classes which will 
execute one after another and populate the bean.

Now how can i configure the struts so that both the action will run one after 
another ? 

Any help is welcome . . 

Regards,
Sachin Hegde

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



RE: mechanism to clear objects in the session

2004-10-15 Thread McCormack, Chris
I haven't tried this yet, but maybe any objects that you intend to put in the session 
should have a nice finalize section to tidy themselves up before being removed by GC. 
You could then effectively force GC on these objects by System.runFinalization() when 
you needed without keeping track of what you are putting in the session.

Just having a muse over morning coffee, don't know how practical/viable this solution 
is :)

Chris McCormack

-Original Message-
From: lixin chu [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 10:05
To: Struts Users Mailing List
Subject: Re: mechanism to clear objects in the session


thanks. it indeed helps me, in fact the points are
critical - i need to think my use cases twice, and you
have also pointed out a couple of choices. i will try
to come out a cleaner implementation in my system.
thanks again !



--- Erik Weber <[EMAIL PROTECTED]> wrote:

> There was no common solution discussed that I
> recall. But, the idea is, 
> put a class to work in a place where it can monitor
> every request. For 
> example, in a Servlet Filter, or in a Struts
> RequestProcessor subclass, 
> or an Action base class. As far as I know, there is
> no existing 
> framework or common utility for doing this sort of
> thing. I have found 
> that using a common naming convention (or even a
> common key) for these 
> types of session attributes makes programming the
> cleanup easier. 
> Tracking page flow and deciding what's going with
> the flow and what's 
> going against the flow is up to you.
> 
> A real simple first implementation might be to clean
> out all session 
> attributes (such as forms) that are considered
> "working" attributes (not 
> those, such as "user" objects, that are needed for
> the lifetime of the 
> session) whenever the user returns to the "home"
> page (in your "home" 
> Action).
> 
> It is worth noting that good navigation design
> inherently makes this 
> sort of thing easier. Applications should have
> "home" views, and 
> sections of the application should have their own
> "home" views. When the 
> user finishes a task, he returns to the home view
> for the section he's 
> using, or to the main home view. This is where you
> can do cleanup (while 
> you are preparing the home view).
> 
> Or not. The particular design isn't really relevant.
> The point is to 
> design *something*, to think it through ahead of
> time, instead of just 
> drawing pages and making them "work".
> 
> Sorry I didn't help much.
> 
> Erik
> 
> 
> 
> lixin chu wrote:
> 
> >Hi,
> >I saw an ealier thread discussing this but still
> can
> >not fully understand the solution.
> >
> >appreciate if any one can provide some more
> detailed
> >info on this. basically if the current page flow is
> >terminated for some reason, how the Struts
> application
> >can clear the objects stored in the session ?
> >
> >thanks
> >li xin
> >
> >__
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

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


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



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



Re: mechanism to clear objects in the session

2004-10-15 Thread lixin chu
thanks. it indeed helps me, in fact the points are
critical - i need to think my use cases twice, and you
have also pointed out a couple of choices. i will try
to come out a cleaner implementation in my system.
thanks again !



--- Erik Weber <[EMAIL PROTECTED]> wrote:

> There was no common solution discussed that I
> recall. But, the idea is, 
> put a class to work in a place where it can monitor
> every request. For 
> example, in a Servlet Filter, or in a Struts
> RequestProcessor subclass, 
> or an Action base class. As far as I know, there is
> no existing 
> framework or common utility for doing this sort of
> thing. I have found 
> that using a common naming convention (or even a
> common key) for these 
> types of session attributes makes programming the
> cleanup easier. 
> Tracking page flow and deciding what's going with
> the flow and what's 
> going against the flow is up to you.
> 
> A real simple first implementation might be to clean
> out all session 
> attributes (such as forms) that are considered
> "working" attributes (not 
> those, such as "user" objects, that are needed for
> the lifetime of the 
> session) whenever the user returns to the "home"
> page (in your "home" 
> Action).
> 
> It is worth noting that good navigation design
> inherently makes this 
> sort of thing easier. Applications should have
> "home" views, and 
> sections of the application should have their own
> "home" views. When the 
> user finishes a task, he returns to the home view
> for the section he's 
> using, or to the main home view. This is where you
> can do cleanup (while 
> you are preparing the home view).
> 
> Or not. The particular design isn't really relevant.
> The point is to 
> design *something*, to think it through ahead of
> time, instead of just 
> drawing pages and making them "work".
> 
> Sorry I didn't help much.
> 
> Erik
> 
> 
> 
> lixin chu wrote:
> 
> >Hi,
> >I saw an ealier thread discussing this but still
> can
> >not fully understand the solution.
> >
> >appreciate if any one can provide some more
> detailed
> >info on this. basically if the current page flow is
> >terminated for some reason, how the Struts
> application
> >can clear the objects stored in the session ?
> >
> >thanks
> >li xin
> >
> >__
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

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



LogWeb 2.1, Maven and HttpUnit

2004-10-15 Thread Nathan Coast
Hi,
The codeczar team is pleased to announce the release of LogWeb 2.1
http://www.codeczar.com/products/logweb/
LogWeb is a web app admin interface for Log4J developed with struts. 
More recently the focus of this project has shifted away from adding new 
features.  LogWeb is evolving as an example and test case for a number 
of other technologies and ideas.

*
Maven - maven-struts-module-plugin
LogWeb is built using maven and the maven-struts-module-plugin
http://www.codeczar.com/products/maven-struts-module-plugin/
This plugin:
1) builds LogWeb as a standalone web-app
2) builds LogWeb as a struts-module component
3) automates bundling LogWeb as a component within your web-apps.
*
HttpUnit
Whilst creating HttpUnit tests for LogWeb a pattern evolved for writing 
HttpUnit test classes.  This has been documented here: 
http://www.codeczar.com/technologies/httpunit/HttpUnitHowTo.html
We found this pattern very useful so hopefully others will too.

cheers
Nathan
--
Nathan Coast
Managing Director
codeczar ltd
mobile: (852) 9049 5581
email:  mailto:[EMAIL PROTECTED]
web:http://www.codeczar.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]