Re: where to download 1.3.6 - broken link ?

2006-12-19 Thread Lixin Chu

thanks for your clarification !

On 12/19/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:


On 12/18/06, Lixin Chu <[EMAIL PROTECTED]> wrote:

> the linked provided on WiKi seems broken:
>   http://people.apache.org/builds/struts/1.3.6<
http://people.apache.org/builds/struts/1.3.6>
>
> are we going to have a new release soon ?

I changed the wiki to say "will be available here" since 1.3.6 doesn't
yet exist.

The 1.3.5 release is available from the downloads page:
http://struts.apache.org/download.cgi#struts135

--
Wendy

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




where to download 1.3.6 - broken link ?

2006-12-18 Thread Lixin Chu

the linked provided on WiKi seems broken:
 
http://people.apache.org/builds/struts/1.3.6

are we going to have a new release soon ?

thanks


Re: jsp page/actions design question

2006-11-13 Thread Lixin Chu

you can use <%@ include file="..." %> to include the common JSP.


On 11/14/06, fea jabi <[EMAIL PROTECTED]> wrote:


Using struts. Have a JSP cust.jsp

In it half of it is very specific to that page only. other half is shown
in
this cust.jsp and another report.jsp too.

want to implement this so that code can be re-used in the other one too.

The way I have designed is for a jsp have a prepare action and dispatch
action.


But not sure how to design this page so that I can re-use the code in
another too.

any suggesions are appreciated.

Thanks.

_
Get today's hot entertainment gossip
http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001


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




Re: struts2 action and spring bean

2006-11-03 Thread Lixin Chu


just curious, what's the benifits of configuring Struts Actions in Spring
? isn't Struts config file enough ?



Re: Forward Action to Action

2006-10-23 Thread Lixin Chu

how abt using the same formbean for both actions ?


Re: struts 1.2.9 and tomcat 5.5

2006-10-19 Thread Lixin Chu

i use TC 5.5 and Struts 1.2.9 w/o problems. but i can not tell what's wrong.
when did the error occur ?


how to avoid action chaining

2006-10-02 Thread Lixin Chu

hi,
I am hearing that action chaining is something we should avoid, however, I
am not sure what's the common practice for this use case:

given User and Department, we need to list User/Department, view
User/Department; when listing User, we also show their department.

When listing Users, we may want to display the department details of the
selected user. after which, we want to come back to the User Listing page.

So to avoid action chaining (from UserListAction to ViewDepartmentAction),
we can use a dispatch action for UserListAction, which includes a
viewDepartment. But in DepartmentListAction, we also have a similar
viewDepartment.

Using action chaining, we can have a seperate ViewDepartmentAction which can
be used by other Action classes also.

So what's your practice for this case ?
lixin


Re: about pagination

2006-09-20 Thread Lixin Chu

struts itself does not (need to) handle pagination.

for displaytag, you can check
http://displaytag.sourceforge.net/11/tut_externalSortAndPage.html


Re: calling method of a bean from JSP

2006-09-17 Thread Lixin Chu

On 9/17/06, Yujun Liang <[EMAIL PROTECTED]> wrote:


Have you tried "Mapped Properties"?
http://struts.apache.org/1.2.9/faqs/indexedprops.html

Regards



this is a good point. I have not tried it. Is it ok (in terms of
performance) to use a custom class as the key, not using Java primitives
like Long ?


Re: calling method of a bean from JSP

2006-09-17 Thread Lixin Chu

this should work. thanks !

On 9/16/06, Strachan, Paul <[EMAIL PROTECTED]> wrote:


you could move the logic into the view/jsp layer...something like:



   



or maybe a custom tag library...






