Re: Struts2 with AJAX file upload??

2006-12-15 Thread Nagraj Rao

well i had this tag in my struts-config.xml after all the acion mappings
multipartClass="net.kencochrane.upload.ExtendedMultiPartRequestHandler" />


Do i need to override the fileupload interceptor in this case??

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

To: "Struts Users Mailing List" 
Sent: Saturday, December 16, 2006 12:22 AM
Subject: Re: Struts2 with AJAX file upload??



What do you mean by trying to find controller tags in struts.xml?  How
do you have it implemented in Struts 1?

Don

On 12/15/06, Nagraj Rao <[EMAIL PROTECTED]> wrote:

Hi guys

I want to implement AJAX file upload in Struts2. tried searching over on 
the net, but couldn't find much. I have an AJAX based file uploader 
working in Struts1.x but i'm not able to migrate it to Struts2 due to 
some uncommon controller mappings (such as i'm not finding any conroller 
tags to be placed inside my struts.xml).


Needed some pointers for the same. Please help. Any suggestions will be 
appreciated.


regards,
Nagraj



-
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 : Request found null with Multipart enc-type

2006-12-15 Thread Nagraj Rao
Exactly i'm letting S2 populate the fields thru setters in my action. I've 
not specified any interceptor in my action mappings, hope it'll take the 
default-stack which has the file upload interceptor reference in it.



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

To: "Struts Users Mailing List" 
Sent: Saturday, December 16, 2006 12:21 AM
Subject: Re: Struts2 : Request found null with Multipart enc-type



How are you accessing form fields?  Are you letting Struts 2 populate
setters in your actions or are you extracting them yourself?  Also,
check that the interceptor stack you are using has the
fileuploadinterceptor.

Don

On 12/15/06, Nagraj Rao <[EMAIL PROTECTED]> wrote:

Hi all

I'm facing a peculiar problem with one of my forms in Struts2. Whenever I 
submit the form uaing enc-type as multipart/form-data for file uploads, 
i'm unable to get any of the form fields in my action. If i remove the 
file widgets and enc-type attribute, i'm able to get all the form fields 
properly.


I've searched a lot on this but in vain. I could find a same problem in 
the link http://www.junlu.com/msg/309344.html. But with this guy is 
facing it with Struts1.x. Also no replies are found to it.


Kindly let me know if i've missed anything. Please do help. Also any 
suggestions or pointers to the same would be welcome.


regards,
Nagraj



-
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] autocompleter, predefining initial value

2006-12-15 Thread Musachy Barroso
The initial value can be set with "value" if you are setting the options 
with "list". If the values are loaded dynamically, then the initial 
value cannot be set, this is something that could be done, but I wasn't 
sure that it was a good idea, cause maybe the value was not one of the 
possible options loaded later. The problem with the values not being 
reloaded, definitely a bug. I logged all this on this ticket:


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

please add there anything else that you find

regards
musachy

Dariusz Wojtas wrote:

Hi,

I am using Struts 2.0.2, trunk.

I have an action (/listy/kodyPocztowe) that returns postal codes [id, 
name]
and another action that server a form (form points to the same action 
back).


How to define the initial value in the autocompleter field?
Even if I submit the form and it reloads with the same action, the
autocompleter does not display previously selected option.

I tried to use a javascript  (shown below) to debug it (print field 
names).

When an alert shows, in place of autocompleter I can see plain
textfield with resubmitted values (as expected), after alert messages
do finish it is replaced by the autocompleter widget - empty value,
nothing selected. the widget is loaded with options, but none is
selected.

Any hint how to solve this mistery?
What am I missing?



 function filterKodPocztowy(field) {
   alert(field.name);
return field.name == "kodPocztowy";
 }



  [...]
  
  
  [...]

  



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



Re: internationalization in struts

2006-12-15 Thread Chris Pratt

Looking at your structure above it appears that you have two subdirectories
of WEB-INF, classes (which is automatically on the classpath) and resources
(which is not on the classpath).  If you move the resources directory under
the classes directory it should work.
 (*Chris*)

On 12/12/06, Kranti Parisa <[EMAIL PROTECTED]> wrote:


I Have the following Strcture

WEB-INF
 - classes
  -com
 -login
 - resources
 - application.properties
 - application_fr.properties

which means resources folder is there in WEB-INF and is seperated from the
com.login package containing java code

should  work??


On 12/13/06, Gary Feidt <[EMAIL PROTECTED]> wrote:
>
> What is you package name?  I have an app that called cmo.resources and
> would use the following:
>
> 
>
> Gary
>
>
> >>> [EMAIL PROTECTED] 12/12/2006 11:38 AM >>>
> Hi,
>
> i am working on internationalization in struts.
>
> for this i did the following
>
> 1) WEB-INF/classes/resources folder defined all the files
> example : application.properties, application_fr.properties ..etc
>
> 2) in each file defined the labels
> example
> label.firstname=First Name
>
> 3) in struts-config.xml file defined the following
> 
>
> 4) when user successfully logs in setting the Globals.LOCALE_KEY into
> session with user specific locale
>
> 5) in jsp
> 
>
> i suppose the above steps should work.
> but its displaying null and when i do 
> then its printing it as ???label.firstname???
>
> which is nothing but null.
>
> Please do suggest/help me for this.
>
> Regards
> Kranti
> ___
>
> Confidentiality Statement:
> This email/fax, including attachments, may include confidential
> and/or proprietary information and may be used only by the
> person or entity to which it is addressed. If the reader of
> this email/fax is not the intended recipient or his or her
> agent, the reader is hereby notified that any dissemination,
> distribution or copying of this email/fax is prohibited. If you
> have received this email/fax in error, please notify the sender
> by replying to this message and deleting this email or
> destroying this facsimile immediately.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
--
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738




