All -
I'm proud (and worried about the support e-mails! :) to announce the
near-final release of a project demonstrating Ant, XDoclet, Struts,
JUnit, Cactus, and Lucene. Its called JavaDevWithAnt as it was written
for the book Steve and I co-authored and has been refined during
several
Could you please provide the code that is causing this problem along with
the ApplicationResources.properties file that contains the mappings?
Have you checked the Javadoc for LookupDispatchAction to ensure you've got
all the pieces configured properly?
Erik
- Original Message -
Michael
-Ursprüngliche Nachricht-
Von: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 09. Jänner 2002 13:40
An: Struts Users Mailing List
Betreff: Re: LookupDispatcherAction
Could you please provide the code that is causing this problem along
Do just what the message says... compile with deprecation warnings enabled.
If you are building with Ant (and who wouldn't?! :), then your javac task
should have deprecation=true.
Perhaps your build is using a property instead of true though
(deprecation=${build.deprecation}, perhaps), in which
Actually if you look at the end of struts-config.xml; that is where you'll
find it (from the example, at least).
The action is /admin/reload.do - and is a real time-saver!
Erik
- Original Message -
From: Chen, Fang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December
I have just tackled this very issue. I did try to make my solution
extremely generalized, but I haven't decided if/when it will be ready to
contribute back. But I will describe its architecture:
In our application we have many two-frame pages, top containing criteria,
bottom containing
Yes.
The nightly builds contain a patch I submitted, called LookupDispatchAction.
It keys off of the use of ApplicationResource messages for button labels and
allows reflection to call a different method for each button pressed. The
Javadocs explain it in great detail.
Even without that base
I believe Ted actually means 'reset()' instead of 'init()'.
- Original Message -
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, November 29, 2001 11:15 AM
Subject: Re: Hidden Field in a form. Do I use struts taglib or vanilla html?
Sessions and forwards have nothing to do with one another (unless of course
your in some kind of load balanced server farm and aren't using session
affinity or something like that).
In other words, sessions and forwards work fine together. Care to share the
error you're getting when using a
Won't hurt.
You'll just have to use request.getParameter(action) in your Action to get
it.
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 8:25 PM
Subject: Hidden Field in a form. Do I use struts taglib or
I'd recommend a custom tag for URL's that get pulled from the DB for a
couple of reasons - it probably won't be long before you'll want to offload
them from serving directly from the DB, so the URL could switch, scriptlets
are *bad* (in a Struts environment). You'll want to direct the URL to a
Careful with this you're tying your View with your Controller by way of
the button text. If your button text changes, so will your Action code. A
better solution in the case where the button name is the same for all
buttons is to use a solution I proposed on struts-dev recently:
By the end of the day I'll have a LookupDispatchAction. I started to call
it MultiButtonDispatchAction, but it really will be more generic such that
it will look up messages from ApplicationResources.properties and return
back the key so that the Action is not tightly coupled with the JSP page
Rob,
See my recent LookupDispatchAction posted. It currently does the key lookup
using the default locale, so I'm not sure it would cover your requirements -
but I don't think it would be hard to generalize it even more if the current
implementation won't work for you.
I'd be happy to try to
As promised earlier today, here is my contribution to the multiple
html:submit button saga (Ted, time to update your FAQ! :)
Here is a breakdown of how to use it:
struts-config.xml segment, note the parameter=action
action path=/test
type=edu.darden.TestAction
Are you running a Servlet 2.3 compliant app. server? If so, Filters are
what you are looking for. If not, you could add some scriptlet to the end
of each JSP (perhaps?) that could post-process the response before it is
finalized.
Erik
- Original Message -
From: Brandon Goodin
This was intended to work this way and, like you, did not see it as a
possibility in the documentation. Not satisfied with putting things into
separate files I searched the e-mail list for template:put and saw an
example someone had posted using it in-line and have used that method ever
since.
http://www.jguru.com/faq/Struts
- Original Message -
From: Mindaugas Idzelis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 25, 2001 5:32 PM
Subject: This list NEEDS a FAQ
Subscribers,
This list NEEDS a FAQ badly. There are many many many questions that are
asked
Also, the remote scripting API that I created has the capability of
short-circuiting responses in a similar manner. Its application-dependent
how that logic works, either by message ID or by a date stamp or other
mechanism, as its just another parameter being passed from the client to the
Sure... Remote Scripting.
Check out a few articles I've written about it (which includes a couple of
servlet base classes to kick start the process):
Remote Scripting Using a Servlet
http://www.ibm.com/developerworks/library/wa-resc/
Pushing Messages to a Browser Using Remote Scripting
. I assume this
is
because there is no mutliboxes being submitted to the server, therefore
the
setMethod is never getting called. Is that what you patch fixed, if so do
you know the status of that making it into a build?
Thanks
Jeff
-Original Message-
From: Erik Hatcher [mailto
method myself
setting it to null. Does anyone know of a better way to do this.
Thanks
Jeff
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 8:49 AM
To: [EMAIL PROTECTED]
Subject: Re: multibox and reset() ERIK
Jeff,
No, my patch did
the following?
bean:write name=product property=(productName)/
My understanding is that this would translate to
product.get(productName).
That would be fine for extracting data, which is the primary issue.
paul
Erik Hatcher wrote:
Check out BeanUtils:
http://cvs.apache.org/viewcvs/jakarta
It'd only be a few line custom Taglib to write a tag that does a HashMap key
lookup. It's not possible with bean:write in its current form, although
I believe the Commons BeanUtils code has recently been updated to include
this kind of lookup, but its not necessary in order to write a simple
Do you have a getCurrentSelection() method in your form bean?and are you
saving it with a setCurrentSelection?
Have your Action class grab the selection from the session and call
setCurrentSelection before returning from the perform method. That should
do the trick.
Erik
-
std tags that
expect
beans (e.g., html:options). Also, there are lots of tables loaded into
HashMaps
in these apps. So... I don't think custom taglibs would be a good fit.
paul
Erik Hatcher wrote:
It'd only be a few line custom Taglib to write a tag that does a HashMap
key
lookup. It's
input defines where control will return if validation errors are
generated.
For complete documentation on struts-config.xml, check out the comments in
the DTD.You can view it here:
http://cvs.apache.org/viewcvs/jakarta-struts/conf/share/struts-config_1_0.dt
d?annotate=1.5
- Original
What is your complete struts-config.xml? Also, what is the HTML hyperlink
to that action like?
If you've got the form-bean and action set up appropriately there is no
problem with making a hyperlink directly to an action without using a form.
Erik
- Original Message -
From:
bean:define will do this for you. Also, in the example you show below,
you could use the bean:write tag where you have %=email% anyway, so you
wouldn't need a scripting variable for your specific example.
Erik
- Original Message -
From: Voss, Greg [EMAIL PROTECTED]
To: [EMAIL
I've subclassed the ImgTag from Struts and created my own custom tag for
doing this kind of thing. I gave some code examples of it in a past
message to this list that you could find in the archives.
Erik
- Original Message -
From: Thierry Cools [EMAIL PROTECTED]
To: [EMAIL
I've subclassed the ImgTag from Struts and created my own custom tag for
doing this kind of thing. I gave some code examples of it in a past
message to this list that you could find in the archives.
Erik
- Original Message -
From: Thierry Cools [EMAIL PROTECTED]
To: [EMAIL
reset is currently not called if html:form creates the form bean, which
happens if you go to the JSP page directly without hitting ActionServlet
first.
I've submitted a patch to fix this, but it has not been committed yet.
Erik
- Original Message -
From: Renaud Waldura [EMAIL
Just out of curiosity, what is the purpose of serializing and encoding the
form bean?
- Original Message -
From: Renaud Waldura [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 14, 2001 2:28 PM
Subject: Re: Serializing form beans
Take that back. There's still an issue
template:put name=titlebean:message
key=main.title//template:put
- Original Message -
From: _ _ [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 13, 2001 6:40 PM
Subject: template, bean tag question
Hi everybody, I want to do something like this:
Just make a getter in your form bean that does that looks up 'status' in the
collection that your form bean is supplying to the html:options tag and
return the display value.
Then use bean:write to access that attribute of your form bean.
Erik
- Original Message -
From: Matt Raible
Yes, it is correct. Its irrelevant what the value of the MULTIPLE
attribute is, and its not well-formed XML to have an attribute without a
value. This is addressed in XHTML in Section 4.5 here:
http://www.w3.org/TR/xhtml1/#diffs
Erik
- Original Message -
From: Campesato, Oswald
Have a look at BeanUtils (from Jakarta Commons) and use the
BeanUtils.describe to get all the read capable properties. I'm assuming
that it would give you the read capable properties of any parent class of
that bean as well (although I don't know that for certain). Please correct
me if I've
I'm accomplishing this very thing using Resin's Servlet 2.3 Filter support.
The filter determines the user is not logged in, saves the requesting URI in
a session attribute, and forwards to the login page. The login action
checks for the existence of the session attribute with the saved URI and
Look at the generated HTML of logon.jsp you'll see that it submits to
logon.do. html:form looks up the action mapping to determine which form
bean to use and generates the form tag with the appropriate action .do
extension automatically.
Erik
- Original Message -
From: Jose
Raible [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 06, 2001 1:56 PM
Subject: Re: bean:define, bean:write
Would you mind sharing this?
--- Erik Hatcher [EMAIL PROTECTED] wrote:
My approach to externalizing image paths was to extend
org.apache.struts.taglib.html.ImgTag
If you are referring to form beans, they can only be in session or
request scope.
Erik
- Original Message -
From: Jonathan M Crater [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 05, 2001 4:24 AM
Subject: Re: what are different scope(s) available to define for a
Quoting from Geary's Advanced JavaServer Pages book, p. 14:
Because servlet containers can reuse tag handlers, you must be diligent
about implementing the release method and careful about instantiating
resources in doStartTag [rather in the tags constructor]
So the 'release' method is the key.
you probably need to say document.form[0].submit()
- Original Message -
From: Steven Leija [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 04, 2001 2:53 PM
Subject: onClick Link Submitting
I'm trying to submit a form through a hyperlink, can anyone see what my
You need to use the TEI (tag extra info) mechanism and in your TLD do like
bean:define does:
teiclassorg.apache.struts.taglib.bean.DefineTei/teiclass
And then look at the DefineTei class for more insight.
Geary's Advanced JavaServer Pages book has lots of great information with
http://www.jguru.com/faq/home.jsp?topic=Struts
- Original Message -
From: Gary Kephart [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 6:50 PM
Subject: FAQ?
I've just downloaded, installed and tried to run Struts this week. Of
course, as a newbie, I hit some
I hadn't gotten any response on struts-dev yet, so I thought I'd try
struts-user out after seeing a related message about URL rewriting..
I have a custom subclass of ImgTag that overrides the src() method to
provide a custom URL depending on some flags in our system (in order to
offload
- Original Message -
From: Marcelo Vanzin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 8:04 AM
Subject: Re: default action and templates
Erik Hatcher wrote:
Why not use the Action to populate request scoped variables that you
then
bean:write inside
Use a Filter part of Servlet 2.3. I assume you could map all requests
to a custom ActionServlet also, but ultimately a Filter is the way to go.
I'm using Resin 2.0 which supports Servlet 2.3 and filters are working
great.
Erik
- Original Message -
From: Calvin Lau [EMAIL
Why not use the Action to populate request scoped variables that you then
bean:write inside template:put tags?
Or have a look at the source code to the template:put tag and
reverse-engineer it! :)
Erik
- Original Message -
From: Marcelo Vanzin [EMAIL PROTECTED]
To: [EMAIL
Ted,
Your example says this:
To seed the textarea from the form bean, you could code something like:
textarea name=article rows=15 cols=60 wrap=soft/textarea
But there is something additional to set the initial value from the form
bean, correct?
textarea name=article rows=15 cols=60
Your default action could be implemented by either extending
ActionServlet, or using a Filter (part of Servlet 2.3, not Struts-related),
so Struts can handle your requirements nicely I suspect.
Erik
- Original Message -
From: Marcelo Vanzin [EMAIL PROTECTED]
To: Struts Users [EMAIL
Can you elaborate on does not work?
Do you have the taglib definition direction in both JSP's? Or just the
template one?
Erik
- Original Message -
From: Dave Van Even [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 15, 2001 7:49 PM
Subject: message problems in
I'm sure there is a way to get at the hashtable used by the templates though
and lookup the value. I'm not sure how this would work with an html:img
tag without using scriptlets, but you could at least get at them using
scriptlets as a first pass.
Check out the diagram at:
It does set a page scoped attribute (keyed by the form name from the
mapping) that contains the form object.
Erik
- Original Message -
From: Gregor Rayman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 9:50 AM
Subject: html:form scripting variable
Hi,
the variable like bean:define
does?
But one of the main purposes of Struts is to get away from using scriptlets.
- Original Message -
From: Erik Hatcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 7:25 PM
Subject: Re: html:form scripting variable
It does set a page
Look at the ActionForm's reset method. That gives you the request and is
called when its instantiated by the ActionServlet prior to population from
the request.
One note - reset is not currently called when instantiated from the
html:form tag unfortunately, but apparently this will be
In struts-config you can specify that validation won't occur on a per-action
basis like this:
action path=/someaction
type=com.whatever.SomeAction
scope=request
name=SomeForm
input=some.jsp
validate=false
forward name=receiptpath=another.jsp /
/action
Does that
57 matches
Mail list logo