From: Lixin Chu [mailto:[EMAIL PROTECTED]
Sent: Sat 16/09/2006 1:25 PM
To: Struts Users Mailing List
Subject: Re: calling method of a bean from JSP



i do not think it works.


**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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




Re: calling method of a bean from JSP

2006-09-15 Thread Lixin Chu

i do not think it works.


Re: calling method of a bean from JSP

2006-09-14 Thread Lixin Chu



What are you trying to achieve? Maybe you're trying to put logic in your
JSPs that more properly belongs in an action.



thanks. what i am trying to do is to get the value of a field. Say I get a
list of items:

class item {
Set values;
...
}

The item has a set of Values:
class Value {
Attribute attribute;
String value;
}

What I wanted to do is to get one particular value based on attribute ID. in
this case I have to add a method in the Item class, someting like this:

String getValue (String id) {
 while (it.hasNext()) {
Value value = (value) it.next();
if (value.attribute.getId().toString().equals (id)
   return value.value;
 }

So from JSP, I would like to call this method 


Re: calling method of a bean from JSP

2006-09-13 Thread Lixin Chu




I thought this is for getting the value of a property ?  and how to pass a
parameter  to the method ? I think I have tried that but does not work.


calling method of a bean from JSP

2006-09-12 Thread Lixin Chu

Hi,
would like to check if there is existing tag available to allow method
invocation from JSP directly, something similar to this :
"Call JavaBean methods from JSP 2.0 pages "

http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag.html

thanks
lx


Re: Dynamic directory creation and access

2006-08-10 Thread Lixin Chu

is Apache Slide somthing you are looking for ?


Re: can not enable I18N properties

2006-08-03 Thread Lixin Chu

I tried Appfuse on my machine, it works. so I assume the browser
configuration is fine.

I use Tiles, Struts, and Spring framework in my application btw.


can not enable I18N properties

2006-08-03 Thread Lixin Chu

Hi,
I am trying to enable I18N in my struts based application, here is what I
have done:

- added a LocaleFilter, which I copied from Appfuse:

 String locale = request.getParameter("locale");
 Locale preferredLocale = (*null* == locale) ? *null* : *new*Locale(locale);
 HttpSession session = request.getSession(*false*);
*  if* (session != *null*) {
*  if* (preferredLocale == *null*) {
preferredLocale = (Locale) session.getAttribute(Globals.*LOCALE_KEY
*);
 } *else* {
   session.setAttribute(Globals.*LOCALE_KEY*, preferredLocale);
   Config.*set*(session, Config.*FMT_LOCALE*, preferredLocale);
}
* if* (preferredLocale != *null* && !(request
*instanceof*LocaleRequestWrapper)) {
   request = *new* LocaleRequestWrapper(request, preferredLocale);
   LocaleContextHolder.*setLocale*(preferredLocale);
}
 }
  chain.doFilter(request, response);
  // Reset thread-bound LocaleContext.
  LocaleContextHolder.*setLocaleContext*(*null*);

- created ApplicationResources_XXX.properties
- added  in
struts-config.xml
- added <%@ page language="java" pageEncoding="UTF-8"
contentType="text/html;charset=UTF-8"
%>
 in each JSP file
- in my IE, I also added additional languages.

but i only saw english strings. no effect whethere I have  or not.

anything else I miss out ?

thanks
lixin

ps. i debug the filter, it seems that the language is indeed saved in the
session though.


Re: Client Side Validation

2006-08-01 Thread Lixin Chu

do you have something like:
onsubmit="validateAttendeeDetailsForm (this);"
in  ?

and form name is not attendeeDetailsForn ?


Re: [again] how to disable browser's back button after logout ?

2006-06-25 Thread Lixin Chu

yes, it works. thanks. this should be the simplest way of supporting this.

On 6/26/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:


On 6/25/06, Lixin Chu <[EMAIL PROTECTED]> wrote:

> is there a clearner way of doing this if I want to protect every page
except
> the login/out ?

What about the 'nocache' attribute of  in
struts-config.xml?  I haven't used it, just had occasion to be reading
the DTD the other day... :)

http://struts.apache.org/dtds/struts-config/1_2/
 (choose 'controller' at left, scroll up for docs.)

--
Wendy

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




Re: [again] how to disable browser's back button after logout ?

2006-06-25 Thread Lixin Chu

is there a clearner way of doing this if I want to protect every page except
the login/out ?


Re: [again] how to disable browser's back button after logout ?

2006-06-25 Thread Lixin Chu

I see. thanks so much. was really confused.

On 6/25/06, Paul Benedict <[EMAIL PROTECTED]> wrote:


Lixin, you have your needs reversed: you need those directives on every
page that's secure. The pages your users see only when they log in should
not be written to the browser's cache; the log out page is benign. -- Paul


Lixin Chu <[EMAIL PROTECTED]> wrote: this may be posted before though i
can not find any in the archive:

how to make sure that browser's back button will bring back the previous
page after log out ?

Googled, and added these into our logout action, but still no effect:

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", -1);
response.setHeader("Pragma", "no-cache"); // http 1.0

any idea ?

thanks in advance
lx



-
Want to be your own boss? Learn how on  Yahoo! Small Business.



[again] how to disable browser's back button after logout ?

2006-06-24 Thread Lixin Chu

this may be posted before though i can not find any in the archive:

how to make sure that browser's back button will bring back the previous
page after log out ?

Googled, and added these into our logout action, but still no effect:

   response.setHeader("Cache-Control", "no-cache");
   response.setHeader("Cache-Control", "no-store");
   response.setDateHeader("Expires", -1);
   response.setHeader("Pragma", "no-cache"); // http 1.0

any idea ?

thanks in advance
lx


Re: Global forwards don't support Tiles definitions?

2006-06-02 Thread Lixin Chu

not sure if this is what you want but this one should work:

global forward is defined as, fot example:

 

the ".authorizationError" is defined as a Tile:
 
   
   
 


in your action class, you can do this:
return mapping.findForward("authorizationError");


Re: Deciding which DispatchAction to use

2006-05-31 Thread Lixin Chu

how to handle action chaning in EventDispatchAction, for example, if my
mapping is something like this:



When we use: return mapping.findForward("nextaction"); the current
parameters, including the event for the current action will be passed on to
the next action class. will this confuse the next Action ?

We could redirect

On 6/1/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:


On 5/31/06, pantichd <[EMAIL PROTECTED]> wrote:

> I'm trying to figure out how to decide which "flavor" of DispatchAction
> (DispatchAction, LookupDispatchAction, MappingDispatchAction, etc) to
use in
> which scenario.

I'm now using 'EventDispatchAction' for anything new I write.  It uses
the presence of a request parameter to decide which method to call,
based on a list of parameter-to-method mappings in struts-config.xml.

If you don't want to extend EventDispatchAction, you can use the
EventActionDispatcher that David mentioned to add the same dispatching
functionality in any Action class.

--
Wendy

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




Re: Re: How to lock the access of methods within an action?

2006-05-30 Thread Lixin Chu

i think transaction manager will take care of this.


On 5/30/06, Julian Tillmann <[EMAIL PROTECTED]> wrote:


Thanks a lot for your answer!

My thinking behind is the application level!

I'm not sure but the goal is (my hope..)to solve

this problem using aspect oriented programming or Spring

although I'm not very aware of it.

For example it would be nice to have one central configuration there you

can say:

this method -max-users 1-

rule: throw error ….

Should be done then a second users wants access to the method.

Can you help me?

Thanks a lot!


> Original-Nachricht 
>Datum: Tue, 30 May 2006 10:55:17 +0200
>Von: The Jasper <[EMAIL PROTECTED]>
>An: Struts Users Mailing List 
>Betreff: Re: How to lock the access of methods within an action?
>
> Hi,
>
> this sounds like a common database problem. You might want to consider
> some kind of pessimistic locking. Basically you lock the object when
> you start editing and prevent all access to it for the duration of the
> lock. You could also do an optimistic lock which means that when you
> change an object it will only be committed if the object hasn't
> changed between the time you got your lock and the time you want to
> commit it. This doens't prevent you from having done unnecessary work
> however. Most db's support optimistic locking, but not pessimistic
> locking.
>
> If you want to use this at the application level you will have to do
> it yourself. You could put a variable somewhere to track wether an
> object is being edited and base access restrictions off of that.
> However you have to be very carefull about making sure you don't get
> any deadlock or race conditions.
>
> I suggest you delve into database world and read about how other
> people have solved this problem.
>
> mvg,
> Jasper
>
> On 5/30/06, Julian Tillmann <[EMAIL PROTECTED]> wrote:
> > Hello everyone,
> >
> >>> Within our struts web application in which we have edit-actions
within
> a user can be busy editing data in the form for several minutes.
> >
> > The problem is, if another user is also editing the data at the same
> time, one of the is eventually going to overwrite the changes of the
other and
> the other will have worked completely in vain. So my question would be
> whether there's some way to prevent this from happening, some kind of
"lock
> down" method for edit-actions? I think this problem is not uncommon, can
> someone give me a tip?
> >
> >>> thanks in advance
> > Julian
> >
> > --
> >
> >> Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
> >   Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
> >
> >> -
> > 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]

--


Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
  Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer


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




Re: struts token

2006-05-22 Thread Lixin Chu

i think the hidden field is automatically created if you use html:form tag.


is there any way to customize the client side validation popup window

2006-05-19 Thread Lixin Chu

Hi All,
would like to know if there is any way to customize the client side
validation popup window ? i am using struts client side validator.
thanks
lixin


Re: Browser Back Button

2006-05-15 Thread Lixin Chu

A cleaner back button solution is almost a must-have for logout:
after logout, the back button should not bring back the previous page.

looking at that Gmail does. any idea how it is implemented ?


Re: How to use displayTag

2006-05-02 Thread Lixin Chu

check the latest display tag (i think 1.1 or 1.2), it does support
pagination though.
there is also a AjaxTag which enables a AJAX displaytag.



On 4/30/06, H. Kerem Cevahir <[EMAIL PROTECTED]> wrote:



Hi,

display:table tag works on beans( or lists) which are kept in one of
scopes.

You can send your data bean to jsp by implementing your forward-like
action,
just takes data, puts it in a scope and forwards to jsp page. Then, limit
access to jsp page, and update your links to your new forward-like action.

But, for pagination property of displayTag, all list must be in the scope
in
every page, and in every request to every page sorting algorithms are
recalled. This can cause memory and processor problems.

I recommend struts-layout tags. I think that layout:table,
layout:collection
and layout:pager will work better than displayTags.

Regards.
Kerem.

Cum 28 Nis 2006 23:13 tarihinde, makarand sonawane şunları yazmıştı:
> Hi,
>
>  I am looking for Tag implementation for Table which can be configured
for
> external sorting and pagination. Which also support Struts( on sorting
or
> Pagination invokes Struts Action).
>
> I have came accross displaytag opensource of sourceforge, but they lack
> clear documentation. It was also not clear how the StrutsActions will be
> invoked.
>
> Please let me know if any one has used same or similar tag?
>
> Regards
> Makarand
>
>
> -
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great
rates
> starting at 1¢/min.

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




Re: Accessing Validation Errors in an Action

2006-04-27 Thread Lixin Chu
if the validation is done at the server side (in your actionform), then you
can easily get the errors.

On 4/28/06, Asad Habib <[EMAIL PROTECTED]> wrote:
>
> How do I access errors that the Validator places in the ActionErrors
> object instance within a Struts action? I need to do this in my action
> code so I can throw the appropriate kind of exception. Thanks.
>
> - Asad
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Struts 1.2.9 does not throw InvalidCancelException

2006-04-25 Thread Lixin Chu
exactly, thanks !

On 4/25/06, Niall Pemberton <[EMAIL PROTECTED]> wrote:
>
> On 4/24/06, Lixin Chu <[EMAIL PROTECTED]> wrote:
> > just upgraded from 1.2.8 to 1.2.9. I did not add
> >
> >  
> >
> > in struts-config.xml and still use  as per normal in jsp
> files.
> > Tested, do not see exception and no validation is called.
>
> It only gets thrown if the action is set to validate="true" in the
> strutc-config.xml. If no validation is being called then this would
> suggest that you don't have this set.
>
> Niall
>
> > any reason why ? default setting ?
> >
> > btw, my action is LookupDispatchAction.
> >
> > rgds
> > lixin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Struts 1.2.9 does not throw InvalidCancelException

2006-04-24 Thread Lixin Chu
just upgraded from 1.2.8 to 1.2.9. I did not add

 

in struts-config.xml and still use  as per normal in jsp files.
Tested, do not see exception and no validation is called.

any reason why ? default setting ?


btw, my action is LookupDispatchAction.

rgds
lixin


Re: DWR throws errors

2006-04-17 Thread Lixin Chu
thanks.
but according to the doc, I can use the form bean for Struts creator. I
tried Spring creator, it works if I only use the bean name not fully
qualified class name though.


On 4/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> -- Original Message ---
> From: "Lixin Chu" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Mon, 17 Apr 2006 07:56:46 +0800
> Subject: DWR throws errors
>
> > Hi,
> > I am trying my luck to see if someone in this forum has any idea of why
> - i
> > have not got response from DWR forum so far.
> >
> > I am using DWR 1.1.1 (also tried 2.0M1) with Struts 1.2.8. My DWR
> > configuration is like this:
> >
> >
> >   
> >
> Here is the example from there docs
> http://getahead.ltd.uk/dwr/getstarted
>
> 
> 
>
>  
>  
>
>
>  
>
> 
> 
> >
> > Here is the error message:
> > --
> > WARN org.directwebremoting.struts.StrutsCreator - Using a
> > FakeHttpServletRequedt as part of setup
> > ERROR org.directwebremoting.impl.DefaultCreatorManager
> > - Error loading class for creator
> > 'StrutsCreator[GetMultipleUsers]'.
> > java.lang.NullPointerException
> >   at
> > org.directwebremoting.struts.StrutsCreator.getType(StrutsCreator.java
> :120)
> > .
> >
> > Looking at DWR StrutsCreator source, it seems that it can not find the
> > formBean configuration. Anything else I need to config ?
> >
> > I tried Spring bean, it works though.
> >
> > thanks in advance,
> > lixin
> --- End of Original Message ---
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


DWR throws errors

2006-04-16 Thread Lixin Chu
Hi,
I am trying my luck to see if someone in this forum has any idea of why - i
have not got response from DWR forum so far.

I am using DWR 1.1.1 (also tried 2.0M1) with Struts 1.2.8. My DWR
configuration is like this:

   
  
   

Here is the error message:
--
WARN org.directwebremoting.struts.StrutsCreator - Using a
FakeHttpServletRequedt as part of setup
ERROR org.directwebremoting.impl.DefaultCreatorManager
- Error loading class for creator
'StrutsCreator[GetMultipleUsers]'.
java.lang.NullPointerException
at
org.directwebremoting.struts.StrutsCreator.getType(StrutsCreator.java:120)


Looking at DWR StrutsCreator source, it seems that it can not find the
formBean configuration. Anything else I need to config ?

I tried Spring bean, it works though.

thanks in advance,
lixin


Re: Struts Calendar Component

2006-03-25 Thread Lixin Chu
this might be of interest. very easy to integrate into your application:
http://www.dynarch.com/projects/calendar/

HTMLArea is also something cool.


Re: [ANNOUNCE] Struts Central - When only Struts will Do

2006-03-02 Thread Lixin Chu
thanks Ted.

no problem, i just need to add one more bookmark entry.

On 3/2/06, Ted Husted <[EMAIL PROTECTED]> wrote:
>
> On 3/2/06, Lixin Chu <[EMAIL PROTECTED]> wrote:
> > why not consolidate all into one place ? Struts planet, struts central,
> > wiki, etc ?
>
> Planet Struts is powered by Roller, and there's been talk of setting
> up a Roller on an ASF hardware. I kept Planet Struts separate for now
> so that it would be easy to move, if the opportunity presents itself.
>
> The Roller Weblogger Project is a good example of integrating Roller
> with a wiki (JSPWiki).
>
> * http://rollerweblogger.org/page/project
>
> When I get a chance, I'd like to try them together myself. One cool
> thing about JSPWIki (there are many) is that it can support Subversion
> as a data source.
>
> * http://jspwiki.org/wiki/SubversionProvider
>
> But, for now, I wanted to capture the data and post a working
> prototype before making any other decisions.
>
> -Ted.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Why global error handling doesn't work with struts?

2006-03-02 Thread Lixin Chu
to show your own error page in IE, you need to have error page size more
than 512 bytes.

On 3/3/06, Partha Pratim Dutta <[EMAIL PROTECTED]> wrote:
>
> Thanks George. It really works fine in Firefox. Why Microsoft is bent
> upon changing everything their way ?
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 02, 2006 8:33 PM
> To: user@struts.apache.org
> Subject: RE: Why global error handling doesn't work with struts?
>
> You'll have to ask Microsoft why it works that way.
>
> In the meantime, I would advise checking your site with Firefox so that
> you can see your custom 404 page.
>
> - George
>
> > -Original Message-
> > From: Partha Pratim Dutta [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 02, 2006 3:41 AM
> > To: Struts Users Mailing List
> > Subject: RE: Why global error handling doesn't work with struts?
> >
> >
> > But then why is it behaving that way. It shouldn't. Isn't it?
> > I am using IE 6.0
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 01, 2006 7:49 PM
> > To: user@struts.apache.org
> > Subject: RE: Why global error handling doesn't work with struts?
> >
> > What browser are you using?  Note that a custom 404 page is
> > still a 404 page, and Internet Explorer will insist on
> > showing you its own 404 page instead of the one sent by the server.
> >
> > > -Original Message-
> > > From: Partha Pratim Dutta [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, February 28, 2006 11:39 PM
> > > To: Struts Users Mailing List
> > > Subject: Why global error handling doesn't work with struts?
> > >
> > >
> > > Hi All
> > >
> > > I am running Tomcat 4.x and have tried to set global error
> > > handling using the following entry in the web.xml file. But
> > > there is no redirection and I always end up with 404 page not
> > > found error in the browser. I am using struts 1.2 as the MVC
> > > framework for the application.
> > >
> > > One more strange thing that I have noticed is that although
> > > the error page doesn't show up but it prints the SOP
> > > statements on the console. That means that it is getting
> > > redirected to the error page but why is it not showing up then?
> > >
> > > Does anyone have a solution to this problem?
> > >
> > > 
> > > 404 /weberror.jsp
> > > 
> > >
> > >
> > > Thanks & Regards
> > >
> > > Partha
> > >
> > >
> > >
> >
> > -
> > 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: [ANNOUNCE] Struts Central - When only Struts will Do

2006-03-02 Thread Lixin Chu
oh, did not notice that.


Re: [ANNOUNCE] Struts Central - When only Struts will Do

2006-03-01 Thread Lixin Chu
why not consolidate all into one place ? Struts planet, struts central,
wiki, etc ?

On 3/2/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> Why not to expand and improve Struts wiki?
>
> On 3/1/06, Ted Husted <[EMAIL PROTECTED]> wrote:
> > There is a small resource directory on the Struts wiki, but it lists
> > only a fraction of the resources that are available. Ditto for the
> > Struts SourceForge directory and the Java 201 directory. There are
> > other Struts resource directories, but they tend to be incomplete and
> > do not reflect the true breadth of the Apache Struts community.
> >
> > As Apache Struts continues to grow, I'd like to get back to basics.
> > For me, one of those basics is a comprehensive, up-to-date resource
> > directory -- like the original directory that I maintained at Husted
> > dot Com, back in the day.
> >
> > -T.
> >
> > On 3/1/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > > How is this better than Struts wiki?
> > >
> > > On 3/1/06, Ted Husted <[EMAIL PROTECTED]> wrote:
> > > > Struts Central collects, organizes, and maintains links to all known
> > > > Struts Resources, including articles, books, and third-party
> > > > extensions.
> > > >
> > > > You can visit Struts Central at < http://www.StrutsCentral.net/ >.
> > > >
> > > > -- HTH, Ted.
> > > > http://husted.com/ted/blog/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Sorting & paging search results with delete button for each row?

2006-02-22 Thread Lixin Chu
why displaytag does not meet your requirements ?

On 2/22/06, Narayanan, Shiva <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> What is the best way to sort and page search results, (with delete button
> for each row) using Struts? Are there are any open source tag libraries to
> achieve this?
>
>
>
> Looked at displaytag. I want to retrieve data from the database using
> hibernate.
>
>
>
> Many Thanks!!
>
>
>


Re: Another struts design question

2006-02-14 Thread Lixin Chu
ok, I let page A or B pass a returnURL to page C who keeps it in the session
scoped actionForm.

On 2/15/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>
> Michael Jouravlev wrote:
> > On 2/14/06, Rick Reumann <[EMAIL PROTECTED]> wrote:
> >
> >> In the action just look for some param like "fromPage" and key off of
> >> that for your return. (Of course a drawback is you'll need to remember
> >> to set this var on the pages that need it - of course there are ways
> you
> >> could simplify that even, if really necessary).
> >>
> >
> > Using session is much simpler ;-)
> >
> >
> This is one of those times I would agree :)
>
> My suggestion would be to have a base Action in which you set a session
> attribute to tell which page was server.  Actually, you would store two,
> the current and the previous.
>
> Here's my concern... let's say you have page A and page B, from which
> you can go to page C.  From page C you want to return to page A or B as
> appropriate.  You could do this a number of ways, but what if you are
> using the common paradigm of a setup Action for a screen, and then a
> collection of Actions which really can be though of as event handlers
> for a given screen (could be a DispatchAction just as well, that
> wouldn't change anything).
>
> If you want to go back to page A from page C, and you got to page C by
> maybe submitting a form, then the problem is that you got to page C via
> an event handler in essence.  But, when you return to page A, you really
> want the setup Action to fire again.  So, just recording the last
> request isn't sufficient.
>
> If you have a base Action that sets that session attribute, then you can
> have only your setup Actions extend that base class.  Then, when you
> want to return to the last page from any other page, you look up that
> value and you now know which SETUP Action you need to call.  More
> precisely, you would look at the second value in session (think of it as
> a stack) because every time a setup Action is called you really need to
> push a value on the stack so that the second value on the stack is truly
> the last page, not the current pages' setup Action.
>
> Does that make any sense to anyone but me?? :)
>
> Frank
> > -
> > 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: data in session affecting performance ?

2006-01-27 Thread Lixin Chu
thank you very much - my memory is not too rusty then - at least I remember
the 32kb threshhold :-(

ok, so my takeaway is that, in general it is ok to use a session scoped
ActionForm with some minimum data but for large list/set we better look it
carefully. Putting them into request scope might be a better choice, if we
have sort of cache supported I guess.


data in session affecting performance ?

2006-01-26 Thread Lixin Chu
Hi,
I saw a thread discussing this but can not find it anymore now. I remember
someone mentioned that the amount of data put into the session context
should not exceed 32KB in general otherwise performance might be affected.

I may interpreted it wrongly. so i would like to clarify if it is indeed the
case and does this also means that a session scoped ActionForm is really bad
in terms of performance ?

thanks
lixin


Re: hard question - Single Sign On

2006-01-22 Thread Lixin Chu
may you would like to take a look at these two:
 Yale's CAS : http://www.ja-sig.org/wiki/display/CAS/Home
 Acegi : http://acegisecurity.org/


>
>
>
>
>
>


Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
1. I use this to set the locale:
request.getSession().setAttribute(Globals.LOCALE_KEY, Lcoale.JAPANESE);

2. yes, properties file has some.

3. the whole page is in english

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



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
that's right, they are the same.

now I follow Laurie's suggestion and found that request.getLocale()
always return 'en' - regardless locale='true' or 'false' setting.

how does this happen ?

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



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
I set to ja in the session;

I removed locale="true" from JSP but the result is the same.

Browser encoding is set to UTF-8.

When I 'view source' in the browser, I saw  if I set
to Chinese. But I do not see this :



is this ok ?

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



[Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
Hi All,
appreciate any help here ...This is what I have done in trying to 
show strings in the selected language:
 - I have various /WEB-INF/classes/ApplicationResources.properties
files, for example APplicationResoruces_ja.properties
 - in struts-config.xml, I have:
   
 - in web.xml I have a filter:


encodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true



 - for each JSP file, I have:
   <%@ page language="java" pageEncoding="UTF-8"
contentType="text/html;charset=UTF-8" %>
   
 ..



   

 - a post login filter to set user's locale based on language setting:
   session.setAttribute("org.apache.struts.action.LOCALE", .)


but the button.add always show English. Anything I missed out ?

I am using Spring framework with Struts 1.2.7, and Tiles.

thanks !
lixin

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



Re: Storing DataSource and ServletContext in the service layer

2005-09-23 Thread Lixin Chu
>
> i think if you use Spring Framework or something similar, you might not
> need to do this by yourself.

 action class accessing DB does not seem to be a good pattern.


Re: Shale ... where can I find out more?

2005-08-18 Thread Lixin Chu
thanks !

On 8/18/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "Lixin Chu" <[EMAIL PROTECTED]>
> 
> > is there a road map/milestone for Shale developemnt ?
> > I am pretty comfortable with Struts now but would like to explore
> > Shale in the next project.
> 
> Craig has posted a roadmap on the Struts Wiki:
>http://wiki.apache.org/struts/StrutsShale
> 
> --
> Wendy
> 
> 
> -
> 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: Shale ... where can I find out more?

2005-08-18 Thread Lixin Chu
is there a road map/milestone for Shale developemnt ? 
I am pretty comfortable with Struts now but would like to explore
Shale in the next project.

thanks
lixin


On 8/18/05, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> On 8/17/05, Joe Germuska <[EMAIL PROTECTED]> wrote:
> > At 11:49 AM +0100 8/17/05, John Atherton wrote:
> > >Okay I've found the place to go for all things Shale but my other two
> > >questions still stand.
> >
> > first, a disclaimer:  I've never written a JSF app let alone a Shale app.
> >
> > >  > Then I came across Shale.  I've never used JSF so firstly, is this now 
> > > the
> > >>  way to go?
> >
> > Roughly, Shale is to JSF as Struts is to JSP: it provides a framework
> > which supports best-practices application development with features
> > that are outside of the scope of the basic Sun technology.
> >
> 
> "Roughly" that's pretty accurate :-), although there is one level of
> internal difference that you will want to be aware of.  JSF includes a
> controller servlet (like Struts and other MVC frameworks), and
> supports other controller features like navigation, itself.  Shale
> builds around the edges to add value (functionality and/or ease of use
> improvements), without any attempt to redundantly implement features
> that JSF provides by itself.
> 
> One place I *don't* see Shale going, by the way, is to become yet
> another library of JSF components.  There will be a few such
> components that integrate directly with Shale features (like the ones
> that integrate the Commons Validator facilities), but the whole idea
> of a standard component API is that you should be able to use
> *anyone's* components with it.
> 
> > If you're going to use JSF, you should probably check out Shale.
> 
> I would agree with this ... especially for new app development.
> 
> > You can use struts-faces to connect JSF to Struts, but if you have no
> > deep Struts experience, you wouldn't be gaining much of anything, and
> > in fact you'd lose all the benefits that Shale has by virtue of
> > learning from several years of Struts development experience.
> >
> 
> The integration library should be primarily considered as a tool
> useful in a migration strategy.
> 
> > >Secondly, where can I find out more?  And finally how steep is
> > >>  the learning curve?  There doesn't appear to be the Shale equivalent of
> > >>  http://struts.apache.org
> >
> 
> Shale's website, by the way, is at:
> 
>   http://struts.apache.org/shale/
> 
> The feature descriptions have not all been fleshed out yet, but the
> javadocs are pretty thorough for those cases.
> 
> > I'm not sure what the second question was: about the learning curve?
> > I'm not the one to answer that.  But since Shale is a subproject of
> > Struts, there is no "shale.apache.org"
> >
> > Since there has not been a full release of Shale, the struts-dev list
> > is generally considered the more fruitful place for discussions about
> > it.
> >
> > Hope this helps,
> > Joe
> >
> 
> Craig
> 
> -
> 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] Hidden Fields V/S session scope

2005-06-20 Thread Lixin Chu
I would think that beside performance, you might also need to think
about how to manage memory for session scoped objects.

on the other hand, if we have some sort of cache facility, performance
may not be a big issue.

On 6/20/05, Nitish Kumar <[EMAIL PROTECTED]> wrote:
> I am again stuck on to the age old debate of Session v/s Request scope form
> beans.
> 
> I have a fairly large amount of data in my form bean, Since I have my own
> pagination logic, I need to keep a large amount of data on jsp, I am using
> hidden fields to move the data back and forth between server and client.
> 
> I just wanted to know, how much of impact would be in terms of performance,
> if I put the data in session compared to passing the data in hidden fields.
> 
> 
> 
> 
> Thanks and Regards,
> Nitish Kumar
> 
> 
> 
> 
>

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




Re: http 404 page

2005-06-16 Thread Lixin Chu
your message size has to be more than 512 bytes otherwise 
the default IE 404 page will be used - if I remember correctly.

On 6/16/05, McDonnell, Colm (MLIM) <[EMAIL PROTECTED]> wrote:
> Use the optional  element defined in web.xml, this allows
> you to map an error code _or_ exception type to the path of a resource
> in the Web application (e.g. a custom page).
> 
> error-code: The http error code e.g. 404
> exception-type: fqcn of a Java exception type
> location: the location of the resource to be displayed in response to
> the error e.g. /pages/404.html
> 
> The web.xml entry might look like this:
> 
> 
> 403
> /pages/403.jsp
> 
> 
> 
> -Original Message-
> From: Tony Smith [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2005 06:08
> To: user@struts.apache.org
> Subject: http 404 page
> 
> 
> If there is a problem, e.g. an action/page can not be
> found, the ugly "Http 404 page not found" page will be
> display. Is there a way to handle such event as Struts
> Exception handling?
> 
> Thanks,
> 
> 
> 
> 
> 
> 
> __
> Discover Yahoo!
> Find restaurants, movies, travel and more fun for the weekend. Check it
> out!
> http://discover.yahoo.com/weekend.html
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> If you are not an intended recipient of this e-mail, please notify the 
> sender, delete it and do not read, act upon, print, disclose, copy, retain or 
> redistribute it. Click here for important additional terms relating to this 
> e-mail. http://www.ml.com/email_terms/
> 
> 
> -
> 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: displayTag needs session scoped objects for sort/export ?

2005-06-12 Thread Lixin Chu
thanks. I do use hibernate. will take a look how to manage it.

On 6/11/05, David G. Friedman <[EMAIL PROTECTED]> wrote:
> If you use Hibernate as your DAO layer, you could enable caching so
> DisplayTag won't hit the database every time, assuming you have the memory
> footprint to support that caching.
> 
> Regards,
> David
> 
> -Original Message-
> From: Lixin Chu [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 11, 2005 6:36 AM
> To: user@struts.apache.org
> Subject: Re: displayTag needs session scoped objects for sort/export ?
> 
> 
> you can but have to hit the DB every time.
> 
> On 6/11/05, Lixin Chu <[EMAIL PROTECTED]> wrote:
> > Hi,
> > would like to clarify with those who use displayTag:
> > is it a must to put list of objects into session to be able sue sort
> > and export function ?
> >
> > thanks
> > lixin
> >
> 
> -
> 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: displayTag needs session scoped objects for sort/export ?

2005-06-11 Thread Lixin Chu
you can but have to hit the DB every time.

On 6/11/05, Lixin Chu <[EMAIL PROTECTED]> wrote:
> Hi,
> would like to clarify with those who use displayTag:
> is it a must to put list of objects into session to be able sue sort
> and export function ?
> 
> thanks
> lixin
>

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



[OT] displayTag needs session scoped objects for sort/export ?

2005-06-10 Thread Lixin Chu
Hi,
would like to clarify with those who use displayTag:
is it a must to put list of objects into session to be able sue sort
and export function ?

thanks
lixin

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



[OT] using JSTL with escapeXML="false" for preview HTML

2005-06-10 Thread Lixin Chu
Hi,
I am trying to preview a piece of html content. but the c:out with
escapeXML=false can not handle space char correctly.

is there an easy way to replace the '  ' with html special space char ?

thanks
lixin

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



Re: AjaxTags v1.0 beta 1 released

2005-06-09 Thread Lixin Chu
Hi,
I am using Struts 1.1, do I have to switch to 1.2 ?

thanks
lixin

On 5/17/05, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Congratulations!  Good work!
> 
> On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> > Finally got it all set up on http://struts.sf.net.  The first "official"
> > release is up!
> >
> > AjaxTags is a project to add AJAX functionality to the existing Struts
> > HTML taglib.  It allows a developer to jump on the AJAX bandwagon
> > without actually writing any code.  It's a completely declarative
> > approach, but with flexibility beyond that if you need it.  It can be
> > added to new or even existing apps without breaking anything, and with
> > the ability to selectively add AJAX functions to only those form
> > elements you want it added to.  All this with very little changes to
> > existing JSPs.
> >
> > Enjoy!
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> "You can lead a horse to water but you cannot make it float on its back."
> ~Dakota Jack~
> 
> -
> 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: Autologin?

2005-05-25 Thread Lixin Chu
i guess http://acegisecurity.sourceforge.net will most likely not
shown in the search list.
you may want to take a look at it if you do not want to develop
something from scratch again.

On 5/25/05, atta-ur rehman <[EMAIL PROTECTED]> wrote:
> I'll start with the first five :)
> 
> http://www.google.com.pk/search?q=servlet+filter&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
> 
> ATTA
> 
> On 5/24/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote:
> > Thank you Michael, that link really helped me.
> >
> > I have one more question. Wendy Smoak mentioned using Filter(s). Could
> > you drop me some links describing what filters are? I 'd like to read
> > something about it.
> >
> > On 5/24/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > > This may help you: http://wiki.apache.org/struts/StrutsRememberMeCookie
> > > You can modify the action and go to directly to user page instead of
> > > showing the "remember me" checkbox.
> > >
> > > On 5/24/05, Jan Ziniewicz <[EMAIL PROTECTED]> wrote:
> > > > I have problems with user logging in my application. Basically I want to
> > > > have functionality same as on gmail.com -- if I have a proper cookie
> > > > forward me to inbox omiting login page.
> > > >
> > > > I know how to play with cookies but struts part of the task is a problem
> > > > for me
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Pozdrawiam,
> > Janek Ziniewicz
> > gg: 902858
> > irc.freenode.net: #gore, #dub
> >
> > -
> > 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: request.getCharacterEncoding always return null ?

2005-05-24 Thread Lixin Chu
I see. thank you all. 

it seems that I have to provide a UI to let user select which locale
he wants  to use. Is it a common implementation ? I was thinking of
checking character encoding in my application so that I can use the
correct locale.


On 5/24/05, Jason Lea <[EMAIL PROTECTED]> wrote:
>  From the java docs:
> 
> getCharacterEncoding
> 
> public java.lang.String getCharacterEncoding()
> 
>Returns the name of the character encoding used in the body of this
> request. This method returns null if the request does not specify a
> character encoding
> 
>Returns:
>a String containing the name of the chararacter encoding, or
> null if the request does not specify a character encoding
> 
> 
> So, the browser might not be sending the character encoding in the
> request.  I think browsers won't send the encoding when default encoding
> is used.  Some browsers might not send it at all.
> 
> 
> Lixin Chu wrote:
> 
> >Hi,
> >I always get null from request.getChaaracterEncoding(), do not know why.
> >
> >I am using Tomcat 5.5.7, Struts 1.1. Tested IE 6.0 and FireFox. Which
> >ever encoding I select in browser, my servlet always reprots as null
> >from the above call.
> >
> >thanks for any info!
> >li xin
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> 
> --
> Jason Lea
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



request.getCharacterEncoding always return null ?

2005-05-24 Thread Lixin Chu
Hi,
I always get null from request.getChaaracterEncoding(), do not know why.

I am using Tomcat 5.5.7, Struts 1.1. Tested IE 6.0 and FireFox. Which
ever encoding I select in browser, my servlet always reprots as null
from the above call.

thanks for any info!
li xin

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



Re: [OT] Recommendation of Instant Messagging System

2005-05-05 Thread Lixin Chu
Hi Erik,
thank you so much for your information. it really helps me go in the
right direction. i will do more homework on XMPP and Smack first.

really appreciate your help !
lixin

On 5/6/05, Erik Weber <[EMAIL PROTECTED]> wrote:
> See my other post, please, if you are limited to using HTTP.
> 
> The modifications I made to Smack (1.4.2) are subtle, and the classes
> are pretty small, but they require some detail to explain properly. The
> library does work as is. It uses two threads -- one that parses incoming
> XML and dumps the generated objects into queues, another that actively
> polls queues and notifies your listeners. I found that in some cases
> where Smack expects you to use one model (active vs passive
> notification), you really would like to use the other. This led (I
> think) to a quote on the Web site that was something like "some
> developers find that the Chat class doesn't meet their needs, so they
> implement their own using PacketCollector, etc.". So I made some
> modifications and wrote a couple new classes related to that. I prefer
> to write my own queues and Runnables because you have more control that
> way. If you are not comfortable doing this, don't worry, their stuff
> works fine as is. You can just register listeners and away you go,
> updating your GUI in event handlers.
> 
> Yes, I would contribute my modifications, but first I need to document
> them (and also make sure they are still needed -- they update fairly
> regularly). I will share them with you either way if you go this route.
> 
> Erik
> 
> P.S. There are Applet chat systems out there that have been around for a
> long time. Don't forget to check those out. Also, there is at least one
> open source Swing client built on Smack that looks pretty good,
> especially in the area of SSL. See the Smack forums and you can find an
> announcement of it. Probably, there are JavaScript-based chat
> implementations out there too. If you are going to use JavaScript and
> have simple requirements, Leon's suggestion might fit the bill.
> 
> 
> Lixin Chu wrote:
> 
> >Hi,
> >I am also interested in integrating a chat engine with my Struts
> >application - with very similar requirements. In fact I posted a msg
> >here before checking this thread !
> >
> >I am not familar with any of the Sockets, ServerSockets, XML API or
> >Threads. So looks like building from scratch is not an option to me;
> >Smack sounds good, but with the problems you pointed out, I doubt if I
> >am able to handle them correctly.
> >
> >Would you contribute your modifcation back to Smack someday ?
> >
> >appreciate your info very much !
> >lixin
> >
> >On 5/5/05, Erik Weber <[EMAIL PROTECTED]> wrote:
> >
> >
> >>I just finished putting together a system with a Swing client and
> >>combined services over XMPP and HTTP.
> >>
> >>I think Leon's suggestion of doing your own is not bad, if you are good
> >>with Sockets, ServerSockets, XML APIs and Threads (find a good tutorial
> >>on building a chat system such as in the ubiquitous "Thinking in Java").
> >>There is also JMS which gives you a low-level core. If you want
> >>something higher level, just get Smack from jivesoftware.com, which will
> >>give you an OO interface to Jabber (XMPP). Then get jabberd from
> >>jabber.org. jabberd 1.4  is small, written in C and gets the job done
> >>for what you are talking about, so I would start with that. They are
> >>working on the 2.0 "enterprise" version.
> >>
> >>I will warn you that while Smack is a great library (you'll get classes
> >>such as "Chat", "Packet", "Message", "Presence", etc.), there are some
> >>pitfalls related to Threading to watch out for. I rewrote about a half
> >>dozen of the core classes. Fortunately, Smack operates with just two
> >>main disptach Threads so once you spend some time with the PacketReader
> >>and XMPPConnection classes, you'll figure it out. Apache license, too.
> >>
> >>Erik
> >>
> >>
> >>masegui wrote:
> >>
> >>
> >>
> >>>The requirements are these:
> >>>1. A user has a list of the other users in the system. He can click a
> >>>button that initiates a conversation with the selected user. The other
> >>>user can accept or not the conversation. If accepts, a "chat room" is
> >>>opened and now then can have a conversation. The rooms only accept 2
> >>>people. We would like a user to be 

Re: [OT] Recommendation of Instant Messagging System

2005-05-05 Thread Lixin Chu
Hi,
I am also interested in integrating a chat engine with my Struts
application - with very similar requirements. In fact I posted a msg
here before checking this thread !

I am not familar with any of the Sockets, ServerSockets, XML API or
Threads. So looks like building from scratch is not an option to me;
Smack sounds good, but with the problems you pointed out, I doubt if I
am able to handle them correctly.

Would you contribute your modifcation back to Smack someday ?

appreciate your info very much !
lixin

On 5/5/05, Erik Weber <[EMAIL PROTECTED]> wrote:
> I just finished putting together a system with a Swing client and
> combined services over XMPP and HTTP.
> 
> I think Leon's suggestion of doing your own is not bad, if you are good
> with Sockets, ServerSockets, XML APIs and Threads (find a good tutorial
> on building a chat system such as in the ubiquitous "Thinking in Java").
> There is also JMS which gives you a low-level core. If you want
> something higher level, just get Smack from jivesoftware.com, which will
> give you an OO interface to Jabber (XMPP). Then get jabberd from
> jabber.org. jabberd 1.4  is small, written in C and gets the job done
> for what you are talking about, so I would start with that. They are
> working on the 2.0 "enterprise" version.
> 
> I will warn you that while Smack is a great library (you'll get classes
> such as "Chat", "Packet", "Message", "Presence", etc.), there are some
> pitfalls related to Threading to watch out for. I rewrote about a half
> dozen of the core classes. Fortunately, Smack operates with just two
> main disptach Threads so once you spend some time with the PacketReader
> and XMPPConnection classes, you'll figure it out. Apache license, too.
> 
> Erik
> 
> 
> masegui wrote:
> 
> >The requirements are these:
> >1. A user has a list of the other users in the system. He can click a
> >button that initiates a conversation with the selected user. The other
> >user can accept or not the conversation. If accepts, a "chat room" is
> >opened and now then can have a conversation. The rooms only accept 2
> >people. We would like a user to be able to have several conversations at
> >a time, but each conversation only between 2 people.
> >
> >Thanks in advance.
> >
> >Miquel Angel Segui
> >
> >
> >
> >><-Original Message->
> >>From: Leon Rosenberg
> >>Sent: 4/5/2005 10:50:38 AM
> >>To: user@struts.apache.org
> >>Subject: Re: [OT] Recommendation of Instant Messagging System
> >>
> >>if your only functionality is to allow users to send each other
> >>
> >>
> >messages
> >
> >
> >>which are embedded in the site (html, or something, but no
> >>standalone-desktop solutions) forget about existing systems and
> >>implement it by yourself.
> >>I have implemented dozens of such systems over the time, it's normally
> >>about 100 locs, much less effort than an integration of an existing
> >>system is.
> >>
> >>maybe you could tell us a bit more, about the requirements of the
> >>system, so we could give you more specific answer.
> >>
> >>regards
> >>Leon
> >>
> >>On Wed, 2005-05-04 at 08:13 +0200, Miquel Angel wrote:
> >>
> >>
> >>>We are developing an application (struts 1.1 + Tomcat 5.5 + Java
> >>>
> >>>
> >1.4). One
> >
> >
> >>>of the requirements is to implement an instant messaging system for
> >>>
> >>>
> >the
> >
> >
> >>>users of the site (the system should not be very complex). Do you
> >>>
> >>>
> >mind to
> >
> >
> >>>share your experience in using this system. We are looking for free
> >>>
> >>>
> >or non
> >
> >
> >>>free systems.
> >>>
> >>>
> >>>Thanks in advance.
> >>>
> >>>Miquel Angel Segui
> >>>
> >>>
> >>>
> >>>
> >>>-
> >>>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]



chat engine to integrate with Struts application ?

2005-05-05 Thread Lixin Chu
hi,
I am looking for a chat engine that I can integrate it into my Struts
based web application. basically, my application wants to do the
following things:
 - get notified when a client wants to open a chat
 - redirect to the target audience for the incoming chat request based
on pre-configured logic.
 - provide reports of chat activities

any suggestion of what chat engine I can use ?

thanks
lixin

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



Re: [ANNOUNCE] Struts xmoon 0.6.1

2004-11-19 Thread Lixin Chu
Hi,
that's something interesting. would like to know the design intent a bit more:
 beside supporting scripting,  what are the other use cases ? 
dynamically change the functionality of an action class at run time ?
li xin


On Fri, 19 Nov 2004 12:04:46 +0100, Mario Neè <[EMAIL PROTECTED]> wrote:
> [ANNOUNCE] Struts xmoon 0.6.1
> 
> http://www.xmoon.org
> 
> Download Now:
> http://www.xmoon.org/download.php
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: LookupDispatchAction problem with double byte resource files - working with DisplayTag ?

2004-10-30 Thread lixin chu
Hi Jack,
you are right, it is indeed mixed up - all becuase I
need to support action chaining. So I had to modify
your code a bit 'cus it seems that the simple
MyAction.dispatch can not support my case.

secondly, I just realize that even my 
code is wrong becuase 'value=xxx' will be used as
label as well.

it seems that i can not simply use myAction.dispatch
way to indicate which method I need and decouple the
label/action at the same time. 
but your code certainly inspires me a lot. i am still
working on this now.

thanks a lot.
li xin

--- Dakota Jack <[EMAIL PROTECTED]> wrote:

> Hello, Chu,
> 
> You seem to be a bit mixed up.  I am not even sure
> which solution you
> are using anymore.  However, if you are using the
> solution at
> www.michaelmcgrady.com/button we discussed, then you
> have this coded
> wrong.
> 
> First, you should have nothing in the parameter
> attribute of your
> action mapping.  That is, the following code should
> be deleted.
> 
> 
>  ...
>  
>  ...
> 
> 
> Second, the code 
> 
>property="ListPermission.dispatch" value="done">
>   
> 
> 
> is right only if you are trying to use a method
> called
> "ListPermission".  If you are trying to use a method
> called "done"
> with an action called "ListPermission", then this
> code should be:
> 
> property='done.dispatch">
>   
> 
> 
> This will result in the following parameters, for
> example, being in
> the request: done.dispatch.x=9 and
> done.dispatch.y=37.
> 
> You are making things too complex.  The solution
> simply needs whatever
> action [myAction' you want to be the value of the
> property attribute
> with ".dispatch" as a suffix, e.g.
> property=myAction.suffix.
> 
> Jack
> 
> 
> On Sat, 30 Oct 2004 05:18:41 -0700 (PDT), lixin chu
> <[EMAIL PROTECTED]> wrote:
> > problem solved - I made a mistake in the JSP file,
> > here is the right one to return a parameter for a
> > submit button:
> >  >   property="ListPermission.dispatch"
> value="done">
> >  
> >  
> > 
> > So in this case, if the Done button is pressed,
> > 'ListPermission.dispatch=done' is sent to the
> server.
> > 
> > So now I hope I have a complete decoupled, I18N
> aware
> > DispatchAction. Thanks Jack !!!
> > 
> > li xin
> > 
> > 
> > 
> > 
> > --- lixin chu <[EMAIL PROTECTED]> wrote:
> > 
> > > I realize that the problem is action chaining.
> > >
> > > In my code, action one goes on to the next
> action -
> > > I
> > > persume that the parameters passed to the first
> > > action
> > > are still passed on to the next. here the
> problem
> > > comes in: new parameter is appended at end so
> > > getMethodName always gets the earlier parameter.
> > >
> > > So I tried to use a class specific parameter
> > > (together
> > > with the parameter used in Action mapping). This
> > > solves action chaining but them I got the submit
> > > button problem:
> > >
> > > here is my jsp file:
> > >  > > property="ListPermission.dispatch=done">
> > >  
> > > 
> > >
> > > here is the partial action mapping:
> > > 
> > >   ...
> > >   
> > >   ...
> > > 
> > >
> > > the intersting thing is that when the 'Done'
> button
> > > is
> > > clicked, the property is not passed in as
> parameter.
> > > I
> > > am lost. do not know why it is like this.
> > >
> > > anyway, thank you very much for your code and
> > > anwser.
> > >
> > > li xin
> > >
> > >
> > >
> > > --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> > >
> > > > I notice that your original question had to do
> > > with
> > > > multiple submit
> > > > buttons, but that your code here only has one
> > > submit
> > > > button.  You
> > > > cannot necessarily take a solution for one
> problem
> > > > and use if for
> > > > others.  I don't know about the display tag,
> so I
> > > am
> > > > not sure if you
> > > > are doing the right thing here.  I don't have
> time
> > > > to look at it in
> > > > further detail at this time.
> > > >
> > > > Jack
> > > &

Re: LookupDispatchAction problem with double byte resource files - working with DisplayTag ?

2004-10-30 Thread lixin chu
problem solved - I made a mistake in the JSP file,
here is the right one to return a parameter for a
submit button:

 
 

So in this case, if the Done button is pressed, 
'ListPermission.dispatch=done' is sent to the server.

So now I hope I have a complete decoupled, I18N aware
DispatchAction. Thanks Jack !!!


li xin


--- lixin chu <[EMAIL PROTECTED]> wrote:

> I realize that the problem is action chaining.
> 
> In my code, action one goes on to the next action -
> I
> persume that the parameters passed to the first
> action
> are still passed on to the next. here the problem
> comes in: new parameter is appended at end so
> getMethodName always gets the earlier parameter.
> 
> So I tried to use a class specific parameter
> (together
> with the parameter used in Action mapping). This
> solves action chaining but them I got the submit
> button problem:
> 
> here is my jsp file:
>  property="ListPermission.dispatch=done">
>  
>  
> 
> here is the partial action mapping:
> 
>   ...
>   
>   ...
> 
> 
> the intersting thing is that when the 'Done' button
> is
> clicked, the property is not passed in as parameter.
> I
> am lost. do not know why it is like this.
> 
> anyway, thank you very much for your code and
> anwser.
> 
> li xin
> 
> 
> 
> --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> 
> > I notice that your original question had to do
> with
> > multiple submit
> > buttons, but that your code here only has one
> submit
> > button.  You
> > cannot necessarily take a solution for one problem
> > and use if for
> > others.  I don't know about the display tag, so I
> am
> > not sure if you
> > are doing the right thing here.  I don't have time
> > to look at it in
> > further detail at this time.
> > 
> > Jack
> > 
> > On Fri, 29 Oct 2004 19:46:53 -0700 (PDT), lixin
> chu
> > <[EMAIL PROTECTED]> wrote:
> > > hi jack,
> > > thanks, the solution is cool ! I am trying it.
> > > 
> > > a small problem i am experiencing now is that (i
> > am
> > > not sure if there is something wrong in my
> > > configuration), the parameter on one page is
> > passed on
> > > to the next page, so when we getMethod, the
> > earlier
> > > method name is returned.
> > > 
> > > I have one 'Search Template' page, which gets
> the
> > > search criteria and then pass the results to the
> > > ListTemplate.jsp page after pressing the Search
> > button
> > > (it is associated with the 'search.dispatch'
> > > parameter). The 'list parameter' page has a
> > sortable
> > > table (i am using DisplayTag):
> > > 
> > > 
> > >  > >pagesize="10"
> > >id="templates"
> > >sort="list" export="true"
> > >requestURI="/Canal/admin/ListTemplate.do?
> > >sort.dispatch">
> > > 
> > >  name="basic.empty.showtable"
> > >  value="true"/>
> > >
> > >   > > name="value( > name="templates"
> > > property="id"/>)" value="x"/>
> > >
> > > > > sortable="true"
> > >   
> > href="TemplateManager.do?prepare.dispatch"
> > >paramId="templateID"
> > paramProperty="id"/>
> > > > >property="category.name"
> > sortable="true"
> > >   
> > href="TemplateManager.do?prepare.dispatch"
> > >paramId="templateID"
> > paramProperty="id"/>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > the problem is that the additional
> > > search.dispatch=Search is inserted into the
> > requestURI
> > > when I 'view source'. I have no idea.
> > > 
> > > I am not sure if it is the DisplayTag limitation
> > > though ...
> > > 
> > > thanks
> > > li xin
> > > 
> > > --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> > > 
> > > > All of your problems are caused because
> > > > LookupDispatchAction creates a
> > > > reverse mappi

Re: LookupDispatchAction problem with double byte resource files - working with DisplayTag ?

2004-10-30 Thread lixin chu
I realize that the problem is action chaining.

In my code, action one goes on to the next action - I
persume that the parameters passed to the first action
are still passed on to the next. here the problem
comes in: new parameter is appended at end so
getMethodName always gets the earlier parameter.

So I tried to use a class specific parameter (together
with the parameter used in Action mapping). This
solves action chaining but them I got the submit
button problem:

here is my jsp file:

 
 

here is the partial action mapping:

  ...
  
  ...


the intersting thing is that when the 'Done' button is
clicked, the property is not passed in as parameter. I
am lost. do not know why it is like this.

anyway, thank you very much for your code and anwser.

li xin



--- Dakota Jack <[EMAIL PROTECTED]> wrote:

> I notice that your original question had to do with
> multiple submit
> buttons, but that your code here only has one submit
> button.  You
> cannot necessarily take a solution for one problem
> and use if for
> others.  I don't know about the display tag, so I am
> not sure if you
> are doing the right thing here.  I don't have time
> to look at it in
> further detail at this time.
> 
> Jack
> 
> On Fri, 29 Oct 2004 19:46:53 -0700 (PDT), lixin chu
> <[EMAIL PROTECTED]> wrote:
> > hi jack,
> > thanks, the solution is cool ! I am trying it.
> > 
> > a small problem i am experiencing now is that (i
> am
> > not sure if there is something wrong in my
> > configuration), the parameter on one page is
> passed on
> > to the next page, so when we getMethod, the
> earlier
> > method name is returned.
> > 
> > I have one 'Search Template' page, which gets the
> > search criteria and then pass the results to the
> > ListTemplate.jsp page after pressing the Search
> button
> > (it is associated with the 'search.dispatch'
> > parameter). The 'list parameter' page has a
> sortable
> > table (i am using DisplayTag):
> > 
> > 
> >  >pagesize="10"
> >id="templates"
> >sort="list" export="true"
> >requestURI="/Canal/admin/ListTemplate.do?
> >sort.dispatch">
> > 
> >  >  value="true"/>
> >
> >   > name="value( name="templates"
> > property="id"/>)" value="x"/>
> >
> > > sortable="true"
> >   
> href="TemplateManager.do?prepare.dispatch"
> >paramId="templateID"
> paramProperty="id"/>
> > >property="category.name"
> sortable="true"
> >   
> href="TemplateManager.do?prepare.dispatch"
> >paramId="templateID"
> paramProperty="id"/>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > the problem is that the additional
> > search.dispatch=Search is inserted into the
> requestURI
> > when I 'view source'. I have no idea.
> > 
> > I am not sure if it is the DisplayTag limitation
> > though ...
> > 
> > thanks
> > li xin
> > 
> > --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> > 
> > > All of your problems are caused because
> > > LookupDispatchAction creates a
> > > reverse mapping from the value of a parameter to
> its
> > > key, in order to
> > > get the method name.  This is not only resource
> > > intensive but also a
> > > constant source of the sorts of difficulties you
> are
> > > experiencing. You
> > > can find what are better alternatives in various
> > > places.  Some of them
> > > are itemized at
> > > http://www.michaelmcgrady.com/button/ .
> > >
> > > Jack
> > >
> > >
> > > On Wed, 27 Oct 2004 22:17:56 -0600, Kumar V
> Kadiyala
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi all,
> > > >
> > > > I'm using LookupDispatchAction to submit a
> form
> > > with multiple submit
> > > > buttons. The labels of the buttons are
> translated.
> > > The translated strings
> > > > are in a .properties file. I'm able to run the
> web
> > > app fine in English but
> > > > when I switch to Korean none of the the submit
> > > buttons work and I see the
> > >

Re: LookupDispatchAction problem with double byte resource files - working with DisplayTag ?

2004-10-29 Thread lixin chu
hi jack,
thanks, the solution is cool ! I am trying it.

a small problem i am experiencing now is that (i am
not sure if there is something wrong in my
configuration), the parameter on one page is passed on
to the next page, so when we getMethod, the earlier
method name is returned.

I have one 'Search Template' page, which gets the
search criteria and then pass the results to the
ListTemplate.jsp page after pressing the Search button
(it is associated with the 'search.dispatch'
parameter). The 'list parameter' page has a sortable
table (i am using DisplayTag):







 )" value="x"/> 
   
   
   









the problem is that the additional
search.dispatch=Search is inserted into the requestURI
when I 'view source'. I have no idea. 

I am not sure if it is the DisplayTag limitation
though ...

thanks
li xin






--- Dakota Jack <[EMAIL PROTECTED]> wrote:

> All of your problems are caused because
> LookupDispatchAction creates a
> reverse mapping from the value of a parameter to its
> key, in order to
> get the method name.  This is not only resource
> intensive but also a
> constant source of the sorts of difficulties you are
> experiencing. You
> can find what are better alternatives in various
> places.  Some of them
> are itemized at
> http://www.michaelmcgrady.com/button/ .
> 
> Jack
> 
> 
> On Wed, 27 Oct 2004 22:17:56 -0600, Kumar V Kadiyala
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > 
> > I'm using LookupDispatchAction to submit a form
> with multiple submit
> > buttons. The labels of the buttons are translated.
> The translated strings
> > are in a .properties file. I'm able to run the web
> app fine in English but
> > when I switch to Korean none of the the submit
> buttons work and I see the
> > following message in the log.
> > [10/27/04 21:40:39:631 MDT] 67f967f9 DispatchActio
> E
> > org.apache.struts.actions.DispatchAction 
> Request[/tag] does not contain
> > handler parameter named method
> > 
> > The Korean .properties was converted to ascii
> (using nativetoascii) from
> > its native encoding. Does this have to do anything
> with what I'm noticing?
> > Should something additional be done when
> .properties files are coverted to
> > ascii?
> > 
> > Help appreciated,
> > Kumar
> > 
> 
> 
> -- 
> "You can't wake a person who is pretending to be
> asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary
> for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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



RE: mechanism to clear objects in the session

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

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

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

Re: mechanism to clear objects in the session

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



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

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


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

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



mechanism to clear objects in the session

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

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

thanks
li xin

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

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



Re: need advice: session scoped objects or session scoped ActionForm ?

2004-10-12 Thread lixin chu
actually I do not like either option. my understanding
is:
* session scoped obejcts (I mean those put into the
session using request.getSession().setAttribute()) are
like global variables. I need to take care of
potential naming conflict-but I can not use fully
qualified domain name type of naming convention
because some tags resever the '.'; clean them when no
longer used - but there are chances that they are not
cleaned if the user does not click Done or Cancel but
jump to other pages by select menu items; 

* session scoped ActionForm should not be used to keep
application data but only UI related stuff

The other possible solution is to use Workflow
extenstion but I feel that it is not flexible enough.
And in fact workflow extension keeps data in the
session also so fundamentally no difference.

I guess it is the limitation of the current J2EE
implementation. 

Looks like I will choose to use
request.getSession().setAttribute way of keeping some
necessary data to support those use cases.





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

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



need advice: session scoped objects or session scoped ActionForm ?

2004-10-12 Thread lixin chu
Hi,
I am seeking your expert advice:
I have a simple page with Done and Cancel buttons. If
any of these buttons are clicked, I suppose to go back
to the calling page - there are a few pages that will
come to this page. It is a simple workflow type of
thing. 
So I need to know the retutn URL, pls some other
stuff.

The question is, where do I keep the return URL which
is passed in as request attribute ? 

Since the current page has some other buttons not just
Done and Cancel, I use LookupDispatchAction, that
means I have to keep the return URL in the session.
Which one is a better solution: keeping it in the
session scoped ActionForm or
request.getSession().setAttribute ? 

It is easier to manage the return URL if put into
ActionForm becuase it is isolated, no naming
conflict-bur ActionForm is for UI components only;
otherwise, I need to keep it in the session using a
name reference something like myAction_returnURL, and
also I need to handle the cleaning - it is still
possible that the sting is kept in the session until
the session is closed if the user does not click Done
or Cancel.

any best practice ? may be the best is to avoid using
session scope objects but I just can not think of a
way out for my use case.

thanks in advance
LX




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

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



Re: How To Display Check Boxes in Struts?

2004-10-05 Thread lixin chu
something like this:
)"
value="x"/>

