Author Login
Post Reply
user Digest 14 Aug 2008 11:26:38 -0000 Issue 8192
Topics (messages 189989 through 190018):
Re: Best practice for passing success/error message to another dispatch (struts2)?
189989 by: Dave Newton
Re: Remotely passing parameters to struts
189990 by: Randy Burgess
Re: [S2] Proper way to clear error messages in session scope
189991 by: Laurie Harper
189998 by: Diego Manilla Suárez
Re: exception unregistering portlet @undeploying the webapp, configuration manager -> null
189992 by: Nils-Helge Garli Hegvik
189993 by: Torsten Krah
Re: Simple validation does not work
189994 by: Anton Bashmakov
Liferay & Struts2 Portlets, ParametersInterceptor Exception, struts.portlet.action, struts.portlet.mode cannot be set
189995 by: Torsten Krah
189996 by: Nils-Helge Garli Hegvik
190007 by: Edwin Quita
Override
java.lang.Object [PropertyAccessor]
189997 by: Edward Yakop
189999 by: Martin Gainty
190001 by: Edward Yakop
Using struts.xworkTextProvider (overriding the default TextProvider )
190000 by: Olivier Lamy
190006 by: Olivier Lamy
Re: Get path to the webapp
190002 by: Struts Two
190003 by: Dave Newton
Interceptors Doubt
190004 by: Raghunath
190005 by: Gabriel Belingueres
Re: URL mapping in Struts 2
190008 by: Jeromy Evans
190009 by: Kibo
Acces Control Within Struts2
190010 by: tom tom
190013 by: Frans Thamura
Problems with sx tags
190011 by: oscar perez
Struts + redirect=true + Apache Proxy Url Rewriting Problem
190012 by: Miguel Cohnen
Prepare method being invoked twice
190014 by: Jayeshpowar
190015 by: Lukasz Lenart
190016 by: Jayeshpowar
190017 by: Lukasz Lenart
190018 by: Dave Newton
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_189989.ezm (zipped)I'm not sure how that's related.
--- On Tue, 8/12/08, Martin Gainty <mgainty@(protected):
> yes the validator will short-circuit when the validator's
> short-circuit="true" e.g.
> <validators>
> <!-- Field Validators for email field -->
> <field name="email">
> <field-validator type="required" short-circuit="true">
>
> http://struts.apache.org/2.x/docs/validation.html#Validation-ShortCircuitingValidator
>
> > From: jconner@(protected)
> >
> > Good catch Pierre. It appeared to be working as is,
> but for cleanliness, I swapped them.
> > Unfortunately that's not the problem.
> >
> > I did find one other error in my struts.xml though.
> > I was missing the chain interceptor in my stack.
> > Ex.
> > <interceptor-stack
> name="interceptorStack">
> > <interceptor-ref
> name="validationWorkflowStack" />
> > <interceptor-ref
> name="chain"/>
> >
> > Another important thing was to put "chain"
> after "validationWorkflowStack".
> > If "chain" is first, it will copy
> actionErrors to the chained action, then the validation on
> the list() method will fail.
> > That gives you the right error message, but also
> bypasses running list()...
> >
> > Anyway, this appears to be working now.
> > (I suspect that if validation on list() really does
> fail it will not make it to "chain". So this is
> still not a "perfect" solution.)
> >
> > -----Original Message-----
> > From: Pierre Thibaudeau
> [mailto:pierre.thibaudeau@(protected)]
> > Sent: Tuesday, August 12, 2008 2:44 PM
> > To: Struts Users Mailing List
> > Subject: Re: Best practice for passing success/error
> message to another dispatch (struts2)?
> >
> > This may be completely incidental to your problem,
> but, it seems to me that,
> > if your actions are listed in that order, the first
> one will catch the
> > occurrences of the second one.
> ("importRole" is a particular case of
> > "*Role".) Shouldn't they be listed in
> the reverse order?
> >
> >
> > > > Example struts.xml:
> > > > <action name="*Role"
> class="RoleAction" method="list">
> > > > <result
> name="input">/list.page</result>
> > > > <result
> name="success">/list.page</result>
> > > > </action>
> > > >
> > > > <action name="importRole"
> class="RoleAction" method="import">
> > > > <result name="input"
> type="chain">listRole</result>
> > > > <result name="success"
> type="chain">listRole</result>
> > > > </action>
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
>
> _________________________________________________________________
> Get Windows Live and get whatever you need, wherever you
> are. Start here.
> http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008

