Re: How would you solve this problem?

2005-11-17 Thread Michael Jouravlev
On 11/17/05, Preston CRAWFORD <[EMAIL PROTECTED]> wrote:
> the UI requirement is that the user perform the
> search and then (as transparent as possible to them) have the page
> refresh the portions of the display that say what medical provider is
> currently selected.

Ajax?

> Basically we want a popup that performs a search, updates some data on
> the page and in the form on the page, without actually doing the final
> submit and save.

You can submit HTML form to server, store temporary data in the
session (for example, as a nested property of session-scoped
ActionForm) and then commit session data to the database only if
needed. If not needed, session data is discarded and database knows
nothing about it.

> Hopefully someone gets the question and can help.

I guess I did not :)

Michael.

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



Re: Posting from 1JSP to 2Actions and 2Forms

2005-11-17 Thread Michael Jouravlev
Umm, no. I remember I did some experiments with action chaining with
different scopes. I either defined forms for both actions or as a
second option I did not define one of the forms. I do not remember
were these forms with the same name or not. I cannot find the results.

You might try it yourself or just trace the code. But if the request
data is not populated into second form automatically you may try to
stick data from the first form into request object and see what
happens :)

They are not supposed to work this way.

Michael

On 11/17/05, Oleg <[EMAIL PROTECTED]> wrote:
> Michael, I tried that, however it seems to work only if actions are
> using same ActionForm if lets say each action uses its own form, the
> second action gets the form with its original values (from session)
> without any changes taken from the JSP page. Any ideas?
>
> Thanks
> Oleg
>
> On 11/16/05, Oleg <[EMAIL PROTECTED]> wrote:
> > Hehe I see, but unfortunatelly its the only way I can see how to
> > implement this kind of functionality. The only way to avoid chaining
> > here would be to separate this one jsp page in two and have client
> > input form in two different steps. Problem is that this is not what
> > client wants :) so chaining it is
> >
> > Oleg
> >
> > On 11/15/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > > If I remember correctly, when you either forward or redirect from one
> > > action to another, Struts performs the reset/populate/validate
> > > sequence again. If you redirect, the request is empty, so nothing to
> > > populate and the form corresponding to second action is not updated.
> > > But if you forward from one action to another, the request object
> > > still retains the input data, and is applied to the second form. If
> > > your second form has setters and they are compatible name-wize with
> > > input parameters, they will be set.
> > >
> > > On the other hand, what you want to do is a clear example of action
> > > chaining which is frowned upon ;-)
> > >
> > > Michael.
> > >
> > > On 11/14/05, Oleg <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I found a long thread talking about one jsp, two action, two action
> > > > forms. However my situation is a bit different and suggested solutions
> > > > would not work, plus I didn't want resurrect an old thread :)
> > > >
> > > > I have:
> > > >
> > > > Jsp A -> Action A (ActionForm A)
> > > >
> > > > Now there are occasions when I need another action, Action B executed
> > > > before Action A but I can only use one jsp page. So what I would have
> > > > is:
> > > >
> > > > Jsp AB - Action B(ActionForm B) ->Action A(ActionForm A)
> > > >
> > > > Where Jsp AB has information to populate both ActionForms A and B.
> > > > Both ActionForms are session scope.
> > > >
> > > > Option 1. Would be to manually populate  ActionForm A in Action B, but
> > > > I would like to avoid that since there will be other possible Actions
> > > > similar to Action B(ActionForm B), so Action C, Action D all ending up
> > > > calling Action A(ActionForm A) and I don't want to change all of them
> > > > every time ActionForm A changes.
> > > >
> > > > Option 2. What if I ActionForm B extends ActionForm A and than it
> > > > becomes something like:
> > > > Jsp AB - Action B(ActionForm B) ->Action A { ...ActionForm A =
> > > > (ActionForm A)ActionForm B..}
> > > >
> > > > This could work but than I am out of luck when I need to use a
> > > > DynaValidatorForm as ActionForm C in  Action C(ActionForm C) - >
> > > > Action A(ActionForm A)
> > > >
> > > > What do you think guys? Whats the best way to go about it.
> > > >
> > > > Thanks,
> > > > Oleg
> > > >
> > > > -
> > > > 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]
>
>

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



Re: Is Shale the way forward?

2005-11-17 Thread Craig McClanahan
On 11/17/05, pc leung <[EMAIL PROTECTED]> wrote:
>
> As you memtion "JSF over Struts 1.x is definitely on the upswing",
> why to use shale? why not just MyFaces? any additional value added by
> shale?


"MyFaces" means two different things -- the JSF implementation and the
Tomahawk components.

As I mentioned earlier, the MyFaces and RI implementations of JSF are
interchangeable. But neither have the extra functionality that Shale
provides -- if the feature list on the Shale page interests you, you will
want to use it (with *either* implementation). Make your judgement between
JSF implementations based on beyond-spec features and/or performance and/or
quality.

If you like the Tomahawk components, feel free to use them -- with either
the MyFaces or Ri implementations -- and with or without Shale. Mix and
match what you need.

Your messages don't make it clear that you understand that things like
"Shale versus MyFaces" are *not* decisions you need to even make.

Thanks


Craig


RE: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-17 Thread Vishal Dalal

Hi, 
sorry for intervening. Actually my query is realted to the Caching part...
Actually i wanted to ask, do placing all these paramteres actually guarantee
that the page will be cached, because i think not.

I myself have tried writing all this code in the page. Then when you go
forward from this page and click back, then the same content is displayed as
was done before...
This clearly implies that the brower caches the page and displays that when
you click back...

Please point out in case i am going wrong or if my logic is incorrect..

Thanks for reading

-Vishal

-Original Message-
From: atta-ur rehman [mailto:[EMAIL PROTECTED]
Sent: Friday, November 18, 2005 12:39 PM
To: Struts Users Mailing List
Subject: Re: Action.execute() only being invoked the first time a url is
requested ??!!!


Hi,

Most probably your page is gettnig cached by the browser. try








or

<%
response.setHeader("pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", 0);
%>

to keep your browser from caching the page and see if it works.

HTH.

ATTA

On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote:
>
>
> For Example if I type in my browser address bar:
>
> http://127.0.0.1:8080/webapp/userSignup.do?action=whatever
>
> The first time, I type this in, this invokes the
> execute method of my Action class (I'm using
> System.out ("Action execute Invoked") in Action
> execute to test this). If I then enter the exact same
> url, this method is not getting called.
>
> I am not using validator at all!!
>
> Can anyone explain what is going on with this?
>
>
>
>
> __
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



Re: Is Shale the way forward?

2005-11-17 Thread pc leung
As you memtion "JSF over Struts 1.x is definitely on the upswing",
why to use shale? why not just MyFaces? any additional value added by shale?

Thanks


On 11/18/05, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> On 11/17/05, pc leung <[EMAIL PROTECTED]> wrote:
> >
> > I have the same question too.
> > Next month, Craig will deliver a speech at ApacheCon.
> > After that it will be more clear. ;-)
> >
> > In documentation web page, several features contains 'FIXME' only.
> > But there are several jsf demo out there.
> > If there is a installation guide and a sample web app which shows
> > how to go from Struts to Shale, it is very much better.
> >
> > Apache also puzzles me that it has Struts-Faces integration
> > which is not Shale. There are several similar projects going. Apache
> > does not tell me how to choose.
>
>
> In large part, that's because the world is fractal, not binary :-). There's
> no one answer that fits all cases.
>
> But, the shortest way to look at what I personally recommend to people is to
> start from a single question -- are you talking about maintaining an
> existing application or a new project?
>
> If you're maintaining an existing Struts-based appiication, there's no
> *requirement* that you change anything. If it continues to meet your needs,
> stick with it. Struts 1.x is not going away (at least until the last
> committer decides to lay down their keyboards and do something else, which I
> don't see happening anytime soon). However, even on an existing Struts
> application, you may find yourself in need of sophisticated UI components
> built to the JSF APIs, and/or you may find that the controller tier of JSF
> makes more sense to your newer developers than the action oriented framework
> we know and love. If this is you, then the struts-faces library offers you
> an opportunity to transition your JSP pages to use JSF components instead of
> Struts HTML tags, one page at a time ... without modifying any of your
> Action or ActionForm classes. Perfect for the scenario where you cannot
> afford to convert the entire app at once ... migrate it at your own pace, as
> you are making other changes.
>
> For new apps, the key issues are (a) does one or the other meet your needs
> better, and (b) if JSF looks good, do I have time to familiarize my
> development staff with it? If you get a clear answer from (a), go with it.
> If you have a room full of people who know Struts 1.x, and the deadline on
> your new project is impossibly short, stick with what you know. If, on the
> other hand, you want to build something that will ultimately let you
> integrate with all the innovation (and the growing community) around JSF,
> then you should look at investing the time now -- probably starting on small
> projects -- to gain some expertise in JSF.
>
> The real message, though, is that JSF/Shale versus Struts 1.x is not an
> issue of "good versus bad" or "bad versus good" -- it's an issue of "good
> versus better" or "better versus good" (depending upon your circumstances).
>
> Craig
>
> PS: My view of the world today is that the percentage of choices for JSF
> over Struts 1.x is definitely on the upswing, and that this trend will
> accellerate. That's why I, personally, am spending all my open source time
> in the JSF/Shale world, and no longer working on Struts 1.x. I can do this,
> of course, because there are many other developers in the Struts community
> who *are* working on 1.x ... it's in good hands.
>
> PPS: Count the number of tools that support / books that document / magazine
> articles that describe / blog entries that talk about / jobs that require /
> etc. related to Struts (which is now 5.5 years old). Do the same counts
> about JSF (which is about 1.5 years old). Draw your own conclusions on the
> trends around mainstream support for these technologies.
>
>

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



Re: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-17 Thread atta-ur rehman
Hi,

Most probably your page is gettnig cached by the browser. try








or

<%
response.setHeader("pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", 0);
%>

to keep your browser from caching the page and see if it works.

HTH.

ATTA

On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote:
>
>
> For Example if I type in my browser address bar:
>
> http://127.0.0.1:8080/webapp/userSignup.do?action=whatever
>
> The first time, I type this in, this invokes the
> execute method of my Action class (I'm using
> System.out ("Action execute Invoked") in Action
> execute to test this). If I then enter the exact same
> url, this method is not getting called.
>
> I am not using validator at all!!
>
> Can anyone explain what is going on with this?
>
>
>
>
> __
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[shale] Heads up if building Shale from source

2005-11-17 Thread Craig McClanahan
Recent commits to the Shale build environment have updated two dependencies:
* Commons Validator (1.1.4 --> 1.2.0)
* Apache MyFaces (1.1.0 --> 1.1.1)

If you are checking out the source yourself, and using the Ant build
scripts, you will want to run "ant download-dependencies" to pick up the
most recent versions of these dependencies.

Craig


Re: Is Shale the way forward?

2005-11-17 Thread Craig McClanahan
On 11/17/05, pc leung <[EMAIL PROTECTED]> wrote:
>
> I have the same question too.
> Next month, Craig will deliver a speech at ApacheCon.
> After that it will be more clear. ;-)
>
> In documentation web page, several features contains 'FIXME' only.
> But there are several jsf demo out there.
> If there is a installation guide and a sample web app which shows
> how to go from Struts to Shale, it is very much better.
>
> Apache also puzzles me that it has Struts-Faces integration
> which is not Shale. There are several similar projects going. Apache
> does not tell me how to choose.


In large part, that's because the world is fractal, not binary :-). There's
no one answer that fits all cases.

But, the shortest way to look at what I personally recommend to people is to
start from a single question -- are you talking about maintaining an
existing application or a new project?

If you're maintaining an existing Struts-based appiication, there's no
*requirement* that you change anything. If it continues to meet your needs,
stick with it. Struts 1.x is not going away (at least until the last
committer decides to lay down their keyboards and do something else, which I
don't see happening anytime soon). However, even on an existing Struts
application, you may find yourself in need of sophisticated UI components
built to the JSF APIs, and/or you may find that the controller tier of JSF
makes more sense to your newer developers than the action oriented framework
we know and love. If this is you, then the struts-faces library offers you
an opportunity to transition your JSP pages to use JSF components instead of
Struts HTML tags, one page at a time ... without modifying any of your
Action or ActionForm classes. Perfect for the scenario where you cannot
afford to convert the entire app at once ... migrate it at your own pace, as
you are making other changes.

For new apps, the key issues are (a) does one or the other meet your needs
better, and (b) if JSF looks good, do I have time to familiarize my
development staff with it? If you get a clear answer from (a), go with it.
If you have a room full of people who know Struts 1.x, and the deadline on
your new project is impossibly short, stick with what you know. If, on the
other hand, you want to build something that will ultimately let you
integrate with all the innovation (and the growing community) around JSF,
then you should look at investing the time now -- probably starting on small
projects -- to gain some expertise in JSF.

The real message, though, is that JSF/Shale versus Struts 1.x is not an
issue of "good versus bad" or "bad versus good" -- it's an issue of "good
versus better" or "better versus good" (depending upon your circumstances).

Craig

PS: My view of the world today is that the percentage of choices for JSF
over Struts 1.x is definitely on the upswing, and that this trend will
accellerate. That's why I, personally, am spending all my open source time
in the JSF/Shale world, and no longer working on Struts 1.x. I can do this,
of course, because there are many other developers in the Struts community
who *are* working on 1.x ... it's in good hands.

PPS: Count the number of tools that support / books that document / magazine
articles that describe / blog entries that talk about / jobs that require /
etc. related to Struts (which is now 5.5 years old). Do the same counts
about JSF (which is about 1.5 years old). Draw your own conclusions on the
trends around mainstream support for these technologies.


Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-17 Thread Mon Cab

For Example if I type in my browser address bar:

http://127.0.0.1:8080/webapp/userSignup.do?action=whatever

The first time, I type this in, this invokes the
execute method of my Action class (I'm using
System.out ("Action execute Invoked") in Action
execute to test this).  If I then enter the exact same
url, this method is not getting called.  

I am not using validator at all!!  

Can anyone explain what is going on with this?




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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



Re: Is Shale the way forward?

2005-11-17 Thread pc leung
I have the same question too.
Next month, Craig will deliver a speech at ApacheCon.
After that it will be more clear. ;-)

In documentation web page, several features contains 'FIXME' only.
But there are several jsf demo out there.
If there is a installation guide and a sample web app which shows
how to go from Struts to Shale, it is very much better.

Apache also puzzles me that it has Struts-Faces integration
which is not Shale. There are several similar projects going. Apache
does not tell me how to choose.


On 11/18/05, Preston CRAWFORD <[EMAIL PROTECTED]> wrote:
> It appears that way. I've been so heads-down doing Struts alone that I
> hadn't really noticed this change in direction. I applaud the Struts
> team for being nimble and picking a direction while keeping backwards
> compatability. My question, though, is how many of you out there are
> actually beginning to head this direction? That's what I mean when I ask
> if it's the way forward. Is this gaining traction? I'm just curious
> because I like to keep up with what's current (within reason as I have
> carpal tunnel, thus can't lug giant books nor spend as much time on the
> computer at home as I once could).
>
> Preston
>
> -
> 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]



How would you solve this problem?

2005-11-17 Thread Preston CRAWFORD
Okay, this is a little complex, so hopefully I can describe it well so
as not to confuse anyone. 

We have a need for the following. We need a reusable set of actions,
JSPs, etc. that operate in a popup to allow the user to search for a
medical provider. That's easy enough. The catch is this. The reason for
a popup is because the UI requirement is that the user perform the
search and then (as transparent as possible to them) have the page
refresh the portions of the display that say what medical provider is
currently selected. So you might have a page. In other words when the
search is performed a hidden form field will get updated (via Javascript
currently) with selected Provider ID. And then N number of fields are
going to be populated with some data to let the user know which provider
has been selected.

The trick is that since we're using Javascript currently the Javascript
is basically statically calling form names and form fields and changing
data based on what it's getting from the search action. So something
like this.





Obviously problem #1 is that this JSP page can't be used on other views
because it references by name the name of the form. I'm not sure how to
dynamically get this to the JSP page without passing around a token of
some kind or passing around values in the request stream. That seems
like it could get ugly. Plus if I have to update, visually, more than
just the name of the hospital, for example, how would I handle that?
Imagining ANOTHER JSP page with separate Javascript.

function updateParentAndCloseSelf() {
changeParentFormValue('anotherForm', 'hospital', '');
changeParentDOMElement('hospitalLabel', '');
changeParentDOMElement('hospitalAddressLabel', '');
changeParentDOMElement('hospitalStateLabel', '');
window.close();
}

In short, it could get REALLY ugly. 

Now another option is that we actually give in (I say give in because
it would mean a page refresh, something that might not go over well),
submit the form, but don't save the data to the database yet, and then
somehow via request or session retain any other field data they may have
changed for when we hit the page again, without saving it to the
database.

Okay, hopefully that makes some sense.

