RE: JAAS struts 2 Tutorial?

2007-09-23 Thread Fowler, Perryn

Better a late replay than none at all :)

> Is JAAS the best way to go, or there are better alternates?  

'JAAS' encompasses a lot of stuff, so it depends what you are trying to
do...

Let me assume for the minute that you are talking about
login/authentication...

In this case, it depends whether you need your user to be authenticated
to your J2EE container or not. (If for example you want to control
authorisation to any EJBs that you call via their deployment descriptor,
then you will need to be authenticated to the container )

JAAS will give you this, but unfortunately will require you to write a
server specific LoginModule for every server you need to support.


If, however, you don't need this, then something like Acegi
(http://www.acegisecurity.org/) will give you
a more portable solution

cheers
Perryn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Muhammad Momin
Rashid
Sent: Wednesday, 12 September 2007 7:32 PM
To: user@struts.apache.org
Subject: JAAS struts 2 Tutorial?

Hello Everyone,

I am looking for a tutorial for integrating JAAS into my Struts 2 + 
Hibernate Application.  Can anyone point me to the right resources?

Is JAAS the best way to go, or there are better alternates?  If anyone 
thinks there are better alternates, can you provide me with the links to

relevant tutorials?

Regards,
Muhammad Momin Rashid.


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




"This e-mail and any attachments to it (the "Communication") is, unless 
otherwise stated, confidential,  may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Australia and New Zealand Banking 
Group Limited ABN 11 005 357 522, or any of its related entities including ANZ 
National Bank Limited (together "ANZ"). ANZ does not accept liability in 
connection with the integrity of or errors in the Communication, computer 
virus, data corruption, interference or delay arising from or in respect of the 
Communication."

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



Re: Newbie question about parameters for an Action

2007-09-23 Thread Oleg Mikheev

Phil404 wrote:

I don't think this is the problem since if I view source the generate code
says:

<--img
src='/surveytortoise-main/piechart.action?visual=10&auditory=15&kinesthetic=20'
/>

So, the code seems to be correct.  Why are these parameters not being set by
Struts2?  Please help!


Does any action in your app gets parameters set?
The link above should definitely call setters on action class
unless something is screwed up in struts.xml or Struts2 build.
Make sure the defaults are being used in struts.xml

and defaultStack is present in action interceptors.


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



Re: Newbie question about parameters for an Action

2007-09-23 Thread Phil404

I don't think this is the problem since if I view source the generate code
says:

<--img
src='/surveytortoise-main/piechart.action?visual=10&auditory=15&kinesthetic=20'
/>

So, the code seems to be correct.  Why are these parameters not being set by
Struts2?  Please help!

Phil


mihel wrote:
> 
> Phil404 wrote:
>> I presume you mean org.apache.struts2.servlet.ParameterAware.  If I
>> implement
>> setParameters(), it is not called before the execute() method.  I'm still
>> in
>> the dark.  I feel like I'm missing something really simple.
> 
> Try this:
> http://www.nabble.com/-S2--Using-%3Cs:url%3E-t3884129.html
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-question-about-parameters-for-an-Action-tf4506130.html#a12854227
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: Newbie question about parameters for an Action

2007-09-23 Thread Oleg Mikheev

Phil404 wrote:

I presume you mean org.apache.struts2.servlet.ParameterAware.  If I implement
setParameters(), it is not called before the execute() method.  I'm still in
the dark.  I feel like I'm missing something really simple.


Try this:
http://www.nabble.com/-S2--Using-%3Cs:url%3E-t3884129.html


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



Re: setting the s:select label font-style

2007-09-23 Thread Oleg Mikheev

Session A Mwamufiya wrote:

Any pointers as to which template file I should be modifying?


Get Firebug and see what exactly makes it being italic.


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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-09-23 Thread Don Brown
Oh damn, why is that?  Cache is critical here.

Don

On 9/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
> When a file is loaded using dojo.require, it is not cached by the browser.
>
> musachy
>
> On 9/23/07, Jason Wyatt <[EMAIL PROTECTED]> wrote:
> > Hi Martin,
> >
> > Yes, that's right.
> >
> > The dojo "requires" seemed unexpectedly slow during our tests. I was using
> > Firefox's Firebug to check page load times. From memory, it looked like the
> > dojo includes were being requested sequentially and seemed to give
> > substantial page loading overhead (>2s) even if the dojo .js files were
> > cached.
> >
> > I never fully understood why there was a large overhead although the dojo
> > files were supposedly cached. It might have been a quirk with firebug and
> > dojo "requires", or maybe the "requires" routine itself is slow, when called
> > 30+ times.
> >
> > About 5 dojo files were consistently returning "not found" as well, which
> > may not have helped the load times.
> >
> > Removing as much dojo stuff as I could, and upgrading from Struts 2.0.8 to
> > 2.0.9 has solved our page load time issues.
> >
> > Regards
> > Jason
> >
> >
> > -Original Message-
> > From: Martin Gainty [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 21 September 2007 11:41 AM
> > To: Struts Users Mailing List
> > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
> >
> > Hi Jason-
> >
> > so by attentuating dojo includes you decreased initial load time for dojo
> > with the beneficial side effect of faster response to the browser?
> >
> > Thanks/
> > Martin--
> > - Original Message -
> > From: "Jason Wyatt" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" 
> > Sent: Thursday, September 20, 2007 9:09 PM
> > Subject: RE: [s2] Struts head tag KILLS (> 10s) page load time
> >
> >
> > >I had the same issue... We use the ajax tabbed panel but no other dojo
> > > widgets, but the  tag had dojo "requiring" all of the
> > > dojo widget library.
> > >
> > > This was causing our page to fire off 70+ requests when loading. As our
> > > app
> > > needs to be accessed up to a thousand km away, tests showed initial load
> > > times of over 10s because of latency.
> > >
> > > I modified web\template\ajax\head.ftl to include a custom
> > > web\hack\ajax\dojoRequire.js that had the minimum dojo includes for the
> > > tabbed panels. This managed to get the number of requests down to around
> > > 30,
> > > mostly our own images and scripts, which gave acceptable load times.
> > >
> > > Eg.
> > >
> > > web\template\ajax\head.ftl:
> > >
> > > <#include "/${parameters.templateDir}/${themeProperties.parent}/head.ftl"
> > > />
> > >  > >src="<@s.url value='/hack/ajax/dojoRequire.js' includeParams='none'
> > > encode='false'  />">
> > >  > >src="<@s.url value='/struts/CommonFunctions.js'
> > > includeParams='none'
> > > encode='false'/>">
> > >
> > >
> > > web\hack\ajax\dojoRequire.js:
> > >
> > > dojo.require("dojo.io.BrowserIO");
> > > dojo.require("dojo.event.topic");
> > >
> > > dojo.hostenv.setModulePrefix('struts', 'struts');
> > > //dojo.require('dojo.widget.*');
> > > dojo.widget.manager.registerWidgetPackage('struts.widget');
> > >
> > > dojo.require("struts.widget.Bind");
> > > dojo.require("struts.widget.BindDiv");
> > > //dojo.require("struts.widget.BindAnchor");
> > > //dojo.require("struts.widget.ComboBox");
> > > //dojo.require("struts.widget.StrutsTimePicker")
> > > //dojo.require("dojo.widget.Editor2");
> > > //dojo.hostenv.writeIncludes(); // not needed, but allows the Venkman
> > > debugger to work with the includes
> > >
> > >
> > > Hope this helps, regards
> > > Jason
> > >
> > > -
> > > Falun Dafa  Truth - Compassion - Forbearance
> > >
> > > A mind & body practice under persecution in China
> > >
> > > http://www.faluninfo.net
> > >
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, 21 September 2007 8:09 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
> > >
> > > If Dojo is being used for AJAX in this case, that's my guess.  I know from
> > > experience that Dojo, can issue a TON of requests even if you think your
> > > only loading a small portion of it.  Assuming this guess is correct,
> > > Musachy, does S2 use a custom build of Dojo?  If not, that might be worth
> > > considering.
> > >
> > > Frank
> > >
> > > --
> > > Frank W. Zammetti
> > > Founder and Chief Software Architect
> > > Omnytex Technologies
> > > http://www.omnytex.com
> > > AIM/Yahoo: fzammetti
> > > MSN: [EMAIL PROTECTED]
> > > Author of "Practical Ajax Projects With Java Technology"
> > >  (2006, Apress, ISBN 1-59059-695-1)
> > > and "JavaScript, DOM Scripting and Ajax Projects"
> > >  (2007, Apress, ISBN 1-59059-816-4)
> > > Java Web Parts - http://javawebparts.sourceforge.net
> > >  Supplying the wheel, so you don't have to reinvent it!
> > >
> > > chengas123

RE: [s2] Struts head tag KILLS (> 10s) page load time

2007-09-23 Thread Jason Wyatt
Ah, thanks Musachy, that explains what I was seeing. 

The total latency experienced for the dojo files to load every time was
pretty high when running over a long distance, as the files are requested
sequentially, rather than as parallel requests... Not sure what the best
solution would be to this one apart from customisation of the dojo
includes??

Regards
Jason


-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, 24 September 2007 1:43 PM
To: Struts Users Mailing List
Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time

When a file is loaded using dojo.require, it is not cached by the browser.

musachy

On 9/23/07, Jason Wyatt <[EMAIL PROTECTED]> wrote:
> Hi Martin,
>
> Yes, that's right.
>
> The dojo "requires" seemed unexpectedly slow during our tests. I was 
> using Firefox's Firebug to check page load times. From memory, it 
> looked like the dojo includes were being requested sequentially and 
> seemed to give substantial page loading overhead (>2s) even if the 
> dojo .js files were cached.
>
> I never fully understood why there was a large overhead although the 
> dojo files were supposedly cached. It might have been a quirk with 
> firebug and dojo "requires", or maybe the "requires" routine itself is 
> slow, when called
> 30+ times.
>
> About 5 dojo files were consistently returning "not found" as well, 
> which may not have helped the load times.
>
> Removing as much dojo stuff as I could, and upgrading from Struts 
> 2.0.8 to
> 2.0.9 has solved our page load time issues.
>
> Regards
> Jason
>
>
> -Original Message-
> From: Martin Gainty [mailto:[EMAIL PROTECTED]
> Sent: Friday, 21 September 2007 11:41 AM
> To: Struts Users Mailing List
> Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
>
> Hi Jason-
>
> so by attentuating dojo includes you decreased initial load time for 
> dojo with the beneficial side effect of faster response to the browser?
>
> Thanks/
> Martin--
> - Original Message -
> From: "Jason Wyatt" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" 
> Sent: Thursday, September 20, 2007 9:09 PM
> Subject: RE: [s2] Struts head tag KILLS (> 10s) page load time
>
>
> >I had the same issue... We use the ajax tabbed panel but no other 
> >dojo  widgets, but the  tag had dojo "requiring" 
> >all of the  dojo widget library.
> >
> > This was causing our page to fire off 70+ requests when loading. As 
> > our app needs to be accessed up to a thousand km away, tests showed 
> > initial load times of over 10s because of latency.
> >
> > I modified web\template\ajax\head.ftl to include a custom 
> > web\hack\ajax\dojoRequire.js that had the minimum dojo includes for 
> > the tabbed panels. This managed to get the number of requests down 
> > to around 30, mostly our own images and scripts, which gave 
> > acceptable load times.
> >
> > Eg.
> >
> > web\template\ajax\head.ftl:
> >
> > <#include
"/${parameters.templateDir}/${themeProperties.parent}/head.ftl"
> > />
> >  >src="<@s.url value='/hack/ajax/dojoRequire.js'
includeParams='none'
> > encode='false'  />">
> >  >src="<@s.url value='/struts/CommonFunctions.js'
> > includeParams='none'
> > encode='false'/>">
> >
> >
> > web\hack\ajax\dojoRequire.js:
> >
> > dojo.require("dojo.io.BrowserIO");
> > dojo.require("dojo.event.topic");
> >
> > dojo.hostenv.setModulePrefix('struts', 'struts'); 
> > //dojo.require('dojo.widget.*'); 
> > dojo.widget.manager.registerWidgetPackage('struts.widget');
> >
> > dojo.require("struts.widget.Bind");
> > dojo.require("struts.widget.BindDiv");
> > //dojo.require("struts.widget.BindAnchor");
> > //dojo.require("struts.widget.ComboBox");
> > //dojo.require("struts.widget.StrutsTimePicker")
> > //dojo.require("dojo.widget.Editor2");
> > //dojo.hostenv.writeIncludes(); // not needed, but allows the 
> > Venkman debugger to work with the includes
> >
> >
> > Hope this helps, regards
> > Jason
> >
> > -
> > Falun Dafa  Truth - Compassion - Forbearance
> >
> > A mind & body practice under persecution in China
> >
> > http://www.faluninfo.net
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 21 September 2007 8:09 AM
> > To: Struts Users Mailing List
> > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
> >
> > If Dojo is being used for AJAX in this case, that's my guess.  I 
> > know from experience that Dojo, can issue a TON of requests even if 
> > you think your only loading a small portion of it.  Assuming this 
> > guess is correct, Musachy, does S2 use a custom build of Dojo?  If 
> > not, that might be worth considering.
> >
> > Frank
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect Omnytex Technologies 
> > http://www.omnytex.com
> > AIM/Yahoo: fzammetti
> > MSN: [EMAIL PROTECTED]
> > Author of "Practical Ajax Projects With Java Technology"
> >  (2006, Apress, ISBN 1-59059-695-1)
> > and "JavaScrip

Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-09-23 Thread Musachy Barroso
When a file is loaded using dojo.require, it is not cached by the browser.

musachy

On 9/23/07, Jason Wyatt <[EMAIL PROTECTED]> wrote:
> Hi Martin,
>
> Yes, that's right.
>
> The dojo "requires" seemed unexpectedly slow during our tests. I was using
> Firefox's Firebug to check page load times. From memory, it looked like the
> dojo includes were being requested sequentially and seemed to give
> substantial page loading overhead (>2s) even if the dojo .js files were
> cached.
>
> I never fully understood why there was a large overhead although the dojo
> files were supposedly cached. It might have been a quirk with firebug and
> dojo "requires", or maybe the "requires" routine itself is slow, when called
> 30+ times.
>
> About 5 dojo files were consistently returning "not found" as well, which
> may not have helped the load times.
>
> Removing as much dojo stuff as I could, and upgrading from Struts 2.0.8 to
> 2.0.9 has solved our page load time issues.
>
> Regards
> Jason
>
>
> -Original Message-
> From: Martin Gainty [mailto:[EMAIL PROTECTED]
> Sent: Friday, 21 September 2007 11:41 AM
> To: Struts Users Mailing List
> Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
>
> Hi Jason-
>
> so by attentuating dojo includes you decreased initial load time for dojo
> with the beneficial side effect of faster response to the browser?
>
> Thanks/
> Martin--
> - Original Message -
> From: "Jason Wyatt" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" 
> Sent: Thursday, September 20, 2007 9:09 PM
> Subject: RE: [s2] Struts head tag KILLS (> 10s) page load time
>
>
> >I had the same issue... We use the ajax tabbed panel but no other dojo
> > widgets, but the  tag had dojo "requiring" all of the
> > dojo widget library.
> >
> > This was causing our page to fire off 70+ requests when loading. As our
> > app
> > needs to be accessed up to a thousand km away, tests showed initial load
> > times of over 10s because of latency.
> >
> > I modified web\template\ajax\head.ftl to include a custom
> > web\hack\ajax\dojoRequire.js that had the minimum dojo includes for the
> > tabbed panels. This managed to get the number of requests down to around
> > 30,
> > mostly our own images and scripts, which gave acceptable load times.
> >
> > Eg.
> >
> > web\template\ajax\head.ftl:
> >
> > <#include "/${parameters.templateDir}/${themeProperties.parent}/head.ftl"
> > />
> >  >src="<@s.url value='/hack/ajax/dojoRequire.js' includeParams='none'
> > encode='false'  />">
> >  >src="<@s.url value='/struts/CommonFunctions.js'
> > includeParams='none'
> > encode='false'/>">
> >
> >
> > web\hack\ajax\dojoRequire.js:
> >
> > dojo.require("dojo.io.BrowserIO");
> > dojo.require("dojo.event.topic");
> >
> > dojo.hostenv.setModulePrefix('struts', 'struts');
> > //dojo.require('dojo.widget.*');
> > dojo.widget.manager.registerWidgetPackage('struts.widget');
> >
> > dojo.require("struts.widget.Bind");
> > dojo.require("struts.widget.BindDiv");
> > //dojo.require("struts.widget.BindAnchor");
> > //dojo.require("struts.widget.ComboBox");
> > //dojo.require("struts.widget.StrutsTimePicker")
> > //dojo.require("dojo.widget.Editor2");
> > //dojo.hostenv.writeIncludes(); // not needed, but allows the Venkman
> > debugger to work with the includes
> >
> >
> > Hope this helps, regards
> > Jason
> >
> > -
> > Falun Dafa  Truth - Compassion - Forbearance
> >
> > A mind & body practice under persecution in China
> >
> > http://www.faluninfo.net
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 21 September 2007 8:09 AM
> > To: Struts Users Mailing List
> > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
> >
> > If Dojo is being used for AJAX in this case, that's my guess.  I know from
> > experience that Dojo, can issue a TON of requests even if you think your
> > only loading a small portion of it.  Assuming this guess is correct,
> > Musachy, does S2 use a custom build of Dojo?  If not, that might be worth
> > considering.
> >
> > Frank
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> > AIM/Yahoo: fzammetti
> > MSN: [EMAIL PROTECTED]
> > Author of "Practical Ajax Projects With Java Technology"
> >  (2006, Apress, ISBN 1-59059-695-1)
> > and "JavaScript, DOM Scripting and Ajax Projects"
> >  (2007, Apress, ISBN 1-59059-816-4)
> > Java Web Parts - http://javawebparts.sourceforge.net
> >  Supplying the wheel, so you don't have to reinvent it!
> >
> > chengas123 wrote:
> >> Hi,
> >> I am working on a Struts 2 page and page load times are way too high.
> >> I tracked it down to the Struts head tag, which I have as follows:
> >>  Without the tag, my page issues 3 requests and
> >> takes 453ms to load.  With the tag, the page issues 54 requests taking
> >> 12.24s to load.
> >> Is there something I am doing wrong here?
> >>
> >> Thanks,
> >> Ben
> 

Re: Newbie question about parameters for an Action

2007-09-23 Thread Phil404

I presume you mean org.apache.struts2.servlet.ParameterAware.  If I implement
setParameters(), it is not called before the execute() method.  I'm still in
the dark.  I feel like I'm missing something really simple.

Phil


newton.dave wrote:
> 
> Does implementing ParameterAware work?
> 
> --- Phil404 <[EMAIL PROTECTED]> wrote:
> 
>> 
>> That does not seem to work either.  The String
>> values are nulls.
>> 
>> Phil
>> 
>> 
>> Richard Yee wrote:
>> > 
>> > You might try changing the attributes and setters
>> to Strings and see if 
>> > that works.
>> > 
>> > -Richard
>> > 
>> > 
>> > Phil404 wrote:
>> >> I would like to draw a Pie Chart using
>> JFreeChart.  I call the action
>> >> from a
>> >> JSP like so:
>> >>
>> >> 
>> >> 10
>> >> 15
>> >> 20
>> >> 
>> >>  ${chartUrl} 
>> >>
>> >> The action is very simple:
>> >>
>> >> public class PieChartAction extends ActionSupport
>> {
>> >>
>> >>   private JFreeChart chart;
>> >>   private int visual;
>> >>   private int auditory;
>> >>   private int kinesthetic;
>> >>
>> >>   public String execute() {
>> >>   System.out.println("Visual: " + getVisual());
>> >>   System.out.println("Auditory: " +
>> getAuditory());
>> >>   System.out.println("Kinesthetic: " +
>> getKinesthetic());
>> >>   DefaultPieDataset pieDataset = new
>> DefaultPieDataset();
>> >>   pieDataset.setValue("Visual", getVisual());
>> >>   pieDataset.setValue("Auditory", getAuditory());
>> >>   pieDataset.setValue("Kinesthetic",
>> getKinesthetic());
>> >>   chart = ChartFactory.createPieChart("Learning
>> Profile", pieDataset,
>> >> true,
>> >> true, false);
>> >>   return SUCCESS;
>> >>   }
>> >>
>> >>   public JFreeChart getChart() {
>> >>   return chart;
>> >>   }
>> >>
>> >>   public int getVisual() {
>> >>   return visual;
>> >>   }
>> >>
>> >>   public void setVisual(int visual) {
>> >>   this.visual = visual;
>> >>   }
>> >>
>> >>   public int getAuditory() {
>> >>   return auditory;
>> >>   }
>> >>
>> >>   public void setAuditory(int auditory) {
>> >>   this.auditory = auditory;
>> >>   }
>> >>
>> >>   public int getKinesthetic() {
>> >>   return kinesthetic;
>> >>   }
>> >>
>> >>   public void setKinesthetic(int kinesthetic) {
>> >>   this.kinesthetic = kinesthetic;
>> >>   }
>> >>
>> >> }
>> >>
>> >>
>> >> The action is defined in the struts.xml like so:
>> >>
>> >>   > extends="jfreechart-default">
>> >>   
>> >>   
>> >>   400
>> >>   300
>> >>   
>> >>   
>> >>   
>> >>
>> >> The issue is that the variables visual, auditory
>> and kinesthetic are not
>> >> being set in the Action.  The values are
>> therefore always 0.  Can someone
>> >> please tell me what I'm doing wrong?
>> >>
>> >> Phil
>> >>   
>> > 
>> > 
>> >
>>
> -
>> > To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> > For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Newbie-question-about-parameters-for-an-Action-tf4506130.html#a12852928
>> 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/Newbie-question-about-parameters-for-an-Action-tf4506130.html#a12853148
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: Newbie question about parameters for an Action

2007-09-23 Thread Dave Newton
Does implementing ParameterAware work?

--- Phil404 <[EMAIL PROTECTED]> wrote:

> 
> That does not seem to work either.  The String
> values are nulls.
> 
> Phil
> 
> 
> Richard Yee wrote:
> > 
> > You might try changing the attributes and setters
> to Strings and see if 
> > that works.
> > 
> > -Richard
> > 
> > 
> > Phil404 wrote:
> >> I would like to draw a Pie Chart using
> JFreeChart.  I call the action
> >> from a
> >> JSP like so:
> >>
> >> 
> >> 10
> >> 15
> >> 20
> >> 
> >>  ${chartUrl} 
> >>
> >> The action is very simple:
> >>
> >> public class PieChartAction extends ActionSupport
> {
> >>
> >>private JFreeChart chart;
> >>private int visual;
> >>private int auditory;
> >>private int kinesthetic;
> >>
> >>public String execute() {
> >>System.out.println("Visual: " + getVisual());
> >>System.out.println("Auditory: " +
> getAuditory());
> >>System.out.println("Kinesthetic: " +
> getKinesthetic());
> >>DefaultPieDataset pieDataset = new
> DefaultPieDataset();
> >>pieDataset.setValue("Visual", getVisual());
> >>pieDataset.setValue("Auditory", getAuditory());
> >>pieDataset.setValue("Kinesthetic",
> getKinesthetic());
> >>chart = ChartFactory.createPieChart("Learning
> Profile", pieDataset,
> >> true,
> >> true, false);
> >>return SUCCESS;
> >>}
> >>
> >>public JFreeChart getChart() {
> >>return chart;
> >>}
> >>
> >>public int getVisual() {
> >>return visual;
> >>}
> >>
> >>public void setVisual(int visual) {
> >>this.visual = visual;
> >>}
> >>
> >>public int getAuditory() {
> >>return auditory;
> >>}
> >>
> >>public void setAuditory(int auditory) {
> >>this.auditory = auditory;
> >>}
> >>
> >>public int getKinesthetic() {
> >>return kinesthetic;
> >>}
> >>
> >>public void setKinesthetic(int kinesthetic) {
> >>this.kinesthetic = kinesthetic;
> >>}
> >>
> >> }
> >>
> >>
> >> The action is defined in the struts.xml like so:
> >>
> >> extends="jfreechart-default">
> >>
> >>
> >>400
> >>300
> >>
> >>
> >>
> >>
> >> The issue is that the variables visual, auditory
> and kinesthetic are not
> >> being set in the Action.  The values are
> therefore always 0.  Can someone
> >> please tell me what I'm doing wrong?
> >>
> >> Phil
> >>   
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Newbie-question-about-parameters-for-an-Action-tf4506130.html#a12852928
> 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]



Re: Newbie question about parameters for an Action

2007-09-23 Thread Phil404

That does not seem to work either.  The String values are nulls.

Phil


Richard Yee wrote:
> 
> You might try changing the attributes and setters to Strings and see if 
> that works.
> 
> -Richard
> 
> 
> Phil404 wrote:
>> I would like to draw a Pie Chart using JFreeChart.  I call the action
>> from a
>> JSP like so:
>>
>> 
>> 10
>> 15
>> 20
>> 
>>  ${chartUrl} 
>>
>> The action is very simple:
>>
>> public class PieChartAction extends ActionSupport {
>>
>>  private JFreeChart chart;
>>  private int visual;
>>  private int auditory;
>>  private int kinesthetic;
>>
>>  public String execute() {
>>  System.out.println("Visual: " + getVisual());
>>  System.out.println("Auditory: " + getAuditory());
>>  System.out.println("Kinesthetic: " + getKinesthetic());
>>  DefaultPieDataset pieDataset = new DefaultPieDataset();
>>  pieDataset.setValue("Visual", getVisual());
>>  pieDataset.setValue("Auditory", getAuditory());
>>  pieDataset.setValue("Kinesthetic", getKinesthetic());
>>  chart = ChartFactory.createPieChart("Learning Profile", 
>> pieDataset,
>> true,
>> true, false);
>>  return SUCCESS;
>>  }
>>
>>  public JFreeChart getChart() {
>>  return chart;
>>  }
>>
>>  public int getVisual() {
>>  return visual;
>>  }
>>
>>  public void setVisual(int visual) {
>>  this.visual = visual;
>>  }
>>
>>  public int getAuditory() {
>>  return auditory;
>>  }
>>
>>  public void setAuditory(int auditory) {
>>  this.auditory = auditory;
>>  }
>>
>>  public int getKinesthetic() {
>>  return kinesthetic;
>>  }
>>
>>  public void setKinesthetic(int kinesthetic) {
>>  this.kinesthetic = kinesthetic;
>>  }
>>
>> }
>>
>>
>> The action is defined in the struts.xml like so:
>>
>>  
>>  
>>  
>>  400
>>  300
>>  
>>  
>>  
>>
>> The issue is that the variables visual, auditory and kinesthetic are not
>> being set in the Action.  The values are therefore always 0.  Can someone
>> please tell me what I'm doing wrong?
>>
>> Phil
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-question-about-parameters-for-an-Action-tf4506130.html#a12852928
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] Struts head tag KILLS (> 10s) page load time

2007-09-23 Thread Jason Wyatt
Hi Martin,

Yes, that's right. 

The dojo "requires" seemed unexpectedly slow during our tests. I was using
Firefox's Firebug to check page load times. From memory, it looked like the
dojo includes were being requested sequentially and seemed to give
substantial page loading overhead (>2s) even if the dojo .js files were
cached. 

I never fully understood why there was a large overhead although the dojo
files were supposedly cached. It might have been a quirk with firebug and
dojo "requires", or maybe the "requires" routine itself is slow, when called
30+ times.

About 5 dojo files were consistently returning "not found" as well, which
may not have helped the load times.

Removing as much dojo stuff as I could, and upgrading from Struts 2.0.8 to
2.0.9 has solved our page load time issues.

Regards
Jason


-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Friday, 21 September 2007 11:41 AM
To: Struts Users Mailing List
Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time

Hi Jason-

so by attentuating dojo includes you decreased initial load time for dojo
with the beneficial side effect of faster response to the browser?

Thanks/
Martin--
- Original Message -
From: "Jason Wyatt" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Sent: Thursday, September 20, 2007 9:09 PM
Subject: RE: [s2] Struts head tag KILLS (> 10s) page load time


>I had the same issue... We use the ajax tabbed panel but no other dojo
> widgets, but the  tag had dojo "requiring" all of the
> dojo widget library.
>
> This was causing our page to fire off 70+ requests when loading. As our 
> app
> needs to be accessed up to a thousand km away, tests showed initial load
> times of over 10s because of latency.
>
> I modified web\template\ajax\head.ftl to include a custom
> web\hack\ajax\dojoRequire.js that had the minimum dojo includes for the
> tabbed panels. This managed to get the number of requests down to around 
> 30,
> mostly our own images and scripts, which gave acceptable load times.
>
> Eg.
>
> web\template\ajax\head.ftl:
>
> <#include "/${parameters.templateDir}/${themeProperties.parent}/head.ftl" 
> />
> src="<@s.url value='/hack/ajax/dojoRequire.js' includeParams='none'
> encode='false'  />">
> src="<@s.url value='/struts/CommonFunctions.js' 
> includeParams='none'
> encode='false'/>">
>
>
> web\hack\ajax\dojoRequire.js:
>
> dojo.require("dojo.io.BrowserIO");
> dojo.require("dojo.event.topic");
>
> dojo.hostenv.setModulePrefix('struts', 'struts');
> //dojo.require('dojo.widget.*');
> dojo.widget.manager.registerWidgetPackage('struts.widget');
>
> dojo.require("struts.widget.Bind");
> dojo.require("struts.widget.BindDiv");
> //dojo.require("struts.widget.BindAnchor");
> //dojo.require("struts.widget.ComboBox");
> //dojo.require("struts.widget.StrutsTimePicker")
> //dojo.require("dojo.widget.Editor2");
> //dojo.hostenv.writeIncludes(); // not needed, but allows the Venkman
> debugger to work with the includes
>
>
> Hope this helps, regards
> Jason
>
> -
> Falun Dafa  Truth - Compassion - Forbearance
>
> A mind & body practice under persecution in China
>
> http://www.faluninfo.net
>
>
>
>
>
> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Friday, 21 September 2007 8:09 AM
> To: Struts Users Mailing List
> Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time
>
> If Dojo is being used for AJAX in this case, that's my guess.  I know from
> experience that Dojo, can issue a TON of requests even if you think your
> only loading a small portion of it.  Assuming this guess is correct,
> Musachy, does S2 use a custom build of Dojo?  If not, that might be worth
> considering.
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
> Author of "Practical Ajax Projects With Java Technology"
>  (2006, Apress, ISBN 1-59059-695-1)
> and "JavaScript, DOM Scripting and Ajax Projects"
>  (2007, Apress, ISBN 1-59059-816-4)
> Java Web Parts - http://javawebparts.sourceforge.net
>  Supplying the wheel, so you don't have to reinvent it!
>
> chengas123 wrote:
>> Hi,
>> I am working on a Struts 2 page and page load times are way too high.
>> I tracked it down to the Struts head tag, which I have as follows:
>>  Without the tag, my page issues 3 requests and
>> takes 453ms to load.  With the tag, the page issues 54 requests taking
>> 12.24s to load.
>> Is there something I am doing wrong here?
>>
>> Thanks,
>> Ben
>
>
> -
> 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: Newbie question about parameters for an Action

2007-09-23 Thread Richard Yee
You might try changing the attributes and setters to Strings and see if 
that works.


-Richard


Phil404 wrote:

I would like to draw a Pie Chart using JFreeChart.  I call the action from a
JSP like so:


10
15
20

 ${chartUrl} 


The action is very simple:

public class PieChartAction extends ActionSupport {

private JFreeChart chart;
private int visual;
private int auditory;
private int kinesthetic;

public String execute() {
System.out.println("Visual: " + getVisual());
System.out.println("Auditory: " + getAuditory());
System.out.println("Kinesthetic: " + getKinesthetic());
DefaultPieDataset pieDataset = new DefaultPieDataset();
pieDataset.setValue("Visual", getVisual());
pieDataset.setValue("Auditory", getAuditory());
pieDataset.setValue("Kinesthetic", getKinesthetic());
chart = ChartFactory.createPieChart("Learning Profile", 
pieDataset, true,
true, false);
return SUCCESS;
}

public JFreeChart getChart() {
return chart;
}

public int getVisual() {
return visual;
}

public void setVisual(int visual) {
this.visual = visual;
}

public int getAuditory() {
return auditory;
}

public void setAuditory(int auditory) {
this.auditory = auditory;
}

public int getKinesthetic() {
return kinesthetic;
}

public void setKinesthetic(int kinesthetic) {
this.kinesthetic = kinesthetic;
}

}


The action is defined in the struts.xml like so:




400
300




The issue is that the variables visual, auditory and kinesthetic are not
being set in the Action.  The values are therefore always 0.  Can someone
please tell me what I'm doing wrong?

Phil
  



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



Re: Mapping multiple enums to a nested object

2007-09-23 Thread Guillaume Bilodeau

Looks like the JSP code doesn't show. Here it is:


[s:form action="createSimpleFood.go" method="post"
namespace="/nutrition"]
[s:textfield key="food.name" name="model.name" /][br/]
[s:select key="food.group" name="model.group"
list="availableGroups" /]
[s:checkboxlist key="food.nutrients"
name="model.selectedNutrients"
list="availableNutrients" /]
[s:submit key="nutrition.foods.simpleFoods.create.submit" /]
[/s:form]


-- 
View this message in context: 
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12852427
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: [OT] When did JSP officially go from 1 to 2?

2007-09-23 Thread Dave Newton
--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> I'd like to know when those specs became official,
but 
> I'm having trouble finding the dates. I want them to
> realize that I'm not requesting anything bleeding -
I 
> think JSP2.0 was official back in 2004?

The date on the final JSP 2.0 spec [1?] is 2003; is
that good enough? IIRC Tomcat was the reference impl;
you could check to see when the first release of the
5.x series was, too.

d.

[1?]
http://jcp.org/aboutJava/communityprocess/final/jsr152/


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



Re: [OT] When did JSP officially go from 1 to 2?

2007-09-23 Thread Wendy Smoak
On 9/23/07, Rick Reumann <[EMAIL PROTECTED]> wrote:
> I'm trying to create a doc to persuade the 'powers that be' to provide a
> decent server for our applications, and I'm presenting the merits of
> JSP2/Servlet2.4. I'd like to know when those specs became official, but I'm
> having trouble finding the dates. I want them to realize that I'm not
> requesting anything bleeding - I think JSP2.0 was official back in 2004? but
> I could be wrong. Anyone know the dates? Thanks.

Let's see... Google "jsp 2.0 specification" ->
http://jcp.org/aboutJava/communityprocess/final/jsr152/ -> download ->
read front page "Final Release - November 24, 2003"

-- 
Wendy

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



Re: Bug in scenario

2007-09-23 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> I guess I'm wondering if the framework should have a

> safety net to fall back on when an object is *not*  
> produced by user code.

What would that look like; an extension to ModelDriven
that included a createModel function, or...?

If something implements ModelDriven and doesn't create
a model object for getModel to return it's already
pretty fundamentally broken.

d.


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



[OT] When did JSP officially go from 1 to 2?

2007-09-23 Thread Rick Reumann
I'm trying to create a doc to persuade the 'powers that be' to provide a
decent server for our applications, and I'm presenting the merits of
JSP2/Servlet2.4. I'd like to know when those specs became official, but I'm
having trouble finding the dates. I want them to realize that I'm not
requesting anything bleeding - I think JSP2.0 was official back in 2004? but
I could be wrong. Anyone know the dates? Thanks.

-- 
Rick


Re: Bug in scenario

2007-09-23 Thread stanlick
When prepare/getModel misbehave!  I guess I'm wondering if the framework
should have a safety net to fall back on when an object is *not*  produced
by user code.

On 9/23/07, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED] wrote:
> > If your action class implements ModelDriven and Preparable and your
> prepare
> > method returns a null object, ParameterInterceptor tries to set the
> parms
> > which are names appropriate to properties in model object that is
> expected
> > to be on the top of stack.  However, since model was null, it was NOT
> SET on
> > top of the stack and all the parameters are now looked for in the action
> > class.  They are not found there (naturally) so all the parm setters
> fail.
> > Should the ModelDriven interceptor create a model when it is null?
>
> This is as documented [1]:
>
> "Note: The ModelDrivenInterceptor will only push the model into the
> stack when the model is not null, else it will be ignored."
>
> When implementing ModelDriven, it is your action's responsibility to
> create the model. Whether you choose to accomplish that in a prepare()
> method, or by other means, is up to you.
>
> L.
>
> [1] http://struts.apache.org/2.x/docs/model-driven-interceptor.html
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Scott
[EMAIL PROTECTED]


Newbie question about parameters for an Action

2007-09-23 Thread Phil404

I would like to draw a Pie Chart using JFreeChart.  I call the action from a
JSP like so:


10
15
20

 ${chartUrl} 

The action is very simple:

public class PieChartAction extends ActionSupport {

private JFreeChart chart;
private int visual;
private int auditory;
private int kinesthetic;

public String execute() {
System.out.println("Visual: " + getVisual());
System.out.println("Auditory: " + getAuditory());
System.out.println("Kinesthetic: " + getKinesthetic());
DefaultPieDataset pieDataset = new DefaultPieDataset();
pieDataset.setValue("Visual", getVisual());
pieDataset.setValue("Auditory", getAuditory());
pieDataset.setValue("Kinesthetic", getKinesthetic());
chart = ChartFactory.createPieChart("Learning Profile", 
pieDataset, true,
true, false);
return SUCCESS;
}

public JFreeChart getChart() {
return chart;
}

public int getVisual() {
return visual;
}

public void setVisual(int visual) {
this.visual = visual;
}

public int getAuditory() {
return auditory;
}

public void setAuditory(int auditory) {
this.auditory = auditory;
}

public int getKinesthetic() {
return kinesthetic;
}

public void setKinesthetic(int kinesthetic) {
this.kinesthetic = kinesthetic;
}

}


The action is defined in the struts.xml like so:




400
300




The issue is that the variables visual, auditory and kinesthetic are not
being set in the Action.  The values are therefore always 0.  Can someone
please tell me what I'm doing wrong?

Phil
-- 
View this message in context: 
http://www.nabble.com/Newbie-question-about-parameters-for-an-Action-tf4506130.html#a12851266
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] How do I output unicode characters please help