Re: Preprocessing of request

2006-12-15 Thread Ed Griebel

On 12/15/06, Anil Kumar T <[EMAIL PROTECTED]> wrote:



Hi ...

Thanks to Ed and Frank for explaining this.. I understand it. One more
question was .. is there a way to avoid mandatory calling it in all the
sub actions, instead the call should happen automatically.

For Ex : I believe ..
when we instantiate a sub class by saying
 SubClass subcls = new SubClass();,
the base class constructor is called and then the sub class constructor
is called (hope am correct). Some thing like this am looking at method
level. I think am moving out of struts and getting into the concepts
etc..



Use Frank's suggestion of  declaring  execute() in the base action  (I would
also declare it final so it can't be extended) and then define 'public
abstract ActionForward realExecute(ActionForm form, ...)' which is called by
the base action's execute() method. Since it's declared abstract, any class
extending the base action MUST define the method.

Coming to the actual point. I want to have the user name to be available

in all the action class instances with less effort. During the login
time I can get it from DB and then put it in session. And then in all
the actions I need the user name/id for my processing. So as of now am
getting the user name from session in all the actions. But looking for a
better handling



This is what I usually do, if it's just a user name it's not that big to
worry about storing it in the session. There can even be a method in the
base class, "protected String getUserName() { ... }". You could also pass it
as a cookie to the browser, but unless you encrypt it, someone could just
change their cookie to a different user id. Browsers don't have any access
to session variables and don't have to get sent back and forth to the
client.

-ed

Any thoughts on this point.?


Thanks & regards,
Anil.


-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 14, 2006 9:03 PM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Re: Preprocessing of request

I'm glad Ed replied because I missed your reply Anil... I wasn't
ignoring
you :)

Ed covered it well... when I do this, I tend to do it slightly
different... I write an Action that has an extra empty method,
realExecute()... execute() calls realExecute(), and any "common" code,
like your transformation logic, is in execute()... then I extent this
class to create the Actions for my application, I override
realExecute(),
and that's that.  Same basic concept, just a slightly different
structure.

Still saying filter though :)

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Thu, December 14, 2006 9:59 am, Ed Griebel wrote:
> You would define a base action that extends
> org.apache.struts.action.Action and includes a method execute() or
> maybe a helper method doSetup().
>
> Your action classes would then extend this BaseAction class and then
> one of the first things you would do in execute() would be to call
> super.execute() or super.doSetup().
>
> But, like Frank said, it would be better to decouple your logic from
> Struts by implementing a servlet filter which will work regardless if
> using struts 1.2, 1.3, 2.0, or just plain old servlets+JSPs.
>
> HTH,
> -ed
>
> On 12/14/06, Anil Kumar T <[EMAIL PROTECTED]> wrote:
>>
>> Hi Frank,
>>
>> Referring to your response..
>> you might also be able
>> to have a base Action that all your Actions extend from, and the base
>> action does the transformation before the real work happens.  This
might
>> work if you don't need the transformation to happen before that
point.
>>
>> How does this works ? Theoretically I understand this, but how to
>> implement this? I mean where do we mention our CustomizedBaseAction
>> class name? some where in properties ? Can you tell me..?
>>
>> Anil.
>>
>>
>>
>> -Original Message-
>> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, December 13, 2006 1:03 AM
>> To: Struts Users Mailing List
>> Cc: 'user@struts.apache.org'
>> Subject: Re: Preprocessing of request
>>
>> Your best bet most likely is a servlet filter.  Do the transformation
>> and
>> stuff the transformed content in request as an attribute, then grab
it
>> later in your Actions.
>>
>> Which version of Struts are you using?  If pre-1.3, modifying the RP
is
>> one of the few other options as Dave mentioned... you might also be
able
>> to have a base Action that all your Actions extend from, and the base
>> action does the transformation before the real work happens.  This
might
>> work if you don't need the transformation to happen before that
point.
>>
>> If using 1.3.x, you could write a command to do it and modify

[S2] autocompleter, predefining initial value

2006-12-15 Thread Dariusz Wojtas

Hi,

I am using Struts 2.0.2, trunk.

I have an action (/listy/kodyPocztowe) that returns postal codes [id, name]
and another action that server a form (form points to the same action back).

How to define the initial value in the autocompleter field?
Even if I submit the form and it reloads with the same action, the
autocompleter does not display previously selected option.

I tried to use a javascript  (shown below) to debug it (print field names).
When an alert shows, in place of autocompleter I can see plain
textfield with resubmitted values (as expected), after alert messages
do finish it is replaced by the autocompleter widget - empty value,
nothing selected. the widget is loaded with options, but none is
selected.

Any hint how to solve this mistery?
What am I missing?



 function filterKodPocztowy(field) {
   alert(field.name);
return field.name == "kodPocztowy";
 }



  [...]
  
  
  [...]

  


Re: struts action servlet interaction with jsp files

2006-12-15 Thread Frank W. Zammetti
Note however that there is no JSTL equivalent for most of the Struts 
HTML taglib... the Struts HTML tags are Struts-aware, i.e., will 
automatically pull data from your form beans to populate the fields... 
JSTL can't do that automatically.


