Author Login
Post Reply
user Digest 13 May 2008 21:41:59 -0000 Issue 8026
Topics (messages 186392 through 186413):
Re: [struts 2] Two forms for one action
186392 by: Jim Kiley
Re: Repopulating Select Lists after Validation Error
186393 by: Laurie Harper
Ajax with Struts2
186394 by: krishna chary
<s:actionerror > Tag Data Rendering Issue
186395 by: Himanshu Rathore
186399 by: Laurie Harper
Re: File upload issue
186396 by: Laurie Harper
Re: struts2 access session Id
186397 by: Laurie Harper
186401 by: Jakub Milkiewicz
Re: Selecting a jsp according to locale
186398 by: Laurie Harper
JFreeChart plugin
186400 by: Leena Borle
186403 by: Randy Burgess
186411 by: Leena Borle
186412 by: Felipe Lorenz
186413 by: Randy Burgess
Dojo taglib?
186402 by: Michael Gagnon
186410 by: Lukasz Lenart
Spring Security and Struts2 Using tiles
186404 by: Alberto A. Flores
186405 by: Antonio Petrelli
186406 by: Alberto A. Flores
186407 by: Antonio Petrelli
186408 by: Alberto A. Flores
186409 by: Antonio Petrelli
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_186392.ezm (zipped)<s:form action="blah">
<s:submit/>
<s:submit action="blah!foo"/>
</s:form>
On Tue, May 13, 2008 at 11:44 AM, Milan Milanovic <milanmilanovich@(protected)>
wrote:
> Hi,
> regarding multiple submit buttons for the same form, if I have <s:form
> ...> with
> defined action (which is actually a method name in a action class), then
> my submit
> button calls that method. But, how can I define another submit button that
> will call
> another method of the same action class ?
> --
> Thx in advance, Milan
> ----- Original Message ----
> From: Jim Kiley <jhkiley@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Monday, May 12, 2008 6:15:07 PM
> Subject: Re: [struts 2] Two forms for one action
>
> Milan,
>
> I'm not a Struts 1 guy, so this advice might not be useful to you (because
> you didn't say whether this was a Struts 1 or 2 situation). But in my
> Struts
> 2 app I have plenty of places where I have multiple <s:submit> buttons
> each
> triggering different action methods on the same action class.
>
> jk
>
>
> On Mon, May 12, 2008 at 12:10 PM, Milan Milanovic <
> milanmilanovich@(protected)>
> wrote:
>
> > Or maybe I should define two submit buttons for the same form and action
> > class ?
> > --
> > Regards, Milan
> >
> >
> > ----- Original Message ----
> > From: Milan Milanovic <milanmilanovich@(protected)>
> > To: Struts Users Mailing List <user@(protected)>
> > Sent: Monday, May 12, 2008 5:57:50 PM
> > Subject: [struts 2] Two forms for one action
> >
> > Hi,
> > I need to have classic master/detail jsp page, so I need actually two
> > forms in a jsp page to works with one action class,
> > one main form that works with main elements of my object (e.g. User
> name,
> > surname,...) for header and another one which works
> > with some list that belongs to my main object (e.g., User.privileges)
> > below such header part. How can I define this ?
> > --
> > Thx, Milan Milanovic
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile. Try it now.
> > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile. Try it now.
> > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>
>
>
>
--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment:
user_186393.ezm (zipped)Asleson, Ryan wrote:
>
> Hello,
>
> We're transitioning from a Struts 1.x and Tiles development environment
> to Struts 2 and Sitemesh, and I need some help getting around some of
> the differences.
>
> Here's what I'm planning so far. I want to have an abstract BaseAction
> that extends ActionSupport. Since we are no longer using Tiles, we
> can't count on using Tiles Controller classes to prepare a page for
> display -- for example, retrieving the contents of drop down lists from
> the database. In my BaseAction, I have overridden the execute() method
> to call a "lifecycle" method called prepareAction() that is meant to be
> an extension point for subclasses to retrieve any data the is needed to
> display the page.
Why add a custom lifecycle method? Why not just let sub-classes
implement Preparable?
> For example, let's say there's a drop-down select box on a page, and its
> contents come from a database. A concrete implementation of BaseAction
> should override prepareAction() to retrieve the list items for the drop
> down list.
By implementing Preparable that logic would go in either prepare() or
prepareInput() (where 'input' is the name of the method on the action
that is called to display the form).
> Now, here's where things get sticky: Assume the page above is
> displayed. The user enters some form data and posts the page. However,
> there are some validation errors. Struts 2 will automatically redisplay
> the page.... but will the drop-down list be populated with list items,
> or will it be empty?
If there are validation errors, Struts will forward control to the
action result mapped as 'input'. You can either arrange for the
drop-down list data to be loaded before validation fires (e.g. using
Preparable.prepare()) or, if you don't want to perform that load during
a successful form submit, you can do it as part of the 'input' result
processing.
> In the Struts 1.x/Tiles world, where we have a Tiles Controller backing
> the JSP, the list items would be repopulated by the Controller. But
> with Tiles no longer in play, what will repopulate the list? I'm pretty
> sure that the prepareAction() method that was used when the page is
> first displayed will not be called when there are validation errors,
> resulting in an empty drop-down list.
If a validation error occurs, Struts will not call the action method for
handling the form submit so no, you can't rely on a method being called
from there in this case.
> So, here are my questions:
>
> 1. Is my idea to have a BaseAction that provides an extension point for
> subclasses, where things like database access should occur, a bad idea?
Not necessarily a bad idea, but not necessarily optimal. For example,
since your actions would all be dependent on super.execute() being
invoked, it may make it messy to target other methods on the action
(e.g. calling action.input() to setup and display a form and
action.execute() to process it on submit).
> 2. What is the recommended way to repopulate drop-down selects after a
> validation error, if the list items need to be retrieved from a
> database?
Take a look at the Preparable interface and the 'prepare' interceptor
for one approach. Another may be to use the 'action-chain' result type
for your action's 'input' result mapping, and keep the data retrieval in
the chained action.
I recommend taking a look at some of the example applications (e.g.
Mailo Reader and Showcase) to see how this has been handled elsewhere.
There's More Than One Way To Do It (TM) :-)
L.