2007-09-23 Thread Laurie Harper
Er, no; property files are required to be in ASCII format. Using a UTF-8 
character encoding in a properties file will not work.


@Dave: ü is a valid encoding of the character \u00fc, it's 
equivalent; in fact, I think it's equivalent regardless of character 
encoding for the served HTML, which would make it the most portable 
representation. Why do you want something else?


If you really can't work with the encoded output, you may be able to get 
the raw character, for example with escape="false"/>.


L.

Leonidas Papadakis wrote:
Just put the umlaut character u" directly to your property file and make 
sure that you save it as utf-8 not ansi e.t.c.


Regards,

Leon

David Harland wrote:

Hi,

Thanks I have added those properties but it is still outputting ü.

Can someone please tell me what I might be doing wrong.

Dave.

- Original Message 
From: Leonidas Papadakis <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Saturday, September 22, 2007 4:22:04 PM
Subject: Re: [s2] How do I output unicode characters please help

Hi there,

in my Greek scenario i have set the below in struts.properties file :
struts.i18n.encoding=UTF-8
struts.locale = el_GR

in my freemarker.properties :
default_encoding=UTF-8
locale=el_GR

in my jsp file :
<%@ page contentType="text/html; charset=utf-8" %>

Also check the doctype of your resulting html.

I hope this will help 

