Re: tiles2 with struts1

2007-04-18 Thread Antonio Petrelli

2007/4/19, "André Henke" <[EMAIL PROTECTED]>:

hi,

is there a way to get struts1 work with tiles2?

I'm migrating my application to struts2/tiles2 but there is still struts1 code 
using tiles forwards which must be supported.


The Struts 1 - Tiles 2 integration code is in the trunk of the
Subversion repository. From my tests, it seems to be pretty stable,
though it is not released.

Antonio

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



Re: RE [S2] How to have validation message using localization ?

2007-04-18 Thread MLENEVEUT
Yes the good properties would be
login.login.required= The field "${getText(login.login)}" is required !

But I would like to do it automatically with a generic error message :
errors.required= The field "${getText(???)}" is required !

and the ??? is replaced with the "label" of the input, to get the 
localized message printed at the user, not the fieldName...

Can't we do that ?



Regards,

Michaël 



Just to make sure,
did you tried %{getText('login.login')} ?
because fieldName you give you the fieldName, that is loginInput.

Best,

Felipe


MLENEVEUT wrote:
> 
> Anyone ? :(
> 
> 
> Michaël
> 
> 
> 
> 
> Hi all,
> 
> With Struts 2.0.6, I try to have validation message with localization.
> 
> For example, I have a "login" form, with a "loginInput" input text :
> 
> 
> 
> 
> I have a validation on it :
> 
> 
> 
> 
> 
> 
> 
> 
> And the "errors.required" is in my package.properties :
> errors.required= The field "${getText(fieldName)}" is required !
> login.login = Login
> 
> But this will displays : "The field "loginInput" is required !"
> 
> And I would like : "The field "Login" is required !". So I would like 
> something which get the localization of my textfield label (login.login) 

> to have localization in my error message, and not the field name, which 
> does not say anything to the user :)
> 
> Could someone tells me how to do ?
> 
> Thanks a lot !
> 
> Regards,
> 
> Michaël.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--How-to-have-validation-message-using-localization---tf3599220.html#a10063744

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


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




tiles2 with struts1

2007-04-18 Thread André Henke
hi,

is there a way to get struts1 work with tiles2?

I'm migrating my application to struts2/tiles2 but there is still struts1 code 
using tiles forwards which must be supported. 

So i have to share the tiles.xml with struts1 TilesPlugin and struts2 
StrutsTilesListener. 

web.xml

  
org.apache.struts2.tiles.StrutsTilesListener



tiles.xml (tiles-2.0.1)

http://tiles.apache.org/dtds/tiles-config_2_0.dtd";>
 






.


struts1 struts-config.xml










Any suggestions? - thanks

André

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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



Need help in client side validation in Struts 2.0

2007-04-18 Thread arunabh

hi,
If somebody have some information about client side validation in Stutrs2. 0
then send me .I am in a desperate need  of the same .
thanks
 Arunabh  
-- 
View this message in context: 
http://www.nabble.com/Need-help-in-client-side-validation-in-Struts-2.0-tf3605223.html#a10072395
Sent from the Struts - User mailing list archive at Nabble.com.


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



How to get original query string after more than two forwards

2007-04-18 Thread Deep Blue Li

Hi,

I'm currently using an app. server that is using servlet 2.4. I cannot get
the original query string after doing more than two request forward.

Here is the scenario:
1. Enter the URL in the browser : http://xxx/xxx.do?search=abc
2. Go to validator, validation failed
3. Validator forwards the request to "xxx.do"  (first forward)
4. Inside xxx.do action, I can still get the query string from
request.getAttribute ("javax.servlet.forward.query_string")
5. xxx.do forward to xxx.jsp (second forward)
6. I couldn't get back the query string "search=abc" in xxx.jsp

I have tried using both request.getAttribute ("
javax.servlet.forward.query_string")  and request.getQueryString() in step
6, but both are not working.

Is there any kind soul who can help me?

Thanks!

Regards,
Deep Blue


Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Drew Kutcharian
A little suggestion. Inside the interceptor, you can also put the User in the 
ActionContext or your own custom ThreadLocal so you can use that all over the 
stack for permissions/roles/etc as an alternative to say Acegi.

Cheers,
 
Drew Kutcharian
Venarc Inc.   www.venarc.com


- Original Message 
From: Mark Menard <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Wednesday, April 18, 2007 12:36:21 PM
Subject: Re: [s2]Would like each action to go throught my parent class


On 4/18/07 11:11 AM, "Mark Menard" <[EMAIL PROTECTED]> wrote:

> Now, with that example shown, I wouldn't use it. Look at an interceptor to
> do this. I'm working on exactly this right now, a login interceptor. Stay
> tuned for a write up when I get done.

As promised here's a fairly complete write up of the process:

http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor

Mark

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

How do i populate the form bean with a list of variable number of enteries.?

2007-04-18 Thread Chaitanya Deshpande

hi,

I wanted to know if there is any way to populate a form bean with a list
which is variable in number.

For example :

If i need to read the names of all the students  in class. On page 1 i read
the number of students (= n) and on the next page based on this number i
display  "n" number of test boxes to enter the names of the students.


My real question is how do i get the form bean to populate all these
variable number of entries into a list.

please let me know  if i am not being clear.


Regards ,

Chaitanya Deshpande


Re: Load an .xml file when server start up

2007-04-18 Thread Niall Pemberton

I've never actually used it but I think the DigestingPlugIn might do
this for you

http://tinyurl.com/2kzh8b

Having said that probably the best plan would be to create your own
ServletContextListener to do this  which would be independant of
Struts

http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

Niall

On 4/18/07, Zhang, Larry (L.) <[EMAIL PROTECTED]> wrote:

I need to load an .xml file when Websphere server starts up. I am using
Struts ActionServlet as the only servlet in the app and I do have a
CustomProcessor extending TilesRequestProcessor. I am trying to load the
.xml file when the server starts up. I configured to load ActionServlet
when server starts up in web.xml. Where should I put my code to load the
.xml file during the server starts up.

Thanks.


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



Re: Validatoin not working

2007-04-18 Thread Niall Pemberton

For ValidatorForm it uses the "attribute" value for the key to the
validation - in your case thats "LogonForm" - but your validation.xml
uses the form "name" of "logonForm". So either change the key in the
validation.xml or the attribute on your action mapping.

You don't actually have to specify "attribute" on an action mapping -
if you don't (which I never do) it uses the form name. So unlesss you
have a specific need for it probably the easiest solution is to remove
the "attribute" attribute altogether.

If the above doesn't solve your problem then the first step in these
kind of problems is to configure the logging to "debug" for Struts and
Commons Validator - that should give you more information about what
Struts is trying to do and maybe give you a clue where things are
going wrong.

Niall

On 4/18/07, Kirthi <[EMAIL PROTECTED]> wrote:


I am using Struts Validator Frame work to do both Client and Serverside
Validation. I am using Struts 1.2

My Validator is not triggring at all. I am trying to figure out the mistake
from the last two days, but no luck.

I am extending the ValidatorForm Class.

Can anyone help me with this one.

thanks

Here is the code.


http://struts.apache.org/dtds/struts-config_1_2.dtd";>


  
  

  

  
  
  

  
  

  
  

  

  



*


http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>


  

  

  

  


**

package com.yourcompany.struts;

import org.apache.struts.validator.ValidatorForm;

public class LogonForm extends ValidatorForm {
private String username;
private String password;

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}

**

http://www.nabble.com/file/7961/struts-config.xml struts-config.xml
http://www.nabble.com/file/7962/validation.xml validation.xml
http://www.nabble.com/file/7963/validator-rules.xml validator-rules.xml
--
View this message in context: 
http://www.nabble.com/Validatoin-not-working-tf3603238.html#a10066448
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: Using jsps from another context

2007-04-18 Thread Laurie Harper

Rajesh Gupta wrote:

Hi All,
 I have several common jsp's in a common webapp, which will be shared
by all other web applications. I use  tag to include jsp's from
this common webapp. I can include jsp's , if they do not contain any struts
specific things. But when i try to include a jsp with struts action (ex:
) , it fails. Is it possible to
include a jsp with a struts action in it from another web application. Any
ideas, suggestions please?.
I am using struts 1.2.4 & tomcat 5.0.


There's no provision in the JSP or Servlet spec for using resources in 
one web app from a different web app, so what does or doesn't work in 
this scenario is going to be a question of experimentation...


How exactly is it failing? What is the error you're getting? Does the 
page you're trying to include work if you call it directly (i.e. load it 
in your browser)?


