Re: Struts 2.1.8: Do we need to escape messages?

2009-10-17 Thread Alex Siman

These tags are:


 

I have written about it in this thread already. Please, read this message:
http://www.nabble.com/Re%3A-Struts-2.1.8%3A-Do-we-need-to-escape-messages--p25927098.html

dcabasson wrote:
> 
> What code are you using to output this message? Is it a s:text? a 
> s:property?
> 
> Denis.
> 
> Alex Siman a écrit :
>> I just have found that Struts 2.1.8 escapes messages, so instead of
>> message
>> (in browser) like:
>> User with email u...@example.com registered successfully.
>>
>> now I get this one:
>> User with email u...@example.com registered
>> successfully.
>>
>> In first example I used to escape only the inserted parameter "email".
>> I am not against automatic escaping of messages. It's good for security.
>> But
>> I am wonder, how to use expected HTML markup into messages? Maybe you
>> have
>> any another design solution?
>>
>> P.S. The downside of upgrades.
>>   
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1.8%3A-Do-we-need-to-escape-messages--tp25922882p25937213.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: Struts 2.1.8 and Tiles

2009-10-17 Thread Denis Cabasson

Make sure to use the tiles plugin as described in :
http://struts.apache.org/2.1.8/docs/tiles-plugin.html

I am using it, and have no issue so far with it. Your error seems to be 
in the result you are redirecting to. How is your action tied up?


Denis.

Sommers, Elizabeth a écrit :

Is it possible to use 2.1.8 with tiles.  I have tried everything I can
think of.  Currently I am getting an error from
org/apache/tiles/impl/BasicTilesContainer.java 

It says that 


org.apache.tiles.definition.NoSuchDefinitionException:
/tiles/layout/default.jsp

 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav

a:578)
 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav

a:246)
And then the rest of the stack.

If 2.1.8 doesn't work with Tiles, what is the newest version that does?

Thanks

Elizabeth Sommers
Build and Release Engineer
Pragmatics, Inc.
703.761.4033

www.pragmatics.com 


Practical. Reliable. Secure.

This e-mail message, including any attachments, is intended only for the
identified recipient(s). It may contain proprietary or otherwise legally
protected information of Pragmatics, Inc. Any unauthorized review, use,
copying, disclosure or distribution is strictly prohibited. If you have
received this communication in error and are not the intended recipient,
please immediately notify the sender of this message by reply e-mail and
delete or otherwise destroy the e-mail, attachments, and any copies.

 


-
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



Re: Struts2 on Websphere 6.1 : 404 errors

2009-10-17 Thread Denis Cabasson
I concur. We are using struts 2.1.8 with WAS 6.1.0.27 and there is no 
way around this variable. It is documented in our installation 
procedure, and you will never get any filter based framework to work 
unless you set this variable.


The default Websphere behaviour (without this variable that is) seems to 
first check for the target URL existence, before processing the filters. 
Or with Struts 2, there is no such target (as the filter answer the 
request).


So yes, you have to use this variable.

Denis.

Struts Two a écrit :

Yes, it is. If you plan to turn on container security, you need another flag as 
well.



--- On Fri, 10/16/09, Raghuveer.V  wrote:

  

From: Raghuveer.V 
Subject: Struts2 on Websphere 6.1 : 404 errors
To: user@struts.apache.org
Received: Friday, October 16, 2009, 1:03 PM
Hi Struts2 Users,
I have problem when deploying application struts2.1.6
application on
Websphere6.1 which was succefully working on
apache-tomcat-5.5.23.
We have used configuration option to make it work as per
information
available in Websphere forums and Struts2 forums on my
local websphere.
 
Could you suggest is this the ONLY possible solution to

make struts2 work on
Websphere?.
 
 
Initially we have received 404 errors.

Servlet filter is not called for URL resources on WAS 6.1 ,
configuration
option has been set in server 
 


The webcontainer custom property
com.ibm.ws.webcontainer.invokefilterscompatibility
was  set to true as per
below links.

com.ibm.ws.webcontainer.invokefilterscompatibility=true

Application Servers ->  -> Web
Container Settings -> Web Container
-> Custom Properties

 

 

