realtive path and absolute path

2009-09-11 Thread srinu salnki
Hi

I am new to struts..pls.can u tell me this difference.

what is the difference b/w relative path and absolute path.

srinu


Re: realtive path and absolute path

2009-09-11 Thread suhas kokal
hi,
 
Absolute path starts from /ContextName/...
Relative path does not start from / but with the URL u declare in the 
configuration path
 
Thanks
Suhas Kokal

--- On Fri, 11/9/09, srinu salnki  wrote:


From: srinu salnki 
Subject: realtive path and absolute path
To: user@struts.apache.org
Date: Friday, 11 September, 2009, 2:15 PM


Hi

I am new to struts..pls.can u tell me this difference.

what is the difference b/w relative path and absolute path.

srinu



  Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com

Re: Problem testing my action when I’ve g ot a springbean inside the validators.xml

2009-09-11 Thread cmartin81

Anyone?
-- 
View this message in context: 
http://www.nabble.com/Problem-testing-my-action-when-I%E2%80%99ve-got-a-springbean-inside-the-validators.xml-tp24862185p25397337.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: realtive path and absolute path

2009-09-11 Thread srinu salnki
Thanks suhas

for more clarification :

Say I had deplayed a application nammed test in jboss

so there i have one link:

http://localhost:8080/test/jsp/abc.jsp

for this what is the relative path and the absolute path.

regards
Sunil



On Fri, Sep 11, 2009 at 2:19 PM, suhas kokal  wrote:

> hi,
>
> Absolute path starts from /ContextName/...
> Relative path does not start from / but with the URL u declare in the
> configuration path
>
> Thanks
> Suhas Kokal
>
> --- On Fri, 11/9/09, srinu salnki  wrote:
>
>
> From: srinu salnki 
> Subject: realtive path and absolute path
> To: user@struts.apache.org
> Date: Friday, 11 September, 2009, 2:15 PM
>
>
> Hi
>
> I am new to struts..pls.can u tell me this difference.
>
> what is the difference b/w relative path and absolute path.
>
> srinu
>
>
>
>  Love Cricket? Check out live scores, photos, video highlights and
> more. Click here http://cricket.yahoo.com


Re: Problem with result returning from interceptor

2009-09-11 Thread jcllings



 Check it out with the config-browser -- you should see on the results tab
if your login result is 
really there.

Chris

I don't think the config-browser can be used like this.  I have to select an
action in order to see the results returned and this isn't an action. It's
an interceptor. 

Jim C. 
-- 
View this message in context: 
http://www.nabble.com/Problem-with-result-returning-from-interceptor-tp25075486p25399111.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Diego Manilla Suárez

Hi. I've been struggling to have tests for my Struts 2 actions working.

I'm using Struts 2 actions created by Spring, by the means of the Struts 
2 Spring plugin.


Both Struts 2 and Spring provide their own base classes to create test 
units, and since Java doesn't allow multiple inheritance, I've tried to 
extend one of the classes and trying to replicate the functionality 
provided by the other, with no luck so far, I get all kinds of obscure 
errors, especially from the Struts 2 part.


I also want to use TestNG, not JUnit.

I was wondering if there is a base class anywhere to create unit tests 
for Struts 2 actions inside Spring.


Thanks in advance.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Nils-Helge Garli Hegvik
If it's unit testing you want to do, can't you just test your actions
without involving Spring or anything else? I usually just create a
unit test where I instantiate my action, set the aproriate
dependencies, and then just call the appropriate execute method.

Nils-H

2009/9/11 Diego Manilla Suárez :
> Hi. I've been struggling to have tests for my Struts 2 actions working.
>
> I'm using Struts 2 actions created by Spring, by the means of the Struts 2
> Spring plugin.
>
> Both Struts 2 and Spring provide their own base classes to create test
> units, and since Java doesn't allow multiple inheritance, I've tried to
> extend one of the classes and trying to replicate the functionality provided
> by the other, with no luck so far, I get all kinds of obscure errors,
> especially from the Struts 2 part.
>
> I also want to use TestNG, not JUnit.
>
> I was wondering if there is a base class anywhere to create unit tests for
> Struts 2 actions inside Spring.
>
> Thanks in advance.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Problem with result returning from interceptor

2009-09-11 Thread jcllings


jcllings wrote:
> 
> I don't think the config-browser can be used like this.  I have to select
> an
> action in order to see the results returned and this isn't an action. It's
> an interceptor. 
> 
> Jim C. 
> 

Hmmm on second thought, perhaps if it is a global-result, you should be
able to see it on all actions?  Just a guess because I don't see that in my
case. 

Jim C. 
-- 
View this message in context: 
http://www.nabble.com/Problem-with-result-returning-from-interceptor-tp25075486p25399254.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Problem with result returning from interceptor

2009-09-11 Thread jcllings


jcllings wrote:
> 
> Hmmm on second thought, perhaps if it is a global-result, you should
> be able to see it on all actions?  Just a guess because I don't see that
> in my case. 
> 
> Jim C. 
> 

OK, I was able to get the config-browser to display the result. Is it OK to
use chain, as I have below?  All I'm really trying to do is force the user
to a specific page but I have to call an action to populate tables and list
boxes and stuff on that page. 


/admin/funkycool.action


-- 
View this message in context: 
http://www.nabble.com/Problem-with-result-returning-from-interceptor-tp25075486p25399361.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Martin Gainty

send me your code and spring config I could setup a surefire harness for you
if you already have a pom.xml send that also or I'll create a new pom.xml

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 11 Sep 2009 13:19:36 +0200
> Subject: Re: Testing with Spring + Struts 2 + TestNG
> From: nil...@gmail.com
> To: user@struts.apache.org
> 
> If it's unit testing you want to do, can't you just test your actions
> without involving Spring or anything else? I usually just create a
> unit test where I instantiate my action, set the aproriate
> dependencies, and then just call the appropriate execute method.
> 
> Nils-H
> 
> 2009/9/11 Diego Manilla Suárez :
> > Hi. I've been struggling to have tests for my Struts 2 actions working.
> >
> > I'm using Struts 2 actions created by Spring, by the means of the Struts 2
> > Spring plugin.
> >
> > Both Struts 2 and Spring provide their own base classes to create test
> > units, and since Java doesn't allow multiple inheritance, I've tried to
> > extend one of the classes and trying to replicate the functionality provided
> > by the other, with no luck so far, I get all kinds of obscure errors,
> > especially from the Struts 2 part.
> >
> > I also want to use TestNG, not JUnit.
> >
> > I was wondering if there is a base class anywhere to create unit tests for
> > Struts 2 actions inside Spring.
> >
> > Thanks in advance.
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009

