Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 5 Aug 2008 12:04:36 -0000 Issue 8179

user-digest-help

2008-08-05


Author LoginPost Reply

user Digest 5 Aug 2008 12:04:36 -0000 Issue 8179

Topics (messages 189697 through 189716):

[S2] what tag to use to get object's field?
 189697 by: xianwinwin
 189699 by: Gabriel Belingueres

Re: FilterDispatcher and filter mapping
 189698 by: Wes Wannemacher
 189711 by: stanlick.gmail.com

Re: Issue with Url mapping with struts-action-extension=""
 189700 by: Haulyn R. Jason
 189701 by: Chris Pratt
 189706 by: Haulyn R. Jason
 189712 by: stanlick.gmail.com

FireFox 3 and Form Bean in Session
 189702 by: Balwinder

Re: Struts 1.3.8 problem html:form
 189703 by: Antonio Petrelli

Tags url and form
 189704 by: Kibo
 189708 by: Gabriel Belingueres

[S2] Validating Forms with Wildcard Mapping
 189705 by: Markus Stauffer
 189709 by: Gabriel Belingueres
 189710 by: Markus Stauffer
 189716 by: Jim Kiley

HowTo: transfer parameter between actions?
 189707 by: holod
 189713 by: stanlick.gmail.com
 189715 by: holod

Re: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found
 189714 by: doahh

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_189697.ezm (zipped)

hi there,
say I have an object client and it has firstName and lastName. I wish to
write this on the jsp page:

Dear Mr. XXXXXX welcome to....


the XXXXXX should be substitute with firstName and lastName.

what tag should be used in order to achieve this?

thank you!


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


Attachment: user_189699.ezm (zipped)
<s:property>

2008/8/4 xianwinwin <xianwinwin@(protected)>:
>
> hi there,
> say I have an object client and it has firstName and lastName. I wish to
> write this on the jsp page:
>
> Dear Mr. XXXXXX welcome to....
>
>
> the XXXXXX should be substitute with firstName and lastName.
>
> what tag should be used in order to achieve this?
>
> thank you!
>
>
> --
> View this message in context: http://www.nabble.com/-S2--what-tag-to-use-to-get-object%27s-field--tp18821594p18821594.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189698.ezm (zipped)
Generally, I just map everything through the dispatcher. I find s2
actions/results more friendly than straight up JSP and/or Servlets...

Beyond that, if you're incorporating something that doesn't already have
a result type, would it be a good candidate for a plugin?

-Wes

On Mon, 2008-08-04 at 12:27 -0700, stanlick wrote:
> I am experimenting with a non-Struts resource mapped in my web.xml but since
> the Struts filter is catching all requests, I am getting
>
> There is no Action mapped for namespace / and action name callout. -
> [unknown location]
>
> How do requests for non-action mappings sneak through the FilterDispatcher?
>
>


Attachment: user_189711.ezm (zipped)
Thanks bro! I generally agree with you, but was curious about the hard/fast
rule. I discovered the dispatcher actually "processes" only registered
extensions and unfortunately a zero length string was in the list alongside
action. I changed my experimental resource mapping to .fred and all is
well.

P.S. Where is that book dude? I have AMX in hand.

Peace,
Scott

On Mon, Aug 4, 2008 at 7:31 PM, Wes Wannemacher <wesw@(protected):

