Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-05 Thread Narayana S
Hi,

  this is my framework problem, for certain reasons using default
servlet session is disabled, i thought it is struts error. sorry to all.

as session is disabled... can i do the same operation with
request.setAttribute(...) ?
can any one tell me where the values added in session are read and used in
new action, in this code?

On Wed, Nov 5, 2008 at 10:14 PM, Greg Lindholm <[EMAIL PROTECTED]> wrote:

>
> There must have been a change in Struts 2.1.2.
> Here is an update to the after() method that uses the ActionContext session
> map:
>
>protected void after(ActionInvocation invocation, ValidationAware
> validationAware)
>throws Exception
>{
>Result result = invocation.getResult();
>
>if (result instanceof ServletRedirectResult
>|| result instanceof ServletActionRedirectResult)
>{
> Map session = invocation.getInvocationContext().getSession();
>
> Collection actionErrors = validationAware.getActionErrors();
>if (actionErrors != null && actionErrors.size() > 0)
>{
> session.put(ACTION_ERRORS_KEY, actionErrors);
> }
>
>Collection actionMessages = validationAware.getActionMessages();
>if (actionMessages != null && actionMessages.size() > 0)
>{
> session.put(ACTION_MESSAGES_KEY, actionMessages);
> }
>
>Map fieldErrors = validationAware.getFieldErrors();
>if (fieldErrors != null && fieldErrors.size() > 0)
>{
> session.put(FIELD_ERRORS_KEY, fieldErrors);
>}
>}
>}
>
> The full interceptor source can be found here:
>
> http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/
>
>
>
> Mead Lai wrote:
> >
> > "java.lang.UnsupportedOperationException: Don't use default servlet
> > session".
> > Just use the session from ActionContext, don't use the servlet's.
> >
> > protected Map getSession() {
> > return ActionContext.getContext().getSession();//from
> > ActionContext
> > here!
> > }
> >
> > protected HttpServletRequest request(){
> > return ServletActionContext.getRequest();
> > }
> >
> >
> > On Wed, Nov 5, 2008 at 12:05 PM, Narayana S <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Hi,
> >>
> >>   i am using apache Tomcat 6.0.3, struts 2.1.2, and jdk 1.6. can any
> >> one help me solving this issue?
> >>
> >> Thanks in advance.
> >>
> >> On Tue, Nov 4, 2008 at 7:06 PM, Greg Lindholm <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >> >
> >> >
> >> >
> >> > Ganesh123 wrote:
> >> > >
> >> > >  Excellent work. i am looking for the same solution. i tried
> >> > > implementing your interceptor , but  it is throwing exception ...
> >> > >   "java.lang.UnsupportedOperationException: Don't use default
> servlet
> >> > > session".
> >> > >
> >> > > near session.setAttribute(ACTION_MESSAGES_KEY,actionMessages);
> >> > >
> >> > >
> >> >
> >> > Very strange, I've never seen a session where setAttribute() throws an
> >> > UnsupportedOperationException.  (And whats a "default servlet
> >> session"?)
> >> > I can only guess it's something to do with your container environment.
> >> >
> >> > You had better post your configuration information; platform,
> >> container,
> >> > cluster setup? etc. maybe someone on the list can help.
> >> >
> >> > Here are the relevant lines of code from the interceptor.
> >> >
> >> > ActionContext actionContext = invocation.getInvocationContext();
> >> > HttpServletRequest request = (HttpServletRequest)
> >> >  actionContext.get(StrutsStatics.HTTP_REQUEST);
> >> > HttpSession session = request.getSession(false);
> >> > if (session != null)
> >> > {
> >> >  ...
> >> >   Collection actionMessages = validationAware.getActionMessages();
> >> >  if (actionMessages != null && actionMessages.size() > 0)
> >> >  {
> >> > session.setAttribute(ACTION_MESSAGES_KEY, actionMessages);
> >> >  }
> >> >   ...
> >> > }
> >> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-S2--Preserving-messages-across-a-Redirect-in-Struts-2-tp18245061p20343444.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: logic tag question

2008-11-05 Thread Russo, Joe
Thanks for your reply.

 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2008 12:03 PM
To: Struts Users Mailing List
Subject: Re: logic tag question

 

The issue is the bean tag inside the logic tag; that isn't valid JSP.
You'll need to use EL there via the EL tags or JSP 2.0 support,
depending on your container.

Dave


--- On Wed, 11/5/08, Russo, Joe <[EMAIL PROTECTED]> wrote:

> From: Russo, Joe <[EMAIL PROTECTED]>
> Subject: logic tag question
> To: user@struts.apache.org
> Date: Wednesday, November 5, 2008, 11:51 AM
> Hi,
>
> I am trying to use a nested logic tag and I get an error:
> equal symbol
> expected
>
> Any help would be appreciated.
>
> Thanks,
>
> Joe
>
> 
>
> Here is the code:
>
>  property="parentArticleId" value="0">
>
>  property="parentArticleId"
> value=" property="articleMetaId"/>">
>
>  src="../images/icon_merged.png"
> width="13"
> height="13" align="absmiddle">
>
> 
>
> 
>
>
> y

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







RE: logic tag question

2008-11-05 Thread Russo, Joe
Thanks for your reply.

 

 

-Original Message-
From: Kawczynski, David [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2008 11:59 AM
To: Struts Users Mailing List
Subject: RE: logic tag question

 

You can't nest taglibs.
Try using the el tags and using an expression in place of the
Nested bean:write taglib call.

-Original Message-
From: Russo, Joe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2008 11:52 AM
To: user@struts.apache.org
Subject: logic tag question

Hi,

I am trying to use a nested logic tag and I get an error:  equal symbol
expected

Any help would be appreciated.

Thanks,

Joe



Here is the code:



">









Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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







Re: logic tag question

2008-11-05 Thread Dave Newton
The issue is the bean tag inside the logic tag; that isn't valid JSP. You'll 
need to use EL there via the EL tags or JSP 2.0 support, depending on your 
container.

Dave


--- On Wed, 11/5/08, Russo, Joe <[EMAIL PROTECTED]> wrote:

> From: Russo, Joe <[EMAIL PROTECTED]>
> Subject: logic tag question
> To: user@struts.apache.org
> Date: Wednesday, November 5, 2008, 11:51 AM
> Hi,
> 
> I am trying to use a nested logic tag and I get an error: 
> equal symbol
> expected
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Joe
> 
>  
> 
> Here is the code:
> 
>  property="parentArticleId" value="0">
> 
>  property="parentArticleId"
> value=" property="articleMetaId"/>">
> 
>  src="../images/icon_merged.png"
> width="13"
> height="13" align="absmiddle">
> 
> 
> 
> 
> 
> 
> y

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



RE: logic tag question

2008-11-05 Thread Kawczynski, David
You can't nest taglibs.
Try using the el tags and using an expression in place of the 
Nested bean:write taglib call. 

-Original Message-
From: Russo, Joe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2008 11:52 AM
To: user@struts.apache.org
Subject: logic tag question

Hi,

I am trying to use a nested logic tag and I get an error:  equal symbol
expected

Any help would be appreciated.

Thanks,

Joe

 

Here is the code:



">









Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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



Re: Handling Integer overflows

2008-11-05 Thread Lyallex
Perfect solution ... works exactly as required.

Thanks
Lyallex

2008/11/5 Dave Newton <[EMAIL PROTECTED]>:
>
> That would probably need to be handled via a converter, not a validator.
>
> Dave
>
> --- On Wed, 11/5/08, Lyallex <[EMAIL PROTECTED]> wrote:
>
>> From: Lyallex <[EMAIL PROTECTED]>
>> Subject: Handling Integer overflows
>> To: "Struts Users Mailing List" 
>> Date: Wednesday, November 5, 2008, 10:59 AM
>> Hi
>>
>> Please be aware that I understand completely WHY the
>> following is
>> happening (Integer overflow)
>> This question is about how to handle it.
>>
>> I have a form that has an input field
>>
>> 
>>
>> In my action I have the fiollowing field
>>
>> public Integer creditcount;
>>
>> If I enter the String "2147482647" (equivalent to
>> Integer.MAX_VALUE)
>> then this is converted into the Integer 2147482647 as
>> expected.
>>
>> If I enter the String "4294967298" this is
>> converted to the Integer 2
>> (Like I say, I understand why this is happening)
>>
>> What I need to happen is that if the String contains a
>> value that is
>> out of range I don't even want the creditcount field in
>> the action to
>> be set.
>>
>> I have written a custom validator but it appears that the
>> value is set
>> on the action before this gets called.
>>
>> Is there some way I can 'intercept' this String and
>> ignore it (i.e
>> don't even set the action field) if it is going to
>> cause an overflow.
>>
>> Thanks
>> Lyallex
>>
>> -
>> 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]
>
>

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



logic tag question

2008-11-05 Thread Russo, Joe
Hi,

I am trying to use a nested logic tag and I get an error:  equal symbol
expected

Any help would be appreciated.

Thanks,

Joe

 

Here is the code:



">










Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-05 Thread Greg Lindholm

There must have been a change in Struts 2.1.2.
Here is an update to the after() method that uses the ActionContext session
map:

protected void after(ActionInvocation invocation, ValidationAware
validationAware)
throws Exception
{
Result result = invocation.getResult();

if (result instanceof ServletRedirectResult
|| result instanceof ServletActionRedirectResult)
{
Map session = invocation.getInvocationContext().getSession();

Collection actionErrors = validationAware.getActionErrors();
if (actionErrors != null && actionErrors.size() > 0)
{
session.put(ACTION_ERRORS_KEY, actionErrors);
}

Collection actionMessages = validationAware.getActionMessages();
if (actionMessages != null && actionMessages.size() > 0)
{
session.put(ACTION_MESSAGES_KEY, actionMessages);
}

Map fieldErrors = validationAware.getFieldErrors();
if (fieldErrors != null && fieldErrors.size() > 0)
{
session.put(FIELD_ERRORS_KEY, fieldErrors);
}
}
}

The full interceptor source can be found here: 
http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/



Mead Lai wrote:
> 
> "java.lang.UnsupportedOperationException: Don't use default servlet
> session".
> Just use the session from ActionContext, don't use the servlet's.
> 
> protected Map getSession() {
> return ActionContext.getContext().getSession();//from
> ActionContext
> here!
> }
> 
> protected HttpServletRequest request(){
> return ServletActionContext.getRequest();
> }
> 
> 
> On Wed, Nov 5, 2008 at 12:05 PM, Narayana S <[EMAIL PROTECTED]>
> wrote:
> 
>> Hi,
>>
>>   i am using apache Tomcat 6.0.3, struts 2.1.2, and jdk 1.6. can any
>> one help me solving this issue?
>>
>> Thanks in advance.
>>
>> On Tue, Nov 4, 2008 at 7:06 PM, Greg Lindholm <[EMAIL PROTECTED]>
>> wrote:
>>
>> >
>> >
>> >
>> > Ganesh123 wrote:
>> > >
>> > >  Excellent work. i am looking for the same solution. i tried
>> > > implementing your interceptor , but  it is throwing exception ...
>> > >   "java.lang.UnsupportedOperationException: Don't use default servlet
>> > > session".
>> > >
>> > > near session.setAttribute(ACTION_MESSAGES_KEY,actionMessages);
>> > >
>> > >
>> >
>> > Very strange, I've never seen a session where setAttribute() throws an
>> > UnsupportedOperationException.  (And whats a "default servlet
>> session"?)
>> > I can only guess it's something to do with your container environment.
>> >
>> > You had better post your configuration information; platform,
>> container,
>> > cluster setup? etc. maybe someone on the list can help.
>> >
>> > Here are the relevant lines of code from the interceptor.
>> >
>> > ActionContext actionContext = invocation.getInvocationContext();
>> > HttpServletRequest request = (HttpServletRequest)
>> >  actionContext.get(StrutsStatics.HTTP_REQUEST);
>> > HttpSession session = request.getSession(false);
>> > if (session != null)
>> > {
>> >  ...
>> >   Collection actionMessages = validationAware.getActionMessages();
>> >  if (actionMessages != null && actionMessages.size() > 0)
>> >  {
>> > session.setAttribute(ACTION_MESSAGES_KEY, actionMessages);
>> >  }
>> >   ...
>> > }
>> >
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Preserving-messages-across-a-Redirect-in-Struts-2-tp18245061p20343444.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: Handling Integer overflows

2008-11-05 Thread Dave Newton

That would probably need to be handled via a converter, not a validator.

Dave

--- On Wed, 11/5/08, Lyallex <[EMAIL PROTECTED]> wrote:

> From: Lyallex <[EMAIL PROTECTED]>
> Subject: Handling Integer overflows
> To: "Struts Users Mailing List" 
> Date: Wednesday, November 5, 2008, 10:59 AM
> Hi
> 
> Please be aware that I understand completely WHY the
> following is
> happening (Integer overflow)
> This question is about how to handle it.
> 
> I have a form that has an input field
> 
> 
> 
> In my action I have the fiollowing field
> 
> public Integer creditcount;
> 
> If I enter the String "2147482647" (equivalent to
> Integer.MAX_VALUE)
> then this is converted into the Integer 2147482647 as
> expected.
> 
> If I enter the String "4294967298" this is
> converted to the Integer 2
> (Like I say, I understand why this is happening)
> 
> What I need to happen is that if the String contains a
> value that is
> out of range I don't even want the creditcount field in
> the action to
> be set.
> 
> I have written a custom validator but it appears that the
> value is set
> on the action before this gets called.
> 
> Is there some way I can 'intercept' this String and
> ignore it (i.e
> don't even set the action field) if it is going to
> cause an overflow.
> 
> Thanks
> Lyallex
> 
> -
> 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]



Handling Integer overflows

2008-11-05 Thread Lyallex
Hi

Please be aware that I understand completely WHY the following is
happening (Integer overflow)
This question is about how to handle it.

I have a form that has an input field



In my action I have the fiollowing field

public Integer creditcount;

If I enter the String "2147482647" (equivalent to Integer.MAX_VALUE)
then this is converted into the Integer 2147482647 as expected.

If I enter the String "4294967298" this is converted to the Integer 2
(Like I say, I understand why this is happening)

What I need to happen is that if the String contains a value that is
out of range I don't even want the creditcount field in the action to
be set.

I have written a custom validator but it appears that the value is set
on the action before this gets called.

Is there some way I can 'intercept' this String and ignore it (i.e
don't even set the action field) if it is going to cause an overflow.

Thanks
Lyallex

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



Re: using apostrophes in a properties file with

2008-11-05 Thread Dave Newton
--- On Wed, 11/5/08, Nick Maunder wrote:
> can someone tell me quickly how to get an apostrophe to
> appear when using s:text?

Probably not quicker than searching the web would:

http://www.google.com/search?q=java+properties+%2Bapostrophe

You may need to use a double apostrophe, but IIRC it depends on how you're 
retrieving and/or displaying the message, and in what context you're using it 
(like if you're using it as a JavaScript string, etc.)

Dave


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



RE: using apostrophes in a properties file with

2008-11-05 Thread Pep Villar

Hi,
 
you can try
 
general.VettingNextUpdate=You won't be able to bid> From: [EMAIL 
PROTECTED]> To: user@struts.apache.org> Subject: using apostrophes in a 
properties file with > Date: Wed, 5 Nov 2008 14:53:35 +> > Hey guys 
> > > > can someone tell me quickly how to get an apostrophe to appear when 
using> s:text?> > > > Here's a snippet of my properties file:> > > > 
general.VettingNextUpdate=You won\'t be able to bid> > > > as you can see I've 
tried with and without escaping the apostrophe> character. How do I make the 
text appear as:> > > > You won't be able to bid> > > > ?> > > > Cheers> > > > 
Nick Maunder> 
_
¡Este Otoño reta a tus amigos con el nuevo juego de preguntas LiveQuiz!
http://www.vivelive.com/LiveQuiz/

RE: Job Opportunity for Technical Consultants, E-Commerce at Fredhopper (Amsterdam)

2008-11-05 Thread VasilK

Thanks for the suggestion.
Just to clarify as I see there is interest: Fredhopper has product
development centers in Amsterdam and Sofia (and English speaking is
required, no Russian language skills needed).



mgainty wrote:
> 
> 
> I talked with the owner about 1 year ago
> His main development centre is based in Bulgaria and he's looking for
> (Russian speaking) developers only..
> 
> I agree with Musachy but would like to find another avenue (website/blog)
> for the owner to post this requirement
> 
> 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: Fri, 31 Oct 2008 09:51:07 -0400
>> From: [EMAIL PROTECTED]
>> To: user@struts.apache.org
>> Subject: Re: Job Opportunity for Technical Consultants, E-Commerce at
>> Fredhopper (Amsterdam)
>> 
>> I don't think this is the place for this kind of emails.
>> 
>> musachy
>> 
>> On Fri, Oct 31, 2008 at 7:04 AM, VasilK
>> <[EMAIL PROTECTED]>wrote:
>> 
>> >
>> > TOP SEARCH & MERCHADISING SOFTWARE COMPANY SEEKS TALENTED
>> > TECHNICAL CONSULTANTS WITH INTERESTS IN E-COMMERCE
>> >
>> > Company: Fredhopper, Location: Amsterdam, Position: Full-time
>> >
>> > Are you a pragmatic self-starter? Do you have a talent for quickly
>> reducing
>> > complex questions to simple solutions? Are you passionate about making
>> > great
>> > ideas reality? Do you thrive within a fast-paced, success-driven, very
>> > international environment?
>> >
>> > Fredhopper is looking to expand its product services team with
>> e-commerce
>> > technical consultants. The product services team is responsible for the
>> > full
>> > client cycle from pre-sales workshops to software implementations,
>> customer
>> > support and follow-up assignments. The team often works in co-operation
>> > with
>> > system integrators all across Europe. As an e-commerce technical
>> consultant
>> > you play a crucial role in the implementation of Fredhopper software
>> for
>> > clients. Being a team player, you will work in close co-operation with
>> > clients, Fredhopper product developers and merchandising consultants.
>> >
>> > Fredhopper is the № 1 provider of Search & Merchandising solutions for
>> > online business in Europe and behind the scenes of many of the largest
>> > online businesses. Customers include many leading international
>> companies
>> > such as Philips Electronics, Karstadt-Quelle, Otto, Conrad, Kingfisher,
>> > Littlewoods-Shopdirect, Thomas Cook, and Woolworths. Fredhopper has
>> offices
>> > in Amsterdam, London, Sofia, Paris and Munich.
>> >
>> > The nature of the issues we're working on requires a product services
>> team
>> > that yields both excellent analytical and communication skills. We
>> > prioritise talent over experience.
>> >
>> > Qualifications
>> >
>> >  University Master's degree in Computer Science or equivalent (last
>> year
>> > students will also be considered)
>> >  Excellent communication skills both written and verbal
>> >  Scripting skills; Java knowledge is a plus
>> >  Good understanding of website technology such as JSP, .NET, AJAX
>> >  Fluent in English
>> >  Self starter with strong drive who mobilises people and gets things
>> done
>> >  Affinity with e-commerce, experience in creating e-commerce sites is
>> a
>> > plus
>> >
>> > Applications
>> >
>> > Interested? Then send your CV to [EMAIL PROTECTED], or contact
>> > Vasil
>> > Kokareshkov at +31 20 5300 100. www.fredhopper.com
>> >
>> > We are looking to fill positions immediately, therefore apply today!
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Job-Opportunity-for-Technical-Consultants%2C-E-Commerce-at-Fredhopper-%28Amsterdam%29-tp20263780p20263780.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]
>> >
>> >
>> 
>> 
>> -- 
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> _
> Stay organized with simple drag and drop from Windows Live Hotmail.
> http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008
> 

-- 
View this message in context: 
http://www.nabble.com/Job-Opportunity-for-Technical-Consultants%2C-E-Commerce-at-Fredhopper-%28Amsterdam%29-tp20263780p20343181.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Re: using apostrophes in a properties file with

2008-11-05 Thread Sébastien Domergue

Hi,
in fact, in a property file you just have to double your apostrophe. For 
example :


general.VettingNextUpdate=You won''t be able to bid


Regards

Sébastien

Nick Maunder | Oathouse a écrit :
Hey guys 

 


can someone tell me quickly how to get an apostrophe to appear when using
s:text?

 


Here's a snippet of my properties file:

 


general.VettingNextUpdate=You won\'t be able to bid

 


as you can see I've tried with and without escaping the apostrophe
character.  How do I make the text appear as:

 


You won't be able to bid

 


?

 


Cheers

 


Nick Maunder


  


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

using apostrophes in a properties file with

2008-11-05 Thread Nick Maunder | Oathouse
Hey guys 

 

can someone tell me quickly how to get an apostrophe to appear when using
s:text?

 

Here's a snippet of my properties file:

 

general.VettingNextUpdate=You won\'t be able to bid

 

as you can see I've tried with and without escaping the apostrophe
character.  How do I make the text appear as:

 

You won't be able to bid

 

?

 

Cheers

 

Nick Maunder



Re: Struts Download Action - renaming download file

2008-11-05 Thread Nils-Helge Garli Hegvik
I'm not sure if this is the same "DownloadAction" as you are thinking
of, but I found this resource about setting the Content Disposition:

http://wiki.apache.org/struts/StrutsFileDownload#head-54368bb2778429bd6d32b4ea42b2a15ca111f19a

Nils-H

On Wed, Nov 5, 2008 at 12:13 PM, Antonio <[EMAIL PROTECTED]> wrote:
> 2008/11/5 Nils-Helge Garli Hegvik <[EMAIL PROTECTED]>:
>> Make sure you set the correct Content Disposition.
>
> That's the problem: it seems that there is no way to set the content
> disposition in the StreamInfo, or maybe I cannot see where it can be
> done.
> The StreamInfo interface provides only info about the content type and
> the input stream.
>
> Antonio
>
> -
> 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]



Re: Struts Download Action - renaming download file

2008-11-05 Thread Antonio
2008/11/5 Nils-Helge Garli Hegvik <[EMAIL PROTECTED]>:
> Make sure you set the correct Content Disposition.

That's the problem: it seems that there is no way to set the content
disposition in the StreamInfo, or maybe I cannot see where it can be
done.
The StreamInfo interface provides only info about the content type and
the input stream.

Antonio

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



Re: Struts Download Action - renaming download file

2008-11-05 Thread Nils-Helge Garli Hegvik
Make sure you set the correct Content Disposition.

Nils-H

On Wed, Nov 5, 2008 at 11:55 AM, Daniele Development-ML
<[EMAIL PROTECTED]> wrote:
> Hello everybody,
> I have implemented a DownloadAction to control the access and to download
> some files in my web application. The problem I am having is that when I try
> to download any of those file, operation which is done through the above
> action, I get as download file name the name of the action (e.g.
> downloadJar.do) instead of the file name.
>
> I have searched for documentation / examples on how to overcome this but I
> couldn't find anything. Perhaps it is not strictly related to Struts (I
> sometimes come across PHP websites with the same problem), however I thought
> it was worth asking the mailing list - even for other future references.
>
> Any help / suggestion is highly appreciated.
>
> Thanks!
>
> Dan
>

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



Struts Download Action - renaming download file

2008-11-05 Thread Daniele Development-ML
Hello everybody,
I have implemented a DownloadAction to control the access and to download
some files in my web application. The problem I am having is that when I try
to download any of those file, operation which is done through the above
action, I get as download file name the name of the action (e.g.
downloadJar.do) instead of the file name.

I have searched for documentation / examples on how to overcome this but I
couldn't find anything. Perhaps it is not strictly related to Struts (I
sometimes come across PHP websites with the same problem), however I thought
it was worth asking the mailing list - even for other future references.

Any help / suggestion is highly appreciated.

Thanks!

Dan


[S2] ParentPackage does not properly configure the interceptor stack

2008-11-05 Thread Leonard Broman
I'm using struts 2.0.11.2 with codebehind. I have defined three
different abstract packages to be able to select the interceptor stack
for different actions. I configure the action using the @ParentPackage
annotation selecting different packages. This, however, does not work.
It seems that the package used is always the first one declared in
struts.xml and the struts.codebehind.defaultPackage is not used. I
have not been able to properly reproduce this so I can't claim it to
be a bug. Does anyone have similar experiences?

Best regards!

Leonard

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