Programmatic Security

2003-03-10 Thread Renato Romano
I'm going to use the servlet security capability for enabling users to
authenticate and work on my application, that is defining roles and
secuirty constraints in web.xml. In some cases i'd want to show some
links based on this security info, that is accessible via the
request.isUserInRole() method. How to use struts tags to test this ?
Thanks


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_



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



Re: [OT]Re: quick log4j question

2003-03-10 Thread Manfred Wolff
No, Rick, I don't. I have said: Put it in ANY directory, that contains 
to the classpath. It is a good Idea to build a group of property-files 
e.g. in WEB-INF/classes/ressources or any other directory.

But I don't know why evrybody will have a configuration in web.xml and a 
 initialisation in the Actionsservlet. That is not need.

Manfred

Rick Reumann wrote:
On Sun, Mar 09,'03 (12:29 PM GMT+0100), Manfred wrote: 
  

The best you can do to place your property file in any directory that 
contains to the classpath (e.g. WEB-INF/classes ...) and load the file


So you are saying (in response to Dan's question) that it is best to
just keep the log4j.properties file in WEB-INF/classes and to not try
and move it to somewhere like WEB-INF/classes/resources ?
 



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


Re: [Design Pattern]FormBean in Model Layer

2003-03-10 Thread Jin Bal
If you don't wnat to be tied to the DynaBean api either you could defin your
own custom DTO interface that defines the data that your model layer
requires.

then you could have your ActionForm implement your custom interface.  Then
you could just pass the action forms into the layer as the custom interface.

Your model layer wont know (or care) that your using an actionform all it
cares about is the DTO interface.

i.e your application deosn't know about struts but struts knows about your
application

might make things easier.

HTH

Jin
- Original Message -
From: "harish krishnaswamy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Puneet
Agarwal" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 1:34 AM
Subject: Re: [Design Pattern]FormBean in Model Layer


> Well, you would use the following form-bean
> definition.
>
>  type="xyz.domain.DynaActionFormSubClass">
>type="java.lang.String">
> 
>   model-property
>   custLastName
> 
>   
>   ...
>   ...
> 
>
> Customize BeanUtils to copy the properties of
> DynaActionFormSubClass to a model-property-keyed map.
> pass this map to the model layer and have an adaptor
> in the model layer copy these porperties to the
> required model objects, again using BeanUtils.
>
> -Harish
>
> --- Puneet Agarwal <[EMAIL PROTECTED]> wrote:
> > Thanks for your views,
> > My basic intention is to avoid the headache of
> > copying the values from
> > FormBean to my Model layer.
> > and that since formbean keeps all the values in a
> > nice manner that can be
> > adaptive to any framework.
> >
> > Well this is a correct point that we should keep our
> > Model layer separate
> > from strutsish components.
> >
> > but Harsish's Idea sounds good, would be nice if
> > Harish could say something
> > more about his approach.
> >
> > Regards
> > Puneet Agarwal
> > ->
> > "Struts"..."Action"..."Struts in Action"..."Action
> > in
> > Struts"...[possibly]"Action with Struts"...?
> > - Original Message -
> > From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > Sent: Sunday, March 09, 2003 3:09 AM
> > Subject: Re: [Design Pattern]FormBean in Model Layer
> >
> >
> > > In our project, we have designed our model facade
> > > objects to take in a map and let the facade copy
> > the
> > > map to the appropriate business objects using
> > > BeanUtils. We have customized the form-bean config
> > to
> > > map the form-bean properties to the model
> > properties.
> > > This way the model objects will be independent of
> > the
> > > view/controller.
> > >
> > > -Harish
> > >
> > >
> > > --- David Graham <[EMAIL PROTECTED]> wrote:
> > > > That is a terrible idea.  Form beans should
> > never
> > > > make it out of the
> > > > Struts/view layer.  You will tie your
> > application to
> > > > Struts and make it
> > > > impossible to reuse the logic in another
> > application
> > > > or even to stop using
> > > > Struts in the future.
> > > >
> > > > David
> > > >
> > > >
> > > >
> > > > >From: "Puneet Agarwal"
> > <[EMAIL PROTECTED]>
> > > > >Reply-To: "Puneet Agarwal"
> > > > <[EMAIL PROTECTED]>
> > > > >To: "Struts Users Mailing List"
> > > > <[EMAIL PROTECTED]>
> > > > >Subject: [Design Pattern]FormBean in Model
> > Layer
> > > > >Date: Sun, 9 Mar 2003 02:45:15 -
> > > > >
> > > > >We are in the stage of finalizing the design
> > > > pattern for our project.
> > > > >
> > > > >While discussing the design patterns with my
> > > > colleagues,
> > > > >somebody came with an idea to pass the FormBean
> > as
> > > > it is,
> > > > >to the Session Bean or sometimes even to the
> > Value
> > > > List handler Block
> > > > >Later I thought this can actually be a good
> > idea.
> > > > >
> > > > >I understand that this is against underlying
> > > > layered MVC pattern itself,
> > > > >but
> > > > >avoids a lot of headache. Can someone say what
> > > > could be other disadvantage
> > > > >of this.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >-->
> > > > >"Struts"..."Action"..."Struts in
> > Action"..."Action
> > > > in
> > > > >Struts"...[possibly]"Action with
> > Struts"..."Action
> > > > over Struts"...?
> > > > >
> > > > >
> > > >
> > >
> >
> >-
> > > > >To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > >For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> >
> _
> > > > Protect your PC - get McAfee.com VirusScan
> > Online
> > > >
> > >
> >
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> > > >
> > > >
> > > >
> > >
> >
> -
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > __

Re: [Announce] OJBMessageResources available on SourceForge.net

2003-03-10 Thread Dirk Markert
Hello James,

I tried to download the zip and the rar files from several mirrors.
Both archive types are corrupt. Is this a sourceforge error or are the
original files coruppted?

Saturday, March 8, 2003, 6:44:30 AM, you wrote:

JM> OJBMessageResources is an implementation of MessageResources that allows
JM> you to keep your application resources bundle in a database.

JM> As you might have guessed from the name, OJBMessageResources uses the
JM> very popular O/R Mapping tool OJB (under the covers).  If you've never
JM> used OJB before don't worry, configuring your application to use this
JM> extension should only take a few minutes and is very straightforward,
JM> and complete instructions have been provided.

JM> I plan to release similar implementations using Torque, straight JDBC,
JM> and possibly Castor.  If you have further questions or would like to
JM> discuss this or future implementations, please feel free to send me an
JM> email.


JM> Home page:
JM> http://sourceforge.net/struts/

JM> Downloads (source and binaries):
JM> http://sourceforge.net/project/showfiles.php?group_id=49385&release_id=1
JM> 44905

JM> OJB page:
JM> http://jakarta.apache.org/



JM> --
JM> James Mitchell
JM> Software Developer/Struts Evangelist
JM> http://jakarta.apache.org/struts




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



-- 
Best regards,
Dirk


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



bean:define and el tags

2003-03-10 Thread Mohan Radhakrishnan
Hi

   I am trying to use simple if-else logic here.

Date formatter -



   If my indexed property in the form returns null, I use the current date.










This is to populate my html:text box like this



parsing xml that contains hebrew using xerces

2003-03-10 Thread Yaron Sela
Hi all.

Does someone know about parsing xml that contains hebrew, using xerces?

I tried the encode: windows-1255, Cp1255 and it still returned question
marks.

my method:

  protected static Document readXmlFile(String fileName) throws
XmlManagerException{
DOMParser p = new DOMParser();

try {
  FileInputStream fis = new
FileInputStream(RESOURCES_FINALS_DIR+"/"+fileName);

p.setFeature("http://apache.org/xml/features/allow-java-encodings",true);
  p.parse(new InputSource(fis));
} catch(Exception e) {
  throw new XmlManagerException(MessageFinals.XML_NOT_FOUND);
}
return p.getDocument();
  }

!! Can anyone recommend me of xerces mailing list.
thanks for your time.

yaron


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



Scrollable pop-up query list

2003-03-10 Thread Richard Mixon
Some of our forms have reference fields that deal with very large domains -
far too many to populate a "

Re: [Tiles] Design - Overriding items

2003-03-10 Thread Cedric Dumoulin
Hi,

Affan Qureshi wrote:

I have divided the modules(logical) in my application in a Tab layout. I
want to show different pages under the same tab at various points in the
application. It means the putList items change all the time. If I want to
extend and override the values inside the putList tags I have to write the
whole putList tag again in the extended definition. Is this right or is
there a better way?
 

 It is right, the list itself is not extended ;-(. This is an 
enhancement request. I am not sure if it is already in bugzilla.Feel 
free to add it or vote for it.

I have created a bean in which I keep values for links to display in each
tab and modify them at runtime in my Action classes. I put that bean in
session and copy its properties to the TilesContext in the controllerClass
actions. The problem is that this design is not very easy to maintain and
enhance. Also I get the values mixed up in the session which makes the user
go to a wrong page sometimes. And the layout code is all over the place
instead of a single, configurable one (like the XML file).
Is this the right design I have? Any suggestions/solutions?

 In tiles examples I use the following for a user customized menu:

   * A definition contain the attributes for the menu, with a list of
 default items to show.
   * The controller  try to retrieve a customized list of items (from
 the session, but could be from a persistent storage)
 o If the list isn't found, get the one defined in the tile
   context from the definition, copy it and store it
   appropriately in the session. So, the list in the definition
   is used to initialize the default values !
   * Replace the list in the tile context with the customized one
   * Return from the controller and show the tile
 In this scenario, the definition is used to defined the default 
values. So, the management still centralized in the xml file. The 
controller is used to prepare appropriately the data to show.

Hope this help,

 Cedric

Thanks a lot,
Affan
PS
My Tiles Code below:
This is my basic/default definition:


   
   
   
   
   
   
   
   
   
   ..
   
   

In actions i have the following code to set the values in the session bean:
   LayoutSettings settings =
(LayoutSettings)req.getSession(true).getAttribute(WebAppConstants.TAB_LAYOUT
_SETTINGS);
   List tabList = settings.getTabList();
   SimpleMenuItem searchTab = (SimpleMenuItem)tabList.get(3);
   searchTab.setLink(returnLink);
   tabList.set(3,searchTab);
   settings.setTabList(tabList);
req.getSession(true).setAttribute(WebAppConstants.TAB_LAYOUT_SETTINGS,settin
gs);
-
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: [Tiles] Localization Using Extended Tiles Definitions

2003-03-10 Thread Cedric Dumoulin
 Hi,

Paul Hodgetts wrote:

Should I be able to do the following localization using
extended tiles definitions?
In tiles-defs.xml:













 You need a .page.local definition in this file too. This file is used 
as default when the locale can't be resolved. In your case, when the 
locale is not de_DE. So, this file must be able to be fully resolved by 
itself.

In tiles-defs_de_DE.xml:






 This is ok. When the locale is de_DE, this definition will be used in 
place of the definition with the same name in the default config file.

In other words, there is a common base page across all the
locales.  Each local adds a locale-specific menu to every
page.  Then there are the variety of specific pages that
add their unique content.
Does this make sense? 
 Yes, in your localized files, just rewrite the definition that need to 
be rewritten.

Is this the right way to do this, or
is there some other way to accomplish this? 
 This is the right way to do, but don't forget that you need a default 
configuration file. This later should be fully resolvable when it is 
read by the definition factory. This mean that all ancestor definitions 
must be accessible in the file, or in one of the file specified in the 
factory config.

 In Tiles, there is one factory for each matching locale (a matching 
locale = there exist a file with appropriate suffix for the locale). The 
factory is loaded when the locale is encountered. File loading follow 
the java i18n rule: The default file is loaded, then it is overloaded by 
files with the same name and a local matching i18n suffix.

 Cedric




Right now, I'm getting an error saying that it can't find a
definition for .page.local, but I may be doing something
else wrong.
Thanks,
Paul
-
Paul Hodgetts -- Principal Consultant
Agile Logic  -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


Re: how to catch exception using tiles thrown by e.g. org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude

2003-03-10 Thread Cedric Dumoulin
 Hi,

 This design have been chosen in order to not penalize an entire page 
when only one tile fail. With this design, the page is shown correctly, 
and the faulty tile report an error.
 What is missing in this design is a way to customize what should 
happen in case of error. This is an enhancement request to be added to 
bugzilla (or vote for it if it already exist).

 Cedric

Jörg Maurer wrote:

Wondering why i have no chance to catch any exception i did some
investigation on that topic , so i consulted the java logic of your
insert tag. it is that ~good~ shielded against any exception bubbling,
that my own error handler logic never gets a chance because ALL
EXCEPTIONS HAVE BEEN CAUGTH AND NEVER RETHROWN. next is snip from your
Insert Tag(commented out is your code, underneath that is what i want -
throw new JspException(ex.getMessage())) : 

			} catch (ServletException ex) {
Throwable realEx = ex;
if (ex.getRootCause() != null) {
	realEx = ex.getRootCause();
}
//processException(
//	realEx,
//	"[ServletException in:" + page +
"] " + realEx.getMessage() + "'");
   throw new JspException(ex.getMessage());
			} catch (Exception ex) {
//processException(ex, "[Exception in:" +
page + "] " + ex.getMessage());
   throw new JspException(ex.getMessage());
			} finally {
// restore old context
// done only if currentContext not null
(bug with Silverstream ?; related by Arvindra Sehmi 20010712)
if (currentContext != null)
	pageContext.setAttribute(
	
ComponentConstants.COMPONENT_CONTEXT,
		currentContext,
	
pageContext.REQUEST_SCOPE);
   
			}
			return EVAL_PAGE;

Looking at Geary´s template insert tag, he always chose to do "throw new
JspException(ex.getMessage());".
Your logic displays by default a simple stack trace(Exception type and
exception message) of where the tile should be. I dont want to show that
to my customer, but as i said, i have no change to display my  jsp-error
page instead.  

So if that "feature" is not here for any other reason, i consider that
being a unlucky design for me, because i have to at least vesion my own
tiles.jar or do some dirty subclassing your tag.
I would appreciate your comment.

Greets Jörg



-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 06. März 2003 11:57
To: Struts Users Mailing List
Subject: Re: how to catch exception using tiles thrown by e.g.
org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude


Jörg Maurer wrote:

 

Cedric 


   

exactly as you said,  is used. despite the big try-catch block
approach, its unclear to me why error-page in web.xml doesn#t get a
   

try.
 

Additionally i searched for similar behaviour and all i found was
following 
"page 52 of the JSP 1.2 spec : 
Note: if autoFlush=true then if the contents of the initial Jsp-
Writer has been flushed to the ServletResponse output stream
then any subsequent attempt to dispatch an uncaught
exception from the offending page to an errorPage may fail.
When an error page is also indicated in the web.xml
descriptor, the JSP error page applies first, then the web.xml
page.".

You as a more experienced one than myself, does it make some sense to
the issue?
   

 This make sense: Your page is made of several tiles. The first ones 
have already been compute, and so some outputs have been flushed. Then, 
one of the  throw an exception. This exception is not catched

by the jsp mechanism because the output stream has already been flushed
...
  Cedric

 

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 04. März 2003 18:35
To: Struts Users Mailing List
Subject: Re: how to catch exception using tiles thrown by e.g.
org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude


I suppose that your exception is thrown by a  tag
   

in
 

a jsp.
This exception is thrown by the tiles framework, which know nothing 
about the struts exception mechanism, so it can't be used. The
   

exception
 

is then propagated by the tag handler and reach the jsp page (the tile 
jsp). If there is an exception handler associated to the jsp, it is 
called, if there is no handler, the exception is propagated to parent 
page inserting this one. If the parent page have inserted the child
   

page
 

with an , then the  catch the exception and show
   

it.
 

Normally, the jsp exception handling should work, but it appear that it
   

 

is not always the case.

A workaround is to put a big try/catch in the jsp throwing the 
exception ;-(. This will be improved in future versions.

   Cedric

Jörg Maurer wrote:



   

Hi struts people!

I have really defined everywhere i think i can put an exception
 

handler
 

for servlet exception : 
1.) in my base layout.jsp an <%@
errorPage='/pages/common/error/errorsGeneralHandler.jsp'%>
2.) in struts config a global exception handler
  
   

struts database application

2003-03-10 Thread Pgdbvu

I have recently written a Struts application which allows the viewing of any JDBC 
compliant database.

It may be downloaded from my website

http://members.aol.com/pgdbvu/

I am interested in any feedback on the application.

If it is deemed worthy how do I go about getting it added to the Struts website 
Resources - Projects and Examples page.

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



Re: [Design Pattern]FormBean in Model Layer

2003-03-10 Thread Puneet Agarwal
Yeah I am going to adopt this. I am not very sure of how exactly am I going
to do that(at the moment). But yes it sounds too  good.

Thanks
Puneet Agarwal
->
"Struts"..."Action"..."Struts in Action"..."Action in
Struts"...[possibly]"Action with Struts"...?
- Original Message -
From: "Jin Bal" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 8:09 AM
Subject: Re: [Design Pattern]FormBean in Model Layer