Attachment:
user_186394.ezm (zipped) My question is ...
When I use this code <s:url id="ajaxTest"
value="getBusinessProfileprofileAction.action"
/>
<s:a theme="ajax" href="%{ajaxTest}" targets="div1">Business</s:a>
in between action form ,then I got warning like WARNING: Parameters: Invalid
chunk ignored. and ajax action is not performed.
please answer to my question very urgent

Attachment:
user_186395.ezm (zipped)When using <s:actionerror > tag, the first character of error message is
automatically getting converted to upper case. I haven't set any
"text-transform" property in my CSS.
If I do "View Source", I see proper text but on JSP its behaving weirdly.
My CSS:
.errorMessage {
color: red;
font: 10px verdana, arial, helvetica, sans-serif;
}
In "View Source"
<ul>
<li><span class="errorMessage">Please enter User Id</span></li>
</ul>
But on JSP, it is displayed as
Please Enter User Id
I have included struts.properties in my project classpath and have set *
struts.ui.theme=simple*
What could be the reason of this behaviour?

Attachment:
user_186399.ezm (zipped)Himanshu Rathore wrote:
> When using <s:actionerror > tag, the first character of error message is
> automatically getting converted to upper case. I haven't set any
> "text-transform" property in my CSS.
>
> If I do "View Source", I see proper text but on JSP its behaving weirdly.
>
> My CSS:
> ..errorMessage {
> color: red;
> font: 10px verdana, arial, helvetica, sans-serif;
> }
>
> In "View Source"
> <ul>
> <li><span class="errorMessage">Please enter User Id</span></li>
> </ul>
>
> But on JSP, it is displayed as
> Please Enter User Id
>
> I have included struts.properties in my project classpath and have set *
> struts.ui.theme=simple*
>
> What could be the reason of this behaviour?
Sounds like *something* is applying a text-transform to the text. When
you view source, what stylesheets do you see referenced? Are there any
<style> blocks, or inline styles in the markup? You might try using the
Web Developer or Firebug extensions for Firefox to examine the DOM and
determine what styles are really being applied to that element of some
additional insight into what's going on.
L.