Re: Problem with result returning from interceptor

2009-09-11 Thread jcllings


jcllings wrote:
> 
> OK, I was able to get the config-browser to display the result. Is it OK
> to use chain, as I have below?  All I'm really trying to do is force the
> user to a specific page but I have to call an action to populate tables
> and list boxes and stuff on that page. 
> 
> 
>  name="login">/admin/funkycool.action
> 
> 
> 

I have some new and interesting behavior to report. Now that I have a global
result that shows up in the config browser, I can clear out my cookies and
perform an action using the config browser and the behavior is as expected.
I get routed to the /admin/funkycool.action which then sets up my page and
loads it. 

Problem is that it doesn't work if I try it from the web.  I should be able
to clear out the cookies and click on a link to an action in the page and it
would do the same thing, right?  This is not the case.  Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Problem-with-result-returning-from-interceptor-tp25075486p25399579.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: realtive path and absolute path

2009-09-11 Thread Martin Gainty

A full path or absolute path is a path that points to the same location on one 
file system regardless of the working directory or combined paths. It is 
usually written in reference to a root directory.

A relative path is a path relative to the working directory of the user or 
application
relativePath for webapps is path from the current context

http://en.wikipedia.org/wiki/Path_%28computing%29

(i dont know what a realtive path is)
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 11 Sep 2009 15:06:15 +0530
> Subject: Re: realtive path and absolute path
> From: srinus...@gmail.com
> To: user@struts.apache.org
> 
> Thanks suhas
> 
> for more clarification :
> 
> Say I had deplayed a application nammed test in jboss
> 
> so there i have one link:
> 
> http://localhost:8080/test/jsp/abc.jsp
> 
> for this what is the relative path and the absolute path.
> 
> regards
> Sunil
> 
> 
> 
> On Fri, Sep 11, 2009 at 2:19 PM, suhas kokal  wrote:
> 
> > hi,
> >
> > Absolute path starts from /ContextName/...
> > Relative path does not start from / but with the URL u declare in the
> > configuration path
> >
> > Thanks
> > Suhas Kokal
> >
> > --- On Fri, 11/9/09, srinu salnki  wrote:
> >
> >
> > From: srinu salnki 
> > Subject: realtive path and absolute path
> > To: user@struts.apache.org
> > Date: Friday, 11 September, 2009, 2:15 PM
> >
> >
> > Hi
> >
> > I am new to struts..pls.can u tell me this difference.
> >
> > what is the difference b/w relative path and absolute path.
> >
> > srinu
> >
> >
> >
> >  Love Cricket? Check out live scores, photos, video highlights and
> > more. Click here http://cricket.yahoo.com

_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009

RE: relative path and absolute path

2009-09-11 Thread C N Davies
Relative path is a path relative to the current directory, for instance if
you home directory was c:\temp and you wanted to use an absolute  path to
the "documents" subdirectory of c:\temp you would use c:\temp\documents, a
relative path would be "documents" assuming your current working directory
was already c"\temp  making an absolute path of c:\temp\documents.

Works similarly in http / ftp etc.

Chris

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Friday, 11 September 2009 8:00 PM
To: Struts Users Mailing List
Subject: RE: realtive path and absolute path


A full path or absolute path is a path that points to the same location on
one file system regardless of the working directory or combined paths. It is
usually written in reference to a root directory.

A relative path is a path relative to the working directory of the user or
application
relativePath for webapps is path from the current context

http://en.wikipedia.org/wiki/Path_%28computing%29

(i dont know what a realtive path is)
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.




> Date: Fri, 11 Sep 2009 15:06:15 +0530
> Subject: Re: realtive path and absolute path
> From: srinus...@gmail.com
> To: user@struts.apache.org
> 
> Thanks suhas
> 
> for more clarification :
> 
> Say I had deplayed a application nammed test in jboss
> 
> so there i have one link:
> 
> http://localhost:8080/test/jsp/abc.jsp
> 
> for this what is the relative path and the absolute path.
> 
> regards
> Sunil
> 
> 
> 
> On Fri, Sep 11, 2009 at 2:19 PM, suhas kokal  wrote:
> 
> > hi,
> >
> > Absolute path starts from /ContextName/...
> > Relative path does not start from / but with the URL u declare in the
> > configuration path
> >
> > Thanks
> > Suhas Kokal
> >
> > --- On Fri, 11/9/09, srinu salnki  wrote:
> >
> >
> > From: srinu salnki 
> > Subject: realtive path and absolute path
> > To: user@struts.apache.org
> > Date: Friday, 11 September, 2009, 2:15 PM
> >
> >
> > Hi
> >
> > I am new to struts..pls.can u tell me this difference.
> >
> > what is the difference b/w relative path and absolute path.
> >
> > srinu
> >
> >
> >
> >  Love Cricket? Check out live scores, photos, video highlights and
> > more. Click here http://cricket.yahoo.com

_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:W
M_HYGN_faster:082009


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: realtive path and absolute path

2009-09-11 Thread suhas kokal
hi,
 
 
 The raltive path is jsp/abc.jsp
 The absolute path is  http://localhost:8080/test/jsp/abc.jsp
 
Thanks
Suhas Kokal



--- On Fri, 11/9/09, srinu salnki  wrote:


From: srinu salnki 
Subject: Re: realtive path and absolute path
To: "Struts Users Mailing List" 
Date: Friday, 11 September, 2009, 3:06 PM


Thanks suhas

for more clarification :

Say I had deplayed a application nammed test in jboss

so there i have one link:

http://localhost:8080/test/jsp/abc.jsp

for this what is the relative path and the absolute path.

regards
Sunil



On Fri, Sep 11, 2009 at 2:19 PM, suhas kokal  wrote:

> hi,
>
> Absolute path starts from /ContextName/...
> Relative path does not start from / but with the URL u declare in the
> configuration path
>
> Thanks
> Suhas Kokal
>
> --- On Fri, 11/9/09, srinu salnki  wrote:
>
>
> From: srinu salnki 
> Subject: realtive path and absolute path
> To: user@struts.apache.org
> Date: Friday, 11 September, 2009, 2:15 PM
>
>
> Hi
>
> I am new to struts..pls.can u tell me this difference.
>
> what is the difference b/w relative path and absolute path.
>
> srinu
>
>
>
>      Love Cricket? Check out live scores, photos, video highlights and
> more. Click here http://cricket.yahoo.com



  See the Web's breaking stories, chosen by people like you. Check out 