Aside from the HTML taglib, Laurie is of course right, you'll find JSTL 
pretty well provides what the other Struts taglibs do, and more.


Frank

Laurie Harper wrote:
Simply put, the Struts tags pre-date JSTL. The JSTL tags provide 
equivalent functionality in many areas and more besides. Since they are 
a standard and more complete solution than the equivalent Struts tags, 
their use is recommended.


The Struts tags have been kept for backwards compatibility and for those 
who are unable to adopt JSTL.


HTH,

L.

Rick Schumeyer wrote:
Can I ask, what is the reason for avoiding the Struts tags and using 
the JSTL tags?  (It begs the question, what is the purpose of the 
struts tags?)


Wendy Smoak wrote:
On 12/9/06, Fabio Miranda Hamburger <[EMAIL PROTECTED]> 
wrote:


How can I 'send' this array from fooBarStrutsAction.java, and its 
method:

public ActionForward execute(...) TO a jsp file, let's say display.jsp?
and by the way, how to access that array within the JSP file.

I think I am missing a crucial concept here, thanks for clarify this.


In your action,
  request.setAttribute( "myArray", myArray );

In your JSP use JSTL's  tag to display the values.

(The Struts  tag can be used instead.  While we
recommend JSTL over the equivalent Struts tags, you might want to keep
things simple at first and avoid introducing another library.)




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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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



Re: Validation rule writing

2006-12-15 Thread Laurie Harper

What Chris said, plus this:

  there's no validation rule named 'areaCodeMask' or 'phoneMask'; you want 
just 'mask' as the rule name. See the validator documentation for examples.


Also, is validation working at all for you? For example, is it correctly 
detecting errors for the properties you have marked with just the 
'required' rule? If not, start by figuring that out, then worry about 
getting your masks applied correctly.


L.

Thom Burnett wrote:

I'm trying to validate two fields - area code and phone number (as nnn-
no areacode in that input).

Various samples and reading suggest that I should be able to create a mask
and apply it as below but my result is that the area code can't be empty 
but

it can contain letters, be longer than 3. It's ignoring my regular
expression mask.

Am I missing something simple in how to setup and use the 
validations.xml or

am I going about this in the wrong way?




 

  phoneFormatMask
  ^[0-9]{3}-[0-9]{4}$


  areaCodeFormatMask
  ^[0-9]{3}$

 
 
   
   
 

  
  

  
  

  
  

 
  
areaCodeMask
${areaCodeFormatMask}
  
  
  
 
 
   phoneMask
   ${phoneFormatMask}
 
  








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



Re: struts action servlet interaction with jsp files

2006-12-15 Thread Laurie Harper
Simply put, the Struts tags pre-date JSTL. The JSTL tags provide 
equivalent functionality in many areas and more besides. Since they are 
a standard and more complete solution than the equivalent Struts tags, 
their use is recommended.


The Struts tags have been kept for backwards compatibility and for those 
who are unable to adopt JSTL.


HTH,

L.

Rick Schumeyer wrote:
Can I ask, what is the reason for avoiding the Struts tags and using the 
JSTL tags?  (It begs the question, what is the purpose of the struts tags?)


Wendy Smoak wrote:
On 12/9/06, Fabio Miranda Hamburger <[EMAIL PROTECTED]> 
wrote:


How can I 'send' this array from fooBarStrutsAction.java, and its 
method:

public ActionForward execute(...) TO a jsp file, let's say display.jsp?
and by the way, how to access that array within the JSP file.

I think I am missing a crucial concept here, thanks for clarify this.


In your action,
  request.setAttribute( "myArray", myArray );

In your JSP use JSTL's  tag to display the values.

(The Struts  tag can be used instead.  While we
recommend JSTL over the equivalent Struts tags, you might want to keep
things simple at first and avoid introducing another library.)




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



Re: Formbean information lost

2006-12-15 Thread Laurie Harper

Thomas Thomas wrote:

Hi,

If I fill my form with, for example, "xyz" as login,
and if there is an error,
"xyz" will stay in the textfield,
(for some reason, as additional question if u can say me why that happen,
would be great)


It's a function of the design of Struts. When you form is submitted, 
Struts automatically populates your form bean. When you forward back to 
your input page, the values in the form bean are used to populate the 
form fields. Hence, the user's input is preserved and redisplayed.



That's perfect, BUT

I don't have this behaviour with mytags for the day and
month of his birth date.

For example if user enters day 31 and month February (which is invalid) and
submits,
there will appear 1 January and an error text under it:
date invalid (that can lead to confusion since 1 January is valid) => the
day 31 and month February is lost,
so I have not the same behavior than with my login => if there is error ,
the login he entered is displayed again.
I hope I was clear.


It's not clear to me what's going on with the date fields. What does 
your form bean look like? How's it configured in struts-config.xml? 
Assuming you have two form bean properties (one for day and one for 
month), they should retain the values entered unless you are doing 
something to change them.


Try posting the relevant parts of your code and configuration if you 
still need help with this.


L.


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



RE: S2 with eclipse/WTP

2006-12-15 Thread Wesley Wannemacher
I did things the easy way and just imported struts2-blank-2.0.1.war as a
dynamic web project. This has worked fine in
wtp-all-in-one-sdk-R-1.5.1-200609230508-win32.zip. 

-Wes 