Basically we want a popup that performs a search, updates some data on
the page and in the form on the page, without actually doing the final
submit and save. And we'd like it to be reusable, if possible. So far we
can't think of the best way to approach this, in terms of the UI.
Hopefully someone gets the question and can help. If not I understand,
believe me. 

Preston

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



Is Shale the way forward?

2005-11-17 Thread Preston CRAWFORD
It appears that way. I've been so heads-down doing Struts alone that I
hadn't really noticed this change in direction. I applaud the Struts
team for being nimble and picking a direction while keeping backwards
compatability. My question, though, is how many of you out there are
actually beginning to head this direction? That's what I mean when I ask
if it's the way forward. Is this gaining traction? I'm just curious
because I like to keep up with what's current (within reason as I have
carpal tunnel, thus can't lug giant books nor spend as much time on the
computer at home as I once could).

Preston

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



Re: Posting from 1JSP to 2Actions and 2Forms

2005-11-17 Thread Oleg
Michael, I tried that, however it seems to work only if actions are
using same ActionForm if lets say each action uses its own form, the
second action gets the form with its original values (from session)
without any changes taken from the JSP page. Any ideas?

Thanks
Oleg

On 11/16/05, Oleg <[EMAIL PROTECTED]> wrote:
> Hehe I see, but unfortunatelly its the only way I can see how to
> implement this kind of functionality. The only way to avoid chaining
> here would be to separate this one jsp page in two and have client
> input form in two different steps. Problem is that this is not what
> client wants :) so chaining it is
>
> Oleg
>
> On 11/15/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > If I remember correctly, when you either forward or redirect from one
> > action to another, Struts performs the reset/populate/validate
> > sequence again. If you redirect, the request is empty, so nothing to
> > populate and the form corresponding to second action is not updated.
> > But if you forward from one action to another, the request object
> > still retains the input data, and is applied to the second form. If
> > your second form has setters and they are compatible name-wize with
> > input parameters, they will be set.
> >
> > On the other hand, what you want to do is a clear example of action
> > chaining which is frowned upon ;-)
> >
> > Michael.
> >
> > On 11/14/05, Oleg <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I found a long thread talking about one jsp, two action, two action
> > > forms. However my situation is a bit different and suggested solutions
> > > would not work, plus I didn't want resurrect an old thread :)
> > >
> > > I have:
> > >
> > > Jsp A -> Action A (ActionForm A)
> > >
> > > Now there are occasions when I need another action, Action B executed
> > > before Action A but I can only use one jsp page. So what I would have
> > > is:
> > >
> > > Jsp AB - Action B(ActionForm B) ->Action A(ActionForm A)
> > >
> > > Where Jsp AB has information to populate both ActionForms A and B.
> > > Both ActionForms are session scope.
> > >
> > > Option 1. Would be to manually populate  ActionForm A in Action B, but
> > > I would like to avoid that since there will be other possible Actions
> > > similar to Action B(ActionForm B), so Action C, Action D all ending up
> > > calling Action A(ActionForm A) and I don't want to change all of them
> > > every time ActionForm A changes.
> > >
> > > Option 2. What if I ActionForm B extends ActionForm A and than it
> > > becomes something like:
> > > Jsp AB - Action B(ActionForm B) ->Action A { ...ActionForm A =
> > > (ActionForm A)ActionForm B..}
> > >
> > > This could work but than I am out of luck when I need to use a
> > > DynaValidatorForm as ActionForm C in  Action C(ActionForm C) - >
> > > Action A(ActionForm A)
> > >
> > > What do you think guys? Whats the best way to go about it.
> > >
> > > Thanks,
> > > Oleg
> > >
> > > -
> > > 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]



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
1. I use this to set the locale:
request.getSession().setAttribute(Globals.LOCALE_KEY, Lcoale.JAPANESE);

2. yes, properties file has some.

3. the whole page is in english

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



Re: ArrayList, Arrays and

2005-11-17 Thread Michael Jouravlev
On 11/17/05, Jon Wynacht <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a question that might have already been answered but  I wasn't
> sure how to search for the answer, etc. so  I'll ask it and take the
> abuse, if given ;-)
>
> I have a form which is set up to have N number of line items.
> Initially, there is only one item in the form, which stores all of
> the items in an ArrayList. A user can add N number of line items
> before saving the value of the items to the database.
>
> However, my problem lies in easily redisplaying the values and the
> line items.
>
> The way I do it now is the ActionForm has an ArrayList which holds
> all of the line items (as beans) and when it gets called initially,
> the ArrayList gets iterated and the new line item is displayed.
> Values are entered and an icon is clicked to add another line item.
> The values for current line items are gathered via the ActionForm
> using int[] and String[] and then the ArrayList is repopulated, a new
> line item added and the process starts all over again.
>
> Sounds complicated? Yeah, it's kind of complicated but I have this
> feeling I'm making it that way.

If something like this is acceptable
http://www.superinterface.com/strutsdialog/crudactionlite.do

then the source code can be obtained here
https://sourceforge.net/project/showfiles.php?group_id=49385&package_id=154597
in dialogs-samples-1.24.zip file.

--
Struts Dialogs: code-behind for Struts
http://struts.sourceforge.net/strutsdialogs

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



[ANN] Struts Dialogs 1.24 is released

2005-11-17 Thread Michael Jouravlev
[In brief]
  * event-to-handler mapping now can be defined
in struts-config.xml file;
  * Action class does not need to extend SelectAction
or DialogAction anymore to employ their dispatching
features.

Quick link: http://struts.sourceforge.net/strutsdialogs
Download: 
https://sourceforge.net/project/showfiles.php?group_id=49385&package_id=154597

See details below.

[Externalized event mapping]

It is not necessary anymore to define event-to-handler mapping in
getMethodMap() method. While you can still use it, another option is
to define event mapping in the struts-config.xml file. This allows to
get a clean action mapping which defines all aspects of an action:
input event mapping, transfer mapping and output view mapping.

Externalized event-to-handler mapping is currently supported for new
syntax only, that is for  elements but not for 
elements.

For example, this action mapping defines a login dialog using standard
 element:


  
  
  


LoginDialog must also define an event-to-hanlder map like this:

protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put("DIALOG_EVENT-INIT", "init");
  map.put("DIALOG_EVENT-LOGIN", "login");
  return map;
}

Now if you switch to new  syntax, you can define action
mapping along with event-to-handler map like this:


  
  
  


[Using SelectAction and DialogAction as utility class]

If your action class has to extend another base class, you can use
SelectAction or DialogAction as utility class. Just declare a private
instance of either of these dispatching classes, define
event-to-handler map, and pass your custom action class as and
argument:

public class MyAction extends MyBaseAction implements ISelectAction {

  private SelectAction selectAction = new SelectAction() {
protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put(getInitKey() + "-ADD", "add");
  map.put(getInitKey() + "-DELETE", "delete");
  map.put(getInitKey() + "-LOGIN", "login");
  map.put(getInitKey() + "-CANCEL", "cancel");
  return map;
}
  };

  public ActionForward execute(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response)
throws Exception {

// ...
// Do your own stuff here
// ...

// Dispatch to handler, pass reference to self in the first argument.
return selectAction.execute(this, mapping, form, request, response);
  }
  ...
}

Michael J.

--
Struts Dialogs: code-behind for Struts
http://struts.sourceforge.net/strutsdialogs

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



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Yujun Liang
 or  doesn't matter.

Only button.add in English or everything is in English for the page?

1. How do you construct the . in the following statement?

session.setAttribute("org.apache.struts.action.LOCALE", .)

2. Do you have
button.add=加えなさい

in your *_ja.properties?

Regards

On 11/18/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> Globals.LOCALE_KEY is a String constant with the value
> "org.apache.struts.Globals.LOCALE_KEY" so yes, the hashcode would be the
> same in either case. That's not it...
>
> L.
>
> Yujun Liang wrote:
> > 1.
> > request.getSession().setAttribute(Globals.LOCALE_KEY, locale);
> >
> > I use org.apache.struts.Globals.LOCALE_KEY and it works,
> >
> > is the hashcode of org.apache.struts.action.LOCALE same as
> > I use org.apache.struts.Globals.LOCALE_KEY?
> >
> > 2. Do you have
> > button.add=加えなさい
> >
> > in your *_ja.properties?
> >
> > Regards
> >
> > On 11/18/05, Lixin Chu < [EMAIL PROTECTED]> wrote:
> >
> >>I set to ja in the session;
> >>
> >>I removed locale="true" from JSP but the result is the same.
> >>
> >>Browser encoding is set to UTF-8.
> >>
> >>When I 'view source' in the browser, I saw  if I set
> >>to Chinese. But I do not see this :
> >>
> >>
> >>
> >>is this ok ?
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > --
> > Yujun Liang
> > [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Yujun Liang
[EMAIL PROTECTED]


Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
that's right, they are the same.

now I follow Laurie's suggestion and found that request.getLocale()
always return 'en' - regardless locale='true' or 'false' setting.

how does this happen ?

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



Re: ArrayList, Arrays and

2005-11-17 Thread Laurie Harper

Jon Wynacht wrote:

...
You see, when I iterate through the ArrayList, I do something like this:



value="


..



For starters, the  just gives me a lot of <>  stuff. 
My taglibs are all good as I've tested the   outside of the 
value="" and it works fine.

...


Well, nesting tags that way isn't legal JSP. You can't have a JSP custom 
tag as the value of an attribute on another JSP custom tag. That's what 
jsp:attribute is for:






...

Of course if you bind the html:text to your form bean properly, you 
don't need to specify the value, it'll come from the form automatically. 
If your form bean is named 'AddEventGroup', just delete the 'name' and 
'value' attributes and it should just work.


L.


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



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Laurie Harper
Globals.LOCALE_KEY is a String constant with the value
"org.apache.struts.Globals.LOCALE_KEY" so yes, the hashcode would be the
same in either case. That's not it...

L.

Yujun Liang wrote:
> 1.
> request.getSession().setAttribute(Globals.LOCALE_KEY, locale);
> 
> I use org.apache.struts.Globals.LOCALE_KEY and it works,
> 
> is the hashcode of org.apache.struts.action.LOCALE same as
> I use org.apache.struts.Globals.LOCALE_KEY?
> 
> 2. Do you have
> button.add=加えなさい
> 
> in your *_ja.properties?
> 
> Regards
> 
> On 11/18/05, Lixin Chu <[EMAIL PROTECTED]> wrote:
> 
>>I set to ja in the session;
>>
>>I removed locale="true" from JSP but the result is the same.
>>
>>Browser encoding is set to UTF-8.
>>
>>When I 'view source' in the browser, I saw  if I set
>>to Chinese. But I do not see this :
>>
>>
>>
>>is this ok ?
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> --
> Yujun Liang
> [EMAIL PROTECTED]
> 


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



Re: Struts and SEO

2005-11-17 Thread netsql
You can have a nighly job that creates plain jsp's per content, that 
link/redirect to your dynamic content.
You can have mutiple domains/boxes with this "static/artifical" content, 
thus increasing ranking.
( I write async. jobs in Groovy myself... you can use Python or .. 
grrr... Java)

When robots come by, they pick up mutiple links to your dynamic content.

Nothing in Struts that prevents you to having a short readable url, and 
url is used in SEO. Ex: 
http://site_about_xbox_games_including_halo.mydomain.com (this woks for 
a certain engine) can be filter resolved to 
http://mydomain.com?contnt_id=123213131 and still show the long name in 
url.(and tiles do not affect this)


Your content needs to ... be very relevent in the 1st or 2nd sentence, 
so consider having and displaying a summary field, becuase spiders will 
not look in the middle of the page for you.


Also, it takes about 6 weeks or more to see a reaction on search engines 
so when you do something, you have to wait to see the effect.


Consider hosting own Lucene search engine, just to learn more about fts 
indexing and shorten feedback loop.


That will be $100 please ;-)

.V


Tony Santinello wrote:

All,

I'm currently working on a site that uses Struts.  One
of the priorities of the site was to make it highly
flexible to the changing needs of our customer base. 
Search Engine Optimization was not a priority at the

time of development.  Now it is.

Our rankings on search engines, like Google, are
extremely low. I understand rankings have a lot to do
with content, incoming links, etc.  But I was told by
a number of sources that due to the dynamic content of
JSP and Struts, spiders have a difficult time crawling
the site.  Even to the point where a spider gets
losted/confused.  Is this true?

A number of things have been recommended to us to
improve our rankings, such as removing the session id,
limiting parameters on the url string to calling jsp
pages directly and not going through actions.

Can anyone add some insight in terms of the relation
between Struts / Search Engines / Spiders?  Why
Struts/Spiders don't get along? How can I get a spider
to search my site without having to recode my actions
and jsp pages?  


Thanks,
Tony



__ 
Yahoo! FareChase: Search multiple travel sites in one click.

http://farechase.yahoo.com



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



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Yujun Liang
1.
request.getSession().setAttribute(Globals.LOCALE_KEY, locale);

I use org.apache.struts.Globals.LOCALE_KEY and it works,

is the hashcode of org.apache.struts.action.LOCALE same as
I use org.apache.struts.Globals.LOCALE_KEY?

2. Do you have
button.add=加えなさい

in your *_ja.properties?

Regards

On 11/18/05, Lixin Chu <[EMAIL PROTECTED]> wrote:
>
> I set to ja in the session;
>
> I removed locale="true" from JSP but the result is the same.
>
> Browser encoding is set to UTF-8.
>
> When I 'view source' in the browser, I saw  if I set
> to Chinese. But I do not see this :
>
> 
>
> is this ok ?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Yujun Liang
[EMAIL PROTECTED]


Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
I set to ja in the session;

I removed locale="true" from JSP but the result is the same.

Browser encoding is set to UTF-8.

When I 'view source' in the browser, I saw  if I set
to Chinese. But I do not see this :



is this ok ?

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



Ich bin im Urlaub

2005-11-17 Thread bednarz
Sehr geehrte Damen und Herren,

in der zeit vom 7. November 2005 bis 18. November 2005 bin ich im Urlaub. Bitte 
wenden Sie sich bei allen Fragen entweder direkt an [EMAIL PROTECTED] oder 
telefonisch an: 0511 / 93 62 28 22


Mit freundlichen Grüßen

Andreas Bednarz
...
ID.on GmbH
DESIGN and BUSINESS INTELLIGENCE
...
Wagenerstraße 3 | 30169 Hannover
Fon +49(0) 511.93 62 28 - 22
Fax +49 (0)511.93 62 28 - 28
E-Mail [EMAIL PROTECTED]
...
http://www.id-on.de
http://www.e-konfigurator.de



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



ArrayList, Arrays and

2005-11-17 Thread Jon Wynacht

Hi,

I have a question that might have already been answered but  I wasn't  
sure how to search for the answer, etc. so  I'll ask it and take the  
abuse, if given ;-)


I have a form which is set up to have N number of line items.  
Initially, there is only one item in the form, which stores all of  
the items in an ArrayList. A user can add N number of line items  
before saving the value of the items to the database.


However, my problem lies in easily redisplaying the values and the  
line items.


The way I do it now is the ActionForm has an ArrayList which holds  
all of the line items (as beans) and when it gets called initially,  
the ArrayList gets iterated and the new line item is displayed.  
Values are entered and an icon is clicked to add another line item.  
The values for current line items are gathered via the ActionForm  
using int[] and String[] and then the ArrayList is repopulated, a new  
line item added and the process starts all over again.


Sounds complicated? Yeah, it's kind of complicated but I have this  
feeling I'm making it that way.


You see, when I iterate through the ArrayList, I do something like this:



value="


..



For starters, the  just gives me a lot of <>  
stuff. My taglibs are all good as I've tested the   
outside of the value="" and it works fine.


Any ideas as to what's going on with that, as well as pointers to do  
this kind of nested processing better?


Thanks in advance,

Jon

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



Struts and SEO

2005-11-17 Thread Tony Santinello
All,

I'm currently working on a site that uses Struts.  One
of the priorities of the site was to make it highly
flexible to the changing needs of our customer base. 
Search Engine Optimization was not a priority at the
time of development.  Now it is.

Our rankings on search engines, like Google, are
extremely low. I understand rankings have a lot to do
with content, incoming links, etc.  But I was told by
a number of sources that due to the dynamic content of
JSP and Struts, spiders have a difficult time crawling
the site.  Even to the point where a spider gets
losted/confused.  Is this true?

A number of things have been recommended to us to
improve our rankings, such as removing the session id,
limiting parameters on the url string to calling jsp
pages directly and not going through actions.

Can anyone add some insight in terms of the relation
between Struts / Search Engines / Spiders?  Why
Struts/Spiders don't get along? How can I get a spider
to search my site without having to recode my actions
and jsp pages?  

Thanks,
Tony



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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



RE: Message Resources from DB

2005-11-17 Thread Brian Russell
Actually I saw that one and never was able to get it running. And you
are certainly right that I wouldn't want to have any jndi or sql
references in my struts config.

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 5:15 PM
To: Struts Users Mailing List
Subject: RE: Message Resources from DB

I got one of these solutions out and it talks about setting up the
resource like this:

  
  