Regards

Leon

David Harland wrote:
 

Hi,

If I put the following \u00fc in a properties file and use it in a 
jsp i get the german character u" output. If I have an action with 
the variable test and I set it with \u00fc and I output it in a jsp I 
get the encoding ü.


How do I get the character instead of this encoding please?

Thanks

Dave.




  
 

Don't let your dream ride pass you by. Make it a reality with Yahoo! 
Autos.

http://autos.yahoo.com/index.html
 




-
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]






   
 

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.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]



Re: Bug in scenario

2007-09-23 Thread Laurie Harper

[EMAIL PROTECTED] wrote:

If your action class implements ModelDriven and Preparable and your prepare
method returns a null object, ParameterInterceptor tries to set the parms
which are names appropriate to properties in model object that is expected
to be on the top of stack.  However, since model was null, it was NOT SET on
top of the stack and all the parameters are now looked for in the action
class.  They are not found there (naturally) so all the parm setters fail.
Should the ModelDriven interceptor create a model when it is null?


This is as documented [1]:

"Note: The ModelDrivenInterceptor will only push the model into the 
stack when the model is not null, else it will be ignored."


When implementing ModelDriven, it is your action's responsibility to 
create the model. Whether you choose to accomplish that in a prepare() 
method, or by other means, is up to you.