> -Original Message-
> From: Rick Schumeyer [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 15, 2006 1:32 PM
> To: Struts Users Mailing List
> Subject: S2 with eclipse/WTP
> 
> I would like to learn S2 while using the eclipse/WTP IDE.  I 
> currently 
> use eclipse/WTP for a struts 1.3 project.  But the way I 
> constructed the 
> eclipse project was a bit of a pain.
> 
> In reviewing the list archives, it looks like there is an easy way to 
> generate a blank template for an S2 project with eclipse/WTP 
> using maven.
> 
> The problem is, I don't really understand the process.  It 
> seems to have 
> something to do with the S2 source tree (which I have) a pom 
> file, and 
> typing "mvn eclipse:eclipse".  I tried that and I'm not 
> really sure what 
> it did.
> 
> I'm sure maven is a wonderful tool, but I'm hoping to avoid learning 
> much about it right now.  Perhaps I'm lazy, but I'm still trying to 
> learn more about struts, jsp, servlets, hibernate, eclipse, 
> ant, etc.  
> So is there an idiot-proof way for me to generate an eclipse/WTP/S2 
> project?
> 
> -
> 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: forward request to struts action on other server

2006-12-15 Thread Laurie Harper

bramsomers wrote:

Hi all,

I have two servers, each running the sun appliction server (9.0). I've build
a webapplication, and know I want to forward requests from the first to the
second application server.


You can't forward a request between two separate applications, whether 
they be deployed on the same or different containers. You will need to 
use a redirect instead.



In my LoginAction on the first server I put this in the code:

return new ActionForward("http://"; + server.getUrl() +
":8080/project/Login.do", false);

put that gives me the error:
java.lang.IllegalArgumentException: Path
http://192.168.1.135:8080/project/Login.do does not start with a "/"
character

I don't know what I do wrong, does anybody know a way to do this?


Setting the second argument to 'true' instead of 'false' may work. 
Failing that, you'll need to manually perform a redirect.



It need to be forwarded, so that the action on the other server can access
the parameters in the form.


Unfortunately, as noted above, that's not possible. You do have some 
options, though; see below:



Thanks a lot!

Ps: if it's not possible like I explained here above, is there any other
solution to do this?


If you don't need to process the form on server1 before forwarding 
(redirecting) to server2, you could have the form submit directly to 
server2. That's probably the easiest solution if it works for you.


Failing that, the only thing you can do is to construct the request to 
server2 in such a way as to include the form data. If there's not much 
data, you may be able to build a query string to append to your redirect 
URL; otherwise, it gets trickier since you'll have to construct and send 
a POST request to server2. In that case, server1 ends up having to proxy 
the request/response, which is messy.


You may want to restate your question in terms of what you are trying to 
achieve, as there may be an alternative approach that would work better.


L.


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



Re: S2 with eclipse/WTP

2006-12-15 Thread Don Brown

If you want to use the Web Tools Project, you might find this useful:
http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html

Basically, add a flag to tell the Maven 2 plugin to generate wtp files like so:

mvn -Dwtpversion=1.0 eclipse:eclipse

Don

On 12/15/06, Dariusz Wojtas <[EMAIL PROTECTED]> wrote:

I also use eclipse with S2 with no problem, and 'mvn eclipse:eclipse'
works as it should.
I repeated it also today on fresh source tree.

1) define Maven repository (for referencing JAR files)
  Window --> Preferences --> Java --> Build Path --> ClassPath Variables
Define variable
  M2_REPO
with value pointing to your repository, in my case:
  c:/Documents and Settings/Darek/.m2/repository

2)
After this command, just open eclipse, menu
   File --> Import --> Existin Projects into Workspace

Root Directory: path to your Struts2 root.
Button "Browse" and you get list of Struts projects (api, core, plugins)


Works great.
I only had 1 problem, when using maven to build JAR files of struts.
By default eclipse is pointed to compile code into the same
directories as maven, and maven was somehw confused with that -
caching issues.
You may change the eclipse build path by:
  clicking on the project preferences, Java Build Path, Default Output Folder.
Just specify some other directory.
Now it seems to work.

Side note
From time to time my struts 2 compilation in maven only works if I
fetch xwork sources into the same parent dir as struts2.

Dariusz Wojtas


On 12/15/06, Rick Schumeyer <[EMAIL PROTECTED]> wrote:
> I would like to learn S2 while using the eclipse/WTP IDE.  I currently
> use eclipse/WTP for a struts 1.3 project.  But the way I constructed the
> eclipse project was a bit of a pain.
>
> In reviewing the list archives, it looks like there is an easy way to
> generate a blank template for an S2 project with eclipse/WTP using maven.
>
> The problem is, I don't really understand the process.  It seems to have
> something to do with the S2 source tree (which I have) a pom file, and
> typing "mvn eclipse:eclipse".  I tried that and I'm not really sure what
> it did.
>
> I'm sure maven is a wonderful tool, but I'm hoping to avoid learning
> much about it right now.  Perhaps I'm lazy, but I'm still trying to
> learn more about struts, jsp, servlets, hibernate, eclipse, ant, etc.
> So is there an idiot-proof way for me to generate an eclipse/WTP/S2
> project?

-
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 with AJAX file upload??

2006-12-15 Thread Don Brown

What do you mean by trying to find controller tags in struts.xml?  How
do you have it implemented in Struts 1?

Don

On 12/15/06, Nagraj Rao <[EMAIL PROTECTED]> wrote:

Hi guys