Attachment:
user_189990.ezm (zipped)Have you taken a look at parameters in configuration results?
http://struts.apache.org/2.0.11.2/docs/parameters-in-configuration-results.h
tml
You could pass in the redirectURL from your calling web app. I've never
tried this but it seems like it would work. It's worth a shot.
Regards,
Randy Burgess
Sr. Software Architect
D5 Systems, LLC
> From: jaki <jackie_james@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Mon, 11 Aug 2008 22:57:47 -0700 (PDT)
> To: <user@(protected)>
> Subject: Re: Remotely passing parameters to struts
>
>
> What's the way to do it using request/response then? I tried it out with
> requestdispatcher only to later find out that requestdispatcher can only
> forward to servlets within the same web app. Is there a way to make it
> forward to a remote servlet?
>
> jaki wrote:
>>
>> Hi all,
>>
>> I have a web application which needs to pass parameters to a struts app
>> which resides on another machine. I will not be calling the struts class
>> using a jsp but from a normal java method. So, is there a way to pass
>> arguements without using a request/response object?
>>
>
> --
> View this message in context:
> http://www.nabble.com/Remotely-passing-parameters-to-struts-tp18928369p1893849
> 4.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189991.ezm (zipped)Diego Manilla Suárez wrote:
> Hi. I have an action in session scope. The problem is that action errors
> are never cleared and thus are shown repeatedly whenever the user sends
> the form with validation errors.
>
> At first I put a call to clearErrors() at the beginning of mi validate()
> method, but now I'm using also the validation framework, so if I do
> that, I'm clearing its validation errors too before they are even shown.
>
> I think the right place to clear errors would be right after they are
> printed, but I don't see any tag to do that.
>
> Thanks in advance.
Struts 2 actions are intended to be request scoped, not session scoped.
You should re-work your action to store data you wish to persist across
requests in the session, rather than storing the action itself in the
session.
L.

Attachment:
user_189998.ezm (zipped)Well, I've put this line just below the tags <s:actionerror /> and
<s:fielderror />:
<%((ActionSupport)
ActionContext.getContext().getActionInvocation().getAction()).clearErrorsAndMessages();%>
I don't like putting Java code on JSPs and I'm sure there is a better
way to do it, but so far it's working.
Regards,
Diego.
Diego Manilla Suárez escribió:
> Hi. I have an action in session scope. The problem is that action
> errors are never cleared and thus are shown repeatedly whenever the
> user sends the form with validation errors.
>
> At first I put a call to clearErrors() at the beginning of mi
> validate() method, but now I'm using also the validation framework, so
> if I do that, I'm clearing its validation errors too before they are
> even shown.
>
> I think the right place to clear errors would be right after they are
> printed, but I don't see any tag to do that.
>
> Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189992.ezm (zipped)
Attachment:
user_189993.ezm (zipped)Am Mittwoch, 13. August 2008 09:47:07 schrieb Nils-Helge Garli Hegvik:
> Which server are you running?
This does happen on JBoss 4.0.5 with Tomcat 5.5.20 (Liferay 5.x)
And this does happen too on Pluto 1.1.5 with Tomcat 6.0.13.
--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
-- Linus Torvalds