L.

[1] http://struts.apache.org/2.x/docs/model-driven-interceptor.html


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



Re: excel export

2007-09-23 Thread Laurie Harper

[EMAIL PROTECTED] wrote:

Hi all,

I would like to know if it possible to do extraction in mutiple 
format(cxv,rtf etc ...) just like

display tag feature in s2.


I'm not sure what you want to do; if you want the same functionality 
provided by displaytags, you could just use that taglib. If you're 
asking how you can create similar functionality for your own tags/pages, 
there's nothing built into Struts to allow that; you'd have to develop 
such export features yourself.


L.


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



Re: S138: TransAction Token lifetime very short?

2007-09-23 Thread Laurie Harper

[EMAIL PROTECTED] wrote:

Hello,
 
I'm using the Transaction Token in my Struts138 App. But it seems the

token has a very short lifetime. I guess about 1-2 Minutes. How can I
manually correct it?
My inactivity timeout is set to 20 mins - so my token should be set to
the same value.
Can someone tell me how and where?


I haven't used transaction tokens, but my understanding was that they're 
tied to the session. In that case, they shouldn't time out unless the 
session times out. Can you give some more details about how you're using 
them and how you're measuring this timeout?


L.


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



Re: Spring tutorial

2007-09-23 Thread Ray Clough
You might also look at the 'Core J2EE Patterns' book (also now online at sun) 
and look at the 'Service Locator' pattern.  (This assumes the DB is registered 
with a central registry, as it usually is.)  Most of the book's examples are 
about EJB (ugh), but there is a good example there of setting up access to a 
database with good architecture.  They have sample code (example 7.8) which you 
can probably use with almost no modification.  They also have some good advice 
there about separating Data Access code from the rest of your app.

