RE: Struts2 Validations

2008-12-02 Thread esemba

Hi,
just add all jar files bundled with the distribution (as you can see in
showcase application).
Required minimum is commons-logging, ognl, freemarker, struts2-core and
xwork.



Anshuman Nanda wrote:
> 
> Hi esemba,
> 
>   From other dependancies I mean any new jar file which I have to take
> apart
> from struts2-core-2.0.14.jar.  My question was because I am nearly 6
> version
> behind right now on 2.0.8,  so migrating to 2.0.14 I see as an Issue as I
> am
> not sure what else in terms of jar files I need to update apart from
> struts-core-2.0.14.jar file.
> 
> Regards
> Anshuman Nanda
> 
> 
> 
> -Original Message-
> From: esemba [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 02, 2008 1:24 PM
> To: user@struts.apache.org
> Subject: RE: Struts2 Validations
> 
> 
> 
> Hi,
> I has the same problem using Struts 2.0.12. In 2.0.14 there has been fixed
> a
> bug with accessing static content. Validation and dojo javascript files
> were
> somehow not generated. Upgrading to 2.0.14 has fixed the problem. I don't
> understand what do you mean by "other dependencies". Just add all required
> jar files.
> 
> Bye.
> 
> 
> Anshuman Nanda wrote:
>>
>> Thanks Esemba for the update.
>>
>> Can u please let me know what are the other dependencies (in terms of jar
>> files) which i need to take care of when migrating from 2.0.8 to 2.0.14.
>>
>> Regards
>> Anshuman Nanda
>>
>>
>> -Original Message-
>> From: esemba [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, December 02, 2008 12:41 PM
>> To: user@struts.apache.org
>> Subject: RE: Struts2 Validations
>>
>>
>>
>> Hi,
>> I've faced this issue too. Try to migrate to latest Struts 2.0.14.
>>
>>
>> Anshuman Nanda wrote:
>>>
>>> Hi Lukasz
>>>
>>> I am using the Validation Files and not annotations.
>>>
>>>
>>> Regards
>>> Anshuman Nanda
>>>
>>>
>>>
>>> -Original Message-
>>> From: Lukasz Lenart [mailto:[EMAIL PROTECTED]
>>> Sent: Monday, December 01, 2008 2:18 PM
>>> To: Struts Users Mailing List
>>> Subject: Re: Struts2 Validations
>>>
>>>
>>> Did you created validation files or added annotations?
>>>
>>>
>>> Regards
>>> --
>>> Lukasz
>>> http://www.lenart.org.pl/
>>>
>>> -
>>> 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/Struts2-Validations-tp20717889p20787177.html
>> 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/Struts2-Validations-tp20717889p20787601.html
> 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/Struts2-Validations-tp20717889p20792285.html
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: Struts2 Validations

2008-12-01 Thread esemba

Hi,
I has the same problem using Struts 2.0.12. In 2.0.14 there has been fixed a
bug with accessing static content. Validation and dojo javascript files were
somehow not generated. Upgrading to 2.0.14 has fixed the problem. I don't
understand what do you mean by "other dependencies". Just add all required
jar files.

Bye.


Anshuman Nanda wrote:
> 
> Thanks Esemba for the update.
> 
> Can u please let me know what are the other dependencies (in terms of jar
> files) which i need to take care of when migrating from 2.0.8 to 2.0.14.
> 
> Regards
> Anshuman Nanda
> 
> 
> -Original Message-
> From: esemba [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 02, 2008 12:41 PM
> To: user@struts.apache.org
> Subject: RE: Struts2 Validations
> 
> 
> 
> Hi,
> I've faced this issue too. Try to migrate to latest Struts 2.0.14.
> 
> 
> Anshuman Nanda wrote:
>>
>> Hi Lukasz
>>
>> I am using the Validation Files and not annotations.
>>
>>
>> Regards
>> Anshuman Nanda
>>
>>
>>
>> -Original Message-
>> From: Lukasz Lenart [mailto:[EMAIL PROTECTED]
>> Sent: Monday, December 01, 2008 2:18 PM
>> To: Struts Users Mailing List
>> Subject: Re: Struts2 Validations
>>
>>
>> Did you created validation files or added annotations?
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> -
>> 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/Struts2-Validations-tp20717889p20787177.html
> 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/Struts2-Validations-tp20717889p20787601.html
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: Struts2 Validations

2008-12-01 Thread esemba

Hi,
I've faced this issue too. Try to migrate to latest Struts 2.0.14.


Anshuman Nanda wrote:
> 
> Hi Lukasz
> 
> I am using the Validation Files and not annotations.
> 
> 
> Regards
> Anshuman Nanda
> 
> 
> 
> -Original Message-
> From: Lukasz Lenart [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 01, 2008 2:18 PM
> To: Struts Users Mailing List
> Subject: Re: Struts2 Validations
> 
> 
> Did you created validation files or added annotations?
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> -
> 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/Struts2-Validations-tp20717889p20787177.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



[S2] dynamic method invocation issue

2008-11-19 Thread esemba

Let's suppose I've this simple action defined in struts.xml:


   /WEB-INF/pages/initializeSuperuserSuccess.jsp
   /WEB-INF/pages/initializeSuperuser.jsp


InitializeSuperuserAction class extends ActionSupport (with defined methods
like execute(), doDefault(), etc).

I want to ask you, what to do, if some struts-aware user requests
InitializeSuperuser_doDefault instead of InitializeSuperuser_execute. They
both by default return "success" , but doDefault can be used to bypass
execute() code. 

If I wanted to use ActionSupport (for handling validation, text providing,
etc), would I have to override doDefault() method to return some other
string in every action?

Or what if I didn't want to use execute method or success result name at
all. User can still call it and get result not defined error. 

I don't like exposing action methods in urls like this, but it's true, that
it can significantly reduce amount of xml definitions in configuration
files.


Thank you for your replies.
-- 
View this message in context: 
http://www.nabble.com/-S2--dynamic-method-invocation-issue-tp20591414p20591414.html
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: Migrating to 2.0.12 General Availability Release

2008-11-13 Thread esemba

seems like bug:
http://www.nabble.com/-s2.0.12-Client-validation-not-working-to20372886.html
https://issues.apache.org/struts/browse/WW-2849
http://www.nabble.com/s%3Adatetimepicker-doesn%27-t-work-after-upgraded-to-struts2.0.12-td20245780.html



Tomi21 wrote:
> 
> Hi everyone,
> 
> I've migrated my web application to the last release 2.0.12 and all things
> that require 'dojo' are not working correctly(datetimepicker, tooltip,
> etc.).
> The error message is "dojo is not defined".
> 
> Does anyone know how can I solve the problem? With version 2.0.11
> everything was working perfectly!!
> 
> Which .jar contains the dojo implementation?
> 
> Thanks in advance for the help.
> 

-- 
View this message in context: 
http://www.nabble.com/Migrating-to-2.0.12-General-Availability-Release-tp20459086p20481667.html
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: [s2.0.12]Client validation not working

2008-11-07 Thread esemba

great, that's sure this issue. Looking forward to 2.0.13.
Thanks.


Nils-Helge Garli wrote:
> 
> It's probably this issue: https://issues.apache.org/struts/browse/WW-2849
> 
> A similar discussion:
> http://www.nabble.com/s%3Adatetimepicker-doesn%27-t-work-after-upgraded-to-struts2.0.12-td20245780.html
> 
> Nils-H
> 
> On Fri, Nov 7, 2008 at 2:01 AM, esemba <[EMAIL PROTECTED]> wrote:
>>
>> I've a problem with struts client validation. When i try to attach
>> javascript
>> validation to my simple form, it seems, that struts doesn't include
>> necessary files js files. validate=true attribute generates this line of
>> html code:
>> > src="/webfrontendWeb/struts/xhtml/validation.js">
>> Problem is, that the link to the javascript file does not seem valid (and
>> js
>> validation of course does not work). When i try to navigate to this url,
>> i
>> get 404.
>> I also tried to switch to 2.0.11.2. Here i get bug similar to this:
>> https://issues.apache.org/struts/browse/WW-2608
>> https://issues.apache.org/struts/browse/WW-2608  - no 404 error, but bug.
>>
>> I have also noticed, that urls generated by s:head tag (dojo.js, ...) are
>> broken, too.
>>
>> Interesting is, that client validation in struts 2 showcase application
>> (bundled with the s2) doesn't work, too.
>> --
>> View this message in context:
>> http://www.nabble.com/-s2.0.12-Client-validation-not-working-tp20372886p20372886.html
>> 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/-s2.0.12-Client-validation-not-working-tp20372886p20378189.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



[s2.0.12]Client validation not working

2008-11-06 Thread esemba

I've a problem with struts client validation. When i try to attach javascript
validation to my simple form, it seems, that struts doesn't include
necessary files js files. validate=true attribute generates this line of
html code: 

Problem is, that the link to the javascript file does not seem valid (and js
validation of course does not work). When i try to navigate to this url, i
get 404.
I also tried to switch to 2.0.11.2. Here i get bug similar to this: 
https://issues.apache.org/struts/browse/WW-2608
https://issues.apache.org/struts/browse/WW-2608  - no 404 error, but bug.

I have also noticed, that urls generated by s:head tag (dojo.js, ...) are
broken, too.

Interesting is, that client validation in struts 2 showcase application
(bundled with the s2) doesn't work, too.
-- 
View this message in context: 
http://www.nabble.com/-s2.0.12-Client-validation-not-working-tp20372886p20372886.html
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: [S2] actions responding only to POST/GET methods

2008-10-28 Thread esemba

Thank you both for replying. It's much clearer now. I just wanted to forbid
GET access to actions. I think it's completely legal request to be able
explicitly deny access to actions like AuthenticateUser (no matter security,
parameters, etc. now). I just don't want anyone to call such the actions
from address bar, etc.. Now, i understand the issue better. In rare cases,
i'll simply get the method and in GET case return ERROR code. Thank you both
again.



hernan gonzalez wrote:
> 
> Don is right.
> No security issue here (and absolutely nothing to do with PHP's
> register_globals).
> I see little use in trying to discriminate between GET and POST in the
> action side,
> at least not in relation with security.
> Of course, you should never use GET when submitting a password, but that's
> a
> privacy concern you (developer) just deal when writing your jsp. An
> hypothetical
> convolved user can always try to go the same url using a GET, passing
> the parameters
> in the query string. But that would be a dumb user rather than a malicious
> one.
> The action could deny the request if it is a GET, but that would be
> little or no gain;
> the harm the user can do (to himself; eg leaving his password in some
> log) has already
> been done.
> 
> Hernán
> 
> 
> On Tue, Oct 28, 2008 at 11:27 AM, Don Brown <[EMAIL PROTECTED]>
> wrote:
>> PHP's register_globals really has nothing to do with GET vs POST but
>> rather with how it could be possible to inject variables into a script
>> to compromise later evaulation.  Since Java doesn't allow such dynamic
>> variables, there is no equivalent.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20215043.html
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: [S2] actions responding only to POST/GET methods

2008-10-28 Thread esemba

Thank you.

I'm surprised, that such the fundamental security issue isn't handled in
struts. When I was learning php, turning the reqister_globals directive off
was strongly recommended. 




Mead Lai wrote:
> 
> url=action?username=admin&password=blah
> you means the GET way is too weakness and wanne avoid to use 'get' method?
> 
> Get the request of context, and test the method, if it's post-method
> handle
> the process, if it's get-method, refuse the connection.
> String method = ServletActionContext.getRequest().getMethod();
> But is awkward way.
> 
> Although servlets has doPost and doGet method, it can't stop the
> GET-Method
> connection at all, so do struts2.
> Any way, "Http" is not safe, 'post' is  a little better than 'get'.
> 
> 
> On Tue, Oct 28, 2008 at 11:25 AM, esemba <[EMAIL PROTECTED]> wrote:
> 
>>
>> Thank you for your reply.
>> Well, yes, but it doesn't answer my question. I'm aware of this, but it
>> specifies only the method the form uses. But when i call the targeted
>> action
>> directly e.g. from browser (and thus use GET method), the action will
>> work
>> as well.
>> Thank you for your suggestions.
>>
>>
>>
>>
>>
>> Mead Lai wrote:
>> >
>> > . How can i write an action, that only serves GET /
>> > POST requests.
>> >
>> > 
>> > or
>> > 
>> >
>> >
>> > On Tue, Oct 28, 2008 at 11:09 AM, esemba <[EMAIL PROTECTED]> wrote:
>> >
>> >>
>> >> I've a simple question. How can i write an action, that only serves
>> GET
>> /
>> >> POST requests. Lets suppose I've an actions that authenticates users.
>> In
>> >> action there are fields username and password, which i set from a form
>> >> via
>> >> post http method. The action works the same as I request URL like
>> >> myAction.action?username=admin&password=blah (the GET way). It is
>> >> definitely
>> >> a security weakness and reminds me php directive register_globals
>> (which
>> >> treats post/get variables the same way and in newer versions is
>> >> deprectated,
>> >> or even not present). Even in servlets there are methods like doPost,
>> >> doGet,
>> >> doXXX, so you can distinguish servlet's behavior for different types
>> of
>> >> requests. I'm pretty sure this has already been solved here, but
>> search
>> >> for
>> >> keywords like "get post method problem" didn't return any reasonable
>> >> threads.
>> >>
>> >> Thank you for your suggestions.
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20200721.html
>> >> Sent from the Struts - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > BestRegards,
>> > Mead
>> > http://yayisoft.com
>> >
>> > Quentin Crisp  - "If at first you don't succeed, failure may be your
>> > style."
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20200834.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> BestRegards,
> Mead
> http://yayisoft.com
> 
> George Carlin  - "The other night I ate at a real nice family restaurant.
> Every table had an argument going."
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20206511.html
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 Factory

2008-10-28 Thread esemba

DI by default doesn't work, because POJOs (S2 actions) are not
container-managed resources. 
You may use JNDI look
Annotate EJB @Stateless(mappedName="ejb/MyEJB") and in client(S2 action):
InitialContext c = new InitialContext();
MyEJBInterface o = (MyEJBInterface) c.lookup("ejb/MyEJB");

I have no experience with googlecode ejb plugin.



Ronaldo Rigoni ... wrote:
> 
> Yes, I need that the container injected the instance of EJB in
> Action automatically. Sorry for my english.
> Tanks.
> Ronaldo
> 
> 
> 2008/10/28 esemba <[EMAIL PROTECTED]>
> 
>>
>> hi,
>> could u be more specific, what is your issue? what do you mean by struts
>> factory? you want to inject EJB into struts 2 action?
>>
>>
>>
>> Ronaldo Rigoni ... wrote:
>> >
>> > Hi all,
>> > Can I create a Struts Factory managed in GlassFish?
>> > Because I have a EJB in my action, and if the bean has created by
>> > container
>> > e EJB injection has automatic.
>> > Regards,
>> > Ronaldo.
>> > --
>> > []'s,
>> > Ronaldo Rigoni
>> > SCJA
>> > Desenvolvedor J2EE
>> > Ministério da Educação -  CESPE
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-Factory-tp20198219p20200806.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> []'s,
> Ronaldo Rigoni
> SCJA
> Desenvolvedor J2EE
> Ministério da Educação -  CESPE
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-Factory-tp20198219p20206359.html
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: [S2] actions responding only to POST/GET methods

2008-10-27 Thread esemba

Thank you for your reply.
Well, yes, but it doesn't answer my question. I'm aware of this, but it
specifies only the method the form uses. But when i call the targeted action
directly e.g. from browser (and thus use GET method), the action will work
as well.
Thank you for your suggestions.





Mead Lai wrote:
> 
> . How can i write an action, that only serves GET /
> POST requests.
> 
> 
> or
> 
> 
> 
> On Tue, Oct 28, 2008 at 11:09 AM, esemba <[EMAIL PROTECTED]> wrote:
> 
>>
>> I've a simple question. How can i write an action, that only serves GET /
>> POST requests. Lets suppose I've an actions that authenticates users. In
>> action there are fields username and password, which i set from a form
>> via
>> post http method. The action works the same as I request URL like
>> myAction.action?username=admin&password=blah (the GET way). It is
>> definitely
>> a security weakness and reminds me php directive register_globals (which
>> treats post/get variables the same way and in newer versions is
>> deprectated,
>> or even not present). Even in servlets there are methods like doPost,
>> doGet,
>> doXXX, so you can distinguish servlet's behavior for different types of
>> requests. I'm pretty sure this has already been solved here, but search
>> for
>> keywords like "get post method problem" didn't return any reasonable
>> threads.
>>
>> Thank you for your suggestions.
>> --
>> View this message in context:
>> http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20200721.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> BestRegards,
> Mead
> http://yayisoft.com
> 
> Quentin Crisp  - "If at first you don't succeed, failure may be your
> style."
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20200834.html
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 Factory

2008-10-27 Thread esemba

hi,
could u be more specific, what is your issue? what do you mean by struts
factory? you want to inject EJB into struts 2 action?



Ronaldo Rigoni ... wrote:
> 
> Hi all,
> Can I create a Struts Factory managed in GlassFish?
> Because I have a EJB in my action, and if the bean has created by
> container
> e EJB injection has automatic.
> Regards,
> Ronaldo.
> -- 
> []'s,
> Ronaldo Rigoni
> SCJA
> Desenvolvedor J2EE
> Ministério da Educação -  CESPE
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-Factory-tp20198219p20200806.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



[S2] actions responding only to POST/GET methods

2008-10-27 Thread esemba

I've a simple question. How can i write an action, that only serves GET /
POST requests. Lets suppose I've an actions that authenticates users. In
action there are fields username and password, which i set from a form via
post http method. The action works the same as I request URL like
myAction.action?username=admin&password=blah (the GET way). It is definitely
a security weakness and reminds me php directive register_globals (which
treats post/get variables the same way and in newer versions is deprectated,
or even not present). Even in servlets there are methods like doPost, doGet,
doXXX, so you can distinguish servlet's behavior for different types of
requests. I'm pretty sure this has already been solved here, but search for
keywords like "get post method problem" didn't return any reasonable
threads. 

Thank you for your suggestions.
-- 
View this message in context: 
http://www.nabble.com/-S2--actions-responding-only-to-POST-GET-methods-tp20200721p20200721.html
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: [S2] URL management

2008-09-16 Thread esemba

Thank you for your reply.

Well, yes, but I just thought, that checking for disabled cookies and
appending jsessionid, is container's job, not mine, so i tried to figure
out, how to accomplish it. But i'm afraid, i'll end up doing it manually.



esemba wrote:
> 
> Hi,
> i'm migrating my old php website to Struts 2 and have problem with url
> management. In my db, i have urls tagged like this
> [url]http://url.com/[/url]. In php, i just do regexp replace of this
> custom url tags with proper html tags. I would need to do something like
> this in struts 2, but want to use . Best solution would be like
> this: In jsp(ognl) replace every occurrence of [url]url string[/url] with 
>  http://www.nabble.com/-S2--URL-management-tp19494989p19522734.html
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: [S2] URL management

2008-09-16 Thread esemba

Thank you for your valuable reply.

Well, in that case my problem is probably unsolvable. Main problem is, that
i don't know how many embedded urls there is going to be in larger text
blocks stored in DB. I could count them, but only on runtime. So, only
solution would be automatically generate s:url tags. I'll have to find out
another solution. Somebody posted me link to  http://tuckey.org/urlrewrite/
http://tuckey.org/urlrewrite/ , so I'll check it tomorrow. Thank you.



Laurie Harper wrote:
> 
> If the URLs you are substituting in are external to the web app, they 
> don't need to be 's2-friendly'; an external site doesn't care about your 
> Struts app's session ID, etc. If the URLs are (or may be) internal to 
> the application, however, you do need to take care of that. In that 
> case, use s:url tags directly, generating the attribute values (as 
> opposed to trying to generate the entire s:url tag).
> 
> You haven't how you're exposing the URLs to the page (are they embeded 
> in larger text blocks? Are they stand-alone text fields in the DB?) but 
> essentially what you'd want is to be able to write something like this 
> in your JSP:
> 
> ...  ...
> 
> where 'myurl' is either a property containing the URL with the PHP tags 
> already stripped, or a method that looks up the URL and does the PHP tag 
> stripping.
> 
> The key point is, you can't build something that generates the s:url 
> tags themselves, you you can build something that generates the input 
> data you need to feed to the s:url tags.
> 
> L.
> 
> esemba wrote:
>> Thank you for your reply.
>> So you think there is now way, how to parse urls out of the text stored
>> in
>> the db and make them s2-friendly (i mean jsessionid rewriting in case of
>> disabled cookies, etc.)?
>> 
>> 
>> 
>> esemba wrote:
>>> Hi,
>>> i'm migrating my old php website to Struts 2 and have problem with url
>>> management. In my db, i have urls tagged like this
>>> [url]http://url.com/[/url]. In php, i just do regexp replace of this
>>> custom
>>> url tags with proper html tags. I would need to do something like this
>>> in
>>> struts 2, but want to use . Best solution would be like this: In
>>> jsp(ognl) replace every occurrence of [url]url string[/url] with 
>>> http://www.nabble.com/-S2--URL-management-tp19494989p19522098.html
Sent from the Struts - User mailing list archive at Nabble.com.


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