Re: Struts Menu Vs Struts Layout

2005-12-18 Thread Yves Sy
Another option would be SiteMesh.

If you like working on the fringes of technology though, I recommend AJAX or
OpenLaszlo...

Br,
-Yves-

On 12/18/05, Agnisys <[EMAIL PROTECTED]> wrote:
>
> Hi,
>   I need to create an application with lots of Dynamic GUI features (like
> dynamic number of
> Panes). Which one is more suitable for the job: Struts Menu or Struts
> Layout?
>   Or is there a more appropriate 3rd option?
>
> Thanks for any pointers.
> Anupam.
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
A bus station is where a bus stops. A train station is where a train stops.
On my desk I have a work station...


Re: OT: Tool for detecting unclosed resources

2005-03-03 Thread Yves Sy
http://findbugs.sourceforge.net in case anyone's interested...


On Thu, 3 Mar 2005 15:44:11 +0800, Yves Sy <[EMAIL PROTECTED]> wrote:
> Anybody know a tool for scanning unclosed JDBC resources? I've done a
> simple logging facility in my app to keep track of connections in the
> pool at runtime but I'm just wondering if there's a less eye-straining
> way to do it.. something like a code analyzer of some sort...
> 
> Br,
> -Yves-
> 
> --
> A bus station is where a bus stops. A train station is where a train
> stops. On my desk I have a work station...
> 


-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



OT: Tool for detecting unclosed resources

2005-03-02 Thread Yves Sy
Anybody know a tool for scanning unclosed JDBC resources? I've done a
simple logging facility in my app to keep track of connections in the
pool at runtime but I'm just wondering if there's a less eye-straining
way to do it.. something like a code analyzer of some sort...

Br,
-Yves-

-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



Error messages in logs

2005-01-23 Thread Yves Sy
Hi,

We've been getting these error messages lately in the logs of our
application which is running on BEA WLS 6.1. The application is OK and
there's no problem but we're getting these in the logs from time to
time:

eshrap01-m eshrap01-m   
   <>
<> <101020> <[WebAppServletContext(705159,iip,/iip)] Servlet failed
with Exception> . 01/23/2005 19:26:14

eshrap01-m eshrap01-m   
   <>
<> <101019> <[WebAppServletContext(8363376,iip,/iip)] Servlet failed
with IOException> . 01/23/2005 17:17:07

Anybody encountered these before?

Regards,
-Yves-


-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



Re: test

2004-12-15 Thread Yves Sy
I can send you an invite if you want one. Just email me privately.

-Yves-


On Tue, 14 Dec 2004 22:23:53 -0600, Eddie Bush <[EMAIL PROTECTED]> wrote:
> Any word on when they might open that to GA?  I'm curious to get a peek at
> it ...
> 
> Eddie
> 
> - Original Message -
> From: "James Mitchell" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, December 14, 2004 1:30 PM
> Subject: Re: test
> 
> > If you want a gmail account, I've got one for you.  I know that one works
> > just fine for these lists.
> >
> >
> >
> > --
> > James Mitchell
> > Software Engineer / Open Source Evangelist
> > EdgeTech, Inc.
> > 678.910.8017
> > AIM: jmitchtx
> >
> > - Original Message -
> > From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 14, 2004 8:58 AM
> > Subject: Re: test
> >
> >
> >> No.  The problem is that my webmail client, which is all I can use at
> >> work to access mailing lists, has a bug which causes messages to not get
> >> through to the lists.  My web host has been working on it for some time
> >> and so the only way to see if they've fixed it or not is to send a
> >> message.
> >>
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >> Guillaume Cottenceau wrote:
> >>> "Frank W. Zammetti (MLists)"  writes:
> >>>
> >>>
> Please ignore me.  Just seeing if my web host fixed the webmail problem
> I've been having.  Thanks!
> >>>
> >>>
> >>> No offense, but is it not possible to test that from one email of
> >>> yours to another one?
> >>>
> >>
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---
> avast! Antivirus: Outbound message clean.
> Virus Database (VPS): 0451-1, 12/14/2004
> Tested on: 12/14/2004 10:23:54 PM
> avast! - copyright (c) 2000-2004 ALWIL Software.
> http://www.avast.com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



Re: getting value of object in a collection via tag

2004-12-07 Thread Yves Sy
I believe that wont work. Seems like you have two choices:

1. Extract the first element in your action and place it in request
scope so you can use a simple  in your jsp;
2. use  and set the "length" attribute to 1:


 


I prefer the 1st option.

Regards,
-Yves-


On Tue, 7 Dec 2004 09:14:41 -, Marco Mistroni
<[EMAIL PROTECTED]> wrote:
> Hello ,
> Thanx for the reply...
> I was actually wondering if following expression will work also
> 
>   ?
> 
> assumed that my bean has a method called getVector which returns a
> Collection..
> 
> actually I am not sure if it will work if I use a Collection instead of
> a Vector...
> 
> regards
> 
> marco
> 
> 
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: 06 December 2004 17:58
> To: Struts Users Mailing List
> Subject: RE: getting value of object in a collection via tag
> 
> I believe:
> 
> will work.
> 
> > -Original Message-
> > From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 06, 2004 10:54 AM
> > To: 'Struts Users Mailing List'
> > Subject: getting value of object in a collection via tag
> >
> >
> > Hi all,
> >   'silly' question...but if I have an ActionForm
> > which has a Property of type Vector, how can I say
> > 'print property x' of the first element?
> >
> > Thanx and regards
> >   marco
> >
> >
> > -
> > 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]
> 
> 


-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



Re: [OT]Threads and Servlets Question

2004-12-06 Thread Yves Sy
I would think that, reading from all the responses in this thread,
creating multiple threads inside a servlet container is NOT a bad
thing as long as the developer takes care of business properly -- in
the same way that C++ developers take care to clean up to prevent
memory leaks.

Regards,
-Yves-


On Mon, 06 Dec 2004 22:12:35 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> Interesting answer Craig...
> 
> I'm sure we've all heard the admonishment that we should not spawn
> threads inside a servlet container, the container should be "handling
> all threading issues".  In fact, I think I even remember something about
> it in the spec, or at least being told there was something about it in
> the spec :)
> 
> I've always felt that "rule" was a bit ambiguous, to say the least...
> 
> I agree that the solution outlined here is the typical pattern, but if
> for no other reason than to foster debate on a potentially interesting
> point, why isn't this contrary to that usual bit of advice about threading?
> 
> The same question arises with daemon threads.  For instance I have one
> app that does some periodic processing, and for various reasons it made
> the most sense for it to be tied to the app instance.  So, when the app
> starts up, I spawn a couple of daemon threads, set them to low priority,
> and they do their thing every few hours.  I've been told this is also a
> Bad Thing(tm) within a servlet container, but I've always felt it really
> wasn't.  Certainly I've observed no ill effects to do such a thing.
> 
> What I'm really getting to here, and I suspect it would be for the
> benefit of a great many people reading this, is the simple question,
> what is actually OK to do with threads in a servlet container and what
> isn't?  Perhaps more importantly, what is the reasoning behind the
> answers?  Any thoughts? (not necessarily just from Craig :) )
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> 
> 
> Craig McClanahan wrote:
> > You're using the typical pattern for this use case (although it's also
> > feasible you could use something like JMS to accomplish the
> > asynchronicity).  The most important thing to do, though, is to ensure
> > that you eventually kill the thread no matter what actually happens,
> > so that you don't have something needlessly consuming resources for
> > the remainder of the lifetime of your server instance.
> >
> > Craig
> >
> >
> >
> > On Tue, 7 Dec 2004 10:50:06 +0800, Yves Sy <[EMAIL PROTECTED]> wrote:
> >
> >>Here's a follow-up question:
> >>
> >>I remember creating a thread in one of my Action classes because I
> >>needed to show a "Wait while your request is being processed..." page.
> >>
> >>The flow goes something like:
> >>1. the MAIN thread returns an ActionForward right away that
> >>contains the "processing" page;
> >>2. the NEW thread I created goes ahead and makes the back-end call
> >>that takes a considerable amount of time to process;
> >>3. After NEW thread returns with the results, it sets a flag in
> >>the session that it's done with the processing;
> >>4. Meanwhile, the processing page keeps refreshing itself and
> >>sending execution to an action which checks for the session flag set
> >>in #3;
> >> 5. When it finally finds the session flag, it forwards to the results 
> >> page.
> >>
> >>Its working fine for me. No weird behavior on Weblogic or SAP WAS.
> >>Although now I'm curious: Is there a better way to approach this
> >>problem?
> >>
> >>Regards,
> >>-Yves-
> >>
> >>On Mon, 6 Dec 2004 15:03:09 -0600, [EMAIL PROTECTED]
> >>
> >>
> >><[EMAIL PROTECTED]> wrote:
> >>
> >>>
> >>>As has been noted by others, JMS would be the better solution for an
> >>>asynchronous 'process'.
> >>>
> >>>But, if you have to use threads then it is probably a better approach to
> >>>create a thread pool at appliction initialization and have the actions use
> >>>those threads via a common synchronized data structure (hidden behind an
> >>>interface).
> >>>
> >>>Ensure that you have a good unique context for correlating the request and
> >>>response (not to be confused with the http req/resp)
> >>>
> >>>dependi