Attachment:
smime.p7s (zipped)
Attachment:
user_189994.ezm (zipped)Hi everyone!
I've solved the problem it was in the version of JBOSS, I rolled back to
4.0.5.GA and now everything works perfect.
2008/8/10 Anton Bashmakov <bashmakov@(protected)>
> Actually I can't find xwork 2.0.6, it's only 2.1 after 2.5 on the official
> xwork site. I've downloaded strats 2.0.11.2 (i was using 2.0.11.1 before)
> and tried it, but result is till the same.
>
>
> On Sat, Aug 9, 2008 at 9:50 PM, Struts Two <strutstwo@(protected):
>
>> xwork2.0.5 is missing a patch for websphere users, use xwork2.0.6. I am
>> also using RAD 7.5 and Was 6.1.0.17 and EJB3 feature pack. When I
>> upgraged to struts 2.0.12, I had problems in running my validations and some
>> more issues, I downgraded to 2.0.11.1 and everything is fine. However,
>> the struts 2 folks in their release note mentioned that xwork 2.0.5 is
>> missing a patch for WAS users and the patch is included in xwork 2.0.6.So you can either use
>> 2.0.11.1 or use xwork 2.0.6 instead of xwork 2.0.5
>>
>>
>>
>> ----- Original Message ----
>> From: holod <serega.sheypak@(protected)>
>> To: user@(protected)
>> Sent: Saturday, August 9, 2008 6:39:42 AM
>> Subject: Re: Simple validation does not work
>>
>>
>> http://www.mvnrepository.com/artifact/com.opensymphony/xwork/2.0.5
>>
>> Scroll down page and see Source Control paragraph.
>> Use some svn client and checkout branch.
>> Using command mvn package you can compile and package the project.
>> Then use your new jar instead of official-released.
>> It helped for me, but I'm using WebSphere AppServer 6.1 + EJB3 feature
>> pack.
>> The problem was in difference between IBM JDK and Sun JDK.
>> Good luck, Anton.
>>
>>
>> __________________________________________________________________
>> Ask a question on any topic and get answers from real people. Go to Yahoo!
>> Answers and share what you know at http://ca.answers.yahoo.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Best regards,
> Bashmaкov Anton
>
--
Best regards,
Bashmaкov Anton

Attachment:
user_189995.ezm (zipped)Deploying a struts2 example app to liferay (5.1.1) i am facing this error
output:
13:07:39,410 INFO [STDOUT] 13:07:39,410 ERROR
[
com.opensymphony.xwork2.interceptor.ParametersInterceptor]
ParametersInterceptor - [setParameters]: Unexpected Exception caught
setting 'struts.portlet.action' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting
expression 'struts.portlet.action' with value '[Ljava.lang.String;@(protected)'
13:07:39,410 INFO [STDOUT] 13:07:39,410 ERROR
[
com.opensymphony.xwork2.interceptor.ParametersInterceptor]
ParametersInterceptor - [setParameters]: Unexpected Exception caught
setting 'struts.portlet.mode' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting
expression 'struts.portlet.mode' with value '[Ljava.lang.String;@(protected)'
Whats going wrong here? Any hints what might cause this? Should this work?
struts.portlet.mode and ...action, for what are they used?
--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
-- Linus Torvalds

Attachment:
smime.p7s (zipped)
Attachment:
user_189996.ezm (zipped)Those can safely be ignored but feel free to register a JIRA issue so
we can see if we can do something to prevent these messages to appear
in the log. One way to do it is to filter them with your logging
configuration.
Nils-H
On Wed, Aug 13, 2008 at 1:12 PM, Torsten Krah
<tkrah@(protected):
> Deploying a struts2 example app to liferay (5.1.1) i am facing this error
> output:
>
> 13:07:39,410 INFO [STDOUT] 13:07:39,410 ERROR
> [
com.opensymphony.xwork2.interceptor.ParametersInterceptor]
> ParametersInterceptor - [setParameters]: Unexpected Exception caught
> setting 'struts.portlet.action' on 'class
>
com.opensymphony.xwork2.ActionSupport: Error setting
> expression 'struts.portlet.action' with value '[Ljava.lang.String;@(protected)'
>
> 13:07:39,410 INFO [STDOUT] 13:07:39,410 ERROR
> [
com.opensymphony.xwork2.interceptor.ParametersInterceptor]
> ParametersInterceptor - [setParameters]: Unexpected Exception caught
> setting 'struts.portlet.mode' on 'class
>
com.opensymphony.xwork2.ActionSupport: Error setting
> expression 'struts.portlet.mode' with value '[Ljava.lang.String;@(protected)'
>
> Whats going wrong here? Any hints what might cause this? Should this work?
> struts.portlet.mode and ...action, for what are they used?
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
> -- Linus Torvalds
>

