Just a note:
You cannot embed tags within another tag's attribute; ie,
html:radio property=id value=bean:write name=user property=fromDomain//
is not allowed.
You could use JSTL and do something like
html:radio property=id value=${user.fromDomain}/
I think your container has to be JSP2.0
It seems that you have this action path set to validate user input.
When validation fails, Struts looks in its action mapping for the input
attribute value which tells it where to go when validation fails.
Apparently you don't have an input attribute defined for your
/login action mapping.
robert
Ken, if you are familiar with basic web programming
and the web MVC architecture, then download the Struts examples
and go through them. That should get you up and running.
After that, there are several books and a couple of
good sites that can get you up to speed.
The struts website contains
Strategy 3.
I would basically have a DAO that handles the search query
and returns a collection of value objects for the related use case.
When the user clicks on a specific employee, then render the
details using your employee DTO.
As far as patterns are concerned you may want to take a look
as
form.reset();
robert
-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 11:20 AM
To: Struts Users Mailing List
Subject: Re: Loosing request attributes
I was taking a look at the HttpServeltRequest and
ServletRequest apis and noted that
Joe, you could move your business logic to a service layer which
also leverages the Command pattern. You could have a base command
which did something similar as Craig has outlined.
public abstract class BaseCommand {
public void execute() throws Exception {
try {
Since you are using an EL construct in the value attribute
of the html:text .../, you will need to import the
Struts html-el tag library so that the tag knows how
to extract information from the scoped attribute.
robert
-Original Message-
From: Ricardo Gladwell [mailto:[EMAIL
that the EL
version of the taglibs are working successfully.
What is a puzzle is why is the setter method in the the DynaActionForm
being passed 'webdav.url' as the property name parameter, but 'null' as
the value name parameter?
--
Ricardo Gladwell
Robert Taylor wrote:
Since you
Subject: Re: Problem setting nested bean properties on ActionForms
Not if hes using a servlet container that supports el.
Niall
- Original Message -
From: Robert Taylor [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, August 06, 2004 2:25 PM
Subject
This problem has been discussed many times on this list.
I recommend you search the archives.
In the mean time, have a look at using a lazy list.
http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/ListUtils.html#lazyList(java.ut
to proceed to reset password or not.
Regards,
Muhammad Momin Rashid
Robert Taylor [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
As Jim already mentioned, its best to keep the form beans as simple as
possible
and void of logic.
Place calls to business logic or delegates
This approach sounds similar to the Spring IoC framework.
Objects are defined in an xml file and a manager loads them
into memory. Your action class looks up beans using something
like:
MyBD bd = (MyBD)applicationContext.getBean(MyBD);
So you don't have to implement the ServiceLocator or
I'm no guru, but
You can put the appropriate HTML stuff in, but
the basics are as follows:
logic:iterate id=collectionElement name=allContacts
html:link action=/deleteContact
paramId=id
paramName=collectionElement
paramProperty=eltId/
/logic:iterate
Define success and failure forwards in your struts-config file for the
specified action.
In the action class (which should delegate to a business object),
retrieve the data. Upon failure, forward to the failure forward,
else forward to the success forward.
You could achieve the same using
Are you including the html-el tag library in the page?
robert
-Original Message-
From: Sergey Livanov [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 12:03 PM
To: Struts Mailing List
Subject: parameterizing action attribute to html:form
Please advise me,
I try to set
if this is the correct approach to have the
form bean make such calls. If not, then kindly suggest a better
implementation.
Regards,
Muhammad Momin Rashid.
Robert Taylor [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Define success and failure forwards in your struts-config file
If you'd like to see some leading edge Flash, turn up your sound and go to
http://www.2advanced.com/
That's some pretty cool stuff!
robert
-Original Message-
From: Mike Duffy [mailto:[EMAIL PROTECTED]
Sent: Monday, July 19, 2004 12:58 PM
To: Struts Users Mailing List
Subject: Re:
One strategy is to wrap the SQLException thrown by mySQL
in a meaningful ApplicationException which can be caught in your action class
or declarative exception handling mechanism and interpretted
into the appropriate client error message which can be placed
in the appropriate scope (request or
Can you be more descriptive as to what doesn't work?
Are you including the Struts-EL taglib?
What does the raw HTML look like?
Is there a stack trace?
robert
-Original Message-
From: ron piterman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 14, 2004 11:45 AM
To: [EMAIL PROTECTED]
in html:radio
I'm not using EL, should I ?
there is no raw HTML because the html:radio tag does not digest the
${bean.prop} expression.
Cheers,
Ron
Robert Taylor wrote:
Can you be more descriptive as to what doesn't work?
Are you including the Struts-EL taglib?
What does the raw
You might want to address the Hibernate mailing list
as this is not really a Struts question...or at the
very least prepend the subject with [OT].
robert
-Original Message-
From: Indra Gunawan [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 2:27 AM
To: 'Struts Users Mailing
http://jakarta.apache.org/site/mail2.html#Tomcat
-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 10, 2004 6:31 AM
To: Struts Users Mailing List
Subject: Why Ajp13Connector.class is not found in tomcat-jk.jar inTomca
5.x but in Tomca 4.x
Hi
I think you would have to define the mapping that exists in web.xml for that
servlet in one of that servlets init parameters. I don't believe its explicitely
available through an API call.
robert
-Original Message-
From: Hookom, Jacob [mailto:[EMAIL PROTECTED]
Sent: Friday, July 09,
You may also want to check out ParameterActionForward:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg96372.html
robert
-Original Message-
From: Twan Kogels [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 10:21 AM
To: Struts Users Mailing List
Subject: RE: ActionForward
+1
I would also add that the Facade should be an interface where the
implementation can change without affecting the client code.
I would also recommend looking at the Spring framework. It provides
declarative transaction management without using EJB.
I also provides a declarative way to
I got it (Expert one-on-one J2EE Design and Development) used on Amazon for
$8.50 including shipping. It arrived looking brand new.
He's got a new one coming out in November, Professional Java Development
with the Spring Framework.
+1
-Original Message-
From: Bryan Hunt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 06, 2004 11:37 AM
To: Struts Users Mailing List
Subject: Re: [OT] Speaking of gratuitously difficult.
Forget about it, the only way to do it without tearing your hair out is
to use ANT
One solution is to point the input attribute value of the PageSubmit.do action mapping
to the Page.do action mapping thus re-retrieving the lists before displaying the page.
An alternative solution is to override the reset() of your action form so that it
retrieves the lists from the database and
David, take a look at lazyList here:
http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/ListUtils.html
robert
-Original Message-
From: Ellingson, David [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 06, 2004 3:22 PM
To: '[EMAIL
and submits the data.
If I set the imput to /Page.do wouldn't I lose the user's input?
No, the input param in struts-config.xml is expressly used for the case
where validation fails. So you
won't lose anything.
- Glenn
Robert Taylor [EMAIL PROTECTED]
06/07/2004 02
Let me clarify the last statement:
Page.do will write over any input values to which it is
programmed to write.
...more eloquently stated by Jim
It shouldn't... unless you are overwriting those fields in page.do explicitly.
robert
-Original Message-
From: Robert Taylor [mailto
go the first solution route, then I have my 3 Lists as part of the
Form bean.
The user selects from the list and submits the data.
If I set the imput to /Page.do wouldn't I lose the user's input?
- Glenn
Robert Taylor [EMAIL PROTECTED]
06/07/2004 02:39 PM
Please respond to Struts
.
Ding Lei
On Thu, Jul 01, 2004 at 01:41:15PM -0400, Robert Taylor wrote:
Remove the doctype declaration:
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
and try the following for the root element
,
axel
On 2004-06-28 at 12:00:22 -0400, Robert Taylor wrote:
This may help:
http://issues.apache.org/bugzilla/show_bug.cgi?id=19925
robert
-Original Message-
From: Axel Groß [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 11:52 AM
To: Struts Users Mailing List
Have you looked into using the JSTL XML core and transform tag libraries?
I haven't used them yet, but they have tags which allow you
to parse and transform.
robert
-Original Message-
From: Kransen, J. [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 4:47 AM
To: 'Struts Users
To isolate this problem, you should remove Struts from the equation and them perform
the tests. For example create a simple web application with a servlet and access it
concurrently and see what happens.
robert
-Original Message-
From: Mathieu Grimault [mailto:[EMAIL PROTECTED]
There was a recent thread on this behavior although
I cannot recall the resolution.
Please search the mail archives.
Also, make sure you have the appropriate .tld and .jar files
in place. Make sure you web.xml file corresponds to the
containers supported Servlet spec. Make sure you have
,
I'v searched all the recent 800 messages, and found no
similiar messages ..
Would any one of you kindly tell me what might causes the problem?
Thank you!
Ding Lei
On Thu, Jul 01, 2004 at 12:25:50PM -0400, Robert Taylor wrote:
There was a recent thread on this behavior
You cannot embed tags as attribute values in other tags.
Assuming you are using Struts-EL tag library AND the container you
are using supports JSTL 1.1, then you can try the following:
c:if test=${fn:startsWith(attachBean.attachMimeType,'image/')}
html_el:img
://jakarta.apache.org/commons/sandbox/email/
there is allready an implemented multipartemail.clazz
i used them successfully in my application. they are
easy to use, you are *free* from the java-mail-api
Cheers,
matthias
-Original Message-
From: Robert Taylor [mailto:[EMAIL
I'm not sure the subject of this email is indicative of my question, but I have always
wondered why amazon, sun, and some financial
institutions,
use long URL's for invoking actions. My only guess, since I've only worked at small
companies where all the applications pretty much
run on
one
repost next
time you click a link on the page.
-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 8:51 AM
To: [EMAIL PROTECTED]
Subject: [OT] Anatomy of a long URL
I'm not sure the subject of this email is indicative of my question
: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: 28 June 2004 14:51
To: [EMAIL PROTECTED]
Subject: [OT] Anatomy of a long URL
I'm not sure the subject of this email is indicative of my
question, but I have always wondered why amazon, sun, and some financial
institutions,
use long URL's
This may help:
http://issues.apache.org/bugzilla/show_bug.cgi?id=19925
robert
-Original Message-
From: Axel Groß [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 11:52 AM
To: Struts Users Mailing List
Subject: Re: image submit and lookupDispatchAction - drives me struts
Hi
A general design for this sort of thing would be to load your collection
of teams at application start up and put them into the ServletContext.
Define an action for displaying the teams page and an action for
processing the user input after they have selected a team. Define your
actions to
Use different action mappings with same form bean.
Each action mapping can have a different input attribute value
for validation.
robert
-Original Message-
From: Asif Rahman [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 3:52 PM
To: Struts Users Mailing List
Subject: Is it
I'm sorry, I've missed parts of this thread, but this
last message caught my eye when you said it's printing
${contentId} to the screen instead of the value of contentId.
Which servlet spec. does your container support? I've seen this
type of behavior when the container supports Servlet Spec. 2.4
, the taglib URIs are not the same for the two JSTL
versions.
Quoting Robert Taylor [EMAIL PROTECTED]:
I'm sorry, I've missed parts of this thread, but this
last message caught my eye when you said it's printing
${contentId} to the screen instead of the value of contentId.
Which
work the same as the Jakarta one. If you're
using Resin, make sure the integrated JSTL is not being used.
-Original Message-
From: klute [mailto:[EMAIL PROTECTED]
Robert,
I am using servlet spec 2.3 and i did all the steps
you mentioned.
Thanks,
James
--- Robert
Should we call Mike, and tell him to tell Tim to unsubscribe when
he is out of the office :)
robert
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 9:55 PM
To: [EMAIL PROTECTED]
Subject: Timothy J Theis is out of the office
I will
Navjot, although I don't have an answer for you, I posted (forwarded) your
question to the [EMAIL PROTECTED] mailing list
which may be a more appropriate list for this type of question.
robert
-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23,
Assuming you have a scoped Collection named pageRecords:
Struts tags:
logic:iterate id=myID name=pageRecords
td bean:write name=myID property=id / /td
/logic:iterate
JSTL:
c:forEach var=user items=${pageRecords}
c:out value=${user.id}/
/c:forEach
robert
-Original Message-
From:
If your trying to avoid the overhead of EJB, then you may want
to look into the Spring framework. I've been wanting to find a
flexible architecture/framework which allows me to start with a
non-EJB type of approach and easily scale to using an EJB container
while minimizing the impact on the
I believe the reason it's not populated in the
action form is because its in the request as an attribute
and not a parameter.
snip-from-original-post
I just started experimenting with jstl and i'd like to
set a hidden field on MyActionForm using a value
(contentId) available as an attribute on
DynaActionForm theForm = (DynaActionForm) form;
String myValue = (String) theForm.get(myValueName);
robert
-Original Message-
From: Asim Ghosh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 5:30 AM
To: [EMAIL PROTECTED]
Subject: how do i get members of DynaActionForm inside
Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml,
graphics, etc...)
or just server side development (architecture, site design/structure, functionality,
etc...)?
How long did it take to design and implement?
robert
-Original Message-
From: Simone - Dev
In Struts, although you aren't FORCED to, what you GENERALLY do is create
three different Action classes like addItemAction, removeItemAction and
totalPriceAction, and each is called in response to a form submission.
But isn't it kind of odd that your object model isn't following what you
Use Strings as data memebers in your action form when ever possible.
You can translate the input in the action class performing what ever
logic is necessary.
robert
-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:29 AM
To: 'Struts
Yes.
return new ActionForward(path);
robert
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 08, 2004 7:17 AM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Action Forward
Is it possible to forward to a
This is not really a Struts question and as such the subject should be
prepended with [OT].
That being said, that particular line of code is retrieving the /env
context.
The javadocs are pretty good at explaining what a Context is and how it is
used.
Why? It appears that you already have the appropriate best practices
solution. Are you trying to avoid using a BusinessDelegate?
robert
-Original Message-
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 9:15 PM
To: Struts Users Mailing List
Subject:
c:set var=dataCount value=${fn:length(dsmccList)}/
robert
-Original Message-
From: Ding Lei [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 22, 2004 1:45 AM
To: [EMAIL PROTECTED]
Subject: How to get length of an array(collection)
Hello all,
There is an array(dsmccList)
I assume your using BMP for persistence. If so, then you
could implement a Store Optimization (Dirty Marker) Strategy
which would control which fields get updated.
For CMP, the container should manage this.
For more on this strategy:
This may help:
http://issues.apache.org/bugzilla/show_bug.cgi?id=19925
robert
-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Mittack
Sent: Thursday, May 13, 2004 4:29 AM
To: [EMAIL PROTECTED]
Subject: DispatchAction with Images
When a Button is clicked I
Buster, you will have to create a new ActionForward
and populate it with the path you wish.
Check out ParameterActionForward:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg96372.html
robert
-Original Message-
From: Nimmons, Buster [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May
John, we have a similar process where by we allow a customer to download a file.
Instead of the Struts handling the actual downloading, we direct the user to
the informational page for the file. That page contains either javascript or
a meta-refresh tag which redirects the request to the file to
We capture and persist this information as well, but are not so
concerned about the small percentage that actually don't completely
download the file. If this is one of your requirements, then it
appears you may have a valid solution.
robert
-Original Message-
From: John Moore
I can only speak for myself, and yes, I run ServletExec 5.0
which is compliant with Servlet 2.4 and JSP 2.0. specifications.
For more information on ServletExec:
http://www.newatlanta.com/products/servletexec/index.jsp
You can download a free development copy here.
(DefaultErrorHandler.java:83)
at
Know what's wrong?
Robert Taylor wrote:
There are several good references on line for learning JSTL,
but I have found the actual spec itself to be great.
I'm assuming you want something like
brAAA/BBB/CCCbrDDD/EEE/FFF
etc...
c:forEach var=v items=${vectors}
br
One solution would be the following:
c:forEach var=item items=items varStatus=status
c:if test=${!status.first}//c:if
c:out value=$item/
/c:forEach
robert
-Original Message-
From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 8:02 AM
To: [EMAIL PROTECTED]
an XML safe character string title for the category. This is a little
like the problem I posted, except that the outer loop needs a
br/ delimiter and the inner loop needs the / delimiter. What
might that look like?
Robert Taylor wrote:
One solution would be the following:
c:forEach var
LOL !!!
-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Monday, May 03, 2004 3:14 PM
To: Struts Users Mailing List
Subject: Re: [OT] Page Cannot Be Displayed
Joshi, Naveen wrote:
All,
Just wondering if any of you get this Page Cannot Be Displayed
-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 3:54 PM
To: Struts Users Mailing List
Subject: RE: Advantages/Disadvantages of One Action for each Use Case
+1.
I've been down the option 2 road and things get messy fast.
I've since switched to the first
JSTL has fn:toLowerCase(), so I suppose you could do something like.
c:out value=${fn:toLowerCase(property)}/
robert
-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 5:38 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE:
David, I think the consensus is to utilize standards where possible;
next use common (open source/vendor); otherwise proprietary tags (role your own).
JSTL == Struts-EL tags == Struts tags == common/vendor library tags == role your
own tags
So your application may end up using a combination
+1.
I've been down the option 2 road and things get messy fast.
I've since switched to the first option and applications scale much
easier.
robert
-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper
Sent: Thursday, April 22, 2004 1:52 PM
To: [EMAIL
for XSLT:
http://fxsl.sourceforge.net/
Apache's Xalan:
http://xml.apache.org/xalan-j/index.html
robert
-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 10:05 AM
To: [EMAIL PROTECTED]
Subject: [OT] XSL equivalent to commons.lang.WordUtils.wrap
request.getSession().setAttribute(myObjectName, object);
hth,
robert
-Original Message-
From: Julia Weaver [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 9:18 AM
To: Struts Users Mailing List
Subject: Re: Row
Hi,
Could you please tell me how to put data in session?
Take at look at:
http://www.corej2eepatterns.com/Patterns2ndEd/PatternRelationships.htm
More specifically the Application Service pattern
http://www.corej2eepatterns.com/Patterns2ndEd/ApplicationService.htm
BTW, its a great book!
robert
-Original Message-
From: Paul Barry
You are probably forwarding to something2Action.
If you redirect to something2Action, then the query parameters
will have been removed from memory.
robert
-Original Message-
From: James MacKenzie [mailto:[EMAIL PROTECTED]
Sent: Monday, April 05, 2004 11:01 AM
To: [EMAIL PROTECTED]
employee. How shall I configure
the DynaValidatorForm in my strus_config to take a unknown number of
checkbox values?
form-property name=rrole
type=java.lang.String[] initial={}/
second question: how can I make the properties of a DynaVForm available
to a Action?
To: Struts Users Mailing List
Subject: Re: DynaValidatorFom with checkbox properties
Robert Taylor wrote:
employee. How shall I configure
the DynaValidatorForm in my strus_config to take a unknown number of
checkbox values?
form-property name=rrole
type
PROTECTED]
Sent: Friday, April 02, 2004 2:42 PM
To: Struts Users Mailing List
Subject: Re: DynaValidatorFom with checkbox properties
Robert Taylor wrote:
employee. How shall I configure
the DynaValidatorForm in my strus_config to take a unknown number of
checkbox values
Also, make sure that the action in which you attempt to get the rrole value
from is declared to use the correct form.
If you can, please post your action mapping as well.
robert
-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 3:18 PM
: Re: [OT] RE: best practice question for certain VO/DTO fields?
On Mon, Mar 29, 2004 at 01:18:12PM -0500, Robert Taylor wrote:
couldn't you use a lazy loading scheme such that the
Department reference in each Customer is not loaded until
accessed and even when the Department is loaded
101 - 185 of 185 matches
Mail list logo