Since what you are trying to do is non-standard, you'll need to be as 
detailed as you can about any problems you're facing.


L.


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



Re: [s2]How to customize the errors prefix, suffix, ... ?

2007-04-18 Thread Laurie Harper

[EMAIL PROTECTED] wrote:

Hi all,

I tried to customize the errors.prefix, suffix, header and footer, but 
they are not taken into account.


How to do in Struts 2 ?

I just put this in my package.properties :
errors.footer=
errors.header=
errors.prefix=
errors.suffix=


Not taken into account by what? Those look like the properties 
associated with Struts 1's old-style message handling tags. In S2 the 
formatting of errors and other messages is controlled by the template theme.


L.


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



Re: JSTL versus Struts tags

2007-04-18 Thread Laurie Harper
It's not a case of 'which is better'; they aren't directly equivalent. 
Some of the functionality in the Struts 1 tag libs overlaps some of the 
functionality in the JSTL tag libs. Both sets of tags have capabilities 
that are not available in the other.


In general, it's recommended to use the JSTL tags in preference to the 
Struts 1 tags where possible.


L.

Caroline Jen wrote:

In comparison of the two; namely, JSTL and Struts2
tags, which one is better?

In between JSTL and Struts1 tags, I prefer JSTL.  When
using JSTL, I feel that I am programming.  I would
like to gather some opinions.  Thank you.
--- Dave Newton <[EMAIL PROTECTED]> wrote:


--- Heidy Gutiérrez Guzmán <[EMAIL PROTECTED]>
wrote:

Where do I find information about the diffrence
between JSTL and struts tags?

I'm not sure what kind(s) of differences you're
looking for, but assuming you already know JSTL tags
I'd start by looking at the documentation for the S2
tags, starting at:



http://struts.apache.org/2.x/docs/tag-developers-guide.html

(I personally find the tag documentation a little
twisted to navigate so far.)

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]





__
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: Would like to read more about "Flexible Cancel Buttons - Go directly to a different action on cancel."

2007-04-18 Thread Laurie Harper

Vlad2006 wrote:

Hi,

On the Struts 2 start page one statement reads:
"Flexible Cancel Buttons - Go directly to a different action on cancel."

Could anybody point me to a page where this statement is explained?


My guess is that this refers to the ability of the s:submit tag to 
specify a target action to dispatch to. Using that, each button on your 
form could cause a different action (or a different method on the same 
action) to be invoked.


http://struts.apache.org/2.x/docs/submit.html

L.


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



Re: newbie alert: forward to a php script

2007-04-18 Thread Laurie Harper
I'm not really clear on what you're trying to achieve, but it sounds 
like you just need to read the HTTP response from the request you make 
through HttpClient. Since you're making that request from your action 
and, therefore, will have the response available there too, you don't 
need to 'direct it to an action'; you're already in an action.


If you're still having trouble, try describing the overall problem 
you're trying to solve.


L.

Chris Pat wrote:

Hi Laurie
Thank you for continuing to help my naivete.  I saw two problems: one I didnt 
know how to format and send a forward out of the struts framework, two the 
response will only come back on the port and without any context so I cant 
direct it to an Action(possibly even the same as the pre-processing) to receive 
and post-process the response.  Am I able to do any of these natively within 
Struts?  I have the first part working with HttpClient, but working out the 
second half of the php script getting the response and sending it to my Action. 
 Again thank you.

Laurie Harper <[EMAIL PROTECTED]> wrote: I'm still not clear why you need the PHP script at all; why not call out 
to the remote server directly from your Java webapp? That would seem to 
be a simpler route.


However, if you really do need the PHP script in there something like 
HttpClient, as suggested by another poster, would probably be the 
easiest way to build and submit the HTTP request.


L.

Chris Pat wrote:

Hi Laurie
Thanks.  All I need is to send a HTTP Post request to  the php script with the 
parameters that the Action received, but having done some processing in the 
Action.  At this point I dont care if the client sees the results of the php 
output.  I dont see how to generate something like a RequestDisptacher from 
within an Action even if I just send the client to a success page at the end.

My design problem is that I am trying to talk to a cc processor using struts 
code.  Right now the only way I can send the post to the cc processor and 
receive the response on the same port is with a php script.  So I thought of 
splitting it up and using curl to send to the cc processor after processing it 
in an Action, receiving it in the php scrip and forwarding it to another Action 
for post processing.  I have to get around the fact that the cc processor will 
only send back a response on the same port that the port as the request, 
obviously without a nicely formatted context/servlet syntax.  I believe this 
will work, if I can only get a post sent to the php script which will be a url 
outside of the Struts framework.  I am sure this massively violative MVC and 
probably not scalable, but I just have to get it done.  Thanks for even the 
slightest insight, even if saying it is utterly st

 up

 id, grin.

Laurie Harper  wrote: Chris Pat wrote:

Hello
Is it possible to have an Action that processes some data and then posts to a 
url completely out of control of the framework?  I want to process and write to 
a db first and then using the same parameters and any added session variables 
post to a php script, initially running on localhost but eventually on a 
completely different url.  Can someone help me understand how or why not.  I 
really need to do it even if it is not to the spec.  Thank you.
Post to? Sure, you can create an HTTP POST request to any URL. But I 
suspect that's not quite what you mean. If you mean /forward/ to, as in 
dispatch to, a PHP script, it's not so straight forward.


I seem to recall seeing mention on this list in the past of some sort of 
Java-PHP bridge, which may be what you're looking for. Search the 
archives (or Google) for 'Java PHP bridge' and see if that turns 
anything useful up. Alternatively, re-post with clarification of exactly 
what you want to achieve; maybe someone will be able to give a more 
specific solution.


L.


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






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






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



Load an .xml file when server start up

2007-04-18 Thread Zhang, Larry \(L.\)
I need to load an .xml file when Websphere server starts up. I am using
Struts ActionServlet as the only servlet in the app and I do have a
CustomProcessor extending TilesRequestProcessor. I am trying to load the
.xml file when the server starts up. I configured to load ActionServlet
when server starts up in web.xml. Where should I put my code to load the
.xml file during the server starts up.

Thanks.

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



Validatoin not working

2007-04-18 Thread Kirthi

I am using Struts Validator Frame work to do both Client and Serverside
Validation. I am using Struts 1.2

My Validator is not triggring at all. I am trying to figure out the mistake
from the last two days, but no luck.

I am extending the ValidatorForm Class.

Can anyone help me with this one.

thanks

Here is the code.


http://struts.apache.org/dtds/struts-config_1_2.dtd";>


  
  

  
  
  
  
  

  
  

  
  
  
  

  



*


http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>


  

  

  

  


**

package com.yourcompany.struts;

import org.apache.struts.validator.ValidatorForm;

public class LogonForm extends ValidatorForm {
private String username;
private String password;
  
public String getUsername() {
return username;
}
  
public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}

**

