How to transmit data from struts 2 to struts 1 ?

2007-05-08 Thread Michał Letyński

Hi.
I have actions in struts1 and struts2 in one application. Those struts1 
actions will be re-writed in near future to struts2. But i need one 
thing for now. In struts2 (Test.action ) i have some parameters -> 
collection of id's which  i want to transmit to struts1 (Test2.action). 
I cant do a simple forward and i cant do a redirect (my parameters will 
dissappear). A "dirty" workaround for it is to put those parameters to 
the session. Any other ideas ?


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



Re: need help[URL containing additionl information that was not requested]

2007-05-08 Thread Nuwan Chandrasoma

Hi,

This is something to do with your server, see your server documentation to 
hide the jsessionid from the URL


http://www.junlu.com/msg/201119.html

Thanks,

Nuwan

- Original Message - 
From: "rangana samarasinghe" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, May 09, 2007 5:28 AM
Subject: need help[URL containing additionl information that was not 
requested]




i used j2ee and struts with webspear
my web based system running perfectly but problem is whn i deplyed it
to test server whi run in AIX plat form,the url containig addition
information such as session id which is not showin in my lococal
machin (windows) and also i didnt use GEt method in this sysem

my local pc url after log in
http://127.0.0.1:9080/CCRMSWeb/accGetLogin.do

In test server url after log in
http://192.125.125.11:9080/CCRMSWeb/accGetLogin.do;jsessionid=L_3dnYQJ359bbcebJ3RGBAN:-1

u can see adition jsessionid part,so tell me a way to hide this in test 
server


-
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: need help[URL containing additionl information that was not requested]

2007-05-08 Thread rangana samarasinghe

ok thx for the help
On 5/9/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:

Hi,

This is something to do with your server, see your server documentation to
hide the jsessionid from the URL

http://www.junlu.com/msg/201119.html

Thanks,

Nuwan

- Original Message -
From: "rangana samarasinghe" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, May 09, 2007 5:28 AM
Subject: need help[URL containing additionl information that was not
requested]


>i used j2ee and struts with webspear
> my web based system running perfectly but problem is whn i deplyed it
> to test server whi run in AIX plat form,the url containig addition
> information such as session id which is not showin in my lococal
> machin (windows) and also i didnt use GEt method in this sysem
>
> my local pc url after log in
> http://127.0.0.1:9080/CCRMSWeb/accGetLogin.do
>
> In test server url after log in
> 
http://192.125.125.11:9080/CCRMSWeb/accGetLogin.do;jsessionid=L_3dnYQJ359bbcebJ3RGBAN:-1
>
> u can see adition jsessionid part,so tell me a way to hide this in test
> server
>
> -
> 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: Struts 1.3.8 and URL Validation

2007-05-08 Thread pushkar . p


> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
> Sent: Wednesday, May 09, 2007 11:26 AM
> To: user@struts.apache.org
> Subject: Re: Struts 1.3.8 and URL Validation
> 
> 
> [EMAIL PROTECTED] wrote:
> >> There is no JavaScript implementation of the url validation.
> >>
> >> Niall
> > 
> > Does it mean that the default "url" validator in validation.xml 
> > doesn't work?
> 
> No, it means that it only works on the server-side; there is 
> no client 
> side validation for this rule type.
> 
> L.

Ok, I'm a bit confused here. Can you please tell me how I can make use of
the "URL" validator in validation.xml?

I was referring to the Struts 1.x FAQs on this page:
http://struts.apache.org/1.x/faqs/validator.html

And the entry on that page for URL validator tells me that I can declare it
as:




And this is same as what I have done:




So, my question is, if this is not working, what else do I have to do to get
it working?


Thanks.

-Pushkar.


Re: Struts 1.3.8 and URL Validation

2007-05-08 Thread Laurie Harper

[EMAIL PROTECTED] wrote:

There is no JavaScript implementation of the url validation.

Niall


Does it mean that the default "url" validator in validation.xml doesn't
work?


No, it means that it only works on the server-side; there is no client 
side validation for this rule type.


L.


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



Re: Select Tag - Odd Behavior

2007-05-08 Thread Laurie Harper

Brian Trzupek wrote:
I am using Struts 2 (tried 2.0.1-2.0.6) and am having bizarre behavior 
with the select tag in a jsp page.


My code looks like this:

 

emptyOption="true" listKey="name" listValue="name"/>


id="hider"/>



