Re: Problem with figuring out Convention Plugin

2010-07-05 Thread RogerV

Top of my head ... you either do not have a getMessage() method in your
action, or you do, but the value is blank/null.

Post your action code.

Regards
-- 
View this message in context: 
http://old.nabble.com/Problem-with-figuring-out-Convention-Plugin-tp29058926p29073975.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Weird problem with struts tags

2010-07-05 Thread John Dowson
Thanks Greg (and Ken).  I appreciate the comments and will get around to 
updating this code at some point. However I believe these errors to be a 
symptom of a deeper problem as this code WAS - and still is on some servers - 
working. I am also getting other strange errors in code which was previously 
working (such as hibernate PropertyAccessException). I can check out older 
released versions of the app and they still work on the production and 
integration servers but I get these errors (and more) on my development 
machine. I am therefore trying to find out what has changed to produce these 
errors, and why they are only produced in certain environments.

The same versions of OGNL (ognl-2.6.11.jar) is being used in both environments. 
As I said, the exact same war file dropped into works on one server but not on 
another. Further more, it used to work in the environments in which it is now 
broken. There has also been no java/tomcat/etc updates (that I am aware of)  
that could have caused this. I am completely flummoxed by this!
Any further help much appreciated.


On 2 Jul 2010, at 19:46, Greg Lindholm wrote:

 Your basic problem is that having both getEmployee() and isEmployee()
 is a violation of the JavaBeans standard so you are asking for
 trouble. The Employee property is not a boolean so you really should
 rename isEmployee() to something else (maybe isTypeEmployee()).  If
 you can't do this then you shouldn't use the OGNL dot style syntax,
 instead use explicit java method call style naming like Ken suggested.
 
 WRT the upper vs lower case 'E': The correct use is lowercase 'e'.  I
 have heard reports that different versions of OGNL are tolerant of
 different cases but you may be causing it to do extra work and slowing
 down the evaluation of the expression.  Better to just stick with the
 expected leading lowercase letter.
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



@result dosenot have value

2010-07-05 Thread Alireza Fattahi
Hi,

I am using @Result but it does not have the value filed !! it only has 
location,name,type and tiles.
I am using struts 2.1.8

So below does not work:
@Action(value = /register, interceptorRefs = { @InterceptorRef(value = 
i18nStack)  }, 

results = { @Result( value=register.jsp,location = register, 
name = input, type = tiles ) })

 

~Regards,
~~Alireza Fattahi



  

How to prevent direct access to JSP

2010-07-05 Thread Kushan Jayathilake
Hi Guys,

Can anyone suggest me how to prevent an user entering a direct URL for the
JSP instead of action,

ie : *search.jsp* instead of *search.action*

I want to control this, so the users must enter an URL ends with
*.action*and i also wants to control access some pages by typing its
action name
also,
like it shouldn't be allowed to go anyother page directly, instead users
must go through the buttons and links appears on the home page

ie: if anyone want to go to *summary.action* he must first go to the *
search.action* first.

Hope im clear enough.. :) can anyone suggest me how to do this?

-- 
Regards
Kushan Jayathilake


Re: How to prevent direct access to JSP

2010-07-05 Thread Miguel
Hello,
if you want to prevent direct access to your .jsp's, you need to put
them inside the WEB-INF/classes directory. That one is a question that
popup in the list from time to time.
But if you want your users to go throu the links at the home, you have
to implement some trickery, in the form of some parameter that if not
present will redirect the user to the home, or some trickery to
redirect the user to the home if there is no session or something in
the line. I'ts difficult to do that, and almost for sure isn't worth
the hassle to do it.
Regards,


Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco Sobrino



On Mon, Jul 5, 2010 at 23:53, Kushan Jayathilake kusha...@gmail.com wrote:
 Hi Guys,

 Can anyone suggest me how to prevent an user entering a direct URL for the
 JSP instead of action,

 ie : *search.jsp* instead of *search.action*

 I want to control this, so the users must enter an URL ends with
 *.action*and i also wants to control access some pages by typing its
 action name
 also,
 like it shouldn't be allowed to go anyother page directly, instead users
 must go through the buttons and links appears on the home page

 ie: if anyone want to go to *summary.action* he must first go to the *
 search.action* first.

 Hope im clear enough.. :) can anyone suggest me how to do this?

 --
 Regards
 Kushan Jayathilake


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to prevent direct access to JSP

2010-07-05 Thread Kushan Jayathilake
Sorry just remove *url-patternsummary/url-pattern* there. thats all :)