I want to implement AJAX file upload in Struts2. tried searching over on the 
net, but couldn't find much. I have an AJAX based file uploader working in 
Struts1.x but i'm not able to migrate it to Struts2 due to some uncommon 
controller mappings (such as i'm not finding any conroller tags to be placed 
inside my struts.xml).

Needed some pointers for the same. Please help. Any suggestions will be 
appreciated.

regards,
Nagraj



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



Re: Struts2 : Request found null with Multipart enc-type

2006-12-15 Thread Don Brown

How are you accessing form fields?  Are you letting Struts 2 populate
setters in your actions or are you extracting them yourself?  Also,
check that the interceptor stack you are using has the
fileuploadinterceptor.

Don

On 12/15/06, Nagraj Rao <[EMAIL PROTECTED]> wrote:

Hi all

I'm facing a peculiar problem with one of my forms in Struts2. Whenever I 
submit the form uaing enc-type as multipart/form-data for file uploads, i'm 
unable to get any of the form fields in my action. If i remove the file widgets 
and enc-type attribute, i'm able to get all the form fields properly.

I've searched a lot on this but in vain. I could find a same problem in the 
link http://www.junlu.com/msg/309344.html. But with this guy is facing it with 
Struts1.x. Also no replies are found to it.

Kindly let me know if i've missed anything. Please do help. Also any 
suggestions or pointers to the same would be welcome.

regards,
Nagraj



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



Re: S2 with eclipse/WTP

2006-12-15 Thread Dariusz Wojtas

I also use eclipse with S2 with no problem, and 'mvn eclipse:eclipse'
works as it should.
I repeated it also today on fresh source tree.

1) define Maven repository (for referencing JAR files)
 Window --> Preferences --> Java --> Build Path --> ClassPath Variables
Define variable
 M2_REPO
with value pointing to your repository, in my case:
 c:/Documents and Settings/Darek/.m2/repository

2)
After this command, just open eclipse, menu
  File --> Import --> Existin Projects into Workspace

Root Directory: path to your Struts2 root.
Button "Browse" and you get list of Struts projects (api, core, plugins)


Works great.
I only had 1 problem, when using maven to build JAR files of struts.
By default eclipse is pointed to compile code into the same
directories as maven, and maven was somehw confused with that -
caching issues.
You may change the eclipse build path by:
 clicking on the project preferences, Java Build Path, Default Output Folder.
Just specify some other directory.
Now it seems to work.

Side note

From time to time my struts 2 compilation in maven only works if I

fetch xwork sources into the same parent dir as struts2.

Dariusz Wojtas


On 12/15/06, Rick Schumeyer <[EMAIL PROTECTED]> wrote:

I would like to learn S2 while using the eclipse/WTP IDE.  I currently
use eclipse/WTP for a struts 1.3 project.  But the way I constructed the
eclipse project was a bit of a pain.

In reviewing the list archives, it looks like there is an easy way to
generate a blank template for an S2 project with eclipse/WTP using maven.

The problem is, I don't really understand the process.  It seems to have
something to do with the S2 source tree (which I have) a pom file, and
typing "mvn eclipse:eclipse".  I tried that and I'm not really sure what
it did.

I'm sure maven is a wonderful tool, but I'm hoping to avoid learning
much about it right now.  Perhaps I'm lazy, but I'm still trying to
learn more about struts, jsp, servlets, hibernate, eclipse, ant, etc.
So is there an idiot-proof way for me to generate an eclipse/WTP/S2
project?


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



S2 with eclipse/WTP

2006-12-15 Thread Rick Schumeyer
I would like to learn S2 while using the eclipse/WTP IDE.  I currently 
use eclipse/WTP for a struts 1.3 project.  But the way I constructed the 
eclipse project was a bit of a pain.


In reviewing the list archives, it looks like there is an easy way to 
generate a blank template for an S2 project with eclipse/WTP using maven.


The problem is, I don't really understand the process.  It seems to have 
something to do with the S2 source tree (which I have) a pom file, and 
typing "mvn eclipse:eclipse".  I tried that and I'm not really sure what 
it did.


I'm sure maven is a wonderful tool, but I'm hoping to avoid learning 
much about it right now.  Perhaps I'm lazy, but I'm still trying to 
learn more about struts, jsp, servlets, hibernate, eclipse, ant, etc.  
So is there an idiot-proof way for me to generate an eclipse/WTP/S2 
project?


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



Re: Validation rule writing

2006-12-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thom,

Thom Burnett wrote:
> I'm trying to validate two fields - area code and phone number (as nnn-
> no areacode in that input).
>
> [snip]
>
>   phoneFormatMask
>   ^[0-9]{3}-[0-9]{4}$

This regexp looks good. Have you checked the docs for the regexp engine
used by the validator (is it Jakarta-ORO?) to make sure that the syntax
you are using is correct? You may have to use [0-9][0-9][0-9] instead of
[0-9]{3}, for instance.

>  
>phoneMask
>${phoneFormatMask}
>  

Have you tried putting the mask directly into the  element?
This would help you verify that your mask is working, even if your
configuration isn't 100% correct (i.e. the use of the 'constant' fields
might not be working).

Hope that helps,
- -chris

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

iD8DBQFFgtQE9CaO5/Lv0PARAu/yAKCMR7YwcuX+BBQ+/D7DX/e04dS+0QCeLlSz
9/TG4qqBX7xgXJW8YKPKX68=
=L1kC
-END PGP SIGNATURE-

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