Yahoo! Buzz. http://in.buzz.yahoo.com/

Re: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Wes Wannemacher
I'm pretty much with Nils here, except that I use later versions of
JUnit that support the @RunWith annotation and there is a spring class
that you can use so that you can specify an applicationContext.xml
file. That way, I can create a spring config file with beans defined
specifically for testing (connected to HSQLDB for instance) and then
just set @Autowired annotation on the struts action so that it gets
all the spring bean dependencies injected, then write the unit tests
against it.

-Wes

On Fri, Sep 11, 2009 at 7:19 AM, Nils-Helge Garli Hegvik
 wrote:
> If it's unit testing you want to do, can't you just test your actions
> without involving Spring or anything else? I usually just create a
> unit test where I instantiate my action, set the aproriate
> dependencies, and then just call the appropriate execute method.
>
> Nils-H
>
> 2009/9/11 Diego Manilla Suárez :
>> Hi. I've been struggling to have tests for my Struts 2 actions working.
>>
>> I'm using Struts 2 actions created by Spring, by the means of the Struts 2
>> Spring plugin.
>>
>> Both Struts 2 and Spring provide their own base classes to create test
>> units, and since Java doesn't allow multiple inheritance, I've tried to
>> extend one of the classes and trying to replicate the functionality provided
>> by the other, with no luck so far, I get all kinds of obscure errors,
>> especially from the Struts 2 part.
>>
>> I also want to use TestNG, not JUnit.
>>
>> I was wondering if there is a base class anywhere to create unit tests for
>> Struts 2 actions inside Spring.
>>
>> Thanks in advance.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Wes Wannemacher
Here is an example -

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath*:applicationContext-test.xml"})
public class SomeActionTest {

@Autowired @Qualifier("dao")
private MyAction myAction;

public void testOne() {
...


The difference between applicationContext-test.xml and
applicationContext.xml is typically database settings, etc. For
complicated things like actions directly manipulating the request
object, I'll just setup some spring mocks.

-Wes

On Fri, Sep 11, 2009 at 9:31 AM, Wes Wannemacher  wrote:
> I'm pretty much with Nils here, except that I use later versions of
> JUnit that support the @RunWith annotation and there is a spring class
> that you can use so that you can specify an applicationContext.xml
> file. That way, I can create a spring config file with beans defined
> specifically for testing (connected to HSQLDB for instance) and then
> just set @Autowired annotation on the struts action so that it gets
> all the spring bean dependencies injected, then write the unit tests
> against it.
>
> -Wes
>
> On Fri, Sep 11, 2009 at 7:19 AM, Nils-Helge Garli Hegvik
>  wrote:
>> If it's unit testing you want to do, can't you just test your actions
>> without involving Spring or anything else? I usually just create a
>> unit test where I instantiate my action, set the aproriate
>> dependencies, and then just call the appropriate execute method.
>>
>> Nils-H
>>
>> 2009/9/11 Diego Manilla Suárez :
>>> Hi. I've been struggling to have tests for my Struts 2 actions working.
>>>
>>> I'm using Struts 2 actions created by Spring, by the means of the Struts 2
>>> Spring plugin.
>>>
>>> Both Struts 2 and Spring provide their own base classes to create test
>>> units, and since Java doesn't allow multiple inheritance, I've tried to
>>> extend one of the classes and trying to replicate the functionality provided
>>> by the other, with no luck so far, I get all kinds of obscure errors,
>>> especially from the Struts 2 part.
>>>
>>> I also want to use TestNG, not JUnit.
>>>
>>> I was wondering if there is a base class anywhere to create unit tests for
>>> Struts 2 actions inside Spring.
>>>
>>> Thanks in advance.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts jsp access java class

2009-09-11 Thread deepannair

I have a properties class which has soem properties being loaded from a
remote system. In my jsp I need to access the java class. In traditional jsp
I have 
[code]
<%
/* CAPTCHA */
boolean captchaEnabledFlag=PropertiesConfig.getCaptchaEnabled();
%>
<%if (captchaEnabledFlag)  {%>


<%} %>
[code]

I want to change the if statement to  struts if  . How do I access the
PropertiesConfig class directly from struts tag?
-- 
View this message in context: 
http://www.nabble.com/Struts-jsp-access-java-class-tp25401337p25401337.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Global Exceptions with Convention Plugin

2009-09-11 Thread Wes Wannemacher
The conventions plugin has a variable (constant) that you have to set
so that your conventions actions extend a package other than
conventions-default... It is toward the bottom of the page of the
conventions plugin docs.

-Wes

On Fri, Sep 11, 2009 at 2:22 AM, RogerV  wrote:
>
> Hi
>
> My project is using Struts 2.1.6 based on blank.war with the convention
> plugin enabled. I'm having a problem getting global exception catching to
> work - I'm still getting the stack trace displayed in the browser. Do I need
> to add anything that would not be available "out of the box" having started
> with importing blank.war into my ide. I've attached my struts.xml below.
>
> Regards
>
> 
>     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>    "http://struts.apache.org/dtds/struts-2.0.dtd";>
>
> 
>
>    
>    
>
>        
>
>        
>
>        
>            exception="javax.persistence.OptimisticLockException" result="input"/>
>                       exception="org.eclipse.persistemce.exceptions.OptimisticLockException"
> result="input"/>
>        
>
>
>
>
>
>        
>            
>                menu
>            
>        
>    
>
>    
>
> 
> --
> View this message in context: 
> http://www.nabble.com/Global-Exceptions-with-Convention-Plugin-tp25395678p25395678.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts jsp access java class

2009-09-11 Thread Paweł Wielgus
Hi,
something like < s:if
test="@com.something.propertiescon...@getcaptchaenabled()"/>
it was on this list a while ago.

Best greetings,
Paweł Wielgus.


2009/9/11 deepannair :
>
> I have a properties class which has soem properties being loaded from a
> remote system. In my jsp I need to access the java class. In traditional jsp
> I have
> [code]
> <%
> /* CAPTCHA */
> boolean captchaEnabledFlag=PropertiesConfig.getCaptchaEnabled();
> %>
> <%if (captchaEnabledFlag)  {%>
> 
>
> <%} %>
> [code]
>
> I want to change the if statement to  struts if  . How do I access the
> PropertiesConfig class directly from struts tag?
> --
> View this message in context: 
> http://www.nabble.com/Struts-jsp-access-java-class-tp25401337p25401337.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts jsp access java class

2009-09-11 Thread Wes Wannemacher


-Wes

On Fri, Sep 11, 2009 at 9:51 AM, deepannair  wrote:
>
> I have a properties class which has soem properties being loaded from a
> remote system. In my jsp I need to access the java class. In traditional jsp
> I have
> [code]
> <%
> /* CAPTCHA */
> boolean captchaEnabledFlag=PropertiesConfig.getCaptchaEnabled();
> %>
> <%if (captchaEnabledFlag)  {%>
> 
>
> <%} %>
> [code]
>
> I want to change the if statement to  struts if  . How do I access the
> PropertiesConfig class directly from struts tag?
> --
> View this message in context: 
> http://www.nabble.com/Struts-jsp-access-java-class-tp25401337p25401337.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts jsp access java class

2009-09-11 Thread musomesa

 Check out 
http://struts.apache.org/2.1.6/docs/bean.html



 


Chris

 


 

-Original Message-
From: deepannair 
To: user@struts.apache.org
Sent: Fri, Sep 11, 2009 9:51 am
Subject: Struts jsp access java class











I have a properties class which has soem properties being loaded from a
remote system. In my jsp I need to access the java class. In traditional jsp
I have 
[code]
<%
/* CAPTCHA */
boolean captchaEnabledFlag=PropertiesConfig.getCaptchaEnabled();
%>
<%if (captchaEnabledFlag)  {%>


<%} %>
[code]

I want to change the if statement to  struts if  . How do I access the
PropertiesConfig class directly from struts tag?
-- 
View this message in context: 
http://www.nabble.com/Struts-jsp-access-java-class-tp25401337p25401337.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




 



Re: realtive path and absolute path

2009-09-11 Thread Stephen Turner
On Fri, 11 Sep 2009 07:59:38 -0400, Martin Gainty   
wrote:




(i dont know what a realtive path is)
Martin Gainty



I think he spelt it like that to confuse bots...

Steve

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



adding parameters to a url - help please

2009-09-11 Thread Farshad Rabbani

Hi,

   

  I would like to be able to add whatever is the currently selected option 
from my selection box as a parameter to the url shown below.  I am able to 
attach the id as a parameter but I cannot figure out how to do the same for the 
selection box.  I would greatly appreciate any assistance in doing this.  
Thanks.

 

Regards,

Farshad

 

  
 
  
  
  
  
  
  
 
 
  
  Edit
  

_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

Re: adding parameters to a url - help please

2009-09-11 Thread Wes Wannemacher
You'll have to use javascript, the tags' output is rendered server
side, when the jsp page is rendered.

-Wes

On Fri, Sep 11, 2009 at 11:02 AM, Farshad Rabbani
 wrote:
>
> Hi,
>
>
>
>      I would like to be able to add whatever is the currently selected option 
> from my selection box as a parameter to the url shown below.  I am able to 
> attach the id as a parameter but I cannot figure out how to do the same for 
> the selection box.  I would greatly appreciate any assistance in doing this.  
> Thanks.
>
>
>
> Regards,
>
> Farshad
>
>
>
>      
>      
>      
>      
>      
>       list="editViewOptions" theme="simple"/>
>      
>          
>                     
>                     
>          
>          Edit
>      
>
> _
> With Windows Live, you can organize, edit, and share your photos.
> http://www.windowslive.com/Desktop/PhotoGallery



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: adding parameters to a url - help please

2009-09-11 Thread Farshad Rabbani

Thank you Wes.  I thought I could have gotten around it without Javascript.  
The problem is, I have no idea how to get that started.  Can anyone provide me 
with sample javascript that could potentially assist me in getting this done?  
I would like to have both the id and the value from the selection box added to 
the url.  Any help would be greatly appreciated.

 

-Farshad

 

 

> You'll have to use javascript, the tags' output is rendered server
> side, when the jsp page is rendered.
> 
> -Wes


> >
> >  I would like to be able to add whatever is the currently selected 
> > option from my selection box as a parameter to the url shown below.  I am 
> > able to attach the id as a parameter but I cannot figure out how to do the 
> > same for the selection box.  I would greatly appreciate any assistance in 
> > doing this.  Thanks.


 

> >
> >  
> >  
> >  
> >  
> >  
> >   > list="editViewOptions" theme="simple"/>
> >  
> >  
> > 
> > 
> >  
> >  Edit
> >  
> >
> > _
> > With Windows Live, you can organize, edit, and share your photos.
> > http://www.windowslive.com/Desktop/PhotoGallery
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

RE: adding parameters to a url - help please

2009-09-11 Thread C N Davies
I haven't used struts for several years but can't you bind you table/listbox
to a bean property? 

Using RichFaces I can create a datatable, bind it to a bean property which
is of type UIComponent, then when the user clicks on the component the
OnClick action fires a bean action within which I can access that bean
property and retrieve the relevant data. Then you can generate the required
URL and forward to the required page using a JSF return or an struts action.

Just my 2c worth!

Chris



-Original Message-
From: Farshad Rabbani [mailto:farshadrabb...@hotmail.com] 
Sent: Saturday, 12 September 2009 12:43 AM
To: struts
Subject: RE: adding parameters to a url - help please


Thank you Wes.  I thought I could have gotten around it without Javascript.
The problem is, I have no idea how to get that started.  Can anyone provide
me with sample javascript that could potentially assist me in getting this
done?  I would like to have both the id and the value from the selection box
added to the url.  Any help would be greatly appreciated.

 

-Farshad

 

 

> You'll have to use javascript, the tags' output is rendered server
> side, when the jsp page is rendered.
> 
> -Wes


> >
> >  I would like to be able to add whatever is the currently selected
option from my selection box as a parameter to the url shown below.  I am
able to attach the id as a parameter but I cannot figure out how to do the
same for the selection box.  I would greatly appreciate any assistance in
doing this.  Thanks.


 

> >
> >  
> >  
> >  
> >  
> >  
> >  
> >  
> >  
> > 
> > 
> >  
> >  Edit
> >  
> >
> > _
> > With Windows Live, you can organize, edit, and share your photos.
> > http://www.windowslive.com/Desktop/PhotoGallery
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: excpetion chaining to custom exception handler issue

2009-09-11 Thread Denny Erinjery
Anybody have any ides about this??
I try to do an additional action class with  redirectAction after the
first chaining using a second action to avoid the 500 error but that
didn't help me, debugging into the ActionChain interceptor from xworks
shows that it went to an infinte error  after checking the
chaininghistory
Thanks


-Original Message-
From: Denny Erinjery [mailto:denny.erinj...@timelink.com] 
Sent: Thursday, September 10, 2009 3:04 PM
To: Struts Users Mailing List
Subject: excpetion chaining to custom exception handler issue

HI,
I'm using a global exception handler action class to get the exception
details and display it on a custom error page.
Following is the struts xml configuration


UnhandledExceptionHandler










/jsp/systemerror.jsp



Once my action class is invoked it will create my exception object using
the current exception set by the struts setter as well as I get more
details about the system at the time of the exception. In order to get
the exception forwarded to my action class from the action where the
exception occurs I use chaining in the result mapping
"
  "
This works and everything is populated on my error jsp page and the page
gets displayed as expected. Now if I refresh this error page, although
the actions go through the last exception path as expected, and my error
handler class is executed, it will not display the error page again this
time but will end up showing the following error=

HTTP Status 500 - Infinite recursion detected: [//loginAction!login,
//UnhandledExceptionHandler, //UnhandledExceptionHandler,
//UnhandledExceptionHandler] - [unknown location]
com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java
:203)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:361)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:265)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:4
68)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:395)