Attachment:
user_190007.ezm (zipped)here's the link for the attachment:
http://edwin.quita.googlepages.com/Maven2HowTo.doc
hi Nils,
just want to say good job on your s2 portlet jetty-pluto plugin =)
because it boosted my productivity during my portlet development.
in fact, i've written a short tutorial for portlet project management
using struts2, spring, and your plugin =)
i have attached the tutorial here for reference.
i've successfully deployed 2 portlets (in Liferay 5.x) that used a
datasource to display tabular data.
keep up the good work!
regards,
/kits
On Wed, Aug 13, 2008 at 6:19 AM, Nils-Helge Garli Hegvik
<nilsga@(protected):
> Those can safely be ignored but feel free to register a JIRA issue so
> we can see if we can do something to prevent these messages to appear
> in the log. One way to do it is to filter them with your logging
> configuration.
>
> Nils-H
>
> On Wed, Aug 13, 2008 at 1:12 PM, Torsten Krah
> <tkrah@(protected):
>> Deploying a struts2 example app to liferay (5.1.1) i am facing this error
>> output:
>>
>> 13:07:39,410 INFO [STDOUT] 13:07:39,410 ERROR
>> [
com.opensymphony.xwork2.interceptor.ParametersInterceptor]
>> ParametersInterceptor - [setParameters]: Unexpected Exception caught
>> setting 'struts.portlet.action' on 'class
>>
com.opensymphony.xwork2.ActionSupport: Error setting
>> expression 'struts.portlet.action' with value '[Ljava.lang.String;@(protected)'
>>
>> 13:07:39,410 INFO [STDOUT] 13:07:39,410 ERROR
>> [
com.opensymphony.xwork2.interceptor.ParametersInterceptor]
>> ParametersInterceptor - [setParameters]: Unexpected Exception caught
>> setting 'struts.portlet.mode' on 'class
>>
com.opensymphony.xwork2.ActionSupport: Error setting
>> expression 'struts.portlet.mode' with value '[Ljava.lang.String;@(protected)'
>>
>> Whats going wrong here? Any hints what might cause this? Should this work?
>> struts.portlet.mode and ...action, for what are they used?
>>
>> --
>> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
>> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>>
>> Really, I'm not out to destroy Microsoft. That will just be a
>> completely unintentional side effect."
>> -- Linus Torvalds
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189997.ezm (zipped)Hi,
I'm working on struts2 + qi4j plugin. One of the feature that we want
to support is for struts 2 to understand qi4j property and
associations.
IIUC, I would need to register my own PropertyAccessor for all objects.
When I tried to do this, by declaring:
<bean type="ognl.PropertyAccessor" name="
java.lang.Object"
class="org.qi4j.library.struts2.internal.util.Qi4jPropertyAccessor"/>
This error occured:
Caused by:
com.opensymphony.xwork2.inject.DependencyException:
Dependency mapping for [type=ognl.PropertyAccessor,
name='
java.lang.Object'] already exists.
And if I tried to override both:
o ConfigurationManager#addContainerProvider
Make sure when container provider is an instance of
StrutsXmlConfigurationProvider, and sets
[ThrowExceptionOnDuplicateBean] property to [false]; and
o Configuration#reloadContainer and Configuration#createBootstrapContainer
Sets ContainerBuilder#setAllowDuplicates to [true]
to allow duplications, This would enable duplicate declarations for
any factory and aliases. Not just my [PropertyAccessor].
Is there a better way to do this? Ideally, I only want to allow
duplicate for [PropertyAccessor] declarations without creating my own
Qi4jFilterDispatcher, Configuration and ConfigurationManager.
Regards,
Edward Yakop

Attachment:
user_189999.ezm (zipped)http://struts.apache.org/2.0.11.2/docs/bean-configuration.html
name must be unique for the declared type
try changing the name to something unique
?
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Wed, 13 Aug 2008 19:21:32 +0800
> From: edward.yakop@(protected)
> To: user@(protected)
> Subject: Override
java.lang.Object [PropertyAccessor]
>
> Hi,
>
> I'm working on struts2 + qi4j plugin. One of the feature that we want
> to support is for struts 2 to understand qi4j property and
> associations.
> IIUC, I would need to register my own PropertyAccessor for all objects.
>
> When I tried to do this, by declaring:
> <bean type="ognl.PropertyAccessor" name="
java.lang.Object"
> class="org.qi4j.library.struts2.internal.util.Qi4jPropertyAccessor"/>
>
> This error occured:
> Caused by:
com.opensymphony.xwork2.inject.DependencyException:
> Dependency mapping for [type=ognl.PropertyAccessor,
> name='
java.lang.Object'] already exists.
>
> And if I tried to override both:
> o ConfigurationManager#addContainerProvider
> Make sure when container provider is an instance of
> StrutsXmlConfigurationProvider, and sets
> [ThrowExceptionOnDuplicateBean] property to [false]; and
> o Configuration#reloadContainer and Configuration#createBootstrapContainer
> Sets ContainerBuilder#setAllowDuplicates to [true]
> to allow duplications, This would enable duplicate declarations for
> any factory and aliases. Not just my [PropertyAccessor].
>
> Is there a better way to do this? Ideally, I only want to allow
> duplicate for [PropertyAccessor] declarations without creating my own
> Qi4jFilterDispatcher, Configuration and ConfigurationManager.
>
> Regards,
> Edward Yakop
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Reveal your inner athlete and share it with friends on Windows Live.
http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us

Attachment:
user_190001.ezm (zipped)On Wed, Aug 13, 2008 at 8:19 PM, Martin Gainty <mgainty@(protected):
>
> http://struts.apache.org/2.0.11.2/docs/bean-configuration.html
>
> name must be unique for the declared type
> try changing the name to something unique
If I set it to anything else, my property accessor won't be handling
all java objects
anymore.
Regards,
Edward Yakop

Attachment:
user_190000.ezm (zipped)Hi,
I'd like to overriding the default TextProvider to use my own
implementation (labels come from a database).
I have configured in my struts.properties :
struts.xworkTextProvider=fqcn of my TextProvider implementation.
But at the end it doesn't works :-(.
I have found some jira issues some says it's fixed some says no.
Is-it possible ? (maybe with an Interceptor and how ?)
Thanks in advance,
--
Olivier

Attachment:
user_190006.ezm (zipped)Sorry for noise.
It looks overriding methods from ActionSupport (as it implements
TextProvider) helps me.
Thanks,
--
Olivier
2008/8/13 Olivier Lamy <olamy@(protected)>:
> Hi,
> I'd like to overriding the default TextProvider to use my own
> implementation (labels come from a database).
> I have configured in my struts.properties :
> struts.xworkTextProvider=fqcn of my TextProvider implementation.
> But at the end it doesn't works :-(.
>
> I have found some jira issues some says it's fixed some says no.
> Is-it possible ? (maybe with an Interceptor and how ?)
>
> Thanks in advance,
> --
> Olivier
>

Attachment:
user_190002.ezm (zipped)Assuming you have a file named "test.txt" at the root of your webapp, you can get the absolute path name to the file with the following code snippet in ur interceptor.
ActionContext context = actionInvocation.getInvocationContext();
HttpServletRequest request = (HttpServletRequest) context.get("com.opensymphony.xwork2.dispatcher.HttpServletRequest");
String completeFilename = request.getSession().getServletContext().getRealPath("test.txt");
----- Original Message ----
From: Paul Benedict <pbenedict@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Tuesday, August 12, 2008 6:56:24 PM
Subject: Re: Get path to the webapp
Vasyl,
The attempt is very iffy. Some things you need to know:
1) No Servlet API provides the path to your files.
2) If running in a WAR file that is never expanded, there will be no
such file directory that will exist.
3) You can use the classloader of the web context to get the root of
your web application, but that assumes #2 is false. You must be on a
file system for it to work.
Paul
On Tue, Aug 12, 2008 at 8:04 AM, Vasyl Skrypij <vasyl.skrypij@(protected):
>
> Hi all
>
> I have Struts 2.0.9
>
> I need to get the path to the directory in which my web application is
> situated during interceptor's asking. How can I do this been using
> ActionInvocation class object which passes into intercept method, or maybe i
> should try some other way?
>
> --
> View this message in context: http://www.nabble.com/Get-path-to-the-webapp-tp18943905p18943905.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at
http://ca.toolbar.yahoo.com.