Re: [OT]Threads and Servlets Question

2004-12-06 Thread Yves Sy
Here's a follow-up question:

I remember creating a thread in one of my Action classes because I
needed to show a "Wait while your request is being processed..." page.

The flow goes something like:
1. the MAIN thread returns an ActionForward right away that
contains the "processing" page;
2. the NEW thread I created goes ahead and makes the back-end call
that takes a considerable amount of time to process;
3. After NEW thread returns with the results, it sets a flag in
the session that it's done with the processing;
4. Meanwhile, the processing page keeps refreshing itself and
sending execution to an action which checks for the session flag set
in #3;
 5. When it finally finds the session flag, it forwards to the results page.

Its working fine for me. No weird behavior on Weblogic or SAP WAS.
Although now I'm curious: Is there a better way to approach this
problem?

Regards,
-Yves-


On Mon, 6 Dec 2004 15:03:09 -0600, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> 
> 
> As has been noted by others, JMS would be the better solution for an
> asynchronous 'process'.
> 
> But, if you have to use threads then it is probably a better approach to
> create a thread pool at appliction initialization and have the actions use
> those threads via a common synchronized data structure (hidden behind an
> interface).
> 
> Ensure that you have a good unique context for correlating the request and
> response (not to be confused with the http req/resp)
> 
> depending upon the volume of traffic you should be able to get away with a
> small number of threads. The actual count can be controlled via an extenal
> property.
> 
> good luck.
> 
> JC
> 
>   "Jim Barrows"
>   <[EMAIL PROTECTED]To:   "Struts Users 
> Mailing List" <[EMAIL PROTECTED]>,
>   m>[EMAIL PROTECTED]
>cc:
>   12/06/2004 02:52 Subject:  RE: [OT]Threads and 
> Servlets Question
> 
> 
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
> 
> > -Original Message-
> > From: bryan [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 06, 2004 1:15 PM
> > To: Struts Users Mailing List
> > Subject: Re: [OT]Threads and Servlets Question
> >
> >
> > threads are also a finite resource  ( particularly on Linux ).
> >
> > --b
> >
> >
> > On Mon, 6 Dec 2004 21:13:57 +0100, bryan <[EMAIL PROTECTED]> wrote:
> > > because you should use a message driven bean to do
> > something like that.
> > >
> > > --b
> 
> If the brass monkeys upstairs would let me, I would.  However, they won't,
> and I've used up all of my "oops I did it anyway" cards for a while.  So,
> while helpful, doesn't really answer my question.
> 
> As for a finite resource.. as someone else said so is memory, disk
> space, CPU, etc etc.  As for being on linux I've done some pretty nasty
> multi-threading, in java, on linux and haven't hit that ceiling yet...
> ymmmv.
> 
> > >
> > >
> > >
> > >
> > > On Mon, 6 Dec 2004 11:48:15 -0700, Jim Barrows
> > <[EMAIL PROTECTED]> wrote:
> > > > Okay... I know I've read this somewhere, but can't remember.
> > > > Why is it recommended you NOT start a thread inside a
> > servlet, which would translate to "Why is it a bad idea to
> > start a thread inside an action?".
> > > > And, can you point me at some documentation?
> > > >
> > > >
> > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > http://www.revoltingdigits.com
> > > https://jestate.dev.java.net
> > >
> >
> >
> > --
> > http://www.revoltingdigits.com
> > https://jestate.dev.java.net
> >
> > -
> > 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 information contained in this communication is confidential, private, 
> proprietary, or otherwise privileged and is intended only for the use of the 
> addressee.  Unauthorized use, disclosure, distribution or copying is strictly 
> prohibited and may be unlawful.  If you have received this communication in 
> error, please notify the sender immediately at (312)653-6000 in Illinois; 
> (972)766-6900 in Texas; or (800)835-8699 in New Mexico.
> **
> ==
> 
> 
> 
> 
> -
> T

Re: logging servlet to CATALINA.out

2004-12-05 Thread Yves Sy
Hi Jim,

getDebug() was deprecated in 1.1 and totally removed in 1.2. You
should use struts 1.1 jars if you still wish to use your existing
code.

-Yves-


On Mon, 06 Dec 2004 03:21:25 +, Jim Douglas <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
>   I am trying to log servlet messages but can't get this code to compile,
> 
> package app.web;
> import java.io.*;
> import java.io.IOException;
> import java.util.Hashtable;
> import java.util.Locale;
> import javax.servlet.*;
> import javax.servlet.RequestDispatcher;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionError;
> import org.apache.struts.action.ActionErrors;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionServlet;
> import org.apache.struts.util.MessageResources;
> 
> public final class LogonAction extends Action {
> 
> public ActionForward perform(ActionMapping mapping,
>  ActionForm form,
>  HttpServletRequest request,
>  HttpServletResponse response)
>   throws IOException, ServletException {
> 
>   String username = ((LogonForm) form).getUsername();
>   String password = ((LogonForm) form).getPassword();
> 
>   HttpSession session = request.getSession();
>   session.setAttribute(Constants.USER_KEY, form);
> 
>   if (servlet.getDebug() >= 1)
>   servlet.log("LogonAction: User '" + username +
>   "' logged on in session " + session.getId());
> 
>   // Forward control to the success URI specified in struts-config.xml
>   return (mapping.findForward("success"));
> }
> }
> 
> This is the line I use to compile,
> javac -verbose -classpath
> $CATALINA_HOME/common/lib/servlet-api.jar:classes:.  LogonAction.java -d
> $CATALINA_HOME/webapps/Ey/WEB-INF/classes
> 
> I also tried,
> javac -verbose -classpath opt/struts/lib/struts.jar:classes:.
> LogonAction.java -d $CATALINA_HOME/webapps/Ey/WEB-INF/classes
> 
> The error is,
> LogonAction.java:67: cannot find symbol
> symbol : method getDebug()
> location: class org.apache.struts.action.ActionServlet
>   If (servlet.getDebug () <=1)
> 
> I even tried unzipping the struts.jar file in the directory I am compiling
> from.
> 
> I am at wits end and really appreciate your help..
> 
> Thank you greatly,
> Jim
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



Re: validation question

2004-10-18 Thread Yves Sy
Hi,

Struts doesn't have anything like that.

IMHO, I also think that using validator on the login page is not good
practice as it would give malicious users a good idea on how your app
handles authentication.

Usually, you'd just return a generic error message such as
"Username/password invalid" whenever login fails (or in your case, the
user directly types /login.do in the browser). Try not to give out any
information as much as possible.

Regards,
-Yves-


On Mon, 18 Oct 2004 17:32:31 +0800, Justy Wong <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have a http://localhost:8080/login.do action and I want to do validation for the 
> form when user submit their username & password.
> 
> here is my setting in validation.xml:
> 
> 
> 
> 
> 
> 
> 
> 
> mask
> ^[0-9a-zA-Z]*$
> 
> 
> 
> 
> The validation works fine however, when I just type the 
> http://localhost:8080/login.do in my browser (no submit), the validation error will 
> show up at once.
> I understand that it's just like I submit a form to login.do action without any 
> parameter.
> My question is, do struts provide any simple method to avoid this and just show no 
> error message? Thanks a lot!!!
> 
> Justy
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: iterate paging

2004-10-08 Thread Yves Sy
I like using pager taglibrary myself...

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

... although display tag is also cool if you need the sorting and
exporting stuff.

-Yves-


On Fri, 08 Oct 2004 13:05:58 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> Or you could do it yourself with JSTL:
> 
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean" %>
> <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> 
> 
>Paging Example
> 
> 
> class="com.oreilly.strutsckbk.ch04.PagedData"/>
>
>
>
>
>
>  
>Prev
>  
>
> 
>
>  
>Next
>  
>
>
>  
>First Name
>Last Name
>Term of Office
>  
> begin="${pageBegin}" end="${pageEnd}">
>
>  
>
>  
>  
>
>  
>  
>
>  
>
>  
>
> 
> 
> 
> 
> 
> 
> Peng Tuck Kwok wrote:
> 
> > Or you coud use displaytag.
> >
> > http://displaytag.sf.net
> >
> > It's pretty ok from what I can see.
> >
> >
> >
> > On Fri, 8 Oct 2004 14:32:58 +0530, Viral_Thakkar
> > <[EMAIL PROTECTED]> wrote:
> >
> >>Use ValueListHandler design pattern ..
> >>
> >>-Original Message-
> >>From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, October 08, 2004 1:21 PM
> >>To: 'Struts Users Mailing List'
> >>Subject: iterate paging
> >>
> >>hi
> >>
> >>anyone has codes on how to display paging?
> >>i.e. display 10 rows per page with 'next' / 'back' functions.
> >>
> >>Thanks
> >>
> >>sebastian
> >>
> >>-
> >>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]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Properties of Nested Beans