What you need to keep in mind is that these things are not really different in 
Struts than in another programming mode.  Struts only wires thing together for 
you, and the way you design your app and the code you write isn't that much 
dependent on the framework (or at least, it shouldn't be).  So you need to 
learn the framework, but more important, you need to know the fundamentals of 
how to design your app so that it has the least dependence on the framework.  
When you build a house, it shouldn't matter what kind of vacuum cleaner you 
use.  In the same way, when you build an application, it shouldn't matter too 
much what the provider framework is.  The framework just provides services 
which you app can use.  But if that service was not available thru the 
framework, you could get it some other way, and then the *use* of that service 
wouldn't have to change.  Look at Struts as a big bag of nice services you can 
use, and then your app uses those services.  If you went to another service 
provider, not everything would have to change.  If it does, then that is an 
indication that your architecture doesn't properly separate concerns.  Of 
course, all that is 'theory', and implementation always has to make 
compromises.  But it helps to keep it in mind as an ideal.

- Ray Clough



> - Original Message -
> From: "Nuwan Chandrasoma" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Subject: Re: Spring tutorial
> Date: Mon, 24 Sep 2007 00:16:03 +0530
> 
> 
> Hi,
> 
> you can use the same approach you used in servlets.  if you use 
> spring it will help you write the code in more elegant way :)
> 
> Thanks,
> 
> Nuwan
> 
> rama krishna yalagandula wrote:
> > Yes... Exactly that is the my question... I am **New** to Struts I
> > do not know How to do the "Database Connections" in Struts...When I was
> > working with Servlets... I used JDBC thin driver... So My doubt is What are
> > the availabe things to do "Database Connections" and which one very much
> > easier to get into plz help me regarding this...
> >
> > Thanks !
> > Rama Krishna.
> >
> >
> > On 9/22/07, Oleg Mikheev <[EMAIL PROTECTED]> wrote:
> >
> >> Martin Gainty wrote:
> >>
> >>> Im sorry.. what is the question?
> >>>
> >> I think he is asking whether he needs to use Spring
> >> fw to connect to DB several times.
> >>
> >>
> >> -
> >> 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]