Attachment:
user_190003.ezm (zipped)--- On Wed, 8/13/08, Struts Two wrote:
> Assuming you have a file named "test.txt" at the
> root of your webapp, you can get the absolute path name to
> the file with the following code snippet in ur interceptor.
> ActionContext context = actionInvocation.getInvocationContext();
> HttpServletRequest request = (HttpServletRequest)
> context.get("com.opensymphony.xwork2.dispatcher.HttpServletRequest");
> String completeFilename =
> request.getSession().getServletContext().getRealPath("test.txt");
I think Paul's point was that if you're deploying a WAR/EAR that won't work, hence when possible it's best to avoid such things.
It's also cleaner to get the request via ActionContext. Cleaner still by implementing ServletRequestAware as then being tied to the servlet spec is stated explicitly.
(I'm also always nervous about using a string literal to identify an attribute when there's a defined String for it already.)
If the goal is to load a file then putting it on the classpath and loading it as a resource is cleaner and safer. If it's for writing then I'd be nervous about that too; seems like it'd be a better idea to write to somewhere outside of the webapp :/
Dave
> ----- Original Message ----
> From: Paul Benedict <pbenedict@(protected)>
> To: Struts Users Mailing List
> <user@(protected)>
> Sent: Tuesday, August 12, 2008 6:56:24 PM
> Subject: Re: Get path to the webapp
>
> Vasyl,
>
> The attempt is very iffy. Some things you need to know:
>
> 1) No Servlet API provides the path to your files.
>
> 2) If running in a WAR file that is never expanded, there
> will be no
> such file directory that will exist.
>
> 3) You can use the classloader of the web context to get
> the root of
> your web application, but that assumes #2 is false. You
> must be on a
> file system for it to work.
>
> Paul
>
> On Tue, Aug 12, 2008 at 8:04 AM, Vasyl Skrypij
> <vasyl.skrypij@(protected):
> >
> > Hi all
> >
> > I have Struts 2.0.9
> >
> > I need to get the path to the directory in which my
> web application is
> > situated during interceptor's asking. How can I do
> this been using
> > ActionInvocation class object which passes into
> intercept method, or maybe i
> > should try some other way?
> >
> > --
> > View this message in context:
> http://www.nabble.com/Get-path-to-the-webapp-tp18943905p18943905.html
> > Sent from the Struts - User mailing list archive at
> Nabble.com.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
>
>
>
> __________________________________________________________________
> Yahoo! Canada Toolbar: Search from anywhere on the web, and
> bookmark your favourite sites. Download it now at
> http://ca.toolbar.yahoo.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment:
user_190004.ezm (zipped)
Hi
I'm working on struts2 interceptors, which inherits WebWork.
My requirement at one interceptor:
----->request------->Bread Interceptor : before invocation.invoke()
------------->Action
<------response<---Bread Interceptor : after invocation.invoke()
<------------------|
1)Interceptor will process the steps before invocation.invoke()
2)Then in action invocation Action will execute
3)After that interceptor will get executed for remaining steps
But in step 3) the response is getting dispatched to the browser,then
response is not in sync with post interceptor execution.
Please suggest me , how to make sync the response with the post interceptor
execution.
thanks
raghu
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190005.ezm (zipped)You may need to perform your post-processing inside a
PreResultListener [1], that is, just before the result is executed.
[1] http://struts.apache.org/2.1.2/docs/preresultlistener.html
2008/8/13, Raghunath <visumagic@(protected)>:
>
> Hi
> I'm working on struts2 interceptors, which inherits WebWork.
> My requirement at one interceptor:
>
> ----->request------->Bread Interceptor : before invocation.invoke()
> ------------->Action
> <------response<---Bread Interceptor : after invocation.invoke()
> <------------------|
>
> 1)Interceptor will process the steps before invocation.invoke()
> 2)Then in action invocation Action will execute
> 3)After that interceptor will get executed for remaining steps
>
> But in step 3) the response is getting dispatched to the browser,then
> response is not in sync with post interceptor execution.
>
> Please suggest me , how to make sync the response with the post interceptor
> execution.
>
> thanks
> raghu
> --
> View this message in context: http://www.nabble.com/Interceptors-Doubt-tp18968647p18968647.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_190008.ezm (zipped)XML User wrote:
> Hi,
>
> How can I implement the URL mapping so that our URL will always look like
> "www.abc.com/products/toys/acbtoy" It should not end with something like
> abctoy.action OR abctoy.do.
>
> Is there a way for making this happen?
> If so then can you please let me know with code?
>
>
See the thread in struts-user started on 3 August 08 titled "Issue with
Url mapping with struts-action-extension=""".

Attachment:
user_190009.ezm (zipped)
Hi XML
You can write your own ActionMapper.
Look:
http://struts.apache.org/2.x/docs/actionmapper.html
I used debuger and I watched DefaultActionMapper. It help me.
Jeromy Evans - Blue Sky Minds wrote:
>
> XML User wrote:
>> Hi,
>>
>> How can I implement the URL mapping so that our URL will always look like
>> "www.abc.com/products/toys/acbtoy" It should not end with something like
>> abctoy.action OR abctoy.do.
>>
>> Is there a way for making this happen?
>> If so then can you please let me know with code?
>>
>>
>
> See the thread in struts-user started on 3 August 08 titled "Issue with
> Url mapping with struts-action-extension=""".
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190010.ezm (zipped)Hi,
We are using struts2 2.0.6 and now we have a requirement to have some Access Control into it,
That is we got some functions points and each ROLE got different access rigts
against each function, if someone login to the System the UI will be presented based on these configurations.
What I want to know is within Struts 2, How can I achieve this kind of functionality. Are there any better integration TAG libs or somthing like that.
Note : We do not have any big Application Servers as such just that apache/tomcat
Thanks

