Hi,
You should use interceptors provided by struts 2 for authenticating the
user. The interceptor provide you with easy coding according to AOP.
You can take a look at the sample application accompanying with struts2
distribution, that is mailreader.
Tuyen Dinh
On 10/16/07, Lizzy Borden [EMAIL
hi all,
I have at application scope level a list of data received as event
from a system outside the Struts 2 web app. I then have my struts
application with a JSP page that shows to the user the list using
displaytag when the user chooses to have an overview of such list.
The question is:
hi,
Already managed to resolve this issue.
Using the default struts.multipart.parser=jakarta had to download the
following two jars:
- apache commons io 1.3.2
- apache commons fileupload 1.2
then it works fine. Seems there are different ways depending on the
Struts release ... not good.
Hello
I want to add a user defined HTML attribute to lt;s:textfield.
Example of rendered HTML control: lt;input type=text
userDefinedAttribute=true/.
How can I do this?
if i write lt;s:textfield name=customer.cus_surname size=20
userDefinedAttribute=true /
I recieve an error.
--
View
I got a problem like this
I have 2 mothods caled edit() and create() I used annotation based
validation
but tthing is i want to validate some of experssions in edit method and some
of the in create() method
cant use @skipValidation in this
my problem is i can not difine this seperatly in my
I suspect you should create two action classes for this kind of
validation.
Either that, or over-ride the validation (and don't use the annotations)
using the validation() method.
-Original Message-
From: shan99 [mailto:[EMAIL PROTECTED]
Sent: 17 October 2007 09:27
To:
Hello.
I have
lt;s:form action=customer method='post' theme=xhtml
lt;s:textfield name=customer.cus_name size=20 label=Surname /
lt;s:submit value=OK name=apply /s:submit
lt;/s:form
and i want to show additional button near lt;s:textfield/.
For example :lt;input type=button
You should have a look at this one:
http://www.nabble.com/Re%3A-S2-%3A-Validation-per-Action-method---ideas--p12753992.html
I ended up following this lead, and it works nice.
Or you could try this:
http://www.nabble.com/Re%3A-S2-%3A-Validation-per-Action-method---ideas--p12090749.html
beto
I found an any kind of solution:
i create a n aditional templete text_w_button.ftl
pre
#include /${parameters.templateDir}/${parameters.theme}/controlheader.ftl
/
#include /${parameters.templateDir}/simple/text.ftl /
input type=button name=${parameters.name?default()?html}_find
I have 2 mothods caled edit() and create() I used annotation based
validation
but tthing is i want to validate some of experssions in edit method and some
of the in create() method
cant use @skipValidation in this
my problem is i can not difine this seperatly in my actiion class ..both
methods
Try this in your web.xml:
filter-mapping
filter-nameResponseOverrideFilter/filter-name
url-pattern*.action/url-pattern
/filter-mapping
-Message d'origine-
De : Giovanni Azua [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17 octobre 2007 11:09
À : Struts Users Mailing List
Objet
hi All,
Anyone has ran into the situation above? solutions?
I have the snippet below in my web.xml. I get no exceptions but firefox
hangs. If I flip the order i.e. struts 2 filter first and then
displaytag filter then I get an exception from displaytag complaining
about the lack of the
hi,
I already had it like this ...
I also tried removing the filer-mapping to JSP and having it like below
but does not work either. The browser hangs
(seems that the response is never sent back).
web.xml
...
filter
filter-nameResponseOverrideFilter/filter-name
Sorry I didn't see that you had already put it.
In fact, maybe the response has been flushed before de display:table like it's
explained here =
http://displaytag.sourceforge.net/11/export_filter.html
-Message d'origine-
De : Giovanni Azua [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17
I have the same sthing in the web.xml and it works...
What do you have in the jsp before the display:table ?
-Message d'origine-
De : Giovanni Azua [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17 octobre 2007 11:29
À : Struts Users Mailing List
Objet : Re: Struts 2 + tiles + displaytag
hi Leonard,
Many thanks for your help.
Since I use tiles, it is the main difference I think. I have a template
layout and actual page that looks as
shown below.
Thanks again.
best regards,
Giovanni
* Tiles LAYOUT
*
%@ taglib
I see two things that can flush the response.
s:head theme=ajax/
And
jsp:include page=menu.jsp /
I think that you should try to include menu.jsp with tiles.
-Message d'origine-
De : Giovanni Azua [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17 octobre 2007 11:41
À : Struts Users
We are getting the following message in log file.
Oct 17, 2007 11:56:08 AM
org.apache.struts.util.PropertyMessageResourcesinit
INFO: Initializing,
config='org.apache.struts.taglib.html.LocalStrings',returnNull=true
Any idea? Why?
Here is the log4j.properties:
# Set root logger level to
hi Leonard,
Tried your advice and it does not solve the problem ... :(
regards,
Giovanni
I see two things that can flush the response.
s:head theme=ajax/
And
jsp:include page=menu.jsp /
I think that you should try to include menu.jsp with tiles.
Dear All
Consider the following scenario: The preferred language of the user is
store in the database. I want to override any struts2 i18n settings
when the user logs in. What is stored in the database is of higher
priority than e.g. what the web browser sends in the HTTP request
headers.
How
Have you tried overriding the getLocale() method of
ActionSupport-derived classes?
--- Markus Stauffer [EMAIL PROTECTED] wrote:
Dear All
Consider the following scenario: The preferred
language of the user is
store in the database. I want to override any
struts2 i18n settings
when the
Id need to download version 1.2.9 and related libraries, but if I try from
the download area I get a corrupted zip (I cannot open it). Can you help me?
Simona Ricci
Consoft Sistemi Milano s.r.l.
20158 Milano - Via G. Candiani 73
Tel. +39 02 48022861 - Fax +39 02 43981857
Web
Il 17/10/07, Simona Ricci [EMAIL PROTECTED] ha scritto:
I'd need to download version 1.2.9 and related libraries, but if I try
from
the download area I get a corrupted zip (I cannot open it). Can you help
me?
You are right! The zipped version of Struts 1.2.9 is corrupted.
Try to use the
And how to disable the SERVER side validation when delete button clicked ?
ros wrote:
Java Script validation fro button disabled by
s:submit cssClass=button method=delete key=button.delete
onclick=document.getElementById('ticketForm').onsubmit = null; /
Hi all,
My problem is OGNL is giving a IndexOutofBound exception, when I am trying to
assign to a list in my action class.
The code in jsp file as follows
s:iterator value=advisors status=plan
tr
s:set name=index value=#plan.index/
td class=theading
s:property value=codeName/
s:hidden
Hello.
I have
s:form action=customer method='post' theme=xhtml
s:textfield name=customer.cus_email size=20 label=E-mail /
s:submit value=OK. name=VIEWtheme=simple /s:submit
s:submit value=Delete name=DEL theme=simple/s:submit
/s:form
and
CustomerCRUD-validation:
validators
I've solved this by changing the action in the form:
s:submit value=Delete onclick=this.form.action= 'delete.action'; /
but you must rename your CustomerCRUD-validation.xml file to
CustomerCRUD-ActionThatNeedsValidation-validation.xml file.
Just don't define any validation file for the delete
One way is to submit to a different method for
deleting and configure the validation interceptor to
disable validation for that method for that action.
--- Igor Vlasov [EMAIL PROTECTED] wrote:
Hello.
I have
s:form action=customer method='post'
theme=xhtml
s:textfield
You can use the @SkipValidation annotation in front of your delete
method.
-Original Message-
From: Igor Vlasov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 17, 2007 9:59 AM
To: user@struts.apache.org
Subject: Disable validation when delete button is pressed
Hello.
I have
For struts it's
interceptor-ref name=validation
cancel,execute,delete,edit,list,print
/interceptor-ref
Hope this helps.
ros
Igor Vlasov wrote:
And how to disable the SERVER side validation when delete button clicked ?
ros wrote:
Java Script validation fro
Hello,
I have the following requirement I would like to realize and I ask myself
whether it is possible with struts2 tabbed pane (right now after some
attempts I was not successful):
I have hierarchical data which are shown in tabs.
Sample: ObjectA have Collection of ObjectB
now presentation
This is not a solution.
I have 2 submit button in one form: one for save and another for delete. All
of them submit the form data to execute() method. There I can determine
which button was pressed and do an appropriate bussines action.
The problem is that i must to validate the data when OK
you can always use s:submit name=method:delete value=Delete / and
s:submit value=Execute / - then you don't need the logic to
determine which button was clicked in the execute() method, and you can
use the validation config below.
/ian
Igor Vlasov wrote:
This is not a solution.
I have 2
I am having the same problem with Tomcat. I tried the
IntrospectorCleanupListener and still got the PermGen memory error after
5 to 6 deployments.
-Original Message-
From: wild_oscar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 09, 2007 9:56 AM
To: user@struts.apache.org
Subject:
Hi there,
in struts tiles:
Is there an easy method to put a list of items to a nested tile:
Here is my tiles-def.xml:
definition name=base.definition
path=/common/layouts/layout_with_servicecolumn.jsp
put name=footer value=/common/tiles/footer.jsp /
Isn't XWorkList a sub-class of ArrayList?
--- Jon D Cruz [EMAIL PROTECTED] wrote:
I've been wracking my brains on this issue for the
last day and wonder if
someone out there can help.
*** I'm using an ArrayListParent to populate a
CheckBoxList on my JSP.
*** The Parent object has an id
This is probably a very easy question ... and I'm probably just having
one of those brain-fart moments.
I'm using struts2 and that works fine ... I've got a bean created and in
session, so I can use the:prefix=s uri=/struts-tagstaglib
defined.
This all works great!
I'm showing some
I've been wracking my brains on this issue for the last day and wonder if
someone out there can help.
*** I'm using an ArrayListParent to populate a CheckBoxList on my JSP.
*** The Parent object has an id and name field.
*** I'm using an ArrayListString to retrieve the values that have been
Hi,
I've web.xml file in which I've index.jsp as my welcome files list.
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list
in index.jsp I've struts logic redirect tag.
logic:redirect forward=welcome/
In struts-config.xml file I've the following in
After a few days of trying to figure it out, I gave up.
IntrospectorCleanupListner did not do the trick and after a few intensive
tests, the problem seemed random. Last conclusion for me was the speed of
redeployments - it would cause the Permgen error unless I waited about a
minute just before
Add escape=false to your tag:
s:property value=#session.data.body escape=false /
On Oct 17, 2007, at 2:00 PM, Tom Holmes Jr. wrote:
This is probably a very easy question ... and I'm probably just
having one of those brain-fart moments.
I'm using struts2 and that works fine ... I've got a
http://struts.apache.org/2.x/docs/property.html
'escape' attribute?
--- Tom Holmes Jr. [EMAIL PROTECTED] wrote:
This is probably a very easy question ... and I'm
probably just having
one of those brain-fart moments.
I'm using struts2 and that works fine ... I've got a
bean created and
Try putting the redirect=true on the global forward instead of the
action forward like this:
global-forwards
forward name=welcome path=/login.do redirect=true/
/global-forwards
action path=/login
type=com.cingular.cscape.cmps.struts.action.SignOnAction validate=false
forward name=success
How does one use server-side validation (requiredstring) for radio buttons?
Thanks,
Cory
yes it is..
M-
Isn't XWorkList a sub-class of ArrayList?
--- Jon D Cruz [EMAIL PROTECTED] wrote:
I've been wracking my brains on this issue for the
last day and wonder if
someone out there can help.
*** I'm using an ArrayListParent to populate a
CheckBoxList on my JSP.
***
Hi, I am using a checkboxlist, and I need some of my checkboxes disabled.
My code looks like
s:checkboxlist name=checked list=permissionList
listValue=node.description listKey=node.name value=checked
disabled=inherited /
and in my action
public class PermissionBean {
I would like to display and update objects in a list where the objects are
not necessarily of the same class. For example, I have a list of survey
questions where the question type may be Numeric, Multiple Choice, Open
Ended, etc. Each of these classes would be a subclass of Question but would
Hi,
I have this select.jsp
%@ taglib prefix=s uri=/struts-tags%
pEmployee Data/p
s:form action=*save* validate=*true* namespace=/person
s:hidden id=id name=employee.id /
s:textfield id=firstName label=First Name
name=employee.firstName /
s:textfield id=lastName label=Last Name
Yeah, you can chalk this one up as a duh moment for me. I'm using the
Db4o object database to save my objects, and it was erroring out when I was
trying to save an ArrayListString retrieved from the form, (but Struts2
was returning an XWorkList instead). Struts is just doing what it should
That sounds like a bug to me. Are you sure this is the behavior and nothing
has changed from your upgrade?
On 10/12/07, Samuel Fleischle [EMAIL PROTECTED] wrote:
Hello,
I updated from Struts 1.2.9 to Struts 1.3.8. Now I have the following
problem in my ForwardActions. Here is an example of
50 matches
Mail list logo