When I do this the list gets displayed with the fully qualified class 
name of the bean with the ID, instead of the name and description 
fields. (almost as if it can't find them)


I'm not sure what you mean; do you get a list of options where the 
rendered 'id' attribute is incorrect? the rendered value is incorrect? 
or just a single option element? What description fields? It would be 
helpful to include a sample of what you're seeing rendered vs. what you 
were expecting to see.



My current work around is to create the select by hand with:




class="label">




">





id="hider"/>





So my question is, why does the struts iterator tag perform the 
traversal of the list correctly and the struts select tag does not? Any 
advise on how to 'make it work' would be appreciated.


What type does the getCredentialGenerators() method return? And, 
assuming it's some sort of collection, what do the elements look like? I 
can't think of any reason off hand why the first code snippet would fail 
and the second work, but without seeing more of your code or 
understanding exactly *how* the first snippet fails, it's tough to diagnose.


L.


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



Re: OGNL question

2007-05-08 Thread Laurie Harper
Why do you need to make the url-id unique on each loop iteration? Have 
you tried simply writing something like


  


...

You should, on the other hand, provide a unique value for the 'id' (and 
possibly 'name) attribute on the s:a tag as those get passed through to 
the rendered HTML.


If you're still having trouble, try describing what exactly you are 
trying to achieve, and posting a more complete code sample of how you're 
trying to achieve it.


L.

Felipe Rodrigues wrote:

I'm sorry, but I didn't got it.
When I pass in a parameter, I'll send it to the destiny. That is not what I
want. I only want to identify the url according to the id. This code is
inside a foreach, that renders lots of urls.

How would be that in this case?

Thanks,

Felipe


Martin Gainty wrote:

You'll need to pass in a parameter for id such as this




M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Felipe Rodrigues" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, May 08, 2007 3:31 PM
Subject: OGNL question



Hi,

How could i do that


 
 Link

changing EL by OGNL?
The especific part  href="%{setUsina${id}}" . I tried
href="%{setUsina(#id)}" but didn't work.

Thanks,


Felipe


--
View this message in context: 
http://www.nabble.com/OGNL-question-tf3711762.html#a10382481

Sent from the Struts - User mailing list archive at Nabble.com.


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




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








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



need help[URL containing additionl information that was not requested]

2007-05-08 Thread rangana samarasinghe

i used j2ee and struts with webspear
my web based system running perfectly but problem is whn i deplyed it
to test server whi run in AIX plat form,the url containig addition
information such as session id which is not showin in my lococal
machin (windows) and also i didnt use GEt method in this sysem

my local pc url after log in
http://127.0.0.1:9080/CCRMSWeb/accGetLogin.do

In test server url after log in
http://192.125.125.11:9080/CCRMSWeb/accGetLogin.do;jsessionid=L_3dnYQJ359bbcebJ3RGBAN:-1

u can see adition jsessionid part,so tell me a way to hide this in test server

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



Re: is ajax validation broken?

2007-05-08 Thread אלחנן מעין
what are the limitations on using option 2? will there be documenation, 
describing how to use 3 and 4?





From: "Musachy Barroso" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: is ajax validation broken?
Date: Tue, 8 May 2007 17:18:44 -0400

There are different ways of performing validation (3 and 4 on 2.1 only):

1. normal: validation occurs on the server and page is returned with errors
(can use OGNL)
2. javascript: validation occurs on the client using javascript (limited)
3. ajax : validation occurs on the server, if there are errors a json 
string

with the errors is returned so they can be shown on the user interface (can
use OGNL) (developer can decide if contol will be transfered to a new page
or not, when validation succeeds)
4. ajax + javascript: same as 3, but javascript validation runs before
making the ajax request (developer can decide if contol will be transfered
to a new page or not, when validation succeeds)

I hope that helps
musachy

On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:


i would seem a lot ajax related fixing stuff are being loaded on 2.1.0
version.. seems nice i can finally find something comparable to
commons-validations. (or asp.net validators).
what's the difference in the show case between "Field Validators with
client-side JavaScript "
it's messages seemd to appear at the same location as samples in
"Validation (client) "

today a developer that ajax is one of biggest mistakes ever made, that
after
the world has spent years of getting off client/server architechture, it
getting back into a client/server like ui.


>From: "Musachy Barroso" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: "Struts Users Mailing List" 
>Subject: Re: is ajax validation broken?
>Date: Tue, 8 May 2007 12:43:09 -0400
>
>on 2.0.6? yes. The ajax validation won't help you much if you are not
using
>complex OGNL expressions for validation (or code).
>
>musachy
>
>On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:
>>
>>so i should just use client side validation then?
>>
>>
>>
>> >From: "Musachy Barroso" <[EMAIL PROTECTED]>
>> >Reply-To: "Struts Users Mailing List" 
>> >To: "Struts Users Mailing List" 
>> >Subject: Re: is ajax validation broken?
>> >Date: Tue, 8 May 2007 08:48:20 -0400
>> >
>> >Ajax validation has been changed/fixed for 2.1, where DWR is not
>>required
>> >any more. In 2.1 you will be able to just add an interceptor to your
>>class
>> >to enable ajax validation for it(and use the dojo plugin). The jira
>>ticket:
>> >
>> >https://issues.apache.org/struts/browse/WW-1897
>> >
>> >musachy
>> >
>> >On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:
>> >>
>> >>i've looked at the struts showcase samples, and where it says
>>validation
>> >>(ajax) it says broken, i running it, and it looks fine i think,
(still
>> >>don't
>> >>know how to make it work on my application though , i clicked submit
>>and
>> >>moved away and it doesn't do anything.
>> >>
>> >>_
>> >>Don't just search. Find. Check out the new MSN Search!
>> >>http://search.msn.com/
>> >>
>> >>
>> 
>>-

>> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> >--
>> >"Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>>_
>>FREE pop-up blocking with the new MSN Toolbar - get it now!
>>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>--
>"Hey you! Would you help me to carry the stone?" Pink Floyd

_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



RE: Struts 1.3.8 and URL Validation

2007-05-08 Thread pushkar . p
> There is no JavaScript implementation of the url validation.
> 
> Niall
> 

Does it mean that the default "url" validator in validation.xml doesn't
work?


-Pushkar.


Re: Struts 1.3.8 and URL Validation

2007-05-08 Thread Niall Pemberton

On 5/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi,

I'm using Struts version 1.3.8 and I intend to use URL validation for a
field using the  validation.xml file. But, when I declare the field in
validation.xml, it does not validate the field to check whether the URL is a
valid one, meaning that it takes any input that I give in that textbox.
Here's the entry from my validation.xml file:





Also, other validations like "required", "email", "maxlength"..etc are
working fine on this form.

Is there anything else that I need to do for having client-side URL
validation besides declaring in validation.xml?


There is no JavaScript implementation of the url validation.

Niall


Thanks.

-Pushkar.



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



Struts 1.3.8 and URL Validation

2007-05-08 Thread pushkar . p
Hi,

I'm using Struts version 1.3.8 and I intend to use URL validation for a
field using the  validation.xml file. But, when I declare the field in
validation.xml, it does not validate the field to check whether the URL is a
valid one, meaning that it takes any input that I give in that textbox.
Here's the entry from my validation.xml file:





Also, other validations like "required", "email", "maxlength"..etc are
working fine on this form.

Is there anything else that I need to do for having client-side URL
validation besides declaring in validation.xml?

Thanks.

-Pushkar.


Re: posting form

2007-05-08 Thread MK Tan

Hi,

Have you try it yourself before posting? ;-)
Let me make a wild guess, it submit back to the same action which forward to
this jsp :D


cheers,
MK Tan

p/s: doing some homework or simple test before asking does not hurt or take
many time :p

On 5/9/07, temp temp <[EMAIL PROTECTED]> wrote:


My struts  action class forwards to  view which has  form tag (html
form tag)



   Here I did  not specify action attribute to the form just
specified  attribute method="POST" when user  submits this form where does
it go ?

  Thanks & Regards
  Miro



-
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.


答复: 答复: ç­”å¤ : getting error when i m tryin g to run webapp

2007-05-08 Thread 王悬
If found not this path,it will errors?Ot this path,"UserName.jsp" file is exist 
Are you have debug tools for Struts ?

-邮件原件-
发件人: Dave Newton [mailto:[EMAIL PROTECTED] 
发送时间: 2007年5月9日 10:40
收件人: Struts Users Mailing List
主题: Re: ç”复: ç”复: getting error when i m trying to run webapp

--- 王悬 <[EMAIL PROTECTED]> wrote:
> 

I don't know if this is the problem or not, but is
there supposed to be a space in: 

path=" UserName.jsp" 

Dave



 

Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

-
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: 答复: 答复: getting error when i m trying to run webapp

2007-05-08 Thread Dave Newton
--- 王悬 <[EMAIL PROTECTED]> wrote:
> 

I don't know if this is the problem or not, but is
there supposed to be a space in: 

path=" UserName.jsp" 

Dave



 

Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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



答复: 答复: g etting error when i m trying to run webapp

2007-05-08 Thread 王悬
my struts configuration file :




I think go to errors in struts configuration file ,because in struts 
configuration file have a lots of "forward name = display"

-邮件原件-
发件人: Dave Newton [mailto:[EMAIL PROTECTED] 
发送时间: 2007年5月9日 9:08
收件人: Struts Users Mailing List
主题: Re: ç”复: getting error when i m trying to run webapp

--- 王悬 <[EMAIL PROTECTED]> wrote:
> Unable to find 'display' forward.

Do you have a forward named "display"?

If you include the relevant portions (贴题 部分?)
of your struts configuration file struts-config.xml
for that Strutsçš„action we may be able to help more
easily.

Dave


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.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: Correct usage of datetimepicker?

2007-05-08 Thread Musachy Barroso

I found several problem with the datetimepicker, first (and the worst) is
that the names of the input fields (visible and hidden) were switched.
Second, the hidden field was storing just the date section of the RFC 3339
format. In short, in the few cases that it worked it was because Xwork tries
as a hard as possible to parse dates, using different formats.

thanks
musachy

On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:


Done! (WW-1917)

Hope this is useful, if I can help out in any other way please let me
know!

BTW there is no such locale en_UK, it should be en_GB, but unfortunately
that wasn't the problem.

Torsten

Musachy Barroso schrieb:
> Can you log a jira ticket with the details on how to reproduce the
problem?
>
> https://issues.apache.org/struts/
>
> thanks
> musachy
>
> On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>>
>> Yes I did, and I also get that far; the datepicker shows up fine, and
it
>> inserts the picked date in the field in the format I specified using
>> displayFormat - but when I submit the form I get that validation error.
>>
>> So I am still using String instead of Date and I'm currently trying to
>> get the entered date validated. When this works I am already quite
happy.
>>
>> The problem that occurs in case the user has JavaScript disabled I am
>> BTW working around by placing an additional textfield with the same
name
>> in a  tag. Like this the user can at least enter a date
>> manually.
>>
>> Torsten
>>
>> Musachy Barroso schrieb:
>> > Did you look at the examples in showcase? I know the timepicker was
>> really
>> > broken on 2.0.6, but the datepicker was working.
>> >
>> > musachy
>> >
>> > On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I didn't have any struts.date.format set in my .properties files,
but
>> >> for testing I set it to -MM-dd in all of them but that doesn't
>> seem
>> >> to have any effect. The date is still shown in dd.MM.yy format, and
I
>> >> get that validation error when request_locale=en_UK.
>> >>
>> >> Then I also set displayFormat to -MM-dd but like this I always
get
>> a
>> >> validation error.
>> >>
>> >> If I try to set saveFormat I get an exception:
>> >> SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
>> >> org.apache.jasper.JasperException: /page/reservation.jsp(15,1)
>> Attribute
>> >> saveFormat invalid for tag datetimepicker according to TLD
>> >>
>> >> The only way how I can get it to work is to use strings and parse
the
>> >> date myself in the action class. But like this, no validation is
done
>> at
>> >> all.
>> >>
>> >> It's a pity because the datetimepicker would be extremely easy to
>> use &
>> >> it looks really nice but it doesn't seem to like me ;-)
>> >>
>> >> Torsten
>> >>
>> >> Martin Gainty schrieb:
>> >> > please display contents of struts.date.format
>> >> > for both *en_UK.properties and
>> >> > *de_DE.properties files
>> >> >
>> >> > Martin--
>> >> > This email message and any files transmitted with it contain
>> >> confidential
>> >> > information intended only for the person(s) to whom this email
>> message
>> >> is
>> >> > addressed.  If you have received this email message in error,
please
>> >> notify
>> >> > the sender immediately by telephone or email and destroy the
>> original
>> >> > message without making a copy.  Thank you.
>> >> >
>> >> > - Original Message - From: "Musachy Barroso"
>> >> <[EMAIL PROTECTED]>
>> >> > To: "Struts Users Mailing List" 
>> >> > Sent: Monday, May 07, 2007 8:05 PM
>> >> > Subject: Re: Correct usage of datetimepicker?
>> >> >
>> >> >
>> >> > Using Date for the action field is the way to go. The selected
value
>> is
>> >> > submited in RFC 3339 format (that can me modified using the
>> saveFormat
>> >> > attribute, which shouldn't have been public on the first place).
I'm
>> >> not
>> >> > really sure how it would work if the client has javascript
disabled.
>> >> >
>> >> > musachy
>> >> >
>> >> > On 5/7/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> I'm a bit unsure about a few things around datetimepicker.
>> >> >>
>> >> >> What type should the fields in my action class be? I am currently
>> >> using
>> >> >> java.util.Date, it works fine for request_locale=de_DE but I get
a
>> >> >> "Invalid field value for field ..." error for
request_locale=en_UK
>> and
>> >> >> the date redisplayed is "NaN.NaN.aN". I don't quite understand
>> this,
>> >> >> because the API doc says: "The value sent to the server is
>> typically
>> a
>> >> >> locale-independent value in a hidden field as defined by the name
>> >> >> attribute" - but it seems the locale matters anyway?
>> >> >>
>> >> >> What also confuses me, is the displayFormat attribute. If I set
it
>> to
>> >> >> e.g. "-MM-dd", I always get the "Invalid field value for
field
>> >> ..."
>> >> >> error, regardless of the request_locale.
>> >> >> I am also a bit unsure about the format and saveFormat
>> attributes. I
>> >> >> played with them, but they did not seem 

RE: [OT] Reading Unicode Files

2007-05-08 Thread Kapil Sharma
This code properly reads the unicode files in jsp and set in session


Properties prop = null;
if (session.getAttribute("Properties") == null) {

URL myURL = null;

myURL = 
application.getResource("/common/language/japanese_lang.properties");


String fnsKey;
String fnsVal;
InputStream is = myURL.openStream();
BufferedReader in = new BufferedReader(new 
InputStreamReader(is, "UTF-8"));
prop = new Properties();
String fnsData;
fnsData = in.readLine();
while (fnsData != null) {
String fnsRetVal = "";
StringTokenizer stParse = new 
StringTokenizer(fnsData, "="); //breaking the string
while (stParse.hasMoreTokens()) {
fnsKey = 
stParse.nextToken().trim();
if (stParse.hasMoreTokens()) {
fnsVal = 
stParse.nextToken().trim();

prop.setProperty(fnsKey, fnsVal);
}
}
fnsData = in.readLine();
}
session.setAttribute("Properties", prop);
} else {
prop = (Properties) 
session.getAttribute("Properties");
}



Thanks and Regards,
Kapil Sharma 
IAP Company Ltd.


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 09, 2007 7:18 AM
To: Struts Users Mailing List
Subject: Re: [OT] Reading Unicode Files


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Scott

Mulligan, Scott H wrote:
> In my Struts application, when I load a Resource Bundle (Property file)
> that has Unicode characters (\u1234) they get interpreted as single
> characters. However, when I read a file using a FileInputStream the
> Unicode characters get interpreted as a String "\u1234".

java.util.Properties.load includes the interpretation of those \uWXYZ
codes, while you are probably not reading them in as such.
(ResourceBundle uses Properties.load or something exactly like it to
load PropertyResourceBundles).

> I know I am missing something basic, but I can not figure it out. Can
> anyone please tell me what the Properties.load() method does that I am
> not doing?

They specifically look for \uWXYZ sequences and do their own conversion.
It's not a character encoding issue or anything like that... it's just
parsing and converting. You'll have to do it yourself.

Don't forget that if you have the JDK installed you can look at the Java
sources for just about any class. Try looking for JAVA_HOME/src.zip or
JAVA_HOME/share/src.zip and looking at the java.util.Properties source
code yourself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQPcZ9CaO5/Lv0PARAsZPAKCGHvlQS0kVFTIJeuEexHQbIZ+iyACeKohv
W0kv/TF72AucxxIwNNQlt4s=
=LCf9
-END PGP SIGNATURE-

-
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: Struts2 character code question

2007-05-08 Thread red phoenix

I have set URIEncoding="UTF-8"
and when I submit as


and I get String name=request.getParameter("Name")
it get name as UTF-8 format,so I can't get right chinese code

I tried set 

This time,I can get right chinese code in test.do by
String name=request.getParameter("Name")

But i only want to set 

Anybody could tell me how to do in test.do file?



On 5/9/07, Martin Gainty <[EMAIL PROTECTED]> wrote:


apparently ISO2022_CN_GB is Mandarin
(http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html)
since this is most decidedly DBCS did you load CJK IME /Keyboard and
Fonts?

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message -
From: "red phoenix" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 8:47 PM
Subject: Re: Struts2 character code question


>I tried follows in test.do:
> String name=request.getParameter("Name");
> System.out.println(new String(name.getBytes("UTF-8"), "gb2312"))
> it still show [EMAIL PROTECTED],Why?
>
>
>
> On 5/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Red,
>>
>> red phoenix wrote:
>> > If I input English name in the field Name in JSP,when I submit,the
>> > test.do will receive right English name,but when I input Chinese name
>> > in the field Name in JSP, test.do will receive not right name,it will
>> > show [EMAIL PROTECTED]
>>
>> This is what you get when you print out a byte array. Try converting
the
>> byte array to a String using "new String(bytes, charset)" and printing
>> that.
>>
>> - -chris
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.7 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFGQJwZ9CaO5/Lv0PARAmyvAJ9aCJZ/MINdBzS18ytQMgzf4M8D3ACffHSG
>> Ldprq3v5ZTLxYF80HoafTOY=
>> =vx7I
>> -END PGP SIGNATURE-
>>
>> -
>> 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: Struts2 character code question

2007-05-08 Thread Martin Gainty
apparently ISO2022_CN_GB is Mandarin 
(http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html)

since this is most decidedly DBCS did you load CJK IME /Keyboard and Fonts?

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "red phoenix" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 8:47 PM
Subject: Re: Struts2 character code question



I tried follows in test.do:
String name=request.getParameter("Name");
System.out.println(new String(name.getBytes("UTF-8"), "gb2312"))
it still show [EMAIL PROTECTED],Why?



On 5/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Red,

red phoenix wrote:
> If I input English name in the field Name in JSP,when I submit,the
> test.do will receive right English name,but when I input Chinese name
> in the field Name in JSP, test.do will receive not right name,it will
> show [EMAIL PROTECTED]

This is what you get when you print out a byte array. Try converting the
byte array to a String using "new String(bytes, charset)" and printing
that.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQJwZ9CaO5/Lv0PARAmyvAJ9aCJZ/MINdBzS18ytQMgzf4M8D3ACffHSG
Ldprq3v5ZTLxYF80HoafTOY=
=vx7I
-END PGP SIGNATURE-

-
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: 答复: getting error when i m trying to run webapp

2007-05-08 Thread Dave Newton
--- 王悬 <[EMAIL PROTECTED]> wrote:
> Unable to find 'display' forward.

Do you have a forward named "display"?

If you include the relevant portions (贴题 部分?)
of your struts configuration file struts-config.xml
for that Struts的action we may be able to help more
easily.

Dave


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Struts2 character code question

2007-05-08 Thread red phoenix

I tried follows in test.do:
String name=request.getParameter("Name");
System.out.println(new String(name.getBytes("UTF-8"), "gb2312"))
it still show [EMAIL PROTECTED],Why?



On 5/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Red,

red phoenix wrote:
> If I input English name in the field Name in JSP,when I submit,the
> test.do will receive right English name,but when I input Chinese name
> in the field Name in JSP, test.do will receive not right name,it will
> show [EMAIL PROTECTED]

This is what you get when you print out a byte array. Try converting the
byte array to a String using "new String(bytes, charset)" and printing
that.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQJwZ9CaO5/Lv0PARAmyvAJ9aCJZ/MINdBzS18ytQMgzf4M8D3ACffHSG
Ldprq3v5ZTLxYF80HoafTOY=
=vx7I
-END PGP SIGNATURE-

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




答复: getting error when i m tryin g to run webapp

2007-05-08 Thread 王悬
Log4j  configure:
log4j.category.org.apache.struts.action.ActionMapping=DEBUG,stdout
log4j.additivity.org.apache.struts.action.ActionMapping=false
log out :
INFO   | jvm 1| 2007/04/20 00:56:18 | 00:56:18 WARN  ActionMapping - Unable 
to find 'display' forward.

-邮件原件-
发件人: Dave Newton [mailto:[EMAIL PROTECTED] 
发送时间: 2007年5月8日 17:04
收件人: Struts Users Mailing List
主题: Re: getting error when i m trying to run webapp

--- ÍõÐü <[EMAIL PROTECTED]> wrote:
> Unable to find 'display' forward.

Unable to fix problem.

(We need more information to be able to help.)

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.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: Correct usage of datetimepicker?

2007-05-08 Thread Torsten Römer
Done! (WW-1917)

Hope this is useful, if I can help out in any other way please let me know!

BTW there is no such locale en_UK, it should be en_GB, but unfortunately
that wasn't the problem.

Torsten

Musachy Barroso schrieb:
> Can you log a jira ticket with the details on how to reproduce the problem?
> 
> https://issues.apache.org/struts/
> 
> thanks
> musachy
> 
> On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>>
>> Yes I did, and I also get that far; the datepicker shows up fine, and it
>> inserts the picked date in the field in the format I specified using
>> displayFormat - but when I submit the form I get that validation error.
>>
>> So I am still using String instead of Date and I'm currently trying to
>> get the entered date validated. When this works I am already quite happy.
>>
>> The problem that occurs in case the user has JavaScript disabled I am
>> BTW working around by placing an additional textfield with the same name
>> in a  tag. Like this the user can at least enter a date
>> manually.
>>
>> Torsten
>>
>> Musachy Barroso schrieb:
>> > Did you look at the examples in showcase? I know the timepicker was
>> really
>> > broken on 2.0.6, but the datepicker was working.
>> >
>> > musachy
>> >
>> > On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I didn't have any struts.date.format set in my .properties files, but
>> >> for testing I set it to -MM-dd in all of them but that doesn't
>> seem
>> >> to have any effect. The date is still shown in dd.MM.yy format, and I
>> >> get that validation error when request_locale=en_UK.
>> >>
>> >> Then I also set displayFormat to -MM-dd but like this I always get
>> a
>> >> validation error.
>> >>
>> >> If I try to set saveFormat I get an exception:
>> >> SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
>> >> org.apache.jasper.JasperException: /page/reservation.jsp(15,1)
>> Attribute
>> >> saveFormat invalid for tag datetimepicker according to TLD
>> >>
>> >> The only way how I can get it to work is to use strings and parse the
>> >> date myself in the action class. But like this, no validation is done
>> at
>> >> all.
>> >>
>> >> It's a pity because the datetimepicker would be extremely easy to
>> use &
>> >> it looks really nice but it doesn't seem to like me ;-)
>> >>
>> >> Torsten
>> >>
>> >> Martin Gainty schrieb:
>> >> > please display contents of struts.date.format
>> >> > for both *en_UK.properties and
>> >> > *de_DE.properties files
>> >> >
>> >> > Martin--
>> >> > This email message and any files transmitted with it contain
>> >> confidential
>> >> > information intended only for the person(s) to whom this email
>> message
>> >> is
>> >> > addressed.  If you have received this email message in error, please
>> >> notify
>> >> > the sender immediately by telephone or email and destroy the
>> original
>> >> > message without making a copy.  Thank you.
>> >> >
>> >> > - Original Message - From: "Musachy Barroso"
>> >> <[EMAIL PROTECTED]>
>> >> > To: "Struts Users Mailing List" 
>> >> > Sent: Monday, May 07, 2007 8:05 PM
>> >> > Subject: Re: Correct usage of datetimepicker?
>> >> >
>> >> >
>> >> > Using Date for the action field is the way to go. The selected value
>> is
>> >> > submited in RFC 3339 format (that can me modified using the
>> saveFormat
>> >> > attribute, which shouldn't have been public on the first place). I'm
>> >> not
>> >> > really sure how it would work if the client has javascript disabled.
>> >> >
>> >> > musachy
>> >> >
>> >> > On 5/7/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> I'm a bit unsure about a few things around datetimepicker.
>> >> >>
>> >> >> What type should the fields in my action class be? I am currently
>> >> using
>> >> >> java.util.Date, it works fine for request_locale=de_DE but I get a
>> >> >> "Invalid field value for field ..." error for request_locale=en_UK
>> and
>> >> >> the date redisplayed is "NaN.NaN.aN". I don't quite understand
>> this,
>> >> >> because the API doc says: "The value sent to the server is
>> typically
>> a
>> >> >> locale-independent value in a hidden field as defined by the name
>> >> >> attribute" - but it seems the locale matters anyway?
>> >> >>
>> >> >> What also confuses me, is the displayFormat attribute. If I set it
>> to
>> >> >> e.g. "-MM-dd", I always get the "Invalid field value for field
>> >> ..."
>> >> >> error, regardless of the request_locale.
>> >> >> I am also a bit unsure about the format and saveFormat
>> attributes. I
>> >> >> played with them, but they did not seem to make any difference.
>> >> >>
>> >> >> I also wonder how to handle the situation where a user has
>> Javascript
>> >> >> disabled, in which case the date field + icon are not shown at all.
>> >> >>
>> >> >> I am using Struts2 2.0.6.
>> >> >>
>> >> >> Torsten
>> >> >>
>> >> >>
>> -
>> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> For additional c

Re: [OT] Reading Unicode Files

2007-05-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Scott

Mulligan, Scott H wrote:
> In my Struts application, when I load a Resource Bundle (Property file)
> that has Unicode characters (\u1234) they get interpreted as single
> characters. However, when I read a file using a FileInputStream the
> Unicode characters get interpreted as a String "\u1234".

java.util.Properties.load includes the interpretation of those \uWXYZ
codes, while you are probably not reading them in as such.
(ResourceBundle uses Properties.load or something exactly like it to
load PropertyResourceBundles).

> I know I am missing something basic, but I can not figure it out. Can
> anyone please tell me what the Properties.load() method does that I am
> not doing?

They specifically look for \uWXYZ sequences and do their own conversion.
It's not a character encoding issue or anything like that... it's just
parsing and converting. You'll have to do it yourself.

Don't forget that if you have the JDK installed you can look at the Java
sources for just about any class. Try looking for JAVA_HOME/src.zip or
JAVA_HOME/share/src.zip and looking at the java.util.Properties source
code yourself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQPcZ9CaO5/Lv0PARAsZPAKCGHvlQS0kVFTIJeuEexHQbIZ+iyACeKohv
W0kv/TF72AucxxIwNNQlt4s=
=LCf9
-END PGP SIGNATURE-

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



Select Tag - Odd Behavior

2007-05-08 Thread Brian Trzupek
I am using Struts 2 (tried 2.0.1-2.0.6) and am having bizarre  
behavior with the select tag in a jsp page.


My code looks like this:

 

emptyOption="true" listKey="name" listValue="name"/>


id="hider"/>



When I do this the list gets displayed with the fully qualified class  
name of the bean with the ID, instead of the name and description  
fields. (almost as if it can't find them)


My current work around is to create the select by hand with:




for="step4_credential_generator" class="label">name="credwizard.step3.generator"/>



value="credential.credentialGenerators">
>">





id="hider"/>





So my question is, why does the struts iterator tag perform the  
traversal of the list correctly and the struts select tag does not?  
Any advise on how to 'make it work' would be appreciated.


Oh and BTW I have several other selects in my app, and they all work  
fine.


Thanks,
Brian-

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



Re: OGNL question

2007-05-08 Thread Felipe Rodrigues

I'm sorry, but I didn't got it.
When I pass in a parameter, I'll send it to the destiny. That is not what I
want. I only want to identify the url according to the id. This code is
inside a foreach, that renders lots of urls.

How would be that in this case?

Thanks,

Felipe


Martin Gainty wrote:
> 
> You'll need to pass in a parameter for id such as this
> 
> 
> 
> 
> M--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> - Original Message - 
> From: "Felipe Rodrigues" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, May 08, 2007 3:31 PM
> Subject: OGNL question
> 
> 
>>
>> Hi,
>>
>> How could i do that
>>
>> 
>>  
>>  >name="any"
>>href="%{setUsina${id}}"  theme="ajax">Link
>>
>> changing EL by OGNL?
>> The especific part  href="%{setUsina${id}}" . I tried
>> href="%{setUsina(#id)}" but didn't work.
>>
>> Thanks,
>>
>>
>> Felipe
>>
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/OGNL-question-tf3711762.html#a10382481
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/OGNL-question-tf3711762.html#a10384600
Sent from the Struts - User mailing list archive at Nabble.com.


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



[OT] Reading Unicode Files

2007-05-08 Thread Mulligan, Scott H
In my Struts application, when I load a Resource Bundle (Property file)
that has Unicode characters (\u1234) they get interpreted as single
characters. However, when I read a file using a FileInputStream the
Unicode characters get interpreted as a String "\u1234".

I know I am missing something basic, but I can not figure it out. Can
anyone please tell me what the Properties.load() method does that I am
not doing?

Thanks for any help you can provide.


Scott M.

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



Re: is ajax validation broken?

2007-05-08 Thread Musachy Barroso

There are different ways of performing validation (3 and 4 on 2.1 only):

1. normal: validation occurs on the server and page is returned with errors
(can use OGNL)
2. javascript: validation occurs on the client using javascript (limited)
3. ajax : validation occurs on the server, if there are errors a json string
with the errors is returned so they can be shown on the user interface (can
use OGNL) (developer can decide if contol will be transfered to a new page
or not, when validation succeeds)
4. ajax + javascript: same as 3, but javascript validation runs before
making the ajax request (developer can decide if contol will be transfered
to a new page or not, when validation succeeds)

I hope that helps
musachy

On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:


i would seem a lot ajax related fixing stuff are being loaded on 2.1.0
version.. seems nice i can finally find something comparable to
commons-validations. (or asp.net validators).
what's the difference in the show case between "Field Validators with
client-side JavaScript "
it's messages seemd to appear at the same location as samples in
"Validation (client) "

today a developer that ajax is one of biggest mistakes ever made, that
after
the world has spent years of getting off client/server architechture, it
getting back into a client/server like ui.


>From: "Musachy Barroso" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: "Struts Users Mailing List" 
>Subject: Re: is ajax validation broken?
>Date: Tue, 8 May 2007 12:43:09 -0400
>
>on 2.0.6? yes. The ajax validation won't help you much if you are not
using
>complex OGNL expressions for validation (or code).
>
>musachy
>
>On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:
>>
>>so i should just use client side validation then?
>>
>>
>>
>> >From: "Musachy Barroso" <[EMAIL PROTECTED]>
>> >Reply-To: "Struts Users Mailing List" 
>> >To: "Struts Users Mailing List" 
>> >Subject: Re: is ajax validation broken?
>> >Date: Tue, 8 May 2007 08:48:20 -0400
>> >
>> >Ajax validation has been changed/fixed for 2.1, where DWR is not
>>required
>> >any more. In 2.1 you will be able to just add an interceptor to your
>>class
>> >to enable ajax validation for it(and use the dojo plugin). The jira
>>ticket:
>> >
>> >https://issues.apache.org/struts/browse/WW-1897
>> >
>> >musachy
>> >
>> >On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:
>> >>
>> >>i've looked at the struts showcase samples, and where it says
>>validation
>> >>(ajax) it says broken, i running it, and it looks fine i think,
(still
>> >>don't
>> >>know how to make it work on my application though , i clicked submit
>>and
>> >>moved away and it doesn't do anything.
>> >>
>> >>_
>> >>Don't just search. Find. Check out the new MSN Search!
>> >>http://search.msn.com/
>> >>
>> >>
>> >>-
>> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> >--
>> >"Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>>_
>>FREE pop-up blocking with the new MSN Toolbar - get it now!
>>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>--
>"Hey you! Would you help me to carry the stone?" Pink Floyd

_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Why does behave differently from the rest?

2007-05-08 Thread Musachy Barroso

I guess it is because submit can be either a button, a submit or an image.

musachy

On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


I am trying to assign a caption to a button using the internationalized
property file and the key attribute.   Why does this tag not work like the
others?



--
Scott
[EMAIL PROTECTED]





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: is ajax validation broken?

2007-05-08 Thread אלחנן מעין
i would seem a lot ajax related fixing stuff are being loaded on 2.1.0 
version.. seems nice i can finally find something comparable to 
commons-validations. (or asp.net validators).
what's the difference in the show case between "Field Validators with 
client-side JavaScript "
it's messages seemd to appear at the same location as samples in  
"Validation (client) "


today a developer that ajax is one of biggest mistakes ever made, that after 
the world has spent years of getting off client/server architechture, it 
getting back into a client/server like ui.




From: "Musachy Barroso" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: is ajax validation broken?
Date: Tue, 8 May 2007 12:43:09 -0400

on 2.0.6? yes. The ajax validation won't help you much if you are not using
complex OGNL expressions for validation (or code).

musachy

On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:


so i should just use client side validation then?



>From: "Musachy Barroso" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: "Struts Users Mailing List" 
>Subject: Re: is ajax validation broken?
>Date: Tue, 8 May 2007 08:48:20 -0400
>
>Ajax validation has been changed/fixed for 2.1, where DWR is not 
required

>any more. In 2.1 you will be able to just add an interceptor to your
class
>to enable ajax validation for it(and use the dojo plugin). The jira
ticket:
>
>https://issues.apache.org/struts/browse/WW-1897
>
>musachy
>
>On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:
>>
>>i've looked at the struts showcase samples, and where it says 
validation

>>(ajax) it says broken, i running it, and it looks fine i think, (still
>>don't
>>know how to make it work on my application though , i clicked submit 
and

>>moved away and it doesn't do anything.
>>
>>_
>>Don't just search. Find. Check out the new MSN Search!
>>http://search.msn.com/
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>--
>"Hey you! Would you help me to carry the stone?" Pink Floyd

_
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Re: OGNL question

2007-05-08 Thread Martin Gainty

You'll need to pass in a parameter for id such as this

   


M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Felipe Rodrigues" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, May 08, 2007 3:31 PM
Subject: OGNL question




Hi,

How could i do that


 
 Link

changing EL by OGNL?
The especific part  href="%{setUsina${id}}" . I tried
href="%{setUsina(#id)}" but didn't work.

Thanks,


Felipe


--
View this message in context: 
http://www.nabble.com/OGNL-question-tf3711762.html#a10382481

Sent from the Struts - User mailing list archive at Nabble.com.


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





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



Re: Correct usage of datetimepicker?

2007-05-08 Thread Musachy Barroso

Can you log a jira ticket with the details on how to reproduce the problem?

https://issues.apache.org/struts/

thanks
musachy

On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:


Yes I did, and I also get that far; the datepicker shows up fine, and it
inserts the picked date in the field in the format I specified using
displayFormat - but when I submit the form I get that validation error.

So I am still using String instead of Date and I'm currently trying to
get the entered date validated. When this works I am already quite happy.

The problem that occurs in case the user has JavaScript disabled I am
BTW working around by placing an additional textfield with the same name
in a  tag. Like this the user can at least enter a date
manually.

Torsten

Musachy Barroso schrieb:
> Did you look at the examples in showcase? I know the timepicker was
really
> broken on 2.0.6, but the datepicker was working.
>
> musachy
>
> On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>>
>> I didn't have any struts.date.format set in my .properties files, but
>> for testing I set it to -MM-dd in all of them but that doesn't seem
>> to have any effect. The date is still shown in dd.MM.yy format, and I
>> get that validation error when request_locale=en_UK.
>>
>> Then I also set displayFormat to -MM-dd but like this I always get
a
>> validation error.
>>
>> If I try to set saveFormat I get an exception:
>> SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
>> org.apache.jasper.JasperException: /page/reservation.jsp(15,1)
Attribute
>> saveFormat invalid for tag datetimepicker according to TLD
>>
>> The only way how I can get it to work is to use strings and parse the
>> date myself in the action class. But like this, no validation is done
at
>> all.
>>
>> It's a pity because the datetimepicker would be extremely easy to use &
>> it looks really nice but it doesn't seem to like me ;-)
>>
>> Torsten
>>
>> Martin Gainty schrieb:
>> > please display contents of struts.date.format
>> > for both *en_UK.properties and
>> > *de_DE.properties files
>> >
>> > Martin--
>> > This email message and any files transmitted with it contain
>> confidential
>> > information intended only for the person(s) to whom this email
message
>> is
>> > addressed.  If you have received this email message in error, please
>> notify
>> > the sender immediately by telephone or email and destroy the original
>> > message without making a copy.  Thank you.
>> >
>> > - Original Message - From: "Musachy Barroso"
>> <[EMAIL PROTECTED]>
>> > To: "Struts Users Mailing List" 
>> > Sent: Monday, May 07, 2007 8:05 PM
>> > Subject: Re: Correct usage of datetimepicker?
>> >
>> >
>> > Using Date for the action field is the way to go. The selected value
is
>> > submited in RFC 3339 format (that can me modified using the
saveFormat
>> > attribute, which shouldn't have been public on the first place). I'm
>> not
>> > really sure how it would work if the client has javascript disabled.
>> >
>> > musachy
>> >
>> > On 5/7/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I'm a bit unsure about a few things around datetimepicker.
>> >>
>> >> What type should the fields in my action class be? I am currently
>> using
>> >> java.util.Date, it works fine for request_locale=de_DE but I get a
>> >> "Invalid field value for field ..." error for request_locale=en_UK
and
>> >> the date redisplayed is "NaN.NaN.aN". I don't quite understand this,
>> >> because the API doc says: "The value sent to the server is typically
a
>> >> locale-independent value in a hidden field as defined by the name
>> >> attribute" - but it seems the locale matters anyway?
>> >>
>> >> What also confuses me, is the displayFormat attribute. If I set it
to
>> >> e.g. "-MM-dd", I always get the "Invalid field value for field
>> ..."
>> >> error, regardless of the request_locale.
>> >> I am also a bit unsure about the format and saveFormat attributes. I
>> >> played with them, but they did not seem to make any difference.
>> >>
>> >> I also wonder how to handle the situation where a user has
Javascript
>> >> disabled, in which case the date field + icon are not shown at all.
>> >>
>> >> I am using Struts2 2.0.6.
>> >>
>> >> Torsten
>> >>
>> >>
-
>> >> 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]





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


posting form

2007-05-08 Thread temp temp
My struts  action class forwards to  view which has  form tag (html form 
tag)  
   
  

   Here I did  not specify action attribute to the form just specified  
attribute method=”POST” when user  submits this form where does it go ?
  
  Thanks & Regards
  Miro
  

 
-
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

OGNL question

2007-05-08 Thread Felipe Rodrigues

Hi,

How could i do that 


  
  Link

changing EL by OGNL?
The especific part  href="%{setUsina${id}}" . I tried 
href="%{setUsina(#id)}" but didn't work.

Thanks,


Felipe


-- 
View this message in context: 
http://www.nabble.com/OGNL-question-tf3711762.html#a10382481
Sent from the Struts - User mailing list archive at Nabble.com.


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



Why does behave differently from the rest?

2007-05-08 Thread stanlick

I am trying to assign a caption to a button using the internationalized
property file and the key attribute.   Why does this tag not work like the
others?



--
Scott
[EMAIL PROTECTED]


RE: Dynamically set Autocompleter Search Limit

2007-05-08 Thread King, Leon C
This argument must be ignored, using 2.0.6 ..I've added, and the
list is now limited to 30...  Below is my code.   Correct me if I'm
wrong...?

 
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.ComboBox");   



function init()
  {

dojo.widget.byId("trunkName").dataProvider.ignoreLimit  = true;

dojo.widget.byId("switchName").dataProvider.ignoreLimit  = true;


dojo.widget.byId("trafficType").dataProvider.ignoreLimit  = true;



dojo.event.connect(dojo.widget.byId("switchName"), 
"onValueChanged"
, 

"fireevent"); 



  }

  dojo.addOnLoad(init);

   

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 2:47 PM
To: Struts Users Mailing List
Subject: Re: Dynamically set Autocompleter Search Limit

change limit:

dojo.widget.byId("id").dataProvider.searchLimit = 10;

no limit:

dojo.widget.byId("id").dataProvider.ignoreLimit = true;

musachy


On 5/8/07, King, Leon C <[EMAIL PROTECTED]> wrote:
>
> All,
>
> Is there currently a way to dynamically set the
> autocompleter tag's search limit or to specify 'Infinity' like the
Dojo
> docs suggest?
>
>
>
> Thanks.
>
>
>
> Leon
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



Re: Dynamically set Autocompleter Search Limit

2007-05-08 Thread Musachy Barroso

change limit:

dojo.widget.byId("id").dataProvider.searchLimit = 10;

no limit:

dojo.widget.byId("id").dataProvider.ignoreLimit = true;

musachy


On 5/8/07, King, Leon C <[EMAIL PROTECTED]> wrote:


All,

Is there currently a way to dynamically set the
autocompleter tag's search limit or to specify 'Infinity' like the Dojo
docs suggest?



Thanks.



Leon





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Correct usage of datetimepicker?

2007-05-08 Thread Torsten Römer
Yes I did, and I also get that far; the datepicker shows up fine, and it
inserts the picked date in the field in the format I specified using
displayFormat - but when I submit the form I get that validation error.

So I am still using String instead of Date and I'm currently trying to
get the entered date validated. When this works I am already quite happy.

The problem that occurs in case the user has JavaScript disabled I am
BTW working around by placing an additional textfield with the same name
in a  tag. Like this the user can at least enter a date manually.

Torsten

Musachy Barroso schrieb:
> Did you look at the examples in showcase? I know the timepicker was really
> broken on 2.0.6, but the datepicker was working.
> 
> musachy
> 
> On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>>
>> I didn't have any struts.date.format set in my .properties files, but
>> for testing I set it to -MM-dd in all of them but that doesn't seem
>> to have any effect. The date is still shown in dd.MM.yy format, and I
>> get that validation error when request_locale=en_UK.
>>
>> Then I also set displayFormat to -MM-dd but like this I always get a
>> validation error.
>>
>> If I try to set saveFormat I get an exception:
>> SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
>> org.apache.jasper.JasperException: /page/reservation.jsp(15,1) Attribute
>> saveFormat invalid for tag datetimepicker according to TLD
>>
>> The only way how I can get it to work is to use strings and parse the
>> date myself in the action class. But like this, no validation is done at
>> all.
>>
>> It's a pity because the datetimepicker would be extremely easy to use &
>> it looks really nice but it doesn't seem to like me ;-)
>>
>> Torsten
>>
>> Martin Gainty schrieb:
>> > please display contents of struts.date.format
>> > for both *en_UK.properties and
>> > *de_DE.properties files
>> >
>> > Martin--
>> > This email message and any files transmitted with it contain
>> confidential
>> > information intended only for the person(s) to whom this email message
>> is
>> > addressed.  If you have received this email message in error, please
>> notify
>> > the sender immediately by telephone or email and destroy the original
>> > message without making a copy.  Thank you.
>> >
>> > - Original Message - From: "Musachy Barroso"
>> <[EMAIL PROTECTED]>
>> > To: "Struts Users Mailing List" 
>> > Sent: Monday, May 07, 2007 8:05 PM
>> > Subject: Re: Correct usage of datetimepicker?
>> >
>> >
>> > Using Date for the action field is the way to go. The selected value is
>> > submited in RFC 3339 format (that can me modified using the saveFormat
>> > attribute, which shouldn't have been public on the first place). I'm
>> not
>> > really sure how it would work if the client has javascript disabled.
>> >
>> > musachy
>> >
>> > On 5/7/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I'm a bit unsure about a few things around datetimepicker.
>> >>
>> >> What type should the fields in my action class be? I am currently
>> using
>> >> java.util.Date, it works fine for request_locale=de_DE but I get a
>> >> "Invalid field value for field ..." error for request_locale=en_UK and
>> >> the date redisplayed is "NaN.NaN.aN". I don't quite understand this,
>> >> because the API doc says: "The value sent to the server is typically a
>> >> locale-independent value in a hidden field as defined by the name
>> >> attribute" - but it seems the locale matters anyway?
>> >>
>> >> What also confuses me, is the displayFormat attribute. If I set it to
>> >> e.g. "-MM-dd", I always get the "Invalid field value for field
>> ..."
>> >> error, regardless of the request_locale.
>> >> I am also a bit unsure about the format and saveFormat attributes. I
>> >> played with them, but they did not seem to make any difference.
>> >>
>> >> I also wonder how to handle the situation where a user has Javascript
>> >> disabled, in which case the date field + icon are not shown at all.
>> >>
>> >> I am using Struts2 2.0.6.
>> >>
>> >> Torsten
>> >>
>> >> -
>> >> 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]



Dynamically set Autocompleter Search Limit

2007-05-08 Thread King, Leon C
All,

Is there currently a way to dynamically set the
autocompleter tag's search limit or to specify 'Infinity' like the Dojo
docs suggest?

 

Thanks.

 

Leon



Re: HTTPHeader result

2007-05-08 Thread Laurie Harper

Veronica Iturrioz wrote:

 Hi,
Had anyone work with ?
How 
does the params "headers" work?
I try different options but it seems to not 
produce any change


xxx


What did you try, and what were the results? Note the documentation for 
the 'parse' parameter [1], which says "parse - true by default. If set 
to false, the headers param will not be parsed for Ognl expressions." In 
 your example above, you don't set the 'parse' parameter to false, so 
Struts is going to try and evaluate 'xxx' as an OGNL expression.


One of these ought to work (untested):

false
xxx

or

'xxx'

The example in the documentation could probably be improved to make this 
a little more clear up front...


L.


[1] http://struts.apache.org/2.x/docs/httpheader-result.html


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



Re: Security and information passing

2007-05-08 Thread Laurie Harper

Thom Burnett wrote:
What are the options within Struts (version 1)  for passing information 
from

one request to the next on a multi-page struts application?

I can pass some information as request parameters and hidden inputs on 
forms

but that's not acceptable for credit card numbers, passwords, etc.
What are the other options and how do they work?


The options are about the same as in any web application; there's 
nothing Struts-specific here.


1) put sensitive data into the session; make sure you force a secure 
transport (HTTPS) to prevent session spoofing


2) store sensitive data into your database or other persistent store, 
passing a row key or other identifying information so you can retrieve 
it on the next request; of course, you then need to treat that row key 
or whatever as sensitive data, and apply one of the other options for that


2) include sensitive data as (one or more) hidden inputs on each form, 
but encrypt the data; include a hash/checksum of the encrypted data to 
help detect tampering


There may be other approaches I'm not thinking of right now as well :-)

How, if at all, do people manage a single sign on to pages when a user 
needs

to sign in.


That's a bit vague... There are countless ways to handle authentication 
in a Java web application; it all depends on your requirements. Single 
Sign On for a single web app is obviously trivial ;-) so it depends on 
what your authentication scheme need to interoperate with, to start with.


L.


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



Re: [OT] (Solution) RE: problem with Struts 2 setup -class file has wrong version 49.0, should be 48.0

2007-05-08 Thread Laurie Harper
At this point, this is a Tomcat configuration issue rather than a Struts 
issue, but for the sake of completeness:


>   3) Make sure javac and java are both 1.6 from the command line, and 
in the

> tomcat configuration, the jvm path is:
>  C:\Program Files\Java\jdk1.6.0_01\jre\bin\server\jvm.dll

You're pointing to the JRE, which doesn't include the Java compiler. 
Tomcat needs the compiler to compile the servlets it generates from your 
JSPs, which is why you end up with an error (all be it, not a very clear 
error :-( ).


The correct solution would be to point Tomcat to the full SDK instead of 
just the JRE. If you'd like further clarification of advice regarding 
this, please follow up on the Tomcat Users list.


L.

Jack Yu wrote:
Hi All, 


Thanks for all the help, but the true solution I found was to replace the
tools.jar in tomcat5 with the tools.jar file from jdk1.6. Now I'm able to 
get Struts2 up and running. 

And they have a thread in sun's website related to this: 
http://forum.java.sun.com/thread.jspa?threadID=5121172


thanks, 

Jack 



-Original Message-
From: Jack Yu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:46 AM

To: 'Struts Users Mailing List'
Cc: 'Jae Lim'
Subject: RE: problem with Struts 2 setup -class file has wrong version 49.0,
should be 48.0

Ok, I have did all the steps below, and still can't fix this version problem
with Java. 


  1) Delete the "Catalina" folder under tomcat5/work/
  2) Restart tomcat
  3) Make sure javac and java are both 1.6 from the command line, and in the
tomcat configuration, the jvm path is: 
 C:\Program Files\Java\jdk1.6.0_01\jre\bin\server\jvm.dll

  4) Go to http://localhost:8080/struts2-blank-2.0.6/
 And get this error: 



javax.servlet.ServletException: Unable to compile class for JSP

Generated servlet error:
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
e\HelloWorld_jsp.java:7: cannot access java.lang.Object


Generated servlet error:
bad class file: C:\Program
Files\Java\jdk1.6.0_01\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0


Version 48.0 is Java 1.4,  version 49.0 is Java 1.5, but I only have version
Java 1.6(Version 50.0) on my computer right now. 


Another question I have raised is that I downloaded and installed Java SDK,
do I need to download Java EE separately? 

Thanks. 








-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 07, 2007 5:50 PM

To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: problem with Struts 2 setup -The requested resource
(/struts2-blank-2.0.6/) is not available

what happens when you clean the work dir (as earlier suggested) and 
recompile the webapp under 6???

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Monday, May 07, 2007 5:31 PM
Subject: RE: problem with Struts 2 setup -The requested resource 
(/struts2-blank-2.0.6/) is not available




--- Jack Yu <[EMAIL PROTECTED]> wrote:

Yeah, I have tried this, but it still give me the
same problem. Thanks.

?! I hate to ask, but are you sure? If the compilation
is happening with one version and the execution with
another something seems horribly wrong.

You say you're using 1.6, but the trace below is using
1.5.

d.


Clean out your work directory so the JSPs are
re-compiled.

--- Jack Yu <[EMAIL PROTECTED]> wrote:


Ok, I can start my webapps now, by using JVM 1.6.
(The mistakes was that I
configured tomcat to point to the jre1.4

directory.

)

However, I encounter a new problem, when I go to
http://localhost:8080/struts2-blank-2.0.6/, I get
the following error.

I read compile each java src files and restart
tomcat again, still give me
the same problem.


==

javax.servlet.ServletException: Unable to compile
class for JSP

Generated servlet error:


C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl

e\HelloWorld_jsp.java:7: cannot access
java.lang.Object


Generated servlet error:
bad class file:


C:\jdk1.5.0_11\jre\lib\rt.jar(java/lang/Object.class)

class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the

correct

subdirectory of the
classpath.
public final class HelloWorld_jsp extends
org.apache.jasper.runtime.HttpJspBase
 ^
1 error


===

Security and information passing

2007-05-08 Thread Thom Burnett

What are the options within Struts (version 1)  for passing information from
one request to the next on a multi-page struts application?

I can pass some information as request parameters and hidden inputs on forms
but that's not acceptable for credit card numbers, passwords, etc.
What are the other options and how do they work?

How, if at all, do people manage a single sign on to pages when a user needs
to sign in.
If there are some URLs with discussion on the topics, let me know.


RE: [S2] Spring Bean + ?

2007-05-08 Thread Paul
Nevermind all!

Answered my own question finally,





 did the trick! :)

Regards,
P

-Original Message-
From: Paul Saumets | Merge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 9:15 AM
To: Struts Users Mailing List
Subject: RE: [S2] Spring Bean +  ?

Dave,

Took your advice and continued to build out my RoleAction, RoleDao, RoleService 
(all of which I'll need anyway later.)

I have my RoleAction setup with RoleService being passed as a constructor 
(Spring.)

In my JSP now I am just doing,



RoleAction class has the private member roles which is the list of all the 
roles I wish to iterate over.

Question now is, does RoleAction not get thrown onto the stack after the 
 call? It seems I can only access the 'roles.name' and 
'roles.description' properties from dispatched result page?

hm


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, May 07, 2007 9:32 AM
To: Struts Users Mailing List;Paul
Subject: Re: [S2] Spring Bean +  ?

Why not just supply a list getter in your action and
set its value to the roleDao's findAll result?

In general I don't think using DAO functionality on
the view side is a particularly good idea anyway, but
that's just me :)

d.

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

> Hi,
>
> Having some issues getting this the above working. I
> have a defined spring bean as follows:
>
> 
class="com.paul.project.system.dao.impl.RoleDaoImpl">
>  ref="entityManagerFactory"/>
> 
>
>
> Now the RoleDaoImpl contains a method 'findAll()'
> which I would like to iterate over the results and
> display them.
>
> In my jsp I have tried:
>
> 
> 
> 
> 
>
> But I don't think that would work since roleDao
> isn't on the stack?
>
> I've tried declaring:
>  name="com.paul.project.system.dao.impl.RoleDaoImpl"
> id="roleBean"/>
>
> 
> etc.etc.
>
> Basically I have a userform for an admin, that has a
> UserModel on the stack. Part of the userform though
> is selecting which user roles (RoleModel) to add the
> user to and I need to render all available roles. I
> think my issue is strictly syntax? I hope someone
> could point me in the right direction?
>
> Regards,
> Paul


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.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: Correct usage of datetimepicker?

2007-05-08 Thread Musachy Barroso

Did you look at the examples in showcase? I know the timepicker was really
broken on 2.0.6, but the datepicker was working.

musachy

On 5/8/07, Torsten Römer <[EMAIL PROTECTED]> wrote:


I didn't have any struts.date.format set in my .properties files, but
for testing I set it to -MM-dd in all of them but that doesn't seem
to have any effect. The date is still shown in dd.MM.yy format, and I
get that validation error when request_locale=en_UK.

Then I also set displayFormat to -MM-dd but like this I always get a
validation error.

If I try to set saveFormat I get an exception:
SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /page/reservation.jsp(15,1) Attribute
saveFormat invalid for tag datetimepicker according to TLD

The only way how I can get it to work is to use strings and parse the
date myself in the action class. But like this, no validation is done at
all.

It's a pity because the datetimepicker would be extremely easy to use &
it looks really nice but it doesn't seem to like me ;-)

Torsten

Martin Gainty schrieb:
> please display contents of struts.date.format
> for both *en_UK.properties and
> *de_DE.properties files
>
> Martin--
> This email message and any files transmitted with it contain
confidential
> information intended only for the person(s) to whom this email message
is
> addressed.  If you have received this email message in error, please
notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> - Original Message - From: "Musachy Barroso" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Monday, May 07, 2007 8:05 PM
> Subject: Re: Correct usage of datetimepicker?
>
>
> Using Date for the action field is the way to go. The selected value is
> submited in RFC 3339 format (that can me modified using the saveFormat
> attribute, which shouldn't have been public on the first place). I'm not
> really sure how it would work if the client has javascript disabled.
>
> musachy
>
> On 5/7/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>>
>> I'm a bit unsure about a few things around datetimepicker.
>>
>> What type should the fields in my action class be? I am currently using
>> java.util.Date, it works fine for request_locale=de_DE but I get a
>> "Invalid field value for field ..." error for request_locale=en_UK and
>> the date redisplayed is "NaN.NaN.aN". I don't quite understand this,
>> because the API doc says: "The value sent to the server is typically a
>> locale-independent value in a hidden field as defined by the name
>> attribute" - but it seems the locale matters anyway?
>>
>> What also confuses me, is the displayFormat attribute. If I set it to
>> e.g. "-MM-dd", I always get the "Invalid field value for field ..."
>> error, regardless of the request_locale.
>> I am also a bit unsure about the format and saveFormat attributes. I
>> played with them, but they did not seem to make any difference.
>>
>> I also wonder how to handle the situation where a user has Javascript
>> disabled, in which case the date field + icon are not shown at all.
>>
>> I am using Struts2 2.0.6.
>>
>> Torsten
>>
>> -
>> 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]





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: is ajax validation broken?

2007-05-08 Thread Musachy Barroso

on 2.0.6? yes. The ajax validation won't help you much if you are not using
complex OGNL expressions for validation (or code).

musachy

On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:


so i should just use client side validation then?



>From: "Musachy Barroso" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: "Struts Users Mailing List" 
>Subject: Re: is ajax validation broken?
>Date: Tue, 8 May 2007 08:48:20 -0400
>
>Ajax validation has been changed/fixed for 2.1, where DWR is not required
>any more. In 2.1 you will be able to just add an interceptor to your
class
>to enable ajax validation for it(and use the dojo plugin). The jira
ticket:
>
>https://issues.apache.org/struts/browse/WW-1897
>
>musachy
>
>On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:
>>
>>i've looked at the struts showcase samples, and where it says validation
>>(ajax) it says broken, i running it, and it looks fine i think, (still
>>don't
>>know how to make it work on my application though , i clicked submit and
>>moved away and it doesn't do anything.
>>
>>_
>>Don't just search. Find. Check out the new MSN Search!
>>http://search.msn.com/
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>--
>"Hey you! Would you help me to carry the stone?" Pink Floyd

_
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Correct usage of datetimepicker?

2007-05-08 Thread Torsten Römer
I didn't have any struts.date.format set in my .properties files, but
for testing I set it to -MM-dd in all of them but that doesn't seem
to have any effect. The date is still shown in dd.MM.yy format, and I
get that validation error when request_locale=en_UK.

Then I also set displayFormat to -MM-dd but like this I always get a
validation error.

If I try to set saveFormat I get an exception:
SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /page/reservation.jsp(15,1) Attribute
saveFormat invalid for tag datetimepicker according to TLD

The only way how I can get it to work is to use strings and parse the
date myself in the action class. But like this, no validation is done at
all.

It's a pity because the datetimepicker would be extremely easy to use &
it looks really nice but it doesn't seem to like me ;-)

Torsten

Martin Gainty schrieb:
> please display contents of struts.date.format
> for both *en_UK.properties and
> *de_DE.properties files
> 
> Martin--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> - Original Message - From: "Musachy Barroso" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Monday, May 07, 2007 8:05 PM
> Subject: Re: Correct usage of datetimepicker?
> 
> 
> Using Date for the action field is the way to go. The selected value is
> submited in RFC 3339 format (that can me modified using the saveFormat
> attribute, which shouldn't have been public on the first place). I'm not
> really sure how it would work if the client has javascript disabled.
> 
> musachy
> 
> On 5/7/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
>>
>> I'm a bit unsure about a few things around datetimepicker.
>>
>> What type should the fields in my action class be? I am currently using
>> java.util.Date, it works fine for request_locale=de_DE but I get a
>> "Invalid field value for field ..." error for request_locale=en_UK and
>> the date redisplayed is "NaN.NaN.aN". I don't quite understand this,
>> because the API doc says: "The value sent to the server is typically a
>> locale-independent value in a hidden field as defined by the name
>> attribute" - but it seems the locale matters anyway?
>>
>> What also confuses me, is the displayFormat attribute. If I set it to
>> e.g. "-MM-dd", I always get the "Invalid field value for field ..."
>> error, regardless of the request_locale.
>> I am also a bit unsure about the format and saveFormat attributes. I
>> played with them, but they did not seem to make any difference.
>>
>> I also wonder how to handle the situation where a user has Javascript
>> disabled, in which case the date field + icon are not shown at all.
>>
>> I am using Struts2 2.0.6.
>>
>> Torsten
>>
>> -
>> 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 ajax validation broken?

2007-05-08 Thread אלחנן מעין

so i should just use client side validation then?




From: "Musachy Barroso" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: is ajax validation broken?
Date: Tue, 8 May 2007 08:48:20 -0400

Ajax validation has been changed/fixed for 2.1, where DWR is not required
any more. In 2.1 you will be able to just add an interceptor to your class
to enable ajax validation for it(and use the dojo plugin). The jira ticket:

https://issues.apache.org/struts/browse/WW-1897

musachy

On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:


i've looked at the struts showcase samples, and where it says validation
(ajax) it says broken, i running it, and it looks fine i think, (still
don't
know how to make it work on my application though , i clicked submit and
moved away and it doesn't do anything.

_
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


_
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



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



Re: ArrayOfBeans interaction

2007-05-08 Thread Nuwan Chandrasoma

http://www.laliluna.de/struts-nested-iteration-tutorial.html

then this would help.

Thanks,

Nuwan


- Original Message - 
From: "Marcello Savino" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 1:27 PM
Subject: R: ArrayOfBeans interaction


Very intersting but (if is possible) i don't want to use a DynaActionForm .
I've tryied to modify my jsp code setting the property indexed="true" but 
the value in the bean remain unchanged. I think i'll need to add code on my 
ACtionForm but not idea about the code to add.



Marcello Savino
ALDEBRA S.p.A.
tel.  0461302441

-Messaggio originale-
Da: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED]
Inviato: martedì 8 maggio 2007 19.56
A: Struts Users Mailing List
Oggetto: Re: ArrayOfBeans interaction

http://www.developer.com/java/ejb/article.php/2233591

see if this helps you.

Thanks,

Nuwan

- Original Message -
From: "Marcello Savino" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 12:10 PM
Subject: ArrayOfBeans interaction


Ciao

Let's say this is my jsp code:











Where "list" is a Bean array. The Bean class is "myBean" and has two
properties (firstField, secondField). I need the changes made in the
rows to be stored in the ActionForm.list[index].
You know the best way i can achieve this ?

Thanks in advance

Marcello

-
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: Problems with number convertion on s:input

2007-05-08 Thread André Faria

I resolved that from this way:

value="%{getText('format.number',{cliente.salario})}"/>


Thank's
André Faria
André Faria escreveu:

The problem occurs from the action to view.
from the view to action its ok

Please I anyone can help...

Thank's a lot

André Faria escreveu:

Hi All,

   I have the follow problem:
   I am using the Portuguese Brazil Localization on Struts 2, so the 
format to decimal numbers is (1.000.000,00) equals (1,000,000.00) in 
american localization.
   If you fill the s:input fields with the brazilian format, the 
struts converts the numbers in the correct way to a double number, 
but  when the struts reads the double field, it apparently only makes 
an toString call, and it prints an unformated output. What can I do 
to solve this problem?


  Have a nice  day!

Thank's,
André Faria 




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



Re: Struts2 character code question

2007-05-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Red,

red phoenix wrote:
> If I input English name in the field Name in JSP,when I submit,the 
> test.do will receive right English name,but when I input Chinese name 
> in the field Name in JSP, test.do will receive not right name,it will
> show [EMAIL PROTECTED]

This is what you get when you print out a byte array. Try converting the
byte array to a String using "new String(bytes, charset)" and printing that.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQJwZ9CaO5/Lv0PARAmyvAJ9aCJZ/MINdBzS18ytQMgzf4M8D3ACffHSG
Ldprq3v5ZTLxYF80HoafTOY=
=vx7I
-END PGP SIGNATURE-

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



Struts2 character code question

2007-05-08 Thread red phoenix

I have set my all files with UTF-8 format,so I set URIEncoding parameter in
server.xml in tomcat6.0.10,like follows:

Then I write a JSP file like follows:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>





In test.do action,I get the value of Name from JSP,like follows:
request.getParameter("Name");
System.out.println("Name="+Name);
If I input english name in the field Name in JSP,when I submit,the
test.dowill receive right english name,but when I input chinese name
in the field
Name in JSP,test.do will receive not right name,it will show [EMAIL PROTECTED]
I know it must be wrong in character change.But I don't want to change
URIEncoding from UTF-8 to GB2312 in the server.xml file,I guess I should do
something in test.do,but I don't know how to do it.
Anybody could tell me how to do it? Would you give me some code?

Thanks


RE: how to disable refresh button and back button

2007-05-08 Thread Espinosa, Joel
This is the Struts Mailing list, I don't think you should ask this here.

Regards.

PS. http://www.catb.org/~esr/faqs/smart-questions.html

-Original Message-
From: jalal udeen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 12:31 AM
To: Struts Users Mailing List
Subject: how to disable refresh button and back button


hi all
can any one explain me how to disable both back
button
and  refresh button
thanks
jalaludeen

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



(Solution) RE: problem with Struts 2 setup -class file has wrong version 49.0, should be 48.0

2007-05-08 Thread Jack Yu
Hi All, 

Thanks for all the help, but the true solution I found was to replace the
tools.jar in tomcat5 with the tools.jar file from jdk1.6. Now I'm able to 
get Struts2 up and running. 

And they have a thread in sun's website related to this: 
http://forum.java.sun.com/thread.jspa?threadID=5121172

thanks, 

Jack 


-Original Message-
From: Jack Yu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:46 AM
To: 'Struts Users Mailing List'
Cc: 'Jae Lim'
Subject: RE: problem with Struts 2 setup -class file has wrong version 49.0,
should be 48.0

Ok, I have did all the steps below, and still can't fix this version problem
with Java. 

  1) Delete the "Catalina" folder under tomcat5/work/
  2) Restart tomcat
  3) Make sure javac and java are both 1.6 from the command line, and in the
tomcat configuration, the jvm path is: 
 C:\Program Files\Java\jdk1.6.0_01\jre\bin\server\jvm.dll
  4) Go to http://localhost:8080/struts2-blank-2.0.6/
 And get this error: 