--- Caroline Jen <[EMAIL PROTECTED]> wrote:

> I am able to create check boxes using HTML. But, I
> do
> not know how to display check boxes in Struts.
> 
> Here is what I plan to do:
> 
> I have a JavaBean, which gets its properties
> populated
> through database table query. For example, this
> JavaBean has three properties; lastName, title,
> emailAddress.
> 
> And I have a Collection of such a JavaBean because
> there are thousands of people in the database table.
> 
> Now, it gets to the JSP web page. I am going to
> display a table with four columns:
> 
> first column: a check box
> second column: Last Name
> third column: Title
> fourth column: E-Mail Address
> 
> If client puts a check mark in a check box, the
> value
> of the emailAddress is passed for processing.
> 
> How do I display check boxes from a Collection of
> JavaBean?
> 
> 
>   
> ___
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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



looking for sample code of importing data into a database

2004-10-04 Thread lixin chu
Hi,
I am looking for sample code/plug-in that can import
data into a database. Idealy it can support both CSV
and XML format.

I need to import user info from a legacy system into a
new mySQL database. Wondering if there is a package
available for user to import the data from browser.

very much like Yahoo/Gmail 'import contact'

thanks in advance
li xin



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

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



RE: Validator with DispatchAction...help!...newbie

2004-09-14 Thread lixin chu
There is an interesting article talking about
validation in DispatchAction. That may not be what you
are looking for but I would like to know if the method
suggestted by the author is a good choice or not:
http://www.reumann.net/struts/articles/request_lists.jsp