RE: help in basic struts application

2006-12-15 Thread Scott Purcell
I believe first off you may want to consider whether to dig into struts
1.x or struts 2.x. If your are just creating a super simple app, you may
just want model1 with jsp.

If this will grow into something larger, you may need to get better
spec, and post question again. Keeping in minds things like templating,
dao, business layer.

Struts in Action would get you running with struts 1.x in no time at
all.

Scott

-Original Message-
From: ajay ajay [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 15, 2006 10:16 AM
To: user@struts.apache.org
Subject: help in basic struts application

Hi...

i am new to struts... i need some help

i am developing a sample basic application in
struts.in that application i have two web
pageson one page there are some check boxes..user
will select one or more or all check boxes...i want to
display values of all  selected check boxes on second
page...


please guide ..how to do that

Thank you
with regards



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



help in basic struts application

2006-12-15 Thread ajay ajay
Hi...

i am new to struts... i need some help

i am developing a sample basic application in
struts.in that application i have two web
pageson one page there are some check boxes..user
will select one or more or all check boxes...i want to
display values of all  selected check boxes on second
page...


please guide ..how to do that

Thank you
with regards



__
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: S2 - customize tabs

2006-12-15 Thread walidito

OK thanks,
does anyone has already written a css for struts-2-like tags :


It would be great.

thanks,
walid.


Don Brown wrote:
> 
> You should be able to just provide your own css styling for the tags
> in your usual css file.
> 
> Don
> 
> On 12/14/06, walidito <[EMAIL PROTECTED]> wrote:
>>
>> Does anyone know what is the simplest way to customize the tabpanel and
>> tab.
>> I think this is related to some css but but I'm not sure about the exact
>> path of those css.
>> thanks
>>
>> --
>> View this message in context:
>> http://www.nabble.com/S2---customize-tabs-tf2823006.html#a7879655
>> 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/S2---customize-tabs-tf2823006.html#a7894032
Sent from the Struts - User mailing list archive at Nabble.com.


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



Validation rule writing

2006-12-15 Thread Thom Burnett

I'm trying to validate two fields - area code and phone number (as nnn-
no areacode in that input).

Various samples and reading suggest that I should be able to create a mask
and apply it as below but my result is that the area code can't be empty but
it can contain letters, be longer than 3. It's ignoring my regular
expression mask.

Am I missing something simple in how to setup and use the validations.xml or
am I going about this in the wrong way?




 

  phoneFormatMask
  ^[0-9]{3}-[0-9]{4}$


  areaCodeFormatMask
  ^[0-9]{3}$

 
 
   
   
 

  
  

  
  

  
  

 
  
areaCodeMask
${areaCodeFormatMask}
  
  
  
 
 
   phoneMask
   ${phoneFormatMask}
 
  
...





Re: redirect or forward from method

2006-12-15 Thread Stanislav
Tnx Chris, your answer is very helpfull :-)


From: Christopher Schultz <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Subject: Re: redirect or forward from method
Date: Fri, 15 Dec 2006 09:16:24 -0500