javax.servlet.ServletException: Unable to compile class for JSP

Generated servlet error:
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
e\HelloWorld_jsp.java:7: cannot access java.lang.Object


Generated servlet error:
bad class file: C:\Program
Files\Java\jdk1.6.0_01\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0


Version 48.0 is Java 1.4,  version 49.0 is Java 1.5, but I only have version
Java 1.6(Version 50.0) on my computer right now. 

Another question I have raised is that I downloaded and installed Java SDK,
do I need to download Java EE separately? 

Thanks. 







-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 07, 2007 5:50 PM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: problem with Struts 2 setup -The requested resource
(/struts2-blank-2.0.6/) is not available

what happens when you clean the work dir (as earlier suggested) and 
recompile the webapp under 6???
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, May 07, 2007 5:31 PM
Subject: RE: problem with Struts 2 setup -The requested resource 
(/struts2-blank-2.0.6/) is not available


> --- Jack Yu <[EMAIL PROTECTED]> wrote:
>> Yeah, I have tried this, but it still give me the
>> same problem. Thanks.
>
> ?! I hate to ask, but are you sure? If the compilation
> is happening with one version and the execution with
> another something seems horribly wrong.
>
> You say you're using 1.6, but the trace below is using
> 1.5.
>
> d.
>
>> Clean out your work directory so the JSPs are
>> re-compiled.
>>
>> --- Jack Yu <[EMAIL PROTECTED]> wrote:
>>
>> > Ok, I can start my webapps now, by using JVM 1.6.
>> > (The mistakes was that I
>> > configured tomcat to point to the jre1.4
>> directory.
>> > )
>> >
>> > However, I encounter a new problem, when I go to
>> > http://localhost:8080/struts2-blank-2.0.6/, I get
>> > the following error.
>> >
>> > I read compile each java src files and restart
>> > tomcat again, still give me
>> > the same problem.
>> >
>>
> ==
>> > javax.servlet.ServletException: Unable to compile
>> > class for JSP
>> >
>> > Generated servlet error:
>> >
>>
>
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
>> > e\HelloWorld_jsp.java:7: cannot access
>> > java.lang.Object
>> >
>> >
>> > Generated servlet error:
>> > bad class file:
>> >
>>
> C:\jdk1.5.0_11\jre\lib\rt.jar(java/lang/Object.class)
>> > class file has wrong version 49.0, should be 48.0
>> > Please remove or make sure it appears in the
>> correct
>> > subdirectory of the
>> > classpath.
>> > public final class HelloWorld_jsp extends
>> > org.apache.jasper.runtime.HttpJspBase
>> >  ^
>> > 1 error
>> >
>>
> ===
>> >
>> > -Original Message-
>> > From: Musachy Barroso [mailto:[EMAIL PROTECTED]
>> > Sent: Monday, May 07, 2007 3:03 PM
>> > To: Struts Users Mailing List
>> > Subject: Re: problem with Struts 2 setup -The
>> > requested resource
>> > (/struts2-blank-2.0.6/) is not available
>> >
>> > That problem is definitely a jvm version issue.
>> Run:
>> >
>> > java -showversion
>> >
>> > to see what version you have in the path and make
>> > sure it is 1.5 (1.6 should
>> > be fine also)
>> >
>> > musachy
>> >
>> > On 5/7/07, Jack Yu <[EMAIL PROTECTED

(solution) RE: problem with Struts 2 setup -class file has wrong version 49.0, should be 48.0

2007-05-08 Thread Jack Yu
The soltuoi

-Original Message-
From: Jack Yu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:46 AM
To: 'Struts Users Mailing List'
Cc: 'Jae Lim'
Subject: RE: problem with Struts 2 setup -class file has wrong version 49.0,
should be 48.0

Ok, I have did all the steps below, and still can't fix this version problem
with Java. 

  1) Delete the "Catalina" folder under tomcat5/work/
  2) Restart tomcat
  3) Make sure javac and java are both 1.6 from the command line, and in the