2004-10-08 Thread Yves Sy
Try keyboardmonkey.com

It has good stuff on nested tags which is what probably need.

-Yves-

On Fri, 08 Oct 2004 11:39:27 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> There is no such restriction -- please provide some code so we can help
> diagnose your problem.
> 
> -Bill Siggelkow
> 
> 
> 
> Chris Stavrianou wrote:
> > HI all,
> >
> > I am having a problem with collections of beans nested within beans.
> >
> > I have found that I can only nested beans and get property names if
> > the property names are unique across the entire application.
> >
> > Is this a usual quirk of the way Struts uses reflection?
> >
> > Are there restrictions on reusing names through form beans and other
> > beans across the scope of a web-application?
> >
> > Thanks
> >
> > C.S.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: findForward nto going to correct place

2004-09-28 Thread Yves Sy
Hi,

validate=true forces Struts to call the validate method in the
ActionForm (or DynaValidatorForm) you wrote when your form is
submitted. Make sure what you put there are simple input validation
NOT business logic.

You set validate=false when you dont want the validate method to be called.

Regards,
-Yves-

On Tue, 28 Sep 2004 13:47:07 -0400, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote:
> Hi Yves, I found out what the problem is.  There was an error in my page
> where it lists this other path/file.  I was intrigued by your statement
> about the validate=true.  So, I  started out with a much simpler page to
> experiment with your statement.  In that situation I made some simple
> pahes to jump to and they worked, so that problem is solved.
> 
> So, I have to ask, should I do validate=true or false?  What are the
> differences between the two?  I was starting out with a basic
> application based on "Jakarta Struts for Dummies" and when they showed
> the struts-config.xml file, validate-true, but they still coded the
> MemberAction with the code I described.
> 
> Anyway, I am going to do some more tests about the validation.
> 
> Thanks for the help.
> 
> Tom
> 
> Yves Sy wrote:
> 
> > Hi Tom,
> 
> 
> >
> > Now you've got this all mixed up. You dont need to call:
> >
> > ActionErrors errors = ((MemberNewForm)form).validate(mapping,request);
> >
> > ..in your Action class anymore because Struts will automatically call
> > validate for you when you submit your form and you specify
> > validate=true in your struts-config (which you did). If there is an
> > error in validation, struts will take you back to the page you specify
> > in the "input" attribute.
> >
> > HTH,
> > -Yves-
> >
> >
> > On Mon, 27 Sep 2004 11:54:19 -0400, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote:
> >
> >> > So i dont really understand what you mean when you say that it comes
> >> > back to MemberAction and you explicitly call
> >> > mapping.findForward("failure"). You're not supposed to call
> >> > ActionForm.validate() from your Action class if that's what you did.
> >>
> >>There is a "validate" method in the MemberNewForm.  This code validates
> >>some of the data from the form, so if a field is not filled in or has an
> >>incorrect length, etc.  We return a list of errors to the MemberAction.
> >>This is some of the code in the MemberNewForm to validate the data from
> >>the form.  Is it not right to do this?
> >>
> >>public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> >>request){
> >>ActionErrors errors = new ActionErrors();
> >>if((username == null) || (username.length() < 1))
> >>{
> >>errors.add("username", new ActionError("error.username.required"));
> >>}
> >>
> >>And here is what I have in my action form.  I call the "validate" method
> >> in the formbean above from the MemberAction.
> >>
> >>ActionErrors errors = ((MemberNewForm)form).validate(mapping,request);
> >>if(errors.isEmpty())
> >>{
> >>// if there are no errors  then do whatever ...
> >>}
> >>else
> >>{
> >>// if there are errors, put them in the request header
> >>saveErrors(request, errors);
> >>// if errors return to the 'failure' which is the same page as the form
> >>return (mapping.findForward("failure"));
> >>}
> >>
> >>I didn't know there should be a validate method, in the MemberAction.  I
> >>haven't seen any samples of that, but that just means I haven't see
> >>that.  I may not be looking hard enough.
> >>
> >>So, since I am manually calling "failure" by doing:
> >>return (mapping.findForward("failure"));
> >>And since this is mapped to a particular path/file, then I should be
> >>going to that page and not re-directed elsewhere.
> >>
> >>Thanks.
> >>
> >>  Tom
> >>
> >>Yves Sy wrote
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>
> >>>
> >>>>Actually both, in my code when the validate is false, then it comes back
> >>>>to the MemberAction controller and I do explicitity call:
> >>>>return mapping.findForward("failure");
> >>>
> >>>
> >>>According to the act

Re: findForward nto going to correct place

2004-09-27 Thread Yves Sy
Hi Tom,

Now you've got this all mixed up. You dont need to call:

ActionErrors errors = ((MemberNewForm)form).validate(mapping,request);

..in your Action class anymore because Struts will automatically call
validate for you when you submit your form and you specify
validate=true in your struts-config (which you did). If there is an
error in validation, struts will take you back to the page you specify
in the "input" attribute.

HTH,
-Yves-


On Mon, 27 Sep 2004 11:54:19 -0400, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote:
>  > So i dont really understand what you mean when you say that it comes
>  > back to MemberAction and you explicitly call
>  > mapping.findForward("failure"). You're not supposed to call
>  > ActionForm.validate() from your Action class if that's what you did.
> 
> There is a "validate" method in the MemberNewForm.  This code validates
> some of the data from the form, so if a field is not filled in or has an
> incorrect length, etc.  We return a list of errors to the MemberAction.
> This is some of the code in the MemberNewForm to validate the data from
> the form.  Is it not right to do this?
> 
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request){
> ActionErrors errors = new ActionErrors();
> if((username == null) || (username.length() < 1))
> {
> errors.add("username", new ActionError("error.username.required"));
> }
> 
> And here is what I have in my action form.  I call the "validate" method
>  in the formbean above from the MemberAction.
> 
> ActionErrors errors = ((MemberNewForm)form).validate(mapping,request);
> if(errors.isEmpty())
> {
> // if there are no errors  then do whatever ...
> }
> else
> {
> // if there are errors, put them in the request header
> saveErrors(request, errors);
> // if errors return to the 'failure' which is the same page as the form
> return (mapping.findForward("failure"));
> }
> 
> I didn't know there should be a validate method, in the MemberAction.  I
> haven't seen any samples of that, but that just means I haven't see
> that.  I may not be looking hard enough.
> 
> So, since I am manually calling "failure" by doing:
> return (mapping.findForward("failure"));
> And since this is mapped to a particular path/file, then I should be
> going to that page and not re-directed elsewhere.
> 
> Thanks.
> 
>   Tom
> 
> Yves Sy wrote
> 
> 
> > Hi,
> >
> >
> >>Actually both, in my code when the validate is false, then it comes back
> >>to the MemberAction controller and I do explicitity call:
> >>return mapping.findForward("failure");
> >
> >
> > According to the actionmapping you provided, validate = true. So this
> > means that struts will call validate() automatically for you and
> > return you to whatever page you specify in "input" if you have errors
> > in your validation.
> >
> > So i dont really understand what you mean when you say that it comes
> > back to MemberAction and you explicitly call
> > mapping.findForward("failure"). You're not supposed to call
> > ActionForm.validate() from your Action class if that's what you did.
> >
> > HTH,
> > -Yves-
> >
> > On Sun, 26 Sep 2004 14:45:01 -0400, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote:
> >
> >>Yves Sy wrote:
> >>
> >>>What do you mean "failure"? You explicitly return
> >>>mapping.findForward("failure")? Or do you mean when the validate
> >>>method in ActionForm fails?
> >>
> >>Actually both, in my code when the validate is false, then it comes back
> >>to the MemberAction controller and I do explicitity call:
> >>return mapping.findForward("failure");
> >>
> >>
> >>>And what's the path of the page where you're being redirected?
> >>
> >>it should be redirecting to:
> >>path="/membership/membership_ee.jsp"
> >>as defined by:
> >>
> >>
> >>This is the page where the user entered the wrong data, and I want to
> >>redirect them back to that page.
> >>
> >>Instead, I end up getting sent to another page that's:
> >>"../message_president/default.jsp"
> >>
> >>It expects this page is located in this directory, but it doesn't and I
> >>don't want to forward to here anyway.  The directory and page do exist,
> >>but elsewhere in the web-site and

Re: findForward nto going to correct place

2004-09-26 Thread Yves Sy
What do you mean "failure"? You explicitly return
mapping.findForward("failure")? Or do you mean when the validate
method in ActionForm fails?

And what's the path of the page where you're being redirected?

-Yves-

On Sat, 25 Sep 2004 13:03:58 -0400, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote:
> I've been working on this Member pages for a short time now, and it used
> to be that when the data didn't validate from the formbean, it would
> return to the correct page to allow the user to fix the data.  When the
> data is entered correctly, the data does gets filed to the database, and
>   the user is returned to the correct page saying that data has been
> filed.Here is the action mapping:
> 
>type="com.tjh.csaa.beans.MemberAction"
>   name="memberNewForm"
> scope="request"
>  input="/membership/membership_ee.jsp"
>  validate="true">
> 
> 
> 
> This hasn't changed at all, and it used to work fine.  And it still does
> work if the return is "success".  But, when I return "failure", I get
> re-directed to some other page that doesn't exist in this directory.  I
> don't know why it would start doing that all of a sudden?
> 
> Any help would be much appreciated.  Thanks!
> 
>   Tom
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: and modules

2004-09-16 Thread Yves Sy
What I usually do is place the login functionality (and all
common/general functionalities for that matter) in the default
struts-config at the root context.

Now if I have a more specific module or section in my app, i create a
sub-context so that all action mappings for that particular submodule
are on the same subcontext and struts-config file. An example is a
user management module where you CRUD users for your app.

Regards,
-Yves-


On Thu, 16 Sep 2004 10:36:21 +0100, Ricardo Gladwell
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Perhaps I'm misunderstandig the use of modules: I have a default module
> that handles basic webapp functionality (homepage forwarding, layout,
> etc) and other modules handle additional functionality such as user
> management (log in/out, registration, details modifications, etc) henc
> the need to forward actions from the default layer to the user login layer.
> 
> Is this the correct approach, or should I stick to putting it all into
> one web application?
> 
> 
> 
> Yves Sy wrote:
> > I would guess its because its not really standard practice to submit a
> > form to a handler from another module. It's kind of a weird flow if
> > you ask me. Usually you'd submit to a handler in your own module and
> > THEN forward to wherever else using SwitchAction.
> >
> > Anyway if the SwitchAction does not work, you can go the usual
> > javascript way of dynamically changing the action attribute's value...
> >
> > <% String url = response.encodeURL(request.getContextPath() +
> > "/another-module/myAction.do"); %>
> > document.myForm.action = '<%= url%>';
> > document.myFormsubmit();
> >
> > Not very elegant but it works.
> >
> > Regards,
> > -Yves-
> >
> > On Thu, 16 Sep 2004 09:30:09 +0100, Ricardo Gladwell
> > <[EMAIL PROTECTED]> wrote:
> >
> >>Hi,
> >>
> >>Thanks for that, I will try to use the switch action to forward onto the
> >>correct module actions. Just out of interest, why doesn't the html:form
> >>tag have a module attribute?
> >>
> >>Yves Sy wrote:
> >>
> >>>Try using SwitchAction
> >>>
> >>>-Regards-
> >>>Yves
> >>>
> >>>
> >>>On Wed, 15 Sep 2004 23:46:16 +0100, Ricardo Gladwell
> >>><[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>>Hi,
> >>>>
> >>>>I'm experimenting with struts modules, but I've encountered a problem
> >>>>whereby I have a struts  referencing an action in my
> >>>>non-default module. Instead of referencing the correct action, I get a
> >>>>"Cannot retrieve mapping for action" JspException.
> >>>>
> >>>>How do I reference an action in another module from a html:form? Unlike
> >>>>html:link there doesn't seem to be a "module" attribute?
> >>>>
> >>>>Kind regards...
> >>>>
> >>>>--
> >>>>Ricardo Gladwell
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: and modules

2004-09-16 Thread Yves Sy
I would guess its because its not really standard practice to submit a
form to a handler from another module. It's kind of a weird flow if
you ask me. Usually you'd submit to a handler in your own module and
THEN forward to wherever else using SwitchAction.

Anyway if the SwitchAction does not work, you can go the usual
javascript way of dynamically changing the action attribute's value...

<% String url = response.encodeURL(request.getContextPath() +
"/another-module/myAction.do"); %>
document.myForm.action = '<%= url%>';
document.myFormsubmit();

Not very elegant but it works.

Regards,
-Yves-

On Thu, 16 Sep 2004 09:30:09 +0100, Ricardo Gladwell
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Thanks for that, I will try to use the switch action to forward onto the
> correct module actions. Just out of interest, why doesn't the html:form
> tag have a module attribute?
> 
> Yves Sy wrote:
> > Try using SwitchAction
> >
> > -Regards-
> > Yves
> >
> >
> > On Wed, 15 Sep 2004 23:46:16 +0100, Ricardo Gladwell
> > <[EMAIL PROTECTED]> wrote:
> >
> >>Hi,
> >>
> >>I'm experimenting with struts modules, but I've encountered a problem
> >>whereby I have a struts  referencing an action in my
> >>non-default module. Instead of referencing the correct action, I get a
> >>"Cannot retrieve mapping for action" JspException.
> >>
> >>How do I reference an action in another module from a html:form? Unlike
> >>html:link there doesn't seem to be a "module" attribute?
> >>
> >>Kind regards...
> >>
> >>--
> >>Ricardo Gladwell
> >>
> >>-
> >>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]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: and modules

2004-09-15 Thread Yves Sy
Try using SwitchAction

-Regards-
Yves


On Wed, 15 Sep 2004 23:46:16 +0100, Ricardo Gladwell
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm experimenting with struts modules, but I've encountered a problem
> whereby I have a struts  referencing an action in my
> non-default module. Instead of referencing the correct action, I get a
> "Cannot retrieve mapping for action" JspException.
> 
> How do I reference an action in another module from a html:form? Unlike
> html:link there doesn't seem to be a "module" attribute?
> 
> Kind regards...
> 
> --
> Ricardo Gladwell
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: please wait page... like NWA.com

2004-09-14 Thread Yves Sy
The "threading stuff" only sounds intimidating but its actually
simple. In the execute() method of your action class, all you need to
do is go something like:

new Thread() {
public void run() {
 //your processing logic
 Business.processWhatever();

 //place flag in session afterwards
 request.getSession(false).setAttribute("myFlag", "");
}
}
.start()

return mapping.findForward("processing");


Note that you have to make final variables of all the parameters of
the execute() method for this to compile as i used an anonymous inner
class...

-Yves-


On Tue, 14 Sep 2004 18:45:47 +0200, Håkon T Sønderland <[EMAIL PROTECTED]> wrote:
> Wayne Fuller wrote:
> 
> > On Tue, 14 Sep 2004 17:05:58 +0200, Håkon T Sønderland <[EMAIL PROTECTED]> wrote:
> >
> >>Sorry for being a complete clueless newbie, but could you expand
> >>a bit on this?  I don't have the concepts quite clear enough to
> >>understand what you mean.
> >>
> >>Thanks,
> >>Håkon
> >
> >
> > That's quite alright, no need to apoligize, I should have explained a
> > little more.  We have a jsp page where a user clicks a submit button,
> > which calls the jsp page javascript method below, openNewBrowser.
> > This in turn opens a new window which is first directed to whatever
> > someReport.html contains.  In our case it is a flash file, but it
> > could be anything.  In the html file we do a submit on the load event.
> >  Probably not the most elegant way of doing this, but it works.  If
> > you need anymore explanation let me know.
> >
> > *** Excerpt from jsp page *
> [snip]
> > *** End of Excerpt from html page *
> 
> OK, thanks, I think I understood that.
> However, does not this page then stay up there even after the action is
> completed and you go to your result page?
> 
> My problem is that the struts page I'm developing is "embedded" inside
> a webpage (from a publishing system using .net) and I would like to
> display a 'please wait' type of message inside my little frame while
> the stuff is processing (it is a credit scoring application so it takes
> quite a while waiting for web-services and stuff).  Might be possible
> to do what Yves is suggesting, but I'm not up to speed with the treading
> stuff either (disadvantages to being a newbie again).
> 
> Thanks again,
> 
> 
> Håkon
> --
> We shall fight on the beaches,
> we shall fight on the landing grounds,
> we shall fight in the fields and in the streets,
> we shall fight in the hills;
> we shall never surrender
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: please wait page... like NWA.com

2004-09-14 Thread Yves Sy
One way to do this is:

1. Start a thread on your search action that does the actual retrieval
and processing of the data. At the end of the thread's execution,
place a flag in the session that you will check for later on to see if
the search/processing is done.
2. Right after starting the thread, forward immediately to your
"Please wait" page.
3. On your "please wait" page, use javascript setTimeout() to submit
an empty form to an action every, say, 1500ms.
4. On your action, check for the flag in the session. If it's present,
remove the flag and forward to your result page; otherwise, forward
again to the processing page.

Regards,
-Yves-

On Tue, 14 Sep 2004 09:32:16 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Northwest airlines (www.nwa.com) and other similar sites have a very nice
> "Please wait/searching" page concept.  When searching for a flight, it
> sends you to a Please Wait/searching page that continues to load until the
> search has finished.  (Sorry it is hard to describe... it's easier to just
> check it out).   When the search is finished it loads the results page.
> If you click the browser back button, it navigates to the original search
> page rather than the "please wait" page.
> 
> I have searched the struts-user archives and google for more information
> about this technique using struts/jsp but have not had much luck.The
> nwa site obviously runs some type of Microsoft/ASP based web framwork that
> I have seen on other web-sites.
> 
> Can anyone provide more information about how to accomplish the technique
> used on nwa.com using Struts/JSP's???  Is there a book or internet resource
> that provides more background on this technique?
> 
> Thanks in advance for your help...
> 
> TJ Herring
> [EMAIL PROTECTED]
> 
> 
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, 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. If you received
> this in error, please contact the sender and delete the material from any
> computer.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Not happy with approaches.. looking for better/other suggestions

2004-09-12 Thread Yves Sy
Dude all you have to do is do something as simple as entering
"ListUtils" in Google and you'll find out.

-Yves-

On Mon, 13 Sep 2004 17:04:18 +1200, struts Dude <[EMAIL PROTECTED]> wrote:
> Just a silly question.
> 
> Where did ListUtils come from?? I can't find this
> in my JDK1.4.2.
> 
> Thanks
> 
> 
> 
> 
> - Original Message -
> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, September 03, 2004 7:40 AM
> Subject: Re: Not happy with approaches.. looking for better/other
> suggestions
> 
> > Have you tried using ListUtils.lazyList() for this?  I just tried it
> > on a sample app and it works in cases like this.
> >
> > - Hubert
> >
> > On Thu, 02 Sep 2004 14:27:32 -0400, Rick Reumann <[EMAIL PROTECTED]>
> wrote:
> > > One of the most frustrating things I run into when developing Struts
> > > applications is the problem of when you want to use a request scoped
> > > ActionForm but you need to populate a collection that is one of your
> > > ActionForm properties. The problem is the classic index out of bounds
> > > exception if you do not have your collection populated with enough
> objects.
> > >
> > > For example imagine the case where you might want to edit a bunch of
> > > Access definitions on one form.
> > >
> > > So in an ActionForm property you have:
> > >
> > > Collection accessDefinitions;
> > >
> > > In your Action before you get to the form you populate your form:
> > >
> > > ((AccessForm)form).setAccessDefinitions( aCollectionOfDefs );
> > >
> > > Your JSP then displays the access definition properties for the user to
> > > edit:
> > >
> > > (condensed and table formatting removed:)
> > >
> > >  > > varStatus="status">
> > >   
> > >   
> > > 
> > >
> > > Now the problem will be when you submit this form. If this form was
> > > given request scope in the action mapping, you'll end up with errors
> > > since BeanUtils can not populate the Collection. You need to have the
> > > correct size in place for 'accessDefinitions' to allow for population.
> > >
> > > There are several solutions that have been proposed by searching the
> > > list archives.
> > >
> > > The easiest alternative is of course to just put your form in Session
> > > scope, but that is such a waste in my opinion.
> > >
> > > Another approach would be something like:
> > >
> > > In reset() of ActionForm:
> > >
> > > public void reset(ActionMapping actionMapping, HttpServletRequest
> request) {
> > > if ( request.getParameter("accessDefinitionsSize") != null ) {
> > > int accessDefinitionsSize = new
> > > Integer(request.getParameter("accessDefinitionsSize")).intValue();
> > > accessDefinitions = new ArrayList(accessDefinitionsSize);
> > > for (int i=0;i > > accessDefinitions.add(new AccessDefinitionVO());
> > > }
> > > }
> > > }
> > >
> > > Then in your JSP (code snipped just showing releveant portion):
> > >
> > >  > > varStatus="status">
> > >   
> > >   
> > > 
> > >  > > value="${accessDefinitionsSize}"/>
> > >
> > > The above works 'ok' but it's so much extra code. I've thought of just
> > > adding the accessDefinitionsSize attribute to the Session in the Action
> > > that is called right be the form is set up. Then the reset method can
> > > pull it right from there. An int in the session won't be too much
> > > overhead. But I'm not sure if I like that approach that much either
> > > (although I'm leaning towards just doing it that way).
> > >
> > > Of course I don't like the approaches that call a business class from
> > > the reset to get the size.
> > >
> > > Any suggestions welcome.
> > >
> > > --
> > > Rick
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Invoking global-forwards from browser

2004-09-10 Thread Yves Sy
You cant call forwards by typing its name because its an object, not a
valid path. Struts uses the "path" property of a forward object to
know where to forward to.

Instead, you should create an ActionMapping that uses a ForwardAction
and pass /Login.jsp as parameter.

Then you can call that action mapping by typing it in the browser.

-Yves-


On Fri, 10 Sep 2004 15:08:27 +0530, Antony Paul
<[EMAIL PROTECTED]> wrote:
> Hi all,
> How I could call a global forward by typing it in browser?
> 
> 
> 
> 
> What I should type on the browser window ?
> http://localhost/Login or http://localhost/Login.do - it gives The request
> sent by the client was syntactically incorrect (Invalid path /Login was
> requested).
> 
> rgds
> Anto Paul
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Gracefully handling invalid paths

2004-09-08 Thread Yves Sy
You can specify it in your web.xml:


404
/error_404.jsp


-Yves-


On Wed, 8 Sep 2004 20:36:38 -0700 (PDT), Andy Engle
<[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I am wondering how I should handle invalid path situations within my
> Struts application.  I want to be able to have a "catch-all" page
> whenever someone enters an invalid path so that they don't see that
> ugly Tomcat 404 page.  How might I go about doing something like that?
> 
> Thanks very much.
> 
> Andy
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: tiles ForwardAction

2004-09-08 Thread Yves Sy
One note about tiles is that you cannot redirect to a tiles-definition
since it's not a valid URI. The usual way to get around that is to
create an ActionMapping that uses a ForwardAction and pass the tiles
definition as your parameter.

-Yves-.


On Wed, 8 Sep 2004 08:28:21 +0200, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> >>> Hello,
> >>>
> >>> is ther any way I can forward to a tile-definition?
> >>>
> >
> >
> > That is the only way you can ever get to a page at all in Struts, so the
> answer has to be "Yes".
> 
> Wrong, you can forward to a JSP page or to a servlet (used in StrutsCX) or
> to another action or to nothing at all (e.g. if you build the HttpRequest
> manually).
> Ciao
> Antonio Petrelli
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: html:cancel usage

2004-09-08 Thread Yves Sy
What I usually do is check for isCancelled() in my Action (or
BaseAction) before anything else so I can forward to the appropriate
place if cancel was clicked.

As for the validation, I had to put my validation in a private method
in the Action instead of using the one in the ActionForm.

On Wed, 08 Sep 2004 08:54:19 +, andy wix <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Has anyone else had a problem with this?
> I am using Struts 1.1 but presume it has worked in this and previous
> versions as it must come up in almost every project.
> I cannot switch validation to false as my submit button does require
> validation.
> I suppose I could put the cancel and submit buttons inside seperate form
> tags but this seems a little contrived.
> 
> Thanks,
> Andy
> 
> _
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://www.msn.co.uk/messenger
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: whats going wrong ?

2004-09-06 Thread Yves Sy
The ActionServlet does not see your struts-config or a struts-config
for a specific module. Check your pathnames in web.xml and that it
matches the physical location of your struts-config files.

-Yves-


On Mon, 6 Sep 2004 12:40:33 +0530, Viral_Thakkar
<[EMAIL PROTECTED]> wrote:
> 500 Internal Server Error
> java.lang.NullPointerException
> at
> org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
> et.java:1003)
> at
> org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
> va:955)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> J2EE].server.http.HttpApplication.loadServlet(HttpApplication.java:1956)
> at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> J2EE].server.http.HttpApplication.findServlet(HttpApplication.java:4355)
> at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> J2EE].server.http.HttpApplication.getRequestDispatcher(HttpApplication.j
> ava:2484)
> at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.j
> ava:617)
> at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
> at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
> r.java:797)
> at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> Application.log
> 
> --
> 
> 9/6/04 12:29 PM Started
> 9/6/04 12:30 PM Auto-deploying tropics.jar... done.
> 9/6/04 12:30 PM tropics: jsp: init
> 9/6/04 12:30 PM tropics: log4j-init: init
> 9/6/04 12:30 PM tropics: action: init
> 9/6/04 12:30 PM tropics: Error initializing servlet
> java.lang.NullPointerException
> at
> org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
> et.java:1003)
> at
> org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
> va:955)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at
> com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.jav
> a:1956)
> at
> com.evermind.server.http.HttpApplication.findServlet(HttpApplication.jav
> a:4355)
> at
> com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplica
> tion.java:4455)
> at
> com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.jav
> a:662)
> at
> com.evermind.server.http.HttpApplication.(HttpApplication.java:435
> )
> at
> com.evermind.server.Application.getHttpApplication(Application.java:695)
> at
> com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:6
> 76)
> at
> com.evermind.server.http.HttpSite.getApplication(HttpSite.java:388)
> at
> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
> ndler.java:407)
> at
> com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
> 259)
> at
> com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
> 106)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
> r.java:797)
> at java.lang.Thread.run(Thread.java:484)
> 9/6/04 12:30 PM tropics: Error preloading servlet
> javax.servlet.ServletException: Error initializing servlet
> at
> com.evermind.server.http.HttpApplication.findServlet(HttpApplication.jav
> a:4412)
> at
> com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplica
> tion.java:4455)
> at
> com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.jav
> a:662)
> at
> com.evermind.server.http.HttpApplication.(HttpApplication.java:435
> )
> at
> com.evermind.server.Application.getHttpApplication(Application.java:695)
> at
> com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:6
> 76)
> at
> com.evermind.server.http.HttpSite.getApplication(HttpSite.java:388)
> at
> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
> ndler.java:407)
> at
> com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
> 259)
> at
> com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
> 106)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
> r.java:797)
> at java.lang.Thread.run(Thread.java:484)
> 9/6/04 12:30 PM tropics: 9.0.3.0.0 Started