Another common practice is to have a isMutable()
method in ActionForm. However, it relies on the
Actions to play around the 'mutable' property
carefully. And is something goes wrong and the
property is set/reset properly, then things may go
wild. 

Any comments ?

lixin


--- Robert Taylor <[EMAIL PROTECTED]> wrote:

> ValidatorForm, ValidatorActionForm,
> DynaValidatorForm, and DynaValidatorActionForm allow
> you to leverage the validation framework in Struts.
> 
> How you use DispatchAction determines what you need
> to do to make it
> work with the validation framework.
> 
> For example there are two basic approaches:
> 
> 1. Differentiate different validation routines based
> on form name.
>Using DispatchAction you could use the same form
> and identify it
>with different names in the struts-config.xml
> file. You can then
>ensure that each action mapping using the
> DispatchAction used the
>appropriate form name to invoke the appropriate
> validation rules
>in validation.xml.
> 
> 
> 2. Differentiate different validation routines based
> on action mapping.
>Using DispatchAction you could use the same form
> with the same
>identity. You can then use different action
> mappings which all map
>to the same DispatchAction using the same form.
> Each unique action
>mapping would then invoke the appropriate
> validation rules in
>validation.xml.
> 
> 
> 
> There are other variations of DispatchAction such as
> MappedDispatchAction
> and LookupDispatchAction. Each of these might be
> leveraged differently
> to work with the validation framework. I've yet to
> use them, so I can't
> offer any advice; however, recently, there have been
> some healthy threads
> on both. Just don't ask Rick about
> LookupDispatchAction and you'll be okay :)
> 
> 
> Now, it gets kind of tricky when you want to use
> DispatchAction (or some variant
> there of) to perform different validation routines
> using the same form name and
> the same action mapping. This is typical when you
> have a single form with multiple buttons, where each
> button invokes a different
> operation on the DispatchAction and
> you want to use different validation routines for
> each operation.
> 
> Since validation routines basically key off of the
> name attribute of the form
> element in validation.xml, you can modify/override
> the getValidationKey() in
> ValidatorForm or ValidatorActionForm to
> return a name including the invoked operation. There
> are probably other ways
> to do this and most likely more elegant. I think you
> can also use the form name
> in conjunction with the page attribute as the
> validation key but I haven't done this
> yet.
> 
> 
> Digging around the source code always helps me to
> understand how things work.
> 
> 
> 
> robert
> 
> > -Original Message-
> > From: O. Oke [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 14, 2004 8:04 PM
> > To: Struts Users Mailing List
> > Subject: Validator with
> DispatchAction...help!...newbie
> >
> >
> >  --- Matt Bathje <[EMAIL PROTECTED]> wrote:
> > > O. Oke wrote:
> > >
> > > > Can anyone please tell me how to use the
> Struts
> > > > Validator with DispatchAction.
> > > >
> > > > This article in bugzilla does not seem to deal
> > > with
> > > > the issue:
> > > >
> > >
> >
>
http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=8633
> > > >
> > > > Thank you.
> > > >
> > > > Ola
> > > >
> > >
> > >
> > > Ola - we more information to be able to help
> you. I
> > > can't even tell what
> > > your problem is, or why you think that bugzilla
> > > report is/isn't related
> > > to it. (Also, there are hundreds of bugzilla
> reports
> > > that do not apply
> > > to your problem...that doesn't mean they are
> helpful
> > > to explain what is
> > > going on.)
> > >
> > >
> > > Matt
> > >
> > >
> >
> > Matt,
> >
> > Please find further detail below:
> >
> >
> > GENERAL INFORMATION
> > ===
> > My understanding is that the Stuts validator is
> not
> > designed to work with classes that extend
> > DispatchAction (as against Action).  However, the
> > information I have found on the internet appears
> to
> > suggest that there is a way to make them work with
> > each other.  This article
> >
>
(http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=8633)
> > is meant to be an explanation of howto, but on
> closer
> > examination, it did not seem to deal with the
> issue.
> >
> > Can you please tell me how to make them work with
> each
> > other?
> >
> > Thank you.
> >
> > Ola.
> >
> >
> >
> >
> >
> >
>
___ALL-NEW
> Yahoo! Messenger - all new features - even more fun!
> http://uk.messenger.yah

Re: Help - struggling this for days !

2004-09-10 Thread lixin chu
yes, I have a few pages, forms and actions. the
strange thing is that some works fine. I in one
particula action, I copy the key used in another
action which works, but it does not work in this
action.

Here is the action defintion:

 
 
 


In SearchTemplateForm.java, I have validate() which is
indeed called and action errors is set when name is
null, but it just not displayed on the jsp.

The flow is, I click a menu item, which pass a
parameter 'Prepare' to a LookupDispatchAction. But
before that the Validate() is called and suppose to
return back with erros and then display the Tiles
right ?

Here is the validate():

ActionErrors errors = null;
String parameter = request.getParameter ("method");
if (parameter == null ||  !
parameter.equalsIgnoreCase("prepare")) {
if ((name == null) || (name.length() < 1)) {
errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("errors.required", "Template name"));
}
}
return errors;