http://www.nabble.com/file/7961/struts-config.xml struts-config.xml 
http://www.nabble.com/file/7962/validation.xml validation.xml 
http://www.nabble.com/file/7963/validator-rules.xml validator-rules.xml 
-- 
View this message in context: 
http://www.nabble.com/Validatoin-not-working-tf3603238.html#a10066448
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: shopping cart advise

2007-04-18 Thread Felipe Rodrigues

I think it is better to use session.
You can do that by using ActionForm, but it is not recommended.

Best,

Felipe


john lee-15 wrote:
> 
> Hi everyone,
>
>   In regular jsp, just use session + vector to build shopping cart,
>
>   how about for the struts 1.3.* ? use same concept or use Actionform
> bean?
>
>   pls advise.
>
>   tks in advance
>
>   john
> 
>
> -
> Ahhh...imagining that irresistible "new car" smell?
>  Check outnew cars at Yahoo! Autos.
> 

-- 
View this message in context: 
http://www.nabble.com/shopping-cart-advise-tf3602793.html#a10065586
Sent from the Struts - User mailing list archive at Nabble.com.


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



Two New Tutorials

2007-04-18 Thread Mark Menard
I've written up two new Struts 2 tutorials:

Post and Redirect in Struts 2
http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect

Creating a Login Interceptor in Struts 2
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor

Take care,

Mark
-- 
Mark Menard
Business: http://www.vitarara.net/
Personal: http://www.vitarara.org/

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



Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Mark Menard
On 4/18/07 11:11 AM, "Mark Menard" <[EMAIL PROTECTED]> wrote:

> Now, with that example shown, I wouldn't use it. Look at an interceptor to
> do this. I'm working on exactly this right now, a login interceptor. Stay
> tuned for a write up when I get done.

As promised here's a fairly complete write up of the process:

http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor

Mark

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



Re: Targets vs ActionContext weird

2007-04-18 Thread Musachy Barroso

yeah, the notifyTopics is a "catch all" attribute, for 2.1 we will have
"beforeNotifyTopics", "afterNotifyTopics" and "errorNotifyTopics"

musachy

On 4/18/07, Felipe Rodrigues <[EMAIL PROTECTED]> wrote:



yeah,
I imagined the 2 submits.
So, I'll have to use javascript to workaround that until don't get the 2.1
ready.

Best Regards,

Felipe


Dave Newton-4 wrote:
>
> --- Musachy Barroso <[EMAIL PROTECTED]> wrote:
>> The topics are submitted twice, once before and one
>> after the request.
>> Check:
>>
>> http://struts.apache.org/2.x/docs/ajax-tags.html
>>
>> for details. One of the parameters passed to the
>> topic is either "before" or
>> "load". Just as a heads up, 2 separate topics were
>> added to the ajax tags
>> for 2.1 to make this easier. There is another thread
>> with an example.
>
> Curses... I was going to update the docs after that
> but I totally spaced it :/
>
> 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]
>
>
>

--
View this message in context:
http://www.nabble.com/Targets-vs-ActionContext-weird-tf3602496.html#a10065442
Sent from the Struts - User mailing list archive at Nabble.com.


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





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


Re: Targets vs ActionContext weird

2007-04-18 Thread Felipe Rodrigues

yeah, 
I imagined the 2 submits.
So, I'll have to use javascript to workaround that until don't get the 2.1
ready.

Best Regards,

Felipe


Dave Newton-4 wrote:
> 
> --- Musachy Barroso <[EMAIL PROTECTED]> wrote:
>> The topics are submitted twice, once before and one
>> after the request.
>> Check:
>> 
>> http://struts.apache.org/2.x/docs/ajax-tags.html
>> 
>> for details. One of the parameters passed to the
>> topic is either "before" or
>> "load". Just as a heads up, 2 separate topics were
>> added to the ajax tags
>> for 2.1 to make this easier. There is another thread
>> with an example.
> 
> Curses... I was going to update the docs after that
> but I totally spaced it :/
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Targets-vs-ActionContext-weird-tf3602496.html#a10065442
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: Targets vs ActionContext weird

2007-04-18 Thread Dave Newton
--- Musachy Barroso <[EMAIL PROTECTED]> wrote:
> The topics are submitted twice, once before and one
> after the request.
> Check:
> 
> http://struts.apache.org/2.x/docs/ajax-tags.html
> 
> for details. One of the parameters passed to the
> topic is either "before" or
> "load". Just as a heads up, 2 separate topics were
> added to the ajax tags
> for 2.1 to make this easier. There is another thread
> with an example.

Curses... I was going to update the docs after that
but I totally spaced it :/

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]



shopping cart advise

2007-04-18 Thread john lee
Hi everyone,
   
  In regular jsp, just use session + vector to build shopping cart,
   
  how about for the struts 1.3.* ? use same concept or use Actionform bean?
   
  pls advise.
   
  tks in advance
   
  john

   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: Targets vs ActionContext weird

2007-04-18 Thread Musachy Barroso

The topics are submitted twice, once before and one after the request.
Check:

http://struts.apache.org/2.x/docs/ajax-tags.html

for details. One of the parameters passed to the topic is either "before" or
"load". Just as a heads up, 2 separate topics were added to the ajax tags
for 2.1 to make this easier. There is another thread with an example.

regards
musachy

On 4/18/07, Felipe Rodrigues <[EMAIL PROTECTED]> wrote:



Hy Guys,

I made a form that must be submited and refreshed to get the new values
from
DB.
The problem is, when I use notifyTopics, I got 2 requests, and form
refresh
2 times.
when I use the targets attribute of submit button, when I submit again, my
ActionContext.getContext( ).getParameters( ) returns an empty list, what
means, like there is no parameters in the ActionContext submited.

Does anyone lived something like that and maybe can help me?


Thanks,

Felipe
--
View this message in context:
http://www.nabble.com/Targets-vs-ActionContext-weird-tf3602496.html#a10063736
Sent from the Struts - User mailing list archive at Nabble.com.


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





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


Re: Problem with form action mapping

2007-04-18 Thread meeboo

Oddly enough I checked out the code to continue my work from home and it
suddenly started working. I'm gonna take a look at this inconsistency
tomorrow, might be something else than S2 which is causing it. And yes, I'm
using the cleanup filter. Thanks anyway!


Dave Newton-4 wrote:
> 
> It may not solve your problem, but are you using the
> action context cleanup filter?
> 
> d.
> 
> --- meeboo <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Quick note, it seems as if I am reaching the
>> uploadFile method when not
>> specifying a file to upload. The movieTitle is then
>> read in the action
>> class. But if I also choose to upload a file
>> alongside with it the method
>> will not be reached. I'm stumped! :(
>> 
>> 
>> meeboo wrote:
>> > 
>> > Hey all
>> > 
>> > I've been trying to solve this problem for a
>> couple of hours but to no
>> > prevail...
>> > 
>> > struts.xml
>> > 
>> >  /uploadMovie.jsp
>> > 
>> > > >
>> class="com.myapp.web.struts.action.UploadMovie"
>> >method="uploadFile">
>> >  /index.jsp
>> >   > name="input">/uploadMovie.jsp
>> > 
>> > 
>> > uploadMovie.jsp
>> > > enctype="multipart/form-data" method="post">
>> > 
>> > 
>> > 
>> > 
>> > 
>> > UploadMovie.java
>> > public String uploadFile()
>> > {
>> >if(movieTitle != null && uploadedMovie !=null)
>> >return SUCCESS;
>> >else
>> >return INPUT;
>> > }
>> > 
>> > What I'm doing is that I'm accessing
>> localhost:8080/someApp/upload/ - so
>> > far so good, the form shows up and you can pick
>> the file to upload. But
>> > when I submit the form it never reaches the
>> uploadFile() method! The odd
>> > thing is that when I view the HTML source for the
>> form it says 
>> > "> > action="/myApp/uploadMovie" method="post"
>> enctype="multipart/form-data">"
>> > - which is correct. If I on the other hand access
>> the url
>> > http://localhost:8080/myApp/uploadMovie directly
>> from the browser (without
>> > using the form) the uploadFile() method will be
>> reached. I find this
>> > pretty confusing and suspect that there's a
>> mapping error somewhere in the
>> > code, but I haven't been able to identify it even
>> after a couple of hours.
>> > Any takers?
>> > 
>> > Thanks!
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Problem-with-form-action-mapping-tf3601247.html#a10060312
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>> 
>> 
>>
> -
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> 
>> 
> 
> 
> __
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-form-action-mapping-tf3601247.html#a10064144
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: RE [S2] How to have validation message using localization ?

