Hi,
We are using the struts2.0.6 framework as part of our business application.
Recently we found that there is a validation issue with struts2 frame -
work. Let me explain my problem first.
In a jsp page, I have defined a s:text field and the field property is
Integer type(defined in bean). No
2009/1/19 jitendra :
> My question is how I can validate the Integer value which has the commas in
> it. Basically, we don't want to add any custom validator for this field
> because if we do so then we have to apply this validation through out our
> application and it is around 150 places.
The be
I must be misunderstanding something, is that not what I am already doing my
chaining to another action?
Andy Hahn wrote:
>
> Regarding to the first responder - you could take this a step further and
> have ActionUnhandledExceptionHandler redirect to another action (Redirect
> After Post).
>
It seems to me SEAM has answer to my problem. Check out their booking example
if anyone is interested.
Thanks
Rajib
RajibJana wrote:
>
> "The issue that you may lose track of that state for a user if another
> user hijacks the session is not a use case for a feature but a description
> o
I think you can get the unique "handle" to either a tab or new window
created with Ctrl-N via the DOM. I remember trying this back when tabs came
onto the scene. With that key you could use a Map in session to correlate
the conversations.
Peace,
Scott
On Sun, Jan 18, 2009 at 11:32 PM, dusty wr
You could write your own result that uses XStream, or any other
library to serialize the objects into xml.
musachy
On Mon, Jan 19, 2009 at 2:27 AM, aum strut wrote:
> Hi All,
>
> I developing ajax based application using struts 2.0.11
> for ajax we are using YUI for making ajax based call and cu
I have found a solution. I have to set a cookie with JSESSIONID in my
JSP (view.jsp). So the ajax request shares the same session and I can
get the session object.
Nils-Helge Garli Hegvik schrieb:
Did you try the suggestion of encoding the session id in the url? It
does sound strange indeed. H
dusty wrote:
Creating a separate subsystem on the server to partition a single HTTP
session for multiple users and maintain the conversation is classic
overengineering. Seems like Seam has gone to a lot of trouble to provide
just another way to persist state.
It's not "over-engineering" to al
Hi...
I was trying to visualize some Crystal reports in my web Application; can
somebody help me with links or information about how to do it? I'm using an
Struts projects with hibernate, and the reports with Crystal Reports.
Mileidys González Prieto
Consultant
i-Frontier
Henck Arronstraat 16 |
Hi,
can anybody tell me how I can make a two column layout with ?
Putting some table tags around doesn't work because renders
also as table.
To get my intention more clear, I need s.th. like this:
label selectbox label selectbox
label input label selectbox
...
Cheers,
Michael
---
Try using the "simple" theme.
Nils-H
On Mon, Jan 19, 2009 at 3:46 PM, Michael Obster wrote:
> Hi,
>
> can anybody tell me how I can make a two column layout with ?
> Putting some table tags around doesn't work because renders also as
> table.
> To get my intention more clear, I need s.th. like
Michael Obster wrote:
can anybody tell me how I can make a two column layout with ?
Putting some table tags around doesn't work because renders
also as table.
You can either use the "simple" theme (which is problematic because it
doesn't include field error messages) or create a new theme (u
Hi!
Add "theme='simple'" to your tag, then no tag is
written and you can supply your own custom layout.
Robert
Michael Obster wrote:
Hi,
can anybody tell me how I can make a two column layout with ?
Putting some table tags around doesn't work because renders
also as table.
To get my i
Dear All, I want to do something like this:
in my action i create:
List textFields = new ArrayList();
and i tried to write set method in 2 ways:
1. public void setTextFields (List textFields)
2. public void setTextFields(String text)
{
textFields.add(text);
}
and in my jsp, i
KE LI wrote:
Dear All, I want to do something like this:
in my action i create:
List textFields = new ArrayList();
and i tried to write set method in 2 ways:
1. public void setTextFields (List textFields)
2. public void setTextFields(String text)
Without a machine to check with, I'd
Yes you are chaining, but if you write to a database, for example, the user
could refresh the page and re-write to the database. The point I was trying to
make was to use the PRG pattern.
> Date: Mon, 19 Jan 2009 03:27:57 -0800
> From: ga...@prodia.co.uk
> To: user@struts.apache.org
> Subje
Hi,
you dont have to explicitly add the values to the list in the
setter methods, since the framework will do that for you ,
also you dont have to explicitly provide the index in the property field
(name) (even though it will work with explicit indexing as well) . refer
the fallowing code
As new to Struts 2 I guess this is a simple question for you:
I have an action class (ShowUserAction) with a populated list: private
List backendsystems = new LinkedList();
This action class has the usual public set, get and add methods for the
list.
Among other string fields I want to transfe
Thats what i came up with..
any one have any idea where i can find a good starter so that i can write my
own result type?
thanks for the help Musachy
On 1/19/09, Musachy Barroso wrote:
>
> You could write your own result that uses XStream, or any other
> library to serialize the objects into xml
Take a look at the results, they are pretty simple, this is
StreamResult for example:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java?view=markup
all you need to do is implement the Result interface, and then
register the result
I had not considered doing that before so thanks for the input, it would be
better. Sorry to the OP for partially hijacking his thread.
Andy Hahn wrote:
>
>
> Yes you are chaining, but if you write to a database, for example, the
> user could refresh the page and re-write to the database. Th
Thanks Musachy for the help
i will try to follow what u have suggested
On 1/19/09, Musachy Barroso wrote:
>
> Take a look at the results, they are pretty simple, this is
> StreamResult for example:
>
>
> http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dis
Wes, you were spot on. I didn't extend the right package. Thanks. :)
-Ryan
-Original Message-
From: Wes Wannemacher [mailto:w...@wantii.com]
Sent: Friday, January 16, 2009 3:17 PM
To: Struts Users Mailing List
Subject: Re: paramsPrepareParamsStack
On Fri, 2009-01-16 at 13:49 -0700, Sta
On Sat, Jan 17, 2009 at 7:30 PM, Andrei Ivanov wrote:
> Hello,
> I have a date converter that does something like this:
>
> String value = values[0];
> Locale locale = (Locale) context.get(ActionContext.LOCALE);
> DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
> Date date =
Hello, someone with some example of how to use taglibrary s:tree of struts?
I'm having great difficulties, then the code below:
thanks for any help,
JSP:
<%@ taglib prefix="s" uri="/struts-tags" %>
s
ACTION:
package action;
import bean.TreeModel;
import com.opensymphony.xwork2.ActionSupp
+1
I find I need this all the time when developing; I want to login as 2
different users and test multi-user interactions. Currently I'm forced to
use 2 different browsers, login once with Firefox and once with IE.
This works for development but wouldn't be an acceptable answer for users
(plus
This is not really a struts 2 issue but a browser issue. This is the way
firefox persists sessions. If you try same thing in IE6 it will work fine, IE7
some times and IE8 fully emulates firefox.
Furthermore you can try this with gmail and you will see the same behaviour.
This is a fairly well k
Oh I fully understand this is a issue with how browsers deal with sessions.
However these are the browsers our apps have to work with so as a developer
I have to make the apps work with them and I expect any decent app framework
to have good solutions to all the common use cases. And I consider ha
Are there frameworks that handle this situation differently? It's a
browser-side issue, so it isn't clear to me how a server-side framework
could solve it.
jk
On Mon, Jan 19, 2009 at 3:02 PM, Greg Lindholm wrote:
>
> Oh I fully understand this is a issue with how browsers deal with sessions.
>
Yes, SEAM does:
http://www.seamframework.org/Documentation/DoesSeamSupportMultipleBrowserWindowsOrTabs
I haven't dug into exactly how they do it but I would not be surprised if
they pass around a hidden conversation token with every request. Then any
state information that gets stored in the se
Hi all,
I have a quite small Struts 2 application running on a JBoss 5.0GA.
It contains some EJB3 entity beans, an EJB3 session bean, a handful of
struts actions and three JSPs.
After about 5 redeploys (I use JSR88), JBoss is consuming more and more
memory (>500MB) and thus getting poorly slow.
Hi all,
there is one thing about calling an action through the tag: I
can provide an "id", and I can call the properties of the action with
"#actionid.field" annotations later on the page.
But I would expect this action to be placed on the value stack, so that
e.g. would access "getField()"
Hi, I am trying to setup my struts2 login form for spring security..
I have to specify action as* "/j_security_check"* but struts2 is appending
.action with the action value and eventually my action is becoming *
"/j_security_check.action"* and that is not I want.
How can prevent struts2 to appen
I am working on converting a few of my applications from Struts 1 to Struts
2.
My application in Struts 1 had a filter which checked the servlet path,
compared it to a list of known actions and handled accordingly.
If the mapping existed, it would forward it on it's merry way, to the
correct acti
I agree with ya. I have been doing something very similar with hidden fields
in my app for some time. The server knows if a new browser instance is
requested by checking the hidden field. If its empty it then creates a new key
and sets the hidden field. Basically partitions the session base
HttpServletResponse.encodeURL
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relate
Hi Dave and Shashi,
Thanks for you two's quick reply!! It does help~:) I just got up, lol.
Licco
2009/1/20 sasikumar
> Hi,
> you dont have to explicitly add the values to the list in the setter
> methods, since the framework will do that for you ,
> also you dont have to explicitly provid
Hey Chris,
You could try a Struts 2 Interceptor, which would on the intercept method
either ( based on the servlet path )return a global result e.g. mailto:cbol...@gmail.com]
Sent: Tuesday, 20 January 2009 11:31 a.m.
To: user@struts.apache.org
Subject: Filter chaining, redirecting to an action?
revolutionary indeed.
RajibJana wrote:
>
> "The issue that you may lose track of that state for a user if another
> user hijacks the session is not a use case for a feature but a description
> of a bug"
>
>
> --The issue is windows tabs overwrite each others data that are put into
> the sess
Do not use use a normal
I think you could also do a
Raghuveer Rawat-2 wrote:
>
> Hi, I am trying to setup my struts2 login form for spring security..
> I have to specify action as* "/j_security_check"* but struts2 is appending
> .action with the action value and eventually my action
I have not researched this butthe way I understand it the action is
executed and its result evaluated and that result sent in place. You can
choose not to execute the result but then it just "does something" and the
view moves on. When you are doing you are at the view stage
right? Your or
Anyone seen this in Tomcat?
Wolfgang Knauf wrote:
>
> Hi all,
>
> I have a quite small Struts 2 application running on a JBoss 5.0GA.
> It contains some EJB3 entity beans, an EJB3 session bean, a handful of
> struts actions and three JSPs.
> After about 5 redeploys (I use JSR88), JBoss is co
Sorry. I don't think I understand your problem. When you say the stack is
being cleared are you seeing nulls in your converter for values that were
previously populated on the stack by the Parameters Interceptor?
Andrei Ivanov-2 wrote:
>
> On Sat, Jan 17, 2009 at 7:30 PM, Andrei Ivanov
> wr
Has either of you tried the XSLT result type? I have not and I am curious
about how well it works.
aum strut wrote:
>
> Thanks Musachy for the help
> i will try to follow what u have suggested
>
>
>
> On 1/19/09, Musachy Barroso wrote:
>>
>> Take a look at the results, they are pretty s
So, when you write you are asking Struts to
convert your list to a string and represent it like:
and I am not sure
that is what you want. Because when you resubmit that String struts is not
really sure how to rebuild the list.
I see you have read up on type conversion and that is good. The
hello all
i've a new-user page (say new_user.jsp) . am inserting a new
user into db. after inserting am mapping my page to new_user.jsp . what my
doubt is i've to display a message "User created successfully". how do i do
it? help me out of this please.
note : am se
The xslt result works fine, but you need to build the dom tree (using
dom, jdom, dom4j or anything that can "export" to w3 dom) and have it
in memory. I think Xstream also can "export" to w3 DOM. I´ve used
xstream and it works like a charm (in reflexion mode), but I don´t
know how to "customize" th
Can I expect this feature in future version of S2? It will help the S2
developers immensely, I bet.
Thanks
Rajib
Andy Hahn wrote:
>
>
> I agree with ya. I have been doing something very similar with hidden
> fields in my app for some time. The server knows if a new browser
> instance is r
In your action method use addActionMessage. Then in the jsp page use
to display the message(s) in the list.
You will be using the MessageStoreInterceptor. If you are using 2.1.6 make
sure the "store" interceptor is in your stack in struts.xml. If you are
using an earlier version you need t
On Tuesday 20 January 2009 00:01:22 RajibJana wrote:
> Can I expect this feature in future version of S2? It will help the S2
> developers immensely, I bet.
>
> Thanks
>
Patches are always welcome!
-Wes
--
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring,
Thanks for replying me. am using struts 1.2 . how do i do it in struts 1.2
dusty wrote:
>
> In your action method use addActionMessage. Then in the jsp page use
> to display the message(s) in the list.
>
> You will be using the MessageStoreInterceptor. If you are using 2.1.6
> make sur
I tried using XSLT result type but it forced me to have a stylesheet
might be something i was doing wrong
but finally for XM i found that creating your own custom result type is the
clean approach
and it worked quite smoothly for me.
-aum
On Tue, Jan 20, 2009 at 9:55 AM, Miguel wrote:
> The xs
andrh...@hotmail.com wrote
I agree with ya. I have been doing something very similar with
hidden fields in my app for some time.
If every request in your app is a POST, or if every link in your app is
javascript that causes a POST, that's fine. I like using actual links,
though, which resul
I strongly feel that this should be a feature of S2, it will ease the
developers work. With due respect to S2, I can say that SEAM provides few
more relevant features that are required for todays enterprise applications.
Thanks
Rajib
Wes Wannemacher wrote:
>
> On Tuesday 20 January 2009
I strongly feel that this should be a feature of S2, it will ease the
developers work. With due respect to S2, I can say that SEAM provides few
more relevant features that are required for todays enterprise applications.
Thanks
Rajib
Wes Wannemacher wrote:
>
> On Tuesday 20 January 2009
hello this is my code
if (!isCancelled(request)) {
//business logic
ActionMessages errorMsgs = new ActionMessages();
errorMsgs.add("messageId", new
ActionMessage("User","message.insert"));
//saveEr
56 matches
Mail list logo