Attachment:
user_190013.ezm (zipped)On Thu, Aug 14, 2008 at 1:56 PM, tom tom <j_lalith@(protected):
> Hi,
> We are using struts2 2.0.6 and now we have a requirement to have some Access Control into it,
>
> That is we got some functions points and each ROLE got different access rigts
> against each function, if someone login to the System the UI will be presented based on these configurations.
>
> What I want to know is within Struts 2, How can I achieve this kind of functionality. Are there any better integration TAG libs or somthing like that.
we implement this, and we create our own Interceptor, and we inject it
using Spring, and run well (with Hibernate as the Model)
take a look in the SVN of our project http://www.sf.net/projects/cimande
the package name org.blueoxygen.debus
hope this can help you to get the example
try the 1.3SDK, the ACL build inside
F

Attachment:
user_190011.ezm (zipped)Hi there,
I've been using sx tags for a while now and I still think they are very nice
and simple to use, however I found some critical problems which make me move
from them.
One of the problems is that if in the returned AJAX content is included any
sx tag then if there is any javascript in the returned content this simply
dissappears. I tried all the combinations with executeScripts
separateScripts with no success however..
Another problem related to it is that I would like to be able to call
callback functions after the returned content has been rendered. The
workaround for that is to use afterNotifyTopics and timeouts but I dont
think this is quite the same.
And then the last problem is that I would like to use different targets to
render the returned content based on the operation status.
Most likely these problems have solution with sx tags and it is just a
problem that I don't have enough knowledge but after reading the
documentation and ajax recipes extensively I couldn't find any answer to any
of the above questions.
I've moved now to jQuery and all my problems are solved :)
Br,
Oscar