> Generally, I just map everything through the dispatcher. I find s2
> actions/results more friendly than straight up JSP and/or Servlets...
>
> Beyond that, if you're incorporating something that doesn't already have
> a result type, would it be a good candidate for a plugin?
>
> -Wes
>
> On Mon, 2008-08-04 at 12:27 -0700, stanlick wrote:
> > I am experimenting with a non-Struts resource mapped in my web.xml but
> since
> > the Struts filter is catching all requests, I am getting
> >
> > There is no Action mapped for namespace / and action name callout. -
> > [unknown location]
> >
> > How do requests for non-action mappings sneak through the
> FilterDispatcher?
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189700.ezm (zipped)
Martin Gainty 写道:
> check to make sure your jsp is in webapps/webapplication
>
> check the 'work' folder to see if the jsp compiled
>
> e.g. index.jsp would look like
>
> _index__jsp.class
> *
> which means
>
> a)index.jsp was compiled to _index__jsp.java
>
> b)_index__jsp.java was compiled to _index__jsp.class
>
>
> HTH
> *
> Martin
>
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and
> Sender does not endorse distribution to any party other than intended
> recipient. Sender does not necessarily endorse content contained
> within this transmission.
>
>
> > Date: Mon, 4 Aug 2008 17:23:45 +0800
> > From: saharabear@(protected)
> > To: user@(protected)
> > Subject: Re: Issue with Url mapping with struts-action-extension=""
> >
> > Jeromy Evans 写道:
> > > Haulyn R. Jason wrote:
> > >
> > >> Hi,all
> > >> I set struts-action-extension="" for no extension as "action" or
> "do" by
> > >> default for struts2, and mapping all url to struts2 dispatcher as
> "/*".
> > >> But, the problem is I can not access any jsp, html,css and js
> files. The
> > >> page display:there are no action mapping for XXX.jsp action.
> > >> Should any one give me some suggestions or referenced links? Always
> > >> thanks very much.
> > >>
> > >>
> > >>
> > >
> > > I'm not sure if your setting is interpreted as blank, not set
> (default)
> > > or null.
> > >
> > > Did your jsp, html, css and js work before you made that change?
> > >
> > > The process works like this:
> > > 1. the container sees the request and maps it to the Strust2
> > > FilterDispatcher because it matches /*
> > > 2. the FilterDispatcher checks whether the request contains a known
> > > action extension, and if so, invokes the ActionMapper
> > > 3. If the ActionMapper didn't find anything, the FilterDispatcher
> checks
> > > if there's struts static resource for the request (if
> > > serve.static.resource=true)
> > > 4. If nothing matched, the filter does nothing
> > > 5. If nothing has processed the request, the container eventually
> > > invokes the Default Servlet (and JSP handling, other file handling)
> > >
> > > So there's two possible problems:
> > > a. the FilterDispatcher thinks it can handle everything and tries to,
> > > causing an error; or
> > > b. there is a configuration problem with the container (eg. the
> default
> > > servlet is disabled or the request never reached the container).
> > >
> > > In case it is a, I would try the following settings:
> > >
> > > struts.action.extension=,,action
> > >
> > > Note the double comma. That means a blank (no extension), or .action
> > > extension. The double-comma ensures blank isn't trimmed as whitespace.
> > >
> > > Hope that helps,
> > > Jeromy Evans
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > >
> > Hi, Evans
> >
> > Thanks for your answer, it looks very useful but some new problem
> occurred:
> >
> > When I set
> >
> > "struts.action.extension="
> >
> > value as "" with no space or " "(same as before with one whitespace)
> >
> > Struts treat all html, js, css and jsp as action, but all real
> actions work well.
> >
> > Without struts 2 FilterDispatcher, everything works well.(Certainly
> real action can not work)
> >
> > Then I tried your solution as:
> > struts.action.extension=,,action
> >
> > but modified as
> > struts.action.extension=,,jsps
> >
> > ok, this time, when I visit http://localhost:8080/8f/myAction.jsps,
> everything works well,but I can not access to
> > http://localhost:8080/8f/myAction without any extension.
> >
> > And something interesting occurred: I can access
> "http://localhost:8080/8f/myAction." and everything works well.
> > I mean, I can not visit myAction with no extension but I can visit
> myAction "with extension":".", just a "."
> >
> > I am not sure what's wrong with my configuration. And I use
> struts2.0.11.1.
> >
> >
> >
> >
> >
> > --
> >
> > Thanks!
> >
> > Mobile: +086-15864011231
> > EMail&gtalk:saharabear@(protected)
> > EMail&yahoo:jia_haolin@(protected)
> > Skype:saharabear
> >
> >
> > Haulyn Runner Jason
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
>
> ------------------------------------------------------------------------
> Reveal your inner athlete and share it with friends on Windows Live.
> Share now!
> <http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us>
Hi,Martin
Thanks for your answer, maybe this is the problem, but I am not sure.

all my jsps are compiled, but not _index__jsp.java, all jsps are
compiled as index__jsp.java, without prefix "_". I am not sure what's
wrong with it.


--

Thanks!

Mobile: +086-15864011231
EMail&gtalk:saharabear@(protected)
EMail&yahoo:jia_haolin@(protected)
Skype:saharabear


贾昊林(Haulyn Runner Jason)


Attachment: user_189701.ezm (zipped)
In your web.xml, you told the system to send ALL requests to the Struts
Filter processor, so it's trying to map EVERYTHING including *.css, *.js
etc. You might want to try explicitly mapping those things to the
dispatcher before mapping the struts filter, that should make them bypass
struts as you want.
(*Chris*)

2008/8/4 Haulyn R. Jason <saharabear@(protected)>

> Jeromy Evans 写道:
> > Haulyn R. Jason wrote:
> >
> >> Hi,all
> >> I set struts-action-extension="" for no extension as "action" or "do" by
> >> default for struts2, and mapping all url to struts2 dispatcher as "/*".
> >> But, the problem is I can not access any jsp, html,css and js files. The
> >> page display:there are no action mapping for XXX.jsp action.
> >> Should any one give me some suggestions or referenced links? Always
> >> thanks very much.
> >>
> >>
> >>
> >
> > I'm not sure if your setting is interpreted as blank, not set (default)
> > or null.
> >
> > Did your jsp, html, css and js work before you made that change?
> >
> > The process works like this:
> > 1. the container sees the request and maps it to the Strust2
> > FilterDispatcher because it matches /*
> > 2. the FilterDispatcher checks whether the request contains a known
> > action extension, and if so, invokes the ActionMapper
> > 3. If the ActionMapper didn't find anything, the FilterDispatcher checks
> > if there's struts static resource for the request (if
> > serve.static.resource=true)
> > 4. If nothing matched, the filter does nothing
> > 5. If nothing has processed the request, the container eventually
> > invokes the Default Servlet (and JSP handling, other file handling)
> >
> > So there's two possible problems:
> > a. the FilterDispatcher thinks it can handle everything and tries to,
> > causing an error; or
> > b. there is a configuration problem with the container (eg. the default
> > servlet is disabled or the request never reached the container).
> >
> > In case it is a, I would try the following settings:
> >
> > struts.action.extension=,,action
> >
> > Note the double comma. That means a blank (no extension), or .action
> > extension. The double-comma ensures blank isn't trimmed as whitespace.
> >
> > Hope that helps,
> > Jeromy Evans
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
> Hi, Evans
>
> Thanks for your answer, it looks very useful but some new problem occurred:
>
> When I set
>
> "struts.action.extension="
>
> value as "" with no space or " "(same as before with one whitespace)
>
> Struts treat all html, js, css and jsp as action, but all real actions work
> well.
>
> Without struts 2 FilterDispatcher, everything works well.(Certainly real
> action can not work)
>
> Then I tried your solution as:
> struts.action.extension=,,action
>
> but modified as
> struts.action.extension=,,jsps
>
> ok, this time, when I visit http://localhost:8080/8f/myAction.jsps,
> everything works well,but I can not access to
> http://localhost:8080/8f/myAction without any extension.
>
> And something interesting occurred: I can access "
> http://localhost:8080/8f/myAction." and everything works well.
> I mean, I can not visit myAction with no extension but I can visit myAction
> "with extension":".", just a "."
>
> I am not sure what's wrong with my configuration. And I use struts2.0.11.1.
>
>
>
>
>
> --
>
> Thanks!
>
> Mobile: +086-15864011231
> EMail&gtalk:saharabear@(protected)>
> EMail&yahoo:jia_haolin@(protected)>
> Skype:saharabear
>
>
> Haulyn Runner Jason
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189706.ezm (zipped)
Chris Pratt 写道:
> In your web.xml, you told the system to send ALL requests to the
> Struts Filter processor, so it's trying to map EVERYTHING including
> *.css, *.js etc. You might want to try explicitly mapping those things
> to the dispatcher before mapping the struts filter, that should make
> them bypass struts as you want.
> (*Chris*)
>
> 2008/8/4 Haulyn R. Jason <saharabear@(protected)
> <mailto:saharabear@(protected)>>
>
>   Jeromy Evans 写道:
>   > Haulyn R. Jason wrote:
>   >
>   >> Hi,all
>   >> I set struts-action-extension="" for no extension as "action"
>   or "do" by
>   >> default for struts2, and mapping all url to struts2 dispatcher
>   as "/*".
>   >> But, the problem is I can not access any jsp, html,css and js
>   files. The
>   >> page display:there are no action mapping for XXX.jsp action.
>   >> Should any one give me some suggestions or referenced links? Always
>   >> thanks very much.
>   >>
>   >>
>   >>
>   >
>   > I'm not sure if your setting is interpreted as blank, not set
>   (default)
>   > or null.
>   >
>   > Did your jsp, html, css and js work before you made that change?
>   >
>   > The process works like this:
>   > 1. the container sees the request and maps it to the Strust2
>   > FilterDispatcher because it matches /*
>   > 2. the FilterDispatcher checks whether the request contains a known
>   > action extension, and if so, invokes the ActionMapper
>   > 3. If the ActionMapper didn't find anything, the
>   FilterDispatcher checks
>   > if there's struts static resource for the request (if
>   > serve.static.resource=true)
>   > 4. If nothing matched, the filter does nothing
>   > 5. If nothing has processed the request, the container eventually
>   > invokes the Default Servlet (and JSP handling, other file handling)
>   >
>   > So there's two possible problems:
>   > a. the FilterDispatcher thinks it can handle everything and
>   tries to,
>   > causing an error; or
>   > b. there is a configuration problem with the container (eg. the
>   default
>   > servlet is disabled or the request never reached the container).
>   >
>   > In case it is a, I would try the following settings:
>   >
>   > struts.action.extension=,,action
>   >
>   > Note the double comma. That means a blank (no extension), or .action
>   > extension. The double-comma ensures blank isn't trimmed as
>   whitespace.
>   >
>   > Hope that helps,
>   > Jeromy Evans
>   >
>   >
>   >
>   >
>   ---------------------------------------------------------------------
>   > To unsubscribe, e-mail: user-unsubscribe@(protected)
>   <mailto:user-unsubscribe@(protected)>
>   > For additional commands, e-mail: user-help@(protected)
>   <mailto:user-help@(protected)>
>   >
>   >
>   >
>   Hi, Evans
>
>   Thanks for your answer, it looks very useful but some new problem
>   occurred:
>
>   When I set
>
>   "struts.action.extension="
>
>   value as "" with no space or " "(same as before with one whitespace)
>
>   Struts treat all html, js, css and jsp as action, but all real
>   actions work well.
>
>   Without struts 2 FilterDispatcher, everything works
>   well.(Certainly real action can not work)
>
>   Then I tried your solution as:
>   struts.action.extension=,,action
>
>   but modified as
>   struts.action.extension=,,jsps
>
>   ok, this time, when I visit
>   http://localhost:8080/8f/myAction.jsps, everything works well,but
>   I can not access to
>   http://localhost:8080/8f/myAction without any extension.
>
>   And something interesting occurred: I can access
>   "http://localhost:8080/8f/myAction." and everything works well.
>   I mean, I can not visit myAction with no extension but I can visit
>   myAction "with extension":".", just a "."
>
>   I am not sure what's wrong with my configuration. And I use
>   struts2.0.11.1.
>
>
>
>
>
>   --
>
>   Thanks!
>
>   Mobile: +086-15864011231
>   EMail&gtalk:saharabear@(protected)
>   <mailto:EMail%26gtalk%3Asaharabear@(protected)>
>   EMail&yahoo:jia_haolin@(protected)
>   <mailto:EMail%26yahoo%3Ajia_haolin@(protected)>
>   Skype:saharabear
>
>
>   Haulyn Runner Jason
>
>
>   ---------------------------------------------------------------------
>   To unsubscribe, e-mail: user-unsubscribe@(protected)
>   <mailto:user-unsubscribe@(protected)>
>   For additional commands, e-mail: user-help@(protected)
>   <mailto:user-help@(protected)>
>
>
Hi Chris
Thanks for your answer, it's another good way. but:
1.How can I configure web.xml to exclude .css ,.js or other way?
2.If I use Evans' way, it looks worked well but just need a "."..Struts
do not have a solution for these?

Thanks

--

Thanks!

Mobile: +086-15864011231
EMail&gtalk:saharabear@(protected)
EMail&yahoo:jia_haolin@(protected)
Skype:saharabear


贾昊林(Haulyn Runner Jason)


Attachment: user_189712.ezm (zipped)
dispatcher will "try" to find an action mapping for the URL. If it cannot,
it processes the request as a static resource. As you have already
discovered, even though it is mapped in web.xml as /* it will actually
consult with your registered extension(s) in its logic.

Scott

2008/8/5 Chris Pratt <thechrispratt@(protected)>

> In your web.xml, you told the system to send ALL requests to the Struts
> Filter processor, so it's trying to map EVERYTHING including *.css, *.js
> etc. You might want to try explicitly mapping those things to the
> dispatcher before mapping the struts filter, that should make them bypass
> struts as you want.
> (*Chris*)
>
> 2008/8/4 Haulyn R. Jason <saharabear@(protected)>
>
> > Jeromy Evans 写道:
> > > Haulyn R. Jason wrote:
> > >
> > >> Hi,all
> > >> I set struts-action-extension="" for no extension as "action" or "do"
> by
> > >> default for struts2, and mapping all url to struts2 dispatcher as
> "/*".
> > >> But, the problem is I can not access any jsp, html,css and js files.
> The
> > >> page display:there are no action mapping for XXX.jsp action.
> > >> Should any one give me some suggestions or referenced links? Always
> > >> thanks very much.
> > >>
> > >>
> > >>
> > >
> > > I'm not sure if your setting is interpreted as blank, not set (default)
> > > or null.
> > >
> > > Did your jsp, html, css and js work before you made that change?
> > >
> > > The process works like this:
> > > 1. the container sees the request and maps it to the Strust2
> > > FilterDispatcher because it matches /*
> > > 2. the FilterDispatcher checks whether the request contains a known
> > > action extension, and if so, invokes the ActionMapper
> > > 3. If the ActionMapper didn't find anything, the FilterDispatcher
> checks
> > > if there's struts static resource for the request (if
> > > serve.static.resource=true)
> > > 4. If nothing matched, the filter does nothing
> > > 5. If nothing has processed the request, the container eventually
> > > invokes the Default Servlet (and JSP handling, other file handling)
> > >
> > > So there's two possible problems:
> > > a. the FilterDispatcher thinks it can handle everything and tries to,
> > > causing an error; or
> > > b. there is a configuration problem with the container (eg. the default
> > > servlet is disabled or the request never reached the container).
> > >
> > > In case it is a, I would try the following settings:
> > >
> > > struts.action.extension=,,action
> > >
> > > Note the double comma. That means a blank (no extension), or .action
> > > extension. The double-comma ensures blank isn't trimmed as whitespace.
> > >
> > > Hope that helps,
> > > Jeromy Evans
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > >
> > Hi, Evans
> >
> > Thanks for your answer, it looks very useful but some new problem
> occurred:
> >
> > When I set
> >
> > "struts.action.extension="
> >
> > value as "" with no space or " "(same as before with one whitespace)
> >
> > Struts treat all html, js, css and jsp as action, but all real actions
> work
> > well.
> >
> > Without struts 2 FilterDispatcher, everything works well.(Certainly real
> > action can not work)
> >
> > Then I tried your solution as:
> > struts.action.extension=,,action
> >
> > but modified as
> > struts.action.extension=,,jsps
> >
> > ok, this time, when I visit http://localhost:8080/8f/myAction.jsps,
> > everything works well,but I can not access to
> > http://localhost:8080/8f/myAction without any extension.
> >
> > And something interesting occurred: I can access "
> > http://localhost:8080/8f/myAction." and everything works well.
> > I mean, I can not visit myAction with no extension but I can visit
> myAction
> > "with extension":".", just a "."
> >
> > I am not sure what's wrong with my configuration. And I use
> struts2.0.11.1.
> >
> >
> >
> >
> >
> > --
> >
> > Thanks!
> >
> > Mobile: +086-15864011231
> > EMail&gtalk:saharabear@(protected)><
> EMail%26gtalk%3Asaharabear@gmail.com<EMail%2526gtalk%253Asaharabear@(protected)>
> >
> > EMail&yahoo:jia_haolin@(protected)><
> EMail%26yahoo%3Ajia_haolin@yahoo.com<EMail%2526yahoo%253Ajia_haolin@(protected)>
> >
> > Skype:saharabear
> >
> >
> > Haulyn Runner Jason
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>

Attachment: user_189702.ezm (zipped)
Hi All,

In my development, I put a form bean into session scope, when I access
the page in Firefox 3, it is retaining the values of this form bean
even if I log out and login as a different user, when I just wanted to
retain the values in the same login session. This is not the case if I
use IE. I am using Struts1.1 and Tomcat 4.1.30.

Any help is highly appreciated. Thanks in advance.

Thanks,
Balwinder Kumar


Attachment: user_189703.ezm (zipped)
2008/8/4 Alexis Abdel <alexisq4a@(protected)>:
> That exeption in english it is:
>
> The server found an error,and cant fill this requirement.
>
> org.apache.jasper.JasperException: Exception in JSP: /index.jsp:16

Can you post the complete stack trace, especially the cause?

Antonio

P.S. I speak also Italian (since I am Italian :-) ), but anyway I
won't give you my MSN contact, nor I do want to write in Italian in an
English-speaking mailing list.

Attachment: user_189704.ezm (zipped)

Hi konference

when I use this:
------------------------------------------------------------
    <s:url id="url" action="HelloWorld" namespace="/example" >
    <s:param name="id" value="%{'java'}" />
 </s:url>

 <s:a href="%{url}" >link</s:a>
 
 <s:form action="%{url}" method="post">
   <s:textfield></s:textfield>
   <s:submit></s:submit>
 </s:form>
---------------------------------------------------------------
After render link is good:
&lt;a href="/struts2-blank-2.0.11.2/example/HelloWorld.action?id=java" &gt;

but in form is failure:
<form id="HelloWorld" onsubmit="return true;"
action="/struts2-blank-2.0.11.2/struts2-blank-2.0.11.2/example/HelloWorld.action?id=java"
method="post">

I get two context patch. Is it bug or do I something no good?

Thanks

-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189708.ezm (zipped)
You don't need to generate an s:url to construct the action of the form.
The s:form tag has its own action and namespace attributes.
If you need to send extra parameters, like id=java, you could instead
use a s:hidden tag inside the form.

2008/8/5 Kibo <tomasjurman@(protected)>:
>
> Hi konference
>
> when I use this:
> ------------------------------------------------------------
>     <s:url id="url" action="HelloWorld" namespace="/example" >
>           <s:param name="id" value="%{'java'}" />
>     </s:url>
>
>     <s:a href="%{url}" >link</s:a>
>
>     <s:form action="%{url}" method="post">
>           <s:textfield></s:textfield>
>           <s:submit></s:submit>
>     </s:form>
> ---------------------------------------------------------------
> After render link is good:
> &lt;a href="/struts2-blank-2.0.11.2/example/HelloWorld.action?id=java" &gt;
>
> but in form is failure:
> <form id="HelloWorld" onsubmit="return true;"
> action="/struts2-blank-2.0.11.2/struts2-blank-2.0.11.2/example/HelloWorld.action?id=java"
> method="post">
>
> I get two context patch. Is it bug or do I something no good?
>
> Thanks
>
> -----
> Tomas Jurman
> Czech Republic
> --
> View this message in context: http://www.nabble.com/Tags-url-and-form-tp18825612p18825612.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189705.ezm (zipped)
Hello all

Say I have a struts2 form:

<s:form action="Subscribe_*" validate="true">
<s:textfield key="something"/>
</s:form>


The javascript validation generated for this form is unfortunately
invalid. Firefox complains about the "*" character.

Is there any way to get around this without turning to server side validation?

kind regards
--
Markus Stauffer

Attachment: user_189709.ezm (zipped)
AFAIK, wildcard mapping has sense only inside struts.xml.
In your form, you must specify exactly which action will be called,
like "Subscribe_dosomething"

2008/8/5 Markus Stauffer <markus.stauffer@(protected)>:
> Hello all
>
> Say I have a struts2 form:
>
> <s:form action="Subscribe_*" validate="true">
> <s:textfield key="something"/>
> </s:form>
>
>
> The javascript validation generated for this form is unfortunately
> invalid. Firefox complains about the "*" character.
>
> Is there any way to get around this without turning to server side validation?
>
> kind regards
> --
> Markus Stauffer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189710.ezm (zipped)
I have this in my form:

<s:form action="Subscription_*">
<s:textfield key="something"/>

<s:submit value="%{'Submit'}" method="execute"/>
<s:submit value="%{'Cancel'}" method="cancel"/>
</s:form>

It works like a charm. But if i turn on client side validation there
are warnings/errors.





On 8/5/08, Gabriel Belingueres <belingueres@(protected):
> AFAIK, wildcard mapping has sense only inside struts.xml.
> In your form, you must specify exactly which action will be called,
> like "Subscribe_dosomething"
>
> 2008/8/5 Markus Stauffer <markus.stauffer@(protected)>:
>> Hello all
>>
>> Say I have a struts2 form:
>>
>> <s:form action="Subscribe_*" validate="true">
>> <s:textfield key="something"/>
>> </s:form>
>>
>>
>> The javascript validation generated for this form is unfortunately
>> invalid. Firefox complains about the "*" character.
>>
>> Is there any way to get around this without turning to server side
>> validation?
>>
>> kind regards
>> --
>> Markus Stauffer
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Markus Stauffer

Attachment: user_189716.ezm (zipped)
I can't see any reference anywhere that suggests that putting a wildcard in
the form's action attribute will work. Even if it does work with client
side validation turned off, I get the impression -- and I could be wrong --
that you've stumbled into a weird corner case that just happens to work. If
you would like to have more consistency in your application's behavior, I
think that Gabriel's advice is the way to go. Have each submit send
"Subscription_execute" or "Subscription_cancel", and rely on the wildcarding
in struts.xml to route the request appropriately.

jk

On Tue, Aug 5, 2008 at 7:00 AM, Markus Stauffer
<markus.stauffer@(protected):

> I have this in my form:
>
> <s:form action="Subscription_*">
> <s:textfield key="something"/>
>
> <s:submit value="%{'Submit'}" method="execute"/>
> <s:submit value="%{'Cancel'}" method="cancel"/>
> </s:form>
>
> It works like a charm. But if i turn on client side validation there
> are warnings/errors.
>
>
>
>
>
> On 8/5/08, Gabriel Belingueres <belingueres@(protected):
> > AFAIK, wildcard mapping has sense only inside struts.xml.
> > In your form, you must specify exactly which action will be called,
> > like "Subscribe_dosomething"
> >
> > 2008/8/5 Markus Stauffer <markus.stauffer@(protected)>:
> >> Hello all
> >>
> >> Say I have a struts2 form:
> >>
> >> <s:form action="Subscribe_*" validate="true">
> >> <s:textfield key="something"/>
> >> </s:form>
> >>
> >>
> >> The javascript validation generated for this form is unfortunately
> >> invalid. Firefox complains about the "*" character.
> >>
> >> Is there any way to get around this without turning to server side
> >> validation?
> >>
> >> kind regards
> >> --
> >> Markus Stauffer
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> --
> Markus Stauffer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_189707.ezm (zipped)

1.I have action PrepareDictionaryAction
it has field String dictionaryId and appropriate getter and setter.
dictionaryid comes from previous jsp. (enter.jsp)
action sends user to dictionary.jsp

2.dictionary jsp has hidden field <s:hidden name="dictionaryId"/>. So I will
not be lost.
3.then through form submit user goes to WorkWithDictionaryAction.
This action reads hidden field dictionaryId.

I want on result="success" send user to PrepareDictionaryAction and I don't
want to loose dictionaryId

This is struts.xml for "WorkWithDictionary:
<action name="WorkWithDictionary"
class="ibs.parliament.action.admin.WorkWithDictionaryAction">
     <result name="success" type="redirect-action">
       PrepareDictionary
       /admin
     </result>
     <result name="input">/admin/dictionary.jsp</result>
   </action>

As you can see on "success" user will go to PrepareDictionary. This action
needs dictionaryId, but I is lost on WorkWithDictionary action, this
parameter doesn't go forward.

I would'nt like to use session, I would like to use something else. Does
struts2 has special interceptor or result type for such tasks?


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


Attachment: user_189713.ezm (zipped)
Consider chaining over redirect. However, this does sort of hard wire your
flow!

On Tue, Aug 5, 2008 at 5:33 AM, holod <serega.sheypak@(protected):

>
> 1.I have action PrepareDictionaryAction
> it has field String dictionaryId and appropriate getter and setter.
> dictionaryid comes from previous jsp. (enter.jsp)
> action sends user to dictionary.jsp
>
> 2.dictionary jsp has hidden field <s:hidden name="dictionaryId"/>. So I
> will
> not be lost.
> 3.then through form submit user goes to WorkWithDictionaryAction.
> This action reads hidden field dictionaryId.
>
> I want on result="success" send user to PrepareDictionaryAction and I don't
> want to loose dictionaryId
>
> This is struts.xml for "WorkWithDictionary:
> <action name="WorkWithDictionary"
> class="ibs.parliament.action.admin.WorkWithDictionaryAction">
>           <result name="success" type="redirect-action">
>                     PrepareDictionary
>                     /admin
>                </result>
>                <result name="input">/admin/dictionary.jsp</result>
>           </action>
>
> As you can see on "success" user will go to PrepareDictionary. This action
> needs dictionaryId, but I is lost on WorkWithDictionary action, this
> parameter doesn't go forward.
>
> I would'nt like to use session, I would like to use something else. Does
> struts2 has special interceptor or result type for such tasks?
>
>
> --
> View this message in context:
> http://www.nabble.com/HowTo%3A-transfer-parameter-between-actions--tp18828496p18828496.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189715.ezm (zipped)

It was very silly question! Thanks, result type="chain" solves the problem!

stanlick wrote:
>
> Consider chaining over redirect. However, this does sort of hard wire
> your
> flow!
>
> On Tue, Aug 5, 2008 at 5:33 AM, holod <serega.sheypak@(protected):
>
>>
>> 1.I have action PrepareDictionaryAction
>> it has field String dictionaryId and appropriate getter and setter.
>> dictionaryid comes from previous jsp. (enter.jsp)
>> action sends user to dictionary.jsp
>>
>> 2.dictionary jsp has hidden field <s:hidden name="dictionaryId"/>. So I
>> will
>> not be lost.
>> 3.then through form submit user goes to WorkWithDictionaryAction.
>> This action reads hidden field dictionaryId.
>>
>> I want on result="success" send user to PrepareDictionaryAction and I
>> don't
>> want to loose dictionaryId
>>
>> This is struts.xml for "WorkWithDictionary:
>> <action name="WorkWithDictionary"
>> class="ibs.parliament.action.admin.WorkWithDictionaryAction">
>>           <result name="success" type="redirect-action">
>>                     PrepareDictionary
>>                     /admin
>>                </result>
>>                <result
>> name="input">/admin/dictionary.jsp</result>
>>           </action>
>>
>> As you can see on "success" user will go to PrepareDictionary. This
>> action
>> needs dictionaryId, but I is lost on WorkWithDictionary action, this
>> parameter doesn't go forward.
>>
>> I would'nt like to use session, I would like to use something else. Does
>> struts2 has special interceptor or result type for such tasks?
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/HowTo%3A-transfer-parameter-between-actions--tp18828496p18828496.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>

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


Attachment: user_189714.ezm (zipped)

I have set up a very simple test app that is just spring and struts2. It
works without a problem.

In my main application I have been using a
ClassPathXmlApplicationContext(springBeansDefinitionFile) in order to get
references to my beans. When I comment this out and add my spring-config
file to the web.xml contextConfigLocation, I can see my
'springManagedProsocActionUpdateEmail' being created and there are no errors
thrown when the server boots. Of course, when I comment out the
ClassPathXmlApplicationContext(springBeansDefinitionFile), I can't get
references to any of my beans and my app dies.

I have been looking for other ways to get references to my beans but they
all seem to involve recreating them again which throws errors. I assume I
have missed something and there is an easy way to get the reference once it
has already been created. I don't know if that will provide the ultimate
solution I am looking for but that is my current way of thinking.
--
Sent from the Struts - User mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.