Attachment:
user_186396.ezm (zipped)Zoran Avtarovski wrote:
> I¹m getting an error after uploading a file. Which manifests itself in my
> redirect action.
>
> I¹m using a simple post redirect pattern, where the file upload action
> redirects to a separate fileList action.
>
> After successfully uploading the file the browser is redirected to the
> appropriate action, but Tomcat throws a
> ³ the request was rejected because its size is unknown ³ exception. If I
> call the offending action from the browser it works fine.
>
> Here¹s the relevant snippet from my struts.xml file:
>
> <action name="uploadFile" class="uploadFile">
> <result name="input">/WEB-INF/cms/formFile.jsp</result>
> <result name="success" type="redirect-action">
> <param name="actionName">getFile</param>
> <param name="namespace">/cms</param>
> </result>
> </action>
>
>
> Any ideas would be appreciated.
Where is the exception thrown? During the first request before the
redirect is sent? Or during the request resulting from the redirect? Is
there any Ajax involved in handling the redirect? Assuming the exception
happens in the redirected request and there's no Ajax, I'd suggest using
LiveHeaders or Firebug in Firefox to examine the headers/body of the
failing request to see if there's something quirky there.
L.

Attachment:
user_186397.ezm (zipped)Jakub Milkiewicz wrote:
> Hi
> I have a problem with Struts 2.
> I am looking for a way to access httpsession id?
>
> I have tried using ActionContext.getContext().getSession().get("id") but it
> returns null. i 've read there is a possibility to use Servlet Config
> Interceptor<http://www.opensymphony.com/webwork/wikidocs/Servlet%20Config%20Interceptor.html>
> but i would not like to do it.
ActionContext.getSession() gives you access to the session scope
attributes, not the session itself. To get to the actual session object,
obtain the HttpServletRequest object [1] and get the session from there:
HttpServletRequest request = ...; // use ActionContext or
ServletRequuestAware
HttpSession session = request.getSession();
String sessionId = session.getId();
L.
[1]
http://struts.apache.org/2.0.11.1/docs/how-can-we-access-the-httpservletrequest.html

Attachment:
user_186401.ezm (zipped)I had the same idea when i mentioned Servlet Config Interceptor below but I
just thought there is an easier way.
Anyway thanks for reply and it looks like i need to do just like that.
2008/5/13 Laurie Harper <laurie@(protected)>:
> Jakub Milkiewicz wrote:
>
> > Hi
> > I have a problem with Struts 2.
> > I am looking for a way to access httpsession id?
> >
> > I have tried using ActionContext.getContext().getSession().get("id") but
> > it
> > returns null. i 've read there is a possibility to use Servlet Config
> > Interceptor<
> > http://www.opensymphony.com/webwork/wikidocs/Servlet%20Config%20Interceptor.html
> > >
> > but i would not like to do it.
> >
>
> ActionContext.getSession() gives you access to the session scope
> attributes, not the session itself. To get to the actual session object,
> obtain the HttpServletRequest object [1] and get the session from there:
>
> HttpServletRequest request = ...; // use ActionContext or
> ServletRequuestAware
>
> HttpSession session = request.getSession();
> String sessionId = session.getId();
>
> L.
>
> [1]
> http://struts.apache.org/2.0.11.1/docs/how-can-we-access-the-httpservletrequest.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186398.ezm (zipped)Dimitris Mouchritsas wrote:
> Hi all,
> I want to show a system requirements page according to the web page's
> locale.
> Can I use the tiles-defs.xml to do it or I need to write code in a jsp?
> Thanks
I'm not sure what you want to achieve. If you just want to localize the
page, you can do so using the I18N facilities provided by Struts. If you
actually need to render a different JSP per locale for some reason, it
will be more involved. Either way, the specifics depend on which version
of Struts you are using.
Try posting more details of exactly what it is you need to do, and what
environment you are working in (Struts version, etc.).
L.