Re: code snippet for

2004-09-02 Thread Yves Sy
Assuming you have a collection "myList" stored in some scope where
each item in the list has  the "name" and "id" properties:





-Yves-

- Original Message -
From: viji.george <[EMAIL PROTECTED]>
Date: Fri, 3 Sep 2004 10:07:24 +0530
Subject: code snippet for 
To: [EMAIL PROTECTED]

 
can anybody send me a code sample for using 
for getting the value from the ArrayList and populating the combo box.
  
I am storing the values retrieved from the DB in a arraylist in the
form of a class which has 2 attributes one for option value and the
other for text of the option.
  
I want to put these values into the combo box. 
has anybody done this? 
  
  
Viji George
Information Systems,
The Arvind Mills Ltd.,
Naroda, Ahmedabad. 
Phone-(079)22203030
Ext -2352
[EMAIL PROTECTED] 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Image Does Not Get Picked Up

2004-09-02 Thread Yves Sy
You can also use the "src" attribute:

 

to get to your image using relative paths...

-Yves-

On Thu, 02 Sep 2004 09:44:19 -0700, Michael McGrady
<[EMAIL PROTECTED]> wrote:
> Caroline Jen wrote:
> 
> >Thanks for your reply.
> >
> >I followed your advices:
> >
> >1. Try just:
> >frame/common/images/dhs-header-title.JPEG (with no
> >leading slash)
> >
> >   does not work.
> >
> >2. You are right.  The generated HTML is an  >src="..." > tag.  When I clicked "View Source", it is:
> >
> > >src="/HSInfo/frame/common/images/dhs-header-title.jpeg"
> >width="600" border="0" alt="[information]">
> >
> >3. I copied the generated HTML tag (but changed 'img'
> >to 'html:img' and changed 'src' to 'page') to my
> >source code.
> >
> >   does not work.
> >
> >4. I am using the Windows XP.
> >
> >5. I tried both .jpeg and .jpg
> >
> >   does not work.
> >
> >I do not know what to do now.  Please help more.
> >--- Wendy Smoak <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >>From: "Caroline Jen" <[EMAIL PROTECTED]>
> >>
> >>
> >>> >>>
> >>>
> >>>
> >page="/HSInfo/frame/common/images/dhs-header-title.JPEG"
> >
> >
> >>>border="0" width="800" alt="[infomation]"/>
> >>>The image does not get picked up in the browser.
> >>>Therefore, only the text "information" is shown.
> >>>
> >>>
> >>Have you tried it with a relative link?  Try just:
> >>frame/common/images/dhs-header-title.JPEG (with no
> >>leading slash).
> >>
> >>It's best not to hard-code the name of the webapp
> >>into anything if you can
> >>avoid it... more to modify if you change it later,
> >>or like me, run -dev
> >>and -test versions with the same code under
> >>different context names.
> >>
> >>Shouldn't the generated HTML be an 
> >>tag??  You wrote that it
> >>says 'page'.  Copy and paste the entire tag from the
> >>HTML if it's still not
> >>working.
> >>
> >>If you're on UNIX, then it's case sensitive-- .JPEG
> >>and .jpeg are not the
> >>same.
> >>
> >>Does your browser understand what to do with a .jpeg
> >>file?  Try renaming it
> >>.jpg and see what happens.
> >>
> >>--
> >>Wendy Smoak
> >>
> 
> My guess is that the problem is with .jpeg.  There are all sorts of file
> extensions consistent with the JPEG protocol, e.g. jff, jif, jfif, jpe,
> jpeg and jpg.  the former are all JPEG images and the later two (jpeg
> and jpg) are for JPEG compressed bitmpas and JPEG bitmaps,
> respectively.  What your extension should be depends on what your image
> is.  Do you know what the image is?  My guess is that you have a JPEG
> bitmap and should be using .jpg as the extension.
> 
> Michael
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: dynamically change the dropdown list from a database...