- Original Message Follows -
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Stan,
> 
> Stanislav wrote:
> > I'm using Strus and this is my problem. I have this method A which
> > have input and outpur parameters. There is try/catch block in method
> > A that capture Exceptions. I want to redirect or forward to jsp page
> > B from method A when some error is happend and NOT to return to class
> > C from which method A is invoked. Is this possible to achieve?
> 
> The best way to direct Struts to another location is to return the
> appropriate ActionForward from your Action's execute() method.
> 
> Since you are using another method ("method A") to do your work, this is
> not possible directly (that is, you cannot "return" a value from "method
> A" and have it skip further processing in your action class). This just
> isn't now Java (or any other programming language, really) works.
> 
> What you /can/ do is let the exception from "method A" propagate all the
> way back up into your action code, and catch it /there/ instead. Like this:
> 
> public ActionForward execute(...) throws Exception
> {
>.
>.
>.
>try {
>  .
>  .
>  methodA();
>  .
>  .
>  .
>} catch (SomeException e)
>{
>   return mapping.findForward("method-a-error");
>}
> }
> 
> If it is inappropriate to allow SomeException to propagate from "method
> A" back into the action code, then consider wrapping that exception in
> something else, like MethodAException:
> 
> public void methodA(...)
> {
>.
>.
>.
>catch(SomeException e) {
>  throw new MethodAException("Method A failed", e);
>}
> }
> 
> and in your action code, catch MethodAException instead of SomeException.
> 
> Don't forget that your Action is really the place where decisions about
> control flow need to be made... helper methods can accomplish other
> tasks of help the Action make decisions, but ultimately, it's the
> Action's responsibility to control the flow.
> 
> Hope that helps,
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFgq449CaO5/Lv0PARAnDtAKC1rPl0ZmvCW3EnqrAW/qxq+wrQ0gCfWJgi
> ra0kGCKdGxz7BZASiiTZmOY=
> =Fp9O
> -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: redirect or forward from method

2006-12-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stan,

Stanislav wrote:
> I'm using Strus and this is my problem. I have this method A which
> have input and outpur parameters. There is try/catch block in method
> A that capture Exceptions. I want to redirect or forward to jsp page
> B from method A when some error is happend and NOT to return to class
> C from which method A is invoked. Is this possible to achieve?

The best way to direct Struts to another location is to return the
appropriate ActionForward from your Action's execute() method.

Since you are using another method ("method A") to do your work, this is
not possible directly (that is, you cannot "return" a value from "method
A" and have it skip further processing in your action class). This just
isn't now Java (or any other programming language, really) works.

What you /can/ do is let the exception from "method A" propagate all the
way back up into your action code, and catch it /there/ instead. Like this:

public ActionForward execute(...) throws Exception
{
   .
   .
   .
   try {
 .
 .
 methodA();
 .
 .
 .
   } catch (SomeException e)
   {
  return mapping.findForward("method-a-error");
   }
}

If it is inappropriate to allow SomeException to propagate from "method
A" back into the action code, then consider wrapping that exception in
something else, like MethodAException:

public void methodA(...)
{
   .
   .
   .
   catch(SomeException e) {
 throw new MethodAException("Method A failed", e);
   }
}

and in your action code, catch MethodAException instead of SomeException.

Don't forget that your Action is really the place where decisions about
control flow need to be made... helper methods can accomplish other
tasks of help the Action make decisions, but ultimately, it's the
Action's responsibility to control the flow.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFgq449CaO5/Lv0PARAnDtAKC1rPl0ZmvCW3EnqrAW/qxq+wrQ0gCfWJgi
ra0kGCKdGxz7BZASiiTZmOY=
=Fp9O
-END PGP SIGNATURE-

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



Re: comparing two values in validation framework..help?

2006-12-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mallik,

Mallik wrote:
> i have to comparing password and confirm password with validation framework.
> how can i do this let me know please

There is an example of this exact thing in the Struts validator guide:

http://struts.apache.org/1.x/faqs/validator.html

Search for the section titled "Designing Complex Validations with
validwhen".

- -chris

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

iD8DBQFFgqt89CaO5/Lv0PARAr4QAKCb9rHtUeHQPN/N4zmXOx9bZgmyIgCgtc18
avXB3w0Sh1AfaP2xg8sAamA=
=HYLP
-END PGP SIGNATURE-

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



redirect or forward from method

2006-12-15 Thread Stanislav


Hi!

I'm using Strus and this is my problem. I have this method A which have input 
and
outpur parameters.
There is try/catch block in method A that capture Exceptions. I want to 
redirect or
forward to jsp
page B from method A when some error is happend and NOT to return to class C 
from
which method A is
invoked. Is this possible to achieve?


  action class C 
 invoke method A > method A
  have try/catch block
 return values to class C <-if ok
if error --->
redirect/forward to jsp or
some toher class
  and not 
return
anything to
class C

  action class C is struts action class
  method A is method in normal Java class that extends Action class


Tnx :-)

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



Struts2 : Request found null with Multipart enc-type

2006-12-15 Thread Nagraj Rao
Hi all

I'm facing a peculiar problem with one of my forms in Struts2. Whenever I 
submit the form uaing enc-type as multipart/form-data for file uploads, i'm 
unable to get any of the form fields in my action. If i remove the file widgets 
and enc-type attribute, i'm able to get all the form fields properly.

I've searched a lot on this but in vain. I could find a same problem in the 
link http://www.junlu.com/msg/309344.html. But with this guy is facing it with 
Struts1.x. Also no replies are found to it.

Kindly let me know if i've missed anything. Please do help. Also any 
suggestions or pointers to the same would be welcome.

regards,
Nagraj

RE: comparing two values in validation framework..help?

2006-12-15 Thread Thai Dang Vu
You could look at acegisecurity.org (used with Spring).

-Original Message-
From: Mallik [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 15, 2006 2:02 AM
To: user@struts.apache.org
Subject: comparing two values in validation framework..help?


Hi friends
i have to comparing password and confirm password with validation
framework.
how can i do this let me know please

thanks in advance

ur's
Mallik

-- 
View this message in context:
http://www.nabble.com/comparing-two-values-in-validation-framework..help
--tf2825561.html#a7887166
Sent from the Struts - User mailing list archive at Nabble.com.


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




NOTICE: This message (including any attachments) from Momentum Systems, Inc. 
contains information that is PRIVILEGED and CONFIDENTIAL.  If you are not an 
intended recipient, you are hereby notified that any dissemination of this 
message is strictly prohibited.  If you have received this message in error, 
please do not read, copy or forward this message.  Please permanently delete 
all copies and any attachments and notify the sender immediately by reply email 
or by calling our Office at 703.740.9300.

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



Struts2 with AJAX file upload??

2006-12-15 Thread Nagraj Rao
Hi guys

I want to implement AJAX file upload in Struts2. tried searching over on the 
net, but couldn't find much. I have an AJAX based file uploader working in 
Struts1.x but i'm not able to migrate it to Struts2 due to some uncommon 
controller mappings (such as i'm not finding any conroller tags to be placed 
inside my struts.xml). 

Needed some pointers for the same. Please help. Any suggestions will be 
appreciated.

regards,
Nagraj

comparing two values in validation framework..help?

2006-12-15 Thread Mallik

Hi friends
i have to comparing password and confirm password with validation framework.
how can i do this let me know please

thanks in advance

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/comparing-two-values-in-validation-framework..help--tf2825561.html#a7887166
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: Preprocessing of request

2006-12-15 Thread Anil Kumar T

Hi ...

Thanks to Ed and Frank for explaining this.. I understand it. One more
question was .. is there a way to avoid mandatory calling it in all the
sub actions, instead the call should happen automatically.

For Ex : I believe ..
when we instantiate a sub class by saying
 SubClass subcls = new SubClass();,
the base class constructor is called and then the sub class constructor
is called (hope am correct). Some thing like this am looking at method
level. I think am moving out of struts and getting into the concepts
etc..

Coming to the actual point. I want to have the user name to be available
in all the action class instances with less effort. During the login
time I can get it from DB and then put it in session. And then in all
the actions I need the user name/id for my processing. So as of now am
getting the user name from session in all the actions. But looking for a
better handling

Any thoughts on this point.?

Thanks & regards,
Anil.


-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 14, 2006 9:03 PM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Re: Preprocessing of request

I'm glad Ed replied because I missed your reply Anil... I wasn't
ignoring
you :)

Ed covered it well... when I do this, I tend to do it slightly
different... I write an Action that has an extra empty method,
realExecute()... execute() calls realExecute(), and any "common" code,
like your transformation logic, is in execute()... then I extent this
class to create the Actions for my application, I override
realExecute(),
and that's that.  Same basic concept, just a slightly different
structure.

Still saying filter though :)

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Thu, December 14, 2006 9:59 am, Ed Griebel wrote:
> You would define a base action that extends
> org.apache.struts.action.Action and includes a method execute() or
> maybe a helper method doSetup().
>
> Your action classes would then extend this BaseAction class and then
> one of the first things you would do in execute() would be to call
> super.execute() or super.doSetup().
>
> But, like Frank said, it would be better to decouple your logic from
> Struts by implementing a servlet filter which will work regardless if
> using struts 1.2, 1.3, 2.0, or just plain old servlets+JSPs.
>
> HTH,
> -ed
>
> On 12/14/06, Anil Kumar T <[EMAIL PROTECTED]> wrote:
>>
>> Hi Frank,
>>
>> Referring to your response..
>> you might also be able
>> to have a base Action that all your Actions extend from, and the base
>> action does the transformation before the real work happens.  This
might
>> work if you don't need the transformation to happen before that
point.
>>
>> How does this works ? Theoretically I understand this, but how to
>> implement this? I mean where do we mention our CustomizedBaseAction
>> class name? some where in properties ? Can you tell me..?
>>
>> Anil.
>>
>>
>>
>> -Original Message-
>> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, December 13, 2006 1:03 AM
>> To: Struts Users Mailing List
>> Cc: 'user@struts.apache.org'
>> Subject: Re: Preprocessing of request
>>
>> Your best bet most likely is a servlet filter.  Do the transformation
>> and
>> stuff the transformed content in request as an attribute, then grab
it
>> later in your Actions.
>>
>> Which version of Struts are you using?  If pre-1.3, modifying the RP
is
>> one of the few other options as Dave mentioned... you might also be
able
>> to have a base Action that all your Actions extend from, and the base
>> action does the transformation before the real work happens.  This
might
>> work if you don't need the transformation to happen before that
point.
>>
>> If using 1.3.x, you could write a command to do it and modify the RP
>> chain.
>>
>> If 2.x, an interceptor is probably the right answer.
>>
>> However, in all these cases, a servlet filter would work, and would
keep
>> your transformation logic abstracted out of Struts itself, so one
less
>> thing to worry about if you upgrade versions later :)
>>
>> Frank
>>
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>> AIM/Yahoo: fzammetti
>> MSN: [EMAIL PROTECTED]
>> Author of "Practical Ajax Projects With Java Technology"
>>  (2006, Apress, ISBN 1-59059-695-1)
>> Java Web Parts - http://javawebparts.sourceforge.net
>>  Supplying the wheel, so you don't have to reinvent it!
>>
>> On Tue, December 12, 2006 1:17 pm, O'Toole, Joe wrote:
>> > Hi
>> >
>> > My application receieves an xml request. I need to perform some
>> > transformation of this xml before 