Goggle Refrence: 

 


struts2 +websphere +There is no Action mapped for namespace
/ and action
name

com.ibm.ws.webcontainer.invokefilterscompatibility+struts2+websphere

 


http://www.ibm.com/developerworks/forums/thread.jspa?threadID=264848

http://www-01.ibm.com/support/docview.wss?rs=180

&uid=swg1PK27620

http://www.mail-archive.com/user@struts.apache.org/msg88798.html

http://www.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-td18761735.html

 

 

 


Regards,
Raghu

 







  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php

-
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



Re: execute() not getting executed

2009-10-17 Thread Denis Cabasson
No out of the box way of dealing with that. You can send your jsp code / 
Action code to see if we can figure out what is wrong.


Denis.

james billa a écrit :

Hi - I am using struts 2.1.6. From my jsp on submitting the form, the
control goes to my action class, methods prepare() and validate() gets
executed. But after that the execute() is not getting called. I don't have
any error messages printed on my console. I have only system.out in
prepare() and validate(). Can anyone think of any reason why it would happen
or any way to debug this? Thanks.

JB

  



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



Re: Struts 2.1.8: Do we need to escape messages?

2009-10-17 Thread Denis Cabasson
What code are you using to output this message? Is it a s:text? a 
s:property?


Alex Siman a écrit :

I just have found that Struts 2.1.8 escapes messages, so instead of message
(in browser) like:
User with email u...@example.com registered successfully.

now I get this one:
User with email u...@example.com registered
successfully.

In first example I used to escape only the inserted parameter "email".
I am not against automatic escaping of messages. It's good for security. But
I am wonder, how to use expected HTML markup into messages? Maybe you have
any another design solution?

P.S. The downside of upgrades.
  



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



RE: Struts 2.1.8 and Tiles

2009-10-17 Thread Martin Gainty

i *think* she wants to use the new tiles2.2.x features
i requested a specific usecase but havent heard back

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 16 Oct 2009 23:28:53 -0400
> From: catherine.cabas...@gmail.com
> To: user@struts.apache.org
> Subject: Re: Struts 2.1.8 and Tiles
> 
> Make sure to use the tiles plugin as described in :
> http://struts.apache.org/2.1.8/docs/tiles-plugin.html
> 
> I am using it, and have no issue so far with it. Your error seems to be 
> in the result you are redirecting to. How is your action tied up?
> 
> Denis.
> 
> Sommers, Elizabeth a écrit :
> > Is it possible to use 2.1.8 with tiles.  I have tried everything I can
> > think of.  Currently I am getting an error from
> > org/apache/tiles/impl/BasicTilesContainer.java 
> >
> > It says that 
> >
> > org.apache.tiles.definition.NoSuchDefinitionException:
> > /tiles/layout/default.jsp
> >
> >  
> > org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav
> > a:578)
> >  
> > org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav
> > a:246)
> > And then the rest of the stack.
> >
> > If 2.1.8 doesn't work with Tiles, what is the newest version that does?
> >
> > Thanks
> >
> > Elizabeth Sommers
> > Build and Release Engineer
> > Pragmatics, Inc.
> > 703.761.4033
> >
> > www.pragmatics.com 
> >
> > Practical. Reliable. Secure.
> >
> > This e-mail message, including any attachments, is intended only for the
> > identified recipient(s). It may contain proprietary or otherwise legally
> > protected information of Pragmatics, Inc. Any unauthorized review, use,
> > copying, disclosure or distribution is strictly prohibited. If you have
> > received this communication in error and are not the intended recipient,
> > please immediately notify the sender of this message by reply e-mail and
> > delete or otherwise destroy the e-mail, attachments, and any copies.
> >
> >  
> >
> > -
> > 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
> 
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/171222985/direct/01/

Re: Redirecting from mapping error exceptions

2009-10-17 Thread Ignacio de Córdoba

Hello,
2 years now from your question I wonder if you solved this. I'd like to do
exactly the same thing... redirecting any non existing action or error from
the user when entering the actin URL to the home page. (I mean, any 404
error)