2007-04-18 Thread Felipe Rodrigues

Just to make sure,
did you tried %{getText('login.login')} ?
because fieldName you give you the fieldName, that is loginInput.

Best,

Felipe


MLENEVEUT wrote:
> 
> Anyone ? :(
> 
> 
> Michaël
> 
> 
> 
> 
> Hi all,
> 
> With Struts 2.0.6, I try to have validation message with localization.
> 
> For example, I have a "login" form, with a "loginInput" input text :
> 
> 
> 
> 
> I have a validation on it :
> 
> 
> 
> 
> 
> 
> 
> 
> And the "errors.required" is in my package.properties :
> errors.required= The field "${getText(fieldName)}" is required !
> login.login = Login
> 
> But this will displays : "The field "loginInput" is required !"
> 
> And I would like : "The field "Login" is required !". So I would like 
> something which get the localization of my textfield label (login.login) 
> to have localization in my error message, and not the field name, which 
> does not say anything to the user :)
> 
> Could someone tells me how to do ?
> 
> Thanks a lot !
> 
> Regards,
> 
> Michaël.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--How-to-have-validation-message-using-localization---tf3599220.html#a10063744
Sent from the Struts - User mailing list archive at Nabble.com.


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



Targets vs ActionContext weird

2007-04-18 Thread Felipe Rodrigues

Hy Guys,

I made a form that must be submited and refreshed to get the new values from
DB.
The problem is, when I use notifyTopics, I got 2 requests, and form refresh
2 times.
when I use the targets attribute of submit button, when I submit again, my 
ActionContext.getContext( ).getParameters( ) returns an empty list, what
means, like there is no parameters in the ActionContext submited.

Does anyone lived something like that and maybe can help me?


Thanks,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Targets-vs-ActionContext-weird-tf3602496.html#a10063736
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: JSTL versus Struts

2007-04-18 Thread Dave Newton
--- Heidy Gutiérrez Guzmán <[EMAIL PROTECTED]>
wrote:
> When I search information about the best practice
> for programing in Struts. I find: You should to use 
> JSTL before the struts tags. Why?

For S1, because JSTL is "more standard" and duplicates
functionality found in the "less standard" Struts
tags. Plus the S1 tags aren't... overly maintained.

That said, the  tags are pretty useful as
well as a couple of the  tags.

Just my $0.02.

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: [S2]: Which way would you present dynamically generated block of text?

2007-04-18 Thread Skip Hollowell
Definitely ResourceBundle.I'll let the Action build the text based 
on the variables and the text in the bundle, drop it on the ActionStack 
(in a prop called script) and then display it that way. 


Skip Hollowell wrote:

My app is progressing happily (With no small thanks to you all) and I
have reached a point where I need to make a decision on something.

The app will present a customized script to be read, verbatim, to a
customer, based upon amounts paid, owed, dates, outstanding balances,
and what not.  If you were going to do this, which approach would you 
take?


I am thinking I have two ways:

1.  The message resources file that I use for everything else (field
labels, page headers, titles, etc).  This has the extra advantage of
being easy to use for my i18n stuff as well.   I am not sure though how
I would pass multiple variables in to a resource tag, and how I would
ensure that I get an acceptable level of grammar correctness (single
values vs multiple and what not).

2.  I use a separate data file, and have the actions access that file as
a basis for building the script to be generated and then passing that
out on the response for the page to display.  Using a DB instead of a
file is possible, but probably not warranted in this scenario.  As for
i18n,  would need to keep a separate file, and then just read from the
appropriate file based upon the locale.

Are either of these 'more' correct?  Is there a 3rd or 4th option I have?

Suggestions?  Comments?  Help?

Skip Hollowell


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



JSTL versus Struts

2007-04-18 Thread Heidy Gutiérrez Guzmán

When I search information about the best practice for programing in Struts.
I find: You should to use JSTL before the struts tags.Why?


Maven Jetty plugin error

2007-04-18 Thread LAMY Olivier
Hi,
I have a strange error when using the maven-jetty-plugin.
At the of the stack :
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with
the name xwork has already been loaded by bean -
jar:file:/local/olamy/projets/DatabaseOnTheWeb/dotw-webapp-trans/target/
webappdir/dotw-trans/WEB-INF/lib/struts2-core-2.0.6.jar!/struts-default.
xml:8:69 - bean -
jar:file:/local/olamy/.m2/repository/org/apache/struts/struts2-core/2.0.
6/struts2-core-2.0.6.jar!/struts-default.xml:8:69
 
 
Strange, this was working before migration from webWork to struts2.
I have made some google search and can't find helping solution.
 
Thanks for help,
--
Olivier
 


This e-mail, any attachments and the information contained therein ("this 
message") are confidential and intended solely for the use of the addressee(s). 
If you have received this message in error please send it back to the sender 
and delete it. Unauthorized publication, use, dissemination or disclosure of 
this message, either in whole or in part is strictly prohibited.
** 
Ce message electronique et tous les fichiers joints ainsi que  les informations 
contenues dans ce message ( ci apres "le message" ), sont confidentiels et 
destines exclusivement a l'usage de la  personne a laquelle ils sont adresses. 
Si vous avez recu ce message par erreur, merci  de le renvoyer a son emetteur 
et de le detruire. Toutes diffusion, publication, totale ou partielle ou 
divulgation sous quelque forme que se soit non expressement autorisees de ce 
message, sont interdites.
** 



RE [S2] How to have validation message using localization ?

2007-04-18 Thread MLENEVEUT
Anyone ? :(


Michaël




Hi all,

With Struts 2.0.6, I try to have validation message with localization.

For example, I have a "login" form, with a "loginInput" input text :




I have a validation on it :








And the "errors.required" is in my package.properties :
errors.required= The field "${getText(fieldName)}" is required !
login.login = Login

But this will displays : "The field "loginInput" is required !"

And I would like : "The field "Login" is required !". So I would like 
something which get the localization of my textfield label (login.login) 
to have localization in my error message, and not the field name, which 
does not say anything to the user :)

Could someone tells me how to do ?

Thanks a lot !

Regards,

Michaël.


RE: How to make a SELECT list readonly? If set disabled, loses the value when submit.

2007-04-18 Thread Frank Russo
That's cool. I never thought of that...

-Original Message-
From: Lance [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 10:56 AM
To: Struts Users Mailing List
Subject: Re: How to make a SELECT list readonly? If set disabled, loses the 
value when submit.

Another option is to make a disabled style in your css and blur onfocus


:


Using a hidden element with the same name is slightly dodgy in that 
form.elements["id"] will return a different value depending if the hidden 
element is placed before or after the select.

Megani wrote:
> Hey, i was having the same problem...
> i needed a  id to the action servlet populate the form bean with it.
>
> i just declared a 
> like:
>
> 
> (...)
> 
>
> 
>
> works fine ;)
>
>
>
>
> -
> 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]Would like each action to go throught my parent class

2007-04-18 Thread Drew Kutcharian
You probably need to write a custom Interceptor. Struts 2 has a very nice 
feature called interceptors which is sort of like AOP which is great for 
cross-cutting problems e.g authentication. 