1. I do not want to put jndi information in my struts
2. I do not want to put any SQL or SQL-Like pieces into my struts.

So, is there a way to configure this to call a Service Object instead of
the "JNDI | SQL" above?




-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 3:56 PM
To: Struts Users Mailing List
Subject: Re: Message Resources from DB

No, you are not wrong.  Struts will likely be changed to use Commons  
Resources after a 1.3.x goes "GA".  Of course, Commons Resources  
needs to go "GA" itself soon.

I have already written several Database implementations for Commons  
Resources (Hibernate, iBatis, JDBC-only).  However, some of that work  
is not checked into SVN and some of it (at the time it was written)  
was not allowed in SVN due to incompatible licensing with ASL.

I don't really have a lot of free time to assist, but I'll do what I  
can.

Are you using any O/R frameworks or are you just doing straight jdbc?

--
James Mitchell
678.910.8017
Skpe: jmitchtx



On Nov 16, 2005, at 4:08 PM, Brian Russell wrote:

> I got James's solution from:
>
> http://sourceforge.net/project/showfiles.php? 
> group_id=49385&package_id=7
> 6369
>
> I also found another solution at:
>
> http://sourceforge.net/project/showfiles.php? 
> group_id=49385&package_id=1
> 49742
>
> And I know the team is working on a solution to be included in
> Commons-Resources and hopefully Struts 1.3.. but I may be wrong about
> that.
>
> Brian Russell
> www.closerware.com
>
>
> -Original Message-
> From: Mick Knutson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 4:00 PM
> To: Struts Users Mailing List
> Subject: RE: Message Resources from DB
>
> Can you send me the solution to that? I don't have that book, I  
> have an
> older version without that solution.
>
> -Original Message-
> From: Brian Russell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 12:58 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Message Resources from DB
>
> Ah.. the man himself! I'm using MySql. I set up my database with the
> tables from the scripts in the /sql directory. And of course did the
> rest of the steps (i.e. updating struts-config, placing xml files in
> /WEB-INF/classes dir, etc.)
>
> Thanks!
>
> Brian Russell
> www.closerware.com
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 3:47 PM
> To: Struts Users Mailing List
> Subject: Re: Message Resources from DB
>
> What database would you like to use?
>
> --
> James Mitchell
> 678.910.8017
> Skpe: jmitchtx
>
>
>
> On Nov 16, 2005, at 3:41 PM, Brian Russell wrote:
>
>> I know this topic has come up before but.. Does anyone have a
>> suggestion
>> on a method for pulling Message Resources from a DB, as well as  
>> making
>> sure a restart of the app isn't required when the message key/ 
>> value is
>> updated in the db? Is there a recommended, working, solution out  
>> there
>> (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)?
>>
>> I tried to implement the solution found in "Jakarta Struts Cookbook"
>> Chapter 2 Section 7 "Accessing Message Resources from a Database". As
>> you may know, the OJB Message Resources distribution by James  
>> Mitchell
>> requires an OJB jar to be available to a webapp attempting to use  
>> this
>> approach. However, I am unable to pin down exactly what version of  
>> OJB
>> is required to work with this solution. I have currently tried 0.9.4,
>> 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found
>> errors
>> on any that I choose.
>>
>> My current environment is as such:
>>
>> Java: 1.5.0_05
>> Tomcat: 4.1.29
>> Mysql: 3.2.3.58
>> Struts: 1.2.7
>>
>> If anyone has been able to implement this and can give me a
>> recommended
>> solution, that would be great.
>>
>> Thank you.
>>
>> Brian Russell
>> www.closerware.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]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> "MMS " made the following annotations.
> 

RE: Message Resources from DB

2005-11-17 Thread Mick Knutson
I got one of these solutions out and it talks about setting up the
resource like this:

  
  



1. I do not want to put jndi information in my struts
2. I do not want to put any SQL or SQL-Like pieces into my struts.

So, is there a way to configure this to call a Service Object instead of
the "JNDI | SQL" above?




-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 3:56 PM
To: Struts Users Mailing List
Subject: Re: Message Resources from DB

No, you are not wrong.  Struts will likely be changed to use Commons  
Resources after a 1.3.x goes "GA".  Of course, Commons Resources  
needs to go "GA" itself soon.

I have already written several Database implementations for Commons  
Resources (Hibernate, iBatis, JDBC-only).  However, some of that work  
is not checked into SVN and some of it (at the time it was written)  
was not allowed in SVN due to incompatible licensing with ASL.

I don't really have a lot of free time to assist, but I'll do what I  
can.

Are you using any O/R frameworks or are you just doing straight jdbc?

--
James Mitchell
678.910.8017
Skpe: jmitchtx



On Nov 16, 2005, at 4:08 PM, Brian Russell wrote:

> I got James's solution from:
>
> http://sourceforge.net/project/showfiles.php? 
> group_id=49385&package_id=7
> 6369
>
> I also found another solution at:
>
> http://sourceforge.net/project/showfiles.php? 
> group_id=49385&package_id=1
> 49742
>
> And I know the team is working on a solution to be included in
> Commons-Resources and hopefully Struts 1.3.. but I may be wrong about
> that.
>
> Brian Russell
> www.closerware.com
>
>
> -Original Message-
> From: Mick Knutson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 4:00 PM
> To: Struts Users Mailing List
> Subject: RE: Message Resources from DB
>
> Can you send me the solution to that? I don't have that book, I  
> have an
> older version without that solution.
>
> -Original Message-
> From: Brian Russell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 12:58 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Message Resources from DB
>
> Ah.. the man himself! I'm using MySql. I set up my database with the
> tables from the scripts in the /sql directory. And of course did the
> rest of the steps (i.e. updating struts-config, placing xml files in
> /WEB-INF/classes dir, etc.)
>
> Thanks!
>
> Brian Russell
> www.closerware.com
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 3:47 PM
> To: Struts Users Mailing List
> Subject: Re: Message Resources from DB
>
> What database would you like to use?
>
> --
> James Mitchell
> 678.910.8017
> Skpe: jmitchtx
>
>
>
> On Nov 16, 2005, at 3:41 PM, Brian Russell wrote:
>
>> I know this topic has come up before but.. Does anyone have a
>> suggestion
>> on a method for pulling Message Resources from a DB, as well as  
>> making
>> sure a restart of the app isn't required when the message key/ 
>> value is
>> updated in the db? Is there a recommended, working, solution out  
>> there
>> (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)?
>>
>> I tried to implement the solution found in "Jakarta Struts Cookbook"
>> Chapter 2 Section 7 "Accessing Message Resources from a Database". As
>> you may know, the OJB Message Resources distribution by James  
>> Mitchell
>> requires an OJB jar to be available to a webapp attempting to use  
>> this
>> approach. However, I am unable to pin down exactly what version of  
>> OJB
>> is required to work with this solution. I have currently tried 0.9.4,
>> 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found
>> errors
>> on any that I choose.
>>
>> My current environment is as such:
>>
>> Java: 1.5.0_05
>> Tomcat: 4.1.29
>> Mysql: 3.2.3.58
>> Struts: 1.2.7
>>
>> If anyone has been able to implement this and can give me a
>> recommended
>> solution, that would be great.
>>
>> Thank you.
>>
>> Brian Russell
>> www.closerware.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]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> "MMS " made the following annotations.
> --

> --
> --
> Warning:
> All e-mail sent to this address will be received by the Safeway
> corporate e-mail system, and is subject to archival and review by
> someone other than the recipient.  This e-mail may contain information
> proprietary to Safeway and is intended only for the use of the  
> inte

RE: i18n Issue for Chinese Locale.

2005-11-17 Thread Balasubramaniam, Sezhiyan
I tried putting head:meta tag and still the issue is there.

I attached the output html.



亲爱的 

Thanks a lot Jason for the help.

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 12:41 PM
To: Struts Users Mailing List
Subject: Re: i18n Issue for Chinese Locale.

Everything looks good.  UTF-8 is fine for Chinese.  You are getting 9 
bytes as a result, which is what you should get for UTF-8 encoding, 
which is good.  But it seems the browser isn't reading it as UTF-8 and 
just displaying the bytes instead under the default ISO encoding.

Try adding this






If that doesn't work, can you post the html that is generated.



Balasubramaniam, Sezhiyan wrote:
> Hi,
>
>  
>
> We use STRUTS 1.0.2 in one of our extranet application and we need to support 
> CHINESE locale as part of the scope.
>
> I used the following steps as Laurie pointed out in the earlier mail, but 
> somehow the character set is getting corrupted and we are not getting the 
> right result.
>
> Can Laurie, Frank or someone else can point me, where the problem could be?
>
>  
>
> Thanks in advance,
>
> Bala
>
>  
>
> Created dummy.properties in dreamweaver(UTF-8 supported) as
>
> bala1=亲爱的
>
> bala2=非常高兴的通知您被升职为
>
>  
>
> Ran native2ascii dummy.properties ApplicationResources_zh.properties and the 
> output is,
>
> bala1=\u00e4\u00ba\u00b2\u00e7\u02c6\u00b1\u00e7\u0161\u201e
>
> bala2=\u00e9\ufffd\u017e\u00e5\u00b8\u00b8\u00e9\u00ab\u02dc\u00e5\u2026\u00b4\u00e7\u0161\u201e\u00e9\u20ac\u0161\u00e7\u0178\u00a5\u00e6\u201a\u00a8\u00e8\u00a2\u00ab\u00e5\ufffd\u2021\u00e8\ufffd\u0152\u00e4\u00b8\u00ba
>
>  
>
> JSP is,
>
> <%@ page contentType="text/html; charset=UTF-8" %>
>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> <%@ page import="java.util.*" %>
>
> <%@ page import="java.text.*" %>
>
> <%@ page import="org.apache.struts.action.*" %>
>
> <%
>
> Locale locale=new Locale("zh", "CN");
>
> session.setAttribute("org.apache.struts.action.LOCALE",locale);
>
> %>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>  
>
> Result is,
>
> 亲爱的
>
>   

-- 
Jason Lea




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



Updating ActionForm from indexed properties

2005-11-17 Thread Mulligan, Scott H
  

My actionForm has an ArrayList of objects that I display in my JSP for update 
using indexed properties (see below JSP code):









My Action Form looks like this:

public ArrayList getObjectCollection() {return 
objectCollection;}

public void setObjectCollection(ArrayList p_ObjectCollection) 
{objectCollection= p_ObjectCollection;}

public void setObjectVO(int index, MyType  p_object) 
{objectCollection.set(index, p_object);}

public MyType getObjectVO(int i) {return (MyType) 
objectCollection.get(i);}

The object class has a String property and an int property.

The information gets displayed properly and updated properly when valid data is 
entered. However, if the user enters a non-numeric value for the intProperty 
field, the int property in the object in the ArrayList in my actionForm gets 
set to 0. Is there a way to trap this situation or to a way to avoid this from 
happening?

Thanks for your help

 

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

Re: No getter method servlet Exception. using DynaActionForm

2005-11-17 Thread fea jabi
yes, it was a typo for which I paid bigtime. Also, after correcting my jsp 
to use name="SetupForm" for all the textboxes and checkboxes in JSP.


Everything worked just like that.

Thanks you all for helping me working with dynaactionforms.


Thanks again.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Thu, 17 Nov 2005 14:44:07 -0500

fea jabi wrote:

By changing the form property boolean - Boolean


to


I am able to get the instance of the dynaactionform.

is it necessary to use Boolean itself?


Yep, as Dave points out, there's no such type as java.lang.boolean. It 
should be either just 'boolean' or 'java.lang.Boolean'.


none of my form properties are initialized. all strings are "" and Boolean 
are  by default from what I see thru System.out.println of form in 
my action.


Since they are as above I am getting the "no getter method for property 
exception I think". Am I right?


What exactly is the exception and where do you get it?

What should be happening is, when you hit your setup action, Struts should 
create a new form bean with its properties initialized as you specified in 
struts-config.xml. Then, when you submit the form to one of your other 
actions, the form properties will be updated based on the request 
parameters.


If you're seeing a 'no getter method' excetption, you're probably trying to 
access a property in your JSP that you didn't declare in your form bean 
config.



Do all the Dynaform properties have to be initialized always?


No. As noted, they should be defaulted for you the first time the form is 
created. Note, however, that if you store the form in session scope, its 
properties are *not* reset to their initial values by DynaActionForm's 
reset() method, so the properties will retain the values they had the last 
time the form was used.


Perhaps this is your problem? Struts creates and init's the form, you use 
it in some way that results in all the properties being cleared, then you 
use it in a context you're expecting it to be fresh and it's still empty.


Try setting your 'scope' to 'request' on each of your action mappings in 
struts-config and see if that changes the behaviour (after fixing whatever 
is causing your 'no getter' problems, of course).


L.


thanks.

Thank you all for helping me using the dynaactionform.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Wed, 16 Nov 2005 22:49:52 -0500

What you have below looks right to me; the action mapping has 'name' set 
to your action form, so you should be getting an instance of it in the 
action. Double check you haven't gotten your config out of sync along the 
way.


L.

fea jabi wrote:


thanks for your response. Understood better now.

I am not sure why but the setupForm is null in the Action when debugged 
thru the code.


DynaActionForm setupForm = (DynaActionForm) form;

System.out.println("In PrepareSetupAction : setupform is : " + 
setupForm);



Any idea of why it's so? Is there anything else I have to do?

Thanks.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Wed, 16 Nov 2005 15:48:33 -0500

At least part of your problem is the way you're trying to setup the 
action form. Struts will create an instance of the form bean for you, 
which is what is passed into execute() via the 'form' parameter. You're 
referencing that in the first line of your execute() method.


However, you then go on to build your own form bean instance, and 
replace the one Struts put in the request with the one you've built. 
You don't need to do this; just use the bean Struts supplies in the 
'form' parameter.


You mentioned that someone has suggested you needed to do this to get 
initial values populated; that's not the case. The first time Struts 
builds an instance of DynaActionForm, it will populate properties for 
which you've supplied an initial value. What it won't do is reset 
properties to their initial values when the reset() method is called on 
the form, which you might care about if you have the form stored in 
session scope. You can worry about that later though.


So, essentially, your execute() method can be simplified to just this:

>public ActionForward execute(ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response)
>   throws ServletException, IOException{
>DynaActionForm setupForm = (DynaActionForm) form;
>//getSetupInfo(setupForm);
>return mapping.findForward("success");
>}

L.

fea jabi wrote:


Thanks for hepl

Re: html:rewrite with params

2005-11-17 Thread Laurie Harper

Thomas Hamacher wrote:

Laurie,

thank you so for. This makes sense to me.
But the problem is, that I don´t really have a source-url, as it is used in 
the examples. I´m using tiles and therefor I have to work with definitions. I 
guess, I cannot add any definition as a source, can I?


Sure you can, just make 'source' a tile attribute and set it where you 
reference the tile.


Actually I always want to return to the same page, together with any used 
params and all information of the form-bean, but with a different Locale. 
That´s it. But this doesn´t seems to be that trivial, altough I thought this 
would be a standard-problem...


As long as you forward (rather than redirect) to the destination page, 
the request data (what the form bean was populated from) will be 
retained. If you always want to go to the same page, you can just do 
'return mapping.findForward("foward name");' to get the result you want.


L.



Thomas

On Wednesday 16 November 2005 22:56, Laurie Harper wrote:


You don't need to save the parameter, you can just append it to the URL
you forward to at the end of your SwitchLanguage action, assuming you
know it should be there. RedirectAction in Struts 1.2.7 and up gives you
a relatively easy way to add parameters to a forward mapping before you
return it.

There's no way to save the parameter on the action forward, since such a
feature wouldn't be very useful -- consider what would happen if two
different users hit the switchLanguage action at the same time.

If you need to solve the more general problem, where you don't know in
your SwitchLanguage action where to return, it gets rather harder. See
my post earlier today on this topic for some suggestions for that problem.

L.

Thomas Hamacher wrote:


Okay - here are some more details:

Let's say I have the following URL: http://somehost/showEntry?entryID=343
I have multilanguage support in my application, so let´s assume, that I
click on the language-button and therefor call the page
/switchLanguage.do, which changes my Locale. The switchLanguage uses the
last ActionForward to link back to the refering page (showEntry). But the
problem is, that it doesn't have the param "entryID" anymore. So the page
shows an empty page. As I don't want to add this parameter in my
session-, but in the request scope I have to remember this param somehow.
So I thought if there might be a way to save this to the ActionForward,
because there is no request.setParameter()-Method anywhere. And I have
been told that the reques.getHeader("referer")-solution is pretty unsafe,
because of proxies and firewalls. So I wonder what would be the best way,
as I think refering back to one page and mulit-language-support should be
one of the standard-issues on modern webapplication.

I hope that helps a little..

Thanks
Thomas

On Thursday 10 November 2005 22:31, Laurie Harper wrote:


Thomas Hamacher wrote:


But anyways: does anybody know, if the parameters, given through paramId
are saved in an ActionForward? This would help me a lot, because I have
to remember the parameters - if any are used - together with my
ActionForward for later references. Right know I'm trying a workaround
with my own RequestProcessor, which tries to cut out the parameters and
save it somewhere and add it later to the ActionForward, but that
doesn't work that well.


I'm not quite sure what you're trying to do. The parameters you specify
through paramId are request parameters to include in the URL. They're
available in your action through your form bean or from
request.getParameter().

An ActionForward is what your action returns to tell Struts where to
forward control to after the request has been processed. So the
parameters you setup when you construct the URL don't have anything to
do it.

Perhaps you can explain what you are trying to achieve by saving the
parameters?

L.


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



Re: How to make a preview

2005-11-17 Thread Michael Jouravlev
On 11/17/05, Jesper Preuss <[EMAIL PROTECTED]> wrote:
> Hi !
>
> Hi have a web project using struts.
>
> My homepage have an administrator module. Where you can change pictures,
> CSS/colors, page texts and more.
> Now you can save Submit->"save" a form. Here you have saved all the new
> CSS colors permanent. And it will show for all the users of the page.
>
> What I would like to do is, add an button Submit->"preview" to this
> form. And when you 'preview' it will come with an pop-window. And here
> you can browse the whole web-site, with the preview values.
>
> You should be able to close the window. The original browser windows
> session should not be affected by the preview values.
>
> It is one session and two browsers, showing two different color schemes.
>
> How do you implement this in Struts.

Non-Struts related. Search for CSS style switcher.

Michael.

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



Re: [Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Laurie Harper

Lixin Chu wrote:

Hi All,
appreciate any help here ...This is what I have done in trying to 
show strings in the selected language:

 - I have various /WEB-INF/classes/ApplicationResources.properties
files, for example APplicationResoruces_ja.properties
 - in struts-config.xml, I have:
   
 - in web.xml I have a filter:


encodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true



 - for each JSP file, I have:
   <%@ page language="java" pageEncoding="UTF-8"
contentType="text/html;charset=UTF-8" %>
   
 ..



   

 - a post login filter to set user's locale based on language setting:
   session.setAttribute("org.apache.struts.action.LOCALE", .)


but the button.add always show English. Anything I missed out ?

I am using Spring framework with Struts 1.2.7, and Tiles.


What did you set as the locale in the session? You're using 
'locale="true"' in your html:html tag, so the browser's language 
settings may be overriding the session locale. What does 
request.getLocale() return? What about if you set locale="false"?


L.


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



Re: i18n Issue for Chinese Locale.

2005-11-17 Thread Jason Lea
Everything looks good.  UTF-8 is fine for Chinese.  You are getting 9 
bytes as a result, which is what you should get for UTF-8 encoding, 
which is good.  But it seems the browser isn't reading it as UTF-8 and 
just displaying the bytes instead under the default ISO encoding.


Try adding this



   


If that doesn't work, can you post the html that is generated.



Balasubramaniam, Sezhiyan wrote:

Hi,

 


We use STRUTS 1.0.2 in one of our extranet application and we need to support 
CHINESE locale as part of the scope.

I used the following steps as Laurie pointed out in the earlier mail, but 
somehow the character set is getting corrupted and we are not getting the right 
result.

Can Laurie, Frank or someone else can point me, where the problem could be?

 


Thanks in advance,

Bala

 


Created dummy.properties in dreamweaver(UTF-8 supported) as

bala1=亲爱的

bala2=非常高兴的通知您被升职为

 


Ran native2ascii dummy.properties ApplicationResources_zh.properties and the 
output is,

bala1=\u00e4\u00ba\u00b2\u00e7\u02c6\u00b1\u00e7\u0161\u201e

bala2=\u00e9\ufffd\u017e\u00e5\u00b8\u00b8\u00e9\u00ab\u02dc\u00e5\u2026\u00b4\u00e7\u0161\u201e\u00e9\u20ac\u0161\u00e7\u0178\u00a5\u00e6\u201a\u00a8\u00e8\u00a2\u00ab\u00e5\ufffd\u2021\u00e8\ufffd\u0152\u00e4\u00b8\u00ba

 


JSP is,

<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ page import="java.util.*" %>

<%@ page import="java.text.*" %>

<%@ page import="org.apache.struts.action.*" %>

<%

Locale locale=new Locale("zh", "CN");

session.setAttribute("org.apache.struts.action.LOCALE",locale);

%>















 


Result is,

亲爱的

  


--
Jason Lea




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



Re: html:rewrite with params

2005-11-17 Thread Laurie Harper

Or perhaps for the new Cookbook?

Frank W. Zammetti wrote:

I just wanted to point out the 3rd question on this page:

http://husted.com/struts/FAQ/view-i18n.htm

Laurie, your a committer now... this seems to me like a good inclusions 
for the Actions package.  Any thoughts from anyone?


Frank

Laurie Harper wrote:

You don't need to save the parameter, you can just append it to the 
URL you forward to at the end of your SwitchLanguage action, assuming 
you know it should be there. RedirectAction in Struts 1.2.7 and up 
gives you a relatively easy way to add parameters to a forward mapping 
before you return it.


There's no way to save the parameter on the action forward, since such 
a feature wouldn't be very useful -- consider what would happen if two 
different users hit the switchLanguage action at the same time.


If you need to solve the more general problem, where you don't know in 
your SwitchLanguage action where to return, it gets rather harder. See 
my post earlier today on this topic for some suggestions for that 
problem.


L.

Thomas Hamacher wrote:


Okay - here are some more details:

Let's say I have the following URL: 
http://somehost/showEntry?entryID=343
I have multilanguage support in my application, so let´s assume, that 
I click on the language-button and therefor call the page 
/switchLanguage.do, which changes my Locale. The switchLanguage uses 
the last ActionForward to link back to the refering page (showEntry). 
But the problem is, that it doesn't have the param "entryID" anymore. 
So the page shows an empty page. As I don't want to add this 
parameter in my session-, but in the request scope I have to remember 
this param somehow. So I thought if there might be a way to save this 
to the ActionForward, because there is no 
request.setParameter()-Method anywhere. And I have been told that the 
reques.getHeader("referer")-solution is pretty unsafe, because of 
proxies and firewalls. So I wonder what would be the best way, as I 
think refering back to one page and mulit-language-support should be 
one of the standard-issues on modern webapplication.


I hope that helps a little..

Thanks
Thomas

On Thursday 10 November 2005 22:31, Laurie Harper wrote:


Thomas Hamacher wrote:

But anyways: does anybody know, if the parameters, given through 
paramId
are saved in an ActionForward? This would help me a lot, because I 
have

to remember the parameters - if any are used - together with my
ActionForward for later references. Right know I'm trying a workaround
with my own RequestProcessor, which tries to cut out the parameters 
and
save it somewhere and add it later to the ActionForward, but that 
doesn't

work that well.




I'm not quite sure what you're trying to do. The parameters you specify
through paramId are request parameters to include in the URL. They're
available in your action through your form bean or from
request.getParameter().

An ActionForward is what your action returns to tell Struts where to
forward control to after the request has been processed. So the
parameters you setup when you construct the URL don't have anything to
do it.

Perhaps you can explain what you are trying to achieve by saving the
parameters?

L.


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



Re: How to make a preview

2005-11-17 Thread Laurie Harper
Mark means, I expect, a request parameter. There is nothing Struts 
specific to this, you just need to arrange for pages loaded in the popup 
window to somehow determine they should render in 'preview' mode. The 
easiest way is to include a request parameter, and make sure that 
whereever you generate a link to another page you check for that request 
parameter and append it to the link if present.


L.

Jesper Preuss wrote:

Do you mean a parameter in the url. Or is this token a special Struts
token.

I have solved my preview problem using javascript. Where I put a
?preview=true in front of all links and in the forms actions. This is
what I call a hack. So please tell me how to do it better.

-Oprindelig meddelelse-
Fra: Mark Benussi [mailto:[EMAIL PROTECTED] 
Sendt: 17. november 2005 13:05

Til: 'Struts Users Mailing List'
Emne: RE: How to make a preview

Pass a token to the new window indicating it's a preview.

Then display the new styles for the new window, ensuring that the token
gets
passed to all the links and forms etc

-Original Message-
From: Jesper Preuss [mailto:[EMAIL PROTECTED] 
Sent: 17 November 2005 11:45

To: user@struts.apache.org
Subject: How to make a preview

Hi !
 
Hi have a web project using struts.
 
My homepage have an administrator module. Where you can change pictures,

CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the new
CSS colors permanent. And it will show for all the users of the page.
 
What I would like to do is, add an button Submit->"preview" to this

form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.
 
You should be able to close the window. The original browser windows

session should not be affected by the preview values.
 
It is one session and two browsers, showing two different color schemes.
 
How do you implement this in Struts.


-
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: Custom tags referencing struts tags

2005-11-17 Thread Laurie Harper

Craig McClanahan wrote:

On 11/17/05, David Whipple <[EMAIL PROTECTED]> wrote:



I would like to be able to create a custom tag which is able to use the
struts ,  or  fields. I am not able
to find a way to create a tag library that can produce/call/reference
other
tags.


You didn't miss anything ... that strategy is not technically feasible.
There is only one pass through the compile stage that converts a JSP page
into Java code ... even if you wrote a custom tag that output "" that text would just be literally written to the output stream.


There are a couple of ways to approach this, though; see below.


I am interested in making a custom tag for our application which will


either show a text entry field, a dropdown or a static text entry based on
the choices available to a particular user. The choices will probably be
passed in as a collection in the request, where a single value results in
a
hidden field (no choice for the user), a set of values results in a
dropdown, and a special case of a single value zero, which means the user
can enter anything they like through a text entry field.


You'd need to write a new custom tag that copies the rendering logic of the
tags you are choosing between, suitably conditioned with an if statement
that checks the condition.


Alternatively, you can write a custom tag which delegates to the 
appropriate Struts tag when called. Essentially, in your doStartTag / 
doEndTag methods (or doTag if using SimpleTag), you have to decide which 
Struts tag you want to use, then instantiate it and set it up as the 
container would -- calling it's setters, doStartTag, doEndTag, etc in 
the appropriate order.


It's a bit messy; the functionality the tags encapsulate isn't exposed 
in a way you can access directly. A cleaner alternative if you're using 
JSP 2.0 is to use a tag file, which can then just contain standard JSP 
to select and invoke the appropriate delegate tag. There are some issues 
with doing this currently, which I have a work-in-progress solution to 
(see http://issues.apache.org/bugzilla/show_bug.cgi?id=33064 for details).



I have searched everything I can think of and can't seem to find anything


that can allow this.

Does anyone know a way to approach this?

Thanks,
Dave


Craig

PS: This kind of need is an area where component architectures like
JavaServer Faces can be handy ... it's much easier in that world to create a
component that conditionally creates a child component of the correct type,
and then renders it, without having to duplicate all the rendering logic.


It's also a good argument for seperation of concerns ;-) It would be 
feasible to split the html tags into 'tag call protocol handling' and 
'html rendering' class pairs, where the rendering classes could then 
easily be called from any custom tag without the burden of duplicating 
the custom tag calling invocation requirements.


Note that's a lot of work and change, which I don't see as likely to 
happen since this isn't a particularly common requirement. Just thought 
I'd point out that it's possible ;-)


L.


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



Re: Form Bean population

2005-11-17 Thread Laurie Harper

Marcio Ghiraldelli wrote:
   I need to populate a a form-bean with a collection for an 
 instance.

   Wich is the better place to do it:

   1) Into the form-bean reset() method

   or

   2) In an Action before the jsp call


The recommended place to do it is in an action, though some do prefer to 
use reset() for this. There's been plenty of dicsussion on this point, 
so search the archives if you want more background info, but the short 
answer would be: do it in the action.


L.


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



Re: i18n Issue for Chinese Locale.

2005-11-17 Thread Martin Gainty

UTF-8 doesnt support DBCS but UTF-16 does
Good Luck,

- Original Message - 
From: "Balasubramaniam, Sezhiyan" <[EMAIL PROTECTED]>

To: 
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 17, 2005 2:52 PM
Subject: i18n Issue for Chinese Locale.



Hi,



We use STRUTS 1.0.2 in one of our extranet application and we need to 
support CHINESE locale as part of the scope.


I used the following steps as Laurie pointed out in the earlier mail, but 
somehow the character set is getting corrupted and we are not getting the 
right result.


Can Laurie, Frank or someone else can point me, where the problem could 
be?




Thanks in advance,

Bala



Created dummy.properties in dreamweaver(UTF-8 supported) as

bala1=亲爱的

bala2=非常高兴的通知您被升职为



Ran native2ascii dummy.properties ApplicationResources_zh.properties and 
the output is,


bala1=\u00e4\u00ba\u00b2\u00e7\u02c6\u00b1\u00e7\u0161\u201e

bala2=\u00e9\ufffd\u017e\u00e5\u00b8\u00b8\u00e9\u00ab\u02dc\u00e5\u2026\u00b4\u00e7\u0161\u201e\u00e9\u20ac\u0161\u00e7\u0178\u00a5\u00e6\u201a\u00a8\u00e8\u00a2\u00ab\u00e5\ufffd\u2021\u00e8\ufffd\u0152\u00e4\u00b8\u00ba



JSP is,

<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ page import="java.util.*" %>

<%@ page import="java.text.*" %>

<%@ page import="org.apache.struts.action.*" %>

<%

Locale locale=new Locale("zh", "CN");

session.setAttribute("org.apache.struts.action.LOCALE",locale);

%>

















Result is,

亲爱的




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



Re: Using Dates in a ActionForm

2005-11-17 Thread Laurie Harper
The problem is the use of a Date type for the form property. The first 
thing Struts does is populate the form bean from the request; this has 
to happen before validation, so the validation has a form to work with.


This is one of the many reasons it's recommended to make your form bean 
properties be type String and convert to native types after validation. 
So, you would declare the form property to be of type String in 
struts-config, then in your action's execute() method do the conversion 
to Date, after the validator has already confirmed that the string is in 
fact a valid date.


If you absolutely must have Date-type form bean properties, another 
option is to make BeanUtils convert empty values to null instead of 
raising an exception. You do that by creating and registering a new 
converter in BeanUtils. See the BeanUtils docs for more info if you want 
to try that approach.


L.

Yujun Liang wrote:

The exception happens before validation.

I aksed the same question before and I didn't get a clean solution yet, so
far, if you define it as a java.sql.Timestamp, you have to provide an input
in -mm-dd hh:mm:ss.f format

Did you try beanDef?

Or maybe you can change the default RequestProcessor to your own
RequestProcessor and when populating the actionForm form-bean, use
LocaleBeanUtil instead of BeanUtil, but I haven't done that yet.

Please let me know when you got something done since I am also struggling
with this. Thanks

Regards

On 11/17/05, Jesus Salvo Jr. <[EMAIL PROTECTED]> wrote:



Thanks ... I sort of worked around it by using java.sql.Date instead,
since the built-in converts in commons-beanutils does not really have a
java.util.Date converter,
only a java.sql.Date converter.

However, I still have one problem with this.

If a user leave the date field empty in the form, you will get the
exception below.

The problem with this it seems that the conversion happens BEFORE the
validation.
What's the point of having the following in validation.xml, if this
exception happens earlier ??




datePattern-MM-dd



org.apache.commons.beanutils.ConversionException
at org.apache.commons.beanutils.converters.SqlDateConverter.convert(
SqlDateConverter.java:117)
at org.apache.commons.beanutils.ConvertUtilsBean.convert(
ConvertUtilsBean.java:428)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(
BeanUtilsBean.java:1004)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java
:811)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
at org.apache.struts.action.RequestProcessor.processPopulate(
RequestProcessor.java:805)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java
:203)



On Thursday 17 November 2005 16:13, Yujun Liang wrote:


Here is some replies when I asked the same question before, hope it


helps.


Regards
- Original Message -
From: "JEROME RAULINE" <[EMAIL PROTECTED]>
To: "Yujun Liang" <[EMAIL PROTECTED]>
Sent: Friday, October 28, 2005 6:53 PM
Subject: java.util.Date in Action Form Bean



Hi,

You'd better use a String object, and then convert it into a
java.*.Date. This way, you can check the date format and tell the user
that it's wrong. Using a Date object, you'll have null if the format


is


not corresponding. And then, you don't know if the user used a wrong
date or if he does not fill it out at all.

Regards


I am working on a project using Struts. Struts uses BeanUtil to


populate


Action Form Bean. This is such a nice framework to work with, except,



BeanUtil doesn't support java.util.Date conversion. But when I use


java.sql.Timestamp, it asks for the format of



-mm-dd hh:mm:ss.f

Here is the exception when I enter other format,

Caused by: java.lang.IllegalArgumentException: Timestamp format must


be


-mm-dd hh:mm:ss.f



In a web application, it is not reasonable to ask user to input
-mm-dd


hh:mm:ss.f.



Also, it doesn't support Locale.
Do you have experience getting java.util.Date populated in a Java Bean


inside a FormBean?




- Original Message -
From: "Laurie Harper" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, October 29, 2005 2:17 AM
Subject: Re: java.util.Date in Action Form Bean