>



- Ray Clough
[EMAIL PROTECTED]



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



setting the s:select label font-style

2007-09-23 Thread Session A Mwamufiya
Hi,

I'm trying to change the font of the s:select label to no longer be italic.  I 
modified the styles.css file in template/xhtml, and also the one in 
template/css_html to:
.label {font-family: arial, sans-serif; font-weight:bold;}

but the s:select label stays the same (italic).

Any pointers as to which template file I should be modifying?

Thanks,
Session


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



Re: Spring tutorial

2007-09-23 Thread Nuwan Chandrasoma

Hi,

you can use the same approach you used in servlets.  if you use spring 
it will help you write the code in more elegant way :)


Thanks,

Nuwan

rama krishna yalagandula wrote:

Yes... Exactly that is the my question... I am **New** to Struts I
do not know How to do the "Database Connections" in Struts...When I was
working with Servlets... I used JDBC thin driver... So My doubt is What are
the availabe things to do "Database Connections" and which one very much
easier to get into plz help me regarding this...

Thanks !
Rama Krishna.


On 9/22/07, Oleg Mikheev <[EMAIL PROTECTED]> wrote:
  

Martin Gainty wrote:


Im sorry.. what is the question?
  

I think he is asking whether he needs to use Spring
fw to connect to DB several times.


-
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: Spring tutorial

2007-09-23 Thread Adam Hardy

Hi Rama Krishna,

you can still use the same JDBC thin driver, in fact since your learning curve 
with struts is quite steep, I would suggest you just take a good example of your 
usage of JDBC and encapsulate it using the Factory design pattern for instance, 
and then call your factory classes from your struts actions. It would be good to 
keep the actions and the database access seperate.


Then at some future point once you are further up the learning curve, you can 
decide whether to use Spring.



Regards
Adam



rama krishna yalagandula on 23/09/07 19:29, wrote:

Yes... Exactly that is the my question... I am **New** to Struts I
do not know How to do the "Database Connections" in Struts...When I was
working with Servlets... I used JDBC thin driver... So My doubt is What are
the availabe things to do "Database Connections" and which one very much
easier to get into plz help me regarding this...

Thanks !
Rama Krishna.


On 9/22/07, Oleg Mikheev <[EMAIL PROTECTED]> wrote:

Martin Gainty wrote:

Im sorry.. what is the question?

I think he is asking whether he needs to use Spring
fw to connect to DB several times.



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



Re: Spring tutorial

2007-09-23 Thread rama krishna yalagandula
Yes... Exactly that is the my question... I am **New** to Struts I
do not know How to do the "Database Connections" in Struts...When I was
working with Servlets... I used JDBC thin driver... So My doubt is What are
the availabe things to do "Database Connections" and which one very much
easier to get into plz help me regarding this...

Thanks !
Rama Krishna.


On 9/22/07, Oleg Mikheev <[EMAIL PROTECTED]> wrote:
>
> Martin Gainty wrote:
> > Im sorry.. what is the question?
>
> I think he is asking whether he needs to use Spring
> fw to connect to DB several times.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Mapping multiple enums to a nested object

2007-09-23 Thread Guillaume Bilodeau

Hi all,

I'm quite new to Struts2 and so far I love what I see.  Currently I'm having
a problem trying to map a checkboxlist based on a set of enums to a model
object nested in my action.  Here's what I have now:

JSP:











Action:


public class CreateSimpleFoodAction {
private FoodService foodService;
private SimpleFoodCreationRequest foodCreationRequest = new
SimpleFoodCreationRequest();

public CreateSimpleFoodAction() {
}

public String prepareNewSimpleFood() {
return Action.SUCCESS;
}

public String createSimpleFood() {
String result;

try {
foodService.createSimpleFood(foodCreationRequest);
result = Action.SUCCESS;
}
catch (FoodException e) {
result = Action.INPUT;
}

return result;
}

public SimpleFoodCreationRequest getModel() {
return foodCreationRequest;
}

public List getAvailableGroups() {
return Arrays.asList(Group.values());
}

public List getAvailableNutrients() {
return Arrays.asList(Nutrient.values());
}

public void setFoodService(FoodService foodService) {
this.foodService = foodService;
}
}


Model:


public class SimpleFoodCreationRequest implements SimpleFoodPropertyProvider
{
private String name;
private Group group;
private Set nutrients = new HashSet();

public SimpleFoodCreationRequest() {
}

public Group getGroup() {
return group;
}

public void setGroup(Group group) {
this.group = group;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public void setSelectedNutrients(Nutrient[] selectedNutrients) {
nutrients.clear();
for (Nutrient n : selectedNutrients) {
nutrients.add(n);
}
}

public Nutrient[] getSelectedNutrients() {
return nutrients.toArray(new Nutrient[0]);
}

public Set getNutrients() {
return Collections.unmodifiableSet(nutrients);
}
}


CreateSimpleFoodAction-conversion.properties:


model.group=com.opensymphony.xwork2.util.EnumTypeConverter
model.selectedNutrients=com.opensymphony.xwork2.util.EnumTypeConverter
Element_model.selectedNutrients=com.gb1.healthcheck.domain.nutrition.Nutrient


When I submit this form, the selected checkbox list items are not mapped to
my SimpleFoodCreationRequest object.  The console shows the standard message
"error setting 'model.selectedNutrients' with..."

Any ideas?

Thanks!
GB

-- 
View this message in context: 
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12848740
Sent from the Struts - User mailing list archive at Nabble.com.


Re: [S2] Hooking up custom interceptors (Annotations)

2007-09-23 Thread Eric D Nielsen
Thank you Dave and Adam.

I;'ve tried both suggestions.
1) Changing away from annotations, works an "proved" that my interceptors do
work outside of their unit tests and actually in the system.

2) Trying the ParentPackage Annotation, works.  I had read about this
annotation, but convinced myself it wasn't what I was needing...  Since I
thought I needed to set the XWork Package for my action, not the Parent Package
of the XWork Package...  though given the way package inheritence works, I
should have realized it would work.

Now, I really want to use annotations instead of xml where possible, but the
ParentPackage approach doesn't feel as clean/DRY as i would like.

