This project allows wildcards to be used in Struts 1.1+ action mappings. The
wildcard-matched values can then be substituted in the values of various
Struts action mapping and action forward attributes. It uses the wildcard
matching class from Apache Cocoon which is the default matching class
Hi, I was looking at Matt Raible's Struts-Resume application and
it seems he's using Hibernate to do his persistence. One thing I'm not
100% clear on is - which part of his application represents the
Session Facade pattern? Is it the *Manager.java classes or is this
pattern non-existent in this
Prevent the user from directly accessing the JSP page by putting all JSP pages
under WEB-INF directory, or use a Filter.
On Saturday 07 June 2003 22:55, otsuka wrote:
When a user directly access to a JSP page which belongs to
a Struts module, module switching is not processed
Hi Dan,
This seems to be the most promising solution as of yet. I am
however a little unclear as to how this avoids the need for
a request for each row added.
If I understand what your describing the LookupDispatchAction
extension is for handling forms with multiple buttons. As you
describe one
No I hadn't. Where in the struts application shall I subclass ValidatorForm?
I declared a DynaValidatorForm in the struts-config.xml file and then I
declared my form in the validation.xml file. Shall I do something more?
Thanks,
Marco
- Original Message -
From: David Graham [EMAIL
David, your email was illuminating. Actually I had a closer look at the
code; the [silly!] problem was that I declared a DynaValidatorActionForm in
the struts-config.xml file and used a DynaValidatorForm in my action. Now I
declared both to be DynaValidatorForm and it works.
Thanks,
Marco
-
Hi, now that I got Validator working properly, I'm trying to declare a
validation by which an edited field cannot be greater than a certain size,
but it doesn't work.
Here follows what I've done:
In the struts-config.xml file, i declared among the others, a password
property in the
Prevent the user from directly accessing the JSP page by
putting all JSP pages under WEB-INF directory,
or use a Filter.
I understand the "under WEB-INF" solution, but I don't
know the filter strategy.
Could you tell me about a filter which solves the direct
access
Create a Filter that is mapped to all JSP requests, and in its doFilter
method, redirect to a page that says something like direct access to JSP
pages are not allowed. For details of Filter, see SVR.6 of Servlet Spec 2.3.
I can show you some code on Monday, if you would like. I
Hi!
I have a small HTML-Form with 3 textfields. I've implemented the validation
rules in the validate() method of the ActionForm belonging to the html form.
Unfortunately Struts isn't using the ActionForm. Why?
Here my struts-config.xml
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE
I'm not sure, but it seems to me that in the following:
action path=/postTest
input=/WEB-INF/jsp/postTest.jsp
name=postTestForm
scope=request
validate=true
type=com.mycompany.PostTestForm
forward
Thomas Miskiewicz wrote:
Hi!
I have a small HTML-Form with 3 textfields. I've implemented the validation
rules in the validate() method of the ActionForm belonging to the html form.
Unfortunately Struts isn't using the ActionForm. Why?
Here my struts-config.xml
?xml version=1.0
Marco,
action path=/postTest
input=/WEB-INF/jsp/postTest.jsp
name=postTestForm
scope=request
validate=true
type=com.mycompany.PostTestForm
forward name=posttest.success
path=/execute/homePageSetup/
I am new to Struts and learning myself but from what I have read the
input attribute is for validation if the form/Action fails it will
send it back to the view. And know that you should never has .jsp
pages located in your WEB-INF directory. Just an idea.
--Sloan
Marco,
action
I am new to Struts and learning myself but from what I have read the
input attribute is for validation if the form/Action fails it will
send it back to the view.
My book states:
input - Used to define where the user should be redirected, if a validation
error occurs. Usually, the user is
Tom, the type attribute in the action element should point to an Action, not
to a class which extends the ActionForm class, therefore the source you
enclosed in your mail seems to be correct, but shouldn't be indicated in the
input attribute. When you indicate the attribute 'validate' = true, the
- Original Message -
From: Thomas Miskiewicz [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 6:02 PM
Subject: Re: Struts doesn't execute my ActionForm.
I am new to Struts and learning myself but from what I have read the
input attribute
- Original Message -
From: Marco Tedone [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]; Thomas
Miskiewicz [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 6:02 PM
Subject: Re: Struts doesn't execute my ActionForm.
Tom, the type attribute in the action element should
Hi,
I need to call methods of the ActionForm instance from within the JSP. Can
someone please tell me how to do this? I've tried defining a bean, but I get
a different instance of the class.
--
Best regards,
Carlos Saraiva
Raleigh, NC
http://www.carlossaraiva.com mailto:[EMAIL PROTECTED]
Which kind of methods do you need to call?
Marco
- Original Message -
From: Carlos Saraiva [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 6:23 PM
Subject: How to access the ActionForm instance from within the JSP
Hi,
I need to call
You are not wrong, florian, at the end of days what you should present to
user are strings. The question is: how to retrieve those strings? One
possible answer is by means of valueObjects. Let's think to the classic
user's data (email, password, first name, last name, etc.) and to a normal
global-forwards type=org.apache.struts.action.ActionForward
global-forwards !-- instead --
Why? What's wrong with the type?
name=postTestForm
scope=request
validate=true
type=com.mycompany.PostTestForm
You've definately gone wrong
I just went through the same problem last night.
Here's how I solved it:
form name=logmein
field property=userName
depends=required,minlength
arg0 key=logon.userName.displayName /
arg1 name=minlength key=${var:minlength} resource=false /
var
Hi,
I need to call methods of the ActionForm instance from within
the JSP. Can
someone please tell me how to do this? I've tried defining a bean, but I
get
a different instance of the class.
Which kind of methods do you need to call?
Marco
Methods written by myself.
--
Best
Ok, which functionalities do those method perform? Have you thought to
personal taglibs? The ActionForm should contain only getter/setter and
validation methods. *Work* methods on data could be easily grouped somewhere
else. The logic of the framework is request - ?action(form) -
presentation,
If I can suggest that this is not MVC and not Struts.
Consider, if you have not yet, purchasing a Struts book.
And maybe post a JSP mail list, if you are not using Struts to
pre-populate a bean in action.
.V
Carlos Saraiva wrote:
Hi,
I need to call methods of the ActionForm instance from
OK, here's the deal. I've got a JSP with a form that's included in another
JSP. When the imbedded JSP gets called, I want the fields in the form to be
populated by the attributes of the object it represents. The form object
doesn't get called before the JSP is instantiated. I'm looking for a way
Put the form which contains the properties you want to reuse in a session
scope, and then from the JSP use this form.
Marco
- Original Message -
From: Carlos Saraiva [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 9:27 PM
Subject: RE: How to
Hello!
public class PostTest extends Action
{
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
{
return (mapping.findForward(posttest.success));
}
}
What's
We really need to figure out a better way of doing things for ValidatorForm
and ValidatorActionForm. The differences between the classes are minor and
they should probably be only one class. I'm glad you fixed your problem!
David
David, your email was illuminating. Actually I had a closer
This may be do to an arg problem in recent commons-validator nightly builds.
I fixed this last night so it should show up in today or tommorrow's
commons-validator build. You could also download
commons-validator-1.0.2.jar and use that.
You should also be aware that Struts will not generate
Hi!
I now have a strange validation problem. I use this ActionForm class:
package com.mycompany;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import
Hey all
I'm currently combining several similar actions using sublass of
DispatchAction class.
I'm using the Validator (validator-rules.xml, validation.xml as plugin) for
my client-side validation successfully.
I'm also using the DynaActionForm for my form bean(s).
Since now I don't have a
Well, these validations have already been coded for you and can be
configured in an xml file by using the Validator. I highly recommend you
look into using the validator because it will save you a bunch of time.
Your problem may have something to do with setting the fields = in reset.
I
David,
Well, these validations have already been coded for you and can be
configured in an xml file by using the Validator. I highly recommend you
look into using the validator because it will save you a bunch of time.
I'll do soon. I getting acquainted with Struts working with the book
Let you FormBean has the name myform
so ... in jsp, use:
logic:iterate name=myform property=myList id=cols
important :
YOU MUST SPECIFY YOUR FormBean to any tag inst part of html:form
Mike Whittaker writes:
How do I specify the FormBean in the iterate name property?
I have DynaActionForm,
Ok, maybe I don't understand the Validator system well yet.
I would like to apply the server-side and client side validation.
(server-side for if client side falls thought for some or other reason)
What is the best and easiest way to do this?
- Original Message -
From: Alen Ribic [EMAIL
Why don't you use html:text?
Marco
- Original Message -
From: Thomas Miskiewicz [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 9:47 PM
Subject: Validation Problem
Hi!
I now have a strange validation problem. I use this ActionForm class:
Friendly developers,
I am substituting html:link to html:submit, to populate the actionForm before to
change the action.
I would like use html:submit button to edit items of a collection.
When I ws using html:link I had specified a property of this item to find its.
So... how could I substitute
Thanks for the reply David. I'll update my source from CVS and build from
there.
I'm glad someone is doing some work on the validator. And speaking of that,
I will most likely be using the validator extensively pretty soon in a new
application, which may result in some contributions. Are there
- Original Message -
From: Rodrigo di Lorenzo Lopes [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 10:34 PM
Subject: logic:iterate and html:submit
Friendly developers,
I am substituting html:link to html:submit, to populate the
Thanks Marco, I think I know how to do that.
--
Best regards,
Carlos Saraiva
Raleigh, NC
http://www.carlossaraiva.com mailto:[EMAIL PROTECTED]
-Original Message-
From: Marco Tedone [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 4:35 PM
To: Struts Users Mailing List
Subject:
Marco Tedone writes:
- Original Message -
From: Rodrigo di Lorenzo Lopes [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 10:34 PM
Subject: logic:iterate and html:submit
Friendly developers,
I am substituting html:link to
The author is incorrect. Check out
http://jakarta.apache.org/struts/faqs/newbie.html#reset for more info.
David
Well, these validations have already been coded for you and can be
configured in an xml file by using the Validator. I highly recommend
you
look into using the validator because
With most Container's you always want to lock down the WEB-INF
directory from any external access. If you use the container with
lets say apache you would use the Location Override all deny etc..
to keep users out of this directory. Again though this is coming from
the jsp/Servlet standpoint.
I'm glad someone is doing some work on the validator. And speaking of that,
I will most likely be using the validator extensively pretty soon in a new
application, which may result in some contributions. Are there specific
bugs
or feature requests where help is needed?
You can query bugzilla for
You need to use either DynaValidatorForm or DynaValidatorActionForm for the
Struts validator to work. If you've already configured the validations in
the xml files then all you should need to do is use the right Dyna classes.
David
Ok, maybe I don't understand the Validator system well yet.
I
So if this is java code, you should use:
html:submit property='%= buttonAddress(address.hash).name%' Edit
/html:submit
Am I wrong? In any case, if it's a name that you need, have you tried
bean:message key=foo?
Hope it will help,
Marco
- Original Message -
From: Rodrigo di Lorenzo
Hi all,
I have a webform that I am trying to create and I have run into a
huge problem. So, at the top of the form I have the action specified
and underneath I have defined the inputs using the struts taglib. Now,
I can submit the form to the Action just fine and all the ActionForm is
David Graham wrote:
I'm glad someone is doing some work on the validator. And speaking of
that,
I will most likely be using the validator extensively pretty soon in
a new
application, which may result in some contributions. Are there
specific bugs
or feature requests where help is needed?
Does that mean that future struts-1.x releases will be unable to use
commons-validator 2.x without changing the Struts base requirements to 1.4?
Struts would not use commons-validator 2.x in the 1.x series. I have no
timeline for changing commons-validator to 2.x anyways.
David
Gareth.
-
Thanx for your attention...
Still not compiling:
Actually, the last message error is:
[ServletException in:/common/partyCollection.jsp] Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated.
An error occurred at line: 18 in the jsp file:
Try:
logic:iterate name=valueObjectproperty=addressesid=address
bean:define id=buttonName name=address property=hash /
tr
td
/td
td
html:submit property=editAddress value='%= buttonName %'
title=Alterar/Alterar/html:submit
/td
/tr
/logic:iterate
- Original Message
I've successfully got tiles up and running... I do understand how i can use
a tile definition as a struts forward for my actions but i'm looking to
redirect to a tile definition using a href link. E.g.
I have the following tile definition:
definition name=my.home extends=default
Sorry friend, but it doesnt work too.
ServletException in:/common/partyCollection.jsp] Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated. An error occurred at line: 19 in the jsp
file: /common/partyCollection.jsp Generated servlet error:
hi
i want to use struts tokens to (un)process duplicate submissions. however, i
could not find out anything about using tokens in any of the sample apps
that come with struts.
1) is there a sample application which demonstrates using tokens in struts?
2) i'm not using the struts html tag
Hello friends,
i have already posted this Q. once but never got any reply,
can other atleast tell me what could be a work around for this?
I am trying to use validator with struts 1.1
My idea is to maintain separate resource bundle for each module
for jsp pages I can give something like this
On Sun, Jun 08,'03 (10:09 PM GMT-0300), Rodrigo wrote:
Sorry friend, but it doesnt work too.
snip
Marco Tedone writes:
Try:
logic:iterate name=valueObjectproperty=addressesid=address
bean:define id=buttonName name=address property=hash /
tr
td
/td
td
i want to use struts tokens to (un)process duplicate submissions. however,
i
could not find out anything about using tokens in any of the sample apps
that come with struts.
1) is there a sample application which demonstrates using tokens in struts?
struts-example uses tokens. You can also look
On Mon, Jun 09,'03 (08:39 AM GMT+0500), Riyaz wrote:
1) is there a sample application which demonstrates using tokens in
struts?
Actually I didn't find the Struts example app using the token stuff too
well. Maybe the example has changed though since it's been a while since
I looked at, but
Hi All,
I wish to know when to use the logging.
What are the application senarios where logging will be useful. I mean to
say that what will be the ideal situations where logging can be used.
I would appreciate an eye opening reply for this.
Cheers
Vijay
Hi All,
I wish to know when to use the logging.
What are the application senarios where logging will be useful. I mean to
say that what will be the ideal situations where logging can be used.
Logging is extremely useful when debugging problems in production
applications. I normally setup
62 matches
Mail list logo