not working

2007-06-06 Thread Ambaris Mohanty
Hi all,

What is the solution for the "reset button not working" problem. I'm using
struts 1.2.9 and a DynaValidatorForm which is properly configured.
Everything else (like validation) is working nicely except for the reset
buttons in the forms. Please help.

AM



RE: custom interceptor in default stack

2007-06-06 Thread sudeepj2ee

Thanks for replying,

The reason for bot using
CONFIDENTIAL is that we don't
want the https for the entire application we only require it at the places
were some confidential data is informed viz- registration or payment related
pages.For this we have made an interceptor which switches from http to https
based on a annotation. 

Al Sutton-3 wrote:
> 
> Any reason you're not using
> CONFIDENTIAL?
> 
> Before you ask, here's a reference with an example that has a clickable
> link
> to the definition http://wiki.metawerx.net/Wiki.jsp?page=Web.xml
> 
> -Original Message-
> From: sudeepj2ee [mailto:[EMAIL PROTECTED] 
> Sent: 05 June 2007 14:00
> To: user@struts.apache.org
> Subject: Re: custom interceptor in default stack
> 
> 
> I am going for a https and for switching between http and https for that i
> have made a interceptor, and there are arount 35 struts- xml files which
> are
> included in struts.xml,what i was thinking is that instead of inserting
> interceptor in each strut-xml i can have a global interceptor kind of
> thing
> that could reflect changes if mentioned at one place that could be achived
> only if i put that interceptor in default-xml which all my xml's are
> extending. 
> 
> Dave Newton-4 wrote:
>> 
>> --- sudeepj2ee <[EMAIL PROTECTED]> wrote:
>>> can we put our custom interceptor in
>>> struts-default.xml,if yes than what configurations
>> are
>>> required.
>> 
>> You *could*, but why wouldn't you just put it in your struts.xml and 
>> not worry about your customizations being lost when you upgrade your 
>> S2?
>> 
>> d.
>> 
>> 
>> 
>>
>> __
>> __ Take the Internet to Go: Yahoo!Go puts the Internet in 
>> your pocket: mail, news, photos & more.
>> http://mobile.yahoo.com/go?refer=1GNXIC
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/custom-interceptor-in-default-stack-tf3871308.html#a10
> 968910
> Sent from the Struts - User mailing list archive at Nabble.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/custom-interceptor-in-default-stack-tf3871308.html#a11002142
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: SSL Interceptor

2007-06-06 Thread sudeepj2ee

Hi 

Your ssl interceptor really helped me a lot in my project,where we are using
ssl,
I wanted to know whether we can goto a more granular level with this
interceptor based on the method call, current its based on per class call,I
was trying to use exclude method with the interceptor but could not
succede.Any idea regardingthis??/

Thanks 
sudeep

Shahak Nagiel wrote:
> 
> Following up on my thread from yesterday, I've finished work on the SSL
> Interceptor, which can be added to the default stack and works as follows:
> 
> - If the associated action class is marked with the (custom) @SSLProtected
> annotation and it's an HTTP (non-SSL) GET request, then the interceptor
> will redirect to the https 
> (SSL) version of the page.
> - Likewise, if it's an HTTPS (SSL) GET request and the action class does
> not have the annotation, then it 
> will redirect to the http (non-SSL) version of the page.
> 
> I've tested it with both browsers, with and without cookies, and it seems
> to work well, so I'll offer it to those interested.  I'm not a regular
> contributor to the source code base, but if someone wants to submit this
> into the repository, feel free.
> 
> 
> /**
>  * @name SSLProtected
>  * @description Simple marker annotation indicating access to an action
> class should be protected 
>  *  under SSL (Secure Sockets Layer) HTTP tunneling. 
>  * @version $Revision:  $
>  * @author  mailto:[EMAIL PROTECTED] Shahak Nagiel 
>  * $Id:  $
>  */
> @Retention(RetentionPolicy.RUNTIME)
> public @interface SSLProtected { }
> 
> 
> /**
>  * @name SSLInterceptor
>  * @description This interceptor performs two functions:
>  * If the associated action class is marked with the @SSLProtected
> annotation 
>  * and it's an HTTP (non-SSL) GET request, then the interceptor will
> redirect to the https 
> (SSL) version of the page.
>  * Likewise, if it's an HTTPS (SSL) GET request and the action
> class does not have the annotation, then it 
> 
>  *will redirect to the http (non-SSL) version of the page.
>  * @version $Revision: $
>  * @author  mailto:[EMAIL PROTECTED] Shahak Nagiel 
>  * $Id: $
>  */
> public class SSLInterceptor extends AbstractInterceptor {
> 
> /** Creates a new instance of SSLInterceptor */
> public SSLInterceptor() {
> super();
> }
> 
> /**
>  * Defaults for HTTP and HTTPS ports.  Can be overridden in web.xml
> with context parameters of the same name.
>  */
> final static int HTTP_PORT = 8080;
> final static int HTTPS_PORT = 8443;
> 
> final static String HTTP_PORT_PARAM = "HTTP_PORT";
> final static String HTTPS_PORT_PARAM = "HTTPS_PORT";
> final static String HTTP_GET = "GET";
> final static String SCHEME_HTTP = "http";
> final static String SCHEME_HTTPS = "https";
> 
> /**
>  * Redirect to SSL or non-SSL version of page as indicated by the
> presence (or absence) of the
>  *  @SSLProtected annotation on the action class.
>  */
> public String intercept(ActionInvocation invocation) throws Exception
> {
> 
> // initialize request and response
> final ActionContext context = invocation.getInvocationContext ();
> final HttpServletRequest request = 
> (HttpServletRequest) context.get(StrutsStatics.HTTP_REQUEST);
> final HttpServletResponse response = 
> (HttpServletResponse)
> context.get(StrutsStatics.HTTP_RESPONSE);
> 
> // check scheme
> String scheme = request.getScheme().toLowerCase();
> 
> // check method
> String method = request.getMethod().toUpperCase();
> 
> // If the action class uses the SSLProtected marker annotation,
> then see if we need to 
> //  redirect to the SSL protected version of this page
> if
> (invocation.getAction().getClass().isAnnotationPresent(SSLProtected.class)){
> 
> if (HTTP_GET.equals(method) && SCHEME_HTTP.equals(scheme)){
> 
> // initialize https port
> String httpsPortParam = 
>
> request.getSession().getServletContext().getInitParameter(HTTP_PORT_PARAM);
> int httpsPort = httpsPortParam == null? HTTPS_PORT :
> Integer.parseInt(httpsPortParam);
> 
> URI uri = new URI(SCHEME_HTTPS, null,
> request.getServerName(), 
> httpsPort,
> response.encodeRedirectURL(request.getRequestURI()), 
> request.getQueryString(), null);
> 
> log.debug("Going to SSL mode, redirecting to " +
> uri.toString());
> 
> response.sendRedirect(uri.toString());
> return null;
> }
> }
> // Otherwise, check to see if we need to redirect to the non-SSL
> version of this page
> else{
> 
> if (HTTP_GET.equals(method) && SCHEME_HTTPS.equals(scheme)){
> 
> // initialize http port
>  

How to access static content in struts2

2007-06-06 Thread Strut_developer

I,
In case of webworks to access static properly in jsp page we used to do as
below
   
http://www.nabble.com/How-to-access-static-content-in-struts2-tf3881676.html#a11001510
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Craig McClanahan

On 6/6/07, Jeff Amiel <[EMAIL PROTECTED]> wrote:


I'm not debating that there could be bad user code here(although
I've reduced my test cases down to an empty axis service call and an
nearly empty struts actionIf there IS bad code, it's probably at a
low level inside axis or struts or some other library that I don't
have immediate control over)

What I'm trying to determine if the re-use of response instances could
be the reason why
the axis servlet is getting a response given to it that is already in
a committed state...

I'm not 'afraid' of dealing with pooled objects that may be in a
questionable state (like with  database connection pool
handles...knowing to check/set auto-commit on them when acquiring them
from  pool because the previous user may have changed some settings on
them)...I'm just interested in knowing if this is a  'known' danger of
running without a security manager on Tomcat (5.5) and just as easily
avoidable.



I'm just trying to warn you that the evidence of the last 5 or so
years (given how many people deploy apps on Tomcat) means you are
going to get a lot of skepticism if you go to the Tomcat user list and
try to blame this kind of problem on Tomcat.  The likelihood of that
being the real issue, given the fact that even *you* can't reproduce
it reliably, and the fact that "nothing changed" in your environment,
makes this the least possible likelihood.  Note that probably 99.9% of
the apps running under Tomcat standalone run without a security
manager -- but that is even *more* unlikely to be the issue.

Of moderate possibility is that one of the frameworks you are using
(Struts or Axis) is at fault.  Again, the odds are against you -- but
not quite as much as that it's a Tomcat issue.  On the other side of
the coin:

* Each of these two frameworks has been deployed
 widely -- on Tomcat and on other servers -- without
 a large number of complaints of this sort of issue.

* The symptoms you describe are the classic scenario
 where a previously existing application level thread safety
 issue has already existed, but didn't surface until the usage
 pattern of the app itself changed.

Note that I'm not at all familiar with the Axis code base, and have
never deployed an app that used Axis (with or without Struts).  But,
given the fact that the exception is in fact coming from Axis, my
suggestion is:

* Look to your own code first -- in particular
 at the logic of the Struts action you claim is
 being executed "at the same time as a SOAP
 call to the Axis servlet."

* Ask on the Axis list if anyone has seen this,
 including the full stack trace so that proper
 diagnosis is possible.

It's not impossible that there is a threading problem in Struts or
Tomcat that is causing this.  But, in my years of experience, my gut
says that is probably not where the issue actually exists.

Craig

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



Re: datetimepicker & S2 validation

2007-06-06 Thread Musachy Barroso

2.1 is the development branch (technically trunk :) ), and there is no
release for it yet, if you want to build it yourself:

http://struts.apache.org/2.x/docs/building-with-maven.html

musachy

On 6/6/07, Vincent Lin <[EMAIL PROTECTED]> wrote:


Is struts 2.1 available for downloading?
I only find struts 2.0.6 in apache website.

On 6/7/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> sorry. 2.1 is the one.
>
> musachy
>
> On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > It is getting to the action!  Can you tell me if a new version is
> > available?
> >
> > On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
> > >
> > > Datetimepicker is buggy on 2.0.6, I would first make sure that the
> value
> > > is
> > > getting to the action, without any validation at all.
> > >
> > > musachy
> > >
> > > On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I have a datetimepicker on a screen with the key="
> > > > payrollUpdate.effectiveDate".  I have a
> > > > PayrollUpdateAction-validation.xmlfile that corresponds to the
> Action
> > > > associated with this web page.  Inside
> > > > the validation file I have the following field validation:
> > > >
> > > > 
> > > > 
> > > > 
> > > >   
> > > > 
> > > >
> > > > After entering a date or selecting one from the calendar, I get
the
> > > > validation error that Effective Date is required!  It is as though
I
> > > have
> > > > not entered anything!  Any ideas?
> > > >
> > > > --
> > > > Scott
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> >
> >
> >
> > --
> > Scott
> > [EMAIL PROTECTED]
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: [S2] Basic form with Radio Buttons

2007-06-06 Thread Lally Singh

Ok, I put my survey in my session.  That's working fine.

So, another question, (with the same situation), how do I use a
 inside an ?

E.g. I've got a set of Responses inside a list of ResponseGroups, and
iterating through, it seems that the radio button doesn't know how to
bind itself to the object on top of the OGNL stack.

My generated HTML is like this:






Which is clearly not what I want.  How do I get the inputs to map to
specific elements of a container?

I've also tried this:


But that doesn't seem to do it (responseGroups is a list, and
responseForId looks up the ID# in a set).

Thanks in advance for any help!
Lally Singh <[EMAIL PROTECTED]> wrote:

Hey all,  a few questions about getting started with a form in Struts 2.

Questions
-
  The scenario: an action generates a form (from a
dynamically-generated list of questions, called a Survey), that's then
submitted.

  I have a class, QuestionGeneratorAction, with two methods:
- quesionGroups() which generates a survey to fill out
- saveSurvey() which saves the survey.

  Will the form submit to saveSurvey hit the same instance of
QuestionGeneratorAction as the one that generated the survey
originally?  If not:
- Can I make it do that?
   - I'm using Spring in my project (but not for this part -- just
DAOs for now), can that help?
- If not, where can I store the generated survey?
- Am I missing the whole point of this?

  If it does already, then how do I get a  to eventually
result in a call to Response.setValue(int)?  (see Background, below).

Background
--

The survey's a field in QuestionGeneratorAction, an instance of a
class called Survey, which just has a list of ResponseGroups, which in
turn has a list of Responses.

  The JSP is this: (severely stripped down)




 





(my custom theme iddl just formats the  into a table, the
rest is copied from xhtml).


Thanks in advance for any help!!

--
H. Lally Singh
Ph.D. Candidate, Computer Science
Virginia Tech




--
H. Lally Singh
Ph.D. Candidate, Computer Science
Virginia Tech

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



Re: datetimepicker & S2 validation

2007-06-06 Thread Vincent Lin

Is struts 2.1 available for downloading?
I only find struts 2.0.6 in apache website.

On 6/7/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


sorry. 2.1 is the one.

musachy

On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> It is getting to the action!  Can you tell me if a new version is
> available?
>
> On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
> >
> > Datetimepicker is buggy on 2.0.6, I would first make sure that the
value
> > is
> > getting to the action, without any validation at all.
> >
> > musachy
> >
> > On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > I have a datetimepicker on a screen with the key="
> > > payrollUpdate.effectiveDate".  I have a
> > > PayrollUpdateAction-validation.xmlfile that corresponds to the
Action
> > > associated with this web page.  Inside
> > > the validation file I have the following field validation:
> > >
> > > 
> > > 
> > > 
> > >   
> > > 
> > >
> > > After entering a date or selecting one from the calendar, I get the
> > > validation error that Effective Date is required!  It is as though I
> > have
> > > not entered anything!  Any ideas?
> > >
> > > --
> > > Scott
> > > [EMAIL PROTECTED]
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
>
>
>
> --
> Scott
> [EMAIL PROTECTED]
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

On 6/6/07, Craig McClanahan <[EMAIL PROTECTED]> wrote:



Speaking as the original author of this part of Tomcat in 4.1 and 5.0
(and it hasn't changed that much in 5.5 and 6.0 AFAICT), request and
response instances can indneed be pooled and reused for *different*
requests.  That being said, Tomcat has been pretty rigorously tested
for thread safety by virtue of the fact that tens of thousands of
applications (many very high volume) are running on it.  It is
*substantially* more likely that there are thread safety issues in
user code (such as simultaneous access to session scoped or
application scoped beans), rather tha a bug in Tomcat, when you see
intermittent issues like this.


I'm not debating that there could be bad user code here(although
I've reduced my test cases down to an empty axis service call and an
nearly empty struts actionIf there IS bad code, it's probably at a
low level inside axis or struts or some other library that I don't
have immediate control over)

What I'm trying to determine if the re-use of response instances could
be the reason why
the axis servlet is getting a response given to it that is already in
a committed state...

I'm not 'afraid' of dealing with pooled objects that may be in a
questionable state (like with  database connection pool
handles...knowing to check/set auto-commit on them when acquiring them
from  pool because the previous user may have changed some settings on
them)...I'm just interested in knowing if this is a  'known' danger of
running without a security manager on Tomcat (5.5) and just as easily
avoidable.

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Craig McClanahan

On 6/6/07, Dave Newton <[EMAIL PROTECTED]> wrote:

--- Jeff Amiel <[EMAIL PROTECTED]> wrote:
> Does this sound possible?

According to the source, it's not only possible, it
*is*... at least w/ TC6. You could just check the
source of the TC version you're running and see if
it's the same way or not.

> Any further insight would be appreciated.


Speaking as the original author of this part of Tomcat in 4.1 and 5.0
(and it hasn't changed that much in 5.5 and 6.0 AFAICT), request and
response instances can indeed be pooled and reused for *different*
requests.  That being said, Tomcat has been pretty rigorously tested
for thread safety by virtue of the fact that tens of thousands of
applications (many very high volume) are running on it.  It is
*substantially* more likely that there are thread safety issues in
user code (such as simultaneous access to session scoped or
application scoped beans), rather than a bug in Tomcat, when you see
intermittent issues like this.

Craig McClanahan




Probably want to follow that one up w/ the TC folks.

d.





Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz

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




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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Dave Newton
--- Jeff Amiel <[EMAIL PROTECTED]> wrote:
> Does this sound possible?

According to the source, it's not only possible, it
*is*... at least w/ TC6. You could just check the
source of the TC version you're running and see if
it's the same way or not.

> Any further insight would be appreciated.

Probably want to follow that one up w/ the TC folks.

d.



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

Solution?

In my days of effort to troubleshoot, I ran across this ditty:

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

Was it possible that my response objects (even committed ones) were
being re-used by other requestsand hence be the underlying cause
of this?  (the setBufferSize() call in the stack trace is because the
ResponseFacade is already in a committed state).

Sure enough, installed a security manager on tomcat (via jboss) and
the problem has apparently 'gone away' (in my development
environment).  I intend to try this in another (test) environment
tomorrow and then eventually production.

Does this sound possible?

Why would the default behavior for Tomcat be to not destroy these
response objects?
I assume it's a performance reasonbut the unexpected behavior that
could result seems unacceptable to me (if this is indeed the cause).

But then to that point, why is a security manager not part of the
default install either?
(http://weblogs.java.net/blog/felipegaucho/archive/2006/01/is_the_security_1.html)

Any further insight would be appreciated.

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



Re: [OT] Is anybody else getting these? Fwd: Returned mail: see transcript for details

2007-06-06 Thread Oguz Kologlu

Yep, but only when I post/reply to a message.
Oz

On 06/06/2007, at 9:21 PM, Antonio Petrelli wrote:


Me too, but Gmail puts it into spam... What's that?

2007/6/6, Paolo Beccari <[EMAIL PROTECTED]>:


Me too.

P.

-
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: RE : [s2] Collection, array and tag.

2007-06-06 Thread Dave Newton
--- Zoran Avtarovski <[EMAIL PROTECTED]> wrote:
> For example on a search form we would add a not
> applicable object to the start of our collection. 

> 
> No Image
>  label="fileName"
> value="fileName"/>
> 
> 
> I'd love to be able to do something similar in S2,



d.



 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

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



Re: RE : [s2] Collection, array and tag.

2007-06-06 Thread Zoran Avtarovski
I can give you a simple use case we have which annoys the crap out of me:

In S1 we used our business layer to get a collection of objects. Depending
on how that collection was used we might need to add an object to it. For
example on a search form we would add a not applicable object to the start
of our collection. This would allow to see if that parameter should be used
in the search. Or another example is when getting a list of images from the
file system and you want to give the user the option for no image. This is
how we do this in S1:


No Image



I'd love to be able to do something similar in S2, but instead we have had
to write support methods in view support classes to implement it.

The OGNL Language guide says its possible but I'm having trouble getting it
to work.

Z.

> Maybe there is some OGNL trick, but I wouldn't know how. Are you sure you
> want to change manipulate arrays in your pages (view)? Maybe there is a
> valid use case for it, but it sounds weird to me.
> 
> musachy
> 
> On 6/6/07, Ezequiel Puig <[EMAIL PROTECTED]> wrote:
>> 
>> Musachy,
>> 
>> Thanks a lot for the comments about the  tag.
>> 
>> About the other questions i proposed, do you know if it's possible to
>> manipulate arrays with the s2 tags ??
>> 
>> 
>> 
>> 




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



Re: [S2] issues

2007-06-06 Thread Vincent Lin

What is the data type of autoridade.orgao.codObjeto and
autoridade.cargo.codObjeto?

On 6/7/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote:


This is my code:





Someone please explain to me why in the first one i had to use
toString() to make it work, but the second one works perfectly as is?

--
Rafael Dittberner
Brasília (DF) - Brasil

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




Re: datetimepicker & S2 validation

2007-06-06 Thread Musachy Barroso

sorry. 2.1 is the one.

musachy

On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


It is getting to the action!  Can you tell me if a new version is
available?

On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> Datetimepicker is buggy on 2.0.6, I would first make sure that the value
> is
> getting to the action, without any validation at all.
>
> musachy
>
> On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > I have a datetimepicker on a screen with the key="
> > payrollUpdate.effectiveDate".  I have a
> > PayrollUpdateAction-validation.xmlfile that corresponds to the Action
> > associated with this web page.  Inside
> > the validation file I have the following field validation:
> >
> > 
> > 
> > 
> >   
> > 
> >
> > After entering a date or selecting one from the calendar, I get the
> > validation error that Effective Date is required!  It is as though I
> have
> > not entered anything!  Any ideas?
> >
> > --
> > Scott
> > [EMAIL PROTECTED]
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



--
Scott
[EMAIL PROTECTED]





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: datetimepicker & S2 validation

2007-06-06 Thread stanlick

It is getting to the action!  Can you tell me if a new version is available?

On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


Datetimepicker is buggy on 2.0.6, I would first make sure that the value
is
getting to the action, without any validation at all.

musachy

On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have a datetimepicker on a screen with the key="
> payrollUpdate.effectiveDate".  I have a
> PayrollUpdateAction-validation.xmlfile that corresponds to the Action
> associated with this web page.  Inside
> the validation file I have the following field validation:
>
> 
> 
> 
>   
> 
>
> After entering a date or selecting one from the calendar, I get the
> validation error that Effective Date is required!  It is as though I
have
> not entered anything!  Any ideas?
>
> --
> Scott
> [EMAIL PROTECTED]
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd





--
Scott
[EMAIL PROTECTED]


[S2] issues

2007-06-06 Thread Rafael Dittberner

This is my code:

listKey="codObjeto" listValue="nome" label="Orgão" 
value="%{autoridade.orgao.codObjeto.toString()}" />


listKey="codObjeto" listValue="nome" label="Cargo" 
value="%{autoridade.cargo.codObjeto}" />


Someone please explain to me why in the first one i had to use 
toString() to make it work, but the second one works perfectly as is?


--
Rafael Dittberner
Brasília (DF) - Brasil

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



Re: datetimepicker & S2 validation

2007-06-06 Thread Musachy Barroso

Datetimepicker is buggy on 2.0.6, I would first make sure that the value is
getting to the action, without any validation at all.

musachy

On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


I have a datetimepicker on a screen with the key="
payrollUpdate.effectiveDate".  I have a
PayrollUpdateAction-validation.xmlfile that corresponds to the Action
associated with this web page.  Inside
the validation file I have the following field validation:




  


After entering a date or selecting one from the calendar, I get the
validation error that Effective Date is required!  It is as though I have
not entered anything!  Any ideas?

--
Scott
[EMAIL PROTECTED]





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Struts File Not Found (404) Behavior or Lack of...

2007-06-06 Thread Nathan Hook
Well, the problem has been figured out.  Here is our global-exception entry 
in our struts-config.xml:







We did not have an entry for the key "global.error.message" in our 
message-resources.


So, both the key and scope entries from the global-exception entry were 
removed so it now looks like:







And, everything is now working as expected.  We receive our 404 page as we 
were hoping.


Sorry to bother everyone with this issue.

Thank you again for your time and thoughtful responses.



Original Message Follows
From: "Niall Pemberton" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: Struts File Not Found (404) Behavior or Lack of...
Date: Wed, 6 Jun 2007 20:48:24 +0100

On 6/6/07, Nathan Hook <[EMAIL PROTECTED]> wrote:

I've run into a problem.

If a user either accidentally or maliciously enters an incorrect path that
has a struts extension the user will receive an Exception and a Stack 
Trace.


For example if we have the path www.xxx.com/login.do mapped like so...


   
   
   
   


and the user types in www.xxx.com/login2.do they will receive an Exception
with the following Stack Trace...

javax.servlet.ServletException: No action config found for the specified
url.

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)

javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

com.kf.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)

com.kf.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.kf.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)


Root Cause

org.apache.struts.chain.commands.InvalidPathException: No action config
found for the specified url.

org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)