At first I thought about using httpd error handling for this, but struts2
standard mapping now maps "everything" to the struts2 filter, even static
content, so now I get the "There is no Action..." error for any non existing
URL in my site. I guess that means Struts has to handle it or to change the
configuration and make struts2 handle only .action calls (which is complex
as there are a lot of .js, images, etc. now in struts jars which would have
to be uncompressed)


meeboo wrote:
> 
> Hey all
> 
> I have the following lines in Struts.xml
> 
> 
>   /index
> 
> 
>   
> 
> 
> But it won't catch exceptions where the user has typed in an unmapped
> address, all I get is
> There is no Action mapped for namespace / and action name xxx (with status
> report 500)
> 
> Can I somehow redirect all these exceptions to my index page?
> 
> Thanks!
> 

-- 
View this message in context: 
http://www.nabble.com/Redirecting-from-mapping-error-exceptions-tp10638948p25939426.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



Redirect Action and wildcard methods

2009-10-17 Thread jake
Hi,

I have the following actions set up:

   
 /WEB-INF/jsp/pages/PostCategory.jsp
 /WEB-INF/jsp/pages/PostTopic.jsp
 displayCategory
   
   
   
 /WEB-INF/jsp/pages/DisplayCategory.jsp
 /WEB-INF/jsp/pages/Topic.jsp
   

In my post action I return "display" which should redirect to the action 
"displayCategory" which, by the way I have the display action set up should 
call the "Category" method in the DisplayAction class, but it doesn't. It calls 
the execute method.

I have tried setting up the redirectAction up in a coupld of ways, firstly as 
show above, but also using
display
Category
using this method I get a java.lang.NoSuchMethodException: 
com.mypack.DisplayAction.!Category() the method *does* exist as I can browse to 
displayCategory and the behaviour is correct - is the .! part of the problem 
here?

and also displayCategory does the same as the 
more complete action detailed above.

Can anyone provide any insight as to why it isn't working as I expect?

Cheers,
Jake aka _LisWork

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



Re: Redirect Action and wildcard methods

2009-10-17 Thread Tommy Pham




From: "j...@researchtogether.com" 
To: user@struts.apache.org
Sent: Sat, October 17, 2009 10:12:45 AM
Subject: Redirect Action and wildcard methods

Hi,

I have the following actions set up:

   
 /WEB-INF/jsp/pages/PostCategory.jsp
 /WEB-INF/jsp/pages/PostTopic.jsp
 displayCategory
   
  
   
 /WEB-INF/jsp/pages/DisplayCategory.jsp
 /WEB-INF/jsp/pages/Topic.jsp
   

In my post action I return "display" which should redirect to the action 
"displayCategory" which, by the way I have the display action set up should 
call the "Category" method in the DisplayAction class, but it doesn't. It calls 
the execute method.

Tommy>>  I remember correctly from my reading, you need to return "category".  
Have you gone through the bootstrap guide/tutorial?

I have tried setting up the redirectAction up in a coupld of ways, firstly as 
show above, but also using
display
Category
using this method I get a java.lang.NoSuchMethodException: 
com.mypack.DisplayAction.!Category() the method *does* exist as I can browse to 
displayCategory and the behaviour is correct - is the .! part of the problem 
here?

and also displayCategory does the same as the 
more complete action detailed above.

Can anyone provide any insight as to why it isn't working as I expect?

Cheers,
Jake aka _LisWork

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

Re: struts2.1.8 generator tag problem

2009-10-17 Thread Dale Newfield

shenxiaojing wrote:

http://struts.apache.org/2.1.8/docs/generator.html
Example Three doesn't work!!!


Unless I'm mistaken the documentation (in this case in the code 
comments) is not correct.  It doesn't put it in the PageContext, it puts 
it into the context that's a part of the OGNL ValueStack.


So (I'm guessing, I haven't tested any of this) if you set var="blah" 
you should be able to use it via value="#blah">... or in a scriptlet from just the 
pageContext via 
((ValueStack)(((HttpServletRequest)pageContext.getRequest()).getAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY))).getContext().get("blah")


If you want to promote something from the ognl context to the 
pageContext, look at the s:set tag, with scope="page".


-Dale

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