So far I'm doing this by registering a custom implementation of
Converter which I instantiate with a suitable instance of
SimpleDateFormat before calling BeanUtilsBean.copyProperties().

There's also the beanutils.locale package, which provides Locale-aware
conversions and includes support for java.util.Date (I think) out of


the


box. Unfortunately, it's not obvious how to use it. I posted a thread


on


the commons-user list asking for guidance, though I haven't seen a
response yet.

For what it's worth, here's a rough outline of doing this the 'easy'
(i.e. inelegant!) way:

final SimpleDateFormat sdf = ...
BeanUtilsBean utils = new BeanUtilsBean();
ConvertUtilsBea

Re: Getting MessageResource in ActionForm

2005-11-17 Thread Laurie Harper

Jadeler wrote:

What is the recommended way of getting the default message resource bundle in 
the validate() of the ActionForm?  Thanks.


http://struts.apache.org/struts-doc-1.2.7/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest)

L.


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



i18n Issue for Chinese Locale.

2005-11-17 Thread Balasubramaniam, Sezhiyan
Hi,

 

We use STRUTS 1.0.2 in one of our extranet application and we need to support 
CHINESE locale as part of the scope.

I used the following steps as Laurie pointed out in the earlier mail, but 
somehow the character set is getting corrupted and we are not getting the right 
result.

Can Laurie, Frank or someone else can point me, where the problem could be?

 

Thanks in advance,

Bala

 

Created dummy.properties in dreamweaver(UTF-8 supported) as

bala1=亲爱的

bala2=非常高兴的通知您被升职为

 

Ran native2ascii dummy.properties ApplicationResources_zh.properties and the 
output is,

bala1=\u00e4\u00ba\u00b2\u00e7\u02c6\u00b1\u00e7\u0161\u201e

bala2=\u00e9\ufffd\u017e\u00e5\u00b8\u00b8\u00e9\u00ab\u02dc\u00e5\u2026\u00b4\u00e7\u0161\u201e\u00e9\u20ac\u0161\u00e7\u0178\u00a5\u00e6\u201a\u00a8\u00e8\u00a2\u00ab\u00e5\ufffd\u2021\u00e8\ufffd\u0152\u00e4\u00b8\u00ba

 

JSP is,

<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ page import="java.util.*" %>

<%@ page import="java.text.*" %>

<%@ page import="org.apache.struts.action.*" %>

<%

Locale locale=new Locale("zh", "CN");

session.setAttribute("org.apache.struts.action.LOCALE",locale);

%>















 

Result is,

亲爱的



Re: No getter method servlet Exception. using DynaActionForm

2005-11-17 Thread Laurie Harper

fea jabi wrote:

By changing the form property boolean - Boolean


to


I am able to get the instance of the dynaactionform.

is it necessary to use Boolean itself?


Yep, as Dave points out, there's no such type as java.lang.boolean. It 
should be either just 'boolean' or 'java.lang.Boolean'.


none of my form properties are initialized. all strings are "" and 
Boolean are  by default from what I see thru System.out.println of 
form in my action.


Since they are as above I am getting the "no getter method for property 
exception I think". Am I right?


What exactly is the exception and where do you get it?

What should be happening is, when you hit your setup action, Struts 
should create a new form bean with its properties initialized as you 
specified in struts-config.xml. Then, when you submit the form to one of 
your other actions, the form properties will be updated based on the 
request parameters.


If you're seeing a 'no getter method' excetption, you're probably trying 
to access a property in your JSP that you didn't declare in your form 
bean config.



Do all the Dynaform properties have to be initialized always?


No. As noted, they should be defaulted for you the first time the form 
is created. Note, however, that if you store the form in session scope, 
its properties are *not* reset to their initial values by 
DynaActionForm's reset() method, so the properties will retain the 
values they had the last time the form was used.


Perhaps this is your problem? Struts creates and init's the form, you 
use it in some way that results in all the properties being cleared, 
then you use it in a context you're expecting it to be fresh and it's 
still empty.


Try setting your 'scope' to 'request' on each of your action mappings in 
struts-config and see if that changes the behaviour (after fixing 
whatever is causing your 'no getter' problems, of course).


L.


thanks.

Thank you all for helping me using the dynaactionform.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Wed, 16 Nov 2005 22:49:52 -0500

What you have below looks right to me; the action mapping has 'name' 
set to your action form, so you should be getting an instance of it in 
the action. Double check you haven't gotten your config out of sync 
along the way.


L.

fea jabi wrote:


thanks for your response. Understood better now.

I am not sure why but the setupForm is null in the Action when 
debugged thru the code.


DynaActionForm setupForm = (DynaActionForm) form;

System.out.println("In PrepareSetupAction : setupform is : " + 
setupForm);



Any idea of why it's so? Is there anything else I have to do?

Thanks.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Wed, 16 Nov 2005 15:48:33 -0500

At least part of your problem is the way you're trying to setup the 
action form. Struts will create an instance of the form bean for 
you, which is what is passed into execute() via the 'form' 
parameter. You're referencing that in the first line of your 
execute() method.


However, you then go on to build your own form bean instance, and 
replace the one Struts put in the request with the one you've built. 
You don't need to do this; just use the bean Struts supplies in the 
'form' parameter.


You mentioned that someone has suggested you needed to do this to 
get initial values populated; that's not the case. The first time 
Struts builds an instance of DynaActionForm, it will populate 
properties for which you've supplied an initial value. What it won't 
do is reset properties to their initial values when the reset() 
method is called on the form, which you might care about if you have 
the form stored in session scope. You can worry about that later 
though.


So, essentially, your execute() method can be simplified to just this:

>public ActionForward execute(ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response)
>   throws ServletException, IOException{
>DynaActionForm setupForm = (DynaActionForm) form;
>//getSetupInfo(setupForm);
>return mapping.findForward("success");
>}

L.

fea jabi wrote:


Thanks for hepling me. here is the code


   
   
   
   initial="true"/>

   


   redirect="false"/>





public class PrepareSetupAction extends Action {

   /** Creates a new instance of PrepareSetupAction */
   public PrepareSetupAction() {
   }

   public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse r

Re: [ot]Hashtable like fifo que?

2005-11-17 Thread erikweber
See if LinkedHashSet gives what you want.

Erik


-Original Message-
From: Dave Newton <[EMAIL PROTECTED]>
Sent: Nov 17, 2005 2:06 PM
To: Struts Users Mailing List 
Subject: Re: [ot]Hashtable like fifo que?

Hmm, weird formatting.

Dave Newton wrote:

> java.util.LinkedHashMap?

Probably doesn't do exactly what you want.

Seems like it'd be easy to wrap a HashMap and LinkedList inside a 
composite class, though.

Dave



-
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: [ot]Hashtable like fifo que?

2005-11-17 Thread Dave Newton

Hmm, weird formatting.

Dave Newton wrote:


java.util.LinkedHashMap?


Probably doesn't do exactly what you want.

Seems like it'd be easy to wrap a HashMap and LinkedList inside a 
composite class, though.


Dave



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



Re: [ot]Hashtable like fifo que?

2005-11-17 Thread Dave Newton

Mick Knutson wrote:


I am trying to create a FIFO que that I can add items, then they fall
off like a standard FIFO, but, I want to be able to get an item from the
que like a Hashtable.

I.E. Object obj = fifoQue.get("stringKey");
 


*java.util.LinkedHashMap?

Dave
*




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



[ot]Hashtable like fifo que?

2005-11-17 Thread Mick Knutson
I am trying to create a FIFO que that I can add items, then they fall
off like a standard FIFO, but, I want to be able to get an item from the
que like a Hashtable.

 

I.E. Object obj = fifoQue.get("stringKey");


"MMS " made the following annotations.
--
Warning: 
All e-mail sent to this address will be received by the Safeway corporate 
e-mail system, and is subject to archival and review by someone other than the 
recipient.  This e-mail may contain information proprietary to Safeway and is 
intended only for the use of the intended recipient(s).  If the reader of this 
message is not the intended recipient(s), you are notified that you have 
received this message in error and that any review, dissemination, distribution 
or copying of this message is strictly prohibited.  If you have received this 
message in error, please notify the sender immediately. 
  
==


Re: 1.3 Struts Validator Plugin Bug

2005-11-17 Thread Dave Newton

Leahy, Kevin wrote:

Is it also possible to set input to a tile definition? 
 

Yes. Although just trying it might have been quicker than posting to the 
list ;)


Dave



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



RE: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread Aladin Alaily
Hi,

Depending on the version of tomcat you've downloaded you may have
servlet-api.jar & jsp-api.jar OR servlet.jar

Look in:
$TOMCAT_HOME/common/lib

Aladin



> I downloaded jboss which includes tomcat and I couldn't find these two
> files:
>
> servlet-api.jar -> Tomcat's
> jsp-api.jar -> Tomcat's
>
> Can somebody help me?  Are they different in jboss for some reason?
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Aladin Alaily
> Sent: Thursday, November 17, 2005 9:03 AM
> To: Struts Users Mailing List
> Subject: Re: Has anybody experienced this weirdness with taglibs?
>
> Hmmm... that's interesting.
>
> It looks as though I have no control on whether or not the SID is
> appended.  The first time my page is loaded, the SID is appended and the
> images & links don't resolve.  If I reload the page, the SID are removed
> and everything resolves.
>
> I am using Tomcat 5.5.12 and the following jars & tlds:
>
> struts-1.2.7.jar
> commons-beanutils-1.7.0.jar
> commons-collections-3.1.jar
> commons-digester-1.7.jar
> commons-logging-api-1.0.4.jar
> standard-1.1.2.jar
>
> servlet-api.jar -> Tomcat's
> jsp-api.jar -> Tomcat's
>
> struts-bean-1.1.tld
> struts-html-1.1.tld
> struts-logic-1.1.tld
> struts-nested-1.1.tld
> c-1.1.2.tld
>
>
> Aladin
>
>
>> It works for me.
>>
>> I would guess that this is pretty standard HTTP to be
>> honest. It should resolve the images by stripping off
>> any unnecessary SID info' etc, if you don't use it for
>> security checking for example. I thought that the
>> requests for images are exactly the same as a request
>> for any other resource, ie, a standard HTTP request
>> and therefore the SID is appended unless you
>> explicitly turn it off. Your web server should
>> resoplve the path of the url whether or not there is a
>> SID attached.
>>
>> --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>>
>>> That's not normal...  If you add the semi-colon and
>>> the jsessionid to an
>>> image src, then the image is not going to resolve
>>> properly.  That's the
>>> behaviour that I'm noticing - with the jsessionid,
>>> the links & images
>>> don't resolve.
>>>
>>> Aladin
>>>
>>>
>>>
>>> > That's normal. What's wrong with that?
>>> >
>>> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> I am using  and  tags but
>>> when
>>> >> they are evaluated a
>>> >> jsessionid is appended:
>>> >>
>>> >> Image Example:
>>> >> --
>>> >> >> width="1"
>>> >> />
>>> >>
>>> >> GIVES
>>> >>
>>> >> >> >>
>>> >
>>>
>> src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>>> >>
>>> >> height="10" width="1">
>>> >>
>>> >> Link Example:
>>> >> -
>>> >> >> />"
>>> >> rel="stylesheet"
>>> >> type="text/css">
>>> >>
>>> >> GIVES
>>> >>
>>> >> >> >>
>>> >
>>>
>> href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>>> >>
>>> >> rel="stylesheet" type="text/css">
>>> >>
>>> >> Has anyone experienced this before?  If so, how
>>> did
>>> >> you fix this problem.
>>> >>
>>> >> I am using struts 1.7
>>> >>
>>> >> Thanks.
>>> >> Aladin
>>> >>
>>> >>
>>> >
>>>
>> -
>>> >> To unsubscribe, e-mail:
>>> >> [EMAIL PROTECTED]
>>> >> For additional commands, e-mail:
>>> >> [EMAIL PROTECTED]
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>>
>> ___
>>> > Yahoo! Messenger - NEW crystal clear PC to PC
>>> calling worldwide with
>>> > voicemail http://uk.messenger.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]
>>>
>>>
>>
>>
>>
>>
>>
>>
>> ___
>> Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with
>> voicemail http://uk.messenger.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]
>
> 
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> 
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: 1.3 Struts Validator Plugin Bug

2005-11-17 Thread Leahy, Kevin
Is it also possible to set input to a tile definition? 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Evans
Sent: 17 November 2005 17:01
To: user@struts.apache.org
Subject: Re: 1.3 Struts Validator Plugin Bug

Joe Germuska  Germuska.com> writes:

> 
> By default, Struts expects a path as the value to "input", not a 
> forward name.  You must explicitly configure if you prefer to use the 
> forward name.
> 
> See
>
http://struts.apache.org/struts-core/userGuide/configuration.html
#controller_config,

> specifically the "inputForward" attribute.
> 

Thanks Joe.


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



The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167



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



Re: [OT] RE: Can't build project because of unavailable dtd

2005-11-17 Thread Craig McClanahan
On 11/17/05, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
>
> I'm curious of the answer you get back.
> Can you post [OT] the answer back to this list.


I don't know if Eclipse can do this, but you can avoid similar problems with
NetBeans by registering your own copies of the DTDs into the "DTD and XML
Schema Catalogs" database (on the "Runtime" tab). That causes XML validation
of schemas or DTDs to be performed against a local copy (and will perform
better even if you are online and the DTD is available, because you're
avoiding network traffic). You should see if Eclipse has a similar feature.

(In the case of NetBeans 5, the Struts DTDs are preregistered for you.)

Shawn



Craig


Re: 1.3 Struts Validator Plugin Bug

2005-11-17 Thread Aaron Evans
Joe Germuska  Germuska.com> writes:

> 
> By default, Struts expects a path as the value to "input", not a 
> forward name.  You must explicitly configure if you prefer to use the 
> forward name.
> 
> See 
>
http://struts.apache.org/struts-core/userGuide/configuration.html
#controller_config,

> specifically the "inputForward" attribute.
> 

Thanks Joe.


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



Re: [struts faces] form-bean vs managed-bean

2005-11-17 Thread Craig McClanahan
On 11/17/05, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
> I was looking at the struts faces example app and was wondering what the
> difference between the managed-bean and a form-bean was?
>
> I would think managed-beans would replace the need for form beans.


In general JSF programming, this is definitely correct ... managed beans are
a generalization of a Struts ActionForm, because they can be created on
demand at *any* time, not just by the act of submitting a form. Additional
generalizations:

* Managed beans can be of any class that has a public zero-args
constructor, not just subclasses of ActionForm.

* The properties of a managed bean can be initialized from literal
values or expressions in the faces-config.xml file, which might have
the side effect of creating additional beans. In effect, managed beans
are a basic dependency injection framework.

* Managed beans can be stored in any scope, or no scope at all,
versus just request or session scope for form beans.

* JSF's extension APIs let you transparently integrate other DI
frameworks (such as Spring) if you prefer them.

They are both beans but I was wondering how they are different in this
> architecture?


The design center for the struts-faces integration library is to allow you
to migrate your Struts view tier (JSP pages using Struts HTML tags, to JSP
pages using JSF components), with minimal changes to any of your Java
classes. Thus, the architecture allows you to continue using ActionForm
beans if you want.

Once you have completed the view tier migration, you'd most often want to
migrate the back end code as well, switching away from the restrictions of
form beans to the more generalized capabilities of managed beans -- but you
can do that at your own pace; you're not forced to migrate to managed beans
at the same time.

Shawn


Craig


RE: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread Garner, Shawn
I downloaded jboss which includes tomcat and I couldn't find these two
files:

servlet-api.jar -> Tomcat's
jsp-api.jar -> Tomcat's

Can somebody help me?  Are they different in jboss for some reason?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Aladin Alaily
Sent: Thursday, November 17, 2005 9:03 AM
To: Struts Users Mailing List
Subject: Re: Has anybody experienced this weirdness with taglibs?

Hmmm... that's interesting.

It looks as though I have no control on whether or not the SID is
appended.  The first time my page is loaded, the SID is appended and the
images & links don't resolve.  If I reload the page, the SID are removed
and everything resolves.

I am using Tomcat 5.5.12 and the following jars & tlds:

struts-1.2.7.jar
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-digester-1.7.jar
commons-logging-api-1.0.4.jar
standard-1.1.2.jar

servlet-api.jar -> Tomcat's
jsp-api.jar -> Tomcat's

struts-bean-1.1.tld
struts-html-1.1.tld
struts-logic-1.1.tld
struts-nested-1.1.tld
c-1.1.2.tld


Aladin