Re: [S2] the autocompleter tag - the href value

2006-12-15 Thread Dariusz Wojtas

Works perfectly now.
Most likely maven had issues with the compiling struts2 code into the
same directories as eclipse. After I pointed eclipse to compile into
separate directories - maven started to work as expected.

Thanks for help

Darek


On 12/15/06, Musachy Barroso <[EMAIL PROTECTED]> wrote:

Showcase is working and it has this:



Are you working with head svn? Because it was behaving as you say(wrong)
a few days ago.

musachy


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



[s2] switching locale without an action

2006-12-15 Thread Andrew Stepanenko

Hello,

is it possible to switch locale for  tag on a stand alone JSP, that is a JSP
which is not the result of an Action?

Having read about i18n-interceptor
(http://cwiki.apache.org/WW/i18n-interceptor.html) and Migrating to
Struts 2 tutorial
(http://opensource.atlassian.com/confluence/oss/display/STRUTS/Migrating%20Tutorial)
I was able to get locale switched for an action:


  en


   uk


">Eng
   ">Ukrainian

So, when I click on the above links, Welcome.action is executed with
new locale and all  tags which retrieve i18n strings on
the result page return the appropriate localized content.

But what to do when I have just a JSP page with  tags
without an action? If I build the url without an action attribute:

   uk


and click on that link,  tags are not updated. Also, I'm
able to change the locale on action-less JSP by setting struts.locale
property in struts.properties, but I need to change it during run
time. Or am I forced to have links to actions only in my webapp, to be
able to change locale dynamically for all pages?

I remember, In Struts1, after you've executed LocaleAction, all
 tags returned the appropriate content for selected
locale even on simple JSPs.

Thank you,
Andrew Stepanenko

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