http://struts.apache.org/2.x/docs/interceptors.html
 
Cheers,

Drew Kutcharian
Venarc Inc.   www.venarc.com




- Original Message 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Wednesday, April 18, 2007 12:10:44 AM
Subject: [s2]Would like each action to go throught my parent class


Hi all,

I would like to do as in Struts 1 with DispathAction : create a parent 
Action, which each other action extends, and each request/action passes by 
this parent action, and I could so add there the generic validations (user 
logged, etc...)

How could I do ?

I tried this :

My parent Action : 
public class CRMAction extends ActionSupport implements 
ServletRequestAware {
private static final long serialVersionUID = 7543537304330132164L;
private Logger log = Logger.getLogger(CRMAction.class);

private HttpServletRequest request;

@Override
public String execute() throws Exception {
//do all tests (user logged, ...)
//...
return super.execute();
}
}

My others Actions :
public class LoginAction extends CRMAction {
private static final long serialVersionUID = 
-5438115193615924021L;
private Logger log = Logger.getLogger(LoginAction.class);

public String myMethod () {
//do something
return "myForward";
}
}

But I never go in CRMAction.execute()...

Thanks,

Regards,

Michaël

Re: S2: Autocompleter and focus

2007-04-18 Thread Musachy Barroso

One has the ${name} you  entered in the name attribute, and it will have the
value entered on the visible input. The one with the name ${name}Key has the
key for the selected value, and the visible one (the one with no name) is
for typing. Why not use the visible one as the one holding the value? It is
a Dojo thing and I'm not sure why, but there is probably a good reason :).
The focus should be set on the visible one.

musachy

On 4/18/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote:



I am having trouble setting the focus on an
autocompleter field.

When I print out all the fields in my overlay, I see
three for the sports team autocompleter:

sportsTeam
sportsTeamKey
(one with no name)  (why does it have no name?)

Here is how it is declared:



In my onbodyload() function I set the value of the
field with no name and it works.  However, when I try
to set the focus on the one with no name it ignores it
and none of the overlay fields has focus.

I tried adding dataFieldName but despite the
documentation it says the attribute is not recognized.

Any suggestions?

Thanks,

Scott

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





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


Re: Problem with form action mapping

2007-04-18 Thread Dave Newton
It may not solve your problem, but are you using the
action context cleanup filter?

d.

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

> 
> Quick note, it seems as if I am reaching the
> uploadFile method when not
> specifying a file to upload. The movieTitle is then
> read in the action
> class. But if I also choose to upload a file
> alongside with it the method
> will not be reached. I'm stumped! :(
> 
> 
> meeboo wrote:
> > 
> > Hey all
> > 
> > I've been trying to solve this problem for a
> couple of hours but to no
> > prevail...
> > 
> > struts.xml
> > 
> >  /uploadMovie.jsp
> > 
> >  > 
> class="com.myapp.web.struts.action.UploadMovie"
> > method="uploadFile">
> >  /index.jsp
> >name="input">/uploadMovie.jsp
> > 
> > 
> > uploadMovie.jsp
> >  enctype="multipart/form-data" method="post">
> > 
> > 
> > 
> > 
> > 
> > UploadMovie.java
> > public String uploadFile()
> > {
> > if(movieTitle != null && uploadedMovie !=null)
> > return SUCCESS;
> > else
> > return INPUT;
> > }
> > 
> > What I'm doing is that I'm accessing
> localhost:8080/someApp/upload/ - so
> > far so good, the form shows up and you can pick
> the file to upload. But
> > when I submit the form it never reaches the
> uploadFile() method! The odd
> > thing is that when I view the HTML source for the
> form it says 
> > " > action="/myApp/uploadMovie" method="post"
> enctype="multipart/form-data">"
> > - which is correct. If I on the other hand access
> the url
> > http://localhost:8080/myApp/uploadMovie directly
> from the browser (without
> > using the form) the uploadFile() method will be
> reached. I find this
> > pretty confusing and suspect that there's a
> mapping error somewhere in the
> > code, but I haven't been able to identify it even
> after a couple of hours.
> > Any takers?
> > 
> > Thanks!
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Problem-with-form-action-mapping-tf3601247.html#a10060312
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
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: Problem with form action mapping

2007-04-18 Thread meeboo

Quick note, it seems as if I am reaching the uploadFile method when not
specifying a file to upload. The movieTitle is then read in the action
class. But if I also choose to upload a file alongside with it the method
will not be reached. I'm stumped! :(


meeboo wrote:
> 
> Hey all
> 
> I've been trying to solve this problem for a couple of hours but to no
> prevail...
> 
> struts.xml
> 
>  /uploadMovie.jsp
> 
>class="com.myapp.web.struts.action.UploadMovie"
>   method="uploadFile">
>  /index.jsp
>   /uploadMovie.jsp
> 
> 
> uploadMovie.jsp
> 
> 
> 
> 
> 
> 
> UploadMovie.java
> public String uploadFile()
> {
>   if(movieTitle != null && uploadedMovie !=null)
>   return SUCCESS;
>   else
>   return INPUT;
> }
> 
> What I'm doing is that I'm accessing localhost:8080/someApp/upload/ - so
> far so good, the form shows up and you can pick the file to upload. But
> when I submit the form it never reaches the uploadFile() method! The odd
> thing is that when I view the HTML source for the form it says 
> " action="/myApp/uploadMovie" method="post" enctype="multipart/form-data">"
> - which is correct. If I on the other hand access the url
> http://localhost:8080/myApp/uploadMovie directly from the browser (without
> using the form) the uploadFile() method will be reached. I find this
> pretty confusing and suspect that there's a mapping error somewhere in the
> code, but I haven't been able to identify it even after a couple of hours.
> Any takers?
> 
> Thanks!
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-form-action-mapping-tf3601247.html#a10060312
Sent from the Struts - User mailing list archive at Nabble.com.


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



S2: Autocompleter and focus

2007-04-18 Thread Scott Nesbitt

I am having trouble setting the focus on an
autocompleter field.

When I print out all the fields in my overlay, I see
three for the sports team autocompleter:

sportsTeam
sportsTeamKey
(one with no name)  (why does it have no name?)

Here is how it is declared:



In my onbodyload() function I set the value of the
field with no name and it works.  However, when I try
to set the focus on the one with no name it ignores it
and none of the overlay fields has focus.

I tried adding dataFieldName but despite the
documentation it says the attribute is not recognized.

Any suggestions?

Thanks,

Scott

__
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]Would like each action to go throught my parent class

2007-04-18 Thread Mark Menard
On 4/18/07 4:10 AM, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

> How could I do ?

Parent action:

Public abstract class MyParentAction extends ActionSupport {

public String execute () throws Exception {
// do your security stuff.
String result = this.myExecute ();
// do any cleanup.
return result;
}

public abstract String myExecute () throws Exception;
}

Public class MyChildAction extends MyParentAction {

public String myExecute () throws Exception {
// Do what ever you want.
}
}

It's just an implementation of the template pattern.

Now, with that example shown, I wouldn't use it. Look at an interceptor to
do this. I'm working on exactly this right now, a login interceptor. Stay
tuned for a write up when I get done.

Mark

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



Problem with form action mapping

2007-04-18 Thread meeboo

Hey all

I've been trying to solve this problem for a couple of hours but to no
prevail...

struts.xml

 /uploadMovie.jsp


 /index.jsp
  /uploadMovie.jsp


uploadMovie.jsp






UploadMovie.java
public String uploadFile()
{
if(movieTitle != null && uploadedMovie !=null)
return SUCCESS;
else
return INPUT;
}