After this error if I refresh the above page(HTTP Status 500) , it will
once again show my error page and a refresh on that page will bring back
the error 500 again!!! This keeps on doing on consecutive refresh. This
will go away if I use "redierctAction" in place of "chain" but then I
will lost the information about the exception once it reached in my
exception handling action class Please tell me is this a problem on my
error handling or a sturts issue.

Thanks
Denny


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: excpetion chaining to custom exception handler issue

2009-09-11 Thread Wes Wannemacher
Your exception mapping is likely throwing an exception then... think
of it like this -

1 Action gets invoked
2  Oh-No! an exception -> go to the exception page
3 Exception page invoked
4  Oh-No! an exception -> go to #2

Xwork's chain result explicitly checks that an infinite chain sequence
isn't happening. That's more or less the only thing the chain result
checks, so I would make sure this isn't the case.

-Wes

On Fri, Sep 11, 2009 at 1:23 PM, Denny Erinjery
 wrote:
> Anybody have any ides about this??
> I try to do an additional action class with  redirectAction after the
> first chaining using a second action to avoid the 500 error but that
> didn't help me, debugging into the ActionChain interceptor from xworks
> shows that it went to an infinte error  after checking the
> chaininghistory
> Thanks
>
>
> -Original Message-
> From: Denny Erinjery [mailto:denny.erinj...@timelink.com]
> Sent: Thursday, September 10, 2009 3:04 PM
> To: Struts Users Mailing List
> Subject: excpetion chaining to custom exception handler issue
>
> HI,
> I'm using a global exception handler action class to get the exception
> details and display it on a custom error page.
> Following is the struts xml configuration
>        
>                        
>                                 name="actionName">UnhandledExceptionHandler
>                                
>                        
>        
>
>        
>             result="Excpetion"/>
>        
>
>
>         class="com.timelink.falco.wui.struts.handlers.GlobalException">
>                     type="dispatcher">/jsp/systemerror.jsp
>
>        
>
> Once my action class is invoked it will create my exception object using
> the current exception set by the struts setter as well as I get more
> details about the system at the time of the exception. In order to get
> the exception forwarded to my action class from the action where the
> exception occurs I use chaining in the result mapping
>        "
>                          "
> This works and everything is populated on my error jsp page and the page
> gets displayed as expected. Now if I refresh this error page, although
> the actions go through the last exception path as expected, and my error
> handler class is executed, it will not display the error page again this
> time but will end up showing the following error=
>
> HTTP Status 500 - Infinite recursion detected: [//loginAction!login,
> //UnhandledExceptionHandler, //UnhandledExceptionHandler,
> //UnhandledExceptionHandler] - [unknown location]
> com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java
> :203)
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
> ionInvocation.java:361)
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
> cation.java:265)
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
> :52)
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:4
> 68)
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
> .java:395)
>
> After this error if I refresh the above page(HTTP Status 500) , it will
> once again show my error page and a refresh on that page will bring back
> the error 500 again!!! This keeps on doing on consecutive refresh. This
> will go away if I use "redierctAction" in place of "chain" but then I
> will lost the information about the exception once it reached in my
> exception handling action class Please tell me is this a problem on my
> error handling or a sturts issue.
>
> Thanks
> Denny
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