Attachment:
user_186400.ezm (zipped)Hello,
Has anyone tried out JFreeChart plugin? I am trying to run the sample code
available on plugin documentation page. I see all ASCII characters getting
printed on my browser screen instead of an image file.
Any help is appreciated.
Thanks,
Leena.

Attachment:
user_186403.ezm (zipped)I used the example code from the documentation on WebLogic 9.2.2 and it ran
fine. I built off that example code and now have several actions creating
nice 3D pie charts. Which application server are you using?
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Leena Borle <lsborle@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 13 May 2008 10:41:57 -0700
> To: Struts Users Mailing List <user@(protected)>
> Subject: JFreeChart plugin
>
> Hello,
> Has anyone tried out JFreeChart plugin? I am trying to run the sample code
> available on plugin documentation page. I see all ASCII characters getting
> printed on my browser screen instead of an image file.
> Any help is appreciated.
> Thanks,
> Leena.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_186411.ezm (zipped)Hi,
I'm using Tomcat-5.5.25. I found out that, if I include action's url in
<img src="DrawChart_display.action" alt="No Image" />, it gets displayed.
I am trying to display chart using Remote-Button/Remote-DIV method of S2.
Which means when user submits form data, I need to display chart inside a
DIV below this form. something like this ...
<s:form>
.....
<s:submit value="Draw chart" href="%{display_chart}"
theme="ajax" targets="chart_div"
cssClass="buttons" />
</s:form>
<div id="chart_div"></div>
</div>
Any idea how to achieve this without specifying action's URL directly
to image tag ?
Leena
On Tue, May 13, 2008 at 11:45 AM, Randy Burgess <RBurgess@(protected):
> I used the example code from the documentation on WebLogic 9.2.2 and it
> ran
> fine. I built off that example code and now have several actions creating
> nice 3D pie charts. Which application server are you using?
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Leena Borle <lsborle@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Tue, 13 May 2008 10:41:57 -0700
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: JFreeChart plugin
> >
> > Hello,
> > Has anyone tried out JFreeChart plugin? I am trying to run the sample
> code
> > available on plugin documentation page. I see all ASCII characters
> getting
> > printed on my browser screen instead of an image file.
> > Any help is appreciated.
> > Thanks,
> > Leena.
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186412.ezm (zipped)Hi, did you try put the action (DrawChart_display.action) in HREF attribute
of the DIV? I use js to do it!
Something like:
function refresh()
{
var div = dojo.widget.byId('#div_id');
div.href = 'DrawChart_display.action' + params_if_have;
div.refresh();
}
Felipe Augusto Lorenz
www.idealogic.com.br
On Tue, May 13, 2008 at 5:50 PM, Leena Borle <lsborle@(protected):
> Hi,
> I'm using Tomcat-5.5.25. I found out that, if I include action's url in
> <img src="DrawChart_display.action" alt="No Image" />, it gets displayed.
> I am trying to display chart using Remote-Button/Remote-DIV method of S2.
> Which means when user submits form data, I need to display chart inside a
> DIV below this form. something like this ...
> <s:form>
> .....
> <s:submit value="Draw chart" href="%{display_chart}"
> theme="ajax" targets="chart_div"
> cssClass="buttons" />
> </s:form>
>
> <div id="chart_div"></div>
>
> </div>
> Any idea how to achieve this without specifying action's URL directly
> to image tag ?
>
> Leena
>
> On Tue, May 13, 2008 at 11:45 AM, Randy Burgess <RBurgess@(protected)>
> wrote:
>
> > I used the example code from the documentation on WebLogic 9.2.2 and it
> > ran
> > fine. I built off that example code and now have several actions
> creating
> > nice 3D pie charts. Which application server are you using?
> >
> > Regards,
> > Randy Burgess
> > Sr. Web Applications Developer
> > Nuvox Communications
> >
> >
> >
> > > From: Leena Borle <lsborle@(protected)>
> > > Reply-To: Struts Users Mailing List <user@(protected)>
> > > Date: Tue, 13 May 2008 10:41:57 -0700
> > > To: Struts Users Mailing List <user@(protected)>
> > > Subject: JFreeChart plugin
> > >
> > > Hello,
> > > Has anyone tried out JFreeChart plugin? I am trying to run the
> sample
> > code
> > > available on plugin documentation page. I see all ASCII characters
> > getting
> > > printed on my browser screen instead of an image file.
> > > Any help is appreciated.
> > > Thanks,
> > > Leena.
> >
> >
> >
> > This email and any attachments ("Message") may contain legally
> privileged
> > and/or confidential information. If you are not the addressee, or if
> this
> > Message has been addressed to you in error, you are not authorized to
> read,
> > copy, or distribute it, and we ask that you please delete it (including
> all
> > copies) and notify the sender by return email. Delivery of this Message
> to
> > any person other than the intended recipient(s) shall not be deemed a
> waiver
> > of confidentiality and/or a privilege.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>