Configuring the interceptor stack (and global results) in XML is acceptable,
since the only other options would tend to require place holder do-nothing
classes to annotate.  However having to annotate every action with a
ParentPackage is very wrong.  It feels like something like one of the following
options would be needed and I can't tell if anything like this exists yet:

1) Provide some way for a default package to be declared in the struts.xml file

2) Make the actionPackages auto-detection set the XWork package based on the
java package in some predictable fashion.  (Not just the namespace as currently
documented.  ParentPackage could still override this default when needed for
flexibility.

3) Move towards the "do-nothing" class to hold annotations -- some sort of
ActionPackage interface...  Might be able to make it slightly less useless by
allowing anonymous interceptors to be defined/configured here if they don't
need to be re-used in other packages?

Is there some other appraoch to linking all "Zero Configuration" actions to a
specified package without repeating it in every action?

What could also be useful -- extend the config-browser plugin to expose an
action's XWork package.  It would definitely help with debugging/checking what
XWork package an auto detected actionPackage is using.

Eric

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



Re: images not being displayed with struts 2

2007-09-23 Thread Session A Mwamufiya
Fixed it, the page in which the image was supposed to be in was called by 
another page that prefaced the action call with a location.  Once I removed it, 
it worked.

Thanks.

> Session A Mwamufiya wrote:
>> I ran a simple jsp page with the  tag to add an image, and it ran
>> fine.  However, if I do the same in my struts 2 project, I don't get
>> anything showingup.  My image file is within the same folder as the jsp
>> file and is referenced the same way in both cases. Any ideas what needs
>> to be done in order to display an image in struts 2?
> 
> try putting img src into browser location, what do you see?
> 
> 
> - 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: [S2] MessageStoreInterceptor

2007-09-23 Thread Adam Hardy
Digging deeper into the struts2 architecture I can see now how the ActionErrors 
tag is quite a lightweight thing.


I'd rather avoid setting up my own mechanism for handling session usage in an 
action superclass as I did with struts1 - I prefer the idea of an interceptor 
handling it, but as I implied in my first message, I also like the idea of 
having this done automatically with no further configuration in any action xml. 
So for the meantime, I'm going to tweak MessageStoreInterceptor for this purpose.


What further scenarios do you see for putting things in the session for 
automated transfer to the next request? To my mind, error messages and 
informational messages are an important enough component in their own right not 
to be bundled up into a more generic mechanism.


I avoid the use of the term 'flash scope'. That's the Spring Webflow term you 
are borrowing I guess. Abstracting away from the HTTP paradigm, as 'flash', 
'conversation' and the bulk of Spring Webflow mechanisms do, is 
counter-productive in the long term unless you are creating a restricted, 
RAD-style framework where the user will never need to know details of the HTTP 
servlet mechanism. It constantly surprises me when I see colleagues who are 
meant to be webapp developers unable to figure out what is going on in the 
server-side between the browser and the business tier (I'm disrespecting Spring 
Webflow here!).


I see the ActionErrors tag is linked in with the HTML templating mechanism too. 
For applications like the one I'm working on where there's no usage of the 
templating framework (it's set to 'simple'), it is fortuitous that the 'simple' 
template for the errors tag applies exactly the HTML that I need, although I 
feel uncomfortable for the future that it locks me in like that.


I hope this comes across as constructive!





Don Brown on 21/09/07 04:43, wrote:

I agree it could be made easier.  I'd like to see it combined with a
flash scope-type interceptor so that more than just messages could be
passed via the session automatically.

As for your solution, you could implement the SessionAware interface
and get the session map directly, then you could do whatever you want.

Don

On 9/21/07, Adam Hardy <[EMAIL PROTECTED]> wrote:

 From the javadocs, this interceptor seems to have a relatively complicated
configuration that caters for situations over and above what I need relating to
message and error caching when redirects are involved.

A solution to simplify MessageStoreInterceptor would be where it puts the msgs
and errors into the session on one call and automatically switches its state
from STORE to RETRIEVE. On the next request after doing whatever RETRIEVE does,
it could then automatically flip to STORE state.

Would that work?

Another solution would be if the messages and errors are stored in the session
all the time and then removed once they have been displayed, e.g. by the actual
actionmessages or actionerrors tag.

Can I abandon the MessageStoreInterceptor then and somehow tell S2 to put the
actionerrors straight into the session? Then I could extend the taglib to remove
them when displaying them.



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



Re: struts2 displaytag export , [.TableTag] Unable to reset response

2007-09-23 Thread Leonidas Papadakis

That's ok,

i just had to change the order of the filters in my web.xml file and set 
the displaytag first...


Thanks

Leon

Leonidas Papadakis wrote:

Greetings to all,

i have been using displaytag to export data. In ww2 i had to enter in 
my web.xml file :


   
   ResponseOverrideFilter
   
org.displaytag.filter.ResponseOverrideFilter

   

   
   ResponseOverrideFilter
   *.export
   

and set the .export extension to webwork.

I am trying to do the same in stuts2 but i get :

2007-09-23 19:02:54,015 [ERROR] [/app].[default] - Servlet.service() 
for servlet default threw exception
Exception: [.TableTag] Unable to reset response before returning 
exported data. You are not using an export filter. Be sure that no 
other jsp tags are used before display:table or refer to the 
displaytag documentation on how to configure the export filter 
(requires j2ee 1.3).


Does anyone have any idea how to overcome this ?

Thanks

Leon

-
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]



struts2 displaytag export , [.TableTag] Unable to reset response

2007-09-23 Thread Leonidas Papadakis

Greetings to all,

i have been using displaytag to export data. In ww2 i had to enter in my 
web.xml file :


   
   ResponseOverrideFilter
   
org.displaytag.filter.ResponseOverrideFilter

   

   
   ResponseOverrideFilter
   *.export
   

and set the .export extension to webwork.

I am trying to do the same in stuts2 but i get :

2007-09-23 19:02:54,015 [ERROR] [/app].[default] - Servlet.service() for 
servlet default threw exception
Exception: [.TableTag] Unable to reset response before returning 
exported data. You are not using an export filter. Be sure that no other 
jsp tags are used before display:table or refer to the displaytag 
documentation on how to configure the export filter (requires j2ee 1.3).


Does anyone have any idea how to overcome this ?

Thanks

Leon

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



Re: Warn: Parameters: Invalid chunk ignored

2007-09-23 Thread Joakim Olsson
I had exactly the same problem not long ago.

It turned out I had an input-field without a name-attribute.

Regards,
Joakim


On sön, 2007-09-23 at 23:36 +0800, red phoenix wrote:
> I use Tomcat6.0.14 and struts2,I have a jsp page,and there is a button in
> it,when I click this button,it will call Javascript,and redirect another
> page,my code is follows:
> ...
> functioin test(){
>   document.forms[0].action="a.do";
>   document.forms[0].submit();
> }
> ...
> 
>  
>  Test
> 
>
> 
> ...
> 
> When I run above page,it can redirect the page successly,but Tomcat6 say "
> org.apache.tomcat.util.http.Parameters processParameters  Warn: Parameters:
> Invalid chunk ignored.",why raise above warning information,why to correct
> my code to get rid of this warning?


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



Warn: Parameters: Invalid chunk ignored

2007-09-23 Thread red phoenix
I use Tomcat6.0.14 and struts2,I have a jsp page,and there is a button in
it,when I click this button,it will call Javascript,and redirect another
page,my code is follows:
...
functioin test(){
  document.forms[0].action="a.do";
  document.forms[0].submit();
}
...

 
 Test

   

...

When I run above page,it can redirect the page successly,but Tomcat6 say "
org.apache.tomcat.util.http.Parameters processParameters  Warn: Parameters:
Invalid chunk ignored.",why raise above warning information,why to correct
my code to get rid of this warning?


Re: images not being displayed with struts 2

2007-09-23 Thread Oleg Mikheev

Session A Mwamufiya wrote:

I ran a simple jsp page with the  tag to add an image, and it ran fine.  
However, if I do the same in my struts 2 project, I don't get anything showingup.  My 
image file is within the same folder as the jsp file and is referenced the same way 
in both cases.
Any ideas what needs to be done in order to display an image in struts 2?


try putting img src into browser location, what do you see?


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



Re: [s2] How do I output unicode characters please help

2007-09-23 Thread David Harland
How do i do that please?

- Original Message 
From: Leonidas Papadakis <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Sunday, September 23, 2007 10:38:12 AM
Subject: Re: [s2] How do I output unicode characters please help

What if you convert the hex unicode that you get from the db, before you 
show it ... (i.e. when you set the action variable) ...