2004-09-02 Thread Yves Sy
There are 2 ways to go about this:

1) use an onchange() handler in your select-A that submits the new
value and retrieves the corresponding values for select-B everytime
there's a change;

2) pre-load all possibilities and use javascript to change the values
of select-B that depends on A. This option is practical only for small
amounts of combinations of data.

I've personally used option 2 before. Check out:
http://www.mattkruse.com/javascript/dynamicoptionlist/source.html

-Regards-
Yves

On Thu, 2 Sep 2004 12:21:06 -0400, Shilpa Nalgonda
<[EMAIL PROTECTED]> wrote:
> I am having problem dynamically display the dropdown list from database.
> 
> There are two dropdown list boxes A and B,
> when the user changes options in dropdown A, the dropdown B should also
> change dynamically from databse.
> 
> Both A and B use html select tag.
> 
> Dropdown A and B are inside the shipReprt.jsp.
> 
> I am trying to submit to the same jsp on change event of dropdown A ..
> It does not work, can anyone plesae suggest.  I am not struts though...below
> is the code for Dropdown A..
> I have to pass the vendor parameter to dropdown B so that i can query
> database with this parameter...
> 
> ">
> MP BookMaker
> ADOBE
>   
> 
>  
>   <% String partner = request.getParameter("vendor");
> out.println("Size : " + partner);
>   %>
>  
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: RE: [OT] someone using Outlook 2003, please tell me it can't be t his LAME...