Attachment:
user_186413.ezm (zipped)I'm using an interceptor to store (and clear) a DefaultPieDataset in the
users session from actions that give me the data needed to create charts. My
chart action implements SessionAware and I get the dataset from the session.
I also created a package for the charts that extends struts-default because
the charts plugin doesn't define any interceptors AFAICT. I then get the
chart using an image tag in a modal window which calls my chart action.
<img src="charts/pie.action" width="600" height="200">
<package name="charts" extends="struts-default" namespace="/charts">
<result-types> <result-type name="chart"
class="org.apache.struts2.dispatcher.ChartResult"> <param
name="height">150</param> <param name="width">200</param>
</result-type> </result-types> <action name="pie"
class="....ChartAction"> <result name="success" type="chart">
<param name="width">600</param> <param
name="height">200</param> </result> </action>
</package>
This type of configuration would work for your scenario also. If you have a
huge dataset then storing it in the session could cause an issue with
scalability. With a chart I wouldn¹t imagine that the dataset would be that
large though.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Leena Borle <lsborle@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 13 May 2008 13:50:00 -0700
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: JFreeChart plugin
>
> Hi,
> I'm using Tomcat-5.5.25. I found out that, if I include action's url in
> <img src="DrawChart_display.action" alt="No Image" />, it gets displayed.
> I am trying to display chart using Remote-Button/Remote-DIV method of S2.
> Which means when user submits form data, I need to display chart inside a
> DIV below this form. something like this ...
> <s:form>
> .....
> <s:submit value="Draw chart" href="%{display_chart}"
> theme="ajax" targets="chart_div"
> cssClass="buttons" />
> </s:form>
>
> <div id="chart_div"></div>
>
> </div>
> Any idea how to achieve this without specifying action's URL directly
> to image tag ?
>
> Leena
>
> On Tue, May 13, 2008 at 11:45 AM, Randy Burgess <RBurgess@(protected):
>
>> I used the example code from the documentation on WebLogic 9.2.2 and it
>> ran
>> fine. I built off that example code and now have several actions creating
>> nice 3D pie charts. Which application server are you using?
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: Leena Borle <lsborle@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Tue, 13 May 2008 10:41:57 -0700
>>> To: Struts Users Mailing List <user@(protected)>
>>> Subject: JFreeChart plugin
>>>
>>> Hello,
>>> Has anyone tried out JFreeChart plugin? I am trying to run the sample
>> code
>>> available on plugin documentation page. I see all ASCII characters
>> getting
>>> printed on my browser screen instead of an image file.
>>> Any help is appreciated.
>>> Thanks,
>>> Leena.
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email. Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_186402.ezm (zipped)Reading http://struts.apache.org/2.x/docs/ajax-tags.html, this claims
(reasonably) that I must add <%@(protected)"
%> in order to use the sx ajax tags. but it appears that the
/struts-dojo-tags uri is not available to me. Eclipse doesn't see it, and I
don't see such a tld in the struts distribution. I have included struts in
my project through maven with the dependency:
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.0.11</version>
</dependency>
Downloading the struts-2.0.11.1-all.zip package directly from the struts
site also does not seem to [obviously, at least] include such a tld. Is the
documentation incorrect or do I misunderstand something?