[S2.1.6] problem with value attribute for

2009-09-11 Thread Tommy Pham
Hi,

I think I found another bug ... I want to include whatever parameters in URL to 
a form submit action.  This is what I used.



 or  shows the correct URL of:
/recipes/Admin/Languages?sort=isoCode2.

But when I use it in the :


or


The source code of the HTML shows:
/recipes/Admin/Languages

However, if I use action attribute instead of value, I get this:
/recipes/recipes/Admin/Languages?sort=isoCode2 

Which isn't what I want either and will get a 404 error as there isn't a 
servlet or Struts action mapped for it.  Is anyone else having this same 
problem?  Should I submit a bug report?

Thanks,
Tommy

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts 2 dojo jsonrpc SMD problem

2009-09-11 Thread _dnyanesh

Specify the jason interceptor stack including default struts interceptor
stack




true



and refer this in ur action def




true


true



Hope this helps.

@@@


RajibJana wrote:
> 
> Hi,
> 
> I am building a web application using Dojo 1.2.2 and struts 2.0.14 with
> spring plugin.
> 
> The application is using Dojo JSONservice to call the remote action
> methods using JSONPLUGIN.
> 
> The problem is that while all the interceptors ( defined in default stack)
> are called during creation of proxy object (by json rpc), no interceptors
> are called when the SMD method is called, it bypasses the interceptor
> stack. In fact, by calling SMD method, a new action instance is created,
> but none of the interceptors are called.
> 
> I want the session map set by the SessionAware interceptor to get some
> information like user details etc.
> 
> My question :
> 
> 1) How can I force struts2/spring to consider interceptor stack while
> creating an action instance when SMD method is called?
> 
> 2) Can I get the list of interceptors for a action class inside an action
> method ( SMD method)? Then I can call programmatically all the configured
> interceptors inside the SMD method.
> 
> Your help is urgently needed.
> 
> Regards
> 
> Rajib
> Product Architect
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-dojo-jsonrpc-SMD-problem-tp21286882p25407049.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Musachy Barroso
I didn't even know that form had a "value" attribute. You should not
use that. (this might be due to our all-tags-inherit-from-UIBean prom)

musachy

