2009/5/19 Qunhuan Mei :
> When Struts validation is in place, the java action code appears to run
> fully twice by default.
What you mean by that? The method execute() is called twice?
> Is there a flag or variable as such available?
As I know nope, it's simply not needed.
Regards
--
Lukasz
h
It might be easier to grab the most recent snapshot builds from here -
http://people.apache.org/builds/struts/nightlies/2.x/
Give them a try, they should include all of the appropriate dependencies.
-Wes
On Wednesday 20 May 2009 01:45:12 am Ikya Technical wrote:
> Hi All,
>
> We are workin
Hi All,
We are working on a Struts 2 project. We are facing a problem whenever
there is Double type field with Model class and field value is zero then it
is throwing some error. After searching a lot we find out that the issue is
with xwork2 and it is already reported and fixed. The issue com
xnpeng wrote:
I'm doing my project with struts2+rest-plugin for about 3 months.there is a lot
of problems unresolved.
With rest-plugin and convention-plugin,all action-mapping are done automatically,manual action-mapping in struts.xml cannot work.so,
1, I cannot define global-error-result;
2,
The OP stated that he is using the JSON plugin, v32, which is this
Struts 2 plugin: http://cwiki.apache.org/S2PLUGINS/json-plugin.html,
not related to xwork in anyway.
musachy
On Tue, May 19, 2009 at 7:58 PM, Martin Gainty wrote:
>
> something else
> com.opensymphony.webwork.dispatcher.json.Json
I'm doing my project with struts2+rest-plugin for about 3 months.there is a lot
of problems unresolved.
With rest-plugin and convention-plugin,all action-mapping are done
automatically,manual action-mapping in struts.xml cannot work.so,
1, I cannot define global-error-result;
2, I cannot do for
On Tuesday 19 May 2009 05:05:11 pm dusty wrote:
> I think this is more difficult than most people think. There are a lot of
> use cases and edge cases that make most home grown solutions pretty
> fragile. I think GETs are pretty easy but it gets a little more exciting
> when you are dealing with P
manub wrote:
I used the iterator trick described before and it works, showing me all field
errors. Nested into the 2 iterators tag, there's a tag which I could use to
print only the errors for a specific field using ?
Are you asking about the tag?
Dave
--
something else
com.opensymphony.webwork.dispatcher.json.JsonObject
* For example, if an object has a method named "getName", and
* if the result of calling object.getName() is "Larry
Fine",
* then the JSONObject will contain "name": "Larry Fine".
*
* @param bean An objec
Martin, where do you get these random code sections from? Please
refrain from posting "answers" that will just confuse users. This is a
community and we benefit from the help and collaboration of users, so
we encourage everyone to participate, but just throwing random code,
from projects that are n
Jim-
/**
* Generates the key to store the bean in the session with.
*/
private void updateBeanKey() {
if (this.sessionKey == null) {
final StringBuffer buff = new StringBuffer();
buff.append(this.getClass().getName()); //WHAT iS THE CLASSNAME
doing
Hi there,
I have a small site with some informations which are stored in a
database. A method for administrations reason is added to change the
content (names) of the datasets.
Now, I will add these names to my navigation.
I have a action like this:
...
This action edits the content of th
newton.dave wrote:
>
>
> Why not just use the metadata returned from a JDBC connector?
>
>
Dave,
Thanks for the reply and the suggestion. I didn't do that simply because it
just didn't occur to me at the time. But it's a good idea, and it would
certainly allow more database products to be
That's pretty weird, you could try mapping that action with XML, if
the problem goes away, then it is a Codebehind problem, but I can't
think of anything causing this.
musachy
On Tue, May 19, 2009 at 2:26 PM, wrote:
> I am using version 0.32 of the JSON plugin with Struts 2.0.11. It seems
> to
There is no reason why Struts can't figure out the URL and give it back. I
have not seen the JSON result used the way you have it configured.
Typically, you see the JSON result with a root parameter. The root is the
action property you want to be the root of your JSON object graph.
So what I w
Fixed -- I had been building the properties files and whatnot in the src/
folder, and Eclipse had been copying them. But then it stopped, so I had to
manually move my files from src/ to web/WEB-INF/classes/. Not that this is an
Eclipse support forum, but I thought that someone else may encounter
I think this is more difficult than most people think. There are a lot of
use cases and edge cases that make most home grown solutions pretty fragile.
I think GETs are pretty easy but it gets a little more exciting when you are
dealing with POSTs to a secure resource. People tend to get pissed
Thanks, but the problem is definitely Eclipse. It was working last week, and
now it isn't. Eclipse isn't copying the necessary properties files containing
those translations for getText() when I deploy to my local Tomcat server for
development/testing. It will copy struts.xml, but none of the ot
typical use is to use getText to acquire the property attribute as defined here
modifying
controlheader-core.ftl would allow you to supply neccesary call to getText
${parameters.label?html}:<#t/>
<#assign mm="getText('"+parameters.label?html+"')" /><#t/>
${stack.findValue(mm)}:<#t/>
struts-
I have used the JSON plugin quite a bit and I have not seen the root
switching you are describing. The only difference I can see is that I am
using xml config for those actions. It seems like your result is not
getting the "root" parameter. Could it be an issue with the @Result
annotation combi
As far as I can tell, Eclipse is placing struts.xml into WEB-INF/classes
when it deploys to Tomcat, but not struts.properties or any of the other
important files that I need. No idea why, and I haven't yet figured out
how to fix this. Anyone else experience a problem like this? Any idea
how to get
Upon further examination, it looks like 'struts.properties' is not being
loaded -- When I cause an exception, I don't see the development-mode
data that I would expect for having this line in that file:
struts.devMode = true
Still very confused.
> -Original Message-
> From: Jon Pearson
I moved away from the web side of my project for a couple of days to
take a break, and now as I come back, I18n has completely stopped
working.
In 'struts.properties' I have the line
struts.custom.i18n.resources = global-messages
And in 'global-messages.properties' I have text like this
i18n.pr
I am using version 0.32 of the JSON plugin with Struts 2.0.11. It seems
to work well except for the fact that the JSON results from my struts
action are inconsistent.
I have annotated my action as follows:
@Results( {
@Result(name = "jsonPopsResult", type = JSONResult.class, value =
""
Struts FileUploadInterceptor offers maximumSize,allowedTypes and
allowedExtensions parameters specifically
Interceptor parameters:
maximumSize (optional) - the maximum size (in bytes) that the interceptor will
allow a file reference to be set
on the action. Note, this is not relat
Retrieving from DB and outputting to HTTP:
Every time I've done this it has been without the use of struts. I use
a
servlet that looks for e request parameter storing an ID that resolves
to
the image in the DB. I lookup the image, set the response type for that
image, then output the bytes that
Hi all.
i've to do a UI that permits to store some images, how can i do that?
i tried to use upload file but is quite complex and doesn't work.
is better if i put the img inside the db?
someone of u has experience about that?
if i put inside the db the img (i use postrgres) how can i display it in
1. It's created when the Struts dispatcher filter receives a request
that matches an element in the XML configuration file. Xwork
handles the creation, I believe (Struts internal DI framework). You're
running with Spring as the container, which mean Spring does the
action creation based on
I used the iterator trick described before and it works, showing me all field
errors. Nested into the 2 iterators tag, there's a tag which I could use to
print only the errors for a specific field using ?
Thanks.
manub wrote:
>
> Isn't it possible to reference directly the single field error
Hi Steve,
What you are asking is relatively simple really - we implemented an interceptor
to capture the current request URL and store it in the current value stack. We
can subsequently reference it in our JSPs and use it in forms in several places
to enable us to redirect to the original page
I would rather avoid using Acegi as I'm not using Spring. I'm using Struts 2
and EJB3.
I appreciate the Acegi can be used without Spring. But it still seems like
overkill to solve this one issue.
I was hoping to generate a call to login.action like
".../login.action?url=". I guess storing the
req
same problem anyway
--
Stefano
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
On Tue, May 19, 2009 at 17:14, Jim Kiley wrote:
> You could access category with #session.category if I remember my OGNL
> right. Or you could add a 'category' field to your Action class, with
> public getter and setter, and then, instead of putting cat into the session,
> you could do this.setC
You could access category with #session.category if I remember my OGNL
right. Or you could add a 'category' field to your Action class, with
public getter and setter, and then, instead of putting cat into the session,
you could do this.setCategory(cat) -- and then your JSP would work fine.
On Tu
So,
i've done this:
there's a init action that does:
public String execute() throws Exception {
Map session = ActionContext.getContext().getSession();
List cat = mgmt.getAllCategory();
session.put("category", cat);
return SUCCESS;
}
after that a jsp is displ
Hello,
Not sure if this is a Struts 2 or Spring question but I'll start here.
I'm using Struts 2 along with Spring 2.5. In our Struts 2 Actions, we
use the @Autowired annotation to inject our service beans into the
Action class:
@Autowired
private MyService myService;
Note that we do *no
Isn't it possible to reference directly the single field errors without
modifying the FTL and without having and tags?
Sonny Gill wrote:
>
> Ahh...right.
> Assuming that you are using simple theme as default, You will need to
> extract fielderror.ftl from the struts2 jar, modify it to suit t
2009/5/19 Steve :
> Can anyone advise on the best way to do this?
Use Acegi, it has such functionality built-in or store request path in
session when redirecting to login page and after successful login,
read it from session and redirect to it. It should be achievable with
the same interceptor you
I've started again forgetting my code.
this time I tried by importing "struts2-rest-showcase-2.1.6.war" to my
eclipse.
After running the sample app SAME ERROR happens.
struts2-rest-showcase.2.1.6.war throws the same problem in Glassfish 2.1 and
Glassfish 2.0.
Have someone test 2.1.6 sample applica
So there is no way to put the control of determining the result to Struts
instead of Javascript?
Steven Yang wrote:
>
> Actually you went off Struts' scope by using AJAX.because javascript is on
> the client side. by using XHR you have put the control of determining the
> result to javascript a
Hi all,
I'm trying to write a custom field validator which needs other fields to
validate the field I need to validate. How can I pass field values (and not
static params) to a field validator in the validation xml? I'm using Struts
2.1.6.
Thank you.
--
View this message in context:
http://www
Hi everyone,
I have an application that insists on a user being logged in before they can
access specific resources.
Currently, if a user who is not logged in, attempts to access these
resources, they are simply redirected to the login page. This works fine and
is implemented using an inter
if you remove convention-plugin jar you dont get the error msg.
anyway it's hard to understand I dont know what's happening inside!
any idea or plan?? everything is welcome
thanks in advance
2009/5/19 David Canos
> Hi again folks.
> I have nothing found,
> Could not load MultiColumnPrinter.cla
Hi again folks.
I have nothing found,
Could not load MultiColumnPrinter.class still remains as an error.
Google says nothing about it.
My conventions plugins is failing and I dont know whether is related to this
error.
2009/5/12 David Canos
>
> I was just starting to work with Convention plug
Hi,
In struts 2, what are the different ways to keep the previous values of
the fields of a form which
is being modified (with new values) ?
I would like to save in the database the NEW (after modification) and
the OLD (before modification) values of the fields of the form.
Let's say I have 3 colu
Greetings everyone!
When Struts validation is in place, the java action code appears to run
fully twice by default.
I was wondering if the action code could detect weather the current run is
for validation or the one after so that certain resource intensive (e.g.
database op) access could be avo
Hi Murugesh,
read about session in HTTP.
Best greetings,
Paweł Wielgus.
2009/5/19 Murugesh :
> Thanks for reply
>
> like googles gmail, if u try to open 2nd gmail in same browser (multi
> tabbed)it will take you to already logged in account.
>
> how to handle this in normal application?
>
>
>
>
Thanks for reply
like googles gmail, if u try to open 2nd gmail in same browser (multi
tabbed)it will take you to already logged in account.
how to handle this in normal application?
On Tue, May 19, 2009 at 12:29 PM, suhas kokal wrote:
>
> Hi,
>
> You don't need to do any thing as starting
Hi,
You don't need to do any thing as starting a new (same) application in another
browser(from parent one) carries the session into another application.You can
check this from the URL.
Thanks
Suhas
--- On Tue, 19/5/09, Murugesh wrote:
> From: Murugesh
> Subject: Fwd: Help
> To: "Struts
49 matches
Mail list logo