very strange !!!



--- Bryce Fischer <[EMAIL PROTECTED]> wrote:

> I assume that when you say
> messages.add(ActionMessages.GLOBAL_MESSAGE, new
> ActionMessage("something 
> here");
> 
> the "something here" corresponds to a key in your
> messages.properties 
> file (or whichever file has your resource messages)?
> 
> > lixin chu wrote:
> >
> >> Here is how I prepare action messages in Action:
> >>
> >> ActionMessages messages = new ActionMessages();
> >> messages.add(ActionMessages.GLOBAL_MESSAGE, new
> >> ActionMaessage ("something here"));
> >> saveMessages(request, messages);
> >>
> >> anything wrong ? 
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

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



Re: Help - struggling this for days !

2004-09-10 Thread lixin chu
thanks. 
it dislpays a nice table but no actual items. am i
suppose to modify anything in this file ?


--- Bill Siggelkow <[EMAIL PROTECTED]> wrote:

> You might try using the following JSP fragment
> (compliments of James 
> Mitchell) on your page -- it will show you objects
> in the request, etc.
> 
> 
> 
> Debug Information:
> 
>   
>style="background:aqua">Specific JSTL
> values
>   
> 
>   param.pageSize
>   
> 
> 
>   pageSize
>   
> 
> 
>   param.begin
>   
> 
> 
>   begin
>   
> 
> 
>   testLink
>   
> 
> 
> 
>   
>   Request
> Parameters
>   
>   
> 
>   
>   
>   
>   
>   
>   
> 
>   
> 
>   
>   Header
> Values
>   
>   
> 
>   
>   
>   
>   
> 
>   
> 
>   
>style="background:aqua">Initialization 
> Parameters
>   
>   
> 
>   
>   
> 
>   
> 
>   
>style="background:aqua">Cookies
>   
>   
> 
>   
>   
> 
>   
> 
> 
>   
>style="background:aqua">page
>   
>   
>   
> 
>   
>   
> 
> 
>   
> 
> 
>   
>style="background:aqua">request
>   
>   
> 
>   
>       
> 
>   
> 
> 
>   
>style="background:aqua">session
>   
>   
> 
>   
>   
> 
>   
> 
> 
>   
>style="background:aqua">application
>   
>   
> 
>   
>value="${itm.value}"/>
> 
>   
> 
> ---
> 
> lixin chu wrote:
> 
> > Here is how I prepare action messages in Action:
> > 
> > ActionMessages messages = new ActionMessages();
> > messages.add(ActionMessages.GLOBAL_MESSAGE, new
> > ActionMaessage ("something here"));
> > saveMessages(request, messages);
> > 
> > anything wrong ?
> > 
> > 
> > 
> > --- lixin chu <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>Hi,
> >>Appreciate your help, I have been trying to find
> out
> >>why for days.
> >>
> >>Here is my JSP:
> >>
> >>Search Templates
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>   
> >>   
> >>   
> >>color=#FF>Name*:
> >>>>size=20/>
> >>   
> >>
> >>   
> >>   Category*
> >>:
> >>   
> >>
> 
=== message truncated ===


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

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



Re: Help - struggling this for days !

2004-09-10 Thread lixin chu
Here is how I prepare action messages in Action:

ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMaessage ("something here"));
saveMessages(request, messages);

anything wrong ?



--- lixin chu <[EMAIL PROTECTED]> wrote:

> Hi,
> Appreciate your help, I have been trying to find out
> why for days.
> 
> Here is my JSP:
> 
> Search Templates
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
>
>Name*:
> size=20/>
>
> 
>
>Category*
> :
>
> 
>property="name" labelProperty="name"/>
>
>
>
>
>
>
> property="method"> key="button.search"/>
>
>
>
>
>   
> 
> 
> I got error message in log file:
> 2004-09-10 23:31:21 StandardWrapperValve[action]:
> Servlet.service() for servlet action threw exception
> javax.servlet.jsp.JspException: ServletException in
> '/WEB-INF/tiles/SearchTemplate.jsp': Cannot find
> bean
> messages in any scope
>   at
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:964)
>   at
>
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:503)
>   at
>
org.apache.jsp.WEB_002dINF.layouts.layout_jsp._jspx_meth_tiles_insert_5(layout_jsp.java:261)
>   at
>
org.apache.jsp.WEB_002dINF.layouts.layout_jsp._jspService(layout_jsp.java:129)
>   at
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>   at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
>   at
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
>   at
>
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
>   at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
>   at
>
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:506)
>   at
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:443)
>   at
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:359)
>   at
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1074)
>   at
>
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:303)
>   at
>
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:279)
>   at
>
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:342)
>   at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
>   at
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1176)
>   at
>
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:472)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
>   at
>
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:86)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
>   at
>
org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:117)
>   at
>
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
>   at
>
net.canal.core.filter.SecurityFilter.doFilter(SecurityFilter.java:129)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi

Help - struggling this for days !

2004-09-10 Thread lixin chu
Hi,
Appreciate your help, I have been trying to find out
why for days.

Here is my JSP:

Search Templates






















   
   
   
   Name*:
   
   

   
   Category*
:
   

  
   
   
   
   
   
   
   
   
   
   
   
  


I got error message in log file:
2004-09-10 23:31:21 StandardWrapperValve[action]:
Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: ServletException in
'/WEB-INF/tiles/SearchTemplate.jsp': Cannot find bean
messages in any scope
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:964)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:503)
at
org.apache.jsp.WEB_002dINF.layouts.layout_jsp._jspx_meth_tiles_insert_5(layout_jsp.java:261)
at
org.apache.jsp.WEB_002dINF.layouts.layout_jsp._jspService(layout_jsp.java:129)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:506)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:443)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:359)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1074)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:303)
at
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:279)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:342)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1176)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:472)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:86)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:117)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
net.canal.core.filter.SecurityFilter.doFilter(SecurityFilter.java:129)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java

Re: Single sign-on

2004-09-09 Thread lixin chu
open source Yale CAS could be one possible choice.

--- "Prasad, Kamakshya"
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> We have lot of web application built on struts for
> which we need to
> provide single sign-on. 
> Please advise me how to implement the same.
> 
> We are using Weblogic 8.1 as the app server.
> 
> Regards,
> KP
>  
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Help ---- Error: can not find bean messages in any scope