On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham  wrote:
> Hi,
>
> I think I found another bug ... I want to include whatever parameters in URL 
> to a form submit action.  This is what I used.
>
> 
>
>  or  value="%{#urlFormActive}"/> shows the correct URL of:
> /recipes/Admin/Languages?sort=isoCode2.
>
> But when I use it in the :
>
> 
> or
> 
>
> The source code of the HTML shows:
> /recipes/Admin/Languages
>
> However, if I use action attribute instead of value, I get this:
> /recipes/recipes/Admin/Languages?sort=isoCode2
>
> Which isn't what I want either and will get a 404 error as there isn't a 
> servlet or Struts action mapped for it.  Is anyone else having this same 
> problem?  Should I submit a bug report?
>
> Thanks,
> Tommy
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts jsp access java class

2009-09-11 Thread deepannair

Thanks Wes. it worked.

Wes Wannemacher wrote:
> 
>  test="%...@fully.qualified.package.propertiesconfig@getCaptchaEnabled()}" />
> 
> -Wes
> 
> On Fri, Sep 11, 2009 at 9:51 AM, deepannair  wrote:
>>
>> I have a properties class which has soem properties being loaded from a
>> remote system. In my jsp I need to access the java class. In traditional
>> jsp
>> I have
>> [code]
>> <%
>> /* CAPTCHA */
>> boolean captchaEnabledFlag=PropertiesConfig.getCaptchaEnabled();
>> %>
>> <%if (captchaEnabledFlag)  {%>
>> 
>>
>> <%} %>
>> [code]
>>
>> I want to change the if statement to  struts if  . How do I access
>> the
>> PropertiesConfig class directly from struts tag?
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-jsp-access-java-class-tp25401337p25401337.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-jsp-access-java-class-tp25401337p25408322.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Jexl expressions

2009-09-11 Thread Juan Pablo Pizarro
Hello all, I'm trying to solve a complex script with jexl. The script has
Map's, foreach and more. The objective is like a rule engine and then
evaluate a expression. Can I use jexl to do that?, Somebody has a sample?

Thanks!!

-- 

--
Visitá a CAECE - OSUM en:
http://osum.sun.com/group/caeceosum
--


Re: Jexl expressions

2009-09-11 Thread Dave Newton

Juan Pablo Pizarro wrote:

Hello all, I'm trying to solve a complex script with jexl. The script has
Map's, foreach and more. The objective is like a rule engine and then
evaluate a expression. Can I use jexl to do that?, Somebody has a sample?


Wrong mailing list, methinks.

Dave


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Tommy Pham
--- On Fri, 9/11/09, Musachy Barroso  wrote:

> From: Musachy Barroso 
> Subject: Re: [S2.1.6] problem with value attribute for 
> To: "Struts Users Mailing List" 
> Date: Friday, September 11, 2009, 3:17 PM
> I didn't even know that form had a
> "value" attribute. You should not
> use that. (this might be due to our
> all-tags-inherit-from-UIBean prom)
> 
> musachy
> 

Hi Musachy,

Thanks for the reply.  After going over the tags reference several times, I 
can't seem to figure out the simplest way to get all of the parameters in the 
URL as I'd like.  If use the form's action attribute in conjunction with , I get an extra context path inserted.  What do you recommend since the 
 doesn't have 'includeParams' like ?

Thanks,
Tommy

> On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham 
> wrote:
> > Hi,
> >
> > I think I found another bug ... I want to include
> whatever parameters in URL to a form submit action.  This
> is what I used.
> >
> >  />
> >
> >  or
>  shows the
> correct URL of:
> > /recipes/Admin/Languages?sort=isoCode2.
> >
> > But when I use it in the :
> >
> >  value="%{urlFormActive}">
> > or
> >  value="%{#urlFormActive}">
> >
> > The source code of the HTML shows:
> > /recipes/Admin/Languages
> >
> > However, if I use action attribute instead of value, I
> get this:
> > /recipes/recipes/Admin/Languages?sort=isoCode2
> >
> > Which isn't what I want either and will get a 404
> error as there isn't a servlet or Struts action mapped for
> it.  Is anyone else having this same problem?  Should I
> submit a bug report?
> >
> > Thanks,
> > Tommy
> >
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink
> Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Tommy Pham
--- On Fri, 9/11/09, Tommy Pham  wrote:

> From: Tommy Pham 
> Subject: Re: [S2.1.6] problem with value attribute for 
> To: "Struts Users Mailing List" 
> Date: Friday, September 11, 2009, 5:55 PM
> --- On Fri, 9/11/09, Musachy Barroso
> 
> wrote:
> 
> > From: Musachy Barroso 
> > Subject: Re: [S2.1.6] problem with value attribute for
> 
> > To: "Struts Users Mailing List" 
> > Date: Friday, September 11, 2009, 3:17 PM
> > I didn't even know that form had a
> > "value" attribute. You should not
> > use that. (this might be due to our
> > all-tags-inherit-from-UIBean prom)
> > 
> > musachy
> > 
> 
> Hi Musachy,
> 
> Thanks for the reply.  After going over the tags
> reference several times, I can't seem to figure out the
> simplest way to get all of the parameters in the URL as I'd
> like.  If use the form's action attribute in
> conjunction with , I get an extra context
> path inserted.  What do you recommend since the
>  doesn't have 'includeParams' like
> ?
> 
> Thanks,
> Tommy

Hi Musachy,

I decided to use the HTML  instead.

Thanks,
Tommy

> 
> > On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham 
> > wrote:
> > > Hi,
> > >
> > > I think I found another bug ... I want to
> include
> > whatever parameters in URL to a form submit action.
>  This
> > is what I used.
> > >
> > >  includeParams="get"
> > />
> > >
> > >  or
> >  shows
> the
> > correct URL of:
> > > /recipes/Admin/Languages?sort=isoCode2.
> > >
> > > But when I use it in the :
> > >
> > >  method="post"
> > value="%{urlFormActive}">
> > > or
> > >  method="post"
> > value="%{#urlFormActive}">
> > >
> > > The source code of the HTML shows:
> > > /recipes/Admin/Languages
> > >
> > > However, if I use action attribute instead of
> value, I
> > get this:
> > > /recipes/recipes/Admin/Languages?sort=isoCode2
> > >
> > > Which isn't what I want either and will get a
> 404
> > error as there isn't a servlet or Struts action mapped
> for
> > it.  Is anyone else having this same problem?
>  Should I
> > submit a bug report?
> > >
> > > Thanks,
> > > Tommy
> > >
> > >
> >
> -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > >
> > 
> > 
> > 
> > -- 
> > "Hey you! Would you help me to carry the stone?" Pink
> > Floyd
> > 
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> > 
> >
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Musachy Barroso
the url tag has an attribute to include/exclude the context, if I
don't remember wrong.

