I am using Tomcat 3.2.2, but planning to migrate to
4.0. Then we will be implementing your suggestion.
Thanks for that.
Currently, we can use Kimerly's suggestion. But what
are the advantages of this option vrs. making the
attributes static members of a class derived from the
ActionServlet ? In
I use Version 1.0 - size of struts.jar is 326,441 kB+
Which Version do I need for the Parameter option?
-Ursprungliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 25. September 2001 00:49
An: [EMAIL PROTECTED]
Betreff: Re: using the Parameter of config
I
I don't jnow about your firs question but for the second one :
you can write error message if you specify the input page in your action
mapping.
then you use html:errors/ in your formular in front of each field.
The validade method of your FormBean must register error for the appropriate
Hi,
for example I have a page with several struts-button wich display their name
depending on the current local. Now I would like to have an additional
property set to specific command - not to the name of the button - to
determine in my Action-class wich button was clicked by the user.
Any
Looks like you got a flush problem. You can try to use flush=true in
template:get This is a known problem with some web container.
Cedric
Bryan Mallinson wrote:
I am using template tags.
I place content in another JSP file and insert it in a template file.
When the output is
My Collection contains Item object.
Item class consists of 2 values,
Integer itemNo
String itemName
I use the logic:iterate tag to retrieve data from
my collection.
It goes like below...
logic:iterate id="element" name="ItemCollection" type="struts_4.Item"
brbean:write name="element" /
Try:
bean:write name="element" property="itemNo"/
bean:write name="element" property="itemName"/
Mark
-Original Message-
From: May [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2001 09:22
To: [EMAIL PROTECTED]
Subject: retrieve data from Collection
My Collection contains Item object.
Mark
Works perfect !!
Thank you very much.
May
- Original Message -
From: "Geddes, Mark (ANTS)" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 25, 2001 5:29 PM
Subject: RE: retrieve data from Collection
Try:
bean:write name="element" property="itemNo"/
bean:write
Several errors messages are store in the ActionErrors instance ( generated
in the validate method of a ActionForm ).
The tag html:errors/ displays error messages without carriage return
between them.
What is the solution to display those messages with carriage return between
them (in a list by
I think one of the best practises is:
wrap each message within li and /li and provide error-header and -footer
that give a ul-/ul frame.
Although I think the html:errors tag should have an option to do this on its on...
hope this helps
Alexander Jesse
-Original Message-
From: [EMAIL
I have an action class BeforeSelectQuestionAction.java where I get all questions
from the database and put them to the request with request.setAttribute(questions,
questions).
When i surf to BeforeSelectQuestion.do there is no problem and in the jsp page that
follows I see all questions in
The examples I've seen solve this by mixing html formatting right in with
the error messages.
error.myerror=liThis is my error message/li
This seems like bad practice to me. If one needs to display errors in a
different format, one has to rewrite the errors files.
It seems to me html:errors
If you just want a carriage return, add it to the message in the properties
file:
error.required.firstName=Please enter your firstnamebr
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 25. September 2001 10:57
To: [EMAIL PROTECTED]
Subject: [Newbie]
With the delegation model approach, if I understand the Value Object approach
correctly I can associate an EJB with a ActionForm using delegation.
class MyEJB { ...
void setName( String name ) { this.name = name ; }
String getHello() { return Hello }
String getWorld()
It would be a great solution to have such attribute in the html:errors/
tag.
I don't don't find any good solution to solve this problem but create a new
error tag.
-Message d'origine-
De: Brian K. Buckley [mailto:[EMAIL PROTECTED]]
Date: mardi 25 septembre 2001 11:26
À: [EMAIL
Hello, all,
I have searched the mailing archive for this problem, there are someone post the same
issue but no answer.
Hope someome have the solution already that would share for me.
I have got some problems, here is the problems that I occur :
1. javac couldn't find
Yes he value object approach would work if you re-delegated again.
If the ejb returns a smaller object class with just accessor and mutator
methods. I can see that now
class MyEJB { ...
String getHello() { return Hello }
String getWorld() { return Word }
String getName() {... }
Frankie,
you got to specify the the path of ur struts.jar in iPlanet's
java configuration file. So, in your jvm12.config, add in this line
jvm.classpath=C:/iPlanet/Servers/docs/YourWebApp/WEB-INF/lib/struts.jar
however, if u are using iPlanet 6 with Service
Hello,
i am new in this group, hello all! I am also a beginner in JSPs, Java,
HTML and nearly all techniques used around struts, so forgive me, when
the following question is too stupid. I tried to resolve it via
reading the docs and studying the examples, but didn't found the
solution.
I have
Title:
Just
initialize a form before page display with default values and let the page use
it thereafter. It will be updated with the user's entries automatically (well,
more or less). Then use the properties of that form as the values of the widgets
on the page. Great examples in the
Hi,
I have used SOAP in the past but the products I am working on have been
developed using this VB back end. It has worked well for us so we are going
along with the if it a'int broke then don't fix plan.
What about my idea of checking application attributes in the actionservlet?
Alex
When the Submit.jsp form is complete it is passed to the ProcessForm.jsp
(Inserted to db)
Thus i have created a UserInfoValid.jsp as below. I now that i should'nt
use script albeit i need something to demostrate my keep.
jsp:useBean id=planBean scope=session class=PlanBean /
jsp:setProperty
Hi!
Start the trace on the test environment and you will some exceptions on
the struts applications .
I was getting the exact same error.After I started tracing I got an much
better picture.
Harshal.
-Original Message-
From: West, Tedie [mailto:[EMAIL PROTECTED]]
Sent: Monday,
Just a quick question. Can you use BeanUtils.populate() on the 'this'
object?
For example:
BeanUtils.populate(this, map);
Thanks,
Mindaugas Idzelis
Thanks for your response, Ted. Yes, I see that inheritance can be used to capture the common code to validate the user's login status and branch (goto) accordingly. But I'm thinking of reuse in terms of components at a higher level than classes and inheritance.
I'd like to be able to reuse the
Collection
-Original Message-
From: Christoph Conrad [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 8:04 AM
To: [EMAIL PROTECTED]
Subject: Two questions concerning html:options
Hello,
i am new in this group, hello all! I am also a beginner in JSPs, Java,
HTML and nearly
Hello Barry,
you wrote:
Barry Collection
Use a List now, works!
Best regards,
Christoph Conrad
--
TTi Entwicklungszentrum GmbH, Elisabethstr. 16, D-52062 Aachen
Fon: +49 241 47051-0 Fax: +49 241 47051-89 Web: http://www.ttisystems.com
Look Ma, this man can twist his fingers as if
Hi,
Is it possible to map several actions to the same action form by using a wildcard? For example
in struts config:
forward name="search" path="/do/search" /
action path="/search"
type="com.sky.videolounge.lounge.web.control.actions.SearchAction"
name="searchForm"
input="/search.jsp"
Hello,
I have a jsp page presenting a lot of select non multiple boxes (the number
of select tags is set dynamically in my page). Rather than using different
accessors for each select, I would like to be able to collect all data
(actually just strings) from the different select in a String[]. I
Can you use nested properties with the Struts HTML custom tags
such that they populate a valueobject nested inside a ActionForm type.
html:form name=/LoginAction.do
table
tr
tdUsernametd
td
html:text name=ejb.valueobject.username maxlength=16 /
/td
/tr
tdPasswordtd
Hi folks,
after reading a million postings on the subject, I still have a question.
When a checkbox is selected, I want to count the selected object in a different bean.
The total amount should be displayed immediatly in another frame so I have to submit
my form every time a checkbox is
Hi everyody !
In my multipage-form(jsp) I'm triing to get the Values
of various inputfields (text, textarea, selects .) by refering to the
corresponding
bean properties.
form:text property=h2okoopvname maxlength=250 size=40
but in my Actionformclass, where I want to use this values (by
We are doing this successfully - we just put getters/setters in the Form for
the VO.
Matt
--- Peter Pilgrim [EMAIL PROTECTED] wrote:
Can you use nested properties with the Struts HTML custom tags
such that they populate a valueobject nested inside a ActionForm type.
html:form
Hi,
is it possible to use an template parameter as a parameter of a struts-tag ?
for example, something like this:
jsp:
template:insert template=thetemplate.jsp
template:put name=name content=Mike direct=true /
/template:insert
template.jsp:
html:form action=somethingto.do
Name:
Sounds like a logic problem, are you sure that the logic in the action class
isn't branching around the part where it adds the questions? Maybe if you
send your code...
-Original Message-
From: Christophe Rikelynck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 6:19 AM
To:
Then it must be me, then, because my Struts is not finding the form.
In the Action.perform() method form parameter is a NullPointerException!
--
Peter Pilgrim | |++44 (0)207-545-9923
\ \ ___ / / ... .
- ( * ) --- --
I found my error.
In the perform method of the WelcomeAction class, I instanciated a
WelcomeForm like this :
...
form = new WelcomeForm();
( ( WelcomeForm ) form ).setLogon( userApp.getLogon() );
...
I don't know why, but the framework don't like it. I suppress the line
Peter,
In terms of resource usage, if you have 10 properties in a bean, returning
an entity handle and calling the accessor methods one at time would result
in a 10 times RMI overhead; RMI allocates all kinds of stuff including
network resources on each end, for each call and I'd bet that would
That's bad. You should have any data-loading in the form. It should be in
the action.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 11:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Help with Struts and EJBS..
Peter,
I understand
Alex,
I wouldn't do it, I'd create a base Action class that does the same thing.
-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 8:32 AM
To: Struts
Subject: RE: Can you comment on this design idea?
Hi,
I have used SOAP in the past but
JSP is not creating and/or populating an action form?
I can associate the html:form with the action form.
I can see the bean created by the time the JSP is generated.
However when I html:submit the form the action.perform()
method has a form parameter that equals null.
I look at the
But than doesn't it defeat the purpose of the validate() method in the form
and complicates the code?
Wouldn't it be better to have some sort of htlm:label ... or something to
allow to show some form fields not as input field but as simple text.
This problem must have been discussed already. If
Have you ensured that your struts-config.xml is written correctly, in particular the
action name=xxxForm tag parameter and the associated form-bean name=xxxForm
type=com.a.b.c tag?
On Tue, 25 September 2001, Peter Pilgrim wrote:
JSP is not creating and/or populating an action form?
I don't have a direct solution to our problem but why not submit the
checkbox form, targeted to the frame that's supposed to display the total?
An action can count the check boxes and display the total page without
having to refresh the form every time. The form can also use a JavaScript
timer to
If you are using a recent nightly build, an
html:messages tag has been added. It iterates through
errors (and messages) so html formatting can be left
out of the messages in the properties file. The
header and footer are optional. Otherwise it works
like html:errors.
html:messages id=message
You could use JavaScript to set a hidden field in the onClick of each
button.
-Original Message-
From: storck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 4:08 AM
To: User Struts (E-Mail)
Subject: Problem with struts buttons
Hi,
for example I have a page with several
I have a form that combines elements from mulitple form elements, some of
which are represented as vectors within the main form. When I try to access
some of the getters that are nested within the main form struts is not
building the get reference correctly. Has anyone tried to do this? Does
It seems you do not have a form bean tag in struts-config.xml file that
matches your form bean.
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: JSP is not creating and/or populating an action form?
Date: 25 Sep 2001 10:38:00 -0700
Have you ensured that
There hasn't been a discussion about deprecating
html:errors. I prefer html:messages over it just to
get the formatting out of the messages and have a
cleaner separation of the view from everything else,
but there are a lot of JSP pages that use html:errors
so I think it will be around for a
on the button put:
propert=action
and then in your action class, do
MessageResources resources = getResources();
if (action.equals(resources.getMessage(button.text)))
{
// do something
}
--- Hans Gilde [EMAIL PROTECTED] wrote:
You could use JavaScript to set a hidden field in the onClick
Thanks alot for the multibox answer, it worked fine.
I have another problem plaguing me at the moment. I have a JSP application on which you can perform a certain search. Because I dont know how many search results will be returned I have to make sure that I have page numbers, dynamically
I usually use a standard javabean as a proxy into my ejbs. This approach
allows you to modify the EJB layer without modifying your action/actionform
classes. If you ever decided you didn't want the EJBs you could modify the
javabean to use JDBC instead. I use my Action classes to process the
I am trying to in my action, retreive data from a DB, and then send it
to the page for editing. (The page would then send it back to same
action to be saved to DB. Also, I would try to use same page and action
for insterts and validtaion later).
Only I can't get it to work. (looked in mail
Victor, Victor, Victor... you have to use the form passed int the action.
So you have to do
NameZoomFrm frm = (NameZoomFrm)form;
Then set the values. You don't do the session.setAttribute.
-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25,
Hi,
I'd like to know what is the status of struts.tld. It defines an include
tag
wich performs the equivalent of a jsp:include tag. Is it deprecated ?
There is also the bean:include ... tag defined in struts-bean.tld.
From the code,
I understand that the framework is computing an url, and
I have 3 different templates (tempA.jsp, tempB.jsp and tempC.jsp). Depends
on the user profile after they login, a session attribute will be set, e.g.
session.setAttribute(user_template, template), to indicate which template
to be used. I'd like to get some ideas on how to switch between these
Requirement - suppose the servlet-container is asked to present 'abc.jsp',
it should serve the very first jsp that meets the following lookup sequence:
abc_req_language_req_country_req_variant.jsp
abc_req_language_req_country.jsp
abc_req_language.jsp
abc_def_language_def_country_def_variant.jsp
Our current UI framework does not allow Javascript for UI Validation, so we are
using the struts validation framework sans javascript.
So far, we have found that we are only able to validate required and data
types. We would also like to validate length of a string and such, to make
sure the
Is there a way using Struts to create a dynamic jsp:include? For example
I've got a jsp file which needs to include two different jsp files in the
same place, but at different times. I know I could just make two copies of
the parent jsp file with a diffent include in each, but i would prefer it
Hi,
I just moved my directory structure around for a previously working Struts
app and am having problems with the action mapping forward tags.
Previously all of my JSPs and struts-config.xml were running in the same
webapps directory [/webapps/cowboy].
Now my struts-config.xml is now
Hi,
Is it possible to populate a form bean without using the submit button to post the form. Iam using thelink tag to forward the user from one pageto another,but at the same time I would like the contents of the form to be sent to the Action form class.
I do not know if whatI am trying to do
Title: RE: Need explanation: include tag in struts.tld and bean:include tag
The comment at the beginning of struts.tld says that is has been deprecated and is present only for backwards compatibility. You should use bean:include instead.
Cheers,
Brett
-Original Message-
From:
Hi,
we started using struts for our application, and we
need to get best of it:
1.
Right now we are using Action Forms for the user input
on the JSPs.
But our JSPs have form elements like drop downs, check
boxes, etc. which requires a read only data.
Wherever we require read only data we save
Check out our new
site done totally with struts!
www.vectren.com
Does struts support pagination of a collection over multiple pages.
You know, there you have prev next buttons to move from one page of
items to the next (ie. a list of 100 items, 10 per page, 10 pages total).
I know, so far that I can use the iterate tag to display the collection in a
table.
chiji == chiji nwankwo [EMAIL PROTECTED] writes:
chiji Hi,
chiji Is it possible to populate a form bean without using the submit button to
post the form. I am using the link tag to forward
chiji the user from one page to another, but at the same time I would like the
contents of
Michelle == Michelle Popovits [EMAIL PROTECTED] writes:
Michelle Does struts support pagination of a collection over multiple pages.
Michelle You know, there you have prev next buttons to move from one page of
items
Michelle to the next (ie. a list of 100 items, 10 per page, 10
I used a different name for button. In my Action class, I check to see if
any of these are not null before checking for the action field that will be
set if an action was specified with the URL.
e.g.
IN JSP:
html:submit property=editButton
bean:message key=button.edit/
/html:submit
Gary, Ted,
I have a very similar need. I have Struts application components
that I'd like to reuse/share with others (e.g. user profile manager,
adminisration tools, login, dynamic toolbar, calendar etc.)
A reusable component typically consists of:
- several Action classes
- several ActionForm
69 matches
Mail list logo