David Harland wrote:
> These characters are not static they are being created dynamically. I can not 
> put them in a property file. I am getting the hex unicode for the characters 
> from the database as 00fc and then I am trying to set them to a variable in 
> my action eg
>
> setTest("\u00fc")
>
> but when I view the output from 
>
>  
>
> I see ü instead of actual character.  If you put \u00fc in a property 
> file it works correctly why is it not working from an action?
>
> - Original Message 
> From: Leonidas Papadakis <[EMAIL PROTECTED]>
> To: Struts Users Mailing List 
> Sent: Sunday, September 23, 2007 9:09:30 AM
> Subject: Re: [s2] How do I output unicode characters please help
>
> Just put the umlaut character u" directly to your property file and make 
> sure that you save it as utf-8 not ansi e.t.c.
>
> Regards,
>
> Leon
>
> David Harland wrote:
>   
>> Hi,
>>
>> Thanks I have added those properties but it is still outputting ü.
>>
>> Can someone please tell me what I might be doing wrong.
>>
>> Dave.
>>
>> - Original Message 
>> From: Leonidas Papadakis <[EMAIL PROTECTED]>
>> To: Struts Users Mailing List 
>> Sent: Saturday, September 22, 2007 4:22:04 PM
>> Subject: Re: [s2] How do I output unicode characters please help
>>
>> Hi there,
>>
>> in my Greek scenario i have set the below in struts.properties file :
>> struts.i18n.encoding=UTF-8
>> struts.locale = el_GR
>>
>> in my freemarker.properties :
>> default_encoding=UTF-8
>> locale=el_GR
>>
>> in my jsp file :
>> <%@ page contentType="text/html; charset=utf-8" %>
>>
>> Also check the doctype of your resulting html.
>>
>> I hope this will help 
>>
>> Regards
>>
>> Leon
>>
>> David Harland wrote:
>>   
>> 
>>> Hi,
>>>
>>> If I put the following \u00fc in a properties file and use it in a jsp i 
>>> get the german character u" output. If I have an action with the variable 
>>> test and I set it with \u00fc and I output it in a jsp I get the encoding 
>>> ü.
>>>
>>> How do I get the character instead of this encoding please?
>>>
>>> Thanks
>>>
>>> Dave.
>>>
>>>
>>>
>>>
>>>   
>>> 
>>> Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
>>> http://autos.yahoo.com/index.html
>>>  
>>>
>>>
>>>
>>> -
>>> 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]
>>
>>
>>
>>
>>
>>
>>
>> 
>> Pinpoint customers who are looking for what you sell. 
>> http://searchmarketing.yahoo.com/
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>   
>> 
>
>
>
>
>
>
> 
> Be a better Heartthrob. Get better relationship answers from someone who 
> knows. Yahoo! Answers - Check it out. 
> http://answers.yahoo.com/dir/?link=list&sid=396545433
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   





   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

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



Re: [s2] How do I output unicode characters please help

2007-09-23 Thread Leonidas Papadakis
What if you convert the hex unicode that you get from the db, before you 
show it ... (i.e. when you set the action variable) ...



David Harland wrote:

These characters are not static they are being created dynamically. I can not 
put them in a property file. I am getting the hex unicode for the characters 
from the database as 00fc and then I am trying to set them to a variable in my 
action eg

setTest("\u00fc")

but when I view the output from 

 


I see ü instead of actual character.  If you put \u00fc in a property file 
it works correctly why is it not working from an action?

- Original Message 
From: Leonidas Papadakis <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Sunday, September 23, 2007 9:09:30 AM
Subject: Re: [s2] How do I output unicode characters please help

Just put the umlaut character u" directly to your property file and make 
sure that you save it as utf-8 not ansi e.t.c.


Regards,

Leon

David Harland wrote:
  

Hi,

Thanks I have added those properties but it is still outputting ü.

Can someone please tell me what I might be doing wrong.

Dave.

- Original Message 
From: Leonidas Papadakis <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Saturday, September 22, 2007 4:22:04 PM
Subject: Re: [s2] How do I output unicode characters please help

Hi there,

in my Greek scenario i have set the below in struts.properties file :
struts.i18n.encoding=UTF-8
struts.locale = el_GR

in my freemarker.properties :
default_encoding=UTF-8
locale=el_GR

in my jsp file :
<%@ page contentType="text/html; charset=utf-8" %>

Also check the doctype of your resulting html.

I hope this will help 

Regards

Leon

David Harland wrote:
  


Hi,

If I put the following \u00fc in a properties file and use it in a jsp i get the german 
character u" output. If I have an action with the variable test and I set it with 
\u00fc and I output it in a jsp I get the encoding ü.

How do I get the character instead of this encoding please?

Thanks

Dave.




  

Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 




-
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]






   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/


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


  







   

Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433


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


  


Re: [s2] How do I output unicode characters please help

2007-09-23 Thread David Harland
These characters are not static they are being created dynamically. I can not 
put them in a property file. I am getting the hex unicode for the characters 
from the database as 00fc and then I am trying to set them to a variable in my 
action eg

setTest("\u00fc")

but when I view the output from 

 

I see ü instead of actual character.  If you put \u00fc in a property file 
it works correctly why is it not working from an action?

- Original Message 
From: Leonidas Papadakis <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Sunday, September 23, 2007 9:09:30 AM
Subject: Re: [s2] How do I output unicode characters please help

Just put the umlaut character u" directly to your property file and make 
sure that you save it as utf-8 not ansi e.t.c.

Regards,

Leon

David Harland wrote:
> Hi,
>
> Thanks I have added those properties but it is still outputting ü.
>
> Can someone please tell me what I might be doing wrong.
>
> Dave.
>
> - Original Message 
> From: Leonidas Papadakis <[EMAIL PROTECTED]>
> To: Struts Users Mailing List 
> Sent: Saturday, September 22, 2007 4:22:04 PM
> Subject: Re: [s2] How do I output unicode characters please help
>
> Hi there,
>
> in my Greek scenario i have set the below in struts.properties file :
> struts.i18n.encoding=UTF-8
> struts.locale = el_GR
>
> in my freemarker.properties :
> default_encoding=UTF-8
> locale=el_GR
>
> in my jsp file :
> <%@ page contentType="text/html; charset=utf-8" %>
>
> Also check the doctype of your resulting html.
>
> I hope this will help 
>
> Regards
>
> Leon
>
> David Harland wrote:
>   
>> Hi,
>>
>> If I put the following \u00fc in a properties file and use it in a jsp i get 
>> the german character u" output. If I have an action with the variable test 
>> and I set it with \u00fc and I output it in a jsp I get the encoding ü.
>>
>> How do I get the character instead of this encoding please?
>>
>> Thanks
>>
>> Dave.
>>
>>
>>
>>
>>   
>> 
>> Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
>> http://autos.yahoo.com/index.html
>>  
>>
>>
>>
>> -
>> 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]
>
>
>
>
>
>
>
> 
> Pinpoint customers who are looking for what you sell. 
> http://searchmarketing.yahoo.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   





   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433

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



images not being displayed with struts 2

2007-09-23 Thread Session A Mwamufiya
Hi,

I ran a simple jsp page with the  tag to add an image, and it ran fine.  
However, if I do the same in my struts 2 project, I don't get anything 
showingup.  My image file is within the same folder as the jsp file and is 
referenced the same way in both cases.

Any ideas what needs to be done in order to display an image in struts 2?

Thanks,
Session


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



Re: [s2] How do I output unicode characters please help

2007-09-23 Thread Leonidas Papadakis
Just put the umlaut character u" directly to your property file and make 
sure that you save it as utf-8 not ansi e.t.c.


Regards,

Leon

David Harland wrote:

Hi,

Thanks I have added those properties but it is still outputting ü.

Can someone please tell me what I might be doing wrong.

Dave.

- Original Message 
From: Leonidas Papadakis <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Saturday, September 22, 2007 4:22:04 PM
Subject: Re: [s2] How do I output unicode characters please help

Hi there,

in my Greek scenario i have set the below in struts.properties file :
struts.i18n.encoding=UTF-8
struts.locale = el_GR

in my freemarker.properties :
default_encoding=UTF-8
locale=el_GR

in my jsp file :
<%@ page contentType="text/html; charset=utf-8" %>

Also check the doctype of your resulting html.

I hope this will help 

Regards

Leon

David Harland wrote:
  

Hi,

If I put the following \u00fc in a properties file and use it in a jsp i get the german 
character u" output. If I have an action with the variable test and I set it with 
\u00fc and I output it in a jsp I get the encoding ü.

How do I get the character instead of this encoding please?

Thanks

Dave.




  

Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 




-
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]






   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/


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