Attachment:
user_186410.ezm (zipped)Hi,
"To use the AJAX tags from 2.1 on you must:"
Reading http://struts.apache.org/2.x/docs/ajax-tags.html, this claims
>
You should read much more careful
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186404.ezm (zipped)Folks,
My understanding is that Spring Security does not secure resources on
*forwards* (I believe tiles2 do forward/chaining). In an application
using Struts2, Spring and Tiles2, these forwards work just fine. Has
anyone had success using these three frameworks together using Spring
Security? I tried it today and It turned out that the security tag
(http://www.springframework/security/tags/):
<security:authorization property="principal.username"/>
never fetches anything. Furthermore, the code:
SecurityContextHolder.getContext().getAuthentication()
returns null (in the forwarded jsp page). Has anyone know what to do in
this case? I'm beginning to think I can not use Spring Security at all.
Regards,
--
Alberto A. Flores
http://www.linkedin.com/in/aflores

Attachment:
user_186405.ezm (zipped)2008/5/13 Alberto A. Flores <aaflores@(protected)>:
> My understanding is that Spring Security does not secure resources on
> *forwards* (I believe tiles2 do forward/chaining).
Forwards and includes, that's where I think there may be a fault.
Can you try if, using simple <jsp:include> tags, the security tags work?
Antonio

Attachment:
user_186406.ezm (zipped)I don't thinks that's possible as the Struts2 result would be something
like:
<result type="tiles" name="foo">my.tile</result>
In here, I don't have access to the forward.
Antonio Petrelli wrote:
> 2008/5/13 Alberto A. Flores <aaflores@(protected)>:
>> My understanding is that Spring Security does not secure resources on
>> *forwards* (I believe tiles2 do forward/chaining).
>
> Forwards and includes, that's where I think there may be a fault.
> Can you try if, using simple <jsp:include> tags, the security tags work?
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Alberto A. Flores
http://www.linkedin.com/in/aflores

Attachment:
user_186407.ezm (zipped)2008/5/13 Alberto A. Flores <aaflores@(protected)>:
> I don't thinks that's possible as the Struts2 result would be something
> like:
>
> <result type="tiles" name="foo">my.tile</result>
>
> In here, I don't have access to the forward.
Mmm... it's starting to be complicated, and I think that there is a
bug somewhere.
Can you open a JIRA issue, attaching, if possible, a sample web application?
http://issues.apache.org/struts
Antonio

Attachment:
user_186408.ezm (zipped)I would, but it seems to me like there is little that can be done on the
Struts2 side (unless a plugin of some sort is written). Essentially,
when control is forwarded to the tile, Spring security can not do much
(or maybe I'm missing something).
The Spring Security team is well aware of (as far as forwards), that
resources are not secured on forwards (which sucks, really, unless I'm
doing something terribly wrong).
I'll see if I can create a subset of my current app describing the
problem. Probably would post a war file? Is that what you meant?
Antonio Petrelli wrote:
> 2008/5/13 Alberto A. Flores <aaflores@(protected)>:
>> I don't thinks that's possible as the Struts2 result would be something
>> like:
>>
>> <result type="tiles" name="foo">my.tile</result>
>>
>> In here, I don't have access to the forward.
>
> Mmm... it's starting to be complicated, and I think that there is a
> bug somewhere.
> Can you open a JIRA issue, attaching, if possible, a sample web application?
>
> http://issues.apache.org/struts
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Alberto A. Flores
http://www.linkedin.com/in/aflores

Attachment:
user_186409.ezm (zipped)2008/5/13 Alberto A. Flores <aaflores@(protected)>:
> I would, but it seems to me like there is little that can be done on the
> Struts2 side (unless a plugin of some sort is written). Essentially, when
> control is forwarded to the tile, Spring security can not do much (or maybe
> I'm missing something).
I see...
> The Spring Security team is well aware of (as far as forwards), that
> resources are not secured on forwards (which sucks, really, unless I'm doing
> something terribly wrong).
Great, at least the bug is not at Struts or Tiles side :-)
> I'll see if I can create a subset of my current app describing the problem.
> Probably would post a war file? Is that what you meant?
Exactly, with the source.
Antonio