org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)

org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)

org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)

javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

com.xxx.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)

com.xxx.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.xxx.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)



Instead of a user receiving a nice 404 File Not Found message they are
displayed an Exception.  In my mind making the company look bad.  Also, a
malicious user now knows our underlying technology, the flow of our
application, and specific class names.

Is there any configuration settings that we can set to make these 
exceptions

return a 404 page instead of a Exception?  Notice that this error fails WAY
before any of the  are used.


Did you try specifying and exception handler for InvalidPathException?
While it was true in Struts 1.2.x that the exception handler only
dealt with exceptions thrown by the Action - AFAIK Struts 1.3.x
exception handling covers the whole request processing chain - so it
should work.

Also using the standard exception handler you can(from memory) specify
a message key - I believe theres an example(s) in the struts-examples
webapp for "InvalidCancelException" (in the validation module) - that
does just this.

Also as I suggested in the related thread you posted earlier this week
you can also specify an "unknown" action to handle this - just add
unknown="true" to one (and only 1) of your actions in the
struts-config.xml

Niall


As of right now I'm planning on Extending the
org.apache.struts.action.ActionServlet class to check to see if we receive
an org.apache.struts.chain.commands.InvalidPathException and if so then 
show

a 404 page, but I'm not excited about extended super basic Struts behavior.

Does anyone have any thoughts on this subject and what do you think the
behavior or Struts should be in this case?  I do like the fail fast aspect
of what is happening, but there should be a more elegant way of handling 
the

Exception.

Looking forward to any and all response.

Thank you for your time.


_
Make every IM count. Download Messenger and join the i’m I

[S2] Basic form with Radio Buttons

2007-06-06 Thread Lally Singh

Hey all,  a few questions about getting started with a form in Struts 2.

Questions
-
 The scenario: an action generates a form (from a
dynamically-generated list of questions, called a Survey), that's then
submitted.

 I have a class, QuestionGeneratorAction, with two methods:
   - quesionGroups() which generates a survey to fill out
   - saveSurvey() which saves the survey.

 Will the form submit to saveSurvey hit the same instance of
QuestionGeneratorAction as the one that generated the survey
originally?  If not:
   - Can I make it do that?
  - I'm using Spring in my project (but not for this part -- just
DAOs for now), can that help?
   - If not, where can I store the generated survey?
   - Am I missing the whole point of this?

 If it does already, then how do I get a  to eventually
result in a call to Response.setValue(int)?  (see Background, below).

Background
--

The survey's a field in QuestionGeneratorAction, an instance of a
class called Survey, which just has a list of ResponseGroups, which in
turn has a list of Responses.

 The JSP is this: (severely stripped down)










(my custom theme iddl just formats the  into a table, the
rest is copied from xhtml).


Thanks in advance for any help!!

--
H. Lally Singh
Ph.D. Candidate, Computer Science
Virginia Tech

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



datetimepicker & S2 validation

2007-06-06 Thread stanlick

I have a datetimepicker on a screen with the key="
payrollUpdate.effectiveDate".  I have a
PayrollUpdateAction-validation.xmlfile that corresponds to the Action
associated with this web page.  Inside
the validation file I have the following field validation:



   
 


After entering a date or selecting one from the calendar, I get the
validation error that Effective Date is required!  It is as though I have
not entered anything!  Any ideas?

--
Scott
[EMAIL PROTECTED]


Re: Struts File Not Found (404) Behavior or Lack of...

2007-06-06 Thread Niall Pemberton

On 6/6/07, Nathan Hook <[EMAIL PROTECTED]> wrote:

I've run into a problem.

If a user either accidentally or maliciously enters an incorrect path that
has a struts extension the user will receive an Exception and a Stack Trace.

For example if we have the path www.xxx.com/login.do mapped like so...


   
   
   
   


and the user types in www.xxx.com/login2.do they will receive an Exception
with the following Stack Trace...

javax.servlet.ServletException: No action config found for the specified
url.

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.kf.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.kf.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.kf.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)

Root Cause

org.apache.struts.chain.commands.InvalidPathException: No action config
found for the specified url.

org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)

org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.xxx.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.xxx.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.xxx.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)


Instead of a user receiving a nice 404 File Not Found message they are
displayed an Exception.  In my mind making the company look bad.  Also, a
malicious user now knows our underlying technology, the flow of our
application, and specific class names.

Is there any configuration settings that we can set to make these exceptions
return a 404 page instead of a Exception?  Notice that this error fails WAY
before any of the  are used.


Did you try specifying and exception handler for InvalidPathException?
While it was true in Struts 1.2.x that the exception handler only
dealt with exceptions thrown by the Action - AFAIK Struts 1.3.x
exception handling covers the whole request processing chain - so it
should work.

Also using the standard exception handler you can(from memory) specify
a message key - I believe theres an example(s) in the struts-examples
webapp for "InvalidCancelException" (in the validation module) - that
does just this.

Also as I suggested in the related thread you posted earlier this week
you can also specify an "unknown" action to handle this - just add
unknown="true" to one (and only 1) of your actions in the
struts-config.xml

Niall


As of right now I'm planning on Extending the
org.apache.struts.action.ActionServlet class to check to see if we receive
an org.apache.struts.chain.commands.InvalidPathException and if so then show
a 404 page, but I'm not excited about extended super basic Struts behavior.

Does anyone have any thoughts on this subject and what do you think the
behavior or Struts should be in this case?  I do like the fail fast aspect
of what is happening, but there should be a more elegant way of handling the
Exception.

Looking forward to any and all response.

Thank you for your time.

_
Don't miss your chance to WIN $10,000 and other great prizes from Microsoft
Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/


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




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



Re: Softer action mappings

2007-06-06 Thread stanlick

Yes.  I'd like to see what is available to string into the mappings before I
start putting breadcrumbs in the session.  For instance, I would like the
"input" to map to whatever tiles name the validation failed on.



Musachy Barroso wrote:
> 
> do you mean the request url?
> 
> musachy
> 
> On 6/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Is there a way to get the current request substituted in an action
>> mapping?
>>
>> 
>> > type="tiles">${currentRequest}
>>
>> I'd rather not stash this in a session variable if it's available
>> someplace!
>>
>> --
>> Scott
>> [EMAIL PROTECTED]
>>
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Softer-action-mappings-tf3872906.html#a10995901
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts File Not Found (404) Behavior or Lack of...

2007-06-06 Thread Martin Gainty

Good Afternoon Nathan-

login2 != login

in your webapp /WEB-INF/web.xml

404
/404.html


HTH
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Nathan Hook" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, June 06, 2007 12:23 PM
Subject: RE: Struts File Not Found (404) Behavior or Lack of...



I apologize, I forgot to mention all the versions we're using.

We are using Struts version 1.3.8 and running on Tomcat 5.5.23 if this 
helps.



Original Message Follows
From: "Nathan Hook" <[EMAIL PROTECTED]>

I've run into a problem.

If a user either accidentally or maliciously enters an incorrect path that 
has a struts extension the user will receive an Exception and a Stack 
Trace.


For example if we have the path www.xxx.com/login.do mapped like so...


  
  
  
  redirect="true"/>



and the user types in www.xxx.com/login2.do they will receive an Exception 
with the following Stack Trace...


javax.servlet.ServletException: No action config found for the specified 
url.

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.kf.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.kf.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)
com.kf.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)

Root Cause

org.apache.struts.chain.commands.InvalidPathException: No action config 
found for the specified url.

org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.xxx.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.xxx.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)
com.xxx.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)


Instead of a user receiving a nice 404 File Not Found message they are 
displayed an Exception.  In my mind making the company look bad.  Also, a 
malicious user now knows our underlying technology, the flow of our 
application, and specific class names.


Is there any configuration settings that we can set to make these 
exceptions return a 404 page instead of a Exception?  Notice that this 
error fails WAY before any of the  are used.


As of right now I'm planning on Extending the 
org.apache.struts.action.ActionServlet class to check to see if we receive 
an org.apache.struts.chain.commands.InvalidPathException and if so then 
show a 404 page, but I'm not excited about extended super basic Struts 
behavior.


Does anyone have any thoughts on this subject and what do you think the 
behavior or Struts should be in this case?  I do like the fail fast aspect 
of what is happening, but there should be a more elegant way of handling 
the Exception.


Looking forward to any and all response.

Thank you for your time.

_
Don't miss your chance to WIN $10,000 and other great prizes from 
Microsoft Office Live 
http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/



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

_
Get a preview of Live Earth, the hottest event this summer - only on MSN 
http://liveearth.msn.com?source=msntaglineliveearthhm



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





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



Struts 2 exception-mappings with messages?

2007-06-06 Thread Gabriel Belingueres

Hi,

I wonder if I can attach an error message to the exceptions specified
in the struts.xml file, using exception-mapping and
global-exception-mapping.

I tried to achieve this by adding  inside the
exception-mapping tag without success (it seems to me that they do
nothing).

How can I achieve this?

Regards,
Gabriel

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



Re: Flash scope in Struts 2?

2007-06-06 Thread Musachy Barroso

Something different but related, the scoped model driven interceptor:

http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html

musachy

On 6/6/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- mraible <[EMAIL PROTECTED]> wrote:
> mraible wrote:
>> Does Struts 2 have support for a flash scope -
>> where messages can be easily stuffed into this
scope
>> so they live through a redirect?
> I'll assume the answer is "no".

Why?

In addition to a couple of threads within the last
week see also:

http://struts.apache.org/2.x/docs/message-store-interceptor.html

(I think that's the one?)

d.




  
___
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Flash scope in Struts 2?

2007-06-06 Thread Ian Roughley
There is an interceptor and result in webwork that can be used with 
about 2 mins for package corrections.


/Ian

mraible wrote:


mraible wrote:
  

Does Struts 2 have support for a flash scope - where messages can be
easily stuffed into this scope so they live through a redirect?

Thanks,

Matt




I'll assume the answer is "no".

  


Re: Flash scope in Struts 2?

2007-06-06 Thread Antonio Petrelli

2007/5/3, mraible <[EMAIL PROTECTED]>:


Does Struts 2 have support for a flash scope - where messages can be easily
stuffed into this scope so they live through a redirect?


I suppose that Michael (Jouravlev) did something called "rollover"
scope, but maybe it is under Struts 1.3

BTW, Matt, why not considering Scopes? (In this case the "flash" scope
is called "click"):

http://scopes.sf.net/

Antonio

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



Re: Flash scope in Struts 2?

2007-06-06 Thread Dave Newton
--- mraible <[EMAIL PROTECTED]> wrote:
> mraible wrote:
>> Does Struts 2 have support for a flash scope -
>> where messages can be easily stuffed into this
scope
>> so they live through a redirect?
> I'll assume the answer is "no".

Why?

In addition to a couple of threads within the last
week see also:

http://struts.apache.org/2.x/docs/message-store-interceptor.html

(I think that's the one?)

d.



  
___
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

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



Re: Flash scope in Struts 2?

2007-06-06 Thread mraible



mraible wrote:
> 
> Does Struts 2 have support for a flash scope - where messages can be
> easily stuffed into this scope so they live through a redirect?
> 
> Thanks,
> 
> Matt
> 

I'll assume the answer is "no".

-- 
View this message in context: 
http://www.nabble.com/Flash-scope-in-Struts-2--tf3685114.html#a10993413
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Can I Redirect Action Result to Strut1 action in struts.xml

2007-06-06 Thread panpan

Ray, thank you very much for your tips which is very helpful!




Ray Clough wrote:
> 
> if you are constructing the url using the s:url tag, there are two
> different attributes you may be using.  The "action" attribute assumes
> that the action will end in "*.action", so you can't forward to a Struts-1
> action using the action attribute.  Instead use the 'value' attribute, and
> you can then forward to 'myaction.do', and it works.  
> 
> 
> 
> panpan wrote:
>> 
>> It was very sad to find out that the redirect URL is like
>> http://localhost:8080/restricted/main/Menu.do.action. even though the
>> page is correctly displayed.
>> 
>> When I click 'Submit', there is exception: There is no Action mapped for
>> action name Menu.do.
>> 
>> Anyone knows how to solve this problem, is there a parameter I can set to
>> let S2 knows to redirect to S1? So S2 will not add an extra "action"
>> string at the end of URL.
>> 
>> Thanks in advance!
>> 
>> 
>> 
>> quote author="panpan">
>> Thanks, Dave. I just tried it. It worked.
>> 
>> ⩽param name="actionName">Menu.do⩽/param>
>> ⩽param name="namespace">/restricted/main⩽/param>
>> 
>> S2 knows to how to redirect to S1 action. That's great.
>> 
>> 
>> 
>> Dave Newton-4 wrote:
>>> 
>>> --- panpan <[EMAIL PROTECTED]> wrote:
 In the struts 2 configuration file struts.xml
   
 /restricted/main/Mene.do

 I know I cann't do that but anyone knows the way to
 fulfill the same functionality.
>>> 
>>> http://struts.apache.org/2.x/docs/result-types.html
>>> 
>>> Noting in particular:
>>> 
>>> http://struts.apache.org/2.x/docs/redirect-result.html
>>> 
>>> d.
>>> 
>>> 
>>> 
>>>  
>>> 
>>> Luggage? GPS? Comic books? 
>>> Check out fitting gifts for grads at Yahoo! Search
>>> http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
>>> 
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>>> 
>>> 
>> 
>> 
> 
> 



-- 
View this message in context: 
http://www.nabble.com/Can-I-Redirect-Action-Result-to-Strut1-action-in-struts.xml-tf3872273.html#a10992508
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: RE : [s2] Collection, array and tag.

2007-06-06 Thread Musachy Barroso

Maybe there is some OGNL trick, but I wouldn't know how. Are you sure you
want to change manipulate arrays in your pages (view)? Maybe there is a
valid use case for it, but it sounds weird to me.

musachy

On 6/6/07, Ezequiel Puig <[EMAIL PROTECTED]> wrote:


Musachy,

Thanks a lot for the comments about the  tag.

About the other questions i proposed, do you know if it's possible to
manipulate arrays with the s2 tags ??




-Message d'origine-
De: Musachy Barroso [mailto:[EMAIL PROTECTED]
Envoyé: mercredi 6 juin 2007 16:41
À: Struts Users Mailing List
Objet: Re: [s2] Collection, array and  tag.

I logged this ticket for it:

https://issues.apache.org/struts/browse/WW-1971

musachy

On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> Looking at the code, only String[] is transformed into parameters. For
> anything else, its toString() will be called and used as the value of
the
> parameter.
>
> I think  Lists and Sets should be processed as String[] are (calling the
> toString() on each element). Maps should be converted to parameters
using
> the key (toString() of the key element) as the name of the parameter and
the
> value (toString() of the value) as the value of course.
>
>
> //I used to think that you could use an iterator tag inside a url tag,
but
> that doesn't work
>
> musachy
>
> On 6/6/07, Ezequiel Puig < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> >
> >
> > I have been using struts 2 since a while and there is some things
about
> > the  tag i don't understant.
> >
> >
> >
> > Let's say we have an array in our action (with the getters and
setters):
> >
> >
> >
> > private String[] myArray;
> >
> >
> >
> > public String[] getMyArray() {
> >
> > return myArray;
> >
> > }
> >
> > public void setMyArray(String[] myArray) {
> >
> > this.myArray = myArray;
> >
> > }
> >
> >
> >
> > and that in our action, we do something to initializate the array:
> >
> >
> >
> > String[] arr = new String[3];
> >
> > arr[0] = "Aa";
> >
> > arr[1] = "Bb";
> >
> > arr[2] = "Cc";
> >
> >
> >
> > Now, if in our JSP we use the  tag:
> >
> >
> >
> > 
> >
> > 
> >
> >  " >Use Link
> >
> > 
> >
> >
> >
> > we can see that the created url is:
> >
> >
> >
> > TestUrlArray.action?myArray=Aa&myArray=Bb&myArray=Cc
> >
> >
> >
> > Also, in the destination action, we are able to recover the
information
> > from the variable "myArray" if we have defined something like "private
> > String[] myArray".
> >
> >
> >
> > So for, so good.
> >
> >
> >
> > Now, let's see the Collections:
> >
> >
> >
> > In the action we will have:
> >
> >
> >
> > private Collection myCollection = new ArrayList();
> >
> >
> >
> > public Collection  getMyCollection () {
> >
> > return myCollection;
> >
> > }
> >
> > public void setMyList(Collection  myCollection) {
> >
> > this.myCollection = myCollection;
> >
> > }
> >
> >
> >
> > we initialize the collection:
> >
> >
> >
> > Collection col = new ArrayList();
> >
> > col.add("Aa");
> >
> > col.add("Bb");
> >
> > col.add("Cc");
> >
> > setMyCollection(col);
> >
> >
> >
> > Finally, we use the  tag:
> >
> >
> >
> > 
> >
> > 
> >
> >  " >Use Link
> >
> > 
> >
> >
> >
> > Here, the created link looks like:
> > TestUrlArray.action?myCollection=[Aa,+Bb,+Cc]
> >
> >
> >
> > But, if we try to recover the collection in the destination action
> > (where offcourse we have defined "Collection col = new
> > ArrayList();" ), we will see that we recover a collection of
> > only one element, and that this element is our old collection (the one
> > with 3 elements).
> >
> >
> >
> > Now, it's time for questions:
> >
> >
> >
> > 1)   Is it possible to manipulate arrays with the s2 tags ? (by
> > manipulate, i mean create a new array, add an element to an existing
> > array, remove an element, etc.)
> >
> > 2)   Is it possible to manipulate collections with the s2 tags ?
> > (same meaning to manipulate)
> >
> > 3)   Is there a work-arround to recover a Collection not as a new
> > collection of one element that contains a collection but as a new
> > collection that is like the collection we passed ?
> >
> >
> >
> >
> >
> > Well, any ideas will be reallly wellcome :-)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd




--
"Hey you! Would you help me to carry the stone?" Pink Floyd

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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Problem with delete confirmation and s:a with ajax

2007-06-06 Thread Musachy Barroso

Use the notifyTopics attribute, (inside the topic check that the paremeter
"type" = "before") to pop up the dialog. See the section "Preventing the
request" here:

http://struts.apache.org/2.x/docs/ajax-tags.html

musachy

On 6/6/07, eschedel <[EMAIL PROTECTED]> wrote:



Hi,

I have a problem with a delete confirmation of struts2 and ajax. I using
following


" title=""/>


with the javascript function:

function confirmDelete() {
  check = confirm('Do you really want to delete the entry?');
  if ( !check ) {
return false;
  }
  else {
return true;
  }
}



I thought that if I didn't confirm the message, the href will not execute.
But the action in the href will be execute in any case.

Is there anyone who can help me.

Many thanks.

Bye
Elisabeth

--
View this message in context:
http://www.nabble.com/Problem-with-delete-confirmation-and-s%3Aa-with-ajax-tf3878492.html#a10990566
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


RE: Struts File Not Found (404) Behavior or Lack of...

2007-06-06 Thread Nathan Hook

I apologize, I forgot to mention all the versions we're using.

We are using Struts version 1.3.8 and running on Tomcat 5.5.23 if this 
helps.



Original Message Follows
From: "Nathan Hook" <[EMAIL PROTECTED]>

I've run into a problem.

If a user either accidentally or maliciously enters an incorrect path that 
has a struts extension the user will receive an Exception and a Stack Trace.


For example if we have the path www.xxx.com/login.do mapped like so...


  
  
  
  redirect="true"/>



and the user types in www.xxx.com/login2.do they will receive an Exception 
with the following Stack Trace...


javax.servlet.ServletException: No action config found for the specified 
url.


org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.kf.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.kf.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.kf.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)

Root Cause

org.apache.struts.chain.commands.InvalidPathException: No action config 
found for the specified url.


org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)

org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.xxx.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.xxx.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.xxx.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)


Instead of a user receiving a nice 404 File Not Found message they are 
displayed an Exception.  In my mind making the company look bad.  Also, a 
malicious user now knows our underlying technology, the flow of our 
application, and specific class names.


Is there any configuration settings that we can set to make these exceptions 
return a 404 page instead of a Exception?  Notice that this error fails WAY 
before any of the  are used.


As of right now I'm planning on Extending the 
org.apache.struts.action.ActionServlet class to check to see if we receive 
an org.apache.struts.chain.commands.InvalidPathException and if so then show 
a 404 page, but I'm not excited about extended super basic Struts behavior.


Does anyone have any thoughts on this subject and what do you think the 
behavior or Struts should be in this case?  I do like the fail fast aspect 
of what is happening, but there should be a more elegant way of handling the 
Exception.


Looking forward to any and all response.

Thank you for your time.

_
Don’t miss your chance to WIN $10,000 and other great prizes from Microsoft 
Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/



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

_
Get a preview of Live Earth, the hottest event this summer - only on MSN 
http://liveearth.msn.com?source=msntaglineliveearthhm



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



Struts File Not Found (404) Behavior or Lack of...

2007-06-06 Thread Nathan Hook

I've run into a problem.

If a user either accidentally or maliciously enters an incorrect path that 
has a struts extension the user will receive an Exception and a Stack Trace.


For example if we have the path www.xxx.com/login.do mapped like so...


  
  
  
  redirect="true"/>



and the user types in www.xxx.com/login2.do they will receive an Exception 
with the following Stack Trace...


javax.servlet.ServletException: No action config found for the specified 
url.


org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.kf.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.kf.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.kf.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)

Root Cause

org.apache.struts.chain.commands.InvalidPathException: No action config 
found for the specified url.


org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)

org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.xxx.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:44)
com.xxx.servlet.TrackingFilter.doFilter(TrackingFilter.java:36)

com.xxx.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)


Instead of a user receiving a nice 404 File Not Found message they are 
displayed an Exception.  In my mind making the company look bad.  Also, a 
malicious user now knows our underlying technology, the flow of our 
application, and specific class names.


Is there any configuration settings that we can set to make these exceptions 
return a 404 page instead of a Exception?  Notice that this error fails WAY 
before any of the  are used.


As of right now I'm planning on Extending the 
org.apache.struts.action.ActionServlet class to check to see if we receive 
an org.apache.struts.chain.commands.InvalidPathException and if so then show 
a 404 page, but I'm not excited about extended super basic Struts behavior.


Does anyone have any thoughts on this subject and what do you think the 
behavior or Struts should be in this case?  I do like the fail fast aspect 
of what is happening, but there should be a more elegant way of handling the 
Exception.


Looking forward to any and all response.

Thank you for your time.

_
Don’t miss your chance to WIN $10,000 and other great prizes from Microsoft 
Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/



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



RE: [OT] Re: javascript issue in jsp

2007-06-06 Thread Krishna, Hari \(FTT-CInternet\)
Thanks dave I got a little key to big door

Regards,
I.HariKrishna | Software Engineer | Franklin Templeton International
Services (India) Pvt. Ltd. | Franklin Templeton Centre,1st Floor,
No.7,Third Cross Street, Kasturba Nagar, Adyar, Chennai 600020
| Tel: +91 44 24407000 | Extn: 17123 | Fax: +91 44 24453661 | Mobile:
+91 9884528587 |  www.franklintempleton.com 


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 3:31 PM
To: Struts Users Mailing List
Subject: [OT] Re: javascript issue in jsp

--- "Krishna, Hari (FTT-CInternet)" wrote:
> This is the line of code that causes the issue.

Look in to JavaScript strings to understand why these
two things are issues.

"\" is an escape character.

> document.getElementById("text"+i).value = ;

Is that legal JavaScript?

(Hint: No.)

If you're embedding quotes you must escape them, or
use the quote that isn't in your input string (may
work, may just cause same problem).

d.



   


Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+ki
ds&cs=bz 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Notice:  All email and instant messages (including attachments) sent to
or from Franklin Templeton Investments (FTI) personnel may be retained,
monitored and/or reviewed by FTI and its agents, or authorized
law enforcement personnel, without further notice or consent.

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

On 6/6/07, Al Sutton <[EMAIL PROTECTED]> wrote:

Are the soap methods and the actions your calling accessing the same data
and/or service classes?


sure...under the hoodthey all utilize the same service 'layer'
(factory method pattern to acquire newly created serviceimpl classes)
and use the same domain objects (uniquely instantiated per servlet
request)

The only thing the individual requests should be 'sharing' is session
information...

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



RE : [s2] Collection, array and tag.

2007-06-06 Thread Ezequiel Puig
Musachy,

Thanks a lot for the comments about the  tag.

About the other questions i proposed, do you know if it's possible to 
manipulate arrays with the s2 tags ??