What I'm doing is that I'm accessing localhost:8080/someApp/upload/ - so far
so good, the form shows up and you can pick the file to upload. But when I
submit the form it never reaches the uploadFile() method! The odd thing is
that when I view the HTML source for the form it says 
"" - which is correct. If I on
the other hand access the url http://localhost:8080/myApp/uploadMovie
directly from the browser (without using the form) the uploadFile() method
will be reached. I find this pretty confusing and suspect that there's a
mapping error somewhere in the code, but I haven't been able to identify it
even after a couple of hours. Any takers?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Problem-with-form-action-mapping-tf3601247.html#a10059516
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: newbie alert: forward to a php script

2007-04-18 Thread Chris Pat
Hi Laurie
Thank you for continuing to help my naivete.  I saw two problems: one I didnt 
know how to format and send a forward out of the struts framework, two the 
response will only come back on the port and without any context so I cant 
direct it to an Action(possibly even the same as the pre-processing) to receive 
and post-process the response.  Am I able to do any of these natively within 
Struts?  I have the first part working with HttpClient, but working out the 
second half of the php script getting the response and sending it to my Action. 
 Again thank you.

Laurie Harper <[EMAIL PROTECTED]> wrote: I'm still not clear why you need the 
PHP script at all; why not call out 
to the remote server directly from your Java webapp? That would seem to 
be a simpler route.

However, if you really do need the PHP script in there something like 
HttpClient, as suggested by another poster, would probably be the 
easiest way to build and submit the HTTP request.

L.

Chris Pat wrote:
> Hi Laurie
> Thanks.  All I need is to send a HTTP Post request to  the php script with 
> the parameters that the Action received, but having done some processing in 
> the Action.  At this point I dont care if the client sees the results of the 
> php output.  I dont see how to generate something like a RequestDisptacher 
> from within an Action even if I just send the client to a success page at the 
> end.
> 
> My design problem is that I am trying to talk to a cc processor using struts 
> code.  Right now the only way I can send the post to the cc processor and 
> receive the response on the same port is with a php script.  So I thought of 
> splitting it up and using curl to send to the cc processor after processing 
> it in an Action, receiving it in the php scrip and forwarding it to another 
> Action for post processing.  I have to get around the fact that the cc 
> processor will only send back a response on the same port that the port as 
> the request, obviously without a nicely formatted context/servlet syntax.  I 
> believe this will work, if I can only get a post sent to the php script which 
> will be a url outside of the Struts framework.  I am sure this massively 
> violative MVC and probably not scalable, but I just have to get it done.  
> Thanks for even the slightest insight, even if saying it is utterly stup
>  id, grin.
> 
> Laurie Harper  wrote: Chris Pat wrote:
>> Hello
>> Is it possible to have an Action that processes some data and then posts to 
>> a url completely out of control of the framework?  I want to process and 
>> write to a db first and then using the same parameters and any added session 
>> variables post to a php script, initially running on localhost but 
>> eventually on a completely different url.  Can someone help me understand 
>> how or why not.  I really need to do it even if it is not to the spec.  
>> Thank you.
> 
> Post to? Sure, you can create an HTTP POST request to any URL. But I 
> suspect that's not quite what you mean. If you mean /forward/ to, as in 
> dispatch to, a PHP script, it's not so straight forward.
> 
> I seem to recall seeing mention on this list in the past of some sort of 
> Java-PHP bridge, which may be what you're looking for. Search the 
> archives (or Google) for 'Java PHP bridge' and see if that turns 
> anything useful up. Alternatively, re-post with clarification of exactly 
> what you want to achieve; maybe someone will be able to give a more 
> specific solution.
> 
> L.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


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




Re: How to make a SELECT list readonly? If set disabled, loses the value when submit.

2007-04-18 Thread Lance

Another option is to make a disabled style in your css and blur onfocus


:


Using a hidden element with the same name is slightly dodgy in that 
form.elements["id"] will return a different value depending if the 
hidden element is placed before or after the select.


Megani wrote:

Hey, i was having the same problem...
i needed a to the action servlet populate the form bean with it.


i just declared a 
(...)


 


works fine ;)




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

  



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



Re: How to make a SELECT list readonly? If set disabled, loses the value when submit.

2007-04-18 Thread Megani
Hey, i was having the same problem...
i needed a 
(...)
  

 

works fine ;)




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



[S2/S1] Missing Applocation web.xml - redeploy fails

2007-04-18 Thread Harring Figueiredo

Folks,

I am having problems redeploying my web app on tomcat 5.0.28/30. It is
giving me the error: "Missing Applocation web.xml"

I have searched for archives on tomcat and I found several discussions that
point to a file locking problem under windows.

http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=Enterprisejava&Number=5915&page=14&view=collapsed&sb=11&o=&fpart=1


I am not opening files on my application. Is Struts 2 opening and not
closing resource/i18n files and it is the root cause?  The only other
possible class that is opening a file on my web app is the ResourceBundle.

P.S.: This does work in Linux, and the problems is happening in Windos XP,
which leads me to believe that the discussions on the forums are correct.

If anyone is developing on windows, how did you bypass the redeployment
without having to shutdown the server?

Thanks for any insite.

--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: Tools for I18n

2007-04-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Puchacz,

puchacz wrote:
> Do You know some tools for helping in Internationalization in web project?

Recently, I found a great tool for doing localizations (translations)
called Attesoro. You can find it here: http://attesoro.org/

As for internationalization, you press much have to slog through your
existing webapp and move strings from code and/or web pages and put them
into property bundles.

If you are using Velocity as your output mechanism, I suggest that you
look at the Velocity-tools project which includes some very useful tools
for i18n.

- -chris

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

iD8DBQFGJiXm9CaO5/Lv0PARAqH+AJwMuX6ldPT+B+rwhUSI6Lx6+x+YpwCfefBq
AYcdzYEXkjNrtOwSIIhqfNI=
=NahO
-END PGP SIGNATURE-

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



Re: Which way would you present dynamically generated block of text?

2007-04-18 Thread Martin Gainty

Good Morning Skip-

If your webapp's strings wont change (essentially all message strings are 
static) I would implement a internationalised webapp with struts 
internationalization

http://www.allapplabs.com/struts/struts_internationalization.htm

If the strings are dynamic I would look using a DB that supports 
localisation such as...Oracle 10G

First you'll have to install/config and use oracle.i18n.net
http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10971/oracle/i18n/net/package-summary.html

Implementing can be achieved  by following these guidelines
http://www.oracle.com/technology/tech/blaf/specs/ssNls.html

Keep in mind that your datatypes change from VARCHAR to DBCS enabled 
datatype NVARCHAR you'll want to read more on globalization at

http://www.oracle.com/technology/oramag/oracle/03-nov/o63tech_glob.html

Then again there are shops that are dedicated to internationalising websites 
who may provide assistance


HTH,
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: "Skip Hollowell" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, April 18, 2007 9:05 AM
Subject: [S2]: Which way would you present dynamically generated block of 
text?



My app is progressing happily (With no small thanks to you all) and I have 
reached a point where I need to make a decision on something.


The app will present a customized script to be read, verbatim, to a 
customer, based upon amounts paid, owed, dates, outstanding balances, and 
what not.  If you were going to do this, which approach would you take?


I am thinking I have two ways:

1.  The message resources file that I use for everything else (field 
labels, page headers, titles, etc).  This has the extra advantage of being 
easy to use for my i18n stuff as well.   I am not sure though how I would 
pass multiple variables in to a resource tag, and how I would ensure that 
I get an acceptable level of grammar correctness (single values vs 
multiple and what not).


2.  I use a separate data file, and have the actions access that file as a 
basis for building the script to be generated and then passing that out on 
the response for the page to display.  Using a DB instead of a file is 
possible, but probably not warranted in this scenario.  As for i18n, 
would need to keep a separate file, and then just read from the 
appropriate file based upon the locale.