On Tue, Jul 6, 2010 at 11:02 AM, Kushan Jayathilake kusha...@gmail.comwrote:

 Hi Miguel ,

 I have found out the way to restrict accesses to JSP files, with this you
 can have your JSP files anywhere, just add following fragment to 
 *web.xml*file.

 security-constraint
 web-resource-collection
 web-resource-nameDeny Direct Access/web-resource-name
 description/description
 url-pattern*.jsp/url-pattern
 url-patternsummary/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameDenied/role-name
 /auth-constraint
 /security-constraint

 security-role
 role-nameDenied/role-name
 /security-role

 But still couldnt find a way to stop users accessing other inside pages,
 like if you want to go to the *summary.action* file then you must go the *
 search.action* first, then follow a link there.

 --
 Regards
 Kushan Jayathilake



 On Tue, Jul 6, 2010 at 10:33 AM, Miguel miguel...@gmail.com wrote:

 Hello,
 if you want to prevent direct access to your .jsp's, you need to put
 them inside the WEB-INF/classes directory. That one is a question that
 popup in the list from time to time.
 But if you want your users to go throu the links at the home, you have
 to implement some trickery, in the form of some parameter that if not
 present will redirect the user to the home, or some trickery to
 redirect the user to the home if there is no session or something in
 the line. I'ts difficult to do that, and almost for sure isn't worth
 the hassle to do it.
 Regards,


 Si quieres ser más positivo, pierde un electrón
 Miguel Ruiz Velasco Sobrino



 On Mon, Jul 5, 2010 at 23:53, Kushan Jayathilake kusha...@gmail.com
 wrote:
  Hi Guys,
 
  Can anyone suggest me how to prevent an user entering a direct URL for
 the
  JSP instead of action,
 
  ie : *search.jsp* instead of *search.action*
 
  I want to control this, so the users must enter an URL ends with
  *.action*and i also wants to control access some pages by typing its
  action name
  also,
  like it shouldn't be allowed to go anyother page directly, instead users
  must go through the buttons and links appears on the home page
 
  ie: if anyone want to go to *summary.action* he must first go to the *
  search.action* first.
 
  Hope im clear enough.. :) can anyone suggest me how to do this?
 
  --
  Regards
  Kushan Jayathilake
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org









-- 
Regards
Kushan Jayathilake


Re: How to prevent direct access to JSP

2010-07-05 Thread Kushan Jayathilake
Hi Miguel ,

I have found out the way to restrict accesses to JSP files, with this you
can have your JSP files anywhere, just add following fragment to *web.xml*file.

security-constraint
web-resource-collection
web-resource-nameDeny Direct Access/web-resource-name
description/description
url-pattern*.jsp/url-pattern
url-patternsummary/url-pattern
/web-resource-collection
auth-constraint
role-nameDenied/role-name
/auth-constraint
/security-constraint

security-role
role-nameDenied/role-name
/security-role

But still couldnt find a way to stop users accessing other inside pages,
like if you want to go to the *summary.action* file then you must go the *
search.action* first, then follow a link there.

-- 
Regards
Kushan Jayathilake


On Tue, Jul 6, 2010 at 10:33 AM, Miguel miguel...@gmail.com wrote:

 Hello,
 if you want to prevent direct access to your .jsp's, you need to put
 them inside the WEB-INF/classes directory. That one is a question that
 popup in the list from time to time.
 But if you want your users to go throu the links at the home, you have
 to implement some trickery, in the form of some parameter that if not
 present will redirect the user to the home, or some trickery to
 redirect the user to the home if there is no session or something in
 the line. I'ts difficult to do that, and almost for sure isn't worth
 the hassle to do it.
 Regards,


 Si quieres ser más positivo, pierde un electrón
 Miguel Ruiz Velasco Sobrino



 On Mon, Jul 5, 2010 at 23:53, Kushan Jayathilake kusha...@gmail.com
 wrote:
  Hi Guys,
 
  Can anyone suggest me how to prevent an user entering a direct URL for
 the
  JSP instead of action,
 
  ie : *search.jsp* instead of *search.action*
 
  I want to control this, so the users must enter an URL ends with
  *.action*and i also wants to control access some pages by typing its
  action name
  also,
  like it shouldn't be allowed to go anyother page directly, instead users
  must go through the buttons and links appears on the home page
 
  ie: if anyone want to go to *summary.action* he must first go to the *
  search.action* first.
 
  Hope im clear enough.. :) can anyone suggest me how to do this?
 
  --
  Regards
  Kushan Jayathilake
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org