I personnaly prefer to use the same Action for things that are logically
grouped. So in your case, I would use the execute method to return
SUCCESS, pointing to the jsp, and a doSearch method with SEARCH result,
pointing to the other JSP. That way, you have only one action for both JSP.
I
Why not doing that on the server side, using the s:token approach? That
would prevent double submit on the server side.
On the client side, I would say that your disabling the button before
the form is submitted (the onsubmit technically happens before the
submit, so that you can uypdate some
Jake, the short answer to your problem is : use the struts-spring plugin
( http://struts.apache.org/2.1.8.1/docs/spring-plugin.html ). Include
the jar for that plugin in your classpath, and Struts 2 will use Spring
to manage the Action lifecycle, meaning you can inject anything the way
you are
My best guess is that the Action instance used in the web application is
not actually loaded from the configuration in your applicationContext,
but directly by Struts 2 (through the Spring Factory, but still Struts 2).
That mean that you will have a bean named myAction in you application
A new requirement means that we need to have available across pretty much
every action a separate, independent bean that carries information that may
(or may not) need to be displayed on the resulting web-pages. I am wondering
what the best way is to make this bean available to each JSP.
We
I recommend attaching the focus to the relevant form element purely
using Javascript,
ie, including in you JSP :
script type=test/javascript
window.onload = function() {
document.getElementById('yourInpudId').focus();
}
/script
That way you have a pure javascript implementation, and you
Hi Mark,
To implement security across multiples applications (Struts or non
Struts), you will have to rely on the container. The container is really
the best way to go if you want to implement a cross applications sign-on.
Now, about your specific question, I guess we are missing some
I recommend using displaytag for displaying tables in JSP :
http://displaytag.sourceforge.net/1.2/
It comes with support for Grouping (see
http://displaytag.homeip.net/displaytag-examples-1.2/example-grouping.jsp )
which is the feature you are looking for.
I love displaytag for its ease of
Hi Kartik,
Remove the attribute value from your s:select tag, and in your action,
preset the value of your attribute actionStatus (on your Action class)
to OPEN or CLOSED.
At least, it is working in my case. Let us know if it is not working for
you that way, and I will put together a simple
As of struts 2.1.8, you have (well can, but it's recommended) use the
struts2-json-plugin rather than the googlecode version (the google code
one has been transferred to apache as a struts 2 plugin).
To do that, just use the class name org.apache.struts2.json.JSONResult
(see
Hi,
We use a simple and empty s:url includeParam=get/ tag to loop back
to the current action/url.
The only thing you have to look for are those unsafe urls: we don't
have any unsafe urls in our application, thanks to an extensive POST
then GET approach. Whenever some action is done in the
Do you have a result named input tied to your LoginAction? What is it?
Denis.
Nguyen Xuan Son a écrit :
Dear all
I have these in the LoginAction-validation.xml file
validators
field name=txtName
field-validator type=requiredstring
param name=trimfalse/param
messageerror/message
You should use key to change the text outputted on the screen. You
should use name as well to avoid the error you are seeing: the name is
being used as the property to set on your action.
This error is actually a warning, that is not preventing anything from
working fine in your application.
Please tell me what should i correct?
thank you very much
2009/11/30 Denis Cabasson denis.cabas...@gmail.com
mailto:denis.cabas...@gmail.com
Do you have a result named input tied to your LoginAction? What
is it?
Denis.
Nguyen Xuan Son a écrit :
Dear all
I have
Obviously, if you don't have a session,
ses.get(context) will return null.
And null.toString() that's a nice NPE.
I usually use StringUtils.isNotEmpty for commons-lang :
http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#isNotEmpty(java.lang.String)
Hi Titus,
This behaviour is the standard behaviour of struts 2. Your second
message comes from the conversion error :
http://struts.apache.org/2.1.8.1/docs/conversion-error-interceptor.html
I suppose that your field is of type int (or any number like class).
Struts will in the first try to
From what you are saying, I would have a look at the :
http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html
My best guess is that this would fix your issue. If not, you probably
have an issue with the way you are
Hi Martin,
I am building a Struts 2 / Spring / Hibernate application, using the JPA
specification as it seems to be the case here. It is not required to go
through all the pain of using EJB entities. I am running this
application both in Websphere and Tomcat, without using the container at
Make sure to use the tiles plugin as described in :
http://struts.apache.org/2.1.8/docs/tiles-plugin.html
I am using it, and have no issue so far with it. Your error seems to be
in the result you are redirecting to. How is your action tied up?
Denis.
Sommers, Elizabeth a écrit :
Is it
I concur. We are using struts 2.1.8 with WAS 6.1.0.27 and there is no
way around this variable. It is documented in our installation
procedure, and you will never get any filter based framework to work
unless you set this variable.
The default Websphere behaviour (without this variable that
No out of the box way of dealing with that. You can send your jsp code /
Action code to see if we can figure out what is wrong.
Denis.
james billa a écrit :
Hi - I am using struts 2.1.6. From my jsp on submitting the form, the
control goes to my action class, methods prepare() and validate()
What code are you using to output this message? Is it a s:text? a
s:property?
Alex Siman a écrit :
I just have found that Struts 2.1.8 escapes messages, so instead of message
(in browser) like:
User with email u...@example.com registered successfully.
now I get this one:
User with email
Make sure to use the tiles plugin as described in :
http://struts.apache.org/2.1.8/docs/tiles-plugin.html
I am using it, and have no issue so far with it. Your error seems to be
in the result you are redirecting to. How is your action tied up?
Denis.
Sommers, Elizabeth a écrit :
Is it
I concur. We are using struts 2.1.8 with WAS 6.1.0.27 and there is no
way around this variable. It is documented in our installation
procedure, and you will never get any filter based framework to work
unless you set this variable.
The default Websphere behaviour (without this variable that
What code are you using to output this message? Is it a s:text? a
s:property?
Denis.
Alex Siman a écrit :
I just have found that Struts 2.1.8 escapes messages, so instead of message
(in browser) like:
User with email u...@example.com registered successfully.
now I get this one:
User with
No out of the box way of dealing with that. You can send your jsp code /
Action code to see if we can figure out what is wrong.
Denis.
james billa a écrit :
Hi - I am using struts 2.1.6. From my jsp on submitting the form, the
control goes to my action class, methods prepare() and validate()
Hi,
The debug tag is inspecting the status of your action to build its
HTML output, which include knowing the value of test1, and thus calling
the corresponding getter.
Take out the debug tag, and everything should be back to normal.
Denis.
Gábor Kovács a écrit :
Hi everyone,
I'm
Hi,
I usually use s:submit theme=simple / s:reset theme=simple
... / which will generate the buttons only, allowing you to take care
of the presentation your way.
Denis.
Murugesh a écrit :
Hi guys
i have tried out but not getting the solution.
i need two buttons in a row
like
Display tag is great for table pagination.
If you are looking for pagination without tables, I'd recommend the pager
tag library :
http://jsptags.com/tags/navigation/pager/index.jsp
Custom coding is my least favorite way of solving an issue.
To extract a variable from an action to the page, I'd
Hi,
Escape is escaping you text in an HTML friendly way. your ü was tranformed
to #xFC; (which is the corresponding HTML entity).
The issue is that you were using that in URL that was URL-encoded. So you
#xFC; is transformed to %26%23xFC%3B (with %26= , ...).
So in the case you are using the value
s:debug / is usually helpful (without being a real debugger).
Denis.
Bhaarat Sharma a écrit :
Is there a way to debug jsp pages that have struts2 html tags??
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
, 2009 at 10:16 PM, denis cabasson
denis.cabas...@polytechnique.org wrote:
Hi folks!
I am using Struts 2.0.14 on a project with a fairly big existing
codebase. I
just tried to upgrade to struts 2.1.6 (as the release is now in GA).
We were using extensively the zero configuration
Hi folks!
I am using Struts 2.0.14 on a project with a fairly big existing codebase. I
just tried to upgrade to struts 2.1.6 (as the release is now in GA).
We were using extensively the zero configuration approach with the
codebehind plugin and I am now looking at upgrading to the convention
33 matches
Mail list logo