Shirish,
The solution you suggest me is quite good for me and is
near to my approach. In my ActionForm, I have a restoreDatas
method which is called to repopulate datas in case of validation errors.
This is a little bit cumbersome. Because I have to go back to the database
from the ActionForm.
Ok, this was not an easy one... :-)
The mistake you seem to make is the following: The actions /login and
/login/action basically are identical in what they are doing: They map
to the LoginAction. What you are doing in LoginAction (I am guessing
now) is forwarding to the input mapping, in case
Hi all,
I' m using a DispathAction to handle several action which are similar,
I need to initialize session attributes somewhere for all actions.
Can I do it in the constructor of my DispatchAction ?
I 've never needed to explicitely write the Constructor and everything
worked fine.
Is there
Hi
Can anyone assist with a simple explanation of how Tokens work and their
application within the Struts framework?
I have read the docs and looked at the examples but still have problems
understanding how (or if) Tokens solve the problem that arises when a user uses
the browser back button and
Right you are. Thanks for that Nick.
cheers
Jordan
-Original Message-
From: Afshartous, Nick [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 5 December 2002 10:44 PM
To: 'Struts Users Mailing List'
Subject: RE: mapping.getInputForward().getPath() is null
Maybe its null because in
--- Jack R. [EMAIL PROTECTED] wrote:
Is it a good practice to use xdoclet to generate
Struts config file? Or it
is not a good idea at all?
I know there are GUI tool to edit struts config
file. But I would think it
will be easier to have the struts config file auto
generate by xdoclet tag
--- Jack R. [EMAIL PROTECTED] wrote:
Is it a good practice to use xdoclet to generate
Struts config file? Or it
is not a good idea at all?
I know there are GUI tool to edit struts config
file. But I would think it
will be easier to have the struts config file auto
generate by xdoclet tag
Hi,
There is no documentation, except the examples in tiles-documentation.
If you write a better documentation, feel free to share it we us ;-).
Struts and Tiles are open-source, and any help is welcome.
Cedric
Joao Araujo wrote:
HI,
Where can I find documentation abtou t the
Hi,
You can extends SimpleMenuItem:
* Write a class extending SimpleMenuItem, or implementing
SimpleMenu. Add your new attributes
* Declare your items in your tiles-config, and specify the classtype
attribute: item classtype=YourClassName /
* Also specify your new
Hi,
This is a simple CRUD page, but the entity has an image property.
I retrieve
the View Object from the RDBMS and populate the ActionForm from it.
I think that the image should not be stored in the VO. Am I right?
What does CRUD mean? What does VO mean?
Where should I store the image
Perhaps I'm misunderstanding you, but I think you can do:
html:form action=%= request.getRequestURI() %
Hope it helps
Patrice
- Original Message -
From: Pablo Casado [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 04, 2002 4:42 PM
Subject: html:form relative action
There are 2 approaches to this problem .
For the perticular action, change the input mapping to the action u want to
forward control to in case of error(which in your case will be the error
handler action which repopulates the data in the form from database and sends
back to same jsp).
And in
Hi,
U can definately do this.BEcause forward is nothing else but another java
object.So u can put it in session scope(i will prefer request scope if its just
to share between 2 actions which are handling same request).Also about handling
it in servlet i dont think it is a good idea as this is
Hi all
I'm not very good at Struts yet so maybe my question is a bit stupid.
I have two collections: one with all elements from some collection and one
collection wich is a subset of the first collection (the selected elements).
What is the easiest way to render a select box with all the
Hi All,
A few validator problems here. I have set up my validator and it seems to
only be half working. My forms are all extening ValidatorForm but I am
receiving no specific javascript. I have included my generated HTML page.
There is no validation being done on the server side either.
When I
The problem may be in your struts-config.
If you have validate=false in you action mapping, you have to manually
validate via form.validate();
D.
-Original Message-
From: Jordan Thomas [mailto:[EMAIL PROTECTED]]
Sent: December 6, 2002 7:55 AM
To: [EMAIL PROTECTED]
Subject: Validator
I'll try the approach 2 cause'it seems like much more flexible for me.
Thank you Shirish for your advices.
Meissa
|-+--
| | shirishchandra.sakh|
| | [EMAIL PROTECTED]|
| | |
|
I forgot to add one more thing.
U had also mentioned that the form has the logic to get the list data from
database.
In our project we had lot of problems because some of the forms were directly
getting data from database to populate lists etc in case of errors.
So i will say that you should
My team is attempting to use the Struts-El tag library with Struts 1.1 B2.
Since the Struts-EL subproject was created after the beta 2 release, it's
not included as part of the distribution. I'm looking for a version of the
Struts-EL library that plays well with Struts 1.1 B2. The 11/7 version
Thanks Darren, but validate is already set to true in each action of my
struts-config.xml plus I am validating using
ActionErrors errors = loginForm.validate( mapping , reguest );
Also, I checked my log file and this is what I found is that it seem to be
processing the validation but it doesn't
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: 1.0.2 distro of nesting taglib (NeXt?)
I'm stuck on Struts 1.0.2 for the time being and would like
to use nested tags. Should I download
Marcus,
Not at all stupid, the whole select/option thing can get a bit hairy.
Let's say your form allows the selection of ice cream flavors (I'm hungry this
morning). If you want to allow the selection of multiple flavors, your action
form would have methods like:
public String[] getFlavors()
You can use the nested tags from keyboardmonkey as you had asked in another post to
solve this issue. Note that due to outside limitations the nested tags with Struts
1.0.2 require you to provide an Object[] (as opposed to a Collection) to iterate over
a collection. Your example with
Hey david, thanks again! I appreciate all your input on this.
I have a filter we use for other purposes but we use container managed
security. We have a lot tied into this.
Also, these requests use struts forms. We use post requests throughout the
system so url encoding is out of the question, at
This is the way CMS works, there is actually an interim request for the
login so your original request doesn't exist anymore. That is why I
suggested using a filter for authentication since you can better control the
authentication cycle. If you think it is a bug then you would have to get
the
Hi,
I'm trying to use Struts TestCase v1.9 and am getting the exception below
when calling actionPerform(). Thanks for any explanation.
--
Nick
testcase name=testSuccessfulUserLogon time=6.123
failure message=Error running action.perform(): class
java.lang.ClassCastException -
Are you using the correct version of StrutsTestCase? There are 4 versions.
Make sure you have the right one for the version of Struts and the
container you are using.
Afshartous, Nick [EMAIL PROTECTED] on 12/06/2002 10:48:41
AM
Please respond to Struts Users Mailing List
[EMAIL
Hi
The Task i have is to select one value from one list box and put in
another list box
i tried ,
html:select name=storeGroupForm styleClass=input2
property=storeGrpSelected size=10 style=width: 200px;
html:options name=storeGroupForm property=storeGroupList/
/html:select
i have a
Hi,
I am using the getInputForwardMethod() to return a user to the form that has
errors on it. OK, that is working except it seems to be leading to the wrong
place.
I need to go to http://localhost:8080/scoop/login/1.do from
http://localhost:8080/scoop/login.do. I think that instead I am been
I have been looking at glance the JSF Tutorial, at my idea idea, is that
Craig, do the things as they should be done. I mean, I large large thought,
planning, ordering ideas and short implementation. Sounds goods.
Just a set of very well ordered ideas rather that I huge development.
Good.
Artistic Style
http://astyle.sf.net http://astyle.sf.net
Thomas Gideon
Sr. Software Developer
B2eMarkets
301.230.2236 Tel.
301.230.2248 Fax.
[EMAIL PROTECTED]
www.B2eMarkets.com
:(
Thanks.
- Original Message -
From: Edgar Dollin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, December 06, 2002 10:47 AM
Subject: RE: Request losing data after container security check
This is the way CMS works, there is actually an interim
One more voice:
Intellij IDEA is a great IDE. It has a nice formatter built in.
It's not free, but it has loads of fantastic features for the price, including
incredible refactoring support.
Phil
-Original Message-
From: BARADAT Benoit [mailto:[EMAIL PROTECTED]]
Sent: Thursday,
Hello,
struts-blank/welcome.do does not work out of the box. Trying it with 1.1b2
or CVS I get:
org.apache.jasper.JasperException: Missing message for key welcome.title
This can be fixed by changing line 282 in struts-config.xml (in CVS) from
message-resources
Please post this to bugzilla.
Thanks!
David
From: Jonas Björnerstedt [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: struts-blank fix
Date: Fri, 6 Dec 2002 18:53:45 +0100
Hello,
struts-blank/welcome.do does not work out of the box.
I should have checked the nightly a bit better. The problem is only with the
1.1b2 release.
Jonas
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: den 6 december 2002 18:54
To: [EMAIL PROTECTED]
Subject: Re: struts-blank fix
Please post this to bugzilla.
Ok , I thought I have already changed the key value's to MRA and
PHONE_DB in both of my data-sources, what I am having trouble with is how
do I refrence these values in the form and action classes?
Tim Bachta
Information Technology
MC 48
Pramod,
This should be done completely outside of Struts. What I've done in the past
is to have two buttons that have onClick attributes set. Each button is
labeled something like ' - ' and ' - ' The onClick actions cause
JavaScript function(s) to be called. In the function you would iterate
I'm wondering what is considered the best practice for logging using
commons-logging in a Struts app. My current approach is to have a Base
class in every package that has the following:
protected Log log =
LogFactory.getLog(my.package.name);
But I've noticed that some of the Struts
At 11:33 AM 12/6/2002 -0700, you wrote:
I'm wondering what is considered the best practice for logging using
commons-logging in a Struts app. My current approach is to have a Base
class in every package that has the following:
protected Log log =
LogFactory.getLog(my.package.name);
-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: Best Practices for Logging?
I'm wondering what is considered the best practice for logging using
commons-logging in a Struts app. My
Ok I have tried that and I am getting a null pointer exception caused by
the DataSource, here is my code
ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource) context.getAttribute(MRA);
conn = dataSource.getConnection();
stmt =
Hi,
I'd like to know how to disable the validation before the input form gets
presented to the user.
I want to validate the input data just after the user submits the form, but
what's happening is that the validation is being invoked before, so the
html:errors tag is printing the errors, even
Prarmod,
Here is a link to an example of the javascript you might use.
http://javascript.internet.com/forms/items-popup-list.html
- Eric
- Original Message -
From: pramod parnati [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 06, 2002 8:01 AM
Subject: Struts with
Sri Sankaran wrote:
-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: Best Practices for Logging?
I'm wondering what is considered the best practice for logging using
commons-logging in a Struts app.
IBM's Resoruce Bundle Manager might help:
http://oss.software.ibm.com/icu4j/demo_tools/RBManager.html
It's been a while since I used it, but if I recall correctly it may fit your needs.
-= James
-Original Message-
From: Eric C. Hein [mailto:[EMAIL PROTECTED]]
Sent: Friday, December
The forum.java.sun.com forums are for general java questions. There is an
implementation of MessageResources called DBMessageResources (I think) that
may help you with your project.
David
From: Eric C. Hein [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To:
We are using just standard validation using a validate method within the
ActionForm
There are a series of validations, which look like the following:
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new
What would cause validation JavaScript to be generated with the wrong
function name?
See validateLogonForm, below. It calls validateRequired(form); however,
the actual function name is required(). I had the same problem with
minimum and maximum length on another form The main function
That gives me a xml parse error:
-INF/struts-config.xmlLine 17, Column 34: XML-0138: (Error) REQUIRED
attribute 'property' is not
pecified. org.xml.sax.SAXParseException:
file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts
config.xmlLine 17, Column 34: XML-0138: (Error) REQUIRED attribute
http://astyle.sourceforge.net/
I use this all the time, works beautifully... plugs in nicely
to UltraEdit which I use half the time to edit java source...
if you're wondering i use eclipse the other half the time
where I use the jalopy plugin for formatting instead of the
built-in format...
Hi Cedric,
where should I insert parserValidate=false? Where should I use the bean
tag? In which file and which block?
Zsolt
On Friday 06 December 2002 10:56, Cedric Dumoulin wrote:
Hi,
You can extends SimpleMenuItem:
* Write a class extending SimpleMenuItem, or implementing
Ok, post your entire data-sources section.
David
From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Multiple DataSource Problem
Date: Fri, 6 Dec 2002 13:57:36 -0600
That gives me a xml parse error:
data-sources
data-source key=MRA
set-property property=driverClass value
=oracle.jdbc.driver.OracleDriver/
set-property property=url value=jdbc:oracle:thin:
@147.101.104.63:1524:common/
set-property property=user value=MRA/
exists in the 20021206 nightly build. The validation_1_1.dtd file has the
following element definition for field elements:
!ELEMENT field (msg?, arg0?, arg1?, arg2?, arg3?, var* )
Shouldn't this be:
!ELEMENT field (msg*, arg0*, arg1*, arg2*, arg3*, var* )
Unless I am missing something
Hmm, I don't see anything wrong with that. What version of Struts are you
using? You should check the struts-config_1_1.dtd (or appropriate version
number) for available elements and attributes. The xml errors indicate you
have an element missing the property attribute.
David
From:
another question for best practice:
I often see debug messages code like:
if (log.isDebugEnabled() {
log.debug(debug message);
}
and sometimes:
log.debug(debug message); // let the log class decide whether it has to
do debug
which of the two versions do you prefer - why?
--
To
-Original Message-
From: Rene Eigenheer [mailto:[EMAIL PROTECTED]]
I often see debug messages code like:
if (log.isDebugEnabled() {
log.debug(debug message);
}
and sometimes:
log.debug(debug message); // let the log class decide
whether it has to
do debug
which of the two
Hi Rene,
Whether or not you put an if condition around the log output is mostly a
consideration of the performance required by your application, since even
one simple String creation takes longer than no String creation. :) In
addition, it is nice to be able to call isDebugEnabled() if you want
Laird and Justin
thanks for your replies - do you put the condition only for log.debug or for
all levels of logging as the performance issue is valid for all of them?
thanks
rene
-Original Message-
From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 6. Dezember 2002 22:54
The log4j API only defines isDebugEnabled() and isInfoEnabled(). My guess
as to why they don't have such calls for higher log levels is that you would
generally have some other condition around a warn, error, or critical -
whether it be in a try...catch, an if (thing == null), etc.
Justin
-
On Fri, 6 Dec 2002, Eric Tse wrote:
Date: Fri, 6 Dec 2002 12:07:59 +0800
From: Eric Tse [EMAIL PROTECTED]
Reply-To: Eric Tse [EMAIL PROTECTED]
To: Craig R. McClanahan [EMAIL PROTECTED]
Cc: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n implementation
Hi Craig,
Thanks
On Fri, 6 Dec 2002, Hohlen, John wrote:
Date: Fri, 6 Dec 2002 07:58:14 -0600
From: Hohlen, John [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts-User (E-mail) [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Help! Need Struts-El Library
On Fri, 6 Dec 2002, Adolfo Miguelez wrote:
Date: Fri, 06 Dec 2002 16:22:47 +
From: Adolfo Miguelez [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Java Server Faces stage?
I have been looking at glance the JSF Tutorial, at my
You might look at the tag I posted to bugzilla as an example. Feel free to
hack it to suit your needs.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12648
David
From: Craig R. McClanahan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Eric Tse [EMAIL
Can Someone answer this..i have the same problem
Khalid
-Original Message-
From: Almeida, Veeda [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:06 PM
To: 'Struts Users Mailing List'
Subject: Struts - JSP does not store the user entered values when i
click back
66 matches
Mail list logo