On Fri, Sep 11, 2009 at 4:30 PM, Tommy Pham  wrote:
> --- On Fri, 9/11/09, Tommy Pham  wrote:
>
>> From: Tommy Pham 
>> Subject: Re: [S2.1.6] problem with value attribute for 
>> To: "Struts Users Mailing List" 
>> Date: Friday, September 11, 2009, 5:55 PM
>> --- On Fri, 9/11/09, Musachy Barroso
>> 
>> wrote:
>>
>> > From: Musachy Barroso 
>> > Subject: Re: [S2.1.6] problem with value attribute for
>> 
>> > To: "Struts Users Mailing List" 
>> > Date: Friday, September 11, 2009, 3:17 PM
>> > I didn't even know that form had a
>> > "value" attribute. You should not
>> > use that. (this might be due to our
>> > all-tags-inherit-from-UIBean prom)
>> >
>> > musachy
>> >
>>
>> Hi Musachy,
>>
>> Thanks for the reply.  After going over the tags
>> reference several times, I can't seem to figure out the
>> simplest way to get all of the parameters in the URL as I'd
>> like.  If use the form's action attribute in
>> conjunction with , I get an extra context
>> path inserted.  What do you recommend since the
>>  doesn't have 'includeParams' like
>> ?
>>
>> Thanks,
>> Tommy
>
> Hi Musachy,
>
> I decided to use the HTML  instead.
>
> Thanks,
> Tommy
>
>>
>> > On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham 
>> > wrote:
>> > > Hi,
>> > >
>> > > I think I found another bug ... I want to
>> include
>> > whatever parameters in URL to a form submit action.
>>  This
>> > is what I used.
>> > >
>> > > > includeParams="get"
>> > />
>> > >
>> > >  or
>> >  shows
>> the
>> > correct URL of:
>> > > /recipes/Admin/Languages?sort=isoCode2.
>> > >
>> > > But when I use it in the :
>> > >
>> > > > method="post"
>> > value="%{urlFormActive}">
>> > > or
>> > > > method="post"
>> > value="%{#urlFormActive}">
>> > >
>> > > The source code of the HTML shows:
>> > > /recipes/Admin/Languages
>> > >
>> > > However, if I use action attribute instead of
>> value, I
>> > get this:
>> > > /recipes/recipes/Admin/Languages?sort=isoCode2
>> > >
>> > > Which isn't what I want either and will get a
>> 404
>> > error as there isn't a servlet or Struts action mapped
>> for
>> > it.  Is anyone else having this same problem?
>>  Should I
>> > submit a bug report?
>> > >
>> > > Thanks,
>> > > Tommy
>> > >
>> > >
>> >
>> -
>> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > > For additional commands, e-mail: user-h...@struts.apache.org
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > "Hey you! Would you help me to carry the stone?" Pink
>> > Floyd
>> >
>> >
>> -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: [S2.1.6] problem with value attribute for

2009-09-11 Thread Martin Gainty

the attribute is called includeContext (if i am not incorrect) 

http://struts.apache.org/2.0.11.2/docs/url.html

double-negatives anyone?
Martin 
__ 
If you are not the intended recipient you are requested not to read the 
transmission



> Date: Fri, 11 Sep 2009 16:34:00 -0700
> Subject: Re: [S2.1.6] problem with value attribute for 
> From: musa...@gmail.com
> To: user@struts.apache.org
> 
> the url tag has an attribute to include/exclude the context, if I
> don't remember wrong.
> 
> On Fri, Sep 11, 2009 at 4:30 PM, Tommy Pham  wrote:
> > --- On Fri, 9/11/09, Tommy Pham  wrote:
> >
> >> From: Tommy Pham 
> >> Subject: Re: [S2.1.6] problem with value attribute for 
> >> To: "Struts Users Mailing List" 
> >> Date: Friday, September 11, 2009, 5:55 PM
> >> --- On Fri, 9/11/09, Musachy Barroso
> >> 
> >> wrote:
> >>
> >> > From: Musachy Barroso 
> >> > Subject: Re: [S2.1.6] problem with value attribute for
> >> 
> >> > To: "Struts Users Mailing List" 
> >> > Date: Friday, September 11, 2009, 3:17 PM
> >> > I didn't even know that form had a
> >> > "value" attribute. You should not
> >> > use that. (this might be due to our
> >> > all-tags-inherit-from-UIBean prom)
> >> >
> >> > musachy
> >> >
> >>
> >> Hi Musachy,
> >>
> >> Thanks for the reply.  After going over the tags
> >> reference several times, I can't seem to figure out the
> >> simplest way to get all of the parameters in the URL as I'd
> >> like.  If use the form's action attribute in
> >> conjunction with , I get an extra context
> >> path inserted.  What do you recommend since the
> >>  doesn't have 'includeParams' like
> >> ?
> >>
> >> Thanks,
> >> Tommy
> >
> > Hi Musachy,
> >
> > I decided to use the HTML  instead.
> >
> > Thanks,
> > Tommy
> >
> >>
> >> > On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham 
> >> > wrote:
> >> > > Hi,
> >> > >
> >> > > I think I found another bug ... I want to
> >> include
> >> > whatever parameters in URL to a form submit action.
> >>  This
> >> > is what I used.
> >> > >
> >> > >  >> includeParams="get"
> >> > />
> >> > >
> >> > >  or
> >> >  shows
> >> the
> >> > correct URL of:
> >> > > /recipes/Admin/Languages?sort=isoCode2.
> >> > >
> >> > > But when I use it in the :
> >> > >
> >> > >  >> method="post"
> >> > value="%{urlFormActive}">
> >> > > or
> >> > >  >> method="post"
> >> > value="%{#urlFormActive}">
> >> > >
> >> > > The source code of the HTML shows:
> >> > > /recipes/Admin/Languages
> >> > >
> >> > > However, if I use action attribute instead of
> >> value, I
> >> > get this:
> >> > > /recipes/recipes/Admin/Languages?sort=isoCode2
> >> > >
> >> > > Which isn't what I want either and will get a
> >> 404
> >> > error as there isn't a servlet or Struts action mapped
> >> for
> >> > it.  Is anyone else having this same problem?
> >>  Should I
> >> > submit a bug report?
> >> > >
> >> > > Thanks,
> >> > > Tommy
> >> > >
> >> > >
> >> >
> >> -
> >> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> > > For additional commands, e-mail: user-h...@struts.apache.org
> >> > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > "Hey you! Would you help me to carry the stone?" Pink
> >> > Floyd
> >> >
> >> >
> >> -
> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> > For additional commands, e-mail: user-h...@struts.apache.org
> >> >
> >> >
> >>
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Dave Newton