Are either of these 'more' correct?  Is there a 3rd or 4th option I have?

Suggestions?  Comments?  Help?

Skip Hollowell


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



[S2]: Which way would you present dynamically generated block of text?

2007-04-18 Thread Skip Hollowell
My app is progressing happily (With no small thanks to you all) and I 
have reached a point where I need to make a decision on something.


The app will present a customized script to be read, verbatim, to a 
customer, based upon amounts paid, owed, dates, outstanding balances, 
and what not.  If you were going to do this, which approach would you take?


I am thinking I have two ways:

1.  The message resources file that I use for everything else (field 
labels, page headers, titles, etc).  This has the extra advantage of 
being easy to use for my i18n stuff as well.   I am not sure though how 
I would pass multiple variables in to a resource tag, and how I would 
ensure that I get an acceptable level of grammar correctness (single 
values vs multiple and what not).


2.  I use a separate data file, and have the actions access that file as 
a basis for building the script to be generated and then passing that 
out on the response for the page to display.  Using a DB instead of a 
file is possible, but probably not warranted in this scenario.  As for 
i18n,  would need to keep a separate file, and then just read from the 
appropriate file based upon the locale.


Are either of these 'more' correct?  Is there a 3rd or 4th option I have?

Suggestions?  Comments?  Help?

Skip Hollowell


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



Re: fail to run struts tutorial

2007-04-18 Thread nicolas de loof

struts2-archetype-starter-2.0.5-20070212.050844-2.jar

thats seems to be the latest available...

2007/4/18, Musachy Barroso <[EMAIL PROTECTED]>:


Are you using the latest version of the archetype? I think I had this same
problem with an older version.

musachy

On 4/18/07, nicolas de loof <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I've followed struts tutorial and cannot run the archetype webapp in
jetty
> :
>
> WARN:  failed action2
> java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
> ...
>
> adding velocity 1.5 and velocty-tools-view 1.2 as dependency solve this,
> but
> this looks strange to me. Isn't velocity optional ?
>



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



Tools for I18n

2007-04-18 Thread puchacz

Do You know some tools for helping in Internationalization in web project?

Thnx
-- 
View this message in context: 
http://www.nabble.com/Tools-for-I18n-tf3600761.html#a10057872
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: fail to run struts tutorial

2007-04-18 Thread Musachy Barroso

Are you using the latest version of the archetype? I think I had this same
problem with an older version.

musachy

On 4/18/07, nicolas de loof <[EMAIL PROTECTED]> wrote:


Hello

I've followed struts tutorial and cannot run the archetype webapp in jetty
:

WARN:  failed action2
java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
...

adding velocity 1.5 and velocty-tools-view 1.2 as dependency solve this,
but
this looks strange to me. Isn't velocity optional ?





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


Re: JSTL versus Struts tags

2007-04-18 Thread Caroline Jen
In comparison of the two; namely, JSTL and Struts2
tags, which one is better?

In between JSTL and Struts1 tags, I prefer JSTL.  When
using JSTL, I feel that I am programming.  I would
like to gather some opinions.  Thank you.
--- Dave Newton <[EMAIL PROTECTED]> wrote:

> --- Heidy Gutiérrez Guzmán <[EMAIL PROTECTED]>
> wrote:
> > Where do I find information about the diffrence
> > between JSTL and struts tags?
> 
> I'm not sure what kind(s) of differences you're
> looking for, but assuming you already know JSTL tags
> I'd start by looking at the documentation for the S2
> tags, starting at:
> 
>
http://struts.apache.org/2.x/docs/tag-developers-guide.html
> 
> (I personally find the tag documentation a little
> twisted to navigate so far.)
> 
> 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]
> 
> 


__
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: Nesting a in a

2007-04-18 Thread meeboo

Yeah it works, I tried

> value="#session.user.username" />/"/>
>> 
>> Are there other ways of including session values
>> without nesting S2 components?
> 
> Does using OGNL EL in the action attribute not work?
> (It's never been entirely clear to me where I'm
> allowed to use it.)
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Nesting-a-%3Cs%3Aproperty%3E-in-a-%3Cs%3Aurl-%3E-tf3600500.html#a10057313
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: Nesting a in a

2007-04-18 Thread Dave Newton
--- Alexis Pigeon <[EMAIL PROTECTED]> wrote:
> On 18/04/07, meeboo <[EMAIL PROTECTED]> wrote:
>> I am trying to include a session property in a
>>  component, but get the following error:
>>
>> "Unterminated >
>> /"/>
>>
> According to the error message, I would say its due
> to the fact you are nesting double-quoted
expression.
> Try to replace one of the pairs of double-quotes by
a
> single-quote one.

IIRC you've never been able to nest custom tags. If
nothing else, it's certainly not valid XML, and the
problem isn't quote-related.

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: Nesting a in a

2007-04-18 Thread Alexis Pigeon

Hi,

On 18/04/07, meeboo <[EMAIL PROTECTED]> wrote:


Hey all

I am trying to include a session property in a  component, but get
the following error:

"Unterminated 



According to the error message, I would say its due to the fact you
are nesting double-quoted expression. Try to replace one of the pairs
of double-quotes by a single-quote one.

HTH,
alexis

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



Re: Nesting a in a

2007-04-18 Thread Dave Newton
--- meeboo <[EMAIL PROTECTED]> wrote:
> /"/>
> 
> Are there other ways of including session values
> without nesting S2 components?

Does using OGNL EL in the action attribute not work?
(It's never been entirely clear to me where I'm
allowed to use it.)

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]



Nesting a in a

2007-04-18 Thread meeboo

Hey all

I am trying to include a session property in a  component, but get
the following error:

"Unterminated 

Are there other ways of including session values without nesting S2
components?
-- 
View this message in context: 
http://www.nabble.com/Nesting-a-%3Cs%3Aproperty%3E-in-a-%3Cs%3Aurl-%3E-tf3600500.html#a10056979
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> I was talking about a "dynamic" mecanism. In Struts
> 1, I never called super.dispathMethod() : the
> CRMAction.dispatchMethod() was first called by 
> Struts, then my "return super.dispatchMethod()" was
> returning the ActionForward returned by my called 
> Action.

That's certainly true, but S2 doesn't have a
DispatchAction, so that's not really going to work.

You may want to consider using interceptors for much
of the cross-cutting functionality you described.

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]



runtime parameters for

2007-04-18 Thread Darryl Culverwell
Hi,

I am new to struts2 an am putting together a simple framework to inspect
user beans and display a generic edit screen based on the type of object
presented.


Is it possible to populate the various attributes of this tag at run
time depending on the field ?