tomcat configuration, the jvm path is: 
 C:\Program Files\Java\jdk1.6.0_01\jre\bin\server\jvm.dll
  4) Go to http://localhost:8080/struts2-blank-2.0.6/
 And get this error: 


javax.servlet.ServletException: Unable to compile class for JSP

Generated servlet error:
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
e\HelloWorld_jsp.java:7: cannot access java.lang.Object


Generated servlet error:
bad class file: C:\Program
Files\Java\jdk1.6.0_01\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0


Version 48.0 is Java 1.4,  version 49.0 is Java 1.5, but I only have version
Java 1.6(Version 50.0) on my computer right now. 

Another question I have raised is that I downloaded and installed Java SDK,
do I need to download Java EE separately? 

Thanks. 







-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 07, 2007 5:50 PM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: problem with Struts 2 setup -The requested resource
(/struts2-blank-2.0.6/) is not available

what happens when you clean the work dir (as earlier suggested) and 
recompile the webapp under 6???
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, May 07, 2007 5:31 PM
Subject: RE: problem with Struts 2 setup -The requested resource 
(/struts2-blank-2.0.6/) is not available


> --- Jack Yu <[EMAIL PROTECTED]> wrote:
>> Yeah, I have tried this, but it still give me the
>> same problem. Thanks.
>
> ?! I hate to ask, but are you sure? If the compilation
> is happening with one version and the execution with
> another something seems horribly wrong.
>
> You say you're using 1.6, but the trace below is using
> 1.5.
>
> d.
>
>> Clean out your work directory so the JSPs are
>> re-compiled.
>>
>> --- Jack Yu <[EMAIL PROTECTED]> wrote:
>>
>> > Ok, I can start my webapps now, by using JVM 1.6.
>> > (The mistakes was that I
>> > configured tomcat to point to the jre1.4
>> directory.
>> > )
>> >
>> > However, I encounter a new problem, when I go to
>> > http://localhost:8080/struts2-blank-2.0.6/, I get
>> > the following error.
>> >
>> > I read compile each java src files and restart
>> > tomcat again, still give me
>> > the same problem.
>> >
>>
> ==
>> > javax.servlet.ServletException: Unable to compile
>> > class for JSP
>> >
>> > Generated servlet error:
>> >
>>
>
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
>> > e\HelloWorld_jsp.java:7: cannot access
>> > java.lang.Object
>> >
>> >
>> > Generated servlet error:
>> > bad class file:
>> >
>>
> C:\jdk1.5.0_11\jre\lib\rt.jar(java/lang/Object.class)
>> > class file has wrong version 49.0, should be 48.0
>> > Please remove or make sure it appears in the
>> correct
>> > subdirectory of the
>> > classpath.
>> > public final class HelloWorld_jsp extends
>> > org.apache.jasper.runtime.HttpJspBase
>> >  ^
>> > 1 error
>> >
>>
> ===
>> >
>> > -Original Message-
>> > From: Musachy Barroso [mailto:[EMAIL PROTECTED]
>> > Sent: Monday, May 07, 2007 3:03 PM
>> > To: Struts Users Mailing List
>> > Subject: Re: problem with Struts 2 setup -The
>> > requested resource
>> > (/struts2-blank-2.0.6/) is not available
>> >
>> > That problem is definitely a jvm version issue.
>> Run:
>> >
>> > java -showversion
>> >
>> > to see what version you have in the path and make
>> > sure it is 1.5 (1.6 should
>> > be fine also)
>> >
>> > musachy
>> >
>> > On 5/7/07, Jack Yu <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Ok,
>> > >
>> > > I'm using JDK 1.6 and JVM 1.6 now, and I still
>> > have the same problem.
>> > >
>> > > I also tried to use JDK 1.5, but still have the
>> > same problem.
>> > >
>> > >
>> >
>>
> ===
>> > > 007-05-07 1

Re: [S2] Spring Bean + ?

2007-05-08 Thread Martin Gainty

what is the value of singleton= in spring config?
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

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

To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 9:15 AM
Subject: RE: [S2] Spring Bean +  ?


Dave,

Took your advice and continued to build out my RoleAction, RoleDao, 
RoleService (all of which I'll need anyway later.)


I have my RoleAction setup with RoleService being passed as a constructor 
(Spring.)


In my JSP now I am just doing,



RoleAction class has the private member roles which is the list of all the 
roles I wish to iterate over.


Question now is, does RoleAction not get thrown onto the stack after the 
 call? It seems I can only access the 'roles.name' and 
'roles.description' properties from dispatched result page?


hm


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, May 07, 2007 9:32 AM
To: Struts Users Mailing List;Paul
Subject: Re: [S2] Spring Bean +  ?

Why not just supply a list getter in your action and
set its value to the roleDao's findAll result?

In general I don't think using DAO functionality on
the view side is a particularly good idea anyway, but
that's just me :)

d.

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


Hi,

Having some issues getting this the above working. I
have a defined spring bean as follows:


class="com.paul.project.system.dao.impl.RoleDaoImpl">





Now the RoleDaoImpl contains a method 'findAll()'
which I would like to iterate over the results and
display them.

In my jsp I have tried:






But I don't think that would work since roleDao
isn't on the stack?

I've tried declaring:



etc.etc.

Basically I have a userform for an admin, that has a
UserModel on the stack. Part of the userform though
is selecting which user roles (RoleModel) to add the
user to and I need to render all available roles. I
think my issue is strictly syntax? I hope someone
could point me in the right direction?

Regards,
Paul



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.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: problem with Struts 2 setup -class file has wrong version 49.0, should be 48.0

2007-05-08 Thread Jack Yu
Ok, I have did all the steps below, and still can't fix this version problem
with Java. 

  1) Delete the "Catalina" folder under tomcat5/work/
  2) Restart tomcat
  3) Make sure javac and java are both 1.6 from the command line, and in the