-Message d'origine-
De : Musachy Barroso [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 6 juin 2007 16:41
À : Struts Users Mailing List
Objet : Re: [s2] Collection, array and  tag.

I logged this ticket for it:

https://issues.apache.org/struts/browse/WW-1971

musachy

On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> Looking at the code, only String[] is transformed into parameters. For
> anything else, its toString() will be called and used as the value of the
> parameter.
>
> I think  Lists and Sets should be processed as String[] are (calling the
> toString() on each element). Maps should be converted to parameters using
> the key (toString() of the key element) as the name of the parameter and the
> value (toString() of the value) as the value of course.
>
>
> //I used to think that you could use an iterator tag inside a url tag, but
> that doesn't work
>
> musachy
>
> On 6/6/07, Ezequiel Puig < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> >
> >
> > I have been using struts 2 since a while and there is some things about
> > the  tag i don't understant.
> >
> >
> >
> > Let's say we have an array in our action (with the getters and setters):
> >
> >
> >
> > private String[] myArray;
> >
> >
> >
> > public String[] getMyArray() {
> >
> > return myArray;
> >
> > }
> >
> > public void setMyArray(String[] myArray) {
> >
> > this.myArray = myArray;
> >
> > }
> >
> >
> >
> > and that in our action, we do something to initializate the array:
> >
> >
> >
> > String[] arr = new String[3];
> >
> > arr[0] = "Aa";
> >
> > arr[1] = "Bb";
> >
> > arr[2] = "Cc";
> >
> >
> >
> > Now, if in our JSP we use the  tag:
> >
> >
> >
> > 
> >
> > 
> >
> >  " >Use Link
> >
> > 
> >
> >
> >
> > we can see that the created url is:
> >
> >
> >
> > TestUrlArray.action?myArray=Aa&myArray=Bb&myArray=Cc
> >
> >
> >
> > Also, in the destination action, we are able to recover the information
> > from the variable "myArray" if we have defined something like "private
> > String[] myArray".
> >
> >
> >
> > So for, so good.
> >
> >
> >
> > Now, let's see the Collections:
> >
> >
> >
> > In the action we will have:
> >
> >
> >
> > private Collection myCollection = new ArrayList();
> >
> >
> >
> > public Collection  getMyCollection () {
> >
> > return myCollection;
> >
> > }
> >
> > public void setMyList(Collection  myCollection) {
> >
> > this.myCollection = myCollection;
> >
> > }
> >
> >
> >
> > we initialize the collection:
> >
> >
> >
> > Collection col = new ArrayList();
> >
> > col.add("Aa");
> >
> > col.add("Bb");
> >
> > col.add("Cc");
> >
> > setMyCollection(col);
> >
> >
> >
> > Finally, we use the  tag:
> >
> >
> >
> > 
> >
> > 
> >
> >  " >Use Link
> >
> > 
> >
> >
> >
> > Here, the created link looks like:
> > TestUrlArray.action?myCollection=[Aa,+Bb,+Cc]
> >
> >
> >
> > But, if we try to recover the collection in the destination action
> > (where offcourse we have defined "Collection col = new
> > ArrayList();" ), we will see that we recover a collection of
> > only one element, and that this element is our old collection (the one
> > with 3 elements).
> >
> >
> >
> > Now, it's time for questions:
> >
> >
> >
> > 1)   Is it possible to manipulate arrays with the s2 tags ? (by
> > manipulate, i mean create a new array, add an element to an existing
> > array, remove an element, etc.)
> >
> > 2)   Is it possible to manipulate collections with the s2 tags ?
> > (same meaning to manipulate)
> >
> > 3)   Is there a work-arround to recover a Collection not as a new
> > collection of one element that contains a collection but as a new
> > collection that is like the collection we passed ?
> >
> >
> >
> >
> >
> > Well, any ideas will be reallly wellcome :-)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd




-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



Problem with delete confirmation and s:a with ajax

2007-06-06 Thread eschedel

Hi,

I have a problem with a delete confirmation of struts2 and ajax. I using
following


" title=""/>


with the javascript function:

function confirmDelete() {
  check = confirm('Do you really want to delete the entry?');
  if ( !check ) {
return false;
  }
  else {
return true;
  }
}



I thought that if I didn't confirm the message, the href will not execute.
But the action in the href will be execute in any case.

Is there anyone who can help me.

Many thanks.

Bye
Elisabeth

-- 
View this message in context: 
http://www.nabble.com/Problem-with-delete-confirmation-and-s%3Aa-with-ajax-tf3878492.html#a10990566
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Al Sutton
Are the soap methods and the actions your calling accessing the same data
and/or service classes? 

-Original Message-
From: Jeff Amiel [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 15:49
To: Struts Users Mailing List
Subject: Re: How can one servlet (ActionServlet) effect another servlet
(AxisServlet)...?

On 6/6/07, Dave Newton <[EMAIL PROTECTED]> wrote:

>
> Is it only specific actions that cause the behavior?

I can't tell anymore.  My current logs are showing me these exceptions
unrelated to the actions I THOUGHT were culpable.  They only sure thing is
that I cannot get the issue to occur by just banging on the server with axis
(soap) messages.  There has to be other activity (struts action messages) at
the same time.

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



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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

On 6/6/07, Dave Newton <[EMAIL PROTECTED]> wrote:



Is it only specific actions that cause the behavior?


I can't tell anymore.  My current logs are showing me these exceptions
unrelated to the actions I THOUGHT were culpable.  They only sure
thing is that I cannot get the issue to occur by just banging on the
server with axis (soap) messages.  There has to be other activity
(struts action messages) at the same time.

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



Re: [s2] Collection, array and tag.

2007-06-06 Thread Musachy Barroso

I logged this ticket for it:

https://issues.apache.org/struts/browse/WW-1971

musachy

On 6/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


Looking at the code, only String[] is transformed into parameters. For
anything else, its toString() will be called and used as the value of the
parameter.

I think  Lists and Sets should be processed as String[] are (calling the
toString() on each element). Maps should be converted to parameters using
the key (toString() of the key element) as the name of the parameter and the
value (toString() of the value) as the value of course.


//I used to think that you could use an iterator tag inside a url tag, but
that doesn't work

musachy

On 6/6/07, Ezequiel Puig < [EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> I have been using struts 2 since a while and there is some things about
> the  tag i don't understant.
>
>
>
> Let's say we have an array in our action (with the getters and setters):
>
>
>
> private String[] myArray;
>
>
>
> public String[] getMyArray() {
>
> return myArray;
>
> }
>
> public void setMyArray(String[] myArray) {
>
> this.myArray = myArray;
>
> }
>
>
>
> and that in our action, we do something to initializate the array:
>
>
>
> String[] arr = new String[3];
>
> arr[0] = "Aa";
>
> arr[1] = "Bb";
>
> arr[2] = "Cc";
>
>
>
> Now, if in our JSP we use the  tag:
>
>
>
> 
>
> 
>
>  " >Use Link
>
> 
>
>
>
> we can see that the created url is:
>
>
>
> TestUrlArray.action?myArray=Aa&myArray=Bb&myArray=Cc
>
>
>
> Also, in the destination action, we are able to recover the information
> from the variable "myArray" if we have defined something like "private
> String[] myArray".
>
>
>
> So for, so good.
>
>
>
> Now, let's see the Collections:
>
>
>
> In the action we will have:
>
>
>
> private Collection myCollection = new ArrayList();
>
>
>
> public Collection  getMyCollection () {
>
> return myCollection;
>
> }
>
> public void setMyList(Collection  myCollection) {
>
> this.myCollection = myCollection;
>
> }
>
>
>
> we initialize the collection:
>
>
>
> Collection col = new ArrayList();
>
> col.add("Aa");
>
> col.add("Bb");
>
> col.add("Cc");
>
> setMyCollection(col);
>
>
>
> Finally, we use the  tag:
>
>
>
> 
>
> 
>
>  " >Use Link
>
> 
>
>
>
> Here, the created link looks like:
> TestUrlArray.action?myCollection=[Aa,+Bb,+Cc]
>
>
>
> But, if we try to recover the collection in the destination action
> (where offcourse we have defined "Collection col = new
> ArrayList();" ), we will see that we recover a collection of
> only one element, and that this element is our old collection (the one
> with 3 elements).
>
>
>
> Now, it's time for questions:
>
>
>
> 1)   Is it possible to manipulate arrays with the s2 tags ? (by
> manipulate, i mean create a new array, add an element to an existing
> array, remove an element, etc.)
>
> 2)   Is it possible to manipulate collections with the s2 tags ?
> (same meaning to manipulate)
>
> 3)   Is there a work-arround to recover a Collection not as a new
> collection of one element that contains a collection but as a new
> collection that is like the collection we passed ?
>
>
>
>
>
> Well, any ideas will be reallly wellcome :-)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Struts 1.3.x : Dynavalidatorform : initialize & prepopulate ArralyList with data after submisstion

2007-06-06 Thread Niall Pemberton

Use a LazyValidatorForm - define an array of User objects for the form
in your struts-config and it will automatically populate it for you:


   


http://struts.apache.org/1.x/userGuide/building_controller.html#lazy_action_form_classes

Niall

On 6/6/07, Raghupathy, Gurumoorthy <[EMAIL PROTECTED]> wrote:

Hi,

Situation   :   One DynaValidatorForm has a
property of type "java.util.ArrayList" and size is not known in advance

The Arraylist consists
of elements of type "User" which is a simple Javabean and dispayed using
struts:text  indexed="true"

Question   :   How can I get the collection
back as an ArrayList prepopulated back when i submit the data back 

I want to know a
solution with the least amount of code ...



Please note   :   I have done google search for
this and there does nto seems to be an "elegant" way of doing this with
DynaValidatorForm



Please help

Regards

Guru


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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Dave Newton
--- Jeff Amiel <[EMAIL PROTECTED]> wrote:
> development environment by having a client
> application rapidly send SOAP messages in while 
> simultaneously hitting a single struts action
> via a auto-refreshing html page.

Is it only specific actions that cause the behavior?

d.



 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

On 6/6/07, Martin Gainty <[EMAIL PROTECTED]> wrote:


No, actually you can't.


Thanks. for the info,

Now that I can reproduce this issue in my development environment, I'm
going to simply upgrade to the latest Jboss that has tomcat 5.5.20 (or
even 6?) and see what happens.

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

On 6/5/07, Jeff Amiel <[EMAIL PROTECTED]> wrote:

Recent issue is driving me batty.  Suddenly started receiving
exceptions in app server logs (tomcat a la jboss)...



What is horrible is that I can actually reproduce this in my
development environment by having a client application rapidly send
SOAP messages in while simultaneously hitting a single struts action
via a auto-refreshing html page.

No matter what DEBUG logging levels I turn on (catalina or axis), I
can't seem to find anything useful...

*grumble*.

Any suggestions on how to debug/troubleshoot this thing knowing that I
can reproduce this "at-will"?

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Martin Gainty

Jeff-

Apparently JBoss' CATALINA container is hardbound to that port and the only 
solution is to redirect to another port within jboss-service.xml

in tomcat-5.5.sar

No, actually you can't. To be specific, there is a service called something 
like tomcat-5.5.sar. This SAR (Service ARchive) contains the Catalina engine 
from Tomcat 5.5, but not the actual Tomcat server itself. JBoss effectively 
does the same thing as Tomcat when executing code in the Web Container, 
because it's just calling the Catalina functions. It can't stand alone 
though, because the bootstrap code is missing, and you can't simply point 
JBoss at a different Tomcat installation because a SAR is a slightly 
different representation of the same code. You can, however, take the WAR 
from an existing Tomcat installation and hot-deploy it to JBoss provided 
there's no version issues.


To address the OP, you would have to change the port number that JBoss uses 
for the Web Container by editing the jboss-service.xml file in the 
tomcat-5.5.sar directory.


HTH
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Jeff Amiel" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, June 06, 2007 9:20 AM
Subject: Re: How can one servlet (ActionServlet) effect another servlet 
(AxisServlet)...?




On 6/6/07, Niall Pemberton <[EMAIL PROTECTED]> wrote:

The latest Tomcat 5.5 release is 5.5.23 in March 2007. If you really
are running a very old version of Tomcat - then upgrading would be a
good idea anyway - whether it fixes this bug or not. First step though
is to work out what version you're running.


Anyone know how to upgrade tomcat versions without upgrading the
'surrounding' jboss?

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



[S2] Problems with special characters

2007-06-06 Thread Torsten Römer
I am experiencing quite strange problems with special characters such as
odiaresis and aring (ä,å,ö):

- Sometimes already when the form is redisplayed on validation error

- When the form values are inserted into the database

- When the form values are sent as text email

The strange thing is, that this doesn't always happen. Sometimes the
characters are displayed fine, sometimes they are shown as question mark.

A similar & also strange problem is when using getText() in the action.
It seems that depending on the locale set by the user, special
characters might get messed up as well.

Is this a problem with charsets? Encoding? Is there some JVM parameter
or Struts2 configuration that I could play with?

Torsten


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



[S2] OGNL newbie: obtaining subset of a collection

2007-06-06 Thread Paolo Beccari


Hi there,

here:
http://struts.apache.org/2.x/docs/ognl.html

I found that:
To select a subset of a collection (called projection), use a wildcard
within the collection.
? - All elements matching the selection logic
^ - Only the first element matching the selection logic
$ - Only the last element matching the selection logic
To obtain a subset of just male relatives from the object person:
person.relatives.{? #this.gender == 'male'}

I can't find the correct syntax to pass a variable (picked from valueStack)
instead of the string 'male'

Someone can help or point me the docs?
P. 



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



Re: cannot reset dynavalidatorform in struts 1.2.9

2007-06-06 Thread Vincent Lin

Could you check the generated HTML code?
(Use the view source function of your browser)
If the html of the field has value="x", the reset button won't clear it.
It just reset the value to original value.

Did you set the properties to your DynaActionForm?
Or the form has default values?

On 6/6/07, Ambaris Mohanty <[EMAIL PROTECTED]> wrote:


Hi,

I'm using a simple DynaValidatorForm for my login form. The problem is.
the
reset button doesn't reset the fields to blank state which I want. Can
anybody help?

AM




Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Jeff Amiel

On 6/6/07, Niall Pemberton <[EMAIL PROTECTED]> wrote:

The latest Tomcat 5.5 release is 5.5.23 in March 2007. If you really
are running a very old version of Tomcat - then upgrading would be a
good idea anyway - whether it fixes this bug or not. First step though
is to work out what version you're running.


Anyone know how to upgrade tomcat versions without upgrading the
'surrounding' jboss?

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



Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?

2007-06-06 Thread Niall Pemberton

On 6/6/07, Jeff Amiel <[EMAIL PROTECTED]> wrote:

On 6/5/07, Niall Pemberton <[EMAIL PROTECTED]> wrote:
>
> Might be a Tomcat issue - can you be more precise about the version of
> Tomcat 5.5?

from org/apache/catalina/util/ServerInfo.properties

server.info=Apache Tomcat/5.5
server.number=5.5.0.0
server.built=Sep 25 2005 10:08:45


Looks like this information isn't reliable since Tomcat 5.5.12 was
released on 24 July 2005
  http://tinyurl.com/yojvdq

The latest Tomcat 5.5 release is 5.5.23 in March 2007. If you really
are running a very old version of Tomcat - then upgrading would be a
good idea anyway - whether it fixes this bug or not. First step though
is to work out what version you're running.

Niall

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



Re: display current date in header

2007-06-06 Thread Vincent Lin

You can write a base action and have every action extends it.
And do this in your execute() method:

Calendar cal = Calendar.getInstance();
Date currDate = cal.getTime();
SimpleDateFormat df = new SimpleDateFormat("dd.MM.");
String showDate =  df.format(currDate);
request.setAttribute("showDate", showDate);

If you think use a base action make your code ugly you can write a servlet
filter and configured it in web.xml.

And write a bean:write tag in your JSP:



On 6/6/07, Raghupathy, Gurumoorthy <[EMAIL PROTECTED]>
wrote:


http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html

-Original Message-
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Sent: 06 June 2007 08:54
To: 'Struts Users Mailing List'
Subject: RE: display current date in header

Thanks for your solution. It works fine. But I want to do it without using
scrip lets. How to do?
AM

-Original Message-
From: Norbert Hirneisen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 06, 2007 12:01 PM
To: 'Struts Users Mailing List'
Subject: RE: display current date in header

In your jsp:

<%@ page import="java.util.Calendar"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>

<%
// current Date
Calendar cal = Calendar.getInstance();
Date currDate = cal.getTime();
SimpleDateFormat df = new SimpleDateFormat("dd.MM.");
String showDate =  df.format(currDate);
%>

In the html-body:
<%=showDate%>

Regards,
Norbert

Norbert Hirneisen

science4you Online-Monitoring

Please visit us:
http://www.science4you.org
(in German)

Norbert Hirneisen
Science & Communications
von-Müllenark-Str. 19
53179 Bonn
phone +49-228-6194930



-Ursprüngliche Nachricht-
Von: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 6. Juni 2007 07:26
An: 'Struts Users Mailing List'
Betreff: display current date in header


Hi all,
I'm using struts 1.2.9 along with Tiles. I want to display current date in
the header page. Can anybody tell me the best approach to do so?
Thank you,
AM


-
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: [s2 on J4] Error Message: Filter [struts2]: could not be initialized

2007-06-06 Thread Dave Newton
It looks like this issue has been around awhile;
google for

struts + "No mapping found for dependency"

and you may find something that will help.

d.

--- johana pin <[EMAIL PROTECTED]> wrote:

> First I put the initial plugin in the lib dir. and I
> got version error. After that, I compiled the
> sources with 1.4 and it passed over that error. The
> only jars that I used from struts2 distribution are:
> - those provided in J4 download
> - struts-spring plugin (one class compiled with
> eclipse - java 1.4)
> - ognl-2.6.11.jar (I just retrotranslated this one
> and I have same error)
> 
> I found a simmilary issue in this context:
>
http://mail-archives.apache.org/mod_mbox/struts-user/200701.mbox/[EMAIL 
PROTECTED]
> 
> 
> - Original Message 
> From: Dave Newton <[EMAIL PROTECTED]>
> To: Struts Users Mailing List
> 
> Sent: Wednesday, June 6, 2007 2:06:39 PM
> Subject: Re: [s2 on J4] Error Message: Filter
> [struts2]: could not be initialized
> 
> 
> --- johana pin <[EMAIL PROTECTED]> wrote:
> > I used the J4 download from struts site. I only
> > recompiled (not with retrotranslator but with
> > eclipse) the struts-spring plugin from 'all'
> > distribution.
> 
> You're building from source? Make sure it's
> compiling
> with a 1.4 JDK.
> 
> Anyway, try J4-ing any of the struts2-* jars and
> tiles
> if you're using them. That was enough for Weblogic,
> anyway, but the error you're getting isn't like
> anything I saw.
> 
> d.
> 
> 
> 
>
>