> If you don't wnat to be tied to the DynaBean api either you could defin
your
> own custom DTO interface that defines the data that your model layer
> requires.
>
> then you could have your ActionForm implement your custom interface.  Then
> you could just pass the action forms into the layer as the custom
interface.
>
> Your model layer wont know (or care) that your using an actionform all it
> cares about is the DTO interface.
>
> i.e your application deosn't know about struts but struts knows about your
> application
>
> might make things easier.
>
> HTH
>
> Jin
> - Original Message -
> From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Puneet
> Agarwal" <[EMAIL PROTECTED]>
> Sent: Monday, March 10, 2003 1:34 AM
> Subject: Re: [Design Pattern]FormBean in Model Layer
>
>
> > Well, you would use the following form-bean
> > definition.
> >
> >  > type="xyz.domain.DynaActionFormSubClass">
> >> type="java.lang.String">
> > 
> >   model-property
> >   custLastName
> > 
> >   
> >   ...
> >   ...
> > 
> >
> > Customize BeanUtils to copy the properties of
> > DynaActionFormSubClass to a model-property-keyed map.
> > pass this map to the model layer and have an adaptor
> > in the model layer copy these porperties to the
> > required model objects, again using BeanUtils.
> >
> > -Harish
> >
> > --- Puneet Agarwal <[EMAIL PROTECTED]> wrote:
> > > Thanks for your views,
> > > My basic intention is to avoid the headache of
> > > copying the values from
> > > FormBean to my Model layer.
> > > and that since formbean keeps all the values in a
> > > nice manner that can be
> > > adaptive to any framework.
> > >
> > > Well this is a correct point that we should keep our
> > > Model layer separate
> > > from strutsish components.
> > >
> > > but Harsish's Idea sounds good, would be nice if
> > > Harish could say something
> > > more about his approach.
> > >
> > > Regards
> > > Puneet Agarwal
> > > ->
> > > "Struts"..."Action"..."Struts in Action"..."Action
> > > in
> > > Struts"...[possibly]"Action with Struts"...?
> > > - Original Message -
> > > From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List"
> > > <[EMAIL PROTECTED]>
> > > Sent: Sunday, March 09, 2003 3:09 AM
> > > Subject: Re: [Design Pattern]FormBean in Model Layer
> > >
> > >
> > > > In our project, we have designed our model facade
> > > > objects to take in a map and let the facade copy
> > > the
> > > > map to the appropriate business objects using
> > > > BeanUtils. We have customized the form-bean config
> > > to
> > > > map the form-bean properties to the model
> > > properties.
> > > > This way the model objects will be independent of
> > > the
> > > > view/controller.
> > > >
> > > > -Harish
> > > >
> > > >
> > > > --- David Graham <[EMAIL PROTECTED]> wrote:
> > > > > That is a terrible idea.  Form beans should
> > > never
> > > > > make it out of the
> > > > > Struts/view layer.  You will tie your
> > > application to
> > > > > Struts and make it
> > > > > impossible to reuse the logic in another
> > > application
> > > > > or even to stop using
> > > > > Struts in the future.
> > > > >
> > > > > David
> > > > >
> > > > >
> > > > >
> > > > > >From: "Puneet Agarwal"
> > > <[EMAIL PROTECTED]>
> > > > > >Reply-To: "Puneet Agarwal"
> > > > > <[EMAIL PROTECTED]>
> > > > > >To: "Struts Users Mailing List"
> > > > > <[EMAIL PROTECTED]>
> > > > > >Subject: [Design Pattern]FormBean in Model
> > > Layer
> > > > > >Date: Sun, 9 Mar 2003 02:45:15 -
> > > > > >
> > > > > >We are in the stage of finalizing the design
> > > > > pattern for our project.
> > > > > >
> > > > > >While discussing the design patterns with my
> > > > > colleagues,
> > > > > >somebody came with an idea to pass the FormBean
> > > as
> > > > > it is,
> > > > > >to the Session Bean or sometimes even to the
> > > Value
> > > > > List handler Block
> > > > > >Later I thought this can actually be a good
> > > idea.
> > > > > >
> > > > > >I understand that this is against underlying
> > > > > layered MVC pattern itself,
> > > > > >but
> > > > > >avoids a lot of headache. Can someone say what
> > > > > could be other disadvantage
> > > > > >of this.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >-->
> > > > > >"Struts"..."Action"..."Struts in
> > > Action"..."Action
> > > > > in
> > > > > >Struts"...[possibly]"Action with
> >

struts without JSP for global exception handling

2003-03-10 Thread alana
Hi
I am using the global Exception tag in the Struts-xml.config file.

   

   

Since my resposes are xsl files,I needed to know if i can manage to put in an error 
message into the html page .


the architecture uses struts framework for request ..but in the response uses 
XMLServlet engine ...to parse a xsl template and xml data instead of jsp and formbean.

so the action config  looks like this :=






Now for displaying an error message on the login page i needed to know using resource 
bundle (the key attibute) can i parse using the xmlservlet engine??
Is there any better method not using JSP?? 


regards
Alan


MASTEK
Investing in relationships
In the US, we're called MAJESCO

~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek 
Limited, unless specifically indicated to that effect. Mastek Limited does not accept 
any responsibility or liability for it. This e-mail and attachments (if any) 
transmitted with it are confidential and/or privileged and solely for the use of the 
intended person or entity to which it is addressed. Any review, re-transmission, 
dissemination or other use of or taking of any action in reliance upon this 
information by persons or entities other than the intended recipient is prohibited. 
This e-mail and its attachments have been scanned for the presence of computer 
viruses. It is the responsibility of the recipient to run the virus check on e-mails 
and attachments before opening them. If you have received this e-mail in error, kindly 
delete this e-mail from all computers.
~~


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



RE: bean:define and el tags

2003-03-10 Thread Mohan Radhakrishnan
Hi,
Answering my own question.

  The code to check if an indexed property is null or not in Struts
1.0.2/JSTL seems to be so long. I am  just using two date checks here. This
seems to be so even if we use JSTL. I think that this type of logic is quite
commonplace in web projects.

 Should it be so complex ? Am I making it so complex? It works anyway.















  


  


  






  


  


  



Mohan

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 2:07 PM
To: 'Struts Users Mailing List'
Subject: bean:define and el tags


Hi

   I am trying to use simple if-else logic here.

Date formatter -



   If my indexed property in the form returns null, I use the current date.










This is to populate my html:text box like this



RE: [Announce] OJBMessageResources available on SourceForge.net

2003-03-10 Thread James Mitchell
They may have been corrupted when I uploaded them.  I'll fix it and you
should be able to download good copies in an hour or two.



--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
- Soren Aabye Kierkegaard (1813-1855)




> -Original Message-
> From: Dirk Markert [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 10, 2003 3:35 AM
> To: Struts Users Mailing List
> Subject: Re: [Announce] OJBMessageResources available on 
> SourceForge.net
> 
> 
> Hello James,
> 
> I tried to download the zip and the rar files from several mirrors.
> Both archive types are corrupt. Is this a sourceforge error or are the
> original files coruppted?
> 
> Saturday, March 8, 2003, 6:44:30 AM, you wrote:
> 
> JM> OJBMessageResources is an implementation of 
> MessageResources that allows
> JM> you to keep your application resources bundle in a database.
> 
> JM> As you might have guessed from the name, 
> OJBMessageResources uses the
> JM> very popular O/R Mapping tool OJB (under the covers).  If 
> you've never
> JM> used OJB before don't worry, configuring your application 
> to use this
> JM> extension should only take a few minutes and is very 
> straightforward,
> JM> and complete instructions have been provided.
> 
> JM> I plan to release similar implementations using Torque, 
> straight JDBC,
> JM> and possibly Castor.  If you have further questions or 
> would like to
> JM> discuss this or future implementations, please feel free 
> to send me an
> JM> email.
> 
> 
> JM> Home page:
> JM> http://sourceforge.net/struts/
> 
> JM> Downloads (source and binaries):
> JM> 
> http://sourceforge.net/project/showfiles.php?group_id=49385&re
lease_id=1
JM> 44905

JM> OJB page:
JM> http://jakarta.apache.org/



JM> --
JM> James Mitchell
JM> Software Developer/Struts Evangelist
JM> http://jakarta.apache.org/struts




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



-- 
Best regards,
Dirk


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



problems with logger

2003-03-10 Thread Michal Postupalski
hi !

In my struts application sometimes I get errors as below. They are in 
catalina.out file. I don't know what is the reason beacuse they come 
casually ;((( Any idea ???


org.apache.commons.logging.LogConfigurationException: 
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
at 
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
at 
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:345)
at 
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409)
at 
org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandler.java:97)
at org.apache.tomcat.util.log.Log.log(Log.java:198)
at org.apache.tomcat.util.log.Log.log(Log.java:192)
at org.apache.tomcat.util.log.Log.log(Log.java:174)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.ClassCastException: 
org.apache.commons.logging.impl.LogFactoryImpl
at 
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:554)
... 8 more


plastic

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


struts-menu

2003-03-10 Thread Edgar Dollin
Does anyone know how to suppress the leading '/' in strutsmenu.
 
Does anyone know how to get the menu to remember it's position if the target
page, i.e. tiles, has the same menu.
 
Thanks in advance
 
Edgar


RE: [Announce] OJBMessageResources available on SourceForge.net

2003-03-10 Thread James Mitchell
Ok, it's ready.


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
- Soren Aabye Kierkegaard (1813-1855)




> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 10, 2003 7:49 AM
> To: 'Struts Users Mailing List'; 'Dirk Markert'
> Subject: RE: [Announce] OJBMessageResources available on 
> SourceForge.net
> 
> 
> They may have been corrupted when I uploaded them.  I'll fix 
> it and you
> should be able to download good copies in an hour or two.
> 
> 
> 
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://jakarta.apache.org/struts
> 
> "People demand freedom of speech to make up for the freedom of thought
> which they avoid."
> - Soren Aabye Kierkegaard (1813-1855)
> 
> 
> 
> 
> > -Original Message-
> > From: Dirk Markert [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, March 10, 2003 3:35 AM
> > To: Struts Users Mailing List
> > Subject: Re: [Announce] OJBMessageResources available on 
> > SourceForge.net
> > 
> > 
> > Hello James,
> > 
> > I tried to download the zip and the rar files from several mirrors.
> > Both archive types are corrupt. Is this a sourceforge error 
> or are the
> > original files coruppted?
> > 
> > Saturday, March 8, 2003, 6:44:30 AM, you wrote:
> > 
> > JM> OJBMessageResources is an implementation of 
> > MessageResources that allows
> > JM> you to keep your application resources bundle in a database.
> > 
> > JM> As you might have guessed from the name, 
> > OJBMessageResources uses the
> > JM> very popular O/R Mapping tool OJB (under the covers).  If 
> > you've never
> > JM> used OJB before don't worry, configuring your application 
> > to use this
> > JM> extension should only take a few minutes and is very 
> > straightforward,
> > JM> and complete instructions have been provided.
> > 
> > JM> I plan to release similar implementations using Torque, 
> > straight JDBC,
> > JM> and possibly Castor.  If you have further questions or 
> > would like to
> > JM> discuss this or future implementations, please feel free 
> > to send me an
> > JM> email.
> > 
> > 
> > JM> Home page:
> > JM> http://sourceforge.net/struts/
> > 
> > JM> Downloads (source and binaries):
> > JM> 
> > http://sourceforge.net/project/showfiles.php?group_id=49385&re
> lease_id=1
> JM> 44905
> 
> JM> OJB page:
> JM> http://jakarta.apache.org/
> 
> 
> 
> JM> --
> JM> James Mitchell
> JM> Software Developer/Struts Evangelist
> JM> http://jakarta.apache.org/struts
> 
> 
> 
> 
> JM>
> -
> JM> To unsubscribe, e-mail: [EMAIL PROTECTED]
> JM> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> Best regards,
> Dirk
> 
> 
> -
> 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]



how to get values of the text field from dynamically generated form

2003-03-10 Thread Chonalal, Anil (Contractor)
I have problem in that I have a form with text fields that are dynamically generated 
depending on a list, for example:


  

  :
  

  


Now when the form is submitted I only get one parameter with the name attrValue, but I 
need to get values of every single text field on the form, does anyone know how to do 
this.

Cheers.

Anil

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



Re: editable list using nested:iterate and lazyList

2003-03-10 Thread William Salvucci
This is exactly what I am doing. It must be a version issue. I am using struts 1.0.2 
with nested_tags_10.jar. I'll give struts 1.1 a try. 
Thanks

>>> [EMAIL PROTECTED] 03/06/03 05:45PM >>>
Alex,

The JSP wasn't shown probably because it's like all other Struts table
creation using the iterate tag. Example JSP...



  



  



...when submitted, if you're "student bean" is in a LazyList, then it'll
populate correctly, and all the data will be there for your action for processing.

This what you're after?...


Arron.

(Monkey Boy?...)