Attachment:
user_190012.ezm (zipped)Hi Everybody,
First I wanted to say hello to everybody here, as this is my first mail in
the list. I also wanted to apologize if my english is not good enough, but
i'll do my best!
This is the problem I am having:
I am building an application using tomcat 5.5 and struts. Let's say that the
base url form my application is http://myserver:8080/myapp. I have to use an
Apache Proxy in front of my Tomcat Server (because of different reasons), so
that my application can be reached using http://apacheserver/myapp (default
port 80). I use such a rule in my Apache configuration fro rewriting urls:
RewriteRule ^/myapp(.*) \http://myserver:8080/myapp$1 [P]
It works perfect so that i can navigate through my application using
http://apacheserver/myapp. But if using 'redirect=true' in one of my
mappings,eg. after a form processing ends, the browser's url changes to
http://myserver:8080/myapp ...
How can i get rid of this? I need to keep on navigating through the proxy,
but I also would like to use redirect=true...
Thank you alot, and i hope someone can help me out. Below you can find some
info about my environment:
Apache Web Server 2.0
Tomcat 5.5
Struts 1.2.8
Java 5
--
Un saludo,
Miguel Cohnen de la Cámara

Attachment:
user_190014.ezm (zipped)
Hi,
I have an action class which implements preparable . It works fine but i
noticed that the prepare method inside the action class gets invoked twice
before getting to the intended method.In first invocation the variables
inside the action class are all null , However in second invocation they all
are prefilled from the page.Can anyone explain why it gets invoked twice ?.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190015.ezm (zipped)> I have an action class which implements preparable . It works fine but i
> noticed that the prepare method inside the action class gets invoked twice
> before getting to the intended method.In first invocation the variables
> inside the action class are all null , However in second invocation they all
> are prefilled from the page.Can anyone explain why it gets invoked twice ?.
If you implemented only prepare() method, it will be called each time
before any call to action's method of this class. If you have methods:
input() and update(), prepare() will be called before input() and
update(). If you want to call it only before input() add
prepareInput() or prepareDoInput() method [1]
It can be also issue with Ajax TabbedPanel, try to search in group archive.
[1] http://struts.apache.org/2.x/docs/prepare-interceptor.html
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_190016.ezm (zipped)
Thanks Lukasz for quick reply.But the action class that has the prepare
method has four methods .
Lukasz Lenart wrote:
>
>> I have an action class which implements preparable . It works fine but i
>> noticed that the prepare method inside the action class gets invoked
>> twice
>> before getting to the intended method.In first invocation the variables
>> inside the action class are all null , However in second invocation they
>> all
>> are prefilled from the page.Can anyone explain why it gets invoked twice
>> ?.
>
> If you implemented only prepare() method, it will be called each time
> before any call to action's method of this class. If you have methods:
> input() and update(), prepare() will be called before input() and
> update(). If you want to call it only before input() add
> prepareInput() or prepareDoInput() method [1]
>
> It can be also issue with Ajax TabbedPanel, try to search in group
> archive.
>
>
> [1] http://struts.apache.org/2.x/docs/prepare-interceptor.html
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190017.ezm (zipped)> Thanks Lukasz for quick reply.But the action class that has the prepare
> method has four methods .
Just leave prepare() empty (you can also setup interceptor to don't
call prepare() method) and implement prepare<YourMethod>()
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_190018.ezm (zipped)--- On Thu, 8/14/08, Jayeshpowar wrote:
> Thanks Lukasz for quick reply. But the action class that has
> the prepare method has four methods.
The salient point was that prepare() will be called before any method in the class, regardless of how many methods the class has.
If you're calling a single method (like during a typical action request) and prepare() is being called multiple times then something has gone wrong, but without more information (action configuration, interceptor stack configuration, relevant action code, etc.) it will be difficult to help.
Dave
> Lukasz Lenart wrote:
> >
> >> I have an action class which implements preparable
> . It works fine but i
> >> noticed that the prepare method inside the action
> class gets invoked
> >> twice
> >> before getting to the intended method.In first
> invocation the variables
> >> inside the action class are all null , However in
> second invocation they
> >> all
> >> are prefilled from the page.Can anyone explain why
> it gets invoked twice
> >> ?.
> >
> > If you implemented only prepare() method, it will be
> called each time
> > before any call to action's method of this class.
> If you have methods:
> > input() and update(), prepare() will be called before
> input() and
> > update(). If you want to call it only before input()
> add
> > prepareInput() or prepareDoInput() method [1]
> >
> > It can be also issue with Ajax TabbedPanel, try to
> search in group
> > archive.
> >
> >
> > [1]
> http://struts.apache.org/2.x/docs/prepare-interceptor.html
> >
> >
> > Regards
> > --
> > Lukasz
> > http://www.lenart.org.pl/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Prepare-method-being-invoked-twice-tp18978969p18979442.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)