> Take the Internet to Go: Yahoo!Go puts the Internet
> in your pocket: mail, news, photos & more. 
> http://mobile.yahoo.com/go?refer=1GNXIC
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>  
>

> Looking for earth-friendly autos? 
> Browse Top Cars by "Green Rating" at Yahoo! Autos'
> Green Center.
> http://autos.yahoo.com/green_center/



   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

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



RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Al Sutton
Could well be the problem Dave. Good catch :)

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 13:37
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

That may all be true, but in the end, the server may never know that the
user closed the browser.

There's just no mechanism in place to determine
(reliably) if the browser has been closed, at least from the server-side
(which can't tell if the browser has been closed).

--- Al Sutton <[EMAIL PROTECTED]> wrote:

> Guru,
> 
> I think he's missed the fundamental point about the sever not being 
> able to determine if a user closes the browser.
> 
> Maybe it's worth re-iterating to him about the sever not being able to 
> determine if a user closes the browser.
> 
> Or telling him about the sever not being able to determine if a user 
> closes the browser.
> 
> Possibly letting him know about the sever not being able to determine 
> if a user closes the browser.
> 
> And then say that the best you can do is monitor the session for 
> expiry.
> 
> Just a though ;).
> 
> Al.
> 
> 
> -Original Message-
> From: Raghupathy, Gurumoorthy
> [mailto:[EMAIL PROTECTED]
> Sent: 06 June 2007 12:34
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in Multiple system 
> (Multiple
> browser) when the session is active. 
> 
> Hello,
>do not try to hijack other thread.
>   Reply to your own thread. 
>   No as I said it will be called when your session expires .
>   What is your session timeout value ?
> 
>   This should be something like 
>
>   30
> 
>   
>   With this configuration in web.xml your session will expire in 30 
> mins
>   And when this is done your method will execute ... 
> 
>   I assume you have registered your listener in web.xml I hope this 
> helps
> 
> Guru
> 
> -Original Message-
> From: Srinivasula Reddy A , Bangalore
> [mailto:[EMAIL PROTECTED]
> Sent: 06 June 2007 11:34
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in Multiple system 
> (Multiple
> browser) when the session is active. 
> 
> This is the snippet I am writing in my login action
> 
>
if(servlet.getServletContext().getAttribute("userList")!=null){
>   System.out.println(" IN
> SIDE IF OF CONTEXT ");
>   Hashtable findUser = new
> Hashtable();
>   findUser = (Hashtable)
>
servlet.getServletContext().getAttribute("userList");
>   
> findUser.contains(username);
>   expDTO = new
>
ExceptionDisplayDTO(DFSConstants.FORWARD_FAILURE,ExpContextConstants.LOG
> IN_FAILED);
>   
> expDisplayDetails.set(expDTO);
>   throw new
> LoginFailedException("LoginFailedException");
>   
>   }else{
>   System.out.println(" IN SIDE
> ELSE OF CONTEXT ");
>   Hashtable userList = new
> Hashtable();
>   
> userList.put("username",username);
>   
>
servlet.getServletContext().setAttribute("userList",userList);
>   }
> 
> But the thing is if the user  close the IE instead of log out I am 
> unable to remove the user from the hash table
> 
> How can I overcome this?
> 
> Regards,
> Sreenivasula Reddy A
> 
> -Original Message-
> From: Srinivasula Reddy A , Bangalore
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 06, 2007 1:48 PM
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in Multiple system 
> (Multiple
> browser) when the session is active. 
> 
> Hi guru volume of hits is less and my server is running on single 
> machine only so give me some sample snippet for this kind of 
> development
> 
> -Original Message-
> From: Raghupathy, Gurumoorthy
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 06, 2007 1:19 PM
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in Multiple system 
> (Multiple
> browser) when the session is active. 
> 
> My answer is "It depends". 
> 
> If the volume (number of hits) of your website is low and your server 
> is on a single node then you can create a hashtable of users (user 
> name as
> key) as an CONTEXT attribute and each time someone logs in you can 
> check the user against the key in the hashtable ... if the keay 
> already exists tell them to Get lost and once the user is logged off 
> you can remove them from the hash..
> 
> 
> If your application is running as part of a farm then store the status 
> in DB / persistence medium. However there will be a performance hit
> 
> Have a look at
> 
>
http://java.sun.com/j2e

Re: [s2] Collection, array and tag.

2007-06-06 Thread Musachy Barroso

Looking at the code, only String[] is transformed into parameters. For
anything else, its toString() will be called and used as the value of the
parameter.

I think  Lists and Sets should be processed as String[] are (calling the
toString() on each element). Maps should be converted to parameters using
the key (toString() of the key element) as the name of the parameter and the
value (toString() of the value) as the value of course.


//I used to think that you could use an iterator tag inside a url tag, but
that doesn't work

musachy

On 6/6/07, Ezequiel Puig <[EMAIL PROTECTED]> wrote:


Hi,



I have been using struts 2 since a while and there is some things about
the  tag i don't understant.



Let's say we have an array in our action (with the getters and setters):



private String[] myArray;



public String[] getMyArray() {

return myArray;

}

public void setMyArray(String[] myArray) {

this.myArray = myArray;

}



and that in our action, we do something to initializate the array:



String[] arr = new String[3];

arr[0] = "Aa";

arr[1] = "Bb";

arr[2] = "Cc";



Now, if in our JSP we use the  tag:







 " >Use Link





we can see that the created url is:



TestUrlArray.action?myArray=Aa&myArray=Bb&myArray=Cc



Also, in the destination action, we are able to recover the information
from the variable "myArray" if we have defined something like "private
String[] myArray".



So for, so good.



Now, let's see the Collections:



In the action we will have:



private Collection myCollection = new ArrayList();



public Collection  getMyCollection () {

return myCollection;

}

public void setMyList(Collection  myCollection) {

this.myCollection = myCollection;

}



we initialize the collection:



Collection col = new ArrayList();

col.add("Aa");

col.add("Bb");

col.add("Cc");

setMyCollection(col);



Finally, we use the  tag:







 " >Use Link





Here, the created link looks like:
TestUrlArray.action?myCollection=[Aa,+Bb,+Cc]



But, if we try to recover the collection in the destination action
(where offcourse we have defined "Collection col = new
ArrayList();" ), we will see that we recover a collection of
only one element, and that this element is our old collection (the one
with 3 elements).



Now, it's time for questions:



1)   Is it possible to manipulate arrays with the s2 tags ? (by
manipulate, i mean create a new array, add an element to an existing
array, remove an element, etc.)

2)   Is it possible to manipulate collections with the s2 tags ?
(same meaning to manipulate)

3)   Is there a work-arround to recover a Collection not as a new
collection of one element that contains a collection but as a new
collection that is like the collection we passed ?





Well, any ideas will be reallly wellcome :-)





















--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: [s2 on J4] Error Message: Filter [struts2]: could not be initialized

2007-06-06 Thread johana pin
First I put the initial plugin in the lib dir. and I got version error. After 
that, I compiled the sources with 1.4 and it passed over that error. The only 
jars that I used from struts2 distribution are:
- those provided in J4 download
- struts-spring plugin (one class compiled with eclipse - java 1.4)
- ognl-2.6.11.jar (I just retrotranslated this one and I have same error)

I found a simmilary issue in this context:
http://mail-archives.apache.org/mod_mbox/struts-user/200701.mbox/[EMAIL 
PROTECTED]


- Original Message 
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Wednesday, June 6, 2007 2:06:39 PM
Subject: Re: [s2 on J4] Error Message: Filter [struts2]: could not be 
initialized


--- johana pin <[EMAIL PROTECTED]> wrote:
> I used the J4 download from struts site. I only
> recompiled (not with retrotranslator but with
> eclipse) the struts-spring plugin from 'all'
> distribution.

You're building from source? Make sure it's compiling
with a 1.4 JDK.

Anyway, try J4-ing any of the struts2-* jars and tiles
if you're using them. That was enough for Weblogic,
anyway, but the error you're getting isn't like
anything I saw.

d.



   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

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


 

Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Dave Newton
That may all be true, but in the end, the server may
never know that the user closed the browser.

There's just no mechanism in place to determine
(reliably) if the browser has been closed, at least
from the server-side (which can't tell if the browser
has been closed).

--- Al Sutton <[EMAIL PROTECTED]> wrote:

> Guru,
> 
> I think he's missed the fundamental point about the
> sever not being able to
> determine if a user closes the browser.
> 
> Maybe it's worth re-iterating to him about the sever
> not being able to
> determine if a user closes the browser.
> 
> Or telling him about the sever not being able to
> determine if a user closes
> the browser.
> 
> Possibly letting him know about the sever not being
> able to determine if a
> user closes the browser.
> 
> And then say that the best you can do is monitor the
> session for expiry.
> 
> Just a though ;).
> 
> Al.
> 
> 
> -Original Message-
> From: Raghupathy, Gurumoorthy
> [mailto:[EMAIL PROTECTED] 
> Sent: 06 June 2007 12:34
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in
> Multiple system (Multiple
> browser) when the session is active. 
> 
> Hello,
>do not try to hijack other thread.
>   Reply to your own thread. 
>   No as I said it will be called when your session
> expires . 
>   What is your session timeout value ?
> 
>   This should be something like 
>
>   30
> 
>   
>   With this configuration in web.xml your session
> will expire in 30
> mins 
>   And when this is done your method will execute ... 
> 
>   I assume you have registered your listener in
> web.xml I hope this
> helps 
> 
> Guru
> 
> -Original Message-
> From: Srinivasula Reddy A , Bangalore
> [mailto:[EMAIL PROTECTED]
> Sent: 06 June 2007 11:34
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in
> Multiple system (Multiple
> browser) when the session is active. 
> 
> This is the snippet I am writing in my login action
> 
>
if(servlet.getServletContext().getAttribute("userList")!=null){
>   System.out.println(" IN
> SIDE IF OF CONTEXT ");
>   Hashtable findUser = new
> Hashtable();
>   findUser = (Hashtable)
>
servlet.getServletContext().getAttribute("userList");
>   
> findUser.contains(username);
>   expDTO = new
>
ExceptionDisplayDTO(DFSConstants.FORWARD_FAILURE,ExpContextConstants.LOG
> IN_FAILED);
>   
> expDisplayDetails.set(expDTO);
>   throw new
> LoginFailedException("LoginFailedException");
>   
>   }else{
>   System.out.println(" IN SIDE
> ELSE OF CONTEXT ");
>   Hashtable userList = new
> Hashtable();
>   
> userList.put("username",username);
>   
>
servlet.getServletContext().setAttribute("userList",userList);
>   }
> 
> But the thing is if the user  close the IE instead
> of log out I am unable to
> remove the user from the hash table 
> 
> How can I overcome this?
> 
> Regards,
> Sreenivasula Reddy A
> 
> -Original Message-
> From: Srinivasula Reddy A , Bangalore
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 06, 2007 1:48 PM
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in
> Multiple system (Multiple
> browser) when the session is active. 
> 
> Hi guru volume of hits is less and my server is
> running on single machine
> only so give me some sample snippet for this kind of
> development
> 
> -Original Message-
> From: Raghupathy, Gurumoorthy
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 06, 2007 1:19 PM
> To: Struts Users Mailing List
> Subject: RE: How to Protect the user to login in
> Multiple system (Multiple
> browser) when the session is active. 
> 
> My answer is "It depends". 
> 
> If the volume (number of hits) of your website is
> low and your server is on
> a single node then you can create a hashtable of
> users (user name as
> key) as an CONTEXT attribute and each time someone
> logs in you can check the
> user against the key in the hashtable ... if the
> keay already exists tell
> them to Get lost and once the user is logged off you
> can remove them from
> the hash.. 
> 
> 
> If your application is running as part of a farm
> then store the status
> in DB / persistence medium. However there will be a
> performance hit 
> 
> Have a look at 
> 
>
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
> xt.html  
> 
> 
> One pattern which can be of helps is "observer
> pattern" which will
> observe user logging in and logging out   when
> used as a filter 
> 
> 
> http://java.sun.com/products/servlet/Filters.h

RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Al Sutton
Guru,

I think he's missed the fundamental point about the sever not being able to
determine if a user closes the browser.

Maybe it's worth re-iterating to him about the sever not being able to
determine if a user closes the browser.

Or telling him about the sever not being able to determine if a user closes
the browser.

Possibly letting him know about the sever not being able to determine if a
user closes the browser.

And then say that the best you can do is monitor the session for expiry.

Just a though ;).

Al.


-Original Message-
From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 12:34
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

Hello,
 do not try to hijack other thread.
Reply to your own thread. 
No as I said it will be called when your session expires . 
What is your session timeout value ?

This should be something like 
   
  30


With this configuration in web.xml your session will expire in 30
mins 
And when this is done your method will execute ... 

I assume you have registered your listener in web.xml I hope this
helps 

Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: 06 June 2007 11:34
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

This is the snippet I am writing in my login action

if(servlet.getServletContext().getAttribute("userList")!=null){
System.out.println(" IN
SIDE IF OF CONTEXT ");
Hashtable findUser = new
Hashtable();
findUser = (Hashtable)
servlet.getServletContext().getAttribute("userList");

findUser.contains(username);
expDTO = new
ExceptionDisplayDTO(DFSConstants.FORWARD_FAILURE,ExpContextConstants.LOG
IN_FAILED);

expDisplayDetails.set(expDTO);
throw new
LoginFailedException("LoginFailedException");

}else{
System.out.println(" IN SIDE
ELSE OF CONTEXT ");
Hashtable userList = new
Hashtable();

userList.put("username",username);

servlet.getServletContext().setAttribute("userList",userList);
}

But the thing is if the user  close the IE instead of log out I am unable to
remove the user from the hash table 

How can I overcome this?

Regards,
Sreenivasula Reddy A

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 06, 2007 1:48 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

Hi guru volume of hits is less and my server is running on single machine
only so give me some sample snippet for this kind of development

-Original Message-
From: Raghupathy, Gurumoorthy
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 06, 2007 1:19 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is on
a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check the
user against the key in the hashtable ... if the keay already exists tell
them to Get lost and once the user is logged off you can remove them from
the hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in mu

RE: [S2] decoding values of objects properties

2007-06-06 Thread Al Sutton
Why not pre-decode the results in the action, populate a Collection, and add
a getDecoded method to the action which returns the pre-decoded Collection.
You can then use s:iterator to iterator over the collection and call methods
within each element. This allows you to implement whatever class hierarchy
you want for the objects in the collection to provide the data for your view
without needing a get method for each property.

Also as a side note, you said "...if the decoded value I'm searching is the
last in the list...", is there any reason you aren't taking your search
value, encoding it for your data model, and putting it into your database
query. That way you're using the database to do the search and you don't
pull all the data from a table over the network just to find one value.

-Original Message-
From: Paolo Beccari [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 12:36
To: Struts Users Mailing List
Subject: Re: [S2] decoding values of objects properties


- Original Message -
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, June 06, 2007 1:14 PM
Subject: Re: [S2] decoding values of objects properties


> I'm still not entirely what you're decoding from and
> to; it sounds like something is fundamentally broken,
> but...
>

Ok, I explain: suppose we have an entity with a state property that can 
assume values 0, 1 where 0 stands for "Active" and 1 stands for "Not 
Active".
state is the property name
0 is the value
"Active" is the "decoded" value

It's often useful (at database level) to map certain properties to numbers 
(or strings, or whatever) which belongs to a description in metadata, so it 
is possible (for example) to change the description without any side-effects

on old stored data.

(Joining the table to retrieve the decoded value is not an option when the 
metadata table is shared through many sets of values and not dedicated to a 
precise field or table (it should be joined too many times): it is best 
effective to store metadata in memory and pick values from it.)

> Remember that with OGNL you *can* call arbitrary
> methods, including static utility methods, from with
> the EL. So with either a static decoding class or
> (preferably) a service object in your action if you're
> iterating over a list you can call methods on items
> from that list.
>
> d.

Ok, so it seems I'm missing some OGNL features: if I can call a method of an

Action that accept parameters in input then this is the solution. I'm going 
back to study and find how to.

Many thanks,
P.


-
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: [S2] decoding values of objects properties

2007-06-06 Thread Paolo Beccari


- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, June 06, 2007 1:14 PM
Subject: Re: [S2] decoding values of objects properties



I'm still not entirely what you're decoding from and
to; it sounds like something is fundamentally broken,
but...



Ok, I explain: suppose we have an entity with a state property that can 
assume values 0, 1 where 0 stands for "Active" and 1 stands for "Not 
Active".

state is the property name
0 is the value
"Active" is the "decoded" value

It's often useful (at database level) to map certain properties to numbers 
(or strings, or whatever) which belongs to a description in metadata, so it 
is possible (for example) to change the description without any side-effects 
on old stored data.


(Joining the table to retrieve the decoded value is not an option when the 
metadata table is shared through many sets of values and not dedicated to a 
precise field or table (it should be joined too many times): it is best 
effective to store metadata in memory and pick values from it.)



Remember that with OGNL you *can* call arbitrary
methods, including static utility methods, from with
the EL. So with either a static decoding class or
(preferably) a service object in your action if you're
iterating over a list you can call methods on items
from that list.

d.


Ok, so it seems I'm missing some OGNL features: if I can call a method of an 
Action that accept parameters in input then this is the solution. I'm going 
back to study and find how to.


Many thanks,
P.


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



RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Raghupathy, Gurumoorthy
Hello,
 do not try to hijack other thread.
Reply to your own thread. 
No as I said it will be called when your session expires . 
What is your session timeout value ?

This should be something like 
   
  30


With this configuration in web.xml your session will expire in
30 mins 
And when this is done your method will execute ... 

I assume you have registered your listener in web.xml 
I hope this helps 

Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 11:34
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

This is the snippet I am writing in my login action

if(servlet.getServletContext().getAttribute("userList")!=null){
System.out.println(" IN
SIDE IF OF CONTEXT ");
Hashtable findUser = new
Hashtable();
findUser = (Hashtable)
servlet.getServletContext().getAttribute("userList");

findUser.contains(username);
expDTO = new
ExceptionDisplayDTO(DFSConstants.FORWARD_FAILURE,ExpContextConstants.LOG
IN_FAILED);

expDisplayDetails.set(expDTO);
throw new
LoginFailedException("LoginFailedException");

}else{
System.out.println(" IN SIDE
ELSE OF CONTEXT ");
Hashtable userList = new
Hashtable();

userList.put("username",username);

servlet.getServletContext().setAttribute("userList",userList);
}

But the thing is if the user  close the IE instead of log out I am
unable to remove the user from the hash table 

How can I overcome this?

Regards,
Sreenivasula Reddy A

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 1:48 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

Hi guru volume of hits is less and my server is running on single
machine only so give me some sample snippet for this kind of development

-Original Message-
From: Raghupathy, Gurumoorthy
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 1:19 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is
on a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check
the user against the key in the hashtable ... if the keay already exists
tell them to 
Get lost and once the user is logged off you can remove them from the
hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in multiple browsers when
the session is action.

 

For example in gmail if we login in one browser and we are surfing, then
if we open another IE and type gmail it will redirect to the page where
we are surfing in the previous IE.

 

I need this kind of feature for my login system. How to implement this
in struts 

 

Give me some sample snippet or rough idea

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email a

RE: [S2] decoding values of objects properties

2007-06-06 Thread Raghupathy, Gurumoorthy
Hello,
 do not try to hijack other thread.
Reply to your own thread. 
No as I said it will be called when your session expires . 
What is your session timeout value ?

This should be something like 
   
  30


With this configuration in web.xml your session will expire in
30 mins 
And when this is done your method will execute ... 

I assume you have registered your listener in web.xml 
I hope this helps 

Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 12:19
To: Struts Users Mailing List
Subject: RE: [S2] decoding values of objects properties


BUT GURU WHEN I CLOSE THE IE SESSEIONDESTROYED METHOD IS NOT EXECUTING 

IS THERE ANY CONFIGURATION PARAMETERS I HAVE TO SET IN WEB.XML OR
STRUTS-CONFIG.XML

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 4:45 PM
To: Struts Users Mailing List
Subject: Re: [S2] decoding values of objects properties

I'm still not entirely what you're decoding from and
to; it sounds like something is fundamentally broken,
but...

Remember that with OGNL you *can* call arbitrary
methods, including static utility methods, from with
the EL. So with either a static decoding class or
(preferably) a service object in your action if you're
iterating over a list you can call methods on items
from that list.

d.

--- Paolo Beccari <[EMAIL PROTECTED]> wrote:

> 
> > --- Dave Newton  wrote:
> >
> > Why?
> >
> 
> I'll try to explain. The main problem is, that i
> would not to expose a 
> single getter-method in the action for each property
> I want to decode. I'm 
> searching for a more generic method.
> I thought on some possibile solution, one was to
> return, in each action, the 
> entire decode set (roughly speaking, a series of
> tuples name-value-decode). 
> That way, I could handle it with   a decode. In addition, if the decoded value I'm
> searching is the last in the 
> list, the list is entirely scrolled before finding
> result. So I tend to 
> discard that.
> 
> Maybe it is only a matter of wrong architectural
> design: we are returning to 
> the views some objects mapped from the database
> layer "as they are". It is 
> possible we need an additional level between, to
> provide decoded values for 
> each property, but the temptation to use a scriplet
> <%=Decode(name, value)%> 
> with a generic, singleton Decoder class is still
> strong :).
> 
> >
> > I've never had to do that, but if I did, I'd be
> most
> > likely to do it in the action or, more likely, a
> > service object in the action.
> >
> > d.
> >
> 
> Yes, I'd be most likely to do, too. But I have to
> find a way to NOT write 
> hundreds of methods, one for each decode-set.
> Well, I'll continue thinking on it, BTW thanks for
> reply.
> 
> P.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



   


Get the free Yahoo! toolbar and rest assured with the added security of
spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

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

DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

-
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] Is anybody else getting these? Fwd: Returned mail: see transcript for details

2007-06-06 Thread Antonio Petrelli

Me too, but Gmail puts it into spam... What's that?

2007/6/6, Paolo Beccari <[EMAIL PROTECTED]>:


Me too.

P.

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




RE: [S2] decoding values of objects properties

2007-06-06 Thread Srinivasula Reddy A , Bangalore

BUT GURU WHEN I CLOSE THE IE SESSEIONDESTROYED METHOD IS NOT EXECUTING 

IS THERE ANY CONFIGURATION PARAMETERS I HAVE TO SET IN WEB.XML OR
STRUTS-CONFIG.XML

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 4:45 PM
To: Struts Users Mailing List
Subject: Re: [S2] decoding values of objects properties

I'm still not entirely what you're decoding from and
to; it sounds like something is fundamentally broken,
but...

Remember that with OGNL you *can* call arbitrary
methods, including static utility methods, from with
the EL. So with either a static decoding class or
(preferably) a service object in your action if you're
iterating over a list you can call methods on items
from that list.

d.

--- Paolo Beccari <[EMAIL PROTECTED]> wrote:

> 
> > --- Dave Newton  wrote:
> >
> > Why?
> >
> 
> I'll try to explain. The main problem is, that i
> would not to expose a 
> single getter-method in the action for each property
> I want to decode. I'm 
> searching for a more generic method.
> I thought on some possibile solution, one was to
> return, in each action, the 
> entire decode set (roughly speaking, a series of
> tuples name-value-decode). 
> That way, I could handle it with   a decode. In addition, if the decoded value I'm
> searching is the last in the 
> list, the list is entirely scrolled before finding
> result. So I tend to 
> discard that.
> 
> Maybe it is only a matter of wrong architectural
> design: we are returning to 
> the views some objects mapped from the database
> layer "as they are". It is 
> possible we need an additional level between, to
> provide decoded values for 
> each property, but the temptation to use a scriplet
> <%=Decode(name, value)%> 
> with a generic, singleton Decoder class is still
> strong :).
> 
> >
> > I've never had to do that, but if I did, I'd be
> most
> > likely to do it in the action or, more likely, a
> > service object in the action.
> >
> > d.
> >
> 
> Yes, I'd be most likely to do, too. But I have to
> find a way to NOT write 
> hundreds of methods, one for each decode-set.
> Well, I'll continue thinking on it, BTW thanks for
> reply.
> 
> P.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



   


Get the free Yahoo! toolbar and rest assured with the added security of
spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

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

DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---

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



Re: [OT] Is anybody else getting these? Fwd: Returned mail: see transcript for details

2007-06-06 Thread Paolo Beccari

Me too.

P.

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



RE: [OT] Is anybody else getting these? Fwd: Returned mail: see transcript for details

2007-06-06 Thread Raghupathy, Gurumoorthy
Yes I do get it  write a rule to delete it :)

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 12:17
To: Struts Users Mailing List
Subject: [OT] Is anybody else getting these? Fwd: Returned mail: see
transcript for details

I'm getting one of these for (almost?) every time I
post. You could just ASK me to never post, yanno :p

It just started a day or a few ago.

--- Mail Delivery Subsystem
<[EMAIL PROTECTED]> wrote:

> Date: Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
> From: Mail Delivery Subsystem
> <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Returned mail: see transcript for details
> 
> The original message was received at Wed, 6 Jun 2007
> 13:09:32 +0200 (CEST)
> from [EMAIL PROTECTED]
> 
>- The following addresses had permanent fatal
> errors -
> [EMAIL PROTECTED]
> (reason: 550 5.0.0 <[EMAIL PROTECTED]>... User
> unknown)
> (expanded from: [EMAIL PROTECTED])
> 
>- Transcript of session follows -
> ... while talking to [127.0.0.1]:
> >>> DATA
> <<< 550 5.0.0 <[EMAIL PROTECTED]>... User unknown
> 550 5.1.1 [EMAIL PROTECTED] User unknown
> <<< 503 5.0.0 Need RCPT (recipient)
> > Return-Path: <[EMAIL PROTECTED]>
> Received: (from [EMAIL PROTECTED])
>   by mailhub4.mclink.it (8.13.6/8.13.6/Submit) id
> l56B9WCb026361;
>   Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
>   (envelope-from [EMAIL PROTECTED])
> Resent-Date: Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
> Resent-From: [EMAIL PROTECTED]
> Resent-Message-Id:
> <[EMAIL PROTECTED]>
> Received: from mailhub.mclink.it
> (mailhubmx.mclink.it [84.253.128.30])
>   by mailhub4.mclink.it (8.13.6/8.13.6) with ESMTP id
> l56B9R9E026292
>   for <[EMAIL PROTECTED]>; Wed, 6 Jun 2007 13:09:27
> +0200 (CEST)
>   (envelope-from
>
[EMAIL PROTECTED])
> Received: from hermes.apache.org (HELO
> mail.apache.org) ([140.211.11.2])
>   by mailhub.mclink.it with SMTP; 06 Jun 2007
> 13:09:25 +0200
> Received: (qmail 12677 invoked by uid 500); 6 Jun
> 2007 11:09:27 -
> Mailing-List: contact [EMAIL PROTECTED];
> run by ezmlm
> Precedence: bulk
> List-Unsubscribe:
> 
> List-Help: 
> List-Post: 
> List-Id: "Struts Users Mailing List"
> 
> Reply-To: "Struts Users Mailing List"
> 
> Delivered-To: mailing list user@struts.apache.org
> Received: (qmail 12666 invoked by uid 99); 6 Jun
> 2007 11:09:27 -
> Received: from herse.apache.org (HELO
> herse.apache.org) (140.211.11.133)
> by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06
> Jun 2007 04:09:27 -0700
> X-ASF-Spam-Status: No, hits=0.0 required=10.0
>   tests=
> X-Spam-Check-By: apache.org
> Received-SPF: pass (herse.apache.org: local policy)
> Received: from [66.196.97.62] (HELO
> web56703.mail.re3.yahoo.com) (66.196.97.62)
> by apache.org (qpsmtpd/0.29) with SMTP; Wed, 06
> Jun 2007 04:09:22 -0700
> Received: (qmail 60529 invoked by uid 60001); 6 Jun
> 2007 11:09:01 -
> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
>   s=s1024; d=yahoo.com;
>  
>
h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Con
tent-Type:Content-Transfer-Encoding:Message-ID;
>  
>
b=ShGIR7qQHJTk57qqDS3qgwsy3mQMq3pCsyQGn2n5wpXyq4vCUfs3z8r4QzqmlcF+dsLtyX
1z6G3lIpy1avZh3rKrbaTBklhNJMmsBaF12BZmgrzyCwTizkhvrM1zSetmtSHmDKGL1FgWaV
uwfkfLps5y8eYnbVgvf9tGcm2oyXw=;
> X-YMail-OSG:
>
FBeasVMVM1mwTnUcdVS8RO0ap1ABlcy_nhTParoU3rFBFWpjs6f.6_.KNMMq7L_U6sI3kmR.
._Ic9hB7BTFgkU9IGg--
> Received: from [63.166.14.2] by
> web56703.mail.re3.yahoo.com via HTTP; Wed, 06 Jun
> 2007 04:09:00 PDT
> Date: Wed, 6 Jun 2007 04:09:00 -0700 (PDT)
> From: Dave Newton <[EMAIL PROTECTED]>
> Subject: [OT] RE: How to Protect the user to login
> in Multiple system (Multiple  browser) when the
> session is active. 
> To: Struts Users Mailing List
> 
> In-Reply-To:
>
<[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
> Message-ID:
> <[EMAIL PROTECTED]>
> X-Virus-Checked: Checked by ClamAV on apache.org
> Resent-To: [EMAIL PROTECTED]
> 



   


Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+ki
ds&cs=bz 

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



[OT] Is anybody else getting these? Fwd: Returned mail: see transcript for details

2007-06-06 Thread Dave Newton
I'm getting one of these for (almost?) every time I
post. You could just ASK me to never post, yanno :p

It just started a day or a few ago.

--- Mail Delivery Subsystem
<[EMAIL PROTECTED]> wrote:

> Date: Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
> From: Mail Delivery Subsystem
> <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Returned mail: see transcript for details
> 
> The original message was received at Wed, 6 Jun 2007
> 13:09:32 +0200 (CEST)
> from [EMAIL PROTECTED]
> 
>- The following addresses had permanent fatal
> errors -
> [EMAIL PROTECTED]
> (reason: 550 5.0.0 <[EMAIL PROTECTED]>... User
> unknown)
> (expanded from: [EMAIL PROTECTED])
> 
>- Transcript of session follows -
> ... while talking to [127.0.0.1]:
> >>> DATA
> <<< 550 5.0.0 <[EMAIL PROTECTED]>... User unknown
> 550 5.1.1 [EMAIL PROTECTED] User unknown
> <<< 503 5.0.0 Need RCPT (recipient)
> > Return-Path: <[EMAIL PROTECTED]>
> Received: (from [EMAIL PROTECTED])
>   by mailhub4.mclink.it (8.13.6/8.13.6/Submit) id
> l56B9WCb026361;
>   Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
>   (envelope-from [EMAIL PROTECTED])
> Resent-Date: Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
> Resent-From: [EMAIL PROTECTED]
> Resent-Message-Id:
> <[EMAIL PROTECTED]>
> Received: from mailhub.mclink.it
> (mailhubmx.mclink.it [84.253.128.30])
>   by mailhub4.mclink.it (8.13.6/8.13.6) with ESMTP id
> l56B9R9E026292
>   for <[EMAIL PROTECTED]>; Wed, 6 Jun 2007 13:09:27
> +0200 (CEST)
>   (envelope-from
>
[EMAIL PROTECTED])
> Received: from hermes.apache.org (HELO
> mail.apache.org) ([140.211.11.2])
>   by mailhub.mclink.it with SMTP; 06 Jun 2007
> 13:09:25 +0200
> Received: (qmail 12677 invoked by uid 500); 6 Jun
> 2007 11:09:27 -
> Mailing-List: contact [EMAIL PROTECTED];
> run by ezmlm
> Precedence: bulk
> List-Unsubscribe:
> 
> List-Help: 
> List-Post: 
> List-Id: "Struts Users Mailing List"
> 
> Reply-To: "Struts Users Mailing List"
> 
> Delivered-To: mailing list user@struts.apache.org
> Received: (qmail 12666 invoked by uid 99); 6 Jun
> 2007 11:09:27 -
> Received: from herse.apache.org (HELO
> herse.apache.org) (140.211.11.133)
> by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06
> Jun 2007 04:09:27 -0700
> X-ASF-Spam-Status: No, hits=0.0 required=10.0
>   tests=
> X-Spam-Check-By: apache.org
> Received-SPF: pass (herse.apache.org: local policy)
> Received: from [66.196.97.62] (HELO
> web56703.mail.re3.yahoo.com) (66.196.97.62)
> by apache.org (qpsmtpd/0.29) with SMTP; Wed, 06
> Jun 2007 04:09:22 -0700
> Received: (qmail 60529 invoked by uid 60001); 6 Jun
> 2007 11:09:01 -
> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
>   s=s1024; d=yahoo.com;
>  
>
h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
>  
>
b=ShGIR7qQHJTk57qqDS3qgwsy3mQMq3pCsyQGn2n5wpXyq4vCUfs3z8r4QzqmlcF+dsLtyX1z6G3lIpy1avZh3rKrbaTBklhNJMmsBaF12BZmgrzyCwTizkhvrM1zSetmtSHmDKGL1FgWaVuwfkfLps5y8eYnbVgvf9tGcm2oyXw=;
> X-YMail-OSG:
>
FBeasVMVM1mwTnUcdVS8RO0ap1ABlcy_nhTParoU3rFBFWpjs6f.6_.KNMMq7L_U6sI3kmR.._Ic9hB7BTFgkU9IGg--
> Received: from [63.166.14.2] by
> web56703.mail.re3.yahoo.com via HTTP; Wed, 06 Jun
> 2007 04:09:00 PDT
> Date: Wed, 6 Jun 2007 04:09:00 -0700 (PDT)
> From: Dave Newton <[EMAIL PROTECTED]>
> Subject: [OT] RE: How to Protect the user to login
> in Multiple system (Multiple  browser) when the
> session is active. 
> To: Struts Users Mailing List
> 
> In-Reply-To:
>
<[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
> Message-ID:
> <[EMAIL PROTECTED]>
> X-Virus-Checked: Checked by ClamAV on apache.org
> Resent-To: [EMAIL PROTECTED]
> 



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 Return-Path: <[EMAIL PROTECTED]>
Received: (from [EMAIL PROTECTED])
	by mailhub4.mclink.it (8.13.6/8.13.6/Submit) id l56B9WCb026361;
	Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
	(envelope-from [EMAIL PROTECTED])
Resent-Date: Wed, 6 Jun 2007 13:09:32 +0200 (CEST)
Resent-From: [EMAIL PROTECTED]
Resent-Message-Id: <[EMAIL PROTECTED]>
Received: from mailhub.mclink.it (mailhubmx.mclink.it [84.253.128.30])
	by mailhub4.mclink.it (8.13.6/8.13.6) with ESMTP id l56B9R9E026292
	for <[EMAIL PROTECTED]>; Wed, 6 Jun 2007 13:09:27 +0200 (CEST)
	(envelope-from [EMAIL PROTECTED])
Received: from hermes.apache.org (HELO mail.apache.org) ([140.211.11.2])
  by mailhub.mclink.it with SMTP; 06 Jun 2007 13:09:25 +0200
Received: (qmail 12677 invoked by uid 500); 6 Jun 2007 11:09:27 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List"

Re: [S2] decoding values of objects properties

2007-06-06 Thread Dave Newton
I'm still not entirely what you're decoding from and
to; it sounds like something is fundamentally broken,
but...

Remember that with OGNL you *can* call arbitrary
methods, including static utility methods, from with
the EL. So with either a static decoding class or
(preferably) a service object in your action if you're
iterating over a list you can call methods on items
from that list.

d.

--- Paolo Beccari <[EMAIL PROTECTED]> wrote:

> 
> > --- Dave Newton  wrote:
> >
> > Why?
> >
> 
> I'll try to explain. The main problem is, that i
> would not to expose a 
> single getter-method in the action for each property
> I want to decode. I'm 
> searching for a more generic method.
> I thought on some possibile solution, one was to
> return, in each action, the 
> entire decode set (roughly speaking, a series of
> tuples name-value-decode). 
> That way, I could handle it with   a decode. In addition, if the decoded value I'm
> searching is the last in the 
> list, the list is entirely scrolled before finding
> result. So I tend to 
> discard that.
> 
> Maybe it is only a matter of wrong architectural
> design: we are returning to 
> the views some objects mapped from the database
> layer "as they are". It is 
> possible we need an additional level between, to
> provide decoded values for 
> each property, but the temptation to use a scriplet
> <%=Decode(name, value)%> 
> with a generic, singleton Decoder class is still
> strong :).
> 
> >
> > I've never had to do that, but if I did, I'd be
> most
> > likely to do it in the action or, more likely, a
> > service object in the action.
> >
> > d.
> >
> 
> Yes, I'd be most likely to do, too. But I have to
> find a way to NOT write 
> hundreds of methods, one for each decode-set.
> Well, I'll continue thinking on it, BTW thanks for
> reply.
> 
> P.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



   

Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

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



[OT] RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Dave Newton
--- "Srinivasula Reddy A , Bangalore" wrote:
> But the thing is if the user  close the IE instead
> of log out I am unable to remove the user from the 
> hash table How can I overcome this?

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html

d.



   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

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



Re: [s2 on J4] Error Message: Filter [struts2]: could not be initialized

2007-06-06 Thread Dave Newton
--- johana pin <[EMAIL PROTECTED]> wrote:
> I used the J4 download from struts site. I only
> recompiled (not with retrotranslator but with
> eclipse) the struts-spring plugin from 'all'
> distribution.

You're building from source? Make sure it's compiling
with a 1.4 JDK.

Anyway, try J4-ing any of the struts2-* jars and tiles
if you're using them. That was enough for Weblogic,
anyway, but the error you're getting isn't like
anything I saw.

d.



   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

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



cannot reset dynavalidatorform in struts 1.2.9

2007-06-06 Thread Ambaris Mohanty
Hi,

I'm using a simple DynaValidatorForm for my login form. The problem is. the
reset button doesn't reset the fields to blank state which I want. Can
anybody help?

AM



Re: [S2] decoding values of objects properties

2007-06-06 Thread Paolo Beccari



--- Dave Newton  wrote:

Why?



I'll try to explain. The main problem is, that i would not to expose a 
single getter-method in the action for each property I want to decode. I'm 
searching for a more generic method.
I thought on some possibile solution, one was to return, in each action, the 
entire decode set (roughly speaking, a series of tuples name-value-decode). 
That way, I could handle it with a decode. In addition, if the decoded value I'm searching is the last in the 
list, the list is entirely scrolled before finding result. So I tend to 
discard that.


Maybe it is only a matter of wrong architectural design: we are returning to 
the views some objects mapped from the database layer "as they are". It is 
possible we need an additional level between, to provide decoded values for 
each property, but the temptation to use a scriplet <%=Decode(name, value)%> 
with a generic, singleton Decoder class is still strong :).




I've never had to do that, but if I did, I'd be most
likely to do it in the action or, more likely, a
service object in the action.

d.



Yes, I'd be most likely to do, too. But I have to find a way to NOT write 
hundreds of methods, one for each decode-set.

Well, I'll continue thinking on it, BTW thanks for reply.

P.


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



RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Srinivasula Reddy A , Bangalore
This is the snippet I am writing in my login action

if(servlet.getServletContext().getAttribute("userList")!=null){
System.out.println(" IN
SIDE IF OF CONTEXT ");
Hashtable findUser = new
Hashtable();
findUser = (Hashtable)
servlet.getServletContext().getAttribute("userList");

findUser.contains(username);
expDTO = new
ExceptionDisplayDTO(DFSConstants.FORWARD_FAILURE,ExpContextConstants.LOG
IN_FAILED);

expDisplayDetails.set(expDTO);
throw new
LoginFailedException("LoginFailedException");

}else{
System.out.println(" IN SIDE
ELSE OF CONTEXT ");
Hashtable userList = new
Hashtable();

userList.put("username",username);

servlet.getServletContext().setAttribute("userList",userList);
}

But the thing is if the user  close the IE instead of log out I am
unable to remove the user from the hash table 

How can I overcome this?

Regards,
Sreenivasula Reddy A

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 1:48 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

Hi guru volume of hits is less and my server is running on single
machine only so give me some sample snippet for this kind of development

-Original Message-
From: Raghupathy, Gurumoorthy
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 1:19 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is
on a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check
the user against the key in the hashtable ... if the keay already exists
tell them to 
Get lost and once the user is logged off you can remove them from the
hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in multiple browsers when
the session is action.

 

For example in gmail if we login in one browser and we are surfing, then
if we open another IE and type gmail it will redirect to the page where
we are surfing in the previous IE.

 

I need this kind of feature for my login system. How to implement this
in struts 

 

Give me some sample snippet or rough idea

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

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

Re: Ending session

2007-06-06 Thread Mansour
That's lot of idea. Thank you ever one. I will try them today, and I 
will post the results.




Caine Lai wrote:

Probably the easiest way to do this would be to have a very short session
timeout period (5minutes?) set on the server.

You could then have a JavaScript function that polls the server every 5
minutes.  Each ajax request made by the JavaScript will reset the session
timer on the server.

On 6/5/07, Mansour <[EMAIL PROTECTED]> wrote:


I am saving objects in the session. After the browser closes I would
like to clean the remaining junk. How do I achieve this ?


-
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: [s2 on J4] Error Message: Filter [struts2]: could not be initialized

2007-06-06 Thread johana pin
I used the J4 download from struts site. I only recompiled (not with 
retrotranslator but with eclipse) the struts-spring plugin from 'all' 
distribution.


- Original Message 
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Wednesday, June 6, 2007 1:22:59 PM
Subject: Re: [s2 on J4] Error Message: Filter [struts2]: could not be 
initialized


Haven't tried on Websphere but I've deployed on
Weblogic 8.1... Did you J4 all the jars?

--- johana pin <[EMAIL PROTECTED]> wrote:

> I am new to struts 2 (previously work with struts 1)
> and I try to build an application with spring on
> java 1.4 (websphere 6.0). I got this error when I
> try to access the deployed application:
>  
> Error Message: Filter [struts2]: could not be
> initialized
> Error Code: 500
> Target Servlet: null
> Error Stack: 
> com.opensymphony.xwork2.inject.DependencyException:
>
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
> No mapping found for dependency
> [type=java.lang.String, name='struts.devMode'] in
> public static void
>
org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String).
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494)
> 
>  at
>
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145)
> 
>  at
>
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 
>  at
>
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
> 
>  at
>
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
> 
>  at
>
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> 
>  at
>
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:109)
> 
>  at
>
com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:328)
> 
> ..
>  Caused by:
>
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
> No mapping found for dependency
> [type=java.lang.String, name='struts.devMode'] in
> public static void
>
org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String).
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.(ContainerImpl.java:282)
> 
> ..
> 
> 
> I tryed in struts.xml with and without
> 'struts.devMode' but I have the same error.
>  
> Can you provide some help ?
> Thank you.
> 
> 
>  
>

> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html 



   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

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


   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

Re: [s2 on J4] Error Message: Filter [struts2]: could not be initialized

2007-06-06 Thread Dave Newton
Haven't tried on Websphere but I've deployed on
Weblogic 8.1... Did you J4 all the jars?

--- johana pin <[EMAIL PROTECTED]> wrote:

> I am new to struts 2 (previously work with struts 1)
> and I try to build an application with spring on
> java 1.4 (websphere 6.0). I got this error when I
> try to access the deployed application:
>  
> Error Message: Filter [struts2]: could not be
> initialized
> Error Code: 500
> Target Servlet: null
> Error Stack: 
> com.opensymphony.xwork2.inject.DependencyException:
>
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
> No mapping found for dependency
> [type=java.lang.String, name='struts.devMode'] in
> public static void
>
org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String).
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494)
> 
>  at
>
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145)
> 
>  at
>
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 
>  at
>
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
> 
>  at
>
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
> 
>  at
>
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> 
>  at
>
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:109)
> 
>  at
>
com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:328)
> 
> ..
>  Caused by:
>
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
> No mapping found for dependency
> [type=java.lang.String, name='struts.devMode'] in
> public static void
>
org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String).
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
> 
>  at
>
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.(ContainerImpl.java:282)
> 
> ..
> 
> 
> I tryed in struts.xml with and without
> 'struts.devMode' but I have the same error.
>  
> Can you provide some help ?
> Thank you.
> 
> 
>  
>

> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html 



   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

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



OT] Re: is there anyway to store the previous added lateExtraAmount

2007-06-06 Thread Dave Newton
--- prasad kumar <[EMAIL PROTECTED]> wrote:
> String newLateExtraAmount =
> new Double(Double.parseDouble(model.getAmount())
 + lateExtraAmount).toString().
>  
> model.setAmount(String.valueOf(newLateExtraAmount));

Why do you do a String.valueOf on a String?

> but the problem with the above code is whenever
> i am going to that screen the amount is
incrementing.

It's still not clear to me exactly what you are trying
to do. Someone else mentioned keeping it in session;
that may work fine. You may also want to consider
representing it in your data model somehow.

Are you using doubles to do real-world floating-point
monetary arithmetic?

d.



   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

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



Re: [S2] decoding values of objects properties

2007-06-06 Thread Dave Newton
--- Paolo Beccari <[EMAIL PROTECTED]> wrote:
> I wish to decode them in the view.

Why?

> I think this is could be a common issue in a webapp,
> does anyone has an idea on how to resolve?

I've never had to do that, but if I did, I'd be most
likely to do it in the action or, more likely, a
service object in the action.

d.



   

Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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



Re: [S2] Is Action thread-safe in struts 2?

2007-06-06 Thread Dave Newton
--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> Is Action in s2 thread-safe or not?

Yes.

d.



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

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



[OT] Re: javascript issue in jsp

2007-06-06 Thread Dave Newton
--- "Krishna, Hari (FTT-CInternet)" wrote:
> This is the line of code that causes the issue.

Look in to JavaScript strings to understand why these
two things are issues.

"\" is an escape character.

> document.getElementById("text"+i).value = ;

Is that legal JavaScript?

(Hint: No.)

If you're embedding quotes you must escape them, or
use the quote that isn't in your input string (may
work, may just cause same problem).

d.



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

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



[s2 on J4] Error Message: Filter [struts2]: could not be initialized

2007-06-06 Thread johana pin
I am new to struts 2 (previously work with struts 1) and I try to build an 
application with spring on java 1.4 (websphere 6.0). I got this error when I 
try to access the deployed application:
 
Error Message: Filter [struts2]: could not be initialized
Error Code: 500
Target Servlet: null
Error Stack: 
com.opensymphony.xwork2.inject.DependencyException: 
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No 
mapping found for dependency [type=java.lang.String, name='struts.devMode'] in 
public static void 
org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String). 
 at 
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157)
 
 at 
com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126)
 
 at 
com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111)
 
 at 
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494)
 
 at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145)
 
 at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
 
 at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
 
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455) 
 at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201) 
 at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:109)
 
 at 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:328)
 
..
 Caused by: 
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No 
mapping found for dependency [type=java.lang.String, name='struts.devMode'] in 
public static void 
org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String). 
 at 
com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
 
 at 
com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
 
 at 
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.(ContainerImpl.java:282)
 
..


I tryed in struts.xml with and without 'struts.devMode' but I have the same 
error.
 
Can you provide some help ?
Thank you.


 

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

Re: is there anyway to store the previous added lateExtraAmount

2007-06-06 Thread MK Tan

you can put the previous added lateExtraAmount into session.
After that, just retrieve it back from the session n do ur calculation.

HTH,
MK Tan

On 6/4/07, prasad kumar <[EMAIL PROTECTED]> wrote:




hi,
  iam using struts, i have one class i.e LateExtra,in this class
   i have wriiten the code like below
  double lateExtraAmount = calc.calculateLateExtra(currentContract);

   from the above iam getting the lateExtraAmount
   for ex:intially the amount is 2000 After that i Updated the amount to