tomcat configuration, the jvm path is: 
 C:\Program Files\Java\jdk1.6.0_01\jre\bin\server\jvm.dll
  4) Go to http://localhost:8080/struts2-blank-2.0.6/
 And get this error: 


javax.servlet.ServletException: Unable to compile class for JSP

Generated servlet error:
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
e\HelloWorld_jsp.java:7: cannot access java.lang.Object


Generated servlet error:
bad class file: C:\Program
Files\Java\jdk1.6.0_01\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0


Version 48.0 is Java 1.4,  version 49.0 is Java 1.5, but I only have version
Java 1.6(Version 50.0) on my computer right now. 

Another question I have raised is that I downloaded and installed Java SDK,
do I need to download Java EE separately? 

Thanks. 







-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 07, 2007 5:50 PM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: problem with Struts 2 setup -The requested resource
(/struts2-blank-2.0.6/) is not available

what happens when you clean the work dir (as earlier suggested) and 
recompile the webapp under 6???
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, May 07, 2007 5:31 PM
Subject: RE: problem with Struts 2 setup -The requested resource 
(/struts2-blank-2.0.6/) is not available


> --- Jack Yu <[EMAIL PROTECTED]> wrote:
>> Yeah, I have tried this, but it still give me the
>> same problem. Thanks.
>
> ?! I hate to ask, but are you sure? If the compilation
> is happening with one version and the execution with
> another something seems horribly wrong.
>
> You say you're using 1.6, but the trace below is using
> 1.5.
>
> d.
>
>> Clean out your work directory so the JSPs are
>> re-compiled.
>>
>> --- Jack Yu <[EMAIL PROTECTED]> wrote:
>>
>> > Ok, I can start my webapps now, by using JVM 1.6.
>> > (The mistakes was that I
>> > configured tomcat to point to the jre1.4
>> directory.
>> > )
>> >
>> > However, I encounter a new problem, when I go to
>> > http://localhost:8080/struts2-blank-2.0.6/, I get
>> > the following error.
>> >
>> > I read compile each java src files and restart
>> > tomcat again, still give me
>> > the same problem.
>> >
>>
> ==
>> > javax.servlet.ServletException: Unable to compile
>> > class for JSP
>> >
>> > Generated servlet error:
>> >
>>
>
C:\Tomcat5\work\Catalina\localhost\struts2-blank-2.0.6\org\apache\jsp\exampl
>> > e\HelloWorld_jsp.java:7: cannot access
>> > java.lang.Object
>> >
>> >
>> > Generated servlet error:
>> > bad class file:
>> >
>>
> C:\jdk1.5.0_11\jre\lib\rt.jar(java/lang/Object.class)
>> > class file has wrong version 49.0, should be 48.0
>> > Please remove or make sure it appears in the
>> correct
>> > subdirectory of the
>> > classpath.
>> > public final class HelloWorld_jsp extends
>> > org.apache.jasper.runtime.HttpJspBase
>> >  ^
>> > 1 error
>> >
>>
> ===
>> >
>> > -Original Message-
>> > From: Musachy Barroso [mailto:[EMAIL PROTECTED]
>> > Sent: Monday, May 07, 2007 3:03 PM
>> > To: Struts Users Mailing List
>> > Subject: Re: problem with Struts 2 setup -The
>> > requested resource
>> > (/struts2-blank-2.0.6/) is not available
>> >
>> > That problem is definitely a jvm version issue.
>> Run:
>> >
>> > java -showversion
>> >
>> > to see what version you have in the path and make
>> > sure it is 1.5 (1.6 should
>> > be fine also)
>> >
>> > musachy
>> >
>> > On 5/7/07, Jack Yu <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Ok,
>> > >
>> > > I'm using JDK 1.6 and JVM 1.6 now, and I still
>> > have the same problem.
>> > >
>> > > I also tried to use JDK 1.5, but still have the
>> > same problem.
>> > >
>> > >
>> >
>>
> ===
>> > > 007-05-07 14:55:21
>> > StandardContext[/manager]HTMLManager: start:
>> > Starting
>> > > web
>> > > application at '/struts2-blank-2.0.6'
>> > > 2007-05-07 14:55:21
>> > StandardContext[/struts2-blank-2.0.6]Exception
>> > > starting
>> > > filter struts2
>> > > java

R: ArrayOfBeans interaction

2007-05-08 Thread Marcello Savino
Very intersting but (if is possible) i don't want to use a DynaActionForm .
I've tryied to modify my jsp code setting the property indexed="true" but the 
value in the bean remain unchanged. I think i'll need to add code on my 
ACtionForm but not idea about the code to add.


Marcello Savino
ALDEBRA S.p.A. 
tel.  0461302441

-Messaggio originale-
Da: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] 
Inviato: martedì 8 maggio 2007 19.56
A: Struts Users Mailing List
Oggetto: Re: ArrayOfBeans interaction