2004-09-07 Thread lixin chu
Hi,
I got this error log 
~~
07.09.04 15:21:34 [http8080-Processor24] ERROR
org.apache.struts.taglib.tiles.InsertTag -
ServletException in '/WEB-INF/tiles/home.jsp': Cannot
find bean messages in any scope
javax.servlet.ServletException: Cannot find bean
messages in any scope
..
~~

Here is part of the home.jsp file:
--
Define a Template



















..
---

In the Action class, I have these:
~~
ActionMessages messages = getMessages(request);
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage ("Org convert error"));
saveMessages (request, messages);

~~~
the above code is called only when there is some
error. 

what's wrong ?

thanks
li xin



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

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



Struts messages are not displayed in JSP

2004-09-06 Thread lixin chu
Hi,
I gies a strange problem, the messages are not
displayed. here is the code in my Action:

messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage ("templates List error"));
saveMessages (request, messages);


In JSP:










however, the messages are not displayed when the code
is indeed executed.

Instead, I saw error in log file:

javax.servlet.jsp.JspException: ServletException in
'/WEB-INF/tiles/DisplayTemplate.jsp': Cannot find bean
messages in any scope
..


I thought the 'messgaes' is already in request scope.

And more strange, I also find the error message in log
file:

2004-09-06 22:12:50
[EMAIL PROTECTED]:
Exception Processing ErrorPage[errorCode=404,
location=/WEB-INF/pages/404.jsp]
ClientAbortException:  java.net.SocketException:
Connection reset by peer: socket write error
at
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:374)
at
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:340)
at
org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.java:552)
at
org.apache.coyote.tomcat5.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:285)
at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:357)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:205)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)



I am debugging on one PC, so I do not understand the
'Connection reset by peer' error.

It seems that this error is cause by the following
display tag - however, I can see the page rendered
correctly:



 
)" value="x"/> 
   
   
   




--

I have no idea now.

appreciate your help !

li xin






__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-
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 lixin chu
I see. Checked API doc, saw getServlet() call for
Action. Guess this is what I need to use. 
thanks !

--- Paul McCulloch <[EMAIL PROTECTED]>
wrote:

> I think it was me who pointed you down that route to
> destroy & recreate a
> form bean to clear any data in it.
> 
> reset() is not used for this purpose -  read up on
> what reset() does. 
> 
> "servlet" is a variable of Action and is available
> in all methods of your
> own Action classes.
> 
> Paul
> 
> > -Original Message-
> > From: lixin chu [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, August 28, 2004 3:52 AM
> > To: [EMAIL PROTECTED]
> > Subject: ActionForm: simply calling reset() or
> have to recreate one ?
> > 
> > 
> > Hi,
> > IN one of my Actions I need to clear the existing
> > session scoped ActionForm, should I just call
> > form.reset() and then repopulate values, or I have
> to
> > remove it and recreate it using RequestUtils ?
> > 
> > I saw a recent message talking about this, but I
> am
> > not sure if I have to recreate one. If so, how do
> I
> > get the servlet parameter needed in:
> > 
> > RequestUtils.createActionForm(request, mapping,
> > mapping.getModuleConfig(), servlet);
> > 
> > thanks !
> > 
> > li xin
> > 
> > 
> > 
> > 
> > ___
> > Do you Yahoo!?
> > Win 1 of 4,000 free domain names from Yahoo! Enter
> now.
> > http://promotions.yahoo.com/goldrush
> > 
> >
>
-
> > 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]
> 
> 


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



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

2004-08-27 Thread lixin chu
Hi,
IN one of my Actions I need to clear the existing
session scoped ActionForm, should I just call
form.reset() and then repopulate values, or I have to
remove it and recreate it using RequestUtils ?

I saw a recent message talking about this, but I am
not sure if I have to recreate one. If so, how do I
get the servlet parameter needed in:

RequestUtils.createActionForm(request, mapping,
mapping.getModuleConfig(), servlet);

thanks !

li xin




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: duplication of codes in different Action class

2004-08-24 Thread lixin chu
so JSP1 should be associated with another Action,
which fetch data from DB and setAttribute in request
or session.

You should make your Action not the JSP1 available to
the user.

--- Sebastian Ho <[EMAIL PROTECTED]> wrote:

> Hi
> 
> Scenario :
> 
> 1. User submits form in JSP1 which Action1 saves to
> database.
> 2. Action1 set Form1 into session.
> 3. Action1 forwards to JSP1 again, which is suppose
> to display newly
> added form with other forms previously added.
> 
> How do I make JSP1 to get values from database
> BEFORE JSP1 displays and
> set them into session? I suppose I have to do this
> in Action1 but for
> the first submission of form1, Action1 is not called
> yet by JSP1.
> 
> >From my analysis, there will be situation where
> there will be multiple
> input sources into a particular JSP. That means I
> need to have my
> 'update from database and set in session' codes in
> all the Action
> classes that forwards to JSP1? 
> 
> In another words, how do I call the update method in
> Action1 from
> Action2 before forwarding to the JSP which display
> my updated data.
> 
> This is duplication of codes and inefficient to me.
> There must be a
> better way to do this in Struts.
> 
> My question might be confusing..I am trying my best.
> Tell me if its
> unclear.
> 
> Thanks
> 
> Sebastian Ho
> 
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

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



Re: Emulate a modal screen (Struts newbie)

2004-08-23 Thread lixin chu
i am tring Struts Workflow Extension, which I guess
should be able to support your use case. however,  I
am not sure how it handles multiple window in the same
session.

--- "Varley, Roger" <[EMAIL PROTECTED]>
wrote:

