Your attribute break w3c standard and considering you're going to realize a
cms and not an intranet, you should avoid such non-standard elements.
In order to accomplish what you need I use to assign css classes:
input type ="text" class ="data-length-50" ...
After I handle it with jquery.
Maurizio
Maybe there is a better way than orchestrating directly a low level api.
What do you need exactly?
Why don't you simple use wildcard mapping [1]?
[1] http://struts.apache.org/2.1.8/docs/wildcard-mappings.html
Maurizio Cucchiara
On Dec 18, 2010 2:04 AM, "wusheng zhang" wrote:
> I have some actio
I have some action definition xml fragments generated by some
general-action,
I just want to update the action mapping by the so called 'general-action'
at run time,
and let them serves the following requests.
I found the org.apache.struts2.config.StrutsXmlConfigurationProvider object
can be
retr
David, didn't your original post say that this is an action that loads
an object to display it rather than to modify it? In which case I'm not
sure why you even need to use Preparable (as I'm guessing it's during
prepare that the instance is initialised which makes it available for
struts to po
Hello,
I am trying to add a character countdown to certain fields in the CMS I work
on. The key is that I only want it to apply to certain fields for certain
asset types. So, in our DB model, both asset A and asset B use the Headline
field, but only asset A needs to worry about SEO and the 50-char
Thanks,
I just added the Filter interface to my servlet, put the my filter before the
struts filter, and now the servlet works like a champ.
You simply call the servlet service() method without forwarding to the next
filter chain.
public void doFilter(ServletRequest servletrequest, ServletRes
One approach I've through of is to create an interceptor that would parse
through your -validation.xml (assuming one uses them) and then only allow
parameters that have an associated validator. This would actually serve two
goals: 1) Preventing parameter fiddling 2) Mandating the wise practice o
I'm randomly bitten by funky input files, too, like when people
cut-and-paste from something like Word.
I don't think that's it, but when it's something weird, you never know.
Also, which line is that? It's impossible to tell where the lines are in
your file.
Dave
On Fri, Dec 17, 2010 at 1:24 PM
It smells like missing dependency?
2010/12/17 Amit Oberoi :
> Maurizio,
>
> Thanks for your prompt response. It doesn't works, still getting the same set
> of exceptions.
>
> Amit Oberoi
>
>
> -Original Message-
> From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
> Sent: Fri
That would certainly eliminate the email being set! :) Sorry about that.
What I have done is combine a security system based on
user/role/url/valid-parameter list with the ParametersInterceptor and throw
away any unauthorized parameters. This was quite an undertaking and my
company is not willin
Maybe if the OP moves the bean creation out of the prepare() method (so the
bean isn't available during parameter injection) and then retrieves it at
the start of validate() or execute() that might solve the problem.
(*Chris*)
On Fri, Dec 17, 2010 at 10:05 AM, Chris Pratt wrote:
> If the bean a
If the bean already exists, struts doesn't have to set it. It just has to
modify the retrieved bean.
(*Chris*)
On Fri, Dec 17, 2010 at 9:48 AM, wrote:
> I agree S2 will create the bean (if null) but it can't set a property that
> is private and has no accessible setter method.
>
> P.S. What a
So, in case of the OP, are you suggesting to remove setter method from
User's email?
2010/12/17 :
> I agree S2 will create the bean (if null) but it can't set a property that
> is private and has no accessible setter method.
>
> P.S. What am I missing here?
>
> Scott
>
> On Fri, Dec 17, 2010 at 1
Maurizio,
Thanks for your prompt response. It doesn't works, still getting the same set
of exceptions.
Amit Oberoi
-Original Message-
From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
Sent: Friday, December 17, 2010 11:11 PM
To: Struts Users Mailing List
Subject: Re: No t
I agree S2 will create the bean (if null) but it can't set a property that
is private and has no accessible setter method.
P.S. What am I missing here?
Scott
On Fri, Dec 17, 2010 at 11:45 AM, Maurizio Cucchiara <
maurizio.cucchi...@gmail.com> wrote:
> This happens because bean is null, otherwis
This happens because bean is null, otherwise struts will populate.
2010/12/17 :
> Guys --
>
> If the action has no setter and the property is private, S2 will not
> populate it.
>
> Scott
>
> On Fri, Dec 17, 2010 at 11:10 AM, Maurizio Cucchiara <
> maurizio.cucchi...@gmail.com> wrote:
>
>> David,
Probably I'm wrong, but you should try to declare html struts library
in the following way:
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"; %>
2010/12/17 Amit Oberoi :
> Hi, This may sound a dumb question; however, I am new to struts & JSP
> and this indeed is my first code to
Guys --
If the action has no setter and the property is private, S2 will not
populate it.
Scott
On Fri, Dec 17, 2010 at 11:10 AM, Maurizio Cucchiara <
maurizio.cucchi...@gmail.com> wrote:
> David,
> I get your point.
>
> Scott is right, you could overwrite PI or maybe write your custom
> interc
Hi, This may sound a dumb question; however, I am new to struts & JSP
and this indeed is my first code to do a login. I am using Netbeans 7.0
Beta as the IDE and while executing I am getting the below error
message. Please can anyone help me in sorting this out.
org.apache.jasper.JasperExceptio
You could have different way:
1. You could change url pattern for struts filter as the following code:
/struts2/*
or simply
*.action
2. alternately you could write your custom filter, place its
filter-mapping before struts's one
2010/12/17 :
> Hi all,
>
> I am trying to incorporate a servlet i
David,
I get your point.
Scott is right, you could overwrite PI or maybe write your custom
interceptor (though I think you should consider to file an issue on
JIRA).
Maybe it would use java annotations to hide/expose fields, or
alternately it could behave as you supposed (expose only field with
wr
Hi all,
I am trying to incorporate a servlet into my struts 2 application. It seems
that the struts 2 filter fires before the servlet has a chance to execute,
thereby causing the struts engine to process the servlet url as a struts
action. This of course results in a "no action found for url
/
David --
You could override the ParametersInterceptor with your own that validates
requester role/parms/url. I have used this approach to throw away
not-authorized parms altogether.
Scott
On Fri, Dec 17, 2010 at 8:54 AM, Altenhof, David Aron wrote:
> The model objects are initialized in prepar
You should be able to initialize the objects in the interceptor instead, you
could even retrieve them from the request or some other method in the
action. Probably a more comprehensive fix than trying to white-list
everything by hand.
(*Chris*)
On Fri, Dec 17, 2010 at 6:54 AM, Altenhof, David A
Our application is designed to allow users to query information from our
backend database. The records in this database are stored with an
association to a data hierarchy. Each record contains a facilityId
value and this facilityId is the deepest child in the tree of
customer->region->facility.
The model objects are initialized in prepare() ... other techniques just aren't
as practical for our application.
I'm just going to keep doing lots of whitelisting with ParameterNameAware...
-David
-Original Message-
From: Steven Yang [mailto:kenshin...@gmail.com]
Sent: Friday, Dece
Ok, after a little more code reading I think I understand a bit better.
Action names are checked for duplicates only for pre-existing configuration,
which probably means the XML config. If I annotate in the same class with
the same action name, again that is checked. Only (and this is what I think
Hi Johannes, Frans, Hansty,
Thank a lot for your answer. Today it doens't exists Update Site for Struts2
IDE (I have developped that this Thursday in 2 hours).
But if you know how test Eclipse Plugins you can get sources plugin from SVN
(the attached doc tell you where you can find sources ):
*
h
28 matches
Mail list logo