http://www.developer.com/java/ejb/article.php/2233591

see if this helps you.

Thanks,

Nuwan

- Original Message -
From: "Marcello Savino" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 12:10 PM
Subject: ArrayOfBeans interaction


Ciao

Let's say this is my jsp code:











Where "list" is a Bean array. The Bean class is "myBean" and has two
properties (firstField, secondField). I need the changes made in the
rows to be stored in the ActionForm.list[index].
You know the best way i can achieve this ?

Thanks in advance

Marcello

-
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: [S2] Spring Bean + ?

2007-05-08 Thread Paul
Dave,

Took your advice and continued to build out my RoleAction, RoleDao, RoleService 
(all of which I'll need anyway later.)

I have my RoleAction setup with RoleService being passed as a constructor 
(Spring.)

In my JSP now I am just doing,



RoleAction class has the private member roles which is the list of all the 
roles I wish to iterate over.

Question now is, does RoleAction not get thrown onto the stack after the 
 call? It seems I can only access the 'roles.name' and 
'roles.description' properties from dispatched result page?

hm


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, May 07, 2007 9:32 AM
To: Struts Users Mailing List;Paul
Subject: Re: [S2] Spring Bean +  ?

Why not just supply a list getter in your action and
set its value to the roleDao's findAll result?

In general I don't think using DAO functionality on
the view side is a particularly good idea anyway, but
that's just me :)

d.

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

> Hi,
>
> Having some issues getting this the above working. I
> have a defined spring bean as follows:
>
> 
class="com.paul.project.system.dao.impl.RoleDaoImpl">
>  ref="entityManagerFactory"/>
> 
>
>
> Now the RoleDaoImpl contains a method 'findAll()'
> which I would like to iterate over the results and
> display them.
>
> In my jsp I have tried:
>
> 
> 
> 
> 
>
> But I don't think that would work since roleDao
> isn't on the stack?
>
> I've tried declaring:
>  name="com.paul.project.system.dao.impl.RoleDaoImpl"
> id="roleBean"/>
>
> 
> etc.etc.
>
> Basically I have a userform for an admin, that has a
> UserModel on the stack. Part of the userform though
> is selecting which user roles (RoleModel) to add the
> user to and I need to render all available roles. I
> think my issue is strictly syntax? I hope someone
> could point me in the right direction?
>
> Regards,
> Paul


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



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



Re: Looking for source to com.opensymphony.xwork2.ActionContext

2007-05-08 Thread Musachy Barroso

You can browse it online here:

http://svn.opensymphony.com/svn/xwork/trunk/src/java/com/opensymphony/xwork2/ActionContext.java

may the source be with you (sorry I couldn't help it :) )

musachy

On 5/8/07, Martin Gilday <[EMAIL PROTECTED]> wrote:


http://www.opensymphony.com/xwork/download.action


- Original message -
From: "Al Sutton" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Date: Tue, 8 May 2007 11:45:41 +0100
Subject: Looking for source to com.opensymphony.xwork2.ActionContext

Can anyone tell me where the source is for
com.opensymphony.xwork2.ActionContext?

I've got the following exception;

java.lang.NullPointerException
at
com.opensymphony.xwork2.ActionContext.setContext(ActionContext.java:142)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.cleanUp
(ActionContextClea
nUp.java:128)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter
(ActionContextCle
anUp.java:104)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(Application
FilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterCh
ain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.ja
va:210)
at
org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.ja
va:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117
)
at
org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java
:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.jav
a:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWo
rkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.jav
a:685)
at java.lang.Thread.run(Unknown Source)

and I'm trying to track back to the cause.

Thanks,

Al.



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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: Spam:: getting error when i m trying to make database connection

2007-05-08 Thread Musachy Barroso

No Class Definition Found Error, where the class is
org.apache.commons.pool.impl.GenericObjectPool, you are probably missing
commons pool,

http://jakarta.apache.org/commons/pool/

musachy

On 5/8/07, Shshir <[EMAIL PROTECTED]> wrote:



org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /registration threw load() exception
java.lang.NoClassDefFoundError:
org/apache/commons/pool/impl/GenericObjectPool



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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: is ajax validation broken?

2007-05-08 Thread Musachy Barroso

Ajax validation has been changed/fixed for 2.1, where DWR is not required
any more. In 2.1 you will be able to just add an interceptor to your class
to enable ajax validation for it(and use the dojo plugin). The jira ticket:

https://issues.apache.org/struts/browse/WW-1897

musachy

On 5/8/07, אלחנן מעין <[EMAIL PROTECTED]> wrote:


i've looked at the struts showcase samples, and where it says validation
(ajax) it says broken, i running it, and it looks fine i think, (still
don't
know how to make it work on my application though , i clicked submit and
moved away and it doesn't do anything.

_
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


[OT] Re: pagination problem pls rectify this error its very urgent for me

2007-05-08 Thread Dave Newton
--- jalal udeen <[EMAIL PROTECTED]> wrote:
> I have to use pagination in jsp  so i did it with
> logic:iterate  tag as follows

One reason you may not be getting an answer is that
this has nothing to do with Struts.

> <%
>   String strOffset ="0";
> if(request.getParameter("pagination")!=null)
>  strOffset=request.getParameter("pagination");
>  else
> strOffset ="0";
> String strLength = "2";
> int increment = Integer.parseInt(strOffset) +
> Integer.parseInt(strLength)
> ;
> String strIncOffset = String.valueOf(increment);
>   ArrayList list 
> =(ArrayList)request.getAttribute("pattern");
>  int size= list.size();
> 
> if((Integer.parseInt(strIncOffset)>= size))
>  strIncOffset ="0";
> 
> %>

(The following is my opinion and probably does not
reflect the views of the rest of the Struts mailing
list.)

I started to look at the code, but it was too weird
for me--it would not have survived even the most
cursory of code reviews. That made me even less likely
to want to answer the question.

What I would suggest doing (besides cleaning up the
code) is, on paper, write down a few test cases,
focusing on the edge case which is giving you problems
at the moment.

Build a truth table using your values and the logical
conditions you have and see why they might be failing.
If I don't have anything else to do at work today
perhaps I'll suck it up and take another look at it
and you can buy me a Kingfisher.

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



pagination problem pls rectify this error its very urgent for me

2007-05-08 Thread jalal udeen

hi  all


I have to use pagination in jsp  so i did it with logic:iterate  tag as
follows

i use  2 links   next and previous  in this application

but next link is not disapppearinng when it reaches the last record pls
check the condition and clear my doubt this  pls its very urgent for me

the code follows


<%
 String strOffset ="0";
   if(request.getParameter("pagination")!=null)
strOffset=request.getParameter("pagination");
else
   strOffset ="0";
   String strLength = "2";
   int increment = Integer.parseInt(strOffset) + Integer.parseInt(strLength)
;
   String strIncOffset = String.valueOf(increment);
 ArrayList list  =(ArrayList)request.getAttribute("pattern");
int size= list.size();

   if((Integer.parseInt(strIncOffset)>= size))
strIncOffset ="0";

%>

*Logic tags*



* Links*



*Next Link:*

**




<%


if(Integer.parseInt(strOffset)!=size &&  !((Integer.parseInt(strOffset)>size)
) && !(Integer.parseInt(strLength)>=size) )

{


%>


Next

<%
}

%>





*prev Link*

**

<%


if((strIncOffset.trim().equals(String.valueOf(size)) ||
Integer.parseInt(strOffset)

0   ) && !(Integer.parseInt(strLength)>=size))

{
strIncOffset=String.valueOf(Integer.parseInt(strOffset)-2);

%>


Prev

<%
}%>



pls i need a help for this



thanks

jalaludeen

but next link is not disspearinng when it reaces the last one can any help
me for this

the code follows


<%
 String strOffset ="0";
   if(request.getParameter("pagination")!=null)
strOffset=request.getParameter("pagination");
else
   strOffset ="0";
   String strLength = "2";
   int increment = Integer.parseInt(strOffset) + Integer.parseInt(strLength)
;
   String strIncOffset = String.valueOf(increment);
 ArrayList list  =(ArrayList)request.getAttribute("pattern");
int size= list.size();

   if((Integer.parseInt(strIncOffset)>= size))
strIncOffset ="0";

%>

*Logic tags*



* Links*



*Next Link:*

**




<%


if(Integer.parseInt(strOffset)!=size &&  !((Integer.parseInt(strOffset)>size)
) && !( Integer.parseInt(strLength)>=size) )

{


%>


Next

<%
}

%>





*prev Link*

**

<%


if((strIncOffset.trim().equals(String.valueOf(size)) ||
Integer.parseInt(strOffset)

0   ) && !(Integer.parseInt(strLength)>=size))

{
strIncOffset=String.valueOf(Integer.parseInt(strOffset)-2);

%>


Prev

<%
}%>



pls i need a help for this   pls rectify this error its very urgent for me



thanks

jalaludeen


Re: ArrayOfBeans interaction

2007-05-08 Thread Nuwan Chandrasoma

http://www.developer.com/java/ejb/article.php/2233591

see if this helps you.

Thanks,

Nuwan

- Original Message - 
From: "Marcello Savino" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 12:10 PM
Subject: ArrayOfBeans interaction


Ciao

Let's say this is my jsp code:











Where "list" is a Bean array. The Bean class is "myBean" and has two
properties (firstField, secondField). I need the changes made in the
rows to be stored in the ActionForm.list[index].
You know the best way i can achieve this ?

Thanks in advance

Marcello

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



ArrayOfBeans interaction

2007-05-08 Thread Marcello Savino
Ciao

Let's say this is my jsp code:











Where "list" is a Bean array. The Bean class is "myBean" and has two
properties (firstField, secondField). I need the changes made in the
rows to be stored in the ActionForm.list[index].
You know the best way i can achieve this ?

Thanks in advance

Marcello

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



Re: Need help about the technology to apply with struts

2007-05-08 Thread Tomas Kramar
This is not a matter of technology, but a matter of design.
I think your users would like to see all previous questions, so I would
use ajax.
And by the way, by using ajax you are not moving the logic to page, it
still remains on server.
Maybe you should have a look at how ajax works first and then decide.


-- 
Tomas Kramar


Kapil Sharma wrote:
>>> If you want to leave old questions displayed on page and always add a
>>> new one at bottom, than you should use ajax to determine and send new
>>> question. Otherwise you end up with a mess of javascript code.
> 
> 
> I have not used AJAX before.
> 
> Applications system admin module specifies all the dependies of questions and 
> answers.
> 
> So my Query is that Should i bring all the logic from database into my ajax 
> page and then make Questions n Answers hide, unhide.
> 
> Or there is any tool through which u people make these kind of pages
> 
> Any help is appreciated
> 
> 
> Thanks and Regards,
> Kapil Sharma 
> 
> 
> 
> -Original Message-
> From: Tomas Kramar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 08, 2007 7:30 PM
> To: Struts Users Mailing List
> Subject: Re: Need help about the technology to apply with struts
> 
> 
> If you want to leave old questions displayed on page and always add a
> new one at bottom, than you should use ajax to determine and send new
> question. Otherwise you end up with a mess of javascript code.
> 
> If you are planning to load new page for each question than it is
> basically the same - ajax just shaves off page refreshing.
> 
> Kapil Sharma wrote:
>> I want to develop a web application that consists of different questions and
>> answers submitted by the users.
>>
>> The questions are dependent on the answers of other questions.
>>
>> What should i use with struts. is it Ajax.
>>
>> i.e if A question has two radiobutton answers
>>  and on click of one radio button the one set of hidden questions will come
>> out  and on click of other the another set.
>>
>> I would like to know the technology i should use.
>>
>> Plz give me the best tech to apply
>>
>>
>>
>> Thanks and Regards,
>> Kapil Sharma
>>
>>
>>
>> -
>> 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: Looking for source to com.opensymphony.xwork2.ActionContext

2007-05-08 Thread Martin Gilday
http://www.opensymphony.com/xwork/download.action


- Original message -
From: "Al Sutton" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Date: Tue, 8 May 2007 11:45:41 +0100
Subject: Looking for source to com.opensymphony.xwork2.ActionContext

Can anyone tell me where the source is for
com.opensymphony.xwork2.ActionContext?
 
I've got the following exception;
 
java.lang.NullPointerException
at
com.opensymphony.xwork2.ActionContext.setContext(ActionContext.java:142)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.cleanUp(ActionContextClea
nUp.java:128)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCle
anUp.java:104)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685)
at java.lang.Thread.run(Unknown Source)

and I'm trying to track back to the cause.

Thanks,

Al.



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



Looking for source to com.opensymphony.xwork2.ActionContext

2007-05-08 Thread Al Sutton
Can anyone tell me where the source is for
com.opensymphony.xwork2.ActionContext?
 
I've got the following exception;
 
java.lang.NullPointerException
at com.opensymphony.xwork2.ActionContext.setContext(ActionContext.java:142)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.cleanUp(ActionContextClea
nUp.java:128)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCle
anUp.java:104)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685)
at java.lang.Thread.run(Unknown Source)

and I'm trying to track back to the cause.

Thanks,

Al.



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



RE: Need help about the technology to apply with struts

2007-05-08 Thread Kapil Sharma
>>
>>If you want to leave old questions displayed on page and always add a
>>new one at bottom, than you should use ajax to determine and send new
>>question. Otherwise you end up with a mess of javascript code.

>>

I have not used AJAX before.

Applications system admin module specifies all the dependies of questions and 
answers.

So my Query is that Should i bring all the logic from database into my ajax 
page and then make Questions n Answers hide, unhide.

Or there is any tool through which u people make these kind of pages

Any help is appreciated


Thanks and Regards,
Kapil Sharma 



-Original Message-
From: Tomas Kramar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 7:30 PM
To: Struts Users Mailing List
Subject: Re: Need help about the technology to apply with struts


If you want to leave old questions displayed on page and always add a
new one at bottom, than you should use ajax to determine and send new
question. Otherwise you end up with a mess of javascript code.

If you are planning to load new page for each question than it is
basically the same - ajax just shaves off page refreshing.

Kapil Sharma wrote:
> 
> I want to develop a web application that consists of different questions and
> answers submitted by the users.
> 
> The questions are dependent on the answers of other questions.
> 
> What should i use with struts. is it Ajax.
> 
> i.e if A question has two radiobutton answers
>  and on click of one radio button the one set of hidden questions will come
> out  and on click of other the another set.
> 
> I would like to know the technology i should use.
> 
> Plz give me the best tech to apply
> 
> 
> 
> Thanks and Regards,
> Kapil Sharma
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Tomas Kramar

-
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: Need help about the technology to apply with struts

2007-05-08 Thread Tomas Kramar
If you want to leave old questions displayed on page and always add a
new one at bottom, than you should use ajax to determine and send new
question. Otherwise you end up with a mess of javascript code.

If you are planning to load new page for each question than it is
basically the same - ajax just shaves off page refreshing.

Kapil Sharma wrote:
> 
> I want to develop a web application that consists of different questions and
> answers submitted by the users.
> 
> The questions are dependent on the answers of other questions.
> 
> What should i use with struts. is it Ajax.
> 
> i.e if A question has two radiobutton answers
>  and on click of one radio button the one set of hidden questions will come
> out  and on click of other the another set.
> 
> I would like to know the technology i should use.
> 
> Plz give me the best tech to apply
> 
> 
> 
> Thanks and Regards,
> Kapil Sharma
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Tomas Kramar

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



RE: Need Help On Pop Up

2007-05-08 Thread Srinivasula Reddy A , Bangalore
yes

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 3:25 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up


It is working at my end.

Have u specified correctly the form names and field values.

n 

Have u used the function to open that popup properly.



Thanks and Regards,
Kapil Sharma 



-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 6:46 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up


Hi sharma,

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

In the above code the value is not reflecting in the parent jsp

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 3:07 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up




//calling the child (popup ) window

function fnOpenPopup (path, values)
{

  CHECK_CHANGE = 1;
  if (childWin && !childWin.closed)
  {
childWin.close();
  }
  var params="toolbar=0,"; //toolbar off
  params+="location=0,"; //location/address box off
  params+="directories=0,"; //directories off
  params+="status=0,"; //status bar off
  params+="menubar=0,"; //menu baroff
  params+="scrollbars=1,"; //scrollbar on(comes only if size of window
is
too small for text)
  params+="resizable=0,"; //cannot be resized
  params+="left= "+200+","; //position of window from left in pixels
  params+="top= "+200+","; //position of window from top in pixels
  params+="width=100,"; //width of window in pixels
  params+="height=400"; //height of window in pixels

  if (values != null)
  {
childWin = window.open(path + "?hdnModePopup=Y"+"&"+values, "popup",
params);
  }
  else
  {
childWin = window.open(path + "?hdnModePopup=Y", "popup", params);
  }

   if (childWin.opener == null)
childWin.opener = self;
  childWin.resizeTo(750,350);
  childWin.moveTo(30,80);
  childWin.focus();
}


called on submit of popup child window

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

All the values will move to the name field of the parent



Thanks and Regards,
Kapil Sharma


-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 6:27 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up



No friend I need how to update the parent jsp with the selected value of
pop up jsp

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 2:50 PM
To: Struts Users Mailing List
Subject: Re: Need Help On Pop Up

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:
>
> Hi Struts User Community,
> ...
>
In struts how I can do this please give me sample rough code of JSP,
> ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.



It seems like homework! You're asking too much, friend. Try to search
the
internet, write some code and, then, ask a specific question.

Antonio

DISCLAIMER:


---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily
reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification,
distribution and / or publication of
this message without the prior written consent of the author of this
e-mail
is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.



---

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


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



Need help about the technology to apply with struts

2007-05-08 Thread Kapil Sharma


I want to develop a web application that consists of different questions and
answers submitted by the users.

The questions are dependent on the answers of other questions.

What should i use with struts. is it Ajax.

i.e if A question has two radiobutton answers
 and on click of one radio button the one set of hidden questions will come
out  and on click of other the another set.

I would like to know the technology i should use.

Plz give me the best tech to apply



Thanks and Regards,
Kapil Sharma



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



RE: Need Help On Pop Up

2007-05-08 Thread Kapil Sharma

It is working at my end.

Have u specified correctly the form names and field values.

n 

Have u used the function to open that popup properly.



Thanks and Regards,
Kapil Sharma 



-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 6:46 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up


Hi sharma,

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

In the above code the value is not reflecting in the parent jsp

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 3:07 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up




//calling the child (popup ) window

function fnOpenPopup (path, values)
{

  CHECK_CHANGE = 1;
  if (childWin && !childWin.closed)
  {
childWin.close();
  }
  var params="toolbar=0,"; //toolbar off
  params+="location=0,"; //location/address box off
  params+="directories=0,"; //directories off
  params+="status=0,"; //status bar off
  params+="menubar=0,"; //menu baroff
  params+="scrollbars=1,"; //scrollbar on(comes only if size of window
is
too small for text)
  params+="resizable=0,"; //cannot be resized
  params+="left= "+200+","; //position of window from left in pixels
  params+="top= "+200+","; //position of window from top in pixels
  params+="width=100,"; //width of window in pixels
  params+="height=400"; //height of window in pixels

  if (values != null)
  {
childWin = window.open(path + "?hdnModePopup=Y"+"&"+values, "popup",
params);
  }
  else
  {
childWin = window.open(path + "?hdnModePopup=Y", "popup", params);
  }

   if (childWin.opener == null)
childWin.opener = self;
  childWin.resizeTo(750,350);
  childWin.moveTo(30,80);
  childWin.focus();
}


called on submit of popup child window

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

All the values will move to the name field of the parent



Thanks and Regards,
Kapil Sharma


-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 6:27 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up



No friend I need how to update the parent jsp with the selected value of
pop up jsp

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 2:50 PM
To: Struts Users Mailing List
Subject: Re: Need Help On Pop Up

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:
>
> Hi Struts User Community,
> ...
>
In struts how I can do this please give me sample rough code of JSP,
> ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.



It seems like homework! You're asking too much, friend. Try to search
the
internet, write some code and, then, ask a specific question.

Antonio

DISCLAIMER:


---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily
reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification,
distribution and / or publication of
this message without the prior written consent of the author of this
e-mail
is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.



---

-
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: Need Help On Pop Up

2007-05-08 Thread Srinivasula Reddy A , Bangalore
Hi sharma,

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

In the above code the value is not reflecting in the parent jsp

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 3:07 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up




//calling the child (popup ) window

function fnOpenPopup (path, values)
{

  CHECK_CHANGE = 1;
  if (childWin && !childWin.closed)
  {
childWin.close();
  }
  var params="toolbar=0,"; //toolbar off
  params+="location=0,"; //location/address box off
  params+="directories=0,"; //directories off
  params+="status=0,"; //status bar off
  params+="menubar=0,"; //menu baroff
  params+="scrollbars=1,"; //scrollbar on(comes only if size of window
is
too small for text)
  params+="resizable=0,"; //cannot be resized
  params+="left= "+200+","; //position of window from left in pixels
  params+="top= "+200+","; //position of window from top in pixels
  params+="width=100,"; //width of window in pixels
  params+="height=400"; //height of window in pixels

  if (values != null)
  {
childWin = window.open(path + "?hdnModePopup=Y"+"&"+values, "popup",
params);
  }
  else
  {
childWin = window.open(path + "?hdnModePopup=Y", "popup", params);
  }

   if (childWin.opener == null)
childWin.opener = self;
  childWin.resizeTo(750,350);
  childWin.moveTo(30,80);
  childWin.focus();
}


called on submit of popup child window

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

All the values will move to the name field of the parent



Thanks and Regards,
Kapil Sharma


-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 6:27 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up



No friend I need how to update the parent jsp with the selected value of
pop up jsp

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 2:50 PM
To: Struts Users Mailing List
Subject: Re: Need Help On Pop Up

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:
>
> Hi Struts User Community,
> ...
>
In struts how I can do this please give me sample rough code of JSP,
> ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.



It seems like homework! You're asking too much, friend. Try to search
the
internet, write some code and, then, ask a specific question.

Antonio

DISCLAIMER:


---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily
reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification,
distribution and / or publication of
this message without the prior written consent of the author of this
e-mail
is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.



---

-
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: Need Help On Pop Up

2007-05-08 Thread Kapil Sharma



//calling the child (popup ) window

function fnOpenPopup (path, values)
{

  CHECK_CHANGE = 1;
  if (childWin && !childWin.closed)
  {
childWin.close();
  }
  var params="toolbar=0,"; //toolbar off
  params+="location=0,"; //location/address box off
  params+="directories=0,"; //directories off
  params+="status=0,"; //status bar off
  params+="menubar=0,"; //menu baroff
  params+="scrollbars=1,"; //scrollbar on(comes only if size of window is
too small for text)
  params+="resizable=0,"; //cannot be resized
  params+="left= "+200+","; //position of window from left in pixels
  params+="top= "+200+","; //position of window from top in pixels
  params+="width=100,"; //width of window in pixels
  params+="height=400"; //height of window in pixels

  if (values != null)
  {
childWin = window.open(path + "?hdnModePopup=Y"+"&"+values, "popup",
params);
  }
  else
  {
childWin = window.open(path + "?hdnModePopup=Y", "popup", params);
  }

   if (childWin.opener == null)