2500,
  then the lateExtraAmount =Updated Amount-Intial amount i.e 500,
  then After that iam setting the value  as
   model.setAmount(String.valueOf(lateExtraAmount));
  After some time I updated the amount from 2500 to 2600 then
lateExtraAmount=Updated Amount-Intial amount i.e 100.

   but i want the previous added lateExtraAmount and Latest added
lateExtraAmount .for that i have wriiten the code like below

  String newLateExtraAmount=new Double(Double.parseDouble(model.getAmount
())+lateExtraAmount).toString().
  model.setAmount(String.valueOf(newLateExtraAmount));

   but the problem with the above code is whenever iam going to that
screen the amount is incrementing.

  my problem  is there anyway to store the previous added lateExtraAmount?
so that i can add the previous added lateExtraAmount with  Latest added
lateExtraAmount.i will get the result properly

  if anybody knows please assist me i have been trying from the last two
days...

  thanks,
  prasad




-
Here's a new way to find what you're looking for - Yahoo! Answers


RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Al Sutton
Read
The
Fabulous
Manual 

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 09:13
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

Hi guru I don't know the meaning of RTFM?

What is meant by RTFM?


-Original Message-
From: Raghupathy, Gurumoorthy
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 06, 2007 1:19 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 

My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is on
a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check the
user against the key in the hashtable ... if the keay already exists tell
them to Get lost and once the user is logged off you can remove them from
the hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in multiple browsers when
the session is action.

 

For example in gmail if we login in one browser and we are surfing, then
if we open another IE and type gmail it will redirect to the page where
we are surfing in the previous IE.

 

I need this kind of feature for my login system. How to implement this
in struts 

 

Give me some sample snippet or rough idea

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

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


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



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



Re: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Antonio Petrelli

2007/6/6, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:


Hi guru I don't know the meaning of RTFM?

What is meant by RTFM?




Simple! STFW :-)
Seriously, if you google it, you'll find the answer... (by the way, google
STFW too...)
What Guru intended to say is that you can find the solution by yourself
(even though he explained some paths that you can follow, so it is a bare
RTFM, but he put what "Ms" to read :-) )

Antonio


RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Srinivasula Reddy A , Bangalore
Hi guru volume of hits is less and my server is running on single
machine only so give me some sample snippet for this kind of development

-Original Message-
From: Raghupathy, Gurumoorthy
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 1:19 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is
on a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check
the user against the key in the hashtable ... if the keay already exists
tell them to 
Get lost and once the user is logged off you can remove them from the
hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in multiple browsers when
the session is action.

 

For example in gmail if we login in one browser and we are surfing, then
if we open another IE and type gmail it will redirect to the page where
we are surfing in the previous IE.

 

I need this kind of feature for my login system. How to implement this
in struts 

 

Give me some sample snippet or rough idea

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

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



[S2] decoding values of objects properties

2007-06-06 Thread Paolo Beccari


Hi all,

I have some objects in my app whose properties needs a "decode" in the view. 
I don't want to return property values already decoded to the view, I wish 
to decode them in the view.
For the same reason, I also have to build some picklists with shown text 
different from value.


Since we have a huge set of properties to decode, the example given in the 
docs:

is hardly applicable: with scriplet I could use a 
<%=Decoder.decode(propertyName, propertyValue)%> and a 
<%=Decoder.buildPicklist(propertyName, propertyValue)%> method, but I wish 
to do it in a S2-fashion without using scriplets.


I think this is could be a common issue in a webapp, does anyone has an idea 
on how to resolve?


P.


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



RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Srinivasula Reddy A , Bangalore
Hi guru I don't know the meaning of RTFM?

What is meant by RTFM?


-Original Message-
From: Raghupathy, Gurumoorthy
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 1:19 PM
To: Struts Users Mailing List
Subject: RE: How to Protect the user to login in Multiple system
(Multiple browser) when the session is active. 

My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is
on a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check
the user against the key in the hashtable ... if the keay already exists
tell them to 
Get lost and once the user is logged off you can remove them from the
hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in multiple browsers when
the session is action.

 

For example in gmail if we login in one browser and we are surfing, then
if we open another IE and type gmail it will redirect to the page where
we are surfing in the previous IE.

 

I need this kind of feature for my login system. How to implement this
in struts 

 

Give me some sample snippet or rough idea

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

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



[s2] Collection, array and tag.

2007-06-06 Thread Ezequiel Puig
Hi,

 

I have been using struts 2 since a while and there is some things about
the  tag i don't understant.

 

Let's say we have an array in our action (with the getters and setters):

 

private String[] myArray;

  

public String[] getMyArray() {

return myArray;

}

public void setMyArray(String[] myArray) {

this.myArray = myArray;

}

 

and that in our action, we do something to initializate the array:

 

String[] arr = new String[3]; 

arr[0] = "Aa";

arr[1] = "Bb";

arr[2] = "Cc";

 

Now, if in our JSP we use the  tag:

 





 " >Use Link



 

we can see that the created url is: 

 

TestUrlArray.action?myArray=Aa&myArray=Bb&myArray=Cc

 

Also, in the destination action, we are able to recover the information
from the variable "myArray" if we have defined something like "private
String[] myArray".

 

So for, so good.

 

Now, let's see the Collections:

 

In the action we will have:

 

private Collection myCollection = new ArrayList(); 

 

public Collection  getMyCollection () {

return myCollection;

}

public void setMyList(Collection  myCollection) {

this.myCollection = myCollection;

}

 

we initialize the collection:

 

Collection col = new ArrayList();

col.add("Aa");

col.add("Bb");

col.add("Cc");

setMyCollection(col);

 

Finally, we use the  tag:

 





 " >Use Link



 

Here, the created link looks like:
TestUrlArray.action?myCollection=[Aa,+Bb,+Cc]

 

But, if we try to recover the collection in the destination action
(where offcourse we have defined "Collection col = new
ArrayList();" ), we will see that we recover a collection of
only one element, and that this element is our old collection (the one
with 3 elements).

 

Now, it's time for questions:

 

1)   Is it possible to manipulate arrays with the s2 tags ? (by
manipulate, i mean create a new array, add an element to an existing
array, remove an element, etc.)

2)   Is it possible to manipulate collections with the s2 tags ?
(same meaning to manipulate)

3)   Is there a work-arround to recover a Collection not as a new
collection of one element that contains a collection but as a new
collection that is like the collection we passed ?

 

 

Well, any ideas will be reallly wellcome :-)

 

 

 

 

 

 

 

 



Struts 1.3.x : Dynavalidatorform : initialize & prepopulate ArralyList with data after submisstion

2007-06-06 Thread Raghupathy, Gurumoorthy
Hi,

 

Situation   :   One DynaValidatorForm has a
property of type "java.util.ArrayList" and size is not known in advance

The Arraylist consists
of elements of type "User" which is a simple Javabean and dispayed using
struts:text  indexed="true" 



Question   :   How can I get the collection
back as an ArrayList prepopulated back when i submit the data back  

I want to know a
solution with the least amount of code ...

 

Please note   :   I have done google search for
this and there does nto seems to be an "elegant" way of doing this with
DynaValidatorForm 

 

Please help

 

 

 

Regards

Guru

 





RE: display current date in header

2007-06-06 Thread Raghupathy, Gurumoorthy
http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html 

-Original Message-
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 08:54
To: 'Struts Users Mailing List'
Subject: RE: display current date in header

Thanks for your solution. It works fine. But I want to do it without using
scrip lets. How to do?
AM

-Original Message-
From: Norbert Hirneisen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 12:01 PM
To: 'Struts Users Mailing List'
Subject: RE: display current date in header

In your jsp:

<%@ page import="java.util.Calendar"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>

<%
// current Date
Calendar cal = Calendar.getInstance();
Date currDate = cal.getTime();
SimpleDateFormat df = new SimpleDateFormat("dd.MM.");
String showDate =  df.format(currDate);
%>

In the html-body:
<%=showDate%>

Regards,
Norbert 
 
Norbert Hirneisen
 
science4you Online-Monitoring
 
Please visit us:
http://www.science4you.org
(in German)
 
Norbert Hirneisen
Science & Communications
von-Müllenark-Str. 19
53179 Bonn
phone +49-228-6194930



-Ursprüngliche Nachricht-
Von: Ambaris Mohanty [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 6. Juni 2007 07:26
An: 'Struts Users Mailing List'
Betreff: display current date in header


Hi all,
I'm using struts 1.2.9 along with Tiles. I want to display current date in
the header page. Can anybody tell me the best approach to do so?
Thank you,
AM


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


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



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


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



Re: How to Protect copying the URL in another explorer to access the data in Struts

2007-06-06 Thread Antonio Petrelli

2007/6/6, Raghupathy, Gurumoorthy <[EMAIL PROTECTED]>:


Read my prev answer




What answer, RTFM? I'll say STFW this time :-) Googling "prevent
bookmarking", the first result is:
http://www.webmasterworld.com/forum48/1608.htm

Antonio


RE: display current date in header

2007-06-06 Thread Ambaris Mohanty
Thanks for your solution. It works fine. But I want to do it without using
scrip lets. How to do?
AM

-Original Message-
From: Norbert Hirneisen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 12:01 PM
To: 'Struts Users Mailing List'
Subject: RE: display current date in header

In your jsp:

<%@ page import="java.util.Calendar"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>

<%
// current Date
Calendar cal = Calendar.getInstance();
Date currDate = cal.getTime();
SimpleDateFormat df = new SimpleDateFormat("dd.MM.");
String showDate =  df.format(currDate);
%>

In the html-body:
<%=showDate%>

Regards,
Norbert 
 
Norbert Hirneisen
 
science4you Online-Monitoring
 
Please visit us:
http://www.science4you.org
(in German)
 
Norbert Hirneisen
Science & Communications
von-Müllenark-Str. 19
53179 Bonn
phone +49-228-6194930



-Ursprüngliche Nachricht-
Von: Ambaris Mohanty [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 6. Juni 2007 07:26
An: 'Struts Users Mailing List'
Betreff: display current date in header


Hi all,
I'm using struts 1.2.9 along with Tiles. I want to display current date in
the header page. Can anybody tell me the best approach to do so?
Thank you,
AM


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


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



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



RE: How to Protect copying the URL in another explorer to access the data in Struts

2007-06-06 Thread Raghupathy, Gurumoorthy
Read my prev answer

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:45
To: Struts Users Mailing List
Subject: How to Protect copying the URL in another explorer to access
the data in Struts


Hi Team,



How can protect copying or book marking URLs in my Struts
application. 

 

Give me some sample snippet or rough idea.

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

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



RE: How to Protect the user to login in Multiple system (Multiple browser) when the session is active.

2007-06-06 Thread Raghupathy, Gurumoorthy
My answer is "It depends". 

If the volume (number of hits) of your website is low and your server is
on a single node then you can create a hashtable of users (user name as
key) as an CONTEXT attribute and each time someone logs in you can check
the user against the key in the hashtable ... if the keay already exists
tell them to 
Get lost and once the user is logged off you can remove them from the
hash.. 


If your application is running as part of a farm then store the status
in DB / persistence medium. However there will be a performance hit 

Have a look at 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html  


One pattern which can be of helps is "observer pattern" which will
observe user logging in and logging out   when used as a filter 


http://java.sun.com/products/servlet/Filters.html 


some of the questions you have been asking on the forum has nothing to
do with struts ... it is all about servlet specification  

Read them at 
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html 

My suggestion will again be RTFM 


Regards
Guru

-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 07:51
To: Struts Users Mailing List
Subject: How to Protect the user to login in Multiple system (Multiple
browser) when the session is active. 


Hi Team,

How to protect the user to login in multiple browsers when
the session is action.

 

For example in gmail if we login in one browser and we are surfing, then
if we open another IE and type gmail it will redirect to the page where
we are surfing in the previous IE.

 

I need this kind of feature for my login system. How to implement this
in struts 

 

Give me some sample snippet or rough idea

 

Regards,

Sreenivasula Reddy A

 



DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.


---

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



[S2] Is Action thread-safe in struts 2?

2007-06-06 Thread Vincent Lin

Hi

I am a newbie in struts2.
I have a fundamental question abut s2.
We all know that a Servlet is not a thread-safe object unless it implements
SingleThreadModel.

Is Action in s2 thread-safe or not?
Container will create a new Action instance for each new request?

Thanks!


RE: [S2] Struts2, JDK 1.4, retrotranslator

2007-06-06 Thread Jason Wyatt
A few other jars were required to be retrotranslated after all... for the
record, to get Struts 2 working on JDK 1.4 on Oracle App Server 10R2 I had
to run retrotranslator on: 

Struts2-*.jar   (except struts2-core-j4-2.0.6.jar which was provided)
jsf-api.jar
jsf-impl.jar
tiles-api-2.0-20070207.130156-4.jar
tiles-core-2.0-20070207.130156-4.jar

OAS also needed el-api-2005-08-17.jar


Regards
Jason


-Original Message-
From: Jason Wyatt [mailto:[EMAIL PROTECTED] 
Sent: Monday, 4 June 2007 12:00 PM
To: 'Struts Users Mailing List'
Subject: RE: [S2] Struts2, JDK 1.4, retrotranslator

Thanks Taras. 

I ran retrotranslator on each of the struts2 jars one-by-one, as they each
showed the same kind of version issue. 
Makes sense as they are all compiled for JDK 1.5. 

S2 now seems to be running OK on Oracle App Server 10R2. I only needed to
covert the struts2-*.jar files.

Regards
Jason



-Original Message-
From: Taras Puchko [mailto:[EMAIL PROTECTED]
Sent: Friday, 1 June 2007 5:08 PM
To: Struts Users Mailing List
Subject: Re: [S2] Struts2, JDK 1.4, retrotranslator

Hi, you have to translate struts2-codebehind-plugin-2.0.6.jar since the
distribution has only struts2-core-2.0.6.jar and xwork-2.0.1.jar translated.

Cheers,
Taras

On 5/31/07, Jason Wyatt <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to deploy Struts 2 on Oracle Application Server 9i, 
> which uses JDK1.4, and I'm getting an error:
>
> Caused by: java.lang.UnsupportedClassVersionError:
> org/apache/struts2/codebehind/CodebehindUnknownHandler (Unsupported 
> major.minor version 49.0)
>
> I included the backported Struts 2 and retrotranslator libraries and 
> removed the j5 equivalent struts-core and xwork jars.
>
> I'm wondering if I need to backport some other jars?
>
> The full stack trace:
>
> 500 Internal Server Error
>
> Unable to load bean: type:com.opensymphony.xwork2.UnknownHandler
> class:org.apache.struts2.codebehind.CodebehindUnknownHandler - bean -
> jndi:/opt/oracle/product/9.0.4/j2ee/IACD2b/applications/iacd/iacd/WEB-
> INF/li
> b/struts2-codebehind-plugin-2.0.6.jar/struts-plugin.xml:8:-1
>at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.regi
> ster(X
> mlConfigurationProvider.java:209)
>at
> org.apache.struts2.config.StrutsXmlConfigurationProvider.register(Stru
> tsXmlC
> onfigurationProvider.java:101)
>at
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(Defaul
> tConfi
> guration.java:131)
>at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(C
> onfigu
> rationManager.java:52)
>at
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dis
> patche
> r.java:398)
>at
> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
>at
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.j
> ava:20
> 1)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].server.http.HttpApplication.getFilterConfig(HttpApplicati
> on.jav
> a:7432)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].server.http.FileRequestDispatcher.handleWithFilter(FileRe
> questD
> ispatcher.java:50)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].server.http.FileRequestDispatcher.forwardInternal(FileReq
> uestDi
> spatcher.java:192)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequest
> Handle
> r.java:788)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g
> (9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g
> (9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(Releas
> ableRe
> sourcePooledExecutor.java:192)
>at java.lang.Thread.run(Thread.java:536)
> Caused by: java.lang.UnsupportedClassVersionError:
> org/apache/struts2/codebehind/CodebehindUnknownHandler (Unsupported 
> major.minor version 49.0)
>at java.lang.ClassLoader.defineClass0(Native Method)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureCla
> ssLoad
> er.java:172)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].naming.ContextClassLoader.defineClass(ContextClassLoader.
> java:1
> 154)
>at com.evermind[Oracle Application Server Containers for J2EE 
> 10g 
> (9.0.4.1.0)].naming.ContextClassLoader.findClass(Context

[s2] Is there a tag similar to in s1

2007-06-06 Thread Vincent Lin

Hi!

Is there a tag in struts 2 which has similar function to  in
struts1 ?

Thanks.


  1   2   >