OTT, as in amazing dull to code up yet another value object... I've got value
objects coming out of my ears :)
Jonathan
Message History
From: Adam Hardy [EMAIL PROTECTED] on 12/02/2002 09:49 PST
Please
Is there a good argument for using frames? It needs to be good, they obviously
are problematic to use.
Beware the page linked to below is dated Dec. 1996 - most of what's in it is
obsolete!
--- stf [EMAIL PROTECTED] wrote:
frames suck: I don't think it's a good idea to separate your page-flow
Hi Matt
I can only assume that the initial error (when you have no log4j.properties file) is
down to the extensions you are using being dependant on log4j - which means you need
the properties file so it knows what to do.
Using the Chiki log4j sorts this out - but there are a couple of
Sadly, the web tier has special requirements for value objects that most
(reasonable) value objects cannot meet.
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg19338.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08070.html
But ActionForms should not be
Hello,
I read (http://jakarta.apache.org/struts/struts-logic.html) there's the
notEmpty tag in the logic taglib.
But, when I look at the struts-logic.tld file, nothing like that appears.
What does it mean ?
Does it mean that the logic:notEmpty tag will be included in Struts 1.1 ?
For
Yes. The logic:notEmpty tag is in the Nightly Build.
The website is still confusing about which documents go with what. I've
a plan for fixing it, and just have to clear some time to implement it.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1
Samuel,
Which version of Struts are you using? As much as I know, the information on the
jakarta page reflect the nightly build, which could differ from your version.
Marcel
-Original Message-
From: Samuel Judith [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 12:10 PM
To:
ok, the link is rather old, and maybe also a bit dogmatic: But most of it
still holds true. Apart from the usability-hassles described in the link, in
my experience you can add a bunch of problems you get when you try to
generate your frames programmatically (the simplest one being the
You are being way too vague, Steve. Let's see the exact error msg, the
relevant JSP and form bean code (including your package statement) and the
action mapping in the struts config file.
Mark
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
-Original
Hi,
My company is evaluating whether or not to introduce Struts into our
application architecture as part of our next release, and I have a
relatively simple/stupid question about how best to build the set of
screens that we're using as part of our evaluation process.
In this example, I
EJBs have their uses and sometimes are required (JMS, for example).
Further, an EJB (especially a session bean) is no slower than any other Java
entity accessing a database (which has more to do with network latency, and
database performance than EJB technology) and provides great separation of
No. But you can read from the archives without being a member of the list.
Mark
-Original Message-
From: Michael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 10:09 PM
To: Struts Users Mailing List
Subject: RE: Traffic
is it possible to be a member of the list an NOT
I didn't see any code that suggested primitives were being passed.
Nevertheless, there's no question primitive arrays are faster than Vectors
(about 40 times faster!) and ArrayLists (about 4 times faster).
Cheers!
Mark
-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Hi there,
I have to write export files to an another server.The code I am using is
not seams to be working fine .Some times it rewrites on an existing file.I am giving
my code sample here
access = ACCESS_WRITE;
long time =
Thanks all. My code works now. But I have one more question:
when i use logic:empty or logic:notEmpty, I got error:
No such tag empty in the tag library imported with prefix logic
Could you tell me how to make it work?
A false parameter? :-)
Well, for starters, what are you passing into isTokenValid() and what is the
method testing for?
Cheers!
Mark
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
-Original Message-
From: Antony Stace [mailto:[EMAIL PROTECTED]]
Sent:
Hi All,
on setting up my new struts app, I found that ant isn't copying my
ApplicationResources.properties from my src directory into the build or the deploy
directories.
When I compiled struts from source, ant managed to sort the properties file out for
the example app, but I can't see
You need something like
!-- Copy associated resource files --
copy todir=${web.build}/WEB-INF/classes
fileset dir=${src.home} includes=**/*.properties/
/copy
This may be being done when you compile, but not otherwise, but without seeing the
build.xml
Thanks for the reply Mark.
Well...that piece of code was just a test snippet. I have a problem in an Action -
TestAction (with action = checkData),
in TestAction.perform() the code which handles action=checkData I have
if (action.equals("checkData"))
{
saveToken(request);
//populate
You may have to get the tag separately from the online library or the
nightly build.
Cheers!
Mark
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
-Original Message-
From: Henry Lu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:04 AM
What is the value of request at this point?
Cheers!
Mark
-Original Message-
From: Antony Stace [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:14 AM
if (action.equals("checkData"))
{
saveToken(request);
//populate beans...etc
}
Try before you cry:
I think you have the right idea with option 1.
There's lots of old posts about this fiddly subject - it may take a while to
dig for them. Try looking up workflow.
I posted some of my code a while ago - no-one else seemed to think too much of
it, but I still happily use it.
if you search the
1 possible cause is when the package statement or compile output dir. has been
changed:-
Check every dir. on your class path for Users.class delete them all before
compiling.
K.
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
--- Galbreath, Mark [EMAIL
I have not altered request at all at this point. It is how it is
when it is passed to the perform() method.
On Wed, 13 Feb 2002 08:29:42 -0500
"Galbreath, Mark" [EMAIL PROTECTED] wrote:
What is the value of request at this point?
Cheers!
Mark
-Original Message-
From: Antony
Hi,
I want to do the following:
I have a ShoppingCart.
The users clicks on order and the items from the ShoppingCart are moved to
my OrderBean. ShoppingCart and OrderBean are EJB's.
Now it comes to the problem. The order must be proccessed in background
cause it will have a long durration.
a message bean can be a good idea...
send an XML or text message to your message EJB,
which will process the request in it's own thread...
by the way, for long transactions, if you can avoid transactions
(by default they timeout in 30 seconds. you can change
that somewhere in the transaction
rage on! I want java to survive .net.
If people use too much technology or over eloborate designs, their systems get
expensive to write hard to maintain then it looks like java is not good.
When I see the posts by people using frames I am pleased I avoid them.
One of my aims is to write systems
I tried to run tile tutorial and got Cannot find
message resources error message.
I am running struts 20020110 nightly and tomcat4.0.2.
javax.servlet.jsp.JspException: Cannot find message
resources under key org.apache.struts.action.MESSAGE
at
1 - Make the order process quick - it should be. Then you avoid the problem.
Make user wait till it's done.
2 - Don't notify the user - let them do an enquiry to check if they want. If
your system is any 100% reliable audited they will rely on it won't even
want to be notified.
3 - Send the
I read the list this morning and read 20 messages about too much traffic
and then read 30+ messages that were either labelled OT (which I assume
stands for off-topic) and messages like this, which are interesting but
have absolutely nothing to do with Struts. This isn't a poolman,
expresso,
is your code in the right place? In the order you have it the token isn't in
the request.
at bottom of your page
saveToken(request);
// - I think this writes a hidden field in your jsp.
// which ends up in the request after form is submitted.
// send your page
at top of page
if (
It's not precisely a *background* thread, but you could use JMS. Post a
message to a JMS queue, an EJB handles it and posts success/failure into
another queue for you to read. This lets the app server handle the
threading...
Mark
-Original Message-
From: Dirk Storck [mailto:[EMAIL
Hi
I am using form bean for the first time in struts .
I wrote a simple form bean which sets and gets values.
Also, I override the validate method in form bean with my logic.
My action class does not do anything other than forwarding the control to
some xyz jsp on success.
So, now when I put in
Ah! I see. My build.xml had:
!-- Copy associated resource files --
copy todir=${web.build}/library/classes
fileset dir=${src.home} includes=**/*.properties/
/copy
! - for some bizarre reason the resource file was being copied into
build/library/classes
Thanks v. much.
There is two possibilities :
* You have specified a message resource file in web.xml, but this file doesn't
exist. (not the
case if you use Tiles tutorial 'as is').
* You use a recent Struts version which require a resource file even if you don't
specify it ;-(
I have
Hi.
I have a form that can be submitted by three different buttons, for example
the buttons read
(Button Labels)
Process
View by Org
View by Product
What I want to do is in the Action Class handling the submission, find out
which button was pressed, and act accordingly, whether it's an
The binary download of the last three nightly build seems to be currupted.
The file size seems to be too small.
Am I missing something?
Thanks in advance,
Emiliano.
--
Emiliano Albiani
Corso Garibaldi, 19
55100 Lucca
P.I. 01721430468
Tel. +393297028910
Just define a hidden field in your form. Then when you press a button define
an onclick event that sets the value of the hidden field.
For example:
struts-html:hidden property=action/
struts-html:submit property=Process
onclick=form.action.value='Process'
-Original Message-
From:
Hi,
I'm facing a lot of problems trying to maintain the
extra path info in the URL. Few of these problems I've
managed to work around by overriding methods in the
base classes, specially ActionServlet class. The
current problem that I have has to do with Form Tags.
Lemme tell you the scenario
It's a little difficult without seeing your implementation of validate(),
your MessageResources bundle, the input property for your ActionMapping, and
whatever custom taglib code you've implemented for handling the display in
xyz.jsp.
And while you're at it,
You would do it the way you'd do it an any web application.
Here's how I do it: All my button field names start with btn. I would
name these buttons btnProcess, btnViewByOrg and btnViewByProcess (or
something similar).
In my perform method, I'd put code like this:
String button_pressed
Name the buttons and give them a value; the name and value associated with
the submit will be passed as a request parameter:
private doSomething( request.getParameter( buttonName));
Cheers!
Mark
--
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
Yeah, Ted! What he said! :-)
-Original Message-
From: cool dude [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 10:20 AM
I think struts does a major amount of goof-up
when it comes to extra path info it really amazes me
to see how the designers of struts could have
H, we're developing with the space-is-cheap and
they'll-always-want-something-different mentality.
As such, we have very few application-level strings
and keep most at a page-scope.
This way, when marketing wants one word changed it's
a very small change to the resource bundle rather
than
Check out http://jakarta.apache.org/struts/userGuide/building_view.html,
section 3.2.
Cheers!
Mark
--
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002
thanks for answers
I ran the Struts 1.0.1 version with Tomcat3.2.1
I've download a nighly build version...
I replaced all tld files in the web-inf directory by those of the nighly
build version.
I replaced too my struts.jar.
I run my application and I obtain this message:
Could someone kindly provide an explanation on how to leverage the struts approach
within an EJB environment?
we have the component diagram showing the main struts components
relative to the MVC pattern. Where do EJBs fit in?
ActionServlet -instantiate--ActionForm
|
Hey
I was thinking about that (I actually have a hidden field already called
toDo (still working on that name)) but the problem is that it has to
change based on which button is pressed.
I could use JavaScript to set the hidden field dynamically (I don't know if
this will work with struts, but
if you want to user javascript do it like this,
import your buttons as image and use it as a hyperlink
a href=javascript:{document.forms[0].action='%=
request.getContextPath()%/do/admin/retrieveUser?username=%=
company.getUserForm(i).getUsername()
you can set the property on the submit button and then use request.getParameter
to get the value of the propery in your action.
example :
html:form action=someAction.do
html:submit value=process property=toDo /
html:submit value=view by org property=toDo /
html:submit value=view
I'm using the Nightly Build.
ActionServlet.getResources() is deprecated:
Actions should call Action.getResources(HttpServletRequest)
instead of this method, in order to retrieve the resources for
the current sub-application.
I am trying to use the MessageResources object to add an
error in an
How can I configure Struts to present a beautiful error page (without
the stacktrace),
if I receive a Servlet Exception or JSP Exception?
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
I'm using the Nightly Build.
ActionServlet.getResources() is deprecated:
Actions should call Action.getResources(HttpServletRequest)
instead of this method, in order to retrieve the resources for
the current sub-application.
I am trying to use the MessageResources object to add an
error in an
Hi,
Am Mittwoch, 13. Februar 2002 14:16 schrieb Dirk Storck:
Hi,
I want to do the following:
I have a ShoppingCart.
The users clicks on order and the items from the ShoppingCart are moved to
my OrderBean. ShoppingCart and OrderBean are EJB's.
It's funny to see how everyone is working on
This works, but then your users MUST have JavaScript enabled or your
application will not work.
We try to build applications that work if users have JavaScript or don't
have JavaScript.
It's just as easy to check this stuff on the server. In your application,
maybe you have full control
Hi John
You can use the html:image tag and set the property to a value.
Then in the action, you are able to find out, which button was presed like this :
// find out if the create button was clicked
Enumeration enum = request.getParameterNames();
int clickedButton = 0;
for(int idx = 0;
Jay
Thanks a lot. To summarize, here is my HTML
!-- HTML Snippet--
html:submit property=btnProcess
bean:message key=button.processSuspends /
/html:submit
html:submit property=btnViewOrg
bean:message key=button.viewOrg /
/html:submit
html:submit property=btnViewProd
I think the design of struts is that you should have get/setters in your form
beans for the button parameters rather than look at the request parms directly.
in form bean
boolean createButton;
public void setCreateButton(String createButtonParm) {
John wrote:
I have a form that can be submitted by three different buttons, for example
the buttons read
(Button Labels)
Process
View by Org
View by Product
So, how can I figure out what button was pressed in that Action class? Is
there a way to do that?
I'm not sure if this is
Hi
I have to developed a Page in which user enters the Zip Code and fields like
City Name, State Name have to be populated without refreshing the page. I
have found one solution Called 'Remote Scripting'. But that does not seem to
work. Can any one have any experience with Remote Scripting.
I like that solution.
I Think I'll alter my solution so that I'm doing it this way. Originally, I
was concerned about getting back Process Suspends or some other strange
string from
String getBtnProcess() ( a method on the ActionForm class) within the
Action.perform() method, but then I
I did remote scripting in the ASP world. I haven't heard of it being used in
the JSP world, but I haven't been around that long.
Anyway, one time remote scipting is used is for dependent list boxes. For
example after the user selects a country from one drop down list, the
state/prov dropdown
On Wed, 13 February 2002, Galbreath, Mark wrote:
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
I like your tagline. I guess before too long after talking to me you'll have to
increase it to include a URL to RTFM
Find the best deals on the web at
I've got a checkbox on a page. It's initial state needs to be checked. In
my form I have a boolean value for the check box.
It fails to detect correctly if the check box is set. In my reset method I
set the check box to true (as this is the initial state), but the help says
WARNING: In order
Hi,
I have problem with Form tag lib where as soon as I try to import it I will
get the following Error-Msg:
[[[ Error parsing TLD '/WEB-INF/struts-form.tld': The tag handler
'org.apache.struts.taglib.html.ImageTag' does not have a setter for the attribute
'path'
Hi all,
I have 2 forms, form 1 is search, form 2 is order.
Search has a searchAction. In this action the searh will be performed, and
the order bean will be populated and added to the order. The order page has
a logic:iterate tag which will loop over the list with results found, and
some input
I know this is only slightly related to this maillist butthis seems to
be a very active and savvy group.
I am running Forte v3 with Tomcat 3.2. When I try to find an environment
variable using a JNDI lookup:
projectFile = (String)
ic.lookup(java:comp/env/ProjectData);
I have used iText successfully in my previous assignment. It works extremely
well. If one wants 2 go bleeding edge, they can have a look at FOP from
apache or WH2FO by Fabio Gianetti (works for simple word -- pdf conversion.
If your word doc has tables inside of tables, this tool blows up.)
FOP
Tomcat 3.2 doesn't support this (there is an article about it on the tomcat mailing
list archives).
Tomcat 4 does support it, hence the reason it works.
Ghoot
PS If you have no luck tracking down the article, I'll try and find reference to it
again.
-Original Message-
From: Bob
I am running the app as as is.
I used the trick you suggested and it solved the
resource problem.
Another problem occured when accessing
examples/rssChannels.jsp
here is the exception,
javax.servlet.jsp.JspException: Error - Tag Insert :
Can't get definition 'examples.rssChannels.page'.
Check
On Wed, 13 February 2002, Andrew B Forman wrote:
As such, we have very few application-level strings
and keep most at a page-scope.
This way, when marketing wants one word changed it's
a very small change to the resource bundle rather
than having to go through the pages and change
Hello Antony,
I extend the ActionServlet and Write some code to test if the
user is logged and if He has permission to acess a page.
It's very flexibile because is not only a test of login or not
login. I can test, for example, if user XYZ has permission to acess some
URL after
Question about that solution:
isnt it so that the user will be checked ONLY when you try to submit a page?
Or does ActionServlet get activated as well when you request a jsp? I didnt
think this would happen, so the user credentials will only be checked if you
go to *.do.
Gr
Ronald
Regis,
Would you please give some code example on how you extended the
ActionServlet on how you did it? Thanks,
Thinh
-Original Message-
From: Régis Melo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:22 AM
To: 'Struts Users Mailing List'
Subject: RES: Want to check
This uses a constant to determine if you wanted login checking to be on or
off. Sometimes during development you might not want that requirement.
Jeff Krueger
public class TradeController extends PersistentSessionController
{
public void init() throws ServletException
{
Hi,
I am seeing an unexpected result while using Struts 1.01/1.02 (upgraded
and tested before I wrote this message.)
My application uses two beans to populate some struts HTML tags (text,
checkbox and select). The process flow is to call an action to create
the beans and add them the session.
Hi all.
I'm trying to do the following.
In an Action.perform() method, I'm adding an ActionErrors object to the
request as follows
// Snippet from an Action.perform() method
ActionErrors errors = new ActionErrors ();
errors.add(Processed, new ActionError(Processing Done));
saveErrors(request,
I am trying to do something similar, except with an HTML link.
I have a hidden form field:
html:hidden property=testHidden value=blah/
and then I try to set its value with an onclick function in my link:
html:link forward=testAction
Hello everyone
I am going through the Struts example v 1.0.1, and I ran into a problem that
I am sure some of you have ran into or know the answer.
In the above mentioned app, there is a SaveRegistrationAction action class
with the following code I am interested in:
if (isCancelled(request)) {
I seem to have got it working, except that the error message reads...
VALIDATION ERROR
you must check the following.
I see that it's getting it from errors.footer and errors.header in the
resource file. I'd like to override that behavior temporarily, and just
display the message
Is there
Did you try using
Document.forms[0].testHidden.value instead? If that doesn't work, maybe you
could do it in a JavaScript function and then submit the form manually using
document.forms[0].submit (you'd have to make the submit button a regular
button that calls the method in the onclick)
You
Just a simple design question. Having read through several posts and reading
the Struts documentation. I was wondering what is the best design pattern
regarding SQL placement. My thoughts were that I need to keep SQL out of the
action class and pass all resultset data into Collections of beans.
You are on the right track. Keep the sql with the model. The only thing is
don't let your collection of databeans make it to the jsp. That would
then tie your presentation to the model. Very bad. There should be another
set of beans that represents more of what the view is like. Often times
A quick hypothetical scenario:
I have an action class that needs to pass a list of addresses to the view
for display.
I have a logic bean that contains a sql call to a database and retrieves
address info.
The resulset returns the following fields in each record: NAME, ADDRESS,
CITY, STATE, ZIP
I
Hello all,
I have looked at the struts docs and all over the net and I have posted to
forums at java.sun.com.
I want to show a user a page that says I am working on your problem and then
when the processing is done I will send to them/display for them the output
of the long running database
Hello Vic,
I use the HierMenu javascript menu builder, it works well in Struts, see
link below
http://www.webreference.com/dhtml/hiermenus/
if anyone knows of a better Horizonal menuing approach I would like to
see/try it.
regards,
Daaryl
-Original Message-
From: Struts Newsgroup
You are crossing the boundary in your action class when you put the result
sets arraylist in the session. In the action class you should transfer that
information into a different array list of view classes and put that in the
session. I know it sounds like a lot of work and overhead to
Hello all,
I am using the MonkeyStruts Nested Extension and need help creating a
Radiobutton group from data retreived out of a Relational Table. Does anyone
have a code example of this or something similar using the nested extension?
Within my parent ActionForm (SalesOrderForm) I have a
I am totally stumped. I cannot figure out the error that is occurring
below:
root cause
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773)
at
Make sure you have the input parameter set in the appropriate action tag
of the struts-config.xml. The parameter should be set to the page you
posted from.
bsr
-Original Message-
From: Dua, Amit [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 9:35 AM
To: 'Struts Users
Please ignore this, it turned out to be a coding problem.
Sid Stuart wrote:
Hi,
I am seeing an unexpected result while using Struts 1.01/1.02 (upgraded
and tested before I wrote this message.)
My application uses two beans to populate some struts HTML tags (text,
checkbox and select).
How does one incorporate onchange JavaScript Handler on a html:text tag?
I want onchange=update(1,3,4) on a html:text tag.
3,4 is a string that comes from the form
This is failing :-
logic:iterate id=actHour name=currentForm type=fal.ActivityHour
property=actHourArray
html:text size=6
Hello All
I have added the following to JSP files
META http-equiv=Content-Type content=text/html, charset=UTF-8
%@ page contentType=text/html; charset=UTF-8 %
html:html locale=true
Change the locale in an Action to iw_IL
And get:
Constant strings inserted in JSP in Hebrew are OK.
Just the
Just an FYI..
The 2/11, 2/12 and 2/13 nightly builds of struts 1.1 have been
producing 163 BYTE packages.
http://jakarta.apache.org/builds/jakarta-struts/nightly/
-tak
__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
I want to have multiple workflows, with users mapped to a particular
workflow based on their role. I know that Struts doesn't support this now.
Is there an intent to support this in the future?
In the meantime, I'm interested in suggestions on the best way to implement
this.
Right now, I've
I just had one ActionServlet, and for each action
defined in it's struts-config.xml, there is a separate
forward defined per role (prefixed by role name).
role1_success
role2_success etc.
All forward name strings (e.g. success) get intercepted essentially by a
super
class Action and then the
your properties file have to be written in Unicode encoding, not the native
encoding, or else java will screw your characters up, since java can only deal
with unicode
Hertzel Karbasi - OPTinity eBusiness Solutions wrote:
Hello All
I have added the following to JSP files
META
or you can covert your properties file strings from native to unicode using this
method
return new String(oldString.getBytes(), encoding);
where encoding is the native encoding u used in your properties file
more 'bout charset encoding/decoding on this page :
I found the problem was with the data source portion of the
struts-config.xml file
- Original Message -
From: Steven Dahlin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 12:37 PM
Subject: cannot find actionmappings or
saveToken() is in the action.equals("checkData") section of code, isTokenValid() is in
the
action.equals("saveInDatabase") section of code. The first time the user accesses
this action they hit the checkData section, which has the saveToken, they do not go
into the saveInDatabase section. The
1 - 100 of 125 matches
Mail list logo