childWin.opener = self;
  childWin.resizeTo(750,350);
  childWin.moveTo(30,80);
  childWin.focus();
}


called on submit of popup child window

function updateParent(){
opener.document.form1.name.value = document.childForm.others.value;
 self.close();
return false;
}

All the values will move to the name field of the parent



Thanks and Regards,
Kapil Sharma


-Original Message-
From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 6:27 PM
To: Struts Users Mailing List
Subject: RE: Need Help On Pop Up



No friend I need how to update the parent jsp with the selected value of
pop up jsp

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 2:50 PM
To: Struts Users Mailing List
Subject: Re: Need Help On Pop Up

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:
>
> Hi Struts User Community,
> ...
>
In struts how I can do this please give me sample rough code of JSP,
> ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.



It seems like homework! You're asking too much, friend. Try to search
the
internet, write some code and, then, ask a specific question.

Antonio

DISCLAIMER:

---

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail
is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.


---

-
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: Need Help On Pop Up

2007-05-08 Thread Antonio Petrelli

2007/5/8, Nuwan Chandrasoma <[EMAIL PROTECTED]>:


you a javascript , get the opener of the pop up and get element in that
page
and set the value




As an addition to what Nuwan wrote, here is a simple example:
http://www.w3schools.com/htmldom/prop_win_opener.asp

Antonio


Re: Need Help On Pop Up

2007-05-08 Thread Nuwan Chandrasoma
you a javascript , get the opener of the pop up and get element in that page 
and set the value


Thanks,

Nuwan


- Original Message - 
From: "Srinivasula Reddy A , Bangalore" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, May 08, 2007 9:26 AM
Subject: RE: Need Help On Pop Up



No friend I need how to update the parent jsp with the selected value of
pop up jsp

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 2:50 PM
To: Struts Users Mailing List
Subject: Re: Need Help On Pop Up

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:


Hi Struts User Community,
...


In struts how I can do this please give me sample rough code of JSP,

ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.




It seems like homework! You're asking too much, friend. Try to search
the
internet, write some code and, then, ask a specific question.

Antonio

DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and 
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its 
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect 
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail 
is strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and

attachments please check them for viruses and defect.

---

-
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: ServletException in '/WEB-INF/tiles/position/edit.jsp': null

2007-05-08 Thread Jorge Martín Cuervo
Sorry, i've tried without tiles and now i can see the real exception:

java.lang.NullPointerException

com.martincuervo.engineweb.handlers.ControlFinder.findControls(Unknown 
Source)
com.martincuervo.engine.core.Engine.findControls(Unknown Source)
com.martincuervo.engine.core.Engine.(Unknown Source)
com.defactops.smartcvemployer.PositionForm.(PositionForm.java:41)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[...]

ups, sorry again

El mar, 08 de 05 de 2007 a las 11:30, Jorge Martín Cuervo escribió:

> Hi all, i'm using struts 1.2.9 and i get this exception, it's not very
> explanatory and i don't know what is wrong, does anyone have any idea of
> how can i get more info?
> 
> i tried to debug with eclipse and there's no parent exception.
> 
> 
> 
> 51207 [http-8080-Processor23] ERROR
> org.apache.struts.taglib.tiles.InsertTag  - ServletException in
> '/WEB-INF/tiles/position/edit.jsp': null
> org.apache.jasper.JasperException
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> [...]

-- 
;-)

Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email <[EMAIL PROTECTED]>
voz +34 985 129 820
voz +34 660 026 384



RE: disable back button

2007-05-08 Thread Kapil Sharma
Somewhere i found

Page A calls Page B

User should not be allowed to go to Page A from Page B.

Put the code below in Page A.


window.history.forward(1);


I have not tested it.

Thanks and Regards,
Kapil Sharma


-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 5:34 PM
To: Struts Users Mailing List
Subject: Re: disable back button


2007/5/8, Laurie Harper <[EMAIL PROTECTED]>:
>
> jalal udeen wrote:
> > how to disable back button
>
> Unplug the mouse... ;-)



Or paint an X on the back button on your monitor :-P
Anyway, if you google "disable back button" in google, you can find what you
need (or what you don't expect :-) )

Antonio



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



ServletException in '/WEB-INF/tiles/position/edit.jsp': null

2007-05-08 Thread Jorge Martín Cuervo
Hi all, i'm using struts 1.2.9 and i get this exception, it's not very
explanatory and i don't know what is wrong, does anyone have any idea of
how can i get more info?

i tried to debug with eclipse and there's no parent exception.



51207 [http-8080-Processor23] ERROR
org.apache.struts.taglib.tiles.InsertTag  - ServletException in
'/WEB-INF/tiles/position/edit.jsp': null
org.apache.jasper.JasperException
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
[...]

-- 
;-)

Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email <[EMAIL PROTECTED]>
voz +34 985 129 820
voz +34 660 026 384



RE: Need Help On Pop Up

2007-05-08 Thread Srinivasula Reddy A , Bangalore

No friend I need how to update the parent jsp with the selected value of
pop up jsp

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 2:50 PM
To: Struts Users Mailing List
Subject: Re: Need Help On Pop Up

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:
>
> Hi Struts User Community,
> ...
>
In struts how I can do this please give me sample rough code of JSP,
> ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.



It seems like homework! You're asking too much, friend. Try to search
the
internet, write some code and, then, ask a specific question.

Antonio

DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---

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



RE: FileName characters.

2007-05-08 Thread Kapil Sharma
>>I see, but does the program that you use to open the file work correctly?
If
yes I suppose you don't have to worry :-)


Yes the file is opening correctly . But saving this opened file as it is
will again show the  %xx characters .

BTW user has to enter its own name to the file.

Problem lies beacause in jsp The thing appears as

Filename   Download

 japaneseCharacters1 link1
 japaneseCharacters2 link2


and it does not appear correctly while saving (opening first).



Anyway thanks for all your answers.



Thanks and Regards,
Kapil Sharma



-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 5:43 PM
To: Struts Users Mailing List
Subject: Re: FileName characters.


2007/5/8, Kapil Sharma <[EMAIL PROTECTED]>:
>
> 2.
>
> The attachment dialog box shows correct filename.
> Also saving the file to my local disk also is correct
>
> But when i try to open the file directly on clik of "open" button from
> dialog box, the name is %xx



I see, but does the program that you use to open the file work correctly? If
yes I suppose you don't have to worry :-)


3.
>
> >>fileName = new String(fileName.getBytes("ISO-8859-1"), "UTF-8");
>
> I have done my jsp page  encoding as UTF-8 but i suppose my JVM or server
> specific encoding is ISO-8859-1

I need to do  String = new String(String.getBytes("ISO-8859-1"), "UTF-8");
> before storing anything to the oracle database
> otherwise it appears junk whenever i try to get it on the screen



The String class is encoding-independent, so maybe it is a problem of
correspondence between your JSP page header and the "meta" tag.
You have to set both:

<[EMAIL PROTECTED] pageEncoding="UTF-8"%>

and:



  

HTH
Antonio



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



Re: Need Help On Pop Up

2007-05-08 Thread Antonio Petrelli

2007/5/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>:


Hi Struts User Community,
...


In struts how I can do this please give me sample rough code of JSP,

ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.




It seems like homework! You're asking too much, friend. Try to search the
internet, write some code and, then, ask a specific question.

Antonio


Need Help On Pop Up

2007-05-08 Thread Srinivasula Reddy A , Bangalore


Hi Struts User Community,

I have a JSP in which I am opening a pop up. In the pop up jsp
(struts) I have one input text and search button. When I give some
string and click on the submit button it will display the list of names
with matching pattern string or exact string from the database.


I will select one name with a radio button and clicks on the submit
button. That selected value should reflect in my parent jsp and the pop
up jsp has to close.


In struts how I can do this please give me sample rough code of JSP,
ACTION CLASS, ACTION MAPPING ELEMENT, and POP UP JSP CODE.



Regards,
Sreenivasula Reddy A


DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---

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



Re: [S2] UTF-8 woes

2007-05-08 Thread meeboo

We have got everything working now except for handling UTF8 strings when
doing file uploads from IE6 in Resin. It seems as if multipart/form-data
requests don't play well in this certain environment (we have tried it in
Tomcat and it works there). Has anyone had experience with file uploads from
IE6 to a application ran in Resin?

Thanks!


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> meeboo,
> 
> meeboo wrote:
>> But that other poster was using Struts 1! Also, I am already using 
>>  
>> Has anyone had luck using for example å ä ö in S2 ?
> 
> What is the character set actually being used by the request and the
> response? Just because you have ISO-8859-1 in your  tag doesn't
> mean that the response is actually being sent and the request is
> actually being interpreted as ISO-8859-1.
> 
> Here are some things to look at:
> 
> 1. What does request.getCharacterEncoding return?
> 2. What does response.getCharacterEncoding return?
> 3. What does System.getProperty("file.encoding") return?
> 4. What does your HTTP or AJP listener have configured for
>its default character set? (In Tomcat, the connectors
>can use a default charset when the client does not provide
>one in the request headers).
> 5. You never mentioned whether you were using GET or POST. There
>is a difference in how the data is decoded.
> 
> - -chris
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGOkSH9CaO5/Lv0PARAhC9AJ4rwoZJfegWReU+S5cenabnKOhDhQCgp2yA
> sKE5xIBugzsYFhEvKmjE+Qg=
> =jLc4
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--UTF-8-woes-tf3688315.html#a10372401
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: getting error when i m trying to run webapp

2007-05-08 Thread Antonio Petrelli

2007/5/8, Dave Newton <[EMAIL PROTECTED]>:


--- ÍõÐü <[EMAIL PROTECTED]> wrote:
> Unable to find 'display' forward.

Unable to fix problem.



Unable to stop laughing :-)


RE: how to disable refresh button and back button

2007-05-08 Thread Al Sutton
I think I know what the guy is after and it's not browser dependant or
impossible, but it's not pretty :).

Basically what you have to do is have a one time ID that changes during each
request and then verify that the requests one time ID is correct. So the
flow looks like this;

1) Create new One Time ID (I'll call it otid)
2) Store otid in the users session
3) Append otid as a parameter to the links to the actions you wish to
protect.

(user then clicks on link).

4) Verify otid from url parameter equals otid from session.
5) Go to step 1

This means that if the user clicks refresh or back they will request the
action with an old one time id and thus the system can generate an error at
step 4.

As I said, it's not pretty.

Al.


-Original Message-
From: Adam Ruggles [mailto:[EMAIL PROTECTED] 
Sent: 08 May 2007 06:38
To: Struts Users Mailing List
Subject: Re: how to disable refresh button and back button

I don't believe you can.

jalal udeen wrote:
> hi all
>can any one explain me how to disable both back 
> button and  refresh button thanks jalaludeen
>


-
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: getting error when i m trying to run webapp

2007-05-08 Thread Dave Newton
--- ÍõÐü <[EMAIL PROTECTED]> wrote:
> Unable to find 'display' forward.

Unable to fix problem.

(We need more information to be able to help.)

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: FileName characters.

2007-05-08 Thread Antonio Petrelli

2007/5/8, Kapil Sharma <[EMAIL PROTECTED]>:


2.

The attachment dialog box shows correct filename.
Also saving the file to my local disk also is correct

But when i try to open the file directly on clik of "open" button from
dialog box, the name is %xx




I see, but does the program that you use to open the file work correctly? If
yes I suppose you don't have to worry :-)


3.


>>fileName = new String(fileName.getBytes("ISO-8859-1"), "UTF-8");

I have done my jsp page  encoding as UTF-8 but i suppose my JVM or server
specific encoding is ISO-8859-1


I need to do  String = new String(String.getBytes("ISO-8859-1"), "UTF-8");

before storing anything to the oracle database
otherwise it appears junk whenever i try to get it on the screen




The String class is encoding-independent, so maybe it is a problem of
correspondence between your JSP page header and the "meta" tag.
You have to set both:

<[EMAIL PROTECTED] pageEncoding="UTF-8"%>

and:



 

HTH
Antonio


Re: disable back button

2007-05-08 Thread Antonio Petrelli

2007/5/8, Laurie Harper <[EMAIL PROTECTED]>:


jalal udeen wrote:
> how to disable back button

Unplug the mouse... ;-)




Or paint an X on the back button on your monitor :-P
Anyway, if you google "disable back button" in google, you can find what you
need (or what you don't expect :-) )

Antonio


Re: disable back button

2007-05-08 Thread Laurie Harper

jalal udeen wrote:

how to disable back button


Unplug the mouse... ;-)

L.


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



RE: FileName characters.

2007-05-08 Thread Kapil Sharma

1.

My
browser is IE 6.0
and
OS is windows 2000 professional


2.

The attachment dialog box shows correct filename.
Also saving the file to my local disk also is correct

But when i try to open the file directly on clik of "open" button from
dialog box, the name is %xx

3.

>>fileName = new String(fileName.getBytes("ISO-8859-1"), "UTF-8");

I have done my jsp page  encoding as UTF-8 but i suppose my JVM or server
specific encoding is ISO-8859-1

I need to do  String = new String(String.getBytes("ISO-8859-1"), "UTF-8");
before storing anything to the oracle database
otherwise it appears junk whenever i try to get it on the screen




Thanks and Regards,
Kapil Sharma
IAP Company Ltd.


-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 4:21 PM
To: Struts Users Mailing List
Subject: Re: FileName characters.


2007/5/8, Kapil Sharma <[EMAIL PROTECTED]>:
>
> Hii
>
> I am using struts, jboss 4.0.1 and downloading file from the JSP as an
> atachment..
>
> My file has japanese and chinese characters...
>
> The problem is that when i m directly opening this file on the fly from
> the
> Dialog box by clicking on the open button, it is showing me some
> characters
> like %3s or something like.



Do you mean in the browser?
The %xx characters are special characters encoded for URLs.
By the way, what's your browser/operating system?


These characters are appearing file on the dialog box and also saving the
> file is OK but i don't know why they get something like while opening on
> the
> fly



Sorry, I can't understand. The opened file has the correct filename or not?
And the saved file?



> try {
>
> fileName = new String(fileName.getBytes("ISO-8859-1"), "UTF-8");



Why do you get bytes as ISO-8859-1 and reencode them as UTF-8? It does not
make sense!

Antonio



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



Re: FileName characters.

2007-05-08 Thread Antonio Petrelli

2007/5/8, Kapil Sharma <[EMAIL PROTECTED]>:


Hii

I am using struts, jboss 4.0.1 and downloading file from the JSP as an
atachment..

My file has japanese and chinese characters...

The problem is that when i m directly opening this file on the fly from
the
Dialog box by clicking on the open button, it is showing me some
characters
like %3s or something like.




Do you mean in the browser?
The %xx characters are special characters encoded for URLs.
By the way, what's your browser/operating system?


These characters are appearing file on the dialog box and also saving the

file is OK but i don't know why they get something like while opening on
the
fly




Sorry, I can't understand. The opened file has the correct filename or not?
And the saved file?




try {

fileName = new String(fileName.getBytes("ISO-8859-1"), "UTF-8");




Why do you get bytes as ISO-8859-1 and reencode them as UTF-8? It does not
make sense!

Antonio