2004-09-02 Thread Yves Sy
Same goes with Outlook 2002 for me.

-Yves-

On Thu, 2 Sep 2004 15:57:56 +0100, Paul McCulloch
<[EMAIL PROTECTED]> wrote:
> In Outlook 2000 you can do this by choosing View:Current View:By
> Conversation Topic, then click the data column to sort.
> 
> Paul
> 
> > -Original Message-
> > From: Rick Reumann [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 02, 2004 3:45 PM
> > To: Struts Users Mailing List
> > Subject: [OT] someone using Outlook 2003, please tell me it
> > can't be this LAME...
> >
> >
> > Ok, I'm not trying to start an e-mail client war. (I have been using
> > Thunderbird as my primary client but do miss some of the
> > features of The
> > Bat, but that's not the question I have). At work they've
> > just installed
> > Office 2003 so I figured I'd look again at Lookout since I do
> > use it at
> > work for the Calendar stuff that I'm forced to use (I can still use
> > Thunderbird to get my Exchange server e-mail which is nice). While
> > messing with the Outlook e-mail client I can't figure out for
> > the life
> > of me how to "sort messages by subject/thread AND by date..
> > like EVERY
> > OTHER client in the world does." If this client can sort like
> > a normal
> > client (thunderbird, mozilla, the bat, sylpheed, evolution, kmail,
> > pegasus, eudora, poco mail, etc etc) how come it is so difficult to
> > figure out how to set it up? I've been messing with these view and
> > custom options and still havne't figured it out. I've used
> > both Windows
> > and Linux and I actually like Windows for a desktop
> > environment (gasp!)
> > but I don't use any of their software other than the OS (I
> > use opera or
> > firefox for browsing, thundbird for mail, open office for
> > office stuff).
> > I'm really amazed that they could realease an e-mail client
> > that is so
> > lame. It's like MS refusing to make IE have tabbed browsing
> > features -
> > just stupid - they know people want it but they don't provide it (I
> > guess they're afraid to admit that moz/firefox/opera have the
> > right idea.)
> >
> > Someone tell me how I can get messages sorted correctly in Outlook? I
> > want grouped by thread/subject but sorted by received date
> > (preferably a
> >   more recent date on an e-mail will simply move the grouped
> > thread up
> > or down).
> >
> > 
> >
> > --
> > Rick
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> **
> Axios Email Confidentiality Footer
> Privileged/Confidential Information may be contained in this message. If you are not 
> the addressee indicated in this message (or responsible for delivery of the message 
> to such person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message, and notify us immediately. If you or your employer 
> does not consent to Internet email messages of this kind, please advise us 
> immediately. Opinions, conclusions and other information expressed in this message 
> are not given or endorsed by my Company or employer unless otherwise indicated by an 
> authorised representative independent of this message.
> WARNING:
> While Axios Systems Ltd takes steps to prevent computer viruses from being 
> transmitted via electronic mail attachments we cannot guarantee that attachments do 
> not contain computer virus code.  You are therefore strongly advised to undertake 
> anti virus checks prior to accessing the attachment to this electronic mail.  Axios 
> Systems Ltd grants no warranties regarding performance use or quality of any 
> attachment and undertakes no liability for loss or damage howsoever caused.
> **
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Log4j output

2004-09-01 Thread Yves Sy
You can specify a different appender for different packages in your
configuration file. That way, you can specify all org.apache.struts
logs to go to a certain appender and foo.bar to go to another.

Note though that this question is more log4j-related rather than struts.

On Wed, 01 Sep 2004 21:36:54 +, andy wix <[EMAIL PROTECTED]> wrote:
> Hi,
> I am using Log4j for my web app logging.
> Does anyone know how to set it up such that the Struts output goes to one
> file and my own log statements go to another file.
> Thanks,
> Andy
> 
> _
> Want to block unwanted pop-ups? Download the free MSN Toolbar now!
> http://toolbar.msn.co.uk/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: [OT] Funny phone call from my Dad:)

2004-09-01 Thread Yves Sy
We all laugh now but we might just end up like that ourselves someday :)