the list obj.{#field.name} returns a list of beans, in my test case a
list of Car beans.

%{getText(#field.name+'.list.field')} returns a field name 'brand'
etc...


I have been playing with something like this (may not be exact as I have
been fiddling )  :




but it doesn't seem to like the field.name bit, 
if I specify what obj.{#field.name} produces (in this case 'cars') 
as well as the other fields, it works as expected. 

In my previous project I found the jsp tag <%=blabla%> useful for this
sort of task.

Am I going about this the wrong way ?

-- 
-=Darryl Culverwell=-
Cell:  +27 82 494 1678
Phone: +21 21 448 1395




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



[s2] ultimate convention (no configuration at all)

2007-04-18 Thread wiradikusuma

I'm currently playing with codebehind and zero conf in Struts 2. My
objective is to make CRUD application easy:
you don't have to create Action, you don't have to wire them using XML stuff
or Annotation (and you don't have to create DAOs and Managers and tables,
just
domain models)

Codebehind's behaviour for CRUD is as follows (if we are to use 1 action per
CRUD):
book!list.html for list of books
book!edit.html to create/edit book
book!save.html to persist book

I need a way to alter the Result (I might need change it from dispatcher to
redirect), so I use PreResultListener.
The thing is, codebehind seems to ignore my Interceptor (my Interceptor got
called from "non-codebehinded" pages)

=
http://www.nabble.com/-s2--ultimate-convention-%28no-configuration-at-all%29-tf3600422.html#a10056721
Sent from the Struts - User mailing list archive at Nabble.com.


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



Exception starting filter Struts

2007-04-18 Thread sowjanya

I loaded my sample struts application and run the tomcat IT gave me the
following error.


Can anyone help me ASAP ?


 Scanning for classes in
[/D:/projects/ifnd/GPSReceiver/GPSReceiver/WebContent/WEB-INF/classes/com/ifnd/UserMgmtApp/]
matching criteria:
[EMAIL PROTECTED]
Apr 18, 2007 2:42:29 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
The package name 'com.ifnd.UserMgmtApp' at location null is already been
used by another package at location package -
file:/D:/projects/ifnd/GPSReceiver/GPSReceiver/WebContent/WEB-INF/classes/example.xml:8:101
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.addPackageConfig(DefaultConfiguration.java:95)
at
org.apache.struts2.config.ClasspathConfigurationProvider.loadPackages(ClasspathConfigurationProvider.java:253)
at
org.apache.struts2.config.ClasspathConfigurationProvider.loadPackages(ClasspathConfigurationProvider.java:402)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:77)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Apr 18, 2007 2:42:29 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Apr 18, 2007 2:42:29 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/GPSReceiver] startup failed due to previous errors
A
-- 
View this message in context: 
http://www.nabble.com/Exception-starting-filter-Struts-tf3600249.html#a10056210
Sent from the Struts - User mailing list archive at Nabble.com.


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



fail to run struts tutorial

2007-04-18 Thread nicolas de loof

Hello

I've followed struts tutorial and cannot run the archetype webapp in jetty :

WARN:  failed action2
java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
...

adding velocity 1.5 and velocty-tools-view 1.2 as dependency solve this, but
this looks strange to me. Isn't velocity optional ?


Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread MLENEVEUT
I was talking about a "dynamic" mecanism. In Struts 1, I never called 
super.dispathMethod() : the CRMAction.dispatchMethod() was first called by 
Struts, then my "return super.dispatchMethod()" was returning the 
ActionForward returned by my called Action.

public class CRMAction extends DispatchAction {
protected ActionForward dispatchMethod(ActionMapping mapping, 
ActionForm form, HttpServletRequest request, HttpServletResponse response, 
String name) throws Exception {
try{
log.debug("CRM dispatchMethod.debut");
UserBean user = getConnectedUser(request);
if(user==null) {
log.error("User null !");
return mapping.findForward("error");
}
return super.dispatchMethod(mapping, form, 
request, response, name);
} catch (Exception e) {
log.error(e.getMessage());
return mapping.findForward("error");
}
}

Regards,

Michaël




--- [EMAIL PROTECTED] wrote:
> My parent Action : 
> public class CRMAction extends ActionSupport
> @Override
> public String execute() throws Exception {
> //do all tests (user logged, ...)
> //...
> return super.execute();
> }
> }
> 
> My others Actions :
> public class LoginAction extends CRMAction {
> public String myMethod () {
> //do something
> return "myForward";
> }
> }
> 
> But I never go in CRMAction.execute()...

You never call super.execute() in your subclass.

d.





Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> My parent Action : 
> public class CRMAction extends ActionSupport
> @Override
> public String execute() throws Exception {
> //do all tests (user logged, ...)
> //...
> return super.execute();
> }
> }
> 
> My others Actions :
> public class LoginAction extends CRMAction {
> public String myMethod () {
> //do something
> return "myForward";
> }
> }
> 
> But I never go in CRMAction.execute()...

You never call super.execute() in your subclass.

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]



Using jsps from another context

2007-04-18 Thread Rajesh Gupta

Hi All,
 I have several common jsp's in a common webapp, which will be shared
by all other web applications. I use  tag to include jsp's from
this common webapp. I can include jsp's , if they do not contain any struts
specific things. But when i try to include a jsp with struts action (ex:
) , it fails. Is it possible to
include a jsp with a struts action in it from another web application. Any
ideas, suggestions please?.
I am using struts 1.2.4 & tomcat 5.0.


Thanks in advance.
Rajesh**


[s2]Would like each action to go throught my parent class

2007-04-18 Thread MLENEVEUT
Hi all,

I would like to do as in Struts 1 with DispathAction : create a parent 
Action, which each other action extends, and each request/action passes by 
this parent action, and I could so add there the generic validations (user 
logged, etc...)

How could I do ?

I tried this :

My parent Action : 
public class CRMAction extends ActionSupport implements 
ServletRequestAware {
private static final long serialVersionUID = 7543537304330132164L;
private Logger log = Logger.getLogger(CRMAction.class);
 
private HttpServletRequest request;

@Override
public String execute() throws Exception {
//do all tests (user logged, ...)
//...
return super.execute();
}
}

My others Actions :
public class LoginAction extends CRMAction {
private static final long serialVersionUID = 
-5438115193615924021L;
private Logger log = Logger.getLogger(LoginAction.class);
 
public String myMethod () {
//do something
return "myForward";
}
}

But I never go in CRMAction.execute()...

Thanks,

Regards,

Michaël

Re: Struts2, Tiles, Velocity

2007-04-18 Thread Antonio Petrelli

2007/4/18, Charlie Rehor <[EMAIL PROTECTED]>:

So, the question is, can you use Struts2, Velocity, and Tiles together
right now?


Struts 2 uses Tiles 2, but currently there is no support for Velocity
templates with Tiles 2, I am sorry.

Antonio

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



Re: FW: Tiles refresh

2007-04-18 Thread Antonio Petrelli

2007/4/17, Hehl, Thomas <[EMAIL PROTECTED]>:

When the user clicks a button, I change the value in C, but sometimes I want
to refresh B as well since it needs to re-run code to pick up the current
state. I can't figure out how to do this for the specific screens of C that
I want. Does anyone have a solution to this?


See the end of this page:
http://wiki.apache.org/struts/StrutsDocTiles?highlight=%28tiles%29

Antonio

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



[s2]How to customize the errors prefix, suffix, ... ?

2007-04-18 Thread MLENEVEUT
Hi all,

I tried to customize the errors.prefix, suffix, header and footer, but 
they are not taken into account.

How to do in Struts 2 ?

I just put this in my package.properties :
errors.footer=
errors.header=
errors.prefix=
errors.suffix=

Thanks,

Regards,

Michaël.

How to Dereference/Clear the ValueStack object in JSP

2007-04-18 Thread arunabh

I want to dereference/clear the Value Stack object in "JSP" on a button click
. Is there a  tag for that or some other way can i do that . If yes
please send me the systex for the same .

with regards
Arunabh 
-- 
View this message in context: 
http://www.nabble.com/How-to-Dereference-Clear-the-ValueStack-object-in-JSP-tf3599436.html#a10053808
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: JSTL and the Value Stack

2007-04-18 Thread Guillaume Carré

2007/4/18, Ray Clough <[EMAIL PROTECTED]>:

This page perfectly illustrates my point on the difficulty of the JSTL tags
working nicely with S2.  The page works perfectly if the object is
explicitly placed into the HttpRequest.  If the 'getExporter()' is the way
in which the Exporter is exposed, then it doesn't work for jstl.


I have filed an issue in JIRA about problems using JSTL on the value stack:
https://issues.apache.org/struts/browse/WW-1798

And as I commented the issue, "Adding the filter
org.apache.struts2.dispatcher.ActionContextCleanUp before the
FilterDispatcher solved the problem", it is a workaround, but the
whole thing used to work perfectly in WebWork, even without the
ActionContextCleanUp filter.
--
Guillaume Carré

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