> Hi
> 
> I'm trying to write what is esentially a web based
> data entry program using struts. I obviously can't
> use pessimistic database locking and optimistic
> locking becomes a nightmare when the client is able
> to open multiple edit windows across multiple
> records at the same time - so I'd like to simplify
> by treating the "edit" jsp as a modal dialog (i.e
> once the edit jsp is in use the client can't do
> anything else in the application until the "edit" is
> closed. Code samples or pointers to same would be
> useful. If trying to force a modal dialog is a
> really bad idea I would welcome suggestions on how
> to handle this scenario.
> 
> Regards
> Roger
> 
> 
>
__
> This e-mail and the documents attached are
> confidential and intended 
> solely for the addressee; it may also be privileged.
> If you receive this 
> e-mail in error, please notify the sender
> immediately and destroy it.
> As its integrity cannot be secured on the Internet,
> the Atos Origin group 
> liability cannot be triggered for the message
> content. Although the 
> sender endeavours to maintain a computer virus-free
> network, the sender 
> does not warrant that this transmission is
> virus-free and will not be 
> liable for any damages resulting from any virus
> transmitted.
>
__
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

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



workflow violation handling in Struts Workflow Extension

2004-08-21 Thread lixin chu
Hi,
Got a problem, no idea what's wrong:
I have defined a violation handler:
---



---
the code works fine when I first time click somewhere
outside of the current running workflow. However, when
I click that outside link again, the Violation handler
is not being invoked anymore.

what should I do ?

The handler is veru simple:
--
if (null != WorkflowUtils.getNextStateViolationAction
(request)) {
ActionErrors errors=new ActionErrors ();
errors.add ("violation", new ActionError
("error.workflow.violation"));
saveErrors (request, errors);
}
return mapping.findForward ("success");
---

Is it because the handler goes to a Tiles definition
so the current workflow state is lost ?

How do I go back to the current workflow phase after
handling the violation ?

thanks !
lixin




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



> does not clear all on the page ?

2004-08-20 Thread lixin chu
Hi,
A new problem:
I have a Clear button which suppose to clear the input
fields. However, when I use bean:write to display the
current value on the page, and disable reset() in the
ActionForm, after pressing Clear button, the value in
Form (session scope) is still displayed on the page.

is it expected ? I thought Clear does clear whatever
on the page (form) and values in the ActionForm are
not touched.

thanks !
li xin

JSP code below:




   
   Name*:
   
   
   
   
   Description :td>
   
   
   
   
   
   
   
   





___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: mutable variable in ActionForm is always reset to ture ?

2004-08-20 Thread lixin chu
thank you very much for your promopt response !

I found out the problem: I used a wrong attribute name
when I save the form in prepareAction, which causing a
new form being created after submitting the JSP file
(html:form)

--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> lixin chu wrote:
> 
> > I suspect that the mutable variable is reset when
> > rendering the JSP file. But I do not know why. 
> > and if it is true, how do I disable this so
> 'mutable'
> > will not be reset ?
> 
> Can you be more specific at the times when the
> 'mutable' variable is not 
> set as you expect? Remember reset is always called
> before the ActionForm 
> is populated with your values. If you are setting
> mutable to false in 
> your action, then on the page you forward to you
> should see it as false. 
> I think we'll need to see some more code and
> explanation as to the 
> problem.
> 
> 
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



mutable variable in ActionForm is always reset to ture ?

2004-08-20 Thread lixin chu
Hi,
Could not figure out why the mutable variable is
always reset to true. Here is the snipet of my session
scoped ActionForm:

..
private boolean mutable = true;

public void setMutable(boolean mutable) {
this.mutable = mutable;
}

public boolean isMutable() {
return this.mutable;
}

public void reset(ActionMapping mapping,
HttpServletRequest request) {
if (isMutable()) {
  .
}
}

In my prepareAction() class, i set it to false:
  myForm.setMutable (false);
  mapping.findMapping ("success");

The prepareAction is defined in struts-config as:




---
In my JSP file:

..



I suspect that the mutable variable is reset when
rendering the JSP file. But I do not know why. 
and if it is true, how do I disable this so 'mutable'
will not be reset ?

many thanks !

li xin




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

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



Question: Struts Workflow extension - primary and secondary workflow

2004-08-20 Thread lixin chu
Hi,
I am looking for some good document on Workflow
extension - especially detail explaination on primary
and secondary workflow: 
* when do I need to define a new primary workflow ?
* how does this extension work with
LookupDispatchAction ?

any example code is very much appreciated !

thanks
li xin



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-17 Thread lixin chu
thanks. 

i saw some discussion earlier (search for "request
against session"). It seems that people recommond not
to use session scope forms. 
so out of these three, which is my best choice then:

- Struts workflow extension
- hidden field
- session scope form

many thanks !


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

> Session scoped forms are one of my favorite things
> about Struts. Seems 
> like you have a situation for them.
> 
> Make sure you keep all session-scoped form fields
> Serializable or mark 
> them as transient if they are not.
> 
> Clever implementations of ActionForm.reset can make
> memory management 
> easier. The "complication" is simply that you might
> hold on to 
> references to objects that should have been garbage
> once processing is 
> complete.
> 
> If you don't use session scoped forms, you will
> probably have to manage 
> objects using session scope one way or another,
> unless you somehow use 
> hidden variables to specify "running" objects that
> get recreated for 
> each request.
> 
> Erik
> 
> lixin chu wrote:
> 
> >solution 1. persisting data may cause some
> problems,
> >for example performance, as users may need to
> create a
> >few detail objects. I prefer to keep these objects
> in
> >View and provide a 'Done' button, which will then
> let
> >Action to do the persistence.
> >
> >Another problem is that in my Use Case, the detail
> >objects are associated to the parent object, which
> >might not be persisted at this moment (because we
> go
> >to B.JSP before saving data in A.JSP). So i can not
> >persist detail object first.
> >
> >some work needed to solve these.
> >
> >solution 2. I am not sure if Struts Workflow
> extension
> >is a good choice. It seems that it uses Session
> scope
> >for sharing data among a few JSP pages.
> >What complication will it have ?
> >
> >thanks !
> >
> >
> >
> >--- "Kataria, Satish" <[EMAIL PROTECTED]>
> wrote:
> >
> >  
> >
> >>It depends upon the architecture you want to
> follow.
> >>There are multiple
> >>ways this can be done
> >>
> >>1. Create the 2 jsp as independent jsp. Thus the
> >>list jsp jsp always
> >>fetches from DB when we bring control to that.
> >>   Clicking add on the list jsp leads to the
> >>adddetails jsp which submit
> >>data to DB.
> >>   This is the most commonly used and I have seen
> >>this being used
> >>successfully in multiple applications
> >>2. Create the 2 jsp as a wizard using struts
> session
> >>scope strategy.
> >>   This strategy has certain complications and is
> >>generally
> >>disadvantageous.
> >>
> >>Thanks,
> >>Satish Kataria
> >>
> >>  
> >>
> >>-Original Message-
> >>From: lixin chu [mailto:[EMAIL PROTECTED] 
> >>Sent: Monday, August 16, 2004 4:59 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: best practice: how to handle two related
> >>jsp pages, with one
> >>having an ArrayList, the other input details
> >>
> >>
> >>Hi,
> >>How should I handle this:
> >>
> >>I have 2 jsp, in a.JSP, I need to display an
> >>ArrayList. When users click 'Add', B.JSP is
> >>displayed
> >>which allows users to fill in the details of a new
> >>object. When users click 'Done', I need to return
> >>back
> >>to A.JSP, display the newly added object, and
> >>ArrayList should be updated as well.
> >>
> >>What do I need to do to support this ?
> >>
> >>thank you very much
> >>li xin
> >>
> >>
> >>
> >>__
> >>Do you Yahoo!?
> >>New and Improved Yahoo! Mail - Send 10MB messages!
> >>http://promotions.yahoo.com/new_mail 
> >>
> >>
> >>
> >>
>
>-
> >  
> >
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> >>
> >>
>
>-
> >  
> >
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> > 
> >__
> >Do you Yahoo!?
> >Take Yahoo! Mail with you! Get it on your mobile
> phone.
> >http://mobile.yahoo.com/maildemo 
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




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

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



RE: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-17 Thread lixin chu
solution 1. persisting data may cause some problems,
for example performance, as users may need to create a
few detail objects. I prefer to keep these objects in
View and provide a 'Done' button, which will then let
Action to do the persistence.

Another problem is that in my Use Case, the detail
objects are associated to the parent object, which
might not be persisted at this moment (because we go
to B.JSP before saving data in A.JSP). So i can not
persist detail object first.

some work needed to solve these.

solution 2. I am not sure if Struts Workflow extension
is a good choice. It seems that it uses Session scope
for sharing data among a few JSP pages.
What complication will it have ?

thanks !



--- "Kataria, Satish" <[EMAIL PROTECTED]> wrote:

> It depends upon the architecture you want to follow.
> There are multiple
> ways this can be done
> 
> 1. Create the 2 jsp as independent jsp. Thus the
> list jsp jsp always
> fetches from DB when we bring control to that.
>Clicking add on the list jsp leads to the
> adddetails jsp which submit
> data to DB.
>This is the most commonly used and I have seen
> this being used
> successfully in multiple applications
> 2. Create the 2 jsp as a wizard using struts session
> scope strategy.
>This strategy has certain complications and is
> generally
> disadvantageous.
> 
> Thanks,
> Satish Kataria
> 
>   
> 
> -Original Message-
> From: lixin chu [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 16, 2004 4:59 AM
> To: [EMAIL PROTECTED]
> Subject: best practice: how to handle two related
> jsp pages, with one
> having an ArrayList, the other input details
> 
> 
> Hi,
> How should I handle this:
> 
> I have 2 jsp, in a.JSP, I need to display an
> ArrayList. When users click 'Add', B.JSP is
> displayed
> which allows users to fill in the details of a new
> object. When users click 'Done', I need to return
> back
> to A.JSP, display the newly added object, and
> ArrayList should be updated as well.
> 
> What do I need to do to support this ?
> 
> thank you very much
> li xin
> 
> 
>   
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

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



Re: AW: error code 404 not used in IE

2004-08-16 Thread lixin chu
this url explains this:

http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml


--- lixin chu <[EMAIL PROTECTED]> wrote:

> sorry, i am new to this, what message ? 
> 
> --- "Rosenberg, Leon"
> <[EMAIL PROTECTED]> wrote:
> 
> > Send a message with more then 1024 bytes. 
> > (resin does it)
> > 
> > > -Ursprüngliche Nachricht-
> > > Von: lixin chu [mailto:[EMAIL PROTECTED]
> > > Gesendet: Montag, 16. August 2004 16:22
> > > An: [EMAIL PROTECTED]
> > > Betreff: error code 404 not used in IE
> > > 
> > > Hi,
> > > MS IE has default setting:
> > >  Tools->Options->Advanced->Browsing->"Show
> > friendly
> > > HTTP error message"
> > > 
> > > When it is checked, the IE default error page is
> > used
> > > not your own 404 error page.
> > > 
> > > How can I change the http status code in Struts
> > > application so that my own 404 page is used ?
> > > 
> > > thanks
> > > li xin
> > > 
> > > 
> > > 
> > > __
> > > Do you Yahoo!?
> > > Read only the mail you want - Yahoo! Mail
> > SpamGuard.
> > > http://promotions.yahoo.com/new_mail
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: AW: error code 404 not used in IE

2004-08-16 Thread lixin chu
sorry, i am new to this, what message ? 

--- "Rosenberg, Leon"
<[EMAIL PROTECTED]> wrote:

> Send a message with more then 1024 bytes. 
> (resin does it)
> 
> > -Ursprüngliche Nachricht-
> > Von: lixin chu [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 16. August 2004 16:22
> > An: [EMAIL PROTECTED]
> > Betreff: error code 404 not used in IE
> > 
> > Hi,
> > MS IE has default setting:
> >  Tools->Options->Advanced->Browsing->"Show
> friendly
> > HTTP error message"
> > 
> > When it is checked, the IE default error page is
> used
> > not your own 404 error page.
> > 
> > How can I change the http status code in Struts
> > application so that my own 404 page is used ?
> > 
> > thanks
> > li xin
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Read only the mail you want - Yahoo! Mail
> SpamGuard.
> > http://promotions.yahoo.com/new_mail
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



error code 404 not used in IE

2004-08-16 Thread lixin chu
Hi,
MS IE has default setting:
 Tools->Options->Advanced->Browsing->"Show friendly
HTTP error message"

When it is checked, the IE default error page is used
not your own 404 error page.

How can I change the http status code in Struts
application so that my own 404 page is used ?

thanks
li xin



__
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

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



best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-15 Thread lixin chu
Hi,
How should I handle this:

I have 2 jsp, in a.JSP, I need to display an
ArrayList. When users click 'Add', B.JSP is displayed
which allows users to fill in the details of a new
object. When users click 'Done', I need to return back
to A.JSP, display the newly added object, and
ArrayList should be updated as well.

What do I need to do to support this ?

thank you very much
li xin



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: Struts, checkbox and optionally displaytag

2004-08-10 Thread lixin chu
thanks !
--- Koon Yue Lam <[EMAIL PROTECTED]> wrote:

> Hi !
> 
> From your question, I guess that you need a multiple
> of checkboxes, so
> you need  instead of 
> 
> for your reference:
>
http://struts.apache.org/userGuide/struts-html.html#multibox
> 
> and a wonderful example:
> http://j2ee.lagnada.com/struts/multibox-example1.htm
> 
> you would need an action form, which contains 2
> arrays (normally they
> would be String array)
> eg. an Action form called FrmMultiBox with
> properties :
> String [] options; String[] selected;
> 
> options[] is holding the "options" of the checkboxes
> that user going to select
> selected[] would be populated by Struts after form
> submission, value
> of selected[] is the value of "checked" checkboxes.
> 
> so if options = new String {"1", "2", "3"} (you can
> made them final or
> load the values from another Action dynamically from
> somewhere else)
> 
> in your JSP:
> 
>  property="options">
> property="selected">
>   name="_bean"/>
>
>
> 
> 
> if user check "1" and "3" then selected[] would
> contains "1" and "3"
> (Thanks Struts !)
> 
> and don't forget the formal getter and setter method
> of your Action form
> 
> Hope this help
> 
> Regards
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



  1   2   >