Tommy Pham wrote:

After going over the tags reference several times, I can't seem to
figure out the simplest way to get all of the parameters in the URL
as I'd like.  If use the form's action attribute in conjunction with
, I get an extra context path inserted.  What do you
recommend since the  doesn't have 'includeParams' like
?


Personally, I'd put those params into hidden fields rather than mixing 
POST params with URL/GET params.


Dave


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Tommy Pham
--- On Fri, 9/11/09, Musachy Barroso  wrote:

> From: Musachy Barroso 
> Subject: Re: [S2.1.6] problem with value attribute for 
> To: "Struts Users Mailing List" 
> Date: Friday, September 11, 2009, 6:34 PM
> the url tag has an attribute to
> include/exclude the context, if I
> don't remember wrong.

Thanks!! I don't know how I missed it...

> 
> On Fri, Sep 11, 2009 at 4:30 PM, Tommy Pham 
> wrote:
> > --- On Fri, 9/11/09, Tommy Pham 
> wrote:
> >
> >> From: Tommy Pham 
> >> Subject: Re: [S2.1.6] problem with value attribute
> for 
> >> To: "Struts Users Mailing List" 
> >> Date: Friday, September 11, 2009, 5:55 PM
> >> --- On Fri, 9/11/09, Musachy Barroso
> >> 
> >> wrote:
> >>
> >> > From: Musachy Barroso 
> >> > Subject: Re: [S2.1.6] problem with value
> attribute for
> >> 
> >> > To: "Struts Users Mailing List" 
> >> > Date: Friday, September 11, 2009, 3:17 PM
> >> > I didn't even know that form had a
> >> > "value" attribute. You should not
> >> > use that. (this might be due to our
> >> > all-tags-inherit-from-UIBean prom)
> >> >
> >> > musachy
> >> >
> >>
> >> Hi Musachy,
> >>
> >> Thanks for the reply.  After going over the tags
> >> reference several times, I can't seem to figure
> out the
> >> simplest way to get all of the parameters in the
> URL as I'd
> >> like.  If use the form's action attribute in
> >> conjunction with , I get an extra
> context
> >> path inserted.  What do you recommend since the
> >>  doesn't have 'includeParams' like
> >> ?
> >>
> >> Thanks,
> >> Tommy
> >
> > Hi Musachy,
> >
> > I decided to use the HTML  instead.
> >
> > Thanks,
> > Tommy
> >
> >>
> >> > On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham
> 
> >> > wrote:
> >> > > Hi,
> >> > >
> >> > > I think I found another bug ... I want
> to
> >> include
> >> > whatever parameters in URL to a form submit
> action.
> >>  This
> >> > is what I used.
> >> > >
> >> > >  >> includeParams="get"
> >> > />
> >> > >
> >> > >  value="%{urlFormActive}"/> or
> >> > 
> shows
> >> the
> >> > correct URL of:
> >> > > /recipes/Admin/Languages?sort=isoCode2.
> >> > >
> >> > > But when I use it in the
> :
> >> > >
> >> > >  enctype="multipart/form-data"
> >> method="post"
> >> > value="%{urlFormActive}">
> >> > > or
> >> > >  enctype="multipart/form-data"
> >> method="post"
> >> > value="%{#urlFormActive}">
> >> > >
> >> > > The source code of the HTML shows:
> >> > > /recipes/Admin/Languages
> >> > >
> >> > > However, if I use action attribute
> instead of
> >> value, I
> >> > get this:
> >> > >
> /recipes/recipes/Admin/Languages?sort=isoCode2
> >> > >
> >> > > Which isn't what I want either and will
> get a
> >> 404
> >> > error as there isn't a servlet or Struts
> action mapped
> >> for
> >> > it.  Is anyone else having this same
> problem?
> >>  Should I
> >> > submit a bug report?
> >> > >
> >> > > Thanks,
> >> > > Tommy
> >> > >
> >> > >
> >> >
> >>
> -
> >> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> > > For additional commands, e-mail: user-h...@struts.apache.org
> >> > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > "Hey you! Would you help me to carry the
> stone?" Pink
> >> > Floyd
> >> >
> >> >
> >>
> -
> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> > For additional commands, e-mail: user-h...@struts.apache.org
> >> >
> >> >
> >>
> >
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink
> Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2.1.6] problem with value attribute for

2009-09-11 Thread Tommy Pham
--- On Fri, 9/11/09, Dave Newton  wrote:

> From: Dave Newton 
> Subject: Re: [S2.1.6] problem with value attribute for 
> To: "Struts Users Mailing List" 
> Date: Friday, September 11, 2009, 7:14 PM
> Tommy Pham wrote:
> > After going over the tags reference several times, I
> can't seem to
> > figure out the simplest way to get all of the
> parameters in the URL
> > as I'd like.  If use the form's action attribute
> in conjunction with
> > , I get an extra context path
> inserted.  What do you
> > recommend since the  doesn't have
> 'includeParams' like
> > ?
> 
> Personally, I'd put those params into hidden fields rather
> than mixing POST params with URL/GET params.
> 
> Dave
> 
> 

Hi Dave,

It's for SEF/SEO URL rewrite which I'll implement later.

Thanks,
Tommy

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Formatting in extended theme using Freemarker

2009-09-11 Thread ashwin ala
We currently display BigDecimal values in  tags in our jsps.
These values need to be formatted to display as currency values. Example:
"123.35" should display as "123.35"
I extended the simple theme to create a currency theme using only the
text.ftl template file. I basically copied the text.ftl to
/template/currency and changed this line:

<#if parameters.nameValue??>
 value="<@s.property value="parameters.nameValue"/>"<#rt/>


to this:
<#if parameters.nameValue??>
 value="<@s.property
value="%{getText('{0,number,#.00}',{parameters.nameValue})}"/>"<#rt/>


This does not work and gives a template error like
 (WARNING: Parameters: Invalid chunk ignored.).

The extended theme by itself does work as this line works:
<#if parameters.nameValue??>
 value="<@s.property value="parameters.nameValue*5"/>"<#rt/>

...which multiplies the bigdecimal value by 5 before displaying.

So can anyone let us know what is the best way to apply formatting in an
extended theme in a freemarker template? We also have some date values that
need formatting so will create another theme for that. I could add getText()
to each  tag explicitly but specifying a theme that handles the
formatting seems a lot cleaner. I have also tried freemarker formatting like
the one below with no success

${x?string("0.##")}

Any help or pointers would be much appreciated.

thanks
ash.