I myself have been stuck with the grunge music of the early 90's
already. I try to keep up with the new stuff but... its just
different! :(

On Wed, 01 Sep 2004 10:25:32 -0400, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Jitesh Sinha wrote:
> 
> > That is VERY natural Rick...I think that will hapeen in 100% of the cases
> > for people absolutely new to computers.
> 
> True, although I think you get the same asterisks at the ATM machine
> when you enter your password -- then again I think those machines scare
> my dad also - I think he makes sure he goes to a teller to get cash:)
> 
> 
> 
> --
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Where Do I Download the Artimus Source Code?

2004-09-01 Thread Yves Sy
Hi,

Its in sourceforge.net. Try searching Google. It comes up right away.

-Yves-

On Wed, 1 Sep 2004 06:04:02 -0700 (PDT), Caroline Jen
<[EMAIL PROTECTED]> wrote:
> I want to download the Artimus example source code in
> the "Struts in Action".  Where (what is the URL) do I
> find the download?
> 
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: Action Class Reusable

2004-09-01 Thread Yves Sy
Hi,

Some action classes can be made reusable, such as actions that add
attachments. You have to try to make your code as generic as possible
in these actions and simply define a different path in the forward of
the corresponding ActionMapping.

But these are generally rare cases. Often times, its advisable to
create an Action class for each "transaction" you can do from a page
(such as clicking links and buttons). This design makes Action classes
easier to maintain. Having one action class handle everything in a
module can make things very complicated.

Grouping similar transactions such as CRUD actions on a certain module
is a different thing. For that you can use DispatchAction. It is up to
the developer to figure out which transactions can be logically be
grouped together using DispatchAction and which should be separated in
plain old Actions.

Finally, business logic should never be coupled with your Action
classes. Your action classes should simply do some synctactic
validation (if your not using validate() in the ActionForm or
DynaValidatorForms) and point execution to the right direction and not
much else.

-Yves-

On Wed, 1 Sep 2004 18:13:08 +0530, Jitesh Sinha <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> Is there a way we can make our Action Classes reusable across different
> modules?
> Generally we have one Action class for every module.Maybe,if we put our
> business logic in different business classes (particular to a module) and
> make these business classes implement a common interface?
> I have only a vague idea till now about this.Can someone elaborate?
> 
> Thanks,
> -Jitesh
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: ActionForm: simply calling reset() or have to recreate one ?

2004-09-01 Thread Yves Sy
Probably to discourage subclasses from creating/maintaining their own
instance of ActionServlet... But then it doesn't make any sense to do
that anyway, although you'll never believe what some users end up
coming up with.

I'd be very interested to hear the answer to this one.

-Yves-

On Wed, 01 Sep 2004 18:04:57 +0900, Shinobu Kawai <[EMAIL PROTECTED]> wrote:
> 
> Hi Paul,
> 
> > You don't event need that. As I said - servlet is a protected instance
> > variable of Action, so you can just use 'servlet' in code in your Action
> > desdendants.
> I wonder why it's not private?  Not very encapsulated...
> 
> Best regards,
> -- Shinobu Kawai
> 
> --
> Shinobu Kawai <[EMAIL PROTECTED], [EMAIL PROTECTED]>
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: The jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory

2004-08-31 Thread Yves Sy
Hi,

There's a long thread about that just yesterday. Check the messages history.

-Yves-

On Tue, 31 Aug 2004 04:36:57 -0700 (PDT), Caroline Jen
<[EMAIL PROTECTED]> wrote:
> There are three .jar files in the
> C:\jakarta-struts-1.1\contrib\struts-el\lib directory
> that are not in the C:\jakarta-struts-1.1\lib
> directory.  Those three files are jstl.jar,
> standard.jar, and struts-el.jar.
> 
> Do we also copy those three files to the
> C:\TOMCAT\webapps\AppName\WEB-INF\lib directory to
> setting up to use the Struts?
> 
> Thanks.
> 
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: prechecked checkbox using DynaValidatorForm

2004-08-31 Thread Yves Sy
Hi,

Try declaring eatable in your form-bean declaration as
java.lang.Boolean and in the action before your edit page go
myForm.set("eatable", new Boolean(true))

-Yves-

On Tue, 31 Aug 2004 12:25:18 +0200, Wolfgang Woger
<[EMAIL PROTECTED]> wrote:
> Hi,
> I have acheckbox that needs to be prechecked with the value of myBean.toEat.
> 
> 
> 
> I use a DynaValidatorForm, "eatable" is a property of my
> DynaValidatorForm, I
> tried to set: myForm.set("eatable","true"); before forwarding to the jsp
> page,
> but without success.
> 
> Any ideas ?
> 
>  Wolfgang
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



Re: manual validation of a form field

2004-08-29 Thread Yves Sy
Hi,

You can write your own validator to take care of that -- see the
Pluggable Validators section on the Struts site.

-Yves-

On 29 Aug 2004 22:24:43 -0400, Gary S. Cuozzo
<[EMAIL PROTECTED]> wrote:
> Hello,
> I am using Struts 1.1 and the built-in validation framework, which works
> great.  However, I have a few forms that have data that must be parsed a
> bit before it can be validated.  For example, a textarea with 1 email
> address per line.  Is there a way that I can use the validator api to do
> this from within my action?
> 
> If somebody has some code/configuration that does this or some url to
> point me in the right direction, that'd be great.
> 
> Thanks in advance,
> Gary.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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



RE: Which is better? Auto validate or Manual validate?

2004-08-26 Thread Yves Sy
When you use DynaValidatorForm, you don't really have a choice other
than to use the Validator framework as you cannot override the
validate() method. You can only override when you write your own
ActionForm.

Validating using the validator framework can help off-load traffic from
the server when you use the javascript validation as your first line of
defense. However, you should also back up your validation on the
server-side as well since malicious users can easily get around the
client-side validation.

Regards,
-Yves- 