> Is this an example of an editable list (ie. a table like structure)? Based
on your student example, I am trying to edit a list of students all on one
page. ie. I could change five students names with one submit.
> Maybe I didn't fully understand your example, but it sounds like your
example is list/detail page setup where one page has a list (non editable) and
from that list page you can select a single student which is displayed in a
detail page from which you can edit that one student's info.
>  
> I am using a LazyList because the only example of an editable list that I
have every seen was given by Arron Bates (monkey boy) and that is what he did,
but he did not show how the jsp page was done.
> 
> >>> [EMAIL PROTECTED] 03/05/03 05:11PM >>>
> I give a sample is use when I need to populate an view :
> 
> I got an ActionForm :
> 
> public class StudentForm extends ActionForm {
> 
> private String formationSelected = "Analyste Programmeur";
> 
> private Collection formationList = null;
> 
> private Collection formationListID = null;
> 
> private Collection groupList = null;
> 
> private Collection groupListID = null;
> 
> private String group = "cycle 1a";
> 
> ..
> 
> ..
> 
> /**
> 
> * Get the formationList.
> 
> * @return Collection.
> 
> */
> 
> public Collection getFormationList () {
> 
> formationList = Formation.getFormations();
> 
> return formationList;
> 
> }
> 
> /**
> 
> * Get the formationListID.
> 
> * @return Collection.
> 
> */
> 
> public Collection getFormationListID () {
> 
> formationListID = Formation.getFormationsID();
> 
> return formationListID;
> 
> }
> 
> /**
> 
> * Get the groupList.
> 
> * @return Collection.
> 
> */
> 
> public Collection getGroupList () {
> 
> groupList = Groupe.getGroupsOfStudent();
> 
> return groupList;
> 
> }
> 
> /**
> 
> * Get the groupList.
> 
> * @return Collection.
> 
> */
> 
> public Collection getGroupListID () {
> 
> groupListID = Groupe.getGroupID();
> 
> return groupListID;
> 
> }
> 
> ..
> 
> I got an viewstudent action :
> 
> public ActionForward execute(
> 
> ActionMapping mapping,
> 
> ActionForm form,
> 
> HttpServletRequest request,
> 
> HttpServletResponse response)
> 
> throws Exception {
> 
> Collection students = null;
> 
> StudentForm studentForm = (StudentForm) form;
> 
> students = getStudents ();
> 
> HttpSession session = request.getSession();
> 
> session.setAttribute("students", students);
> 
> return mapping.findForward("viewstudent");
> 
> }
> 
> /**
> 
> * Get all students.
> 
> */
> 
> protected ArrayList getStudents () {
> 
> return Student.getStudents();
> 
> }
> 
> And my jsp view for studentview is :
> 
> <%@ page session="true" %>
> <%@ page import="org.apache.taglibs.display.test.TestList,
>  org.apache.taglibs.display.test.ListHolder,
>  java.util.List"%>
> <%@ taglib uri="http://jakarta.apache.org/taglibs/display"; prefix="display"
> %>
> <%@ taglib uri="/WEB-INF/struts-menu.tld" prefix="menu"%>
> 
> 
> 
> 
> 
> 
>   
>   
>   
> 
> 
>  
>  bundle="org.apache.struts.action.MESSAGE">
> 
> 
> 
> 
> 
> 
>  
>  
>  
>  
>  
>  
> 
>name="students"
>   scope="session"
>   pagesize="5"
>   requestURI="/ibmss/form/viewstudent.jsp"
>   export="true"
>   decorator="org.apache.taglibs.display.test.Wrapper">
> 
>  href="/ibmss/getstudent.do"
>   paramId="idPersonne"
>   paramProperty="idPersonne"  />
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> 
> 
> 
> The getstudent action serve me to get
> 
> the student an user who whant to edit him
> 
> I got an getstudentaction who create a new
> 
> studentform and populate this form with
> 
> the data of the choosen student previously
> 
> selected.
> 
> I hope this can help you.
> 
> --
> 
> Alexandre Jaquet
> 
> - Original Message -
> From: "William Salvucci" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 05, 2003 10:14 PM
> Subject: editable list using nested:iterate and lazyList
> 
> I posted this already on another thread, but I thought that I would try it
> again with some more detail.
> 
> I am trying to create an editable list based on some examples using
> nested:iterate and ListUtils.lazyList that I have seen offered on this
> mailing list.
> I have created a simple example, the flow of

RE: [Design Pattern]FormBean in Model Layer

2003-03-10 Thread Robert Taylor
Is being tied to the DynaBean API that bad. Seems like it, along with the
entire beanutils package, is a great tool. Why write custom DTO interfaces
when you could simply leverage DynaActionForm or DynaValidatorActionForm
which both implement the DynaBean interface. Then use the beanutils package
to "transform" the data? (I think its about 2 very powerful lines of code).
You avoid writing classes for each form. You just configure them (with their
initial state) in the struts-config file.

This approach also reinforces the concept that ActionForms are view
components and don't belong in the model.
If the original intent was for ActionForms to be part of the model, then
they would have been designed as interfaces, but Craig has voiced his stance
on this many times already, and is adamant about keeping the ActionForm in
the view and out of the model.

I believe you would find a best practices strategy would be to use
DynaForm where you can and either in the Action class or an intermediate
service layer, transform the data to the appropriate DTO objects which can
then be passed to the the model/logic layer for processing.

I would use the tools that are out there when you can...especially when they
are free.


My 2 cents.

robert

> -Original Message-
> From: Jin Bal [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 3:10 AM
> To: Struts Users Mailing List
> Subject: Re: [Design Pattern]FormBean in Model Layer
>
>
> If you don't wnat to be tied to the DynaBean api either you could
> defin your
> own custom DTO interface that defines the data that your model layer
> requires.
>
> then you could have your ActionForm implement your custom interface.  Then
> you could just pass the action forms into the layer as the custom
> interface.
>
> Your model layer wont know (or care) that your using an actionform all it
> cares about is the DTO interface.
>
> i.e your application deosn't know about struts but struts knows about your
> application
>
> might make things easier.
>
> HTH
>
> Jin
> - Original Message -
> From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Puneet
> Agarwal" <[EMAIL PROTECTED]>
> Sent: Monday, March 10, 2003 1:34 AM
> Subject: Re: [Design Pattern]FormBean in Model Layer
>
>
> > Well, you would use the following form-bean
> > definition.
> >
> >  > type="xyz.domain.DynaActionFormSubClass">
> >> type="java.lang.String">
> > 
> >   model-property
> >   custLastName
> > 
> >   
> >   ...
> >   ...
> > 
> >
> > Customize BeanUtils to copy the properties of
> > DynaActionFormSubClass to a model-property-keyed map.
> > pass this map to the model layer and have an adaptor
> > in the model layer copy these porperties to the
> > required model objects, again using BeanUtils.
> >
> > -Harish
> >
> > --- Puneet Agarwal <[EMAIL PROTECTED]> wrote:
> > > Thanks for your views,
> > > My basic intention is to avoid the headache of
> > > copying the values from
> > > FormBean to my Model layer.
> > > and that since formbean keeps all the values in a
> > > nice manner that can be
> > > adaptive to any framework.
> > >
> > > Well this is a correct point that we should keep our
> > > Model layer separate
> > > from strutsish components.
> > >
> > > but Harsish's Idea sounds good, would be nice if
> > > Harish could say something
> > > more about his approach.
> > >
> > > Regards
> > > Puneet Agarwal
> > > ->
> > > "Struts"..."Action"..."Struts in Action"..."Action
> > > in
> > > Struts"...[possibly]"Action with Struts"...?
> > > - Original Message -
> > > From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List"
> > > <[EMAIL PROTECTED]>
> > > Sent: Sunday, March 09, 2003 3:09 AM
> > > Subject: Re: [Design Pattern]FormBean in Model Layer
> > >
> > >
> > > > In our project, we have designed our model facade
> > > > objects to take in a map and let the facade copy
> > > the
> > > > map to the appropriate business objects using
> > > > BeanUtils. We have customized the form-bean config
> > > to
> > > > map the form-bean properties to the model
> > > properties.
> > > > This way the model objects will be independent of
> > > the
> > > > view/controller.
> > > >
> > > > -Harish
> > > >
> > > >
> > > > --- David Graham <[EMAIL PROTECTED]> wrote:
> > > > > That is a terrible idea.  Form beans should
> > > never
> > > > > make it out of the
> > > > > Struts/view layer.  You will tie your
> > > application to
> > > > > Struts and make it
> > > > > impossible to reuse the logic in another
> > > application
> > > > > or even to stop using
> > > > > Struts in the future.
> > > > >
> > > > > David
> > > > >
> > > > >
> > > > >
> > > > > >From: "Puneet Agarwal"
> > > <[EMAIL PROTECTED]>
> > > > > >Reply-To: "Puneet Agarwal"
> > > > > <[EMAIL PROTECTED]>
> > > > > >To: "Struts Users Mailing List"
> > > > > <[EMAIL PROTECTED]>
> > > > > >Subject: [Design Pattern]FormBean i

RE: [OT] Simulating Concurrent Users

2003-03-10 Thread Kola Oyedeji

Slightly more OT, but is one complete html page considered a request or
can a html page consist of multiple requests i.e. are images etc.
downloaded in separate requests?


Thanks

Kola

>> -Original Message-
>> From: Jim Krygowski [mailto:[EMAIL PROTECTED]
>> Sent: 06 March 2003 12:38
>> To: Struts Users Mailing List
>> Subject: RE: [OT] Simulating Concurrent Users
>> 
>> I don't know if anyone missed this- but JMeter, an open source
project at
>> Apache is a pretty nice stress testing tool.  Very easy to use and
set
>> up.
>> Check it out and you won't have to deal with Microsoft.
>> 
>> 
>> > -Original Message-
>> > From: Todd Pierce [mailto:[EMAIL PROTECTED]
>> > Sent: Wednesday, March 05, 2003 7:59 PM
>> > To: 'Struts Users Mailing List'
>> > Subject: RE: [OT] Simulating Concurrent Users
>> >
>> >
>> > I know the port and proxy. It's my workstation, localhost:7001, no
>> proxy.
>> >
>> > The stress tester says it connects OK to localhost:80, but there's
no
>> > webserver running on it.
>> >
>> > I guess I could RTFM, but then I'd have to go to the micro$oft
website
>> > again. Ah, **expletive**, I'll play with it later.
>> >
>> > -Original Message-
>> > From: alexj [mailto:[EMAIL PROTECTED]
>> > Sent: Thursday, 6 March 2003 11:35 AM
>> > To: Struts Users Mailing List
>> > Subject: Re: [OT] Simulating Concurrent Users
>> >
>> >
>> > you may have better to ask your sys admin on wich port
>> > and wich adress is your proxy ...(if you don't want any
>> > blame)
>> >
>> >
>> > --
>> > Alexandre Jaquet
>> > - Original Message -
>> > From: "Todd Pierce" <[EMAIL PROTECTED]>
>> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>> > Sent: Thursday, March 06, 2003 1:25 AM
>> > Subject: RE: [OT] Simulating Concurrent Users
>> >
>> >
>> > > My problem is that it can't connect to the right port. Anybody
solved
>> > this?
>> > >
>> > > -Original Message-
>> > > From: alexj [mailto:[EMAIL PROTECTED]
>> > > Sent: Thursday, 6 March 2003 10:42 AM
>> > > To: Struts Users Mailing List
>> > > Subject: Re: [OT] Simulating Concurrent Users
>> > >
>> > >
>> > > you only need to specifie the proxy adress
>> > >
>> > > --
>> > > Alexandre Jaquet
>> > >
>> > > - Original Message -
>> > > From: <[EMAIL PROTECTED]>
>> > > To: <[EMAIL PROTECTED]>
>> > > Sent: Thursday, March 06, 2003 12:00 AM
>> > > Subject: RE: [OT] Simulating Concurrent Users
>> > >
>> > >
>> > > > Sean, downloaded this software and set it up. Its pretty
>> > simple to use.
>> > > > Getting a problem though. Its not able to find the link to my
>> > application.
>> > > > It talks about changing the proxy server of IE. However i
>> > don't have the
>> > > > rights to do that on my system. Do you have any ideas on this?
>> > > >
>> > > > Thanks.
>> > > >
>> > > > -Original Message-
>> > > > From: Sean Chambers [mailto:[EMAIL PROTECTED]
>> > > > Sent: Wednesday, March 05, 2003 2:15 PM
>> > > > To: 'Struts Users Mailing List'
>> > > > Subject: RE: [OT] Simulating Concurrent Users
>> > > >
>> > > >
>> > > > sorry, should point out that its blatantly not open source.
but it
>> is
>> > > > free-ish
>> > > >
>> > > > > -Original Message-
>> > > > > From: Sean Chambers [mailto:[EMAIL PROTECTED]
>> > > > > Sent: 05 March 2003 19:52
>> > > > > To: 'Struts Users Mailing List'
>> > > > > Subject: RE: [OT] Simulating Concurrent Users
>> > > > >
>> > > > >
>> > > > > dont flame me for this, but you could try micro$ofts web
>> > > > > appliaction stress
>> > > > > test tool. it only *runs* on NT x but u can use it to stress
>> > > > > anything i
>> > > > > think.. and apparently its pretty simple to use.
>> > > > >
>> > > > >
http://www.microsoft.com/technet/treeview/default.asp?url=/tec
>> > > > > hnet/itsolutio
>> > > > > ns/intranet/downloads/webstres.asp
>> > > > >
>> > > > > > -Original Message-
>> > > > > > From: Jim Krygowski [mailto:[EMAIL PROTECTED]
>> > > > > > Sent: 05 March 2003 19:45
>> > > > > > To: Struts Users Mailing List
>> > > > > > Subject: RE: [OT] Simulating Concurrent Users
>> > > > > >
>> > > > > >
>> > > > > > Does JMeter fit the bill?
>> > > > > > http://jakarta.apache.org/jmeter/index.html
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > > -Original Message-
>> > > > > > > From: [EMAIL PROTECTED]
>> > [mailto:[EMAIL PROTECTED]
>> > > > > > > Sent: Wednesday, March 05, 2003 2:20 PM
>> > > > > > > To: [EMAIL PROTECTED]
>> > > > > > > Subject: [OT] Simulating Concurrent Users
>> > > > > > >
>> > > > > > >
>> > > > > > > Hi,
>> > > > > > > Is there some open source tool or technique that I can
use to
>> > > > > > > simulate concurrent users for our application? I
especially
>> want
>> > > > > > > to test our
>> > > > > > > connection pooling implementation.
>> > > > > > >
>> > > > > > > Thanks,
>> > > > > > > Gaurav
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> >
-
>> > > > > > > To unsubscr

Re: [OT] Simulating Concurrent Users

2003-03-10 Thread Nicolas De Loof
All scr="" HTML tags does submit a new request (images, link to css or
included javascript).

With servlet API you will get a new request object (and context) for
every request.

For into, HTTP 1.1 browser can ask server to keep the connection
alive, so that it can reuse the 1st connection for a new request, (->
less network trafic). This makes no change on servlet API behaviour.

Nico.

>
> Slightly more OT, but is one complete html page considered a request
or
> can a html page consist of multiple requests i.e. are images etc.
> downloaded in separate requests?
>
>
> Thanks
>
> Kola
>
> >> -Original Message-
> >> From: Jim Krygowski [mailto:[EMAIL PROTECTED]
> >> Sent: 06 March 2003 12:38
> >> To: Struts Users Mailing List
> >> Subject: RE: [OT] Simulating Concurrent Users
> >>
> >> I don't know if anyone missed this- but JMeter, an open source
> project at
> >> Apache is a pretty nice stress testing tool.  Very easy to use
and
> set
> >> up.
> >> Check it out and you won't have to deal with Microsoft.
> >>
> >>
> >> > -Original Message-
> >> > From: Todd Pierce [mailto:[EMAIL PROTECTED]
> >> > Sent: Wednesday, March 05, 2003 7:59 PM
> >> > To: 'Struts Users Mailing List'
> >> > Subject: RE: [OT] Simulating Concurrent Users
> >> >
> >> >
> >> > I know the port and proxy. It's my workstation, localhost:7001,
no
> >> proxy.
> >> >
> >> > The stress tester says it connects OK to localhost:80, but
there's
> no
> >> > webserver running on it.
> >> >
> >> > I guess I could RTFM, but then I'd have to go to the micro$oft
> website
> >> > again. Ah, **expletive**, I'll play with it later.
> >> >
> >> > -Original Message-
> >> > From: alexj [mailto:[EMAIL PROTECTED]
> >> > Sent: Thursday, 6 March 2003 11:35 AM
> >> > To: Struts Users Mailing List
> >> > Subject: Re: [OT] Simulating Concurrent Users
> >> >
> >> >
> >> > you may have better to ask your sys admin on wich port
> >> > and wich adress is your proxy ...(if you don't want any
> >> > blame)
> >> >
> >> >
> >> > --
> >> > Alexandre Jaquet
> >> > - Original Message -
> >> > From: "Todd Pierce" <[EMAIL PROTECTED]>
> >> > To: "'Struts Users Mailing List'"
<[EMAIL PROTECTED]>
> >> > Sent: Thursday, March 06, 2003 1:25 AM
> >> > Subject: RE: [OT] Simulating Concurrent Users
> >> >
> >> >
> >> > > My problem is that it can't connect to the right port.
Anybody
> solved
> >> > this?
> >> > >
> >> > > -Original Message-
> >> > > From: alexj [mailto:[EMAIL PROTECTED]
> >> > > Sent: Thursday, 6 March 2003 10:42 AM
> >> > > To: Struts Users Mailing List
> >> > > Subject: Re: [OT] Simulating Concurrent Users
> >> > >
> >> > >
> >> > > you only need to specifie the proxy adress
> >> > >
> >> > > --
> >> > > Alexandre Jaquet
> >> > >
> >> > > - Original Message -
> >> > > From: <[EMAIL PROTECTED]>
> >> > > To: <[EMAIL PROTECTED]>
> >> > > Sent: Thursday, March 06, 2003 12:00 AM
> >> > > Subject: RE: [OT] Simulating Concurrent Users
> >> > >
> >> > >
> >> > > > Sean, downloaded this software and set it up. Its pretty
> >> > simple to use.
> >> > > > Getting a problem though. Its not able to find the link to
my
> >> > application.
> >> > > > It talks about changing the proxy server of IE. However i
> >> > don't have the
> >> > > > rights to do that on my system. Do you have any ideas on
this?
> >> > > >
> >> > > > Thanks.
> >> > > >
> >> > > > -Original Message-
> >> > > > From: Sean Chambers [mailto:[EMAIL PROTECTED]
> >> > > > Sent: Wednesday, March 05, 2003 2:15 PM
> >> > > > To: 'Struts Users Mailing List'
> >> > > > Subject: RE: [OT] Simulating Concurrent Users
> >> > > >
> >> > > >
> >> > > > sorry, should point out that its blatantly not open source.
> but it
> >> is
> >> > > > free-ish
> >> > > >
> >> > > > > -Original Message-
> >> > > > > From: Sean Chambers [mailto:[EMAIL PROTECTED]
> >> > > > > Sent: 05 March 2003 19:52
> >> > > > > To: 'Struts Users Mailing List'
> >> > > > > Subject: RE: [OT] Simulating Concurrent Users
> >> > > > >
> >> > > > >
> >> > > > > dont flame me for this, but you could try micro$ofts web
> >> > > > > appliaction stress
> >> > > > > test tool. it only *runs* on NT x but u can use it to
stress
> >> > > > > anything i
> >> > > > > think.. and apparently its pretty simple to use.
> >> > > > >
> >> > > > >
> http://www.microsoft.com/technet/treeview/default.asp?url=/tec
> >> > > > > hnet/itsolutio
> >> > > > > ns/intranet/downloads/webstres.asp
> >> > > > >
> >> > > > > > -Original Message-
> >> > > > > > From: Jim Krygowski [mailto:[EMAIL PROTECTED]
> >> > > > > > Sent: 05 March 2003 19:45
> >> > > > > > To: Struts Users Mailing List
> >> > > > > > Subject: RE: [OT] Simulating Concurrent Users
> >> > > > > >
> >> > > > > >
> >> > > > > > Does JMeter fit the bill?
> >> > > > > > http://jakarta.apache.org/jmeter/index.html
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > > > -Original Message-
> >> > > > > > > From: [EMAIL PROTECTED]
> >> > [mailto:[EM

Dynamic javascript confirmation

2003-03-10 Thread Renato Romano
I'm trying to write a confirmation alert on a field of a table; I have a
"delete" button (or image) and what I'd want to do is ask confirmation
to the user via a "confirm()" javascript call after which (if user
confirms) I have to redirect to something like "deleteObj.do?id=6" page,
where 6 is the id of the object to delete.

It seems that  inside javascript code does not work, so I'm
in trouble when managing the redirect from javascript, because I have to
pass it the id to use for the deleting action, but the bean:write does
not work!!

I'm sure this is quite a standard processing...
Thanks a lot.

Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_




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



Re: [Design Pattern]FormBean in Model Layer

2003-03-10 Thread Jin Bal

- Original Message -
From: "Robert Taylor" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 2:09 PM
Subject: RE: [Design Pattern]FormBean in Model Layer


> Is being tied to the DynaBean API that bad. Seems like it, along with the
> entire beanutils package, is a great tool. Why write custom DTO interfaces
> when you could simply leverage DynaActionForm or DynaValidatorActionForm
> which both implement the DynaBean interface. Then use the beanutils
package
> to "transform" the data? (I think its about 2 very powerful lines of
code).
> You avoid writing classes for each form. You just configure them (with
their
> initial state) in the struts-config file.

Not at all - I regularly use beanutils the way you outline above ;-)
Some people might want to define custom dto interfaces to provide their
domain services/delegates with a distinctive (and typed ?) contract for
getting parameters etc.

>
> This approach also reinforces the concept that ActionForms are view
> components and don't belong in the model.
> If the original intent was for ActionForms to be part of the model, then
> they would have been designed as interfaces, but Craig has voiced his
stance
> on this many times already, and is adamant about keeping the ActionForm in
> the view and out of the model.

I quite agree, which is why I suggested that ActionForms (or indeed
subclasses of dynaforms etc ) would *implement the domain* rather than the
domain implementing or knowing about struts or beanutils (which is bad and
one of the reasons actionforms are not an interface).
By doing it this way around I dont think that ActionForms are becoming part
of the model, quite the reverse, in fact we're telling struts a little bit
more about our domain model, which I don't think is altogether evil.

>
> I believe you would find a best practices strategy would be to use
> DynaForm where you can and either in the Action class or an
intermediate
> service layer, transform the data to the appropriate DTO objects which can
> then be passed to the the model/logic layer for processing.

I agree that seems like a good way to approach it :)


Cheers

Jin
>
> I would use the tools that are out there when you can...especially when
they
> are free.
>
>
> My 2 cents.
>
> robert
>
> > -Original Message-
> > From: Jin Bal [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 3:10 AM
> > To: Struts Users Mailing List
> > Subject: Re: [Design Pattern]FormBean in Model Layer
> >
> >
> > If you don't wnat to be tied to the DynaBean api either you could
> > defin your
> > own custom DTO interface that defines the data that your model layer
> > requires.
> >
> > then you could have your ActionForm implement your custom interface.
Then
> > you could just pass the action forms into the layer as the custom
> > interface.
> >
> > Your model layer wont know (or care) that your using an actionform all
it
> > cares about is the DTO interface.
> >
> > i.e your application deosn't know about struts but struts knows about
your
> > application
> >
> > might make things easier.
> >
> > HTH
> >
> > Jin
> > - Original Message -
> > From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
"Puneet
> > Agarwal" <[EMAIL PROTECTED]>
> > Sent: Monday, March 10, 2003 1:34 AM
> > Subject: Re: [Design Pattern]FormBean in Model Layer
> >
> >
> > > Well, you would use the following form-bean
> > > definition.
> > >
> > >  > > type="xyz.domain.DynaActionFormSubClass">
> > >> > type="java.lang.String">
> > > 
> > >   model-property
> > >   custLastName
> > > 
> > >   
> > >   ...
> > >   ...
> > > 
> > >
> > > Customize BeanUtils to copy the properties of
> > > DynaActionFormSubClass to a model-property-keyed map.
> > > pass this map to the model layer and have an adaptor
> > > in the model layer copy these porperties to the
> > > required model objects, again using BeanUtils.
> > >
> > > -Harish
> > >
> > > --- Puneet Agarwal <[EMAIL PROTECTED]> wrote:
> > > > Thanks for your views,
> > > > My basic intention is to avoid the headache of
> > > > copying the values from
> > > > FormBean to my Model layer.
> > > > and that since formbean keeps all the values in a
> > > > nice manner that can be
> > > > adaptive to any framework.
> > > >
> > > > Well this is a correct point that we should keep our
> > > > Model layer separate
> > > > from strutsish components.
> > > >
> > > > but Harsish's Idea sounds good, would be nice if
> > > > Harish could say something
> > > > more about his approach.
> > > >
> > > > Regards
> > > > Puneet Agarwal
> > > > ->
> > > > "Struts"..."Action"..."Struts in Action"..."Action
> > > > in
> > > > Struts"...[possibly]"Action with Struts"...?
> > > > - Original Message -
> > > > From: "harish krishnaswamy" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List"
> > > > <[EMAIL PROTECTED]>
> > > 

RE: struts-menu

2003-03-10 Thread Raible, Matt
Edgar,

I'm a committer on struts-menu, so hopefully I can help you out.

I believe using the "location" attribute vs. "page" attribute will strip out
your context and use the exact value you specify in "location" rather than
pre-pending the context.

As for remembering the position - which layout are you using?  I can
possibly add the remembering functionality, but it will probably involve
cookies or something.

Matt

> -Original Message-
> From: Edgar Dollin [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 6:20 AM
> To: 'Struts Users Mailing List'
> Subject: struts-menu
> 
> 
> Does anyone know how to suppress the leading '/' in strutsmenu.
>  
> Does anyone know how to get the menu to remember it's position if the
> target
> page, i.e. tiles, has the same menu.
>  
> Thanks in advance
>  
> Edgar
> 


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



RE: [HK] struts-faces.war problem

2003-03-10 Thread Raible, Matt
I removed commons-logging.jar from WEB-INF/lib and it works fine for me on
Tomcat 4.1.18 on Windows and Linux.

HTH,

Matt

> -Original Message-
> From: harish krishnaswamy [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 09, 2003 2:12 PM
> To: Struts Users Mailing List
> Subject: [HK] struts-faces.war problem
> 
> 
> Anyone having the problem below while trying to deploy
> the struts-faces example? Apparently commons logging
> is having a problem with Jdk14Logger. Any ideas??
> 
> -Harish
> 
> Caused by:
> org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException:
> Class org.apache.commons.logging.impl.Jdk14Logger does
> not implement Log
>   at
> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct
> or(LogFactoryImpl.java:434)
>   at
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Log
> FactoryImpl.java:561)
>   ... 36 more
> Caused by:
> org.apache.commons.logging.LogConfigurationException:
> Class org.apache.commons.logging.impl.Jdk14Logger does
> not implement Log
>   at
> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct
> or(LogFactoryImpl.java:430)
>   ... 37 more
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.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: struts-menu

2003-03-10 Thread Stephen Smithstone
what is this struts-menu and where can i find some examples / downloads ? 
please 

On Monday 10 March 2003 3:22 pm, Raible, Matt wrote:
> Edgar,
>
> I'm a committer on struts-menu, so hopefully I can help you out.
>
> I believe using the "location" attribute vs. "page" attribute will strip
> out your context and use the exact value you specify in "location" rather
> than pre-pending the context.
>
> As for remembering the position - which layout are you using?  I can
> possibly add the remembering functionality, but it will probably involve
> cookies or something.
>
> Matt
>
> > -Original Message-
> > From: Edgar Dollin [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 6:20 AM
> > To: 'Struts Users Mailing List'
> > Subject: struts-menu
> >
> >
> > Does anyone know how to suppress the leading '/' in strutsmenu.
> >
> > Does anyone know how to get the menu to remember it's position if the
> > target
> > page, i.e. tiles, has the same menu.
> >
> > Thanks in advance
> >
> > Edgar
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: struts-menu

2003-03-10 Thread Raible, Matt
http://sf.net/projects/struts-menu

demo at:

http://raibledesigns.com/struts-menu


> -Original Message-
> From: Stephen Smithstone [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 8:38 AM
> To: Struts Users Mailing List
> Subject: Re: struts-menu
> 
> 
> what is this struts-menu and where can i find some examples / 
> downloads ? 
> please 
> 
> On Monday 10 March 2003 3:22 pm, Raible, Matt wrote:
> > Edgar,
> >
> > I'm a committer on struts-menu, so hopefully I can help you out.
> >
> > I believe using the "location" attribute vs. "page" 
> attribute will strip
> > out your context and use the exact value you specify in 
> "location" rather
> > than pre-pending the context.
> >
> > As for remembering the position - which layout are you using?  I can
> > possibly add the remembering functionality, but it will 
> probably involve
> > cookies or something.
> >
> > Matt
> >
> > > -Original Message-
> > > From: Edgar Dollin [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, March 10, 2003 6:20 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: struts-menu
> > >
> > >
> > > Does anyone know how to suppress the leading '/' in strutsmenu.
> > >
> > > Does anyone know how to get the menu to remember it's 
> position if the
> > > target
> > > page, i.e. tiles, has the same menu.
> > >
> > > Thanks in advance
> > >
> > > Edgar
> >
> > 
> -
> > 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]



Dynamic forward and recursion in Action's execute method

2003-03-10 Thread Rick Ashley
Hello,

I have a own DispatchAction based class that should add more parameter's
dynamically to URI at runtime. Problem is that if I try to create a new 
ActionForward instance  e.g. /my/app/myaction?method=doIt&p=100 with a new 
parameter, programs starts to run in recursion.

I want to do this so dynamically that I don't need struts-config.xml
to get a handle to ActionForward objects or anything else. So, is this 
possible in Struts or what I am doing wrong? I use Struts's version 1.1 b2.

Below is sample code of my own DispatchAction class

- r.i.a

public class MyDispatchAction extends DispatchAction
{
// Overrided execute-method
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws java.lang.Exception
{
  // getPath() returns e.g. /app/action.do?method=SomeAction
  String uriPath = mapping.getPath();
  StringBuffer sParams = new StringBuffer();
  // Adding another parameter dynamically.
  sParams.append(addParam(uriPath,
   "myParam",
   "110"));
  ActionForward fwd =
new ActionForward(sParams.toString());
  return fwd;  // Causes recursion!
}
// Toolmethod by T.Husted
public String addParam(String path, String name, String value)
{
  StringBuffer uri = new StringBuffer(path);
  boolean isQuery = (path.indexOf("?") >= 0);
  if (isQuery)
  uri.append("&");
  else
  uri.append("?");
  uri.append(name);
  uri.append("=");
  uri.append(value);
  return uri.toString();
}
}



_
Worried what your kids see online? Protect them better with MSN 8 
http://join.msn.com/?page=features/parental&pgmarket=en-gb&XAPID=186&DI=1059

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


Re[2]: [Announce] OJBMessageResources available on SourceForge.net

2003-03-10 Thread Dirk Markert
Hello James,



Monday, March 10, 2003, 2:15:10 PM, you wrote:

JM> Ok, it's ready.

thank you!

JM> --
JM> James Mitchell
JM> Software Developer/Struts Evangelist
JM> http://jakarta.apache.org/struts

JM> "People demand freedom of speech to make up for the freedom of thought
JM> which they avoid."
JM> - Soren Aabye Kierkegaard (1813-1855)




>> -Original Message-
>> From: James Mitchell [mailto:[EMAIL PROTECTED] 
>> Sent: Monday, March 10, 2003 7:49 AM
>> To: 'Struts Users Mailing List'; 'Dirk Markert'
>> Subject: RE: [Announce] OJBMessageResources available on 
>> SourceForge.net
>> 
>> 
>> They may have been corrupted when I uploaded them.  I'll fix 
>> it and you
>> should be able to download good copies in an hour or two.
>> 
>> 
>> 
>> --
>> James Mitchell
>> Software Developer/Struts Evangelist
>> http://jakarta.apache.org/struts
>> 
>> "People demand freedom of speech to make up for the freedom of thought
>> which they avoid."
>> - Soren Aabye Kierkegaard (1813-1855)
>> 
>> 
>> 
>> 
>> > -Original Message-
>> > From: Dirk Markert [mailto:[EMAIL PROTECTED] 
>> > Sent: Monday, March 10, 2003 3:35 AM
>> > To: Struts Users Mailing List
>> > Subject: Re: [Announce] OJBMessageResources available on 
>> > SourceForge.net
>> > 
>> > 
>> > Hello James,
>> > 
>> > I tried to download the zip and the rar files from several mirrors.
>> > Both archive types are corrupt. Is this a sourceforge error 
>> or are the
>> > original files coruppted?
>> > 
>> > Saturday, March 8, 2003, 6:44:30 AM, you wrote:
>> > 
>> > JM> OJBMessageResources is an implementation of 
>> > MessageResources that allows
>> > JM> you to keep your application resources bundle in a database.
>> > 
>> > JM> As you might have guessed from the name, 
>> > OJBMessageResources uses the
>> > JM> very popular O/R Mapping tool OJB (under the covers).  If 
>> > you've never
>> > JM> used OJB before don't worry, configuring your application 
>> > to use this
>> > JM> extension should only take a few minutes and is very 
>> > straightforward,
>> > JM> and complete instructions have been provided.
>> > 
>> > JM> I plan to release similar implementations using Torque, 
>> > straight JDBC,
>> > JM> and possibly Castor.  If you have further questions or 
>> > would like to
>> > JM> discuss this or future implementations, please feel free 
>> > to send me an
>> > JM> email.
>> > 
>> > 
>> > JM> Home page:
>> > JM> http://sourceforge.net/struts/
>> > 
>> > JM> Downloads (source and binaries):
>> > JM> 
>> > http://sourceforge.net/project/showfiles.php?group_id=49385&re
>> lease_id=1
>> JM> 44905
>> 
>> JM> OJB page:
>> JM> http://jakarta.apache.org/
>> 
>> 
>> 
>> JM> --
>> JM> James Mitchell
>> JM> Software Developer/Struts Evangelist
>> JM> http://jakarta.apache.org/struts
>> 
>> 
>> 
>> 
>> JM>
>> -
>> JM> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> JM> For additional commands, e-mail: 
>> [EMAIL PROTECTED]
>> 
>> 
>> 
>> -- 
>> Best regards,
>> Dirk
>> 
>> 
>> -
>> 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]
>> 


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



-- 
Best regards,
Dirk


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



Struts bean:define tag questions

2003-03-10 Thread White, Joshua A (CASD, IT)
Ok,

Imagine I have an object "User" (package test.UserVO) which contains another
object "Address" (package test.AddressVO)which has a String property "city".
"User" and "Address" are both java beans.  "User" has been placed in session
scope as "UserVO".

How would I access the property "city"?  I noticed that the bean:define tag
has a copy feature which will copy a bean to a different scope.  Could this
feature be used here?  Could you copy the nested "Address" bean into the
page scope?

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Oracle Data Source Config

2003-03-10 Thread Austin Lowry
I've hit a bump in the road with my development because I have to be 
able to use an Oracle connection in order to use a class vital to my 
application. This made my Weblogic connection pool unusable because it 
uses it's own connection objects that use the Oracle driver. I think my 
best option at this point is to use the Struts . Does 
anyone have any experience with using Oracle and 
OracleConnectionPoolDataSource or OracleConnectionCacheImpl? I'm not 
really sure how to set this up and make sure I get back an Oracle 
connection object that I can use. Also, is there a better way to 
implement the connection pool and still return an Oracle connection 
object than through Struts? Thanks for your help.

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


Re: Want to stop tomcat's info messages from printing to console

2003-03-10 Thread Rick Reumann
On 07 Mar 2003 11:53:37 -0800
Dave Patton <[EMAIL PROTECTED]> wrote:

> Yes.  You set this in the server.xml file of tomcat with the 
> entry.  Check your server.xml file and I will bet you are using a
> ConsoleLogger at some level.  Change those to FileLogger types
> instead. Check the Tomcat docs
> (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html)
> for more info.

Normally I just configure a log4j.properties file so I don't run into
this problem, but on a small demo app I just created I didn't. Even
when I add the following to the server.xml file, I still get all the
validator info messages pouring into catalina.out. Here's what I
configured:


  


-- 
Rick Reumann

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



RE: bean:define and el tags

2003-03-10 Thread Karr, David
You're missing an important point about the JSTL tags.  The tags that
store information into variables don't put them into scriptlet
variables, they put them into "scoped variables", which are just HashMap
entries.  If you use "fmt:formatDate" to store a formatted date into
"currentdate", you can't reference it with "<%=currentdate%>".

If you're using the JSTL with Struts, you're probably better off using
Struts-EL, as the Struts-EL tags use the JSTL EL for attribute values,
instead of scriptlet expressions.

> -Original Message-
> From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 12:37 AM
> To: 'Struts Users Mailing List'
> Subject: bean:define and el tags
> 
> Hi
> 
>I am trying to use simple if-else logic here.
> 
>   Date formatter -
>   
>pattern="dd/MM/"/>
> 
>If my indexed property in the form returns null, I use the current
> date.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This is to populate my html:text box like this
> 
>  
>   Is something wrong here ? It seems that the variable "date" is not
found
> at runtime.
> 
> Thanks,
> Mohan
> 
> -
> 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: getPathInfo with Struts/Resin?

2003-03-10 Thread Kevin Tung
Hi,

I haven't received any response on this issue.  I assume this has not been
done or cannot be done with Resin/Struts or with struts and any other
container.  Or perhaps I should post to a different list altogether?

Any feedback will be greatly appreciated!!

Thanks,
Kevin

-Original Message-
From: Kevin Tung [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 6:37 PM
To: 'Struts Users Mailing List'
Subject: getPathInfo with Struts/Resin?


Hi,

I have searched the archives and the newsgroups but couldn't find an answer
that applies to my specific environment, hopefully someone here has done
this before.

I am running Struts 1.1b3 (didn't work with 1.1b2 either) with Resin 2.1.6

I want to be able to do the following

www.somehost.com/myapp/execute/edit/username/
www.somehost.com/myapp/execute/view/username/

where view and edit will map to different Actions.  And within each action,
I want to be able to retrieve the username by using getPathInfo().

in my web.xml

  
action
/execute/*
  

in my struts_config.xml




But when I point the browser to

www.somehost.com/myapp/execute/edit/username/ I end up with a

400 Invalid path /edit/username/

And www.somehost.com/myapp/execute/edit/ gets me

400 Invalid path /

But And www.somehost.com/myapp/execute/edit (without the slash)

Works fine, but it's without the path info..

Is this a resin issues? or could this be a struts config issue?  Has anyone
gotten this scenario to work with Struts and Resin? or even another
container?  Some config samples would be very helpful!!

Thanks,
Kevin





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



The Back button on on multi-page forms

2003-03-10 Thread Ron Day
Anyone have any ideas or best practises on how to handle the use (mis-use)
of the browser back button on multi-page forms.

My forms work fine and validate Ok, but if the back button is used the forms
are not re-populated properly. In particular anything that was in the reset,
seems to be used when the form appears after the back button is used.

ron



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



Re: Struts bean:define tag questions

2003-03-10 Thread Nicolas De Loof
What do you want to do whith your "city" ? You can do :



Nico.


> Ok,
>
> Imagine I have an object "User" (package test.UserVO) which contains
another
> object "Address" (package test.AddressVO)which has a String property
"city".
> "User" and "Address" are both java beans.  "User" has been placed in
session
> scope as "UserVO".
>
> How would I access the property "city"?  I noticed that the
bean:define tag
> has a copy feature which will copy a bean to a different scope.
Could this
> feature be used here?  Could you copy the nested "Address" bean into
the
> page scope?
>
> Joshua
>
>
> This communication, including attachments, is for the exclusive use
of
> addressee and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, any use,
copying,
> disclosure, dissemination or distribution is strictly prohibited. If
> you are not the intended recipient, please notify the sender
> immediately by return email and delete this communication and
destroy all copies.
>
>
> 
-
> 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: The Back button on on multi-page forms

2003-03-10 Thread David Graham
See the Action class' javadoc for the token methods and the struts-example 
app for how to use them.

David



From: "Ron Day" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: The Back button on  on multi-page forms
Date: Mon, 10 Mar 2003 10:05:16 -0600
Anyone have any ideas or best practises on how to handle the use (mis-use)
of the browser back button on multi-page forms.
My forms work fine and validate Ok, but if the back button is used the 
forms
are not re-populated properly. In particular anything that was in the 
reset,
seems to be used when the form appears after the back button is used.

ron



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


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


Re: problem with session

2003-03-10 Thread Rajesh . Jayabalan

Hi Dave

I have tried a few more options now..

 I am able to get one value from the mfform in the second action class..
MffsActionForm is the actionform for the second action class, will that affect
it to reset values. If that is the case then all values should be reset to null,
but I can get one value.

 I have for now set the required values in the request(when in the first action
servlet) and getting it in the second action servlet and setting the actionform
again.

Regards
Rajesh J



   
 
   
 
 To: Rajesh Jayabalan/LAM/[EMAIL 
PROTECTED] NYC 
 "Dave Newton"   cc:   
 
 <[EMAIL PROTECTED]Subject: Re: problem with session   
   
 m>
 
 07 Mar 2003 04:16 PM  
 
   
 
   
 



Hola,

Man, you have sturdy fingers! Ever think of using shorter variable names
and a slightly clearer coding style?! :)

// segment 1
updatedel(actionForm, action);
HttpSession session = httpServletRequest.getSession();

// What do you think is happening here?
MffsActionForm mfform = (MffsActionForm) session.getAttribute
("mffsActionForm");
//session.removeAttribute("mffsActionForm");
//session.setAttribute("mffsActionForm", mfform);

String tablename = mfform.getTables();

httpServletRequest.setAttribute("mffsactionflag", "true");
return actionMapping.findForward("success");

// segment 2
HttpSession session = httpServletRequest.getSession(false);
String flag = (String)httpServletRequest.getAttribute("mffsactionflag");
if ((flag != null) && (flag.length() > 0)) {
mfform = (MffsActionForm) session.getAttribute("mffsActionForm");
} else {
mfform = (MffsActionForm) actionForm;
}
String tablename = mfform.getTables();

Really, though, everything looks fine, so I'd either look elsewhere for
the problem or clean things up a little so you can make sure that you're
doing what you think you are.

If the form was in session and you're not forwarding to an action that
would reset form values, it should all be okay. I'd make sure that
whatever it is you're forwarding to isn't thinking that it needs to set
up the form.

Dave










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



Re: Want to stop tomcat's info messages from printing to console

2003-03-10 Thread Rick Reumann
On Mon, 10 Mar 2003 11:11:01 -0500
Rick Reumann <[EMAIL PROTECTED]> wrote:
 
> Normally I just configure a log4j.properties file so I don't run into
> this problem, but on a small demo app I just created I didn't. Even
> when I add the following to the server.xml file, I still get all the
> validator info messages pouring into catalina.out. Here's what I
> configured:
> 
>   reloadable="true" crossContext="true">
> prefix="rr_lesson_3_log." suffix=".txt"
> timestamp="true"/>
> 

I gorgot to add, rr_lesson_3_lot.txt is created add log information is
appended to it. The problem is all the beanutils validation stuff still
goes to catalina.out for this application. Is there anyway around having
to configure log4j and creating a log4j.properties file to prevent this?

Thanks,

-- 
Rick Reumann

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



Two problems: bean:include and return errors

2003-03-10 Thread niksa_os
I have index.jsp that include login.jsp

If I use in index.jsp




 doesn't work in login.jsp. I put
bean in Action.

 only works in index.jsp.

But with <[EMAIL PROTECTED] file="login.jsp"%> it's works!?

Why is that?

-

I have in LoginActionForm for login.jsp

ActionErrors errors = new ActionErrors();
if (name.equals("")) {
errors.add("name", new ActionError("name"));  }
return errors;

and this in LoginAction

if (form.getName().equals("x")) {
errors.add("name", new ActionError("badName"));
saveErrors(httpServletRequest, errors);
return actionMapping.getInputForward();

This works OK, but didn't return to index.jsp it return to login.jsp.
I get only login.jsp form not index.jsp - whole page

*index.jsp include login.jsp

Thanks.



Re: [OT]Re: quick log4j question

2003-03-10 Thread Craig R. McClanahan


On Mon, 10 Mar 2003, Manfred Wolff wrote:

> Date: Mon, 10 Mar 2003 09:06:38 +0100
> From: Manfred Wolff <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: [OT]Re: quick log4j question
>
> No, Rick, I don't. I have said: Put it in ANY directory, that contains
> to the classpath. It is a good Idea to build a group of property-files
> e.g. in WEB-INF/classes/ressources or any other directory.
>

If you are using ClassLoader.getResource() to load resources from inside
the class path (which I imagine that Log4J is doing), there is a very
definite difference between putting the properties file in
"/WEB-INF/classes" and "/WEB-INF/classes/resources" -- one will be found
and one will not.

The reason for this is that resource file names have a path structure just
like Java class names in a package -- to retrieve the resource file
"/WEB-INF/classes/log4j.properties", one would say:

  ClassLoader cl = this.getClass().getClassLoader();
  InputStream is = cl.getResourceAsStream("log4j.properties");

but, if you want "/WEB-INF/classes/resources/log4j.properties", you would
say this instead:

  ClassLoader cl = this.getClass().getClassLoader();
  InputStream is = cl.getResourceAsStream("resources/log4j.properties");

The right place to put your properties files, then, is wherever the
software that is loading them will look for them :-).

> But I don't know why evrybody will have a configuration in web.xml and a
>   initialisation in the Actionsservlet. That is not need.
>
> Manfred
>

Craig


> Rick Reumann wrote:
> > On Sun, Mar 09,'03 (12:29 PM GMT+0100), Manfred wrote:
> >
> >
> >>The best you can do to place your property file in any directory that
> >>contains to the classpath (e.g. WEB-INF/classes ...) and load the file
> >
> >
> > So you are saying (in response to Dan's question) that it is best to
> > just keep the log4j.properties file in WEB-INF/classes and to not try
> > and move it to somewhere like WEB-INF/classes/resources ?
> >
> >
>
>
>
> -
> 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: The Back button on on multi-page forms

2003-03-10 Thread apachep2
Use token for Back button and double-clicking.

-Original Message-
From: Ron Day [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 11:05 AM
To: Struts Users Mailing List
Subject: The Back button on on multi-page forms

Anyone have any ideas or best practises on how to handle the use
(mis-use)
of the browser back button on multi-page forms.

My forms work fine and validate Ok, but if the back button is used the
forms
are not re-populated properly. In particular anything that was in the
reset,
seems to be used when the form appears after the back button is used.

ron



-
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: [Design Pattern]FormBean in Model Layer

2003-03-10 Thread Craig R. McClanahan


On Mon, 10 Mar 2003, Puneet Agarwal wrote:

> Date: Mon, 10 Mar 2003 11:31:29 -
> From: Puneet Agarwal <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  Puneet Agarwal <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: [Design Pattern]FormBean in Model Layer
>
> Yeah I am going to adopt this. I am not very sure of how exactly am I going
> to do that(at the moment). But yes it sounds too  good.
>

I do *not* agree with the idea of using an ActionForm (either DynaForm or
not) as a DTO.  Using a custom interface gets around one of the problems
(introducing a dependency on Struts), but not around the biggest one --
the data types in a correctly written ActionForm are wrong for the
business tier.

In order to fulfill its purpose, the ActionForm properties must allow
incorrect input to be redisplayed -- for example, a field that accepts an
integer should allow the user to type "1a3" instead of "123" and have
"1a3" redisplayed with the error message.  In order for this to work, the
ActionForm property must be a String.  Yet, in a properly designed DTO,
the property type would be "int".

The best design practice is to create a separate DTO object (or DynaBean)
with the correct data types, and use BeanUtils.copyProperties() to copy
the values -- with appropriate conversions -- in your Action that accepts
the form.  You know that you won't get conversion errors because they
would have been caught in the validation checks that preceed calling the
Action.

> Thanks
> Puneet Agarwal

Craig McClanahan

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



Re: Programmatic Security

2003-03-10 Thread Craig R. McClanahan


On Mon, 10 Mar 2003, Renato Romano wrote:

> Date: Mon, 10 Mar 2003 09:13:03 +0100
> From: Renato Romano <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: Programmatic Security
>
> I'm going to use the servlet security capability for enabling users to
> authenticate and work on my application, that is defining roles and
> secuirty constraints in web.xml. In some cases i'd want to show some
> links based on this security info, that is accessible via the
> request.isUserInRole() method. How to use struts tags to test this ?
> Thanks
>

  
... show links only a manager should see ...
  

Craig


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



RE: getPathInfo with Struts/Resin?

2003-03-10 Thread Kris Schneider
Having never used Resin, I'm in no position to comment on what can or can't be
done with it. However, it seems like you're using path info where a request
parameter would be a better fit. It sounds like "username" is actually dynamic,
so it might really be "jim" or "bob" or "jimbob", right? So that you'd have:

www.somehost.com/myapp/execute/edit?username=jimbob
www.somehost.com/myapp/execute/view?username=jimbob

In fact, from a Struts perspective, I'm pretty sure that the additional path
info will cause it to fail when it attempts to find a matching path for an
action mapping.

Quoting Kevin Tung <[EMAIL PROTECTED]>:

> Hi,
> 
> I haven't received any response on this issue.  I assume this has not been
> done or cannot be done with Resin/Struts or with struts and any other
> container.  Or perhaps I should post to a different list altogether?
> 
> Any feedback will be greatly appreciated!!
> 
> Thanks,
> Kevin
> 
> -Original Message-
> From: Kevin Tung [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 6:37 PM
> To: 'Struts Users Mailing List'
> Subject: getPathInfo with Struts/Resin?
> 
> 
> Hi,
> 
> I have searched the archives and the newsgroups but couldn't find an answer
> that applies to my specific environment, hopefully someone here has done
> this before.
> 
> I am running Struts 1.1b3 (didn't work with 1.1b2 either) with Resin 2.1.6
> 
> I want to be able to do the following
> 
> www.somehost.com/myapp/execute/edit/username/
> www.somehost.com/myapp/execute/view/username/
> 
> where view and edit will map to different Actions.  And within each action,
> I want to be able to retrieve the username by using getPathInfo().
> 
> in my web.xml
> 
>   
> action
> /execute/*
>   
> 
> in my struts_config.xml
> 
> 
> 
> 
> But when I point the browser to
> 
> www.somehost.com/myapp/execute/edit/username/ I end up with a
> 
> 400 Invalid path /edit/username/
> 
> And www.somehost.com/myapp/execute/edit/ gets me
> 
> 400 Invalid path /
> 
> But And www.somehost.com/myapp/execute/edit (without the slash)
> 
> Works fine, but it's without the path info..
> 
> Is this a resin issues? or could this be a struts config issue?  Has anyone
> gotten this scenario to work with Struts and Resin? or even another
> container?  Some config samples would be very helpful!!
> 
> Thanks,
> Kevin
> 
> 
> 
> 
> 
> -
> 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]
> 


-- 
Kris Schneider 
D.O.Tech   

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



Struts Faces ea validation XML error

2003-03-10 Thread PILGRIM, Peter, FM
After copying all three JSF JAR to struts-faces/WEB-INF,
and copying commons-logging-1.0.2.jar over WEB-INF/lib
I got a validation error in the Struts Faces download.

Is the validation XML correct?

org.apache.jasper.JasperException: Depends string "email" was not found in
validator-rules.xml.
void
org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, boolean)
JspServletWrapper.java:248
void
org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
java.lang.Throwable, boolean)
JspServlet.java:295
void
org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
JspServlet.java:241

----

--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923


***
  Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB 
Regulated by the Financial Services Authority
***

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



Re: [OT]Re: quick log4j question

2003-03-10 Thread Rick Reumann
On Mon, 10 Mar 2003 08:44:07 -0800 (PST)
"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
 
> The right place to put your properties files, then, is wherever the
> software that is loading them will look for them :-).

Sorry for my ignorance here but by software do you mean the servlet
container? If so how do I know how it's configured to look for resources
by default (probably a RTFM thing I'm guessing).

-- 
Rick Reumann

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



RE: struts-menu

2003-03-10 Thread Edgar Dollin
Thanks Matt:

I didn't find the location bit until after your message, so I submitted a
patch to test the page for https, http, mailto, & ftp so please ignore.

I submitted a patch for DropDownMenuDisplayer.java which outputs a trailer
message after a menu block.  This allowed me to write the javascript to
'toggle' the menu position based on a cookie set in the toggle function.  

It was a mind bender to write javascript in a properties file.  I would have
submitted the javascript but it was based on an external script for reading
and writing the cookies.  If you want it, I'll rework the js in the
properties file to stand alone.

Thanks again

Edgar

> -Original Message-
> From: Raible, Matt [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 10, 2003 10:22 AM
> To: 'Struts Users Mailing List'
> Subject: RE: struts-menu
> 
> 
> Edgar,
> 
> I'm a committer on struts-menu, so hopefully I can help you out.
> 
> I believe using the "location" attribute vs. "page" attribute 
> will strip out your context and use the exact value you 
> specify in "location" rather than pre-pending the context.
> 
> As for remembering the position - which layout are you using? 
>  I can possibly add the remembering functionality, but it 
> will probably involve cookies or something.
> 
> Matt
> 
> > -Original Message-
> > From: Edgar Dollin [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 6:20 AM
> > To: 'Struts Users Mailing List'
> > Subject: struts-menu
> > 
> > 
> > Does anyone know how to suppress the leading '/' in strutsmenu.
> >  
> > Does anyone know how to get the menu to remember it's 
> position if the 
> > target page, i.e. tiles, has the same menu.
> >  
> > Thanks in advance
> >  
> > Edgar
> > 
> 
> 

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



Web sites using struts

2003-03-10 Thread Damm, Gary
I know this has been asked before but I'm getting errors when searching
the archive.  I need some examples (links) of sites currently using
struts.

Any help appreciated,
Gary

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



Re: Struts Faces ea validation XML error

2003-03-10 Thread Craig R. McClanahan


On Mon, 10 Mar 2003, PILGRIM, Peter, FM wrote:

> Date: Mon, 10 Mar 2003 17:18:25 -
> From: "PILGRIM, Peter, FM" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
> Subject: Struts Faces ea validation XML error
>
> After copying all three JSF JAR to struts-faces/WEB-INF,
> and copying commons-logging-1.0.2.jar over WEB-INF/lib
> I got a validation error in the Struts Faces download.
>
> Is the validation XML correct?
>

I only get errors like this when I forget to include
"/WEB-INF/validation.xml" in my webapps -- can you make sure that is still
present?

Craig

> org.apache.jasper.JasperException: Depends string "email" was not found in
> validator-rules.xml.
>   void
> org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpS
> ervletRequest, javax.servlet.http.HttpServletResponse, boolean)
>   JspServletWrapper.java:248
>   void
> org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS
> ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
> java.lang.Throwable, boolean)
>   JspServlet.java:295
>   void
> org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR
> equest, javax.servlet.http.HttpServletResponse)
>   JspServlet.java:241
>
> ----
>
> --
> Peter Pilgrim,
> Struts/J2EE Consultant, RBoS FM, Risk IT
> Tel: +44 (0)207-375-4923
>
>
> ***
>   Visit our Internet site at http://www.rbsmarkets.com
>
> This e-mail is intended only for the addressee named above.
> As this e-mail may contain confidential or privileged information,
> if you are not the named addressee, you are not authorised to
> retain, read, copy or disseminate this message or any part of it.
> The Royal Bank of Scotland plc is registered in Scotland No 90312
> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
> Regulated by the Financial Services Authority
> ***
>
> -
> 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: [OT]Re: quick log4j question

2003-03-10 Thread Craig R. McClanahan


On Mon, 10 Mar 2003, Rick Reumann wrote:

> Date: Mon, 10 Mar 2003 12:21:41 -0500
> From: Rick Reumann <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: [OT]Re: quick log4j question
>
> On Mon, 10 Mar 2003 08:44:07 -0800 (PST)
> "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
>
> > The right place to put your properties files, then, is wherever the
> > software that is loading them will look for them :-).
>
> Sorry for my ignorance here but by software do you mean the servlet
> container? If so how do I know how it's configured to look for resources
> by default (probably a RTFM thing I'm guessing).
>

No, by "software" I mean whatever software is going to read that
particular properties file.  In the particular case of "log4j.properties",
the container does not care whether or not you are going to load this
resource or not -- you have to check the Log4J docs to see where it wants
the "log4j.properties" to be loaded from.

If it says "put the log4j.properties file in a directory that is on your
classpath", you can translate that to mean "/WEB-INF/classes", because (in
effect) that is the directory that the container puts on your "class path"
for you.  It's Log4J, not the container, that actually tries to load this
file.

> --
> Rick Reumann

Craig

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



RE: getPathInfo with Struts/Resin?

2003-03-10 Thread Owen Medd
We discovered the limit of the action mapping capability early on with
one project I was doing and actually wrote a new mapper that matched
based on subsets of the full pathinfo string.  We ended up not using
struts for that project, but enhancing the action map matching was
pretty useful.  Our big problem was using something that was not part of
the core struts distribution and it was apparent our changes were far
too late to make into a possible 1.1 feature.

Owen

On Mon, 2003-03-10 at 11:57, Kris Schneider wrote:
> Having never used Resin, I'm in no position to comment on what can or can't be
> done with it. However, it seems like you're using path info where a request
> parameter would be a better fit. It sounds like "username" is actually dynamic,
> so it might really be "jim" or "bob" or "jimbob", right? So that you'd have:
> 
> www.somehost.com/myapp/execute/edit?username=jimbob
> www.somehost.com/myapp/execute/view?username=jimbob
> 
> In fact, from a Struts perspective, I'm pretty sure that the additional path
> info will cause it to fail when it attempts to find a matching path for an
> action mapping.
> 
> Quoting Kevin Tung <[EMAIL PROTECTED]>:
> 
> > Hi,
> > 
> > I haven't received any response on this issue.  I assume this has not been
> > done or cannot be done with Resin/Struts or with struts and any other
> > container.  Or perhaps I should post to a different list altogether?
> > 
> > Any feedback will be greatly appreciated!!
> > 
> > Thanks,
> > Kevin
> > 
> > -Original Message-
> > From: Kevin Tung [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 06, 2003 6:37 PM
> > To: 'Struts Users Mailing List'
> > Subject: getPathInfo with Struts/Resin?
> > 
> > 
> > Hi,
> > 
> > I have searched the archives and the newsgroups but couldn't find an answer
> > that applies to my specific environment, hopefully someone here has done
> > this before.
> > 
> > I am running Struts 1.1b3 (didn't work with 1.1b2 either) with Resin 2.1.6
> > 
> > I want to be able to do the following
> > 
> > www.somehost.com/myapp/execute/edit/username/
> > www.somehost.com/myapp/execute/view/username/
> > 
> > where view and edit will map to different Actions.  And within each action,
> > I want to be able to retrieve the username by using getPathInfo().
> > 
> > in my web.xml
> > 
> >   
> > action
> > /execute/*
> >   
> > 
> > in my struts_config.xml
> > 
> > 
> > 
> > 
> > But when I point the browser to
> > 
> > www.somehost.com/myapp/execute/edit/username/ I end up with a
> > 
> > 400 Invalid path /edit/username/
> > 
> > And www.somehost.com/myapp/execute/edit/ gets me
> > 
> > 400 Invalid path /
> > 
> > But And www.somehost.com/myapp/execute/edit (without the slash)
> > 
> > Works fine, but it's without the path info..
> > 
> > Is this a resin issues? or could this be a struts config issue?  Has anyone
> > gotten this scenario to work with Struts and Resin? or even another
> > container?  Some config samples would be very helpful!!
> > 
> > Thanks,
> > Kevin
> > 
> > 
> > 
> > 
> > 
> > -
> > 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]



OT Filename using file download within an action

2003-03-10 Thread Roland Berger
Hi all

Craig has described in the thread "File upload/download design question" how
to download a file from within an action. Others have described how to set
the Header so that the browser is promting for the right filename:

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

The later does not work with netscape version 7 ( it does work with IE 6 ).
In the popup, the browser suggests  the filename like this: .do
. One year has passed by since and world has become more clever (sometimes I
think the opposite). Is there a more definitv guide to suggest the filename
of the download?

Thank's
Roland


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



RE: struts-menu

2003-03-10 Thread Edgar Dollin
Struts menu works nicely with struts, i.e. you add a plugin to read your
configuration files.  It uses xml and property files for menu configuration.
It can use javascript or not and works with CoolMenus.  There are a couple
of jsp tags which actually insert the menu so your jsp files stay really
clean.  The things I like best about it is that the menu positions are
relative (at least the simple and drop down displayers), i.e. you don't have
to put pixel positions in your code and the menu config just has information
actually relevant to the menu, i.e. url, description, and a tooltip.

http://sourceforge.net/projects/struts-menu

Edgar

> -Original Message-
> From: Stephen Smithstone [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 10, 2003 10:38 AM
> To: 'Struts Users Mailing List'
> Subject: Re: struts-menu
> 
> 
> what is this struts-menu and where can i find some examples / 
> downloads ? 
> please 
> 
> On Monday 10 March 2003 3:22 pm, Raible, Matt wrote:
> > Edgar,
> >
> > I'm a committer on struts-menu, so hopefully I can help you out.
> >
> > I believe using the "location" attribute vs. "page" attribute will 
> > strip out your context and use the exact value you specify in 
> > "location" rather than pre-pending the context.
> >
> > As for remembering the position - which layout are you 
> using?  I can 
> > possibly add the remembering functionality, but it will probably 
> > involve cookies or something.
> >
> > Matt
> >
> > > -Original Message-
> > > From: Edgar Dollin [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, March 10, 2003 6:20 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: struts-menu
> > >
> > >
> > > Does anyone know how to suppress the leading '/' in strutsmenu.
> > >
> > > Does anyone know how to get the menu to remember it's position if 
> > > the target page, i.e. tiles, has the same menu.
> > >
> > > Thanks in advance
> > >
> > > Edgar
> >
> > 
> -
> > 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]



line feeds to

2003-03-10 Thread awc
Hi All,

Is there is switch in   tag where line feeds convert to
.

Thanks in advance for any info.

.anil


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



RE: The Back button on on multi-page forms

2003-03-10 Thread Ron Day
Thanks for the tip on tokens

I'm not familiar (yet) with tokens.
Are these new in 1.1 or have they always been there. I have to use
Struts 1.0.

Ron

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: The Back button on on multi-page forms


See the Action class' javadoc for the token methods and the struts-example
app for how to use them.

David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: The Back button on  on multi-page forms
>Date: Mon, 10 Mar 2003 10:05:16 -0600
>
>Anyone have any ideas or best practises on how to handle the use (mis-use)
>of the browser back button on multi-page forms.
>
>My forms work fine and validate Ok, but if the back button is used the
>forms
>are not re-populated properly. In particular anything that was in the
>reset,
>seems to be used when the form appears after the back button is used.
>
>ron
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


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


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



Re: line feeds to

2003-03-10 Thread David Graham
No, you need to perform that function yourself.

David



From: awc <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: line feeds to 
Date: Mon, 10 Mar 2003 11:55:40 -0600
Hi All,

Is there is switch in   tag where line feeds convert to
.
Thanks in advance for any info.

.anil

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


_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


[Q] Bug in bean:message?

2003-03-10 Thread Jeff Smith
I've created a generic message page that shows a message to my users based
on a request parameter.

I've created a jsp tile to encapsulate this behavior which looks like this:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>







My application.properties has the following two lines in it:
pages.testmessage.title=Test Message Page
pages.testmessage.message=Congratulations! You have found the test
message page.

But when I try to invoke the page, I get the following error thrown:
2003-03-09 10:05:25 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
org.apache.jasper.JasperException: Missing message for key
pages.testmessage.title

It took me a long time to figure this out. If you look very closely at the
4th line in the jsp file, you'll see an errant space inside the .title
literal. Obviously it is very hard to see the trailing space in the error
log. Should the message keys be Trim'd before their dereferenced? Or is this
a behavior that is sometimes useful? At the very least, quotes around the
key name in the log would make the trailing space more visible.

Jefficus


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



RE: The Back button on on multi-page forms

2003-03-10 Thread David Graham
See the Action class' javadoc for details.

David



From: "Ron Day" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: The Back button on on multi-page forms
Date: Mon, 10 Mar 2003 11:54:32 -0600
Thanks for the tip on tokens

I'm not familiar (yet) with tokens.
Are these new in 1.1 or have they always been there. I have to use
Struts 1.0.
Ron

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: The Back button on on multi-page forms
See the Action class' javadoc for the token methods and the struts-example
app for how to use them.
David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: The Back button on  on multi-page forms
>Date: Mon, 10 Mar 2003 10:05:16 -0600
>
>Anyone have any ideas or best practises on how to handle the use 
(mis-use)
>of the browser back button on multi-page forms.
>
>My forms work fine and validate Ok, but if the back button is used the
>forms
>are not re-populated properly. In particular anything that was in the
>reset,
>seems to be used when the form appears after the back button is used.
>
>ron
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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


Re: [Q] Bug in bean:message?

2003-03-10 Thread David Graham
Seems like it would be useful to trim the keys before using them.  Open an 
enhancement request for this in bugzilla.

David



From: "Jeff Smith" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: [Q] Bug in bean:message?
Date: Mon, 10 Mar 2003 10:26:57 -0700
I've created a generic message page that shows a message to my users based
on a request parameter.
I've created a jsp tile to encapsulate this behavior which looks like this:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>





My application.properties has the following two lines in it:
pages.testmessage.title=Test Message Page
pages.testmessage.message=Congratulations! You have found the test
message page.
But when I try to invoke the page, I get the following error thrown:
2003-03-09 10:05:25 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
org.apache.jasper.JasperException: Missing message for key
pages.testmessage.title
It took me a long time to figure this out. If you look very closely at the
4th line in the jsp file, you'll see an errant space inside the .title
literal. Obviously it is very hard to see the trailing space in the error
log. Should the message keys be Trim'd before their dereferenced? Or is 
this
a behavior that is sometimes useful? At the very least, quotes around the
key name in the log would make the trailing space more visible.

Jefficus

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


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Nested tag problem

2003-03-10 Thread Yaron Sela
Hi

All the iterator and nested tags worked until I have added another bean:write 
() to the value of a check box and I have 
got an error: org.apache.jasper.JasperException: /searchDira.jsp(335,108) equal symbol 
expected

If I wrote the bean:write (sign with bold) outside the checkbox tag It worked
what's can be the problem?


" style="display:none" 
cellpadding="0" cellspacing="0">





"/>








Thanks for your time.

Yaron


Re: Nested tag problem

2003-03-10 Thread David Graham
You can't use a tag as the input to another tag's attribute.

David



From: "Yaron Sela" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Nested tag problem
Date: Mon, 10 Mar 2003 20:08:39 +0200
Hi

All the iterator and nested tags worked until I have added another 
bean:write () to the value of a 
check box and I have got an error: org.apache.jasper.JasperException: 
/searchDira.jsp(335,108) equal symbol expected

If I wrote the bean:write (sign with bold) outside the checkbox tag It 
worked
what's can be the problem?


" 
style="display:none" cellpadding="0" cellspacing="0">





"/>








Thanks for your time.

Yaron


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Sort a collection in alphabetic order

2003-03-10 Thread Søren Blidorf

Hi.
I need to sort my collection "people" in alphabetic order by lastname,
firstname.
Can anybody help me?

I guess I should do it in the Action and not when displayed in jsp page.



Collection people = new ArrayList();

while( rs.next() ) {
PeopleBean pb = new PeopleBean();
pb.setId(rs.getInt("ID"));
pb.setFirstname( rs.getString( "FIRSTNAME" ));
pb.setLastname( rs.getString( "LASTNAME" ));
}

people.add( pb );


Søren Blidorf





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



Re: Nested tag problem

2003-03-10 Thread Dave Newton
On Mon, 2003-03-10 at 13:15, David Graham wrote:
> You can't use a tag as the input to another tag's attribute.

Hey,

On a lot of other lists there's a monthly/weekly (or, in our case,
perhaps hourly ;) FAQ posted. Would it make any sense to create a very
short FAQ that's either sent out on subscription or posted automagically
every n days?

Dave "This does NOT make me a volunteer" Newton

(But I suppose I could. Volunteer, that is.)



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



RE: The Back button on on multi-page forms

2003-03-10 Thread Ron Day
I get the picturethanks anyway.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:04 PM
To: [EMAIL PROTECTED]
Subject: RE: The Back button on on multi-page forms


See the Action class' javadoc for details.

David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: The Back button on on multi-page forms
>Date: Mon, 10 Mar 2003 11:54:32 -0600
>
>Thanks for the tip on tokens
>
>I'm not familiar (yet) with tokens.
>Are these new in 1.1 or have they always been there. I have to use
>Struts 1.0.
>
>Ron
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 10:24 AM
>To: [EMAIL PROTECTED]
>Subject: Re: The Back button on on multi-page forms
>
>
>See the Action class' javadoc for the token methods and the struts-example
>app for how to use them.
>
>David
>
>
>
> >From: "Ron Day" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: The Back button on  on multi-page forms
> >Date: Mon, 10 Mar 2003 10:05:16 -0600
> >
> >Anyone have any ideas or best practises on how to handle the use 
>(mis-use)
> >of the browser back button on multi-page forms.
> >
> >My forms work fine and validate Ok, but if the back button is used the
> >forms
> >are not re-populated properly. In particular anything that was in the
> >reset,
> >seems to be used when the form appears after the back button is used.
> >
> >ron
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_
>Add photos to your messages with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


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


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


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



Re: Sort a collection in alphabetic order

2003-03-10 Thread Dave Newton
On Mon, 2003-03-10 at 13:16, Søren Blidorf wrote:
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname. Can anybody help me?

Most algorithm books will give you more information than you want on
sorting.

Why not just do it in the query and let the db do it?

Dave



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



Re: [Design Pattern]FormBean in Model Layer

2003-03-10 Thread Puneet Agarwal
Thanks Craig, I go with you.

All I wanted was to avoid the duplication of information(in the form of
variables)  in JVM.
But your point about conversion of data type is totally agreeable.

So, I shall copy the values in Action class using BeanUtils.copyProperties()
to this new object(DTO).

Regards
Puneet Agarwal
->
"Struts"..."Action"..."Struts in Action"..."Action in
Struts"...[possibly]"Action with Struts"...?
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Puneet
Agarwal" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 4:50 PM
Subject: Re: [Design Pattern]FormBean in Model Layer


>
>
> On Mon, 10 Mar 2003, Puneet Agarwal wrote:
>
> > Date: Mon, 10 Mar 2003 11:31:29 -
> > From: Puneet Agarwal <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
> >  Puneet Agarwal <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Re: [Design Pattern]FormBean in Model Layer
> >
> > Yeah I am going to adopt this. I am not very sure of how exactly am I
going
> > to do that(at the moment). But yes it sounds too  good.
> >
>
> I do *not* agree with the idea of using an ActionForm (either DynaForm or
> not) as a DTO.  Using a custom interface gets around one of the problems
> (introducing a dependency on Struts), but not around the biggest one --
> the data types in a correctly written ActionForm are wrong for the
> business tier.
>
> In order to fulfill its purpose, the ActionForm properties must allow
> incorrect input to be redisplayed -- for example, a field that accepts an
> integer should allow the user to type "1a3" instead of "123" and have
> "1a3" redisplayed with the error message.  In order for this to work, the
> ActionForm property must be a String.  Yet, in a properly designed DTO,
> the property type would be "int".
>
> The best design practice is to create a separate DTO object (or DynaBean)
> with the correct data types, and use BeanUtils.copyProperties() to copy
> the values -- with appropriate conversions -- in your Action that accepts
> the form.  You know that you won't get conversion errors because they
> would have been caught in the validation checks that preceed calling the
> Action.
>
> > Thanks
> > Puneet Agarwal
>
> Craig McClanahan
>
> -
> 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: Sort a collection in alphabetic order

2003-03-10 Thread Robert Taylor
Do it in the query.

select ID, FIRSTNAME, LASTNAME from people order by LASTNAME, FIRSTNAME

robert

> -Original Message-
> From: Søren Blidorf [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 1:17 PM
> To: [EMAIL PROTECTED]
> Subject: Sort a collection in alphabetic order
>
>
>
> Hi.
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname.
> Can anybody help me?
>
> I guess I should do it in the Action and not when displayed in jsp page.
>
>
>
> Collection people = new ArrayList();
>
> while( rs.next() ) {
> PeopleBean pb = new PeopleBean();
> pb.setId(rs.getInt("ID"));
> pb.setFirstname( rs.getString( "FIRSTNAME" ));
> pb.setLastname( rs.getString( "LASTNAME" ));
> }
>
> people.add( pb );
>
>
> Søren Blidorf
>
>
>
>
>
> -
> 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: Nested tag problem

2003-03-10 Thread David Graham
We already provide FAQ pages on the Struts site.  Unfortunately, this 
particular issue wouldn't benefit from an FAQ because users assume it's a 
problem with the tag instead of their usage of it.

David



From: Dave Newton <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Nested tag problem
Date: 10 Mar 2003 13:19:20 -0500
On Mon, 2003-03-10 at 13:15, David Graham wrote:
> You can't use a tag as the input to another tag's attribute.
Hey,

On a lot of other lists there's a monthly/weekly (or, in our case,
perhaps hourly ;) FAQ posted. Would it make any sense to create a very
short FAQ that's either sent out on subscription or posted automagically
every n days?
Dave "This does NOT make me a volunteer" Newton

(But I suppose I could. Volunteer, that is.)



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


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


SV: Sort a collection in alphabetic order

2003-03-10 Thread Søren Blidorf
It is not possible.

The select is in a while (rs.next()) {} depending on another value. (Not
easy to explain!!)

I am a ware of normal SQL order by

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 10. marts 2003 19:20
Til: Struts Users Mailing List
Emne: Re: Sort a collection in alphabetic order

On Mon, 2003-03-10 at 13:16, Søren Blidorf wrote:
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname. Can anybody help me?

Most algorithm books will give you more information than you want on
sorting.

Why not just do it in the query and let the db do it?

Dave



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



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



RE: getPathInfo with Struts/Resin?

2003-03-10 Thread Kevin Tung
Hi Kris,

The examples I had given are simplified (probably too much so).

In practice, we need to allow search engine to be able to index the site
correctly.  Some of the search engines we work with have issues with "?" and
query strings in general.  Also in our app, the extra path info is used to
indicate content.

www.somehose.com/myapp/homepagelayout/file1.jsp

So it is not really dynamic, in that sense.

I see your point about additional path info causing action mapping to fail.
Looks like it's just not possible with struts, regardless of container.  I
suppose I will have to use a filter to pre-process the request.

Thanks
Kevin

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 11:58 AM
To: Struts Users Mailing List
Subject: RE: getPathInfo with Struts/Resin?


Having never used Resin, I'm in no position to comment on what can or can't
be
done with it. However, it seems like you're using path info where a request
parameter would be a better fit. It sounds like "username" is actually
dynamic,
so it might really be "jim" or "bob" or "jimbob", right? So that you'd have:

www.somehost.com/myapp/execute/edit?username=jimbob
www.somehost.com/myapp/execute/view?username=jimbob

In fact, from a Struts perspective, I'm pretty sure that the additional path
info will cause it to fail when it attempts to find a matching path for an
action mapping.

Quoting Kevin Tung <[EMAIL PROTECTED]>:

> Hi,
>
> I haven't received any response on this issue.  I assume this has not been
> done or cannot be done with Resin/Struts or with struts and any other
> container.  Or perhaps I should post to a different list altogether?
>
> Any feedback will be greatly appreciated!!
>
> Thanks,
> Kevin
>
> -Original Message-
> From: Kevin Tung [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 6:37 PM
> To: 'Struts Users Mailing List'
> Subject: getPathInfo with Struts/Resin?
>
>
> Hi,
>
> I have searched the archives and the newsgroups but couldn't find an
answer
> that applies to my specific environment, hopefully someone here has done
> this before.
>
> I am running Struts 1.1b3 (didn't work with 1.1b2 either) with Resin 2.1.6
>
> I want to be able to do the following
>
> www.somehost.com/myapp/execute/edit/username/
> www.somehost.com/myapp/execute/view/username/
>
> where view and edit will map to different Actions.  And within each
action,
> I want to be able to retrieve the username by using getPathInfo().
>
> in my web.xml
>
>   
> action
> /execute/*
>   
>
> in my struts_config.xml
>
> 
>
>
> But when I point the browser to
>
> www.somehost.com/myapp/execute/edit/username/ I end up with a
>
> 400 Invalid path /edit/username/
>
> And www.somehost.com/myapp/execute/edit/ gets me
>
> 400 Invalid path /
>
> But And www.somehost.com/myapp/execute/edit (without the slash)
>
> Works fine, but it's without the path info..
>
> Is this a resin issues? or could this be a struts config issue?  Has
anyone
> gotten this scenario to work with Struts and Resin? or even another
> container?  Some config samples would be very helpful!!
>
> Thanks,
> Kevin
>
>
>
>
>
> -
> 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]
>


--
Kris Schneider 
D.O.Tech   

-
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: Sort a collection in alphabetic order

2003-03-10 Thread nash e. foster


You could have your PeopleBean implement Comparable, which is pretty 
easy, and then use TreeSet to create a sorted set using your compareTo 
method.

-nash

On Monday, March 10, 2003, at 01:16  PM, Søren Blidorf wrote:

Hi.
I need to sort my collection "people" in alphabetic order by lastname,
firstname.
Can anybody help me?
I guess I should do it in the Action and not when displayed in jsp 
page.



Collection people = new ArrayList();

while( rs.next() ) {
PeopleBean pb = new PeopleBean();
pb.setId(rs.getInt("ID"));
pb.setFirstname( rs.getString( "FIRSTNAME" ));
pb.setLastname( rs.getString( "LASTNAME" ));
}
people.add( pb );

Søren Blidorf





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


***
This message is intended only for the use of the intended recipient and
may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
are not the intended recipient, you are hereby notified that any use,
dissemination, disclosure or copying of this communication is strictly
prohibited.  If you have received this communication in error, please
destroy all copies of this message and its attachments and notify us
immediately.
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Nested tag problem

2003-03-10 Thread Dave Newton
On Mon, 2003-03-10 at 13:23, David Graham wrote:
> We already provide FAQ pages on the Struts site.  Unfortunately, this 
> particular issue wouldn't benefit from an FAQ because users assume it's a 
> problem with the tag instead of their usage of it.

Faq Question: Can I use bean output as a property of another bean?
  Answer: No.

Or, alternately:

Common Bean Issues:

1) You can't use the output of one bean as input to another, i.e.
   

There might be FAQ pages all over, but people ask the same questions on
the list, that's all I'm saying, and it seems like we could at least
minorly cut down the S/N ratio with a 10-30 question FAQ that's
tragically simple to read and understand.

Just an idea.

Dave



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



Regular Expressions

2003-03-10 Thread Vinay
I am stuck in using Regular expressions in Struts validator,,i.e validation.xml for 
validating input fields .Is there a web site which lists all kinds of expressions that 
can be used in a validation.xml.

examples currency ,
  alphanumieric 
length restriction,
  date formats ,..etc.

Help appreciated,

Thanks in advance ,
Vinay

Re: Regular Expressions

2003-03-10 Thread Dave Newton
On Mon, 2003-03-10 at 13:28, Vinay wrote:
> I am stuck in using Regular expressions in Struts validator,,i.e validation.xml for 
> validating input fields .Is there a web site which lists all kinds of expressions 
> that can be used in a validation.xml.

It uses the org.apache.regexp package, so I'd imagine anything it
supports.

Dave



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



RE: Web sites using struts

2003-03-10 Thread Edgar Dollin
http://marc.theaimsgroup.com

This is a mirror of the archives which has a little cleaner search.

> -Original Message-
> From: Damm, Gary [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 10, 2003 12:35 PM
> To: '[EMAIL PROTECTED]'
> Subject: Web sites using struts
> 
> 
> I know this has been asked before but I'm getting errors when 
> searching the archive.  I need some examples (links) of sites 
> currently using struts.
> 
> Any help appreciated,
> Gary
> 

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



JavaServer Faces - Is it OK to use it now?

2003-03-10 Thread Mete Kural
Hello,

I'm beginning a new Struts-based web application
project and I would really like to use JavaServer
Pages in it. I know that there are notices
recommending not to use the current early access
implementation for production environments. I am just
beginning this project so I'm thinking it will take me
about a month or a little more to finish it. Would you
recommend me to use JavaServer Faces in this project?
Do you think it is likely that there will be another
early access release that is more suitable for
production environments in this time frame?

Thanks,
Mete



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



RE: Web sites using struts

2003-03-10 Thread Sri Sankaran
Check out http://marc.theaimsgroup.com/?l=struts-user&m=104627418203266&w=2.

Sri

-Original Message-
From: Damm, Gary [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 10, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: Web sites using struts


I know this has been asked before but I'm getting errors when searching the archive.  
I need some examples (links) of sites currently using struts.

Any help appreciated,
Gary

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


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



Re: JavaServer Faces - Is it OK to use it now?

2003-03-10 Thread David Graham
JSF isn't final yet so I wouldn't use it for any production projects.

David



From: "Mete Kural" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: JavaServer Faces - Is it OK to use it now?
Date: Mon, 10 Mar 2003 10:39:19 +
Hello,

I'm beginning a new Struts-based web application
project and I would really like to use JavaServer
Pages in it. I know that there are notices
recommending not to use the current early access
implementation for production environments. I am just
beginning this project so I'm thinking it will take me
about a month or a little more to finish it. Would you
recommend me to use JavaServer Faces in this project?
Do you think it is likely that there will be another
early access release that is more suitable for
production environments in this time frame?
Thanks,
Mete


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


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: The Back button on on multi-page forms ??????

2003-03-10 Thread Ron Day
Khalid

I will share anything I find. 

Have not got too much help so far.

I am digging into the "tokens"

Javadoc does not say much !!

Ron

-Original Message-
From: Khalid K. [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: The Back button on on multi-page forms ??


Hello Ron,

We have an application that has the same problem. if you got the "back"
button issue resloved, could you please share the code sample ??
I checked the java doc, and it looks like "isValidToken" is in 1.1, and not
in 1.0.2.

Thanks!

Khalid

- Original Message -
From: "Ron Day" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 10:14 AM
Subject: RE: The Back button on on multi-page forms


> I get the picturethanks anyway.
>
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 12:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: The Back button on on multi-page forms
>
>
> See the Action class' javadoc for details.
>
> David
>
>
>
> >From: "Ron Day" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: The Back button on on multi-page forms
> >Date: Mon, 10 Mar 2003 11:54:32 -0600
> >
> >Thanks for the tip on tokens
> >
> >I'm not familiar (yet) with tokens.
> >Are these new in 1.1 or have they always been there. I have to use
> >Struts 1.0.
> >
> >Ron
> >
> >-Original Message-
> >From: David Graham [mailto:[EMAIL PROTECTED]
> >Sent: Monday, March 10, 2003 10:24 AM
> >To: [EMAIL PROTECTED]
> >Subject: Re: The Back button on on multi-page forms
> >
> >
> >See the Action class' javadoc for the token methods and the
struts-example
> >app for how to use them.
> >
> >David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: The Back button on  on multi-page forms
> > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > >
> > >Anyone have any ideas or best practises on how to handle the use
> >(mis-use)
> > >of the browser back button on multi-page forms.
> > >
> > >My forms work fine and validate Ok, but if the back button is used the
> > >forms
> > >are not re-populated properly. In particular anything that was in the
> > >reset,
> > >seems to be used when the form appears after the back button is used.
> > >
> > >ron
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >_
> >Add photos to your messages with MSN 8. Get 2 months FREE*.
> >http://join.msn.com/?page=features/featuredemail
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> 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: The Back button on on multi-page forms ??????

2003-03-10 Thread David Graham
You'll notice that I also pointed you to the struts-example app that shows 
you how to use the methods you found in the javadoc.

David



From: "Ron Day" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: The Back button on on multi-page forms ??
Date: Mon, 10 Mar 2003 12:39:51 -0600
Khalid

I will share anything I find.

Have not got too much help so far.

I am digging into the "tokens"

Javadoc does not say much !!

Ron

-Original Message-
From: Khalid K. [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: The Back button on on multi-page forms ??
Hello Ron,

We have an application that has the same problem. if you got the "back"
button issue resloved, could you please share the code sample ??
I checked the java doc, and it looks like "isValidToken" is in 1.1, and not
in 1.0.2.
Thanks!

Khalid

- Original Message -
From: "Ron Day" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 10:14 AM
Subject: RE: The Back button on on multi-page forms
> I get the picturethanks anyway.
>
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 12:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: The Back button on on multi-page forms
>
>
> See the Action class' javadoc for details.
>
> David
>
>
>
> >From: "Ron Day" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: The Back button on on multi-page forms
> >Date: Mon, 10 Mar 2003 11:54:32 -0600
> >
> >Thanks for the tip on tokens
> >
> >I'm not familiar (yet) with tokens.
> >Are these new in 1.1 or have they always been there. I have to use
> >Struts 1.0.
> >
> >Ron
> >
> >-Original Message-
> >From: David Graham [mailto:[EMAIL PROTECTED]
> >Sent: Monday, March 10, 2003 10:24 AM
> >To: [EMAIL PROTECTED]
> >Subject: Re: The Back button on on multi-page forms
> >
> >
> >See the Action class' javadoc for the token methods and the
struts-example
> >app for how to use them.
> >
> >David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: The Back button on  on multi-page forms
> > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > >
> > >Anyone have any ideas or best practises on how to handle the use
> >(mis-use)
> > >of the browser back button on multi-page forms.
> > >
> > >My forms work fine and validate Ok, but if the back button is used 
the
> > >forms
> > >are not re-populated properly. In particular anything that was in the
> > >reset,
> > >seems to be used when the form appears after the back button is used.
> > >
> > >ron
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >_
> >Add photos to your messages with MSN 8. Get 2 months FREE*.
> >http://join.msn.com/?page=features/featuredemail
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> 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]


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

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


Validating conditionaly required fields?

2003-03-10 Thread Greg Hess
Hi All,
 
I am adding some new validation to a form that is currently being
managed by the validation framework. My form has several properties that
are now optional. The user is to supply a URL and a corresponding label.
The user has the option to enter 1-6 Label/URL combinations. I need to
require a label/URL entry only if a value has been added for one of the
pair. I have read in the documentation that there is new support for
conditionaly required fields but I am having difficulty understanding
how it works and how to implement. The example shown here
  shows a
form defined in struts-config.xml containting a property of type
org.apache.struts.webapp.validator.Dependent[] and a entry in the
validation.xml that uses some conditional evaluations on a form field as
shown below.
 
If you have this in your struts-config.xml 




 
You can define a validation: 
 

 

  
  
field[0]
lastName
  
  
field-indexed[0]
true
  
  
field-test[0]
NOTNULL
  

 
Could anyone help explain how to use the
org.apache.struts.webapp.validator.Dependent[] and the
"indexedListProperty" to provide the functionality I require?
 
Many thanks,
 
Greg
 


Re: Sort a collection in alphabetic order

2003-03-10 Thread Dave Patton
I concur with Nash.  Use a Comparator Object for this. Itis in the
java.util package.

Dave Patton
 


On Mon, 2003-03-10 at 10:27, nash e. foster wrote:

> You could have your PeopleBean implement Comparable, which is pretty 
> easy, and then use TreeSet to create a sorted set using your compareTo 
> method.
> 
> -nash
> 
> On Monday, March 10, 2003, at 01:16  PM, Søren Blidorf wrote:
> 
> >
> > Hi.
> > I need to sort my collection "people" in alphabetic order by lastname,
> > firstname.
> > Can anybody help me?
> >
> > I guess I should do it in the Action and not when displayed in jsp 
> > page.
> >
> >
> >
> > Collection people = new ArrayList();
> >
> > while( rs.next() ) {
> > PeopleBean pb = new PeopleBean();
> > pb.setId(rs.getInt("ID"));
> > pb.setFirstname( rs.getString( "FIRSTNAME" ));
> > pb.setLastname( rs.getString( "LASTNAME" ));
> > }
> >
> > people.add( pb );
> >
> >
> > Søren Blidorf
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ***
> This message is intended only for the use of the intended recipient and
> may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
> are not the intended recipient, you are hereby notified that any use,
> dissemination, disclosure or copying of this communication is strictly
> prohibited.  If you have received this communication in error, please
> destroy all copies of this message and its attachments and notify us
> immediately.
> ***
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use  

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl 
X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE 
CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk 
cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF 
GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra 
A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6/KI+T 
5WDzzKEGsyxOI+GYeGRKO0ZAYITG9HxevvKa1GMHBwRYNr2Qv62ckkHTy5rdmzZe 
PFM/am8B9maH5gKg6oIqzJwfmvb+ll8DRbhfI25trLqzggifrFcZHkOwTVGLNfdM 
cPWK/Yu4dOLAKCow06q0G/tDmXNkcyx12R6Z4Y/cQ5Qyvt1WP+eQAM/HBJI8rR9c 
cxS80pEorJIx4a7x9EsiwmB8milqBrXqHN2GRe/PnZSM9czBK7kBDQQ7ouqNAQgA 
sWO4lchFwK6leJClCpdaCjL4oUGjiZorW+XG2YKtQW6a+oYlplcHFkMSibkTN6Jc 
RdPEkarRvJ7sj+UgsUfkj4//EtqARuHTXhnMlsjqISTXlS2l61fQFg1d0iwvinyV 
sq6lVDtrr7UBe2b5TOuoRe13CzGWyhNQafV1gMcpBx9KxNi24UowJiT+cJpnxMCu 
+DNElC2AmG7phPagSFL8F4f++dGL2l8kAkxCSCl3Kr+8HUlFmOwwZ1PGSSM83pM/ 
NNZKDAdGUiBRKqC32oOhKacxb6cf4ta1kZ6GDZcqVo+5qlz4OtUKbRLtW5Y8tiFc 
PwkDePX/F1490V3YWgHVzwARAQABiQEiBBgBAgAMBQI7ouqNBRsMAAoJEOWQ 
5D6nisB/8xsIAJLNUQC8SOQF5txBrO22W7uAJ9xU9RK66Pyf9a+KjdNf4rE6vK4n 
vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


Re: Regular Expressions

2003-03-10 Thread Dave Patton
Not that I have seen per se.  There is a site that has some pre-built
regexs but Im sorry I cant remember the URL.  Your best bet is to go buy
the Oreilly book "Mastering Regular Expressions"  It is pretty much the
bible of regex and well worth the investment.

Dave Patton

On Mon, 2003-03-10 at 10:28, Vinay wrote:

> I am stuck in using Regular expressions in Struts validator,,i.e validation.xml for 
> validating input fields .Is there a web site which lists all kinds of expressions 
> that can be used in a validation.xml.
> 
> examples currency ,
>   alphanumieric 
> length restriction,
>   date formats ,..etc.
> 
> Help appreciated,
> 
> Thanks in advance ,
> Vinay



_
David H. Patton
[EMAIL PROTECTED]
(202) 276-8998 - pcs

-BEGIN PGP PUBLIC KEY BLOCK- 

Version: PGPfreeware 7.0.3 for non-commercial use  

mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w 
3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa 
2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w 
YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl 
X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE 
CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk 
cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF 
GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra 
A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6/KI+T 
5WDzzKEGsyxOI+GYeGRKO0ZAYITG9HxevvKa1GMHBwRYNr2Qv62ckkHTy5rdmzZe 
PFM/am8B9maH5gKg6oIqzJwfmvb+ll8DRbhfI25trLqzggifrFcZHkOwTVGLNfdM 
cPWK/Yu4dOLAKCow06q0G/tDmXNkcyx12R6Z4Y/cQ5Qyvt1WP+eQAM/HBJI8rR9c 
cxS80pEorJIx4a7x9EsiwmB8milqBrXqHN2GRe/PnZSM9czBK7kBDQQ7ouqNAQgA 
sWO4lchFwK6leJClCpdaCjL4oUGjiZorW+XG2YKtQW6a+oYlplcHFkMSibkTN6Jc 
RdPEkarRvJ7sj+UgsUfkj4//EtqARuHTXhnMlsjqISTXlS2l61fQFg1d0iwvinyV 
sq6lVDtrr7UBe2b5TOuoRe13CzGWyhNQafV1gMcpBx9KxNi24UowJiT+cJpnxMCu 
+DNElC2AmG7phPagSFL8F4f++dGL2l8kAkxCSCl3Kr+8HUlFmOwwZ1PGSSM83pM/ 
NNZKDAdGUiBRKqC32oOhKacxb6cf4ta1kZ6GDZcqVo+5qlz4OtUKbRLtW5Y8tiFc 
PwkDePX/F1490V3YWgHVzwARAQABiQEiBBgBAgAMBQI7ouqNBRsMAAoJEOWQ 
5D6nisB/8xsIAJLNUQC8SOQF5txBrO22W7uAJ9xU9RK66Pyf9a+KjdNf4rE6vK4n 
vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6 
4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP 
JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+ 
TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3 
XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0= 
=/zoc 

-END PGP PUBLIC KEY BLOCK-


Re: JavaServer Faces - Is it OK to use it now?

2003-03-10 Thread Mete Kural
Thanks for you advice.

Do you have any vague estimates on how long it will
take JSF to become suitable for Struts-based
production applications?

a) 2-3 months
b) 4-6 months
c) 6-12 months
d) more than 1 year

Thanks,
Mete


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



Re: Sort a collection in alphabetic order

2003-03-10 Thread Vic Cekvenich
http://edhill.its.uiowa.edu/display-0.8/

Robert Taylor wrote:
Do it in the query.

select ID, FIRSTNAME, LASTNAME from people order by LASTNAME, FIRSTNAME

robert


-Original Message-
From: Søren Blidorf [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 1:17 PM
To: [EMAIL PROTECTED]
Subject: Sort a collection in alphabetic order


Hi.
I need to sort my collection "people" in alphabetic order by lastname,
firstname.
Can anybody help me?
I guess I should do it in the Action and not when displayed in jsp page.



Collection people = new ArrayList();

while( rs.next() ) {
PeopleBean pb = new PeopleBean();
pb.setId(rs.getInt("ID"));
pb.setFirstname( rs.getString( "FIRSTNAME" ));
pb.setLastname( rs.getString( "LASTNAME" ));
}
people.add( pb );

Søren Blidorf





-
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: Nested tag problem

2003-03-10 Thread Yaron Sela
Dear David

Thanks a lot for your help.

Yaron
- Original Message -
From: "David Graham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 8:23 PM
Subject: Re: Nested tag problem


> We already provide FAQ pages on the Struts site.  Unfortunately, this
> particular issue wouldn't benefit from an FAQ because users assume it's a
> problem with the tag instead of their usage of it.
>
> David
>
>
>
> >From: Dave Newton <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >Subject: Re: Nested tag problem
> >Date: 10 Mar 2003 13:19:20 -0500
> >
> >On Mon, 2003-03-10 at 13:15, David Graham wrote:
> > > You can't use a tag as the input to another tag's attribute.
> >
> >Hey,
> >
> >On a lot of other lists there's a monthly/weekly (or, in our case,
> >perhaps hourly ;) FAQ posted. Would it make any sense to create a very
> >short FAQ that's either sent out on subscription or posted automagically
> >every n days?
> >
> >Dave "This does NOT make me a volunteer" Newton
> >
> >(But I suppose I could. Volunteer, that is.)
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> -
> 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: The Back button on on multi-page forms ??????

2003-03-10 Thread apachep2
If someone still think token is hard to understand, let me elaborate it
a bit. For my application, what I am doing is

1. saveToken in my load action
2. Load page, struts will automatically puts a hidden field on the page.
3. Click button
4. In my action class, I check isTokenValid
5. If invalid, I reload page with error message blah blah.
6. If valid, I proceed and resetToken.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 1:48 PM
To: [EMAIL PROTECTED]
Subject: RE: The Back button on on multi-page forms ??

You'll notice that I also pointed you to the struts-example app that
shows 
you how to use the methods you found in the javadoc.

David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: The Back button on on multi-page forms ??
>Date: Mon, 10 Mar 2003 12:39:51 -0600
>
>Khalid
>
>I will share anything I find.
>
>Have not got too much help so far.
>
>I am digging into the "tokens"
>
>Javadoc does not say much !!
>
>Ron
>
>-Original Message-
>From: Khalid K. [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 12:25 PM
>To: [EMAIL PROTECTED]
>Subject: Re: The Back button on on multi-page forms ??
>
>
>Hello Ron,
>
>We have an application that has the same problem. if you got the "back"
>button issue resloved, could you please share the code sample ??
>I checked the java doc, and it looks like "isValidToken" is in 1.1, and
not
>in 1.0.2.
>
>Thanks!
>
>Khalid
>
>- Original Message -
>From: "Ron Day" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, March 10, 2003 10:14 AM
>Subject: RE: The Back button on on multi-page forms
>
>
> > I get the picturethanks anyway.
> >
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: The Back button on on multi-page forms
> >
> >
> > See the Action class' javadoc for details.
> >
> > David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: RE: The Back button on on multi-page forms
> > >Date: Mon, 10 Mar 2003 11:54:32 -0600
> > >
> > >Thanks for the tip on tokens
> > >
> > >I'm not familiar (yet) with tokens.
> > >Are these new in 1.1 or have they always been there. I have to
use
> > >Struts 1.0.
> > >
> > >Ron
> > >
> > >-Original Message-
> > >From: David Graham [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, March 10, 2003 10:24 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: The Back button on on multi-page forms
> > >
> > >
> > >See the Action class' javadoc for the token methods and the
>struts-example
> > >app for how to use them.
> > >
> > >David
> > >
> > >
> > >
> > > >From: "Ron Day" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List" 
><[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: The Back button on  on multi-page forms
> > > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > > >
> > > >Anyone have any ideas or best practises on how to handle the use
> > >(mis-use)
> > > >of the browser back button on multi-page forms.
> > > >
> > > >My forms work fine and validate Ok, but if the back button is
used 
>the
> > > >forms
> > > >are not re-populated properly. In particular anything that was in
the
> > > >reset,
> > > >seems to be used when the form appears after the back button is
used.
> > > >
> > > >ron
> > > >
> > > >
> > > >
> > >
>-
> > > >To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > > >For additional commands, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> > >_
> > >Add photos to your messages with MSN 8. Get 2 months FREE*.
> > >http://join.msn.com/?page=features/featuredemail
> > >
> > >
> >
>-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
>-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> > _
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTE

RE: The Back button on on multi-page forms ??????

2003-03-10 Thread Ron Day
Maybe I'm dumb, but it is not apparent to me how the "token" is used to make
the back button post the correct form information.

R

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:48 PM
To: [EMAIL PROTECTED]
Subject: RE: The Back button on on multi-page forms ??


You'll notice that I also pointed you to the struts-example app that shows
you how to use the methods you found in the javadoc.

David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: The Back button on on multi-page forms ??
>Date: Mon, 10 Mar 2003 12:39:51 -0600
>
>Khalid
>
>I will share anything I find.
>
>Have not got too much help so far.
>
>I am digging into the "tokens"
>
>Javadoc does not say much !!
>
>Ron
>
>-Original Message-
>From: Khalid K. [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 12:25 PM
>To: [EMAIL PROTECTED]
>Subject: Re: The Back button on on multi-page forms ??
>
>
>Hello Ron,
>
>We have an application that has the same problem. if you got the "back"
>button issue resloved, could you please share the code sample ??
>I checked the java doc, and it looks like "isValidToken" is in 1.1, and not
>in 1.0.2.
>
>Thanks!
>
>Khalid
>
>- Original Message -
>From: "Ron Day" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, March 10, 2003 10:14 AM
>Subject: RE: The Back button on on multi-page forms
>
>
> > I get the picturethanks anyway.
> >
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: The Back button on on multi-page forms
> >
> >
> > See the Action class' javadoc for details.
> >
> > David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: RE: The Back button on on multi-page forms
> > >Date: Mon, 10 Mar 2003 11:54:32 -0600
> > >
> > >Thanks for the tip on tokens
> > >
> > >I'm not familiar (yet) with tokens.
> > >Are these new in 1.1 or have they always been there. I have to use
> > >Struts 1.0.
> > >
> > >Ron
> > >
> > >-Original Message-
> > >From: David Graham [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, March 10, 2003 10:24 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: The Back button on on multi-page forms
> > >
> > >
> > >See the Action class' javadoc for the token methods and the
>struts-example
> > >app for how to use them.
> > >
> > >David
> > >
> > >
> > >
> > > >From: "Ron Day" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: The Back button on  on multi-page forms
> > > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > > >
> > > >Anyone have any ideas or best practises on how to handle the use
> > >(mis-use)
> > > >of the browser back button on multi-page forms.
> > > >
> > > >My forms work fine and validate Ok, but if the back button is used
>the
> > > >forms
> > > >are not re-populated properly. In particular anything that was in the
> > > >reset,
> > > >seems to be used when the form appears after the back button is used.
> > > >
> > > >ron
> > > >
> > > >
> > > >
> > > >-
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >_
> > >Add photos to your messages with MSN 8. Get 2 months FREE*.
> > >http://join.msn.com/?page=features/featuredemail
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > _
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > -
> > 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: Regular Expressions

2003-03-10 Thread Dan Allen
> Not that I have seen per se.  There is a site that has some pre-built
> regexs but Im sorry I cant remember the URL.  Your best bet is to go buy
> the Oreilly book "Mastering Regular Expressions"  It is pretty much the
> bible of regex and well worth the investment.

KDE 3.1 has an awesome regular expression GUI editor, good for
people just learning how to create them.  One thing to watch out
for:

In the validator, Perl regular expressions are used.  Normally, when
you make a Perl regular expressions you have to use a delimiter,
which is typically '/'

However, in the validator definition file, you can exclude the
delimiter as the validator automatically adds it for you.  However,
this means that you must escape and instance of '/' in your regular
expression.

I have filed a bug report about this in bugzilla because the
validator should automatically escape any delimiter used in the
definition file so that this "ghost" delimiter does not have to be
accounted for.

In short, I mean

The following would be accepted:

mask
^http://[^ ]*$

instead of the current syntax

mask
^http:\/\/[^ ]*$

Since behind the scenes the regexp becomes

/^http:\/\/[^ ]*$/

I rest my case.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"I used to herd dairy cows.  Now I herd linux users.  Apart 
from the isolation, I think I preferred the cows.  They were 
better in conversation, easier to milk, and if they annoyed me 
enough, I could shoot them and eat them."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: The Back button on on multi-page forms ??????

2003-03-10 Thread apachep2
If token is invalid, nothing can be submitted.

-Original Message-
From: Ron Day [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 3:41 PM
To: Struts Users Mailing List
Subject: RE: The Back button on on multi-page forms ??

Maybe I'm dumb, but it is not apparent to me how the "token" is used to
make
the back button post the correct form information.

R

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:48 PM
To: [EMAIL PROTECTED]
Subject: RE: The Back button on on multi-page forms ??


You'll notice that I also pointed you to the struts-example app that
shows
you how to use the methods you found in the javadoc.

David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: The Back button on on multi-page forms ??
>Date: Mon, 10 Mar 2003 12:39:51 -0600
>
>Khalid
>
>I will share anything I find.
>
>Have not got too much help so far.
>
>I am digging into the "tokens"
>
>Javadoc does not say much !!
>
>Ron
>
>-Original Message-
>From: Khalid K. [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 12:25 PM
>To: [EMAIL PROTECTED]
>Subject: Re: The Back button on on multi-page forms ??
>
>
>Hello Ron,
>
>We have an application that has the same problem. if you got the "back"
>button issue resloved, could you please share the code sample ??
>I checked the java doc, and it looks like "isValidToken" is in 1.1, and
not
>in 1.0.2.
>
>Thanks!
>
>Khalid
>
>- Original Message -
>From: "Ron Day" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, March 10, 2003 10:14 AM
>Subject: RE: The Back button on on multi-page forms
>
>
> > I get the picturethanks anyway.
> >
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: The Back button on on multi-page forms
> >
> >
> > See the Action class' javadoc for details.
> >
> > David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: RE: The Back button on on multi-page forms
> > >Date: Mon, 10 Mar 2003 11:54:32 -0600
> > >
> > >Thanks for the tip on tokens
> > >
> > >I'm not familiar (yet) with tokens.
> > >Are these new in 1.1 or have they always been there. I have to
use
> > >Struts 1.0.
> > >
> > >Ron
> > >
> > >-Original Message-
> > >From: David Graham [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, March 10, 2003 10:24 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: The Back button on on multi-page forms
> > >
> > >
> > >See the Action class' javadoc for the token methods and the
>struts-example
> > >app for how to use them.
> > >
> > >David
> > >
> > >
> > >
> > > >From: "Ron Day" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: The Back button on  on multi-page forms
> > > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > > >
> > > >Anyone have any ideas or best practises on how to handle the use
> > >(mis-use)
> > > >of the browser back button on multi-page forms.
> > > >
> > > >My forms work fine and validate Ok, but if the back button is
used
>the
> > > >forms
> > > >are not re-populated properly. In particular anything that was in
the
> > > >reset,
> > > >seems to be used when the form appears after the back button is
used.
> > > >
> > > >ron
> > > >
> > > >
> > > >
> > >
>-
> > > >To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > > >For additional commands, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> > >_
> > >Add photos to your messages with MSN 8. Get 2 months FREE*.
> > >http://join.msn.com/?page=features/featuredemail
> > >
> > >
> >
>-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
>-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> > _
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 

RE: Sort a collection in alphabetic order

2003-03-10 Thread David Haynes
Since you are in a while(rs.next()) context, why not sort on insertion?
Just pop your results into a Vector (or other collection) in sort-order.
Depending upon the number of elements expected, you could speed the
insertion using a number of methods. If your lists are relatively small,
it may be efficient to just start at the beginning of the vector and
walk through it looking for the insertion point.

-david-

-Original Message-
From: Søren Blidorf [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 1:25 PM
To: 'Struts Users Mailing List'
Subject: SV: Sort a collection in alphabetic order

It is not possible.

The select is in a while (rs.next()) {} depending on another value. (Not
easy to explain!!)

I am a ware of normal SQL order by

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 10. marts 2003 19:20
Til: Struts Users Mailing List
Emne: Re: Sort a collection in alphabetic order

On Mon, 2003-03-10 at 13:16, Søren Blidorf wrote:
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname. Can anybody help me?

Most algorithm books will give you more information than you want on
sorting.

Why not just do it in the query and let the db do it?

Dave



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



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




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



RE: Sort a collection in alphabetic order

2003-03-10 Thread apachep2
Comparable is always a good idea. But I am curious to know why you are
unable to do a re-SELECT statement?

-Original Message-
From: David Haynes [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 3:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Sort a collection in alphabetic order

Since you are in a while(rs.next()) context, why not sort on insertion?
Just pop your results into a Vector (or other collection) in sort-order.
Depending upon the number of elements expected, you could speed the
insertion using a number of methods. If your lists are relatively small,
it may be efficient to just start at the beginning of the vector and
walk through it looking for the insertion point.

-david-

-Original Message-
From: Søren Blidorf [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 1:25 PM
To: 'Struts Users Mailing List'
Subject: SV: Sort a collection in alphabetic order

It is not possible.

The select is in a while (rs.next()) {} depending on another value. (Not
easy to explain!!)

I am a ware of normal SQL order by

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 10. marts 2003 19:20
Til: Struts Users Mailing List
Emne: Re: Sort a collection in alphabetic order

On Mon, 2003-03-10 at 13:16, Søren Blidorf wrote:
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname. Can anybody help me?

Most algorithm books will give you more information than you want on
sorting.

Why not just do it in the query and let the db do it?

Dave



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



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




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



when will the reset method be called

2003-03-10 Thread Rajesh . Jayabalan
Hi,

 When does the reset method of the formbean get called. and why?? It is getting
called automatically before coming into my action (second time) how do I stop
calling reset.?

Regards
Rajesh J





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



RE: Sort a collection in alphabetic order

2003-03-10 Thread David Haynes
Although I don't know anything about Soren's specific problem, I have
had times where the database is protected by a bean and the process of
having a new data access method on the bean is simply too complex to be
believed (i.e. you have about a gazillion review processes to go
through). In these cases, I have found it sometimes useful to take the
data as it comes and massage it locally.

-david-

-Original Message-
From: apachep2 [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 3:54 PM
To: 'Struts Users Mailing List'
Subject: RE: Sort a collection in alphabetic order

Comparable is always a good idea. But I am curious to know why you are
unable to do a re-SELECT statement?

-Original Message-
From: David Haynes [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 3:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Sort a collection in alphabetic order

Since you are in a while(rs.next()) context, why not sort on insertion?
Just pop your results into a Vector (or other collection) in sort-order.
Depending upon the number of elements expected, you could speed the
insertion using a number of methods. If your lists are relatively small,
it may be efficient to just start at the beginning of the vector and
walk through it looking for the insertion point.

-david-

-Original Message-
From: Søren Blidorf [mailto:[EMAIL PROTECTED] 
Sent: March 10, 2003 1:25 PM
To: 'Struts Users Mailing List'
Subject: SV: Sort a collection in alphabetic order

It is not possible.

The select is in a while (rs.next()) {} depending on another value. (Not
easy to explain!!)

I am a ware of normal SQL order by

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 10. marts 2003 19:20
Til: Struts Users Mailing List
Emne: Re: Sort a collection in alphabetic order

On Mon, 2003-03-10 at 13:16, Søren Blidorf wrote:
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname. Can anybody help me?

Most algorithm books will give you more information than you want on
sorting.

Why not just do it in the query and let the db do it?

Dave



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



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




-
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: The Back button on on multi-page forms ??????

2003-03-10 Thread David Graham
Pressing the back button does not contact the server and thus cannot post 
any information.  When the user submits the form again, their token will be 
invalid and your action will prevent a duplicate post.

David



From: "Ron Day" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: The Back button on on multi-page forms ??
Date: Mon, 10 Mar 2003 14:40:43 -0600
Maybe I'm dumb, but it is not apparent to me how the "token" is used to 
make
the back button post the correct form information.

R

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:48 PM
To: [EMAIL PROTECTED]
Subject: RE: The Back button on on multi-page forms ??
You'll notice that I also pointed you to the struts-example app that shows
you how to use the methods you found in the javadoc.
David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: The Back button on on multi-page forms ??
>Date: Mon, 10 Mar 2003 12:39:51 -0600
>
>Khalid
>
>I will share anything I find.
>
>Have not got too much help so far.
>
>I am digging into the "tokens"
>
>Javadoc does not say much !!
>
>Ron
>
>-Original Message-
>From: Khalid K. [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 12:25 PM
>To: [EMAIL PROTECTED]
>Subject: Re: The Back button on on multi-page forms ??
>
>
>Hello Ron,
>
>We have an application that has the same problem. if you got the "back"
>button issue resloved, could you please share the code sample ??
>I checked the java doc, and it looks like "isValidToken" is in 1.1, and 
not
>in 1.0.2.
>
>Thanks!
>
>Khalid
>
>- Original Message -
>From: "Ron Day" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, March 10, 2003 10:14 AM
>Subject: RE: The Back button on on multi-page forms
>
>
> > I get the picturethanks anyway.
> >
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: The Back button on on multi-page forms
> >
> >
> > See the Action class' javadoc for details.
> >
> > David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: RE: The Back button on on multi-page forms
> > >Date: Mon, 10 Mar 2003 11:54:32 -0600
> > >
> > >Thanks for the tip on tokens
> > >
> > >I'm not familiar (yet) with tokens.
> > >Are these new in 1.1 or have they always been there. I have to 
use
> > >Struts 1.0.
> > >
> > >Ron
> > >
> > >-Original Message-
> > >From: David Graham [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, March 10, 2003 10:24 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: The Back button on on multi-page forms
> > >
> > >
> > >See the Action class' javadoc for the token methods and the
>struts-example
> > >app for how to use them.
> > >
> > >David
> > >
> > >
> > >
> > > >From: "Ron Day" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: The Back button on  on multi-page forms
> > > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > > >
> > > >Anyone have any ideas or best practises on how to handle the use
> > >(mis-use)
> > > >of the browser back button on multi-page forms.
> > > >
> > > >My forms work fine and validate Ok, but if the back button is used
>the
> > > >forms
> > > >are not re-populated properly. In particular anything that was in 
the
> > > >reset,
> > > >seems to be used when the form appears after the back button is 
used.
> > > >
> > > >ron
> > > >
> > > >
> > > >
> > > 
>-
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: 
[EMAIL PROTECTED]
> > >
> > >
> > >_
> > >Add photos to your messages with MSN 8. Get 2 months FREE*.
> > >http://join.msn.com/?page=features/featuredemail
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > _
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additi

ActionServlet Action caching problem

2003-03-10 Thread Whitmire, Jeffrey
I've got a weird one.  I'm hoping that somebody else has encountered this
before and can help.  We are in the midst of load testing our app before
rolling it out to production.  I have one action class (only one) that
starts failing well over an hour into the test.

It appears that the instance of that action class cached by the
ActionServlet becomes invalid.  I can see no reason why the change in
behaviour, but at some point the RequestProcessor gets an instance to the
Action that is no longer valid.  It is not null, but it never executes it.
The rest of the app works perfectly, but that button (tied to that specific
Action) never works again until the tomcat instance is restarted.  It just
hangs, and the last indication in the log is the RequestProcessor finding
and returning an instance of that action class.

Has anyone ever had problems with Action instances going stale?  or some
other config problem that could cause this?

Thanks, I'm a bit desparate,
Jeff.

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



RE: The Back button on on multi-page forms ??????

2003-03-10 Thread Ron Day
I'm not sure I am explaining my problem correctly.

1) a Jsp page displays a form with text boxes, radio and checkboxes.
2) Form is filled out and submitted.
3) if validated, the next part of the form is dispayed with a second jsp
page.
4) But, User hits the browser back button
5) First form is re-diplayed, but the form fields have not been populated
correctly, and sometimes my validation errors appear on the newly displayed
form, even though it was submitted correctly the first time.

What I am asking is:

1) can someone explain what the back button is doing?
2) can I fix this in Struts, so that the the values that were submitted are
now present when the form is re-posted.

I realize that this is a browser issue, but I was hopiing to get a fix for
it somehow.

Tokens have been mentioned, and I have looked at the struts example and the
many posts in the archives.

I still do not see my way through this.

If I am being dumb, don't be afraid to tell me.
It won't be the first or the last time !!!

Ron

-Original Message-
From: apachep2 [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: The Back button on on multi-page forms ??


If token is invalid, nothing can be submitted.

-Original Message-
From: Ron Day [mailto:[EMAIL PROTECTED]
Sent: March 10, 2003 3:41 PM
To: Struts Users Mailing List
Subject: RE: The Back button on on multi-page forms ??

Maybe I'm dumb, but it is not apparent to me how the "token" is used to
make
the back button post the correct form information.

R

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 12:48 PM
To: [EMAIL PROTECTED]
Subject: RE: The Back button on on multi-page forms ??


You'll notice that I also pointed you to the struts-example app that
shows
you how to use the methods you found in the javadoc.

David



>From: "Ron Day" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: The Back button on on multi-page forms ??
>Date: Mon, 10 Mar 2003 12:39:51 -0600
>
>Khalid
>
>I will share anything I find.
>
>Have not got too much help so far.
>
>I am digging into the "tokens"
>
>Javadoc does not say much !!
>
>Ron
>
>-Original Message-
>From: Khalid K. [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 12:25 PM
>To: [EMAIL PROTECTED]
>Subject: Re: The Back button on on multi-page forms ??
>
>
>Hello Ron,
>
>We have an application that has the same problem. if you got the "back"
>button issue resloved, could you please share the code sample ??
>I checked the java doc, and it looks like "isValidToken" is in 1.1, and
not
>in 1.0.2.
>
>Thanks!
>
>Khalid
>
>- Original Message -
>From: "Ron Day" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, March 10, 2003 10:14 AM
>Subject: RE: The Back button on on multi-page forms
>
>
> > I get the picturethanks anyway.
> >
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: The Back button on on multi-page forms
> >
> >
> > See the Action class' javadoc for details.
> >
> > David
> >
> >
> >
> > >From: "Ron Day" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: RE: The Back button on on multi-page forms
> > >Date: Mon, 10 Mar 2003 11:54:32 -0600
> > >
> > >Thanks for the tip on tokens
> > >
> > >I'm not familiar (yet) with tokens.
> > >Are these new in 1.1 or have they always been there. I have to
use
> > >Struts 1.0.
> > >
> > >Ron
> > >
> > >-Original Message-
> > >From: David Graham [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, March 10, 2003 10:24 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: The Back button on on multi-page forms
> > >
> > >
> > >See the Action class' javadoc for the token methods and the
>struts-example
> > >app for how to use them.
> > >
> > >David
> > >
> > >
> > >
> > > >From: "Ron Day" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: The Back button on  on multi-page forms
> > > >Date: Mon, 10 Mar 2003 10:05:16 -0600
> > > >
> > > >Anyone have any ideas or best practises on how to handle the use
> > >(mis-use)
> > > >of the browser back button on multi-page forms.
> > > >
> > > >My forms work fine and validate Ok, but if the back button is
used
>the
> > > >forms
> > > >are not re-populated properly. In particular anything that was in
the
> > > >reset,
> > > >seems to be used when the form appears after the back button is
used.
> > > >
> > > >ron
> > > >
> > > >
> > > >
> > >
>-
> > > >To unsubscribe, e-mail:
[EMA

  1   2   >