> It works for me.
>
> I would guess that this is pretty standard HTTP to be
> honest. It should resolve the images by stripping off
> any unnecessary SID info' etc, if you don't use it for
> security checking for example. I thought that the
> requests for images are exactly the same as a request
> for any other resource, ie, a standard HTTP request
> and therefore the SID is appended unless you
> explicitly turn it off. Your web server should
> resoplve the path of the url whether or not there is a
> SID attached.
>
> --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>
>> That's not normal...  If you add the semi-colon and
>> the jsessionid to an
>> image src, then the image is not going to resolve
>> properly.  That's the
>> behaviour that I'm noticing - with the jsessionid,
>> the links & images
>> don't resolve.
>>
>> Aladin
>>
>>
>>
>> > That's normal. What's wrong with that?
>> >
>> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>> >
>> >> Hi,
>> >>
>> >> I am using  and  tags but
>> when
>> >> they are evaluated a
>> >> jsessionid is appended:
>> >>
>> >> Image Example:
>> >> --
>> >> > width="1"
>> >> />
>> >>
>> >> GIVES
>> >>
>> >> > >>
>> >
>>
> src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>> >>
>> >> height="10" width="1">
>> >>
>> >> Link Example:
>> >> -
>> >> > />"
>> >> rel="stylesheet"
>> >> type="text/css">
>> >>
>> >> GIVES
>> >>
>> >> > >>
>> >
>>
> href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>> >>
>> >> rel="stylesheet" type="text/css">
>> >>
>> >> Has anyone experienced this before?  If so, how
>> did
>> >> you fix this problem.
>> >>
>> >> I am using struts 1.7
>> >>
>> >> Thanks.
>> >> Aladin
>> >>
>> >>
>> >
>>
> -
>> >> To unsubscribe, e-mail:
>> >> [EMAIL PROTECTED]
>> >> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
> ___
>> > Yahoo! Messenger - NEW crystal clear PC to PC
>> calling worldwide with
>> > voicemail http://uk.messenger.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]
>>
>>
>
>
>
>
>
>
> ___
> Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with
> voicemail http://uk.messenger.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]

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



[OT] RE: Can't build project because of unavailable dtd

2005-11-17 Thread Garner, Shawn

I'm curious of the answer you get back.
Can you post [OT] the answer back to this list.

Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lionel
Sent: Thursday, November 17, 2005 5:16 AM
To: user@struts.apache.org
Subject: Re: Can't build project because of unavailable dtd

Lionel wrote:
> Hi !
>
> Hi have a web project using struts.
> This morning, I've had problems to build this project be built because
> jakarta.apache.org has been unavailable for few minutes: eclipse
> tries to access the online dtd and gets blocked.
> The only way to be able to work is to disable xml validation, kill
> eclipse and start it again.
> Why doesn't it try to get the dtd from the struts.jar in web-inf/lib ?

wrong group selected: it was for the WTP group.
Sorry.




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

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



Re: Custom tags referencing struts tags

2005-11-17 Thread Craig McClanahan
On 11/17/05, David Whipple <[EMAIL PROTECTED]> wrote:
>
>
> I would like to be able to create a custom tag which is able to use the
> struts ,  or  fields. I am not able
> to find a way to create a tag library that can produce/call/reference
> other
> tags.


You didn't miss anything ... that strategy is not technically feasible.
There is only one pass through the compile stage that converts a JSP page
into Java code ... even if you wrote a custom tag that output "" that text would just be literally written to the output stream.

I am interested in making a custom tag for our application which will
> either show a text entry field, a dropdown or a static text entry based on
> the choices available to a particular user. The choices will probably be
> passed in as a collection in the request, where a single value results in
> a
> hidden field (no choice for the user), a set of values results in a
> dropdown, and a special case of a single value zero, which means the user
> can enter anything they like through a text entry field.


You'd need to write a new custom tag that copies the rendering logic of the
tags you are choosing between, suitably conditioned with an if statement
that checks the condition.

I have searched everything I can think of and can't seem to find anything
> that can allow this.
>
> Does anyone know a way to approach this?
>
> Thanks,
> Dave


Craig

PS: This kind of need is an area where component architectures like
JavaServer Faces can be handy ... it's much easier in that world to create a
component that conditionally creates a child component of the correct type,
and then renders it, without having to duplicate all the rendering logic.



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


Re: Is Struts supports indexed property like itemForSale[1].lineDetail[4].selected ... I searched but haven't found how?

2005-11-17 Thread David Gagnon

Thanks for the info!

I'll have a look !

Best regards
/David

Niall Pemberton wrote:


As Rahul points out the "nested" taglib should do what you want. Validator
doesn't support two levels like this - one option would be to use the
"extends" validator I wrote:

http://www.niallp.pwp.blueyonder.co.uk/strutsvalidatorextends.html#twolevels

Niall

- Original Message - 
From: "David Gagnon" <[EMAIL PROTECTED]>

To: "'Struts Users Mailing List'" 
Sent: Wednesday, November 16, 2005 1:07 PM
Subject: Is Struts supports indexed property like
itemForSale[1].lineDetail[4].selected ... I searched but haven't found how?


 


Hi all,

 Sorry for this question that I tought trivial . but I haven't found my
answer in the list . .so I ask you.

 
  
   
  



The code over gives:

   


value="on" class="contentBaseInlinedText" type="checkbox">
 


But I would like

   


name="lineDetail[0].selected" value="on" class="contentBaseInlinedText"
type="checkbox">
 


I guess struts don't support that... If yes is there a way I would be
able to validate it?

Thanks for your help!!!

/David
   





-
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: No getter method servlet Exception. using DynaActionForm

2005-11-17 Thread Dave Newton

fea jabi wrote:


By changing the form property boolean - Boolean


to


I am able to get the instance of the dynaactionform.

is it necessary to use Boolean itself?


Well, it's certainly better than java.lang.boolean, which doesn't exist.

One of the fun non-orthagonality aspects of Java. Without autoboxing, 
anyway.



Do all the Dynaform properties have to be initialized always?


No.

Dave



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



Re: Newbie problem with "Nested" tag library

2005-11-17 Thread ALEX HYDE
I don't think you're referencing your beans properly.
I've never seen that syntax before :O) but I'm pretty
new to this.

This version does just use tags:


 


It uses as an 'iterator' tag to loop, and an 'out' tag
to output your value. You nest the out tag inside of
the iterate tag and it will output what you specify in
value. In this case it will output the longname of
each employee. This looks like what you want to do? 

Gluck.

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

> Thanks Alex but i'd like to use only tags and if
> possible "Nested" tags
> 
> Why, this works
> 
> 
>  property="nom"/>
> 
> 
> 
> And, this not :
> 
> 
> 
> property="idemploiservice/>
> 
> 
> 
> I know that I have no attribute "name" in second
> case, but normally I don't know which I have to
> put...
> 
> Thanks for help!
> 
>  
>   - Original Message - 
>   From: ALEX HYDE 
>   To: Struts Users Mailing List 
>   Sent: Thursday, November 17, 2005 4:23 PM
>   Subject: Re: Newbie problem with "Nested" tag
> library
> 
> 
>   You might try something along the lines of:
> 
>   
>   
>
value=${employee.emploiservice.emploi.libellelong}"/>
>   
> 
>   Syntax not accurate... :O|
> 
>   --- Gaet <[EMAIL PROTECTED]> wrote:
> 
>   > Hi everybody,
>   > 
>   > I currently want to display a value with
> struts's
>   > tags instead with "pure"
>   > java.
>   > Here is the code I want to translate :
>   > 
>   > <%=
>   >
>  
>
((Employe)employesVector.elementAt(i)).getEmploiservice().getEmploi().getLib
>   > ellelong()   %>
>   > 
>   > 
>   > I have tried to translate with nested library as
> it
>   > seems to be the solution
>   > but with no result.
>   > 
>   > 
>   >  name="employesVector">
>   > 
>   > 
>   >> property="libellelong"/>
>   > 
>   > 
>   > 
>   > 
>   > Does anybody know the solution? (or have a link
> on a
>   > good tutorial/samples)
>   > 
>   > Thanks very much for your help
>   > 
>   > 
>   > 
>   >
>  
>
-
>   > To unsubscribe, e-mail:
>   > [EMAIL PROTECTED]
>   > For additional commands, e-mail:
>   > [EMAIL PROTECTED]
>   > 
>   > 
> 
> 
> 
> 
>  
>
___
> 
>   Yahoo! Model Search 2005 - Find the next catwalk
> superstars -
> http://uk.news.yahoo.com/hot/model-search/
> 
>  
>
-
>   To unsubscribe, e-mail:
> [EMAIL PROTECTED]
>   For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Re: Newbie problem with "Nested" tag library

2005-11-17 Thread Gaet
HI,

I found the solution and it was just missing the  element.

Here is the complete stuff :











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



Re: Newbie problem with "Nested" tag library

2005-11-17 Thread Gaet
With the code :



   
  
  


  And, this not :

  
  
 
  


Syntax not accurate... :O|

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

> Hi everybody,
> 
> I currently want to display a value with struts's
> tags instead with "pure"
> java.
> Here is the code I want to translate :
> 
> <%=
>
((Employe)employesVector.elementAt(i)).getEmploiservice().getEmploi().getLib
> ellelong()   %>
> 
> 
> I have tried to translate with nested library as it
> seems to be the solution
> but with no result.
> 
> 
> 
> 
> 
>  property="libellelong"/>
> 
> 
> 
> 
> Does anybody know the solution? (or have a link on a
> good tutorial/samples)
> 
> Thanks very much for your help
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
Yahoo! Model Search 2005 - Find the next catwalk superstars - 
http://uk.news.yahoo.com/hot/model-search/

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



Re: Newbie problem with "Nested" tag library

2005-11-17 Thread Gaet
Thanks Alex but i'd like to use only tags and if possible "Nested" tags

Why, this works






And, this not :



   

  

  Syntax not accurate... :O|

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

  > Hi everybody,
  > 
  > I currently want to display a value with struts's
  > tags instead with "pure"
  > java.
  > Here is the code I want to translate :
  > 
  > <%=
  >
  ((Employe)employesVector.elementAt(i)).getEmploiservice().getEmploi().getLib
  > ellelong()   %>
  > 
  > 
  > I have tried to translate with nested library as it
  > seems to be the solution
  > but with no result.
  > 
  > 
  > 
  > 
  > 
  >  property="libellelong"/>
  > 
  > 
  > 
  > 
  > Does anybody know the solution? (or have a link on a
  > good tutorial/samples)
  > 
  > Thanks very much for your help
  > 
  > 
  > 
  >
  -
  > To unsubscribe, e-mail:
  > [EMAIL PROTECTED]
  > For additional commands, e-mail:
  > [EMAIL PROTECTED]
  > 
  > 




  ___ 
  Yahoo! Model Search 2005 - Find the next catwalk superstars - 
http://uk.news.yahoo.com/hot/model-search/

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



[struts faces] form-bean vs managed-bean

2005-11-17 Thread Garner, Shawn
I was looking at the struts faces example app and was wondering what the
difference between the managed-bean and a form-bean was?

I would think managed-beans would replace the need for form beans.

 

They are both beans but I was wondering how they are different in this
architecture?

 

 

Shawn

 


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



Re: 1.3 Struts Validator Plugin Bug

2005-11-17 Thread Joe Germuska
By default, Struts expects a path as the value to "input", not a 
forward name.  You must explicitly configure if you prefer to use the 
forward name.


See 
http://struts.apache.org/struts-core/userGuide/configuration.html#controller_config, 
specifically the "inputForward" attribute.


Joe


At 2:19 PM + 11/17/05, Aaron Evans wrote:

Following the example validator application, I make a simple action config
like so:









I have the validator plugin turned on and validating the form. If I submit
it with no form values filled in, then I get the following exception:

java.lang.IllegalArgumentException: Path input-form does not start with
a "/" character

The reason?  The action's input attribute is set to the value "input-form". 
This simply references the forward named "input-form", just like the example.

But the validator plugin errors out because the "input-form" does not start
with a "/".

Changing the input attribute and forward name to "/input-form" does not
help because it then tries the literal URI "/input-form" and I then get
a 404 with:

The requested resource (/input-form) is not available.






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



--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex


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



Re: No getter method servlet Exception. using DynaActionForm

2005-11-17 Thread fea jabi

By changing the form property boolean - Boolean


to


I am able to get the instance of the dynaactionform.

is it necessary to use Boolean itself?

none of my form properties are initialized. all strings are "" and Boolean 
are  by default from what I see thru System.out.println of form in my 
action.


Since they are as above I am getting the "no getter method for property 
exception I think". Am I right?


Do all the Dynaform properties have to be initialized always?

thanks.

Thank you all for helping me using the dynaactionform.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Wed, 16 Nov 2005 22:49:52 -0500

What you have below looks right to me; the action mapping has 'name' set to 
your action form, so you should be getting an instance of it in the action. 
Double check you haven't gotten your config out of sync along the way.


L.

fea jabi wrote:

thanks for your response. Understood better now.

I am not sure why but the setupForm is null in the Action when debugged 
thru the code.


DynaActionForm setupForm = (DynaActionForm) form;

System.out.println("In PrepareSetupAction : setupform is : " + setupForm);


Any idea of why it's so? Is there anything else I have to do?

Thanks.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: No getter method servlet Exception. using DynaActionForm
Date: Wed, 16 Nov 2005 15:48:33 -0500

At least part of your problem is the way you're trying to setup the 
action form. Struts will create an instance of the form bean for you, 
which is what is passed into execute() via the 'form' parameter. You're 
referencing that in the first line of your execute() method.


However, you then go on to build your own form bean instance, and replace 
the one Struts put in the request with the one you've built. You don't 
need to do this; just use the bean Struts supplies in the 'form' 
parameter.


You mentioned that someone has suggested you needed to do this to get 
initial values populated; that's not the case. The first time Struts 
builds an instance of DynaActionForm, it will populate properties for 
which you've supplied an initial value. What it won't do is reset 
properties to their initial values when the reset() method is called on 
the form, which you might care about if you have the form stored in 
session scope. You can worry about that later though.


So, essentially, your execute() method can be simplified to just this:

>public ActionForward execute(ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response)
>   throws ServletException, IOException{
>DynaActionForm setupForm = (DynaActionForm) form;
>//getSetupInfo(setupForm);
>return mapping.findForward("success");
>}

L.

fea jabi wrote:


Thanks for hepling me. here is the code


   
   
   
   initial="true"/>

   


   redirect="false"/>





public class PrepareSetupAction extends Action {

   /** Creates a new instance of PrepareSetupAction */
   public PrepareSetupAction() {
   }

   public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws ServletException, IOException{
   DynaActionForm setupForm = (DynaActionForm) form;

   System.out.println("In PrepareSetupAction : setupform is : " + 
setupForm);


   //getSetupInfo(setupForm);

   ModuleConfig moduleConfig = 
RequestUtils.getModuleConfig(request, getServlet().getServletContext());
   FormBeanConfig formConfig = 
moduleConfig.findFormBeanConfig("SetupForm");
   DynaActionFormClass dynaClass = 
DynaActionFormClass.createDynaActionFormClass(formConfig);


   try {
   setupForm = (DynaActionForm)dynaClass.newInstance();
   System.out.println("In PrepareSetupAction in try : setupform 
is : " + setupForm);

   }
   catch (Exception e) {
   //logger.error(e);
   }

   //request.setAttribute("SetupForm", setupForm);
   return mapping.findForward("success");
   }

}


   
   

..

   
   



   
   
