I wonder if anyone can tell me if it is possible to use a LazyList in a
DynaActionForm as declared in struts-config.xml. I've used ArrayLists
and that seems to work fine. But a LazyList isn't actually it's own
class, and I don't see how to declare it in the config file.
Is this possible?
Will
( form.getSelectionCriteria() );
%
Markus Herrmann wrote:
On Wed, 09 Oct 2002, Will Jaynes wrote:
It seems to me that the problem is that you are trying to do everything
in the JSP without benefit of using an Action. The Action is where this
kind of processing should take place. (Some developers would push
:
Will Jaynes [EMAIL PROTECTED] wrote:
Well, if you insist :-) Remember that you can include Java in a JSP, so
after defining your form and the db bean you can write any Java that you
want.
jsp:useBean id=myForm type=myPackage.MyForm /
jsp:useBean id=dbBean type=myPackage.DbBean
It seems to me that the problem is that you are trying to do everything
in the JSP without benefit of using an Action. The Action is where this
kind of processing should take place. (Some developers would push it
further, into Business Objects, but they would still be called from the
Action.)
Wendy,
Your example with the scriptlet is just what you need to do. This is a
case where scriptlets are still necessary. JSTL will be the way to do it
in the future, but you don't need to move to them before you are ready.
And to use JSTL now in a struts tag like html:radio you would need to
I have tomcat and resin using the same webapps directory, and I can run
my apps using either container. There's no problem with sessions that I
experience.
[EMAIL PROTECTED] wrote:
We are using tomcat 4.04 and have tried 4.1.12 with out problems.
When I drop my working Struts app into Resin
There isn't a plugin for debuggin the JSP pages, at least not in Resin,
but I debug my code and the java generated classes by using the remote
debuggin. Here's the FAQ for this:
http://www.eclipse.org/eclipse/faq/eclipse-faq.html#users_18
Note: As a note in the FAQ mentions, be sure to use
FYI. The latest Resin 2.1.3 does not work with Struts. It has a bug that
prevents the ActionServlet from locating the web.xml and
struts-config.xml files. So don't bother to upgrade until 2.1.4 comes out.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
. I just don't get it. Given the same Eclipse version and
installation procedure as John, I still don't get the Struts to show in
my File-New-Other menu. Must be some glitch somewhere in my setup, but I
can't see what.
Will
Rajesh Kalluri wrote:
After you extract the plugin into plugins
I'm useing Eclipse build 20020521, but after the install and restart no
Jakarta Struts shows under the New menu. ???
emmanuel.boudrant wrote:
Hi,
All the Eclipse plugins are in the plugins directory so extract the archive in your
[eclipse]/plugins directory, the directory structure must be
You don't need your own describe method anymore. BeanUtils has added the
capability to register conversion methods, to go from String to any
arbitrary object. So for example, I have a MSCalendar object whose
toString puts out mm/dd/ format, and can take that same format in a
constructor.
I also do something similar. If a textbox changed I want to set a
related hidden field to true. I wrote a javascript function that simply
knows how my html field names are going to be structured. It then can
parse out the name in order to get the index.
JavaScript:
/* Take a field and the
I had to add the following to log4j.properties:
log4j.category.org.apache=ERROR
B.Adji Maharyatno wrote:
I put debug and detail to 0.
Cheers.
B. Adji Maharyatno
Singapore
-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002
This is off-topic, but here goes...
Does anyone have a working example of using Resin, JDNI, and Poolman to
setup a JDNI lookup for a poolman database pool. I've read the Resin
docs on setting up JDNI, and the poolman docs on using JDNI, but there's
still something missing in my
Seems like I should know this, but I don't.
I have an action that has no need of a form. How do I specify the action
tag in the struts-config.xml file. If I leave out the name attribute I
get errors.
Thanks, Will
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands,
Any servlet/jsp engine should be fine, although there can be problems if
the engine doesn't implement the spec properly. I use Resin and love it.
Others use Tomcat and love it. Those two work for sure. Many others do too.
Rubens Gama wrote:
what JSP Engine i must to use, Tomcat or Resin?
Comments interspersed below...
- Original Message -
From: Sandeep Takhar [EMAIL PROTECTED]
To: Struts Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 9:38 AM
Subject: Different web apps and struts
there was a recent question in this list that I am
trying to
No. Not true. By the servlet spec, webapps are completely separate. Sessions are
not shared.
- Original Message -
From: Dimitar Stavrakov [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 11:53 AM
Subject: RE: Similar Question as -
You're right. This would be one way to do it. The point is, to share session
between webapps you have to do it yourself.
- Original Message -
From: Sobkowski, Andrej [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 12:08 PM
Subject:
Or, don't do the automatic validation. Set validate='false' in the struts
config and then call the validate method explicitly from your action. If it
fails you still have the opportunity to fill the dropdown box and forward back
to the jsp.
Will
- Original Message -
From: Keith Bacon
The collection attribute requires that the collection exists in some scope. It
seems that there isn't a way to use a collection straight from the form bean.
So, if my collection is in the local form I define it in a bean:define tag.
Something like:
sbean:define id=numbers name=orderForm
a LabelValueBean. The only way
to specify the latter is with the collections attribute.
- Original Message -
From: Eric Rizzo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 18, 2001 10:10 AM
Subject: Re: Options tag
Will Jaynes wrote:
The collection attribute requires
I'm not sure I understand your recent email. But given your original example
(non working):
html:link
page=/ServiceReport.do?operation=deleteoperationActivityId=bean:getProperty
name=activity property=id//
You can do:
html:link page=/ServiceReport.do?operation=delete
I'm using the latest versions of struts and the commons jars from CVS. I've
been developing with Resin 2.x, but now I need to use an earlier version of
Resin, version 1.2.3. When I try to run my webapp on the earlier version I get
an exception when the ActionServlet runs it's init method. The
If you mean, can you wrap a long column into two or more columns, like a
newspaper article, then there is no html way to do this. You would need to do in
manually somehow.
Will
- Original Message -
From: Shea Kelly [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 23, 2001
This problem has to do with classloaders and relative positions of the poolman
and jdbc jar files. There are a lot of possible configurations. The simplest is:
poolman.jar in WEB-INF/lib
poolman.xml in WEB-INF/classes
jdbc jar in WEB-INF/lib or in %JAVA_HOME%/jre/lib/ext (where I like it)
).
Will Jaynes
wjaynes@mediTo: struts user
[EMAIL PROTECTED]
aone.netcc:
Subject: building struts
08/27/2001
08:55 AM
-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 2:26 PM
Subject: Re: building struts
Will,
If the [style] tag is still failing, you probably still need
jakarta-ant-1.3-optional.jar in the lib directory of ANT.
Brian
Will Jaynes
Thank you very much. Copying crimson.jar and xalan.jar (from the Sun JAXP 1.1
release) into ANT/lib (there is already a jaxp.jar there) did the trick.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 3:22 PM
Subject: Re: building struts
The options tag doesn't permit the use of a Hashmap. A Hashmap is not actually a
Collection, since it doesn't implement the Collection interface. Perhaps this
utility is a possible enhancement for the options tag.
- Original Message -
From: Ganendran Kumaraswamy [EMAIL PROTECTED]
To:
Many developers recommend that the ActionForm properties all be String, so that
validation can be done on just what the user typed, and so that any error
messages can display to the user exactly what s/he typed. Yes, the controller
can do conversions for you, but I never use that feature.
Will
Don't be too hard on yourself. I'm not sure how much of programming has ever
become second nature to me. No matter how experienced one gets, there's always
too much new stuff to learn.
There is no right answer. You have to work out what is best for yourself. Some
advocate an approach that starts
String loadButton = (String)request.getParameter(load);
String submitButton = (String)request.getParameter(submit);
- Original Message -
From: Bernhard J. Hirschmann [EMAIL PROTECTED]
To: Struts-User [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 6:26 AM
Subject: recognizing a button
I can't really understand what you are saying, but if you haven't yet worked
through the struts-example, I think you should do that.
Will
- Original Message -
From: kaka wika [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 6:36 AM
Subject: the complete picture
I believe this problem relates to some changes in tomcat4 and xml parsing.
Here's the relevant portion of the Release Notes:
--
Tomcat 4.0 and XML Parsers:
--
Previous versions of Tomcat 4.0 exposed the XML parser used by Jasper (the
JAXP/1.1
I believe this should be:
logic:iterate id=entry name=clientSingleForm
property=clientSingleQueryList
...
form:text name=entry property=clientLogin size=10 /
- Original Message -
From: Calvin Lau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 7:24 AM
Subject:
William,
thanks for your response. However, I don't see how XML can have an
impact in the context of this particalur problem. The resource file is
java.util.ResourceBundle-compliant, and it does not facilitate XML at
all. Do I miss something?
tom
William Jaynes wrote:
I believe this problem
As another data point, I use resin and tomcat3. I typically configure poolman
locally for each web app. That is, I put poolman.jar into each WEB-INF/lib
directory and an application specific poolman.xml into each WEB-INF/classes
directory. Things also work if I configure poolman globally by
Ted,
I just installed Tomcat4 and got poolman to work for me. As I said, my typical
setup is to have poolman.jar in each WEB-INF/lib and poolman.xml in each
WEB-INF/classes. After setting up tomcat4 for struts (copying jaxp.jar and
crimson.jar from /tomcat4/jasper to /tomcat4/lib) and for poolman
The easiest way is to let the log4j static initializer work for you. Place
log4j.jar in your WEB-INF/lib directory and your log4j.properties file in
WEB-INF/classes.
- Original Message -
From: DUPRAT Alexandre [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 5:03 AM
If your jsp has a submit tag like:
shtml:submit property=OK value=Press Here if OK/
then your Action would contain something like
String okButton = request.getParameter(OK);
if (null != okButton) { ...code... }
However, RESET and CANCEL are generally something different. A standard reset
David,
Barracuda does this nested Exception procedure (as I believe you
probably know already). I've been playing with their forms package a bit
in a Struts app of mine. I like the scheme, in general, but the problem
I have with their particular implementation is as follows... The
Validator
You can alway save objects to the session and application scopes. If the
forward is a redirect you'll have to do that. If it isn't a redirect (as
is usual) then the request still exists and is passed along. So the next
Action would still have access to it. I sometimes add an attribute to
the
assign the arraylist in the Action like:
request.setAttribute(myArrayListOfBeans, theList);
Then in the forwarded to jsp
slogic:iterate id=row name=myArrayListOfBeans
bean:write name=row property=firstProperty
bean.write name=row property=nextProperty
/slogic:iterate
- Original
Just a comment... Looks like your method of checking the RefreshOption
property will only work if the scope of the ActionForm is session.
That's ok if one doesn't mind the use of resources.
- Original Message -
From: Dudley Butt@i-Commerce [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Easiest thing is to have a propery in your ActionForm that tests whether
the combo box is empty or not. Then in your jsp you'll need to surround
the select/option tags with a logic tag of some kind, like
logic:equal name=form property=comboEmpty value=false
...
/logic:equal
- Original
I put my style sheets in a directory at the top level of my web
application. For example in /tomcat/webapps/myapp/css. Then in the jsp I
reference it simply as
link rel=stylesheet href=css/templates.css charset=ISO-8859-1
type=text/css
- Original Message -
From: kuma.cra [EMAIL
I, too, use Resin without problems. I have seen the repeating problem,
but only when mistakenly I bring up Resin on a port that is already
being used by some other server.
- Original Message -
From: Matthew Heaton (Software Engineer) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday,
I'm not exactly sure of your sequence of events, but keep in mind:
- If your form bean has a validate() method, then by default the
ActionServlet will call that validate method. If it returns any error
messages then the ActionServlet forwards to the specified input. This
all happens BEFORE the
I would do this on the server side by wrapping the text box in a logic
tag.
logic:present name=visibilityFlag
html:text ... \
/logic:present
But perhaps you have a requirement to do it on the client.
- Original Message -
From: Dinesh Chaturvedi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Use 'validate="false"' as an action attribute to
prevent a return to the input page after a failed validate. Struts will continue
on to the action, and you'll need to decide what to do there.
- Original Message -
From:
Jeff
Trent
To: [EMAIL PROTECTED]
Sent:
I usually need 'wrap=virtual' as an attribute for my textareas. It
isn't part of the HTML spec, but it's supported in both Netscape and IE,
and it's pretty useful. I wonder how people are dealing with the lack of
a wrap attribute in the struts textarea tag.
--
William Jaynes | University
I create many of my application scope lists in an
initialization servlet, analogous to the DatabaseServlet in the Struts example
app.
- Original Message -
From:
Jeff
Trent
To: [EMAIL PROTECTED]
Sent: Tuesday, May 08, 2001 10:51
AM
Subject: Application Scoped
I'll presume that you mean, (1) you check a checkbox, (2) hit submit (3)
page redisplays with checkbox checked (4) you uncheck it (5) hit submit
(6) page displays with checkbox still checked. The problem is that an
unchecked checkbox doesn't return any request parameter, so there's no
way for
I can appreciate your concern. And it's always good to emphasize
security concerns. But you are suggesting that I (or any developer)
would write some Action that would accept this UserForm, including the
sensitive admin flag, without checking as to whether the admin flag is
acceptable in the
This is definately not true. You need to make a distinction between web containers and
EJB containers, or to be more specific EJBs
themselves. There are some restrictions on EJBs with respect to threading. I'm not
sure what they are exactly. But creating your own
threads is perfectly fine in
I'll say. I spent quite a while trying to get the reloading to work in Tomcat4.
Everyone kept
insisting that it "just worked". I finally switched to Resin and am very happy because
it really
does "just work". Plus it detects almost any change, from it's own config file, to a
new war file,
to
Here are some utility methods I use for date validation and rendering to and from
strings. Nothing
fancy.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 29, 2001 2:53 PM
Subject: Validating dates
Does anyone have a code example for
I still am unable to get Tomcat4 to reload my app when a class changes. Can't figure
it out. Resin
does the reload with no problem, so it isn't some problem within my app. Guess I'll be
using Resin
for the time being.
- Original Message -
From: "William Jaynes" [EMAIL
and going back to the application, I get a servlet
exception
java.lang.ClassCastException: org.apache.struts.util.PropertyMessageResources
I am at a loss to understand why reloading works for everyone else and not for me.
I've tried to
follow all instructions. Any suggestions would be much appreciated.
Will Jaynes
tException:
org.apache.struts.util.PropertyMessageResources
Am I the only one having these problems?
Will Jaynes
- Original Message -
From: "Craig R. McClanahan" [EMAIL PROTECTED]
To: "struts user" [EMAIL PROTECTED]
Sent: Monday, March 26, 2001 12:16 PM
Subject: Re: tomcat 4 and reloading applic
We do this exact thing. In the Action that leads to the display of the jsp with the
multibox we use
the code below. Given an object (created from the database) that has an ArrayList of
the ids the
user previously selected:
ArrayList list = (ArrayList)obj.getCheckedIssueIDList();
At the risk of sounding flip, so repack them in the Action. Define an object that can
contain both
elements, and create an ArrayList of those objects, each object populated from the
corresponding
element from each of the two arrays. Then put that collection in the request or
session and use it
gave the error. I am not sure if that is possible.
- eric
- Original Message -
From: "William Jaynes" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 07, 2001 2:02 PM
Subject: Re: Anyway to onFocus without Javascript?
Sorry, Jessica,
There is no
I wonder if someone could give me an example of the multibox usage.
If I have something like this in my jsp:
logic:iterate ...
...
html:multibox property="checkbox" value="%=candidate.getCandidateId()%"/
...
/logic:iterate
What do I need in the ActionFormBean for this jsp with respect to the
..
/logic:iterate
Now your form needs to have
public String[] getCheckbox() {...}
public void setCheckbox(String []) {...}
R,
Nick
-----Original Message-
From: William Jaynes [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 11:56 AM
To: struts user
Subject: multi
I think the question was (and my question is), can the collection used for the
options tag be a property of some bean, like the form bean? Or does the
collection itself have to be in the request (or some other) context, as you've
shown below.
- Original Message -
From: Ted Husted
To:
I use a December Struts nightly build with Java 1.3 and Tomcat 3.2. No problems.
You can check the 1.0 release notes on the Struts site. Those include the major
changes. But there are so many changes I'll bet there isn't any complete list of
them, other than in the source code and the CVS logs.
68 matches
Mail list logo