> -Original Message-
> From: Gao Ye Wei [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 27, 2004 9:28 AM
> To: 'Struts Users Mailing List'
> Subject: Which is better? Auto validate or Manual validate?
> 
> Hi, all:
>   Which validate method is better? Declare the validate conditions
in
> the validation.xml or override the ActionForm.validate()?Thanks for
your
> respose!
> 
> Best regards!
> Gao Yewei
> 
> Email: [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: how to reset form

2004-08-26 Thread Yves Sy
You can try using html:text instead of a normal textfield and use
ActionForm's reset() method to reset the values to "".

Regards,
-Yves- 

> -Original Message-
> From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 4:07 PM
> To: Struts Users Mailing List
> Subject: RE: how to reset form
> 
> 1. I need to use session for this one.
> 
> 2. The textfield in the JSP didn't load the value from the bean. It is
a
> normal textfield.
> 
> How do I reset in my case?
> 
> 
> On Thu, 2004-08-26 at 16:07, Yves Sy wrote:
> > I mean your "actionform" is stored in session scope by default :)
> >
> > Regards,
> > -Yves-
> >
> > > -Original Message-
> > > From: Yves Sy [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 26, 2004 4:02 PM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: how to reset form
> > >
> > >
> > > This is happening because your session is stored in session scope
by
> > > default.
> > >
> > > You should explicitly specify scope="request" in your
actionmapping.
> > >
> > > Regards,
> > > -Yves-
> > >
> > > > -Original Message-
> > > > From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, August 26, 2004 3:33 PM
> > > > To: Struts Users Mailing List
> > > > Subject: how to reset form
> > > >
> > > > hi
> > > >
> > > > A user submits a form and the action class forward it back to
the
> > same
> > > > JSP. The values entered previously is still there. How do I
clear it
> > > > before action returns actionforward?
> > > >
> > > > Thanks
> > > >
> > > > Sebastian Ho
> > > >
> > > >
> > > >
> >
-
> > > > 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: how to reset form

2004-08-26 Thread Yves Sy
I mean your "actionform" is stored in session scope by default :)

Regards,
-Yves- 

> -Original Message-
> From: Yves Sy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 4:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: how to reset form
> 
> 
> This is happening because your session is stored in session scope by
> default.
> 
> You should explicitly specify scope="request" in your actionmapping.
> 
> Regards,
> -Yves-
> 
> > -Original Message-
> > From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 26, 2004 3:33 PM
> > To: Struts Users Mailing List
> > Subject: how to reset form
> >
> > hi
> >
> > A user submits a form and the action class forward it back to the
same
> > JSP. The values entered previously is still there. How do I clear it
> > before action returns actionforward?
> >
> > Thanks
> >
> > Sebastian Ho
> >
> >
> >
-
> > 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: how to reset form

2004-08-26 Thread Yves Sy

This is happening because your session is stored in session scope by
default.

You should explicitly specify scope="request" in your actionmapping.

Regards,
-Yves- 

> -Original Message-
> From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 3:33 PM
> To: Struts Users Mailing List
> Subject: how to reset form
> 
> hi
> 
> A user submits a form and the action class forward it back to the same
> JSP. The values entered previously is still there. How do I clear it
> before action returns actionforward?
> 
> Thanks
> 
> Sebastian Ho
> 
> 
> -
> 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: ActionForm and Transfer Object

2004-08-26 Thread Yves Sy
The problem with that approach is you'll end up putting your validation
code in your TO and you'll have to write your own error handling routine
too. If you use ActionForms, you can save time by taking advantage of
Struts' error handling mechanism via the validate() method and checkbox
handling via the reset() method.

Regards,
-Yves- 

> -Original Message-
> From: Deepak [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 3:23 PM
> To: Struts Users Mailing List
> Subject: Re: ActionForm and Transfer Object
> 
>  I like passing a TO into the ActionForm so it gets updated by the jsp
> submission and is ready for being sent back over to the business tier.
> 
> - Original Message -
> From: "Leandro Melo" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 25, 2004 11:26 PM
> Subject: Re: ActionForm and Transfer Object
> 
> 
> > Sure Rick, and "where should me do it" might be a good
> > discussion (like the one that we`re all going on right
> > now).
> >
> > A few months ago i had a similar discussion in a
> > forum.
> > Is someone is interested to hear more opinions, here
> > it is
> >
>
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=5
8&t=
> 002880
> >
> >
> >
> >  --- Rick Reumann <[EMAIL PROTECTED]> escreveu:
> > > Leandro Melo wrote:
> > > > Rick,
> > > > i agree with you, i also use BeanUtils to populate
> > > my
> > > > forms.
> > > > But, this doesn't go far way from having your
> > > > ActionForms dependent on your TOs (or CustomTOs,
> > > > doesn' t matter).
> > >
> > > Well I wouldn't say they are 'dependent' on each
> > > other except that it
> > > makes it easier if the property names match. Think
> > > about it, at some
> > > point you are always going to have some sort of
> > > binding match up going
> > > on. Something somewhere along the line has to bind a
> > > request parameter
> > > name (which is just a key in a Map) to the real
> > > business object
> > > property. You can devise different ways to do this
> > > and look at how other
> > > frameworks handle it, but somewhere this has to be
> > > done.
> > >
> > > --
> > > Rick
> > >
> > >
> >
-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >
> >
> > ___
> > Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade!
> > http://br.acesso.yahoo.com/
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Refresh - Duplicate Records Issue.

2004-05-14 Thread Yves Sy
Use redirect = "true" in the forward property of your action mapping. As
a rule of thumb, you should redirect if you do any action that involves
writing in the persistence layer such as deleting, saving, updating,
etc...

HTH,
-Yves-


> -Original Message-
> From: Tarun Dewan [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 14, 2004 6:47 PM
> To: 'Struts Users Mailing List'
> Subject: Refresh - Duplicate Records Issue.
> 
> Dear All,
> 
> I'm facing one problem in my application. If user clicks 'REFRESH'
> (through right click menu) duplicate records gets inserted in my
> application.
> 
> Pls. Suggest best way to handle the same.
> 
> Thanks & regards,
> 
> Tarun.
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Newbie question: Deleting an ActionForm that is in session scope.

2004-05-14 Thread Yves Sy
That doesn't seem lika a really a good idea especially if you're keeping
track of the user logged in! invalidate() is used only when a user
clicks log out or if you want something to that effect. 

Just remove the actionform from the session"

Session.removeAttribute("yourActionFormNameDeclaredInTheStrutsConfig")

Regards,
-Yves-


> -Original Message-
> From: John Moore [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 14, 2004 6:25 PM
> To: Struts Users Mailing List
> Subject: Re: Newbie question: Deleting an ActionForm that is in
session
> scope.
> 
> Adam Lipscombe wrote:
> 
> >Folks,
> >
> >
> >I have a wizard framework that uses the same ActionForm to collect
data
> as
> >the wizard progresses.
> >The scope of the ActionForm is session so that values are preserved
when
> the
> >user navigates back and forwards through the wizard.
> >
> >When I get to the end of the wizard, I don't want the same data to be
> >displayed next time the user starts the same wizard.
> >Do I just remove the ActionForm from the session attribute list?
> >Or should I leave the Form in the session attribute list and clear
each
> of
> >its fields?
> >Or is either approach OK?
> >
> >
> >
> >
> I don't know what the canonical way of doing this is, but what I do to
> achieve precisely the effect you are after is to invalidate the
session
> in the Action class, after everything's done:
> 
>  req.getSession().invalidate();
> 
> This works for me!
> 
> John
> --
> ==
> John Moore  -  Norwich, UK  -  [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: submit form question

2004-05-14 Thread Yves Sy
Seems to me that the best way to go around it would be just to warn the
users before they unload the page (whether closing it or moving to
another page) that they haven't submitted the form yet and that all the
data they inputted will get lost if they continue their action...

Regards,
-Yves-


> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 14, 2004 2:03 PM
> To: Struts Users Mailing List
> Subject: RE: submit form question
> 
> Yes, its a difficult one this.
> 
> (Afaik) Your only hope is onBeforeUnload(), but in most browsers I
have
> tried, getting the browser to submit the form at this point in time
simply
> didnt work properly for me (ie: it didnt submit!). Does submit() work
for
> you from inside a beforeUnload handler? If so your halfway there.
> 
> In my case I needed it to merely hit a url (to tell server side code
to
> clean out a particluar object from the session), so I achieved this by
> having it open a popup window (ouch!) that submits itself and closes.
In
> order to differentiate between a window navigation and a window close
I
> had
> to have all the navigation links work via javascript and have them set
a
> variable which the beforeUnload handler could check. If the variable
was
> not
> set it would assume it was a window close rather than a navigation and
go
> ahead and do its thing.
> 
> In your case things will be a lot more difficult as you have to get
the
> form
> data submitted to the server, and coming up with something that will
work
> cross-browser ... well good luck, but if I were you Id try and get
your
> requirements changed so you dont have to go into this particluar
> minefield!
> 
> Its been a while since I did that code so I cant remember all the
other
> options I looked at at the time, so maybe there is a better way to
achieve
> it?
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, 14 May 2004 13:44
> To: Struts Users Mailing List
> Subject: submit form question
> 
> 
> 
> Hi experts,
> How to submit the form when the user closes the browser
window,
> before closing the browser window i want to submit the form.
> Which JavaScript event should i  use. i tried using onBeforeUnload(),
the
> problem is that this event gets fired even when the user goes to
> another page. Thanks in advance
> 
> Regards
> Subramaniam Olaganthan
> 
> 
> -
> 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]