   styleClass="invisibleInput" readonly="true" tabindex="-1"/>

   
   
   
   
   
   
key="colon"/>

   
   
   
   
   
   

Re: Newbie problem with "Nested" tag library

2005-11-17 Thread ALEX HYDE
You might try something along the lines of:


  


Syntax not accurate... :O|

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

> Hi everybody,
> 
> I currently want to display a value with struts's
> tags instead with "pure"
> java.
> Here is the code I want to translate :
> 
> <%=
>
((Employe)employesVector.elementAt(i)).getEmploiservice().getEmploi().getLib
> ellelong()   %>
> 
> 
> I have tried to translate with nested library as it
> seems to be the solution
> but with no result.
> 
> 
> 
> 
> 
>  property="libellelong"/>
> 
> 
> 
> 
> Does anybody know the solution? (or have a link on a
> good tutorial/samples)
> 
> Thanks very much for your help
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
Yahoo! Model Search 2005 - Find the next catwalk superstars - 
http://uk.news.yahoo.com/hot/model-search/

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



Re: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread Ed Griebel
Your web server is appending the SID to the images (and would to other
links to the same webapp in the page) to track sessions, and is a
common technique used by webservers to support sessions when browser
clients don't support cookies.

I'm a little fuzzy on how exactly this works because it "Just Works",
and some of the "old salts" on the list could probably explain it
better, but here's what I think is happening. Some background, when a
session-based request comes in, it sees if the client has also sent a
cookie for the session. If not, assumes that the client does not have
cookies enabled, so appends the session id to every link so that
requests can be matched to sessions. For your situation, in the first
request, a session is created, and since there will be no cookie from
the client because it's a new sesion, the resposne to the client will
include a cookie and a session id on links because the server cannot
know if cookies are accepted or not. Why you don't see it after the
first request is because after the first request the client is
returning the session ID cookie.

There is probably a much better discusson of how this works elsewhere,
maybe at the Tomcat website. Also, I'm not sure what web server you're
using, most use jsessionid; you could try searching for that on the
list.

You might be able to get around this by specifying a redirect=true for
this initial page.
-ed

On 11/17/05, Aladin Alaily <[EMAIL PROTECTED]> wrote:
> Hmmm... that's interesting.
>
> It looks as though I have no control on whether or not the SID is
> appended.  The first time my page is loaded, the SID is appended and the
> images & links don't resolve.  If I reload the page, the SID are removed
> and everything resolves.
>
> I am using Tomcat 5.5.12 and the following jars & tlds:
>
> struts-1.2.7.jar
> commons-beanutils-1.7.0.jar
> commons-collections-3.1.jar
> commons-digester-1.7.jar
> commons-logging-api-1.0.4.jar
> standard-1.1.2.jar
>
> servlet-api.jar -> Tomcat's
> jsp-api.jar -> Tomcat's
>
> struts-bean-1.1.tld
> struts-html-1.1.tld
> struts-logic-1.1.tld
> struts-nested-1.1.tld
> c-1.1.2.tld
>
>
> Aladin
>
>
> > It works for me.
> >
> > I would guess that this is pretty standard HTTP to be
> > honest. It should resolve the images by stripping off
> > any unnecessary SID info' etc, if you don't use it for
> > security checking for example. I thought that the
> > requests for images are exactly the same as a request
> > for any other resource, ie, a standard HTTP request
> > and therefore the SID is appended unless you
> > explicitly turn it off. Your web server should
> > resoplve the path of the url whether or not there is a
> > SID attached.
> >
> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >
> >> That's not normal...  If you add the semi-colon and
> >> the jsessionid to an
> >> image src, then the image is not going to resolve
> >> properly.  That's the
> >> behaviour that I'm noticing - with the jsessionid,
> >> the links & images
> >> don't resolve.
> >>
> >> Aladin
> >>
> >>
> >>
> >> > That's normal. What's wrong with that?
> >> >
> >> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I am using  and  tags but
> >> when
> >> >> they are evaluated a
> >> >> jsessionid is appended:
> >> >>
> >> >> Image Example:
> >> >> --
> >> >>  >> width="1"
> >> >> />
> >> >>
> >> >> GIVES
> >> >>
> >> >>  >> >>
> >> >
> >>
> > src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> >> >>
> >> >> height="10" width="1">
> >> >>
> >> >> Link Example:
> >> >> -
> >> >>  >> />"
> >> >> rel="stylesheet"
> >> >> type="text/css">
> >> >>
> >> >> GIVES
> >> >>
> >> >>  >> >>
> >> >
> >>
> > href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> >> >>
> >> >> rel="stylesheet" type="text/css">
> >> >>
> >> >> Has anyone experienced this before?  If so, how
> >> did
> >> >> you fix this problem.
> >> >>
> >> >> I am using struts 1.7
> >> >>
> >> >> Thanks.
> >> >> Aladin
> >> >>
> >> >>
> >> >
> >>
> > -
> >> >> To unsubscribe, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >> For additional commands, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> > ___
> >> > Yahoo! Messenger - NEW crystal clear PC to PC
> >> calling worldwide with
> >> > voicemail http://uk.messenger.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: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread brenmcguire
I think this "problem" resides in the rewrite of the URL that Struts
makes.
Each time an URL is encountered (or an action path, or something similar)
an URL rewrite happens.
Now, if there is no session cookie activated (I mean in the HTTP-request),
or cookies are disabled, then it appends the SID at the end of the URL.
Otherwise, there is no need for SID in the URL.
Try disabling cookies in your browser and probably you will see that the
SID is still there after reload.
Ciao
Antonio Petrelli

Aladin Alaily wrote:

>Hmmm... that's interesting.
>
>It looks as though I have no control on whether or not the SID is
>appended.  The first time my page is loaded, the SID is appended and the
>images & links don't resolve.  If I reload the page, the SID are removed
>and everything resolves.
>
>I am using Tomcat 5.5.12 and the following jars & tlds:
>
>struts-1.2.7.jar
>commons-beanutils-1.7.0.jar
>commons-collections-3.1.jar
>commons-digester-1.7.jar
>commons-logging-api-1.0.4.jar
>standard-1.1.2.jar
>
>servlet-api.jar -> Tomcat's
>jsp-api.jar -> Tomcat's
>
>struts-bean-1.1.tld
>struts-html-1.1.tld
>struts-logic-1.1.tld
>struts-nested-1.1.tld
>c-1.1.2.tld
>
>
>Aladin
>
>
>>It works for me.
>>
>>I would guess that this is pretty standard HTTP to be
>>honest. It should resolve the images by stripping off
>>any unnecessary SID info' etc, if you don't use it for
>>security checking for example. I thought that the
>>requests for images are exactly the same as a request
>>for any other resource, ie, a standard HTTP request
>>and therefore the SID is appended unless you
>>explicitly turn it off. Your web server should
>>resoplve the path of the url whether or not there is a
>>SID attached.
>>
>>--- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>>
>>>That's not normal...  If you add the semi-colon and
>>>the jsessionid to an
>>>image src, then the image is not going to resolve
>>>properly.  That's the
>>>behaviour that I'm noticing - with the jsessionid,
>>>the links & images
>>>don't resolve.
>>>
>>>Aladin
>>>
>>>
>>>
That's normal. What's wrong with that?

--- Aladin Alaily <[EMAIL PROTECTED]> wrote:

>Hi,
>
>I am using  and  tags but
>>>
>>>when
>>>
>they are evaluated a
>jsessionid is appended:
>
>Image Example:
>--
>>>
>>>width="1"
>>>
>/>
>
>GIVES
>
>
>>src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>>
>height="10" width="1">
>
>Link Example:
>-
>>>
>>>/>"
>>>
>rel="stylesheet"
>type="text/css">
>
>GIVES
>
>
>>href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>>
>rel="stylesheet" type="text/css">
>
>Has anyone experienced this before?  If so, how
>>>
>>>did
>>>
>you fix this problem.
>
>I am using struts 1.7
>
>Thanks.
>Aladin
>
>
>>-
>>
>To unsubscribe, e-mail:
>[EMAIL PROTECTED]
>For additional commands, e-mail:
>[EMAIL PROTECTED]
>
>






>>___
>>
Yahoo! Messenger - NEW crystal clear PC to PC
>>>
>>>calling worldwide with
>>>
voicemail http://uk.messenger.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]
>>>
>>>
>>
>>
>>
>>
>>
>>___
>>Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with
>>voicemail http://uk.messenger.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]
>
>


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



Re: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread ALEX HYDE
Aladin,

I'm no expert so I can't tell exactly what's wrong
from what you're saying. Have u ripped out those url's
to the images (with and without SID) and just tried
them in a browser direct? Make sure it can find them
and see if it serves them up in both cases. If it
can't find them with a SID attached maybe there is a
filter checking for sessions and stopping non-valid
sessions? I'm guessing here and I'm sure I'm one of
the lesser qualified to answer. I'm guessing that the
path itself should always resolve to the image, the
question is whether something is stopping it (eg: a
filter).

Gluck. My knowledge ends about here I'm afraid.

--- Aladin Alaily <[EMAIL PROTECTED]> wrote:

> Hmmm... that's interesting.
> 
> It looks as though I have no control on whether or
> not the SID is
> appended.  The first time my page is loaded, the SID
> is appended and the
> images & links don't resolve.  If I reload the page,
> the SID are removed
> and everything resolves.
> 
> I am using Tomcat 5.5.12 and the following jars &
> tlds:
> 
> struts-1.2.7.jar
> commons-beanutils-1.7.0.jar
> commons-collections-3.1.jar
> commons-digester-1.7.jar
> commons-logging-api-1.0.4.jar
> standard-1.1.2.jar
> 
> servlet-api.jar -> Tomcat's
> jsp-api.jar -> Tomcat's
> 
> struts-bean-1.1.tld
> struts-html-1.1.tld
> struts-logic-1.1.tld
> struts-nested-1.1.tld
> c-1.1.2.tld
> 
> 
> Aladin
> 
> 
> > It works for me.
> >
> > I would guess that this is pretty standard HTTP to
> be
> > honest. It should resolve the images by stripping
> off
> > any unnecessary SID info' etc, if you don't use it
> for
> > security checking for example. I thought that the
> > requests for images are exactly the same as a
> request
> > for any other resource, ie, a standard HTTP
> request
> > and therefore the SID is appended unless you
> > explicitly turn it off. Your web server should
> > resoplve the path of the url whether or not there
> is a
> > SID attached.
> >
> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >
> >> That's not normal...  If you add the semi-colon
> and
> >> the jsessionid to an
> >> image src, then the image is not going to resolve
> >> properly.  That's the
> >> behaviour that I'm noticing - with the
> jsessionid,
> >> the links & images
> >> don't resolve.
> >>
> >> Aladin
> >>
> >>
> >>
> >> > That's normal. What's wrong with that?
> >> >
> >> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I am using  and  tags but
> >> when
> >> >> they are evaluated a
> >> >> jsessionid is appended:
> >> >>
> >> >> Image Example:
> >> >> --
> >> >>  >> width="1"
> >> >> />
> >> >>
> >> >> GIVES
> >> >>
> >> >>  >> >>
> >> >
> >>
> >
>
src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> >> >>
> >> >> height="10" width="1">
> >> >>
> >> >> Link Example:
> >> >> -
> >> >>  >> />"
> >> >> rel="stylesheet"
> >> >> type="text/css">
> >> >>
> >> >> GIVES
> >> >>
> >> >>  >> >>
> >> >
> >>
> >
>
href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> >> >>
> >> >> rel="stylesheet" type="text/css">
> >> >>
> >> >> Has anyone experienced this before?  If so,
> how
> >> did
> >> >> you fix this problem.
> >> >>
> >> >> I am using struts 1.7
> >> >>
> >> >> Thanks.
> >> >> Aladin
> >> >>
> >> >>
> >> >
> >>
> >
>
-
> >> >> To unsubscribe, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >> For additional commands, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >
>
___
> >> > Yahoo! Messenger - NEW crystal clear PC to PC
> >> calling worldwide with
> >> > voicemail http://uk.messenger.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]
> >>
> >>
> >
> >
> >
> >
> >
> >
> >
>
___
> > Yahoo! Messenger - NEW crystal clear PC to PC
> calling worldwide with
> > voicemail http://uk.messenger.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]
> 
> 




___ 
Yahoo! Model Search 2005 - Find the next catwalk superstars - 
http://uk.news.yahoo.com/hot/model-search/

---

1.3 Struts Validator Plugin Bug

2005-11-17 Thread Aaron Evans
Following the example validator application, I make a simple action config
like so:


 






I have the validator plugin turned on and validating the form. If I submit
it with no form values filled in, then I get the following exception:

java.lang.IllegalArgumentException: Path input-form does not start with 
a "/" character

The reason?  The action's input attribute is set to the value "input-form".  
This simply references the forward named "input-form", just like the example.
But the validator plugin errors out because the "input-form" does not start
with a "/".

Changing the input attribute and forward name to "/input-form" does not 
help because it then tries the literal URI "/input-form" and I then get 
a 404 with:

The requested resource (/input-form) is not available.






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



Re: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread Aladin Alaily
Hmmm... that's interesting.

It looks as though I have no control on whether or not the SID is
appended.  The first time my page is loaded, the SID is appended and the
images & links don't resolve.  If I reload the page, the SID are removed
and everything resolves.

I am using Tomcat 5.5.12 and the following jars & tlds:

struts-1.2.7.jar
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-digester-1.7.jar
commons-logging-api-1.0.4.jar
standard-1.1.2.jar

servlet-api.jar -> Tomcat's
jsp-api.jar -> Tomcat's

struts-bean-1.1.tld
struts-html-1.1.tld
struts-logic-1.1.tld
struts-nested-1.1.tld
c-1.1.2.tld


Aladin


> It works for me.
>
> I would guess that this is pretty standard HTTP to be
> honest. It should resolve the images by stripping off
> any unnecessary SID info' etc, if you don't use it for
> security checking for example. I thought that the
> requests for images are exactly the same as a request
> for any other resource, ie, a standard HTTP request
> and therefore the SID is appended unless you
> explicitly turn it off. Your web server should
> resoplve the path of the url whether or not there is a
> SID attached.
>
> --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>
>> That's not normal...  If you add the semi-colon and
>> the jsessionid to an
>> image src, then the image is not going to resolve
>> properly.  That's the
>> behaviour that I'm noticing - with the jsessionid,
>> the links & images
>> don't resolve.
>>
>> Aladin
>>
>>
>>
>> > That's normal. What's wrong with that?
>> >
>> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>> >
>> >> Hi,
>> >>
>> >> I am using  and  tags but
>> when
>> >> they are evaluated a
>> >> jsessionid is appended:
>> >>
>> >> Image Example:
>> >> --
>> >> > width="1"
>> >> />
>> >>
>> >> GIVES
>> >>
>> >> > >>
>> >
>>
> src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>> >>
>> >> height="10" width="1">
>> >>
>> >> Link Example:
>> >> -
>> >> > />"
>> >> rel="stylesheet"
>> >> type="text/css">
>> >>
>> >> GIVES
>> >>
>> >> > >>
>> >
>>
> href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>> >>
>> >> rel="stylesheet" type="text/css">
>> >>
>> >> Has anyone experienced this before?  If so, how
>> did
>> >> you fix this problem.
>> >>
>> >> I am using struts 1.7
>> >>
>> >> Thanks.
>> >> Aladin
>> >>
>> >>
>> >
>>
> -
>> >> To unsubscribe, e-mail:
>> >> [EMAIL PROTECTED]
>> >> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
> ___
>> > Yahoo! Messenger - NEW crystal clear PC to PC
>> calling worldwide with
>> > voicemail http://uk.messenger.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]
>>
>>
>
>
>
>
>
>
> ___
> Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with
> voicemail http://uk.messenger.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: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread ALEX HYDE
It works for me. 

I would guess that this is pretty standard HTTP to be
honest. It should resolve the images by stripping off
any unnecessary SID info' etc, if you don't use it for
security checking for example. I thought that the
requests for images are exactly the same as a request
for any other resource, ie, a standard HTTP request
and therefore the SID is appended unless you
explicitly turn it off. Your web server should
resoplve the path of the url whether or not there is a
SID attached.

--- Aladin Alaily <[EMAIL PROTECTED]> wrote:

> That's not normal...  If you add the semi-colon and
> the jsessionid to an
> image src, then the image is not going to resolve
> properly.  That's the
> behaviour that I'm noticing - with the jsessionid,
> the links & images
> don't resolve.
> 
> Aladin
> 
> 
> 
> > That's normal. What's wrong with that?
> >
> > --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >
> >> Hi,
> >>
> >> I am using  and  tags but
> when
> >> they are evaluated a
> >> jsessionid is appended:
> >>
> >> Image Example:
> >> --
> >>  width="1"
> >> />
> >>
> >> GIVES
> >>
> >>  >>
> >
>
src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> >>
> >> height="10" width="1">
> >>
> >> Link Example:
> >> -
> >>  />"
> >> rel="stylesheet"
> >> type="text/css">
> >>
> >> GIVES
> >>
> >>  >>
> >
>
href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> >>
> >> rel="stylesheet" type="text/css">
> >>
> >> Has anyone experienced this before?  If so, how
> did
> >> you fix this problem.
> >>
> >> I am using struts 1.7
> >>
> >> Thanks.
> >> Aladin
> >>
> >>
> >
>
-
> >> To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> >
> >
> >
> >
>
___
> > Yahoo! Messenger - NEW crystal clear PC to PC
> calling worldwide with
> > voicemail http://uk.messenger.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]
> 
> 






___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

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



Re: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread Aladin Alaily
That's not normal...  If you add the semi-colon and the jsessionid to an
image src, then the image is not going to resolve properly.  That's the
behaviour that I'm noticing - with the jsessionid, the links & images
don't resolve.

Aladin



> That's normal. What's wrong with that?
>
> --- Aladin Alaily <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I am using  and  tags but when
>> they are evaluated a
>> jsessionid is appended:
>>
>> Image Example:
>> --
>> > />
>>
>> GIVES
>>
>> >
> src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>>
>> height="10" width="1">
>>
>> Link Example:
>> -
>> "
>> rel="stylesheet"
>> type="text/css">
>>
>> GIVES
>>
>> >
> href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
>>
>> rel="stylesheet" type="text/css">
>>
>> Has anyone experienced this before?  If so, how did
>> you fix this problem.
>>
>> I am using struts 1.7
>>
>> Thanks.
>> Aladin
>>
>>
> -
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>>
>
>
>
>
>
>
> ___
> Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with
> voicemail http://uk.messenger.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: How to make a preview

2005-11-17 Thread Martin Gainty

Jesper-
when you construct your URL be sure to supply your Query parameter e.g.
protected void set(String protocol,
  String host,
  int port,
  String authority,
  String userInfo,
  String path,
  String query,
  String ref)
take a look at http://java.sun.com/j2se/1.4.2/docs/api/
God Held,
Martin-
- Original Message - 
From: "Jesper Preuss" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Thursday, November 17, 2005 9:09 AM
Subject: RE: How to make a preview


Do you mean a parameter in the url. Or is this token a special Struts
token.

I have solved my preview problem using javascript. Where I put a
?preview=true in front of all links and in the forms actions. This is
what I call a hack. So please tell me how to do it better.

-Oprindelig meddelelse-
Fra: Mark Benussi [mailto:[EMAIL PROTECTED] 
Sendt: 17. november 2005 13:05

Til: 'Struts Users Mailing List'
Emne: RE: How to make a preview

Pass a token to the new window indicating it's a preview.

Then display the new styles for the new window, ensuring that the token
gets
passed to all the links and forms etc

-Original Message-
From: Jesper Preuss [mailto:[EMAIL PROTECTED] 
Sent: 17 November 2005 11:45

To: user@struts.apache.org
Subject: How to make a preview

Hi !

Hi have a web project using struts.

My homepage have an administrator module. Where you can change pictures,
CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the new
CSS colors permanent. And it will show for all the users of the page.

What I would like to do is, add an button Submit->"preview" to this
form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.

You should be able to close the window. The original browser windows
session should not be affected by the preview values.

It is one session and two browsers, showing two different color schemes.

How do you implement this in Struts.

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



Newbie problem with "Nested" tag library

2005-11-17 Thread Gaet
Hi everybody,

I currently want to display a value with struts's tags instead with "pure"
java.
Here is the code I want to translate :

<%=
((Employe)employesVector.elementAt(i)).getEmploiservice().getEmploi().getLib
ellelong()   %>


I have tried to translate with nested library as it seems to be the solution
but with no result.










Does anybody know the solution? (or have a link on a good tutorial/samples)

Thanks very much for your help



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



Re: Donwload files

2005-11-17 Thread Ext . Ilitia2

Thanks... it works

Verdad.





   
  "Martin Gainty"   
   
  <[EMAIL PROTECTED]To:   <[EMAIL PROTECTED]>   
   
  com> cc:   
  
   bcc: 
   
  17/11/2005 15:17 Subject:  Re: Donwload files 
   
  Please respond to 
   
  "Struts Users 
   
  Mailing List" 
   

   

   

   

   

   




you have to setContentType to application/x-download
then set the Content Dispostion to attachment
// Set the headers.
res.setContentType("application/x-download");
res.setHeader("Content-Disposition", "attachment; filename=" + filename);

// Send the file.
OutputStream out = res.getOutputStream(  );
returnFile(filename, out);  // Shown earlier in the chapter

Verdad?
M-
- Original Message -
From: <[EMAIL PROTECTED]>
To: 
Sent: Thursday, November 17, 2005 6:44 AM
Subject: Donwload files


> Hi,
>
> I have a appli lets download a file. My problem is what dialog box show
as
> file name 'anything.do' instead real file name.
> I remenber to read something about this, but I don't now know where
>
> Anyboy can remenber it?
>
>
>
> -
> 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]



Re: Donwload files

2005-11-17 Thread Martin Gainty

you have to setContentType to application/x-download
then set the Content Dispostion to attachment
// Set the headers.
res.setContentType("application/x-download");
res.setHeader("Content-Disposition", "attachment; filename=" + filename);

// Send the file.
OutputStream out = res.getOutputStream(  );
returnFile(filename, out);  // Shown earlier in the chapter

Verdad?
M-
- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Thursday, November 17, 2005 6:44 AM
Subject: Donwload files



Hi,

I have a appli lets download a file. My problem is what dialog box show as
file name 'anything.do' instead real file name.
I remenber to read something about this, but I don't now know where

Anyboy can remenber it?



-
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: How to make a preview

2005-11-17 Thread Jesper Preuss
Do you mean a parameter in the url. Or is this token a special Struts
token.

I have solved my preview problem using javascript. Where I put a
?preview=true in front of all links and in the forms actions. This is
what I call a hack. So please tell me how to do it better.

-Oprindelig meddelelse-
Fra: Mark Benussi [mailto:[EMAIL PROTECTED] 
Sendt: 17. november 2005 13:05
Til: 'Struts Users Mailing List'
Emne: RE: How to make a preview

Pass a token to the new window indicating it's a preview.

Then display the new styles for the new window, ensuring that the token
gets
passed to all the links and forms etc

-Original Message-
From: Jesper Preuss [mailto:[EMAIL PROTECTED] 
Sent: 17 November 2005 11:45
To: user@struts.apache.org
Subject: How to make a preview

Hi !
 
Hi have a web project using struts.
 
My homepage have an administrator module. Where you can change pictures,
CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the new
CSS colors permanent. And it will show for all the users of the page.
 
What I would like to do is, add an button Submit->"preview" to this
form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.
 
You should be able to close the window. The original browser windows
session should not be affected by the preview values.
 
It is one session and two browsers, showing two different color schemes.
 
How do you implement this in Struts.

-
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: Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread ALEX HYDE
That's normal. What's wrong with that?

--- Aladin Alaily <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am using  and  tags but when
> they are evaluated a 
> jsessionid is appended:
> 
> Image Example:
> --
>  />
> 
> GIVES
> 
> 
src="/images/x.gif;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> 
> height="10" width="1">
> 
> Link Example:
> -
> "
> rel="stylesheet" 
> type="text/css">
> 
> GIVES
> 
> 
href="/css/styles.css;jsessionid=1F69046A7709D30FD9AC36FC6E8A4336"
> 
> rel="stylesheet" type="text/css">
> 
> Has anyone experienced this before?  If so, how did
> you fix this problem.
> 
> I am using struts 1.7
> 
> Thanks.
> Aladin
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 






___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

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



Re: [shale] why shale?

2005-11-17 Thread pc leung
I find these web pages.
They compare JSF with Tapestry.
and tells something about Struts

http://www.theserverside.com/articles/article.tss?l=JSFTapestry

http://www.theserverside.com/news/thread.tss?thread_id=35899

On 11/17/05, Thomas Hamacher <[EMAIL PROTECTED]> wrote:
> On Thursday 17 November 2005 04:24, Craig McClanahan wrote:
> > Does shale add jsf features Struts?
> >
> > > If I add MyFaces to Struts, can existing struts web app has jsf features?
> >
> > No, Shale does not do that ... it is completely independent of Struts
> > 1.xcode ... but there is an alternative library that does:
> >
> >http://struts.apache.org/faces/
>
> Mmmh, what are the advantages of JSF against struts? Why should I want to add
> JSF into Struts? Can anyone tell me a few advantages of JSF in a struts
> environment? Or tell me a link where this is discussed?
>
> thanks
> Thomas
>
> -
> 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]



Has anybody experienced this weirdness with taglibs?

2005-11-17 Thread Aladin Alaily

Hi,

I am using  and  tags but when they are evaluated a 
jsessionid is appended:


Image Example:
--


GIVES

height="10" width="1">


Link Example:
-
" rel="stylesheet" 
type="text/css">


GIVES

rel="stylesheet" type="text/css">


Has anyone experienced this before?  If so, how did you fix this problem.

I am using struts 1.7

Thanks.
Aladin

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



[Help] I18N does not work and I think I have tried all ....

2005-11-17 Thread Lixin Chu
Hi All,
appreciate any help here ...This is what I have done in trying to 
show strings in the selected language:
 - I have various /WEB-INF/classes/ApplicationResources.properties
files, for example APplicationResoruces_ja.properties
 - in struts-config.xml, I have:
   
 - in web.xml I have a filter:


encodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true



 - for each JSP file, I have:
   <%@ page language="java" pageEncoding="UTF-8"
contentType="text/html;charset=UTF-8" %>
   
 ..



   

 - a post login filter to set user's locale based on language setting:
   session.setAttribute("org.apache.struts.action.LOCALE", .)


but the button.add always show English. Anything I missed out ?

I am using Spring framework with Struts 1.2.7, and Tiles.

thanks !
lixin

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



Custom tags referencing struts tags

2005-11-17 Thread David Whipple

I would like to be able to create a custom tag which is able to use the
struts ,  or  fields.  I am not able
to find a way to create a tag library that can produce/call/reference other
tags.

I am interested in making a custom tag for our application which will
either show a text entry field, a dropdown or a static text entry based on
the choices available to a particular user.  The choices will probably be
passed in as a collection in the request, where a single value results in a
hidden field (no choice for the user), a set of values results in a
dropdown, and a special case of a single value zero, which means the user
can enter anything they like through a text entry field.

I have searched everything I can think of and can't seem to find anything
that can allow this.

Does anyone know a way to approach this?

Thanks,
Dave


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



struts layout collection client side sorting

2005-11-17 Thread Raghu Kanchustambham
Hi,
I have the following code:


http://enquiry.id/>}" sortable="true"/>







http://enquiry.id/>}">enroll


http://enquiry.id/>}">View  /
http://enquiry.id/>}">
Update






When I code this way, I see "sort" icons in the header of the table that is
generated. When I click on them, sorting happens but in a rather strange
fashion. It happens on the right adjacent column and not on the same column.
For example, when I click on Sort icon in Id column, the list is sorted on
First Name. Similarly clicking on First Name sort icon sorts the list based
on Last Name. Is this a bug? Or did I miss something in my code?

Thanks in Advance.

Regards,

Raghu


Re: Can't build project because of unavailable dtd

2005-11-17 Thread Lionel
[EMAIL PROTECTED] wrote:
> check you DOCTYPE in xml and DTD in struts.jar.

you are right, I used jakarta.apache.org instead of struts.apache.org.
Thanks !




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



RE: How to make a preview

2005-11-17 Thread Mark Benussi
Pass a token to the new window indicating it's a preview.

Then display the new styles for the new window, ensuring that the token gets
passed to all the links and forms etc

-Original Message-
From: Jesper Preuss [mailto:[EMAIL PROTECTED] 
Sent: 17 November 2005 11:45
To: user@struts.apache.org
Subject: How to make a preview

Hi !
 
Hi have a web project using struts.
 
My homepage have an administrator module. Where you can change pictures,
CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the new
CSS colors permanent. And it will show for all the users of the page.
 
What I would like to do is, add an button Submit->"preview" to this
form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.
 
You should be able to close the window. The original browser windows
session should not be affected by the preview values.
 
It is one session and two browsers, showing two different color schemes.
 
How do you implement this in Struts.

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



Re: Can't build project because of unavailable dtd

2005-11-17 Thread Sunil_Sahu
Lionel,

probably DOCTYPE which u have given in your xml file is not matching with 
the DOCTYPE in your struts.jar that why its trying to connect it to 
internet.

check you DOCTYPE in xml and DTD in struts.jar.





"Lionel" <[EMAIL PROTECTED]> 
Sent by: news <[EMAIL PROTECTED]>
11/17/2005 04:46 PM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Re: Can't build project because of unavailable dtd






Lionel wrote:
> Hi !
>
> Hi have a web project using struts.
> This morning, I've had problems to build this project be built because
> jakarta.apache.org has been unavailable for few minutes: eclipse
> tries to access the online dtd and gets blocked.
> The only way to be able to work is to disable xml validation, kill
> eclipse and start it again.
> Why doesn't it try to get the dtd from the struts.jar in web-inf/lib ?

wrong group selected: it was for the WTP group.
Sorry.




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




Donwload files

2005-11-17 Thread Ext . Ilitia2
Hi,

I have a appli lets download a file. My problem is what dialog box show as
file name 'anything.do' instead real file name.
I remenber to read something about this, but I don't now know where

Anyboy can remenber it?



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



How to make a preview

2005-11-17 Thread Jesper Preuss
Hi !
 
Hi have a web project using struts.
 
My homepage have an administrator module. Where you can change pictures,
CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the new
CSS colors permanent. And it will show for all the users of the page.
 
What I would like to do is, add an button Submit->"preview" to this
form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.
 
You should be able to close the window. The original browser windows
session should not be affected by the preview values.
 
It is one session and two browsers, showing two different color schemes.
 
How do you implement this in Struts.


Re: Can't build project because of unavailable dtd

2005-11-17 Thread Lionel
Lionel wrote:
> Hi !
>
> Hi have a web project using struts.
> This morning, I've had problems to build this project be built because
> jakarta.apache.org has been unavailable for few minutes: eclipse
> tries to access the online dtd and gets blocked.
> The only way to be able to work is to disable xml validation, kill
> eclipse and start it again.
> Why doesn't it try to get the dtd from the struts.jar in web-inf/lib ?

wrong group selected: it was for the WTP group.
Sorry.




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



Form Bean population

2005-11-17 Thread Marcio Ghiraldelli
   I need to populate a a form-bean with a collection for an  
instance.

   Wich is the better place to do it:

   1) Into the form-bean reset() method

   or

   2) In an Action before the jsp call

   ? 




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



Can't build project because of unavailable dtd

2005-11-17 Thread Lionel
Hi !

Hi have a web project using struts.
This morning, I've had problems to build this project be built because
jakarta.apache.org has been unavailable for few minutes: eclipse tries to
access the online dtd and gets blocked.
The only way to be able to work is to disable xml validation, kill eclipse
and start it again.
Why doesn't it try to get the dtd from the struts.jar in web-inf/lib ?




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



Re: html:rewrite with params

2005-11-17 Thread Thomas Hamacher
Laurie,

thank you so for. This makes sense to me.
But the problem is, that I don´t really have a source-url, as it is used in 
the examples. I´m using tiles and therefor I have to work with definitions. I 
guess, I cannot add any definition as a source, can I?

Actually I always want to return to the same page, together with any used 
params and all information of the form-bean, but with a different Locale. 
That´s it. But this doesn´t seems to be that trivial, altough I thought this 
would be a standard-problem...

Thomas

On Wednesday 16 November 2005 22:56, Laurie Harper wrote:
> You don't need to save the parameter, you can just append it to the URL
> you forward to at the end of your SwitchLanguage action, assuming you
> know it should be there. RedirectAction in Struts 1.2.7 and up gives you
> a relatively easy way to add parameters to a forward mapping before you
> return it.
>
> There's no way to save the parameter on the action forward, since such a
> feature wouldn't be very useful -- consider what would happen if two
> different users hit the switchLanguage action at the same time.
>
> If you need to solve the more general problem, where you don't know in
> your SwitchLanguage action where to return, it gets rather harder. See
> my post earlier today on this topic for some suggestions for that problem.
>
> L.
>
> Thomas Hamacher wrote:
> > Okay - here are some more details:
> >
> > Let's say I have the following URL: http://somehost/showEntry?entryID=343
> > I have multilanguage support in my application, so let´s assume, that I
> > click on the language-button and therefor call the page
> > /switchLanguage.do, which changes my Locale. The switchLanguage uses the
> > last ActionForward to link back to the refering page (showEntry). But the
> > problem is, that it doesn't have the param "entryID" anymore. So the page
> > shows an empty page. As I don't want to add this parameter in my
> > session-, but in the request scope I have to remember this param somehow.
> > So I thought if there might be a way to save this to the ActionForward,
> > because there is no request.setParameter()-Method anywhere. And I have
> > been told that the reques.getHeader("referer")-solution is pretty unsafe,
> > because of proxies and firewalls. So I wonder what would be the best way,
> > as I think refering back to one page and mulit-language-support should be
> > one of the standard-issues on modern webapplication.
> >
> > I hope that helps a little..
> >
> > Thanks
> > Thomas
> >
> > On Thursday 10 November 2005 22:31, Laurie Harper wrote:
> >>Thomas Hamacher wrote:
> >>>But anyways: does anybody know, if the parameters, given through paramId
> >>>are saved in an ActionForward? This would help me a lot, because I have
> >>>to remember the parameters - if any are used - together with my
> >>>ActionForward for later references. Right know I'm trying a workaround
> >>>with my own RequestProcessor, which tries to cut out the parameters and
> >>>save it somewhere and add it later to the ActionForward, but that
> >>> doesn't work that well.
> >>
> >>I'm not quite sure what you're trying to do. The parameters you specify
> >>through paramId are request parameters to include in the URL. They're
> >>available in your action through your form bean or from
> >>request.getParameter().
> >>
> >>An ActionForward is what your action returns to tell Struts where to
> >>forward control to after the request has been processed. So the
> >>parameters you setup when you construct the URL don't have anything to
> >>do it.
> >>
> >>Perhaps you can explain what you are trying to achieve by saving the
> >>parameters?
> >>
> >>L.
> >>
> >>
> >>-
> >>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]



Re: [shale] why shale?

2005-11-17 Thread Thomas Hamacher
On Thursday 17 November 2005 04:24, Craig McClanahan wrote:
> Does shale add jsf features Struts?
>
> > If I add MyFaces to Struts, can existing struts web app has jsf features?
>
> No, Shale does not do that ... it is completely independent of Struts
> 1.xcode ... but there is an alternative library that does:
>
>http://struts.apache.org/faces/

Mmmh, what are the advantages of JSF against struts? Why should I want to add 
JSF into Struts? Can anyone tell me a few advantages of JSF in a struts 
environment? Or tell me a link where this is discussed?

thanks
Thomas

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