Lachlan, I hope this helps - a bit long I know.
Below is what I have used. It shows multiple buttons
how to have data associated with the buttons. I hope
this can be understood! I've seen other similar
examples in archive butnot with the passing of data
with the button, th way i do
I agree with Ryan. An old rule from way back:-
Pass Keys Round Not Data
It's simpler to only keep keys across user
interactions (either stored on the form or in the
session). Otherwise you have 3 versions of data
1 - what's on the database.
2 - what you've saved in the session (or on the form)
I have a generic action class that I want to set up that when the class is
successful it send the user back to the page from which they came. How do I
get that information? And, how would I structure my class to allow it to
send the user back?
We have the same propblem in our Application,
Hi,
Try saving your resource file with Chinese text as GB2312 encoded text.
There is a tool in the $JAVA_HOME/bin dir called 'native2ascii'. Run this
against your file and you will have a pure ascii file with \u (X = hex
number) to represent the double byte chinese chars. in the javadoc it
But what if you're crossing request boundaries (i.e. user edits form,
presses edit, has to review her data, presses save)? You'll have to
keep the information in the session AFAICS.
Please correct me if I'm wrong. It would simplify my life a lot :)
tomK
-Original Message-
From: Keith
I've been developing my first real Struts application for last several
weeks and things have been going OK. But I reached a point (about Sunday)
where the web app now doesn't always work correctly, in that it give errors
like:
Error 500: No action instance for path /findEntity could be created
Yes I too have the same problem, Count me ...
Kicha
Rob Breeds wrote:
I've been developing my first real Struts application for last several
weeks and things have been going OK. But I reached a point (about Sunday)
where the web app now doesn't always work correctly, in that it give errors
Tom,
In that case as you are doing now is the best way.
Maybe store the key on the form so you can check the
key on the incoming form matches the key of the data
held in the session (to guard against bugs hacking).
Then (big pain) - before updating check the data on
the DB is the same as what
-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: donderdag 13 december 2001 12:03
To: Struts Users Mailing List
Subject: RE: How do you pass a data object for editing?
Tom,
In that case as you are doing now is the best way.
Maybe store the key on the form
I had to do the same thing. My bean model is Iterator. Everything WORKS.
Use nested iterate tags on the same name, BUT! you must call previous() in
nested iterate.
logic:iterate id=dummy name=groupModel
trjsp:setProperty name=groupModel property=back
http://jakarta.apache.org/struts/userGuide/kickstart.html#release
The best advice to make any strategic plans based on what is available
today, period, and treat any new release as a pleasant surprise. Even
our roughest estimates have proven to be wildly inaccurate, and so it
would be cruel for
I would be very interested in being considered for this role.
Working for the past year to write webAppWriter, a jsp/struts/expresso app that writes
jsp/struts/expresso apps, this is very familiar territory, and one that seems pretty
easy once it is repetitive.
Samples for your review (10
Hi,
I use Struts from the nighly build 04.11.2001.
My template looks like the following:
%@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld
Hi,
What is the parameter - field for in the ActionMapping class ?
I was thinking about storing some info there that I use to communicate
some things between my actions. Is it safe to just call
ActionMapping.setParameter and set its value or should it be put inside
a synchronized block ?
Hi Tuomo,
The mapping parameter is an arbitrary string associated with a mapping that
can be accessed via mapping.getParameter ().
Jon.
-Original Message-
From: Tuomo Syvänperä [mailto:[EMAIL PROTECTED]]
Sent: 13 December 2001 12:45
To: [EMAIL PROTECTED]
Subject: ActionMappings
Thx..
But is it safe to use setParameter in your own actions and if I do
should i enclose it in a synchronized block ?
/tuomo
Jon.Ridgway wrote:
Hi Tuomo,
The mapping parameter is an arbitrary string associated with a mapping that
can be accessed via mapping.getParameter ().
Jon.
You can try something like below where the local action mapping maps to an
action.
forward name=success path=/detailAcct/
//return to a chained action
//Note: if for some reason the success is changed from a mapped
//action to a jsp page expect some nasty errors here.
Hi!
I'm new to struts and need help to get the examples running.
I've downloaded and installed a fresh Tomcat 3.3.
Then I installed struts 1.0 by copying all struts-*.war in the
webapps-directory of tomcat.
After restarting tomcat, struts is almost working:
*
What' s the difference between a forward to jsp or to do ?
In case of forward to jsp just servlet compiled from the jsp file will
be called. Am I right ?
What will happen if I forward to *.do ?
regards,
Maris
global-forwards
forward name=logon path=/logon.jsp/
forward
The image submit from strutsx seems to work for a submit with an image.
However, I don't see a javascript property (onClick) so that a confirm
pop-up can be implemented.
thanks
-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001
Hi,
I have a form that looks very similar to the inbox in Yahoo or HotMail.
The number of checkbox is varying and so are their names. How to assign their values
to the Form Bean property?
Currently I've been using a normal input html form tag like follows.
input type=checkbox name=chk_%= I %
Hello,
This problem arise with some web container : they have some trouble to convert
a String to an Object ;-(.
In your case, this seems to happen in tags
tiles:put name='content' content='/show/articleList.do'/
Both methods setContent(String) and setContent(Object) exist, but
I suggest that you create a function Javascript called for the buttons,
inside of the function you records one hidde-field before calling submit
with a parameter passed for the function, for example, then you I can treat
several submits.
- Original Message -
From: Kiet Nguyen [EMAIL
There are a couple options I can think of:
1. use request.getHeader(Referer)
2. add a property to your generic class that holds the return link.
Then have the calling class set it.
3. you could use javascript to back up, but that is ugly...
HTH,
Pete
Hi,
I have a generic action class that
Correct, if you forward to a jsp, it will display the compile jsp
servlet. If you forward to a do, then it
will look for that action in your actions-config.xml and execute the
appropriate action class.
This allows you to chain actions together.
HTH,
Pete
What' s the difference between a
If I try my example with JBoss2.2.2Tomcat3.2.3 as standalone everyting
works fine but if I try it with my JBossTomcat integrated in Visual Age I
get that exception. The funny thing is that it has worked some days ago
before I tested it outside VA and editited the JSP and configs outside VA.
I'm trying to install and run Struts in IBM VisualAge 3.5 Patch 2 according
to the instructions
found in the paper from Kyle Brown (Apache Struts and VisualAge for Java,
Part2: Using
Struts in VAJ 3.5.2 and 3.5.3).
Before to install the EmployeelistForApache.zip contents I was able to start
the
Error 500: No action instance for path /findEntity could be created
...
I've gotten this type of thing when I'm changing any
of the action classes during development. I assume
struts might be doing its own class loading and I'm
pulling the old class out from under it. If you are
not
Hi Pete,
I am so glad you responded! If we could talk about this over the phone, it
would be a lot easier.
Is this OK with you? if it's not, then how do you want to handle this??
John McClain
7604 Muschetto Ct.
Citrus Heights, CA. 95621
[EMAIL PROTECTED]
(916)728-5223
- Original Message -
It makes sense to me and would like to know if there
is an answer as well.
This tackles one problem.
What about the return? You have to generate XML again
and than send it through the loop.
Sandeep
--- Dave Makower [EMAIL PROTECTED] wrote:
We are currently using XML with XSLT in JSPs, in the
I changed a forward from search.jsp to search.do. Then when I forward to
/search it throws
an exception. I tried to change some other forwards from jsp to do with
the same outcome.
Actually it goes in a loop printing the same stack trace again and
again.
I have do forward to logoff only. But
I just upgraded to Tomcat 4.01 and get the following exception:
javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.
java:871)
.
java.lang.NoSuchMethodError
at
There is a very easy solution for the 2 Databases Problem:
Oracle provides a .zip File instead a .jar file. Rename .zip to .jar and
everything works fine.
Struts cannot find the correct drivers, but the Error Messages are completely
nonsense (100m try-catch block?)
Things can be so
Hey all,
I have a client that is using Oracle 9ias. Currently
they are not wanting to move to OC4J (Orion).
Therefore, they are planning on using JServ as their
servlet container. I understand that JServ is servlet
2.0 compliant. I also understand that Struts requires
the container be 2.2
Has anyone ever generated a PDF file (via FOP) from an Action servlet? Any
implications in doing so via an Action servlet vs. a standard/plain servlet?
I've reviewed the servlet example from the FOP distro. and it seems as if as
long as I have access to the response object (which I do in the
While not politically correct I too use a CachedRowSet,
by setting a
property in my FromBean of rowset to accomplish this. For more see
http://developer.java.sun.com/developer/earlyAccess/crs
Vic
Note, however, that CachedRowSet is no commercially redistributable
(Stated on the
I think communication between actions can best be done via the request
object - it is reachable from everywhere, and you can be sure it doesn't
interfere with struts.
hth,
tomK
-Original Message-
From: Tuomo Syvänperä [mailto:[EMAIL PROTECTED]]
Sent: donderdag 13 december 2001 13:45
James,
I was reading through the archives when I came across the below post. If
one follow the design as you have shown below, dose the Delegate get stored
in the form? If it does then does one reference the DAO via the delegate
with a nested type syntax in the view/JSP?
So if I have a
What is your OS and environment?
I had similar error with SUSE Linux, Apache1.3.2 Java SDK 1.4 beta 3, and struts
1.0.
I changed to Java SDK 1.3 and used one of nightly builds. (all files in struts
binary distribuiton have ^M caracter - DOS files and that might be also the reason.
Thats my $0.02
As I remember it's impossible to forward a request under 2.0. Don't
think that struts will work.
But some colleagues said they had replaced servlet library of JServ with
newer ( I think 2.2 )
and it worked ! You can try it too.
pls, let me know if it works
Maris
-Original
it was because my action class forwarded to itself.
excuse me, pls
Maris
-Original Message-
From: Mâris Orbidâns
Sent: Thursday, December 13, 2001 6:00 PM
To: Struts Users Mailing List
Subject: RE: forward to jsp or to do ?
I changed a forward from search.jsp to
But my beans already contain the validation! Besides, performing the
validation in the ActionForm is effectively tying business logic (data
validation) to the web framework dontya think?
Well, I put data type and required field validation only in the bean.
Validation that is more advanced
Does anyone out there know of an opensource, java based file upload
facility or file manager app ???
You will have to check the licensing statements yourself
but two sources:
- the struts source download has an upload app
- the O'Reilly website has a very complete dicussion
and sample
Yes, a phone call would be great. I am in meetings for the rest of today, though,
and have an optional one for tonight. Would tomorrow work? My schedule is fairly
open then.
John McClain wrote:
Hi Pete,
I am so glad you responded! If we could talk about this over the phone, it
would be a lot
I'm interested in this as well. I just finished a project writing a XSL/FO
stylesheet to generate a report, and did the creation through command line via a junit
test suite.
If you get this figured out, let me know, I'd be happy to help publish a struts-fop
example!
Matt
John M. Corro
- Did you remove IBM's XML parser and install
the correct Xerces version?
- Did you add your application project to the
Class Path | Project Path of the TomcatRunner
class?
- Check to make sure you have
...\VisualAge for
Sorry for that last post, should have been off list but I wasn't paying
attention.
It will not happen again. Bad netiquette on my part.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
I would be interested in your approach. I used Cocoon to publish to a PDF
file. Anyone with integration issues between the two frameworks?
Thanks,
Safa.
I'm interested in this as well. I just finished a project writing a
XSL/FO stylesheet to generate a report, and did the creation
I had something like this the other night. I figured out that tomcat had
saved the servlet generated off of my JSP and was checking the
last-modified times between the servlet and the JSP file (like it
should). The problem was that I was doing tag development and thus had
to touch the JSP file
How can I determine ( in perform() method ) which was the
previous ActionClass that forwarded to current class ?
Maris
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Sorry - this is a bit of a long example. It's my
attempt to implement some chaining logic using a
generic chainToPage class.
Seems rather long winded to me - but it sure works
doesn't do anything sneaky involving struts.
In this example the linkList page forwards to
linkMaint tells linkMaint
I've been looking at the transformation solutions listed on Ted Husted's
page. Can anyone give me a quick rundown of the pros/cons of these two? Is
there an Official Struts direction on this issue?
The Struts Transformer by Ron Smith
http://www.rpsenterprises.com/struts/index.html
The Capco
This is how I did it, and it seems to work well:
In my form I have the following:
html:submit property=addAdd/html:submit
html:submit property=saveSave/html:submit
html:submit property=deleteDelete/html:submit
In my action, I check for the existance of one of these properties and act
Cocoon and Struts are different.
Since I wanted to avoid server side production load issues (of lots of
XSLT) I emit XML from JSP to browses.
And the browses then do the XSLT FOP-like for me. This way salability is
flat, as more users use it, each user uses its own XSLT on client side.
(For
You can reload the _mappings_ by doing
http://myserver:myport/myapp/admin/reload.do
You can ask your servlet container to grab new classes... exact method
depends on the container... I'm using Tomcat 4 and the steps were recently
posted by someone else... I'll go grab the relevant part of the
We should not do DB access in JSP (or anything much in JSP). Clear MVC
is more productive.
Vic
Shawn Bayern wrote:
Once again, I'm happy to announce a new Early Access release of the JSP
Standard Tag Library (JSTL).
Early Access Release 3 introduces tags for database access and
Hi,
Does anyone get the book: Struts Fast Track: J2EE / JSP Framework already? I
tried to order this book from AtlasBooks over the phone; however, they told
me this book is still printing and it will not be available until Jan. 4,
2001. Is it true?
Sophia
Cheng, Sophia wrote:
Hi,
Does anyone get the book: Struts Fast Track: J2EE / JSP Framework already? I
tried to order this book from AtlasBooks over the phone; however, they told
me this book is still printing and it will not be available until Jan. 4,
2001. Is it true?
Sophia
I got the same reply from Atlas.
-Original Message-
From: Cheng, Sophia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 10:43 AM
To: 'Struts Users Mailing List' (E-mail)
Subject: RE: Struts 1.1 book available for order
Hi,
Does anyone get the book: Struts Fast
This submits the form to one action class regardless of the action. I do
not want to check for what type of action. If you set the action before
submitting the form you can get the servlet to execute that action class.
I also want to use the image for the submit. The problem occurs under
Hi,
What's the *best* way in struts to access ActionForm instance (may be in
request or session scope) from a JSP script (note, not using struts tags,
e.g. for displaying a label that is using data from ActionFrom cache ) ?
Similarly what's the best way for a JSP page to access ActionMapping
Not sure if you managed to solve your problem but I was having a similar
problem getting struts to work on Websphere v3.5.4
I ended up doing the foloowing to get it to work:
in the .xml (struts_config and web) and .dtd files change the word
PUBLIC to SYSTEM
extract the .dtd files from
Hello,
I was trying to take Mr. Husted's subscription example
and create an array to hold multiple instances:
%
java.util.ArrayList list = new
java.util.ArrayList();
list.add(new
com.hfa.register.LabelValueBean(address,
address));
%
Might sound like a simple question, but how can i
output
f@#* ASP.NET!
Just say no!
Could'nt resist. THAnks:)
- Original Message -
From: Peter Bismuti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 14, 2001 4:26 AM
Subject: struts.net?
Has anyone ported or considered porting struts to asp.net? Before you
respond
This would be a complete waste of time. Any Struts port to .NET would be
used if and only if Microsoft added Struts application generation features
to its .NET development tools. This will not happen.
Even though Struts is open source, product management fundamentals are still
applicable.
Well said
My only contribution to the struts user group.
You have to have a sense of humor!
Oh boy! Did I just hear someone yell fire in a movie theater full of
firemen?!?
Hopefully, the majority of the firemen will remain calm and we won't see
Peter get crushed to death but firemen trying to (constructively or not)
help Peter see the light.
(Apache.org seems to me to be quite happy
Lol, I love .NET.
You really don't need Struts with ASP.NET, it already has the core
functionality that Struts aims to provide as part of its native
architecture. Obviously it's a different approach and people will argue ad
infinitum whether or not it's better or worse; or, if Java rules and
The doc for ActionError states:
An encapsulation of an individual error message returned by the validate()
method of an ActionForm, consisting of a message key (to be used to look up
message text in an appropriate message resources database) plus up to four
placeholder objects that can be used
I am doing something similar.
Our forms are 100% dynamic. The contents on them is not know in advance to
write all the setters and getters. The form is generated based on the user
and some database values.
I am using logic:iterate to create the forms. If you iterate on a Map you
can pass a
{#}
Where # is 1, 2, 3 or 4.
For example:
You encountered the {0} problem.
+= Jeff Knee
-Original Message-
From: SHURTLEFF,ROBERT (HP-FtCollins,ex1)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 5:14 PM
To: [EMAIL PROTECTED]
Subject: What is the placeholder
Here's a javascript function that will clear all the values in a form:
function clearForm(frmObj){
for(var i = 0; i frmObj.length; i++){
if(frmObj.elements[i].type.indexOf(text) == 0){
frmObj.elements[i].value=;
}
I have submitted a patch once for solving this, but it seems to not have
made it in CVS.
Here's the patch again (against current CVS)
hth,
tomK
-Original Message-
From: Uladzimir Kavalchuk [mailto:[EMAIL PROTECTED]]
Sent: donderdag 13 december 2001 12:44
To: 'Struts Users Mailing
I am trying to extract my ActionForm's .getApp() property into the
'value=' attribute.
html:select size=1 property=app value=bean:write
name=AttributesForm property=app/
html:options property=applications
labelProperty=applicationLabels /
/html:select
But I get the below error.
Can
Hi, all. I have several ActionForm that needs to access one Action
class. Is this possible?
thanks,
Cris
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Hi, all. I have several checkboxes in several JSP pages. In each page,
there are different sets of checkboxes that needs to be in checked
status during page loads.
The option I have in mind is to make a separate ActionForm and Action
class for each page but I thought that maintenance wise this
Hi all,
When I start WebLogic6.1, I get these errors below. How to fix it?
Please help me!!!
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'zip:D:/bea/w
lserver6/./config/mydomain/applications/DefaultWebApp/WEB-INF/_tmp_war_myserver_
Are you connected to the internet? Sometimes this will happen if you're not connected
to the internet.
I found the following answer in the archives:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10824.html
Hong Xing [EMAIL PROTECTED] wrote: Hi all,
When I start WebLogic6.1, I
What is the placeholder character that will get replaced in the error
message string?
The placeholder is {D}, where D is a digit between 1 and 5.
In other words, you might have something like this in your
ApplicationResources.properties:
error.basic=An error occured, here is some
Hi all,
I've been reading through a lot of the Struts info available on
the web in various places, and I have a question I'm hoping
one of you more experienced folks can answer. There is
something simple that I think I'm still not getting.
How, using the tag libraries of Struts, can I do the
I just changed my web.xml. Then it worked OK.
Old:
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
1.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
Changed:
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN
Hello Reid,
Your question is of many folds.
check for === for my sugestions below. Hope it helps you.
--Shashi.
- Original Message -
From: Reid Pinchback [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 14, 2001 9:12 AM
Subject: Newbie question about caching data for
You can have one FormBean having the scope set to session (in
struts-config.xml), used accross all the JSP pages. In the JSP pages use the
jsp:useBean tag to have the same FormBean in the session. In all the JSP
send the action to a single action class. To distinguish between different
pages in
Hello,
This is a plain JSP - HTML code:
--
%
for(i=0; iobjUsers.size(); i++){
tmpuser=objUsers.getUser(i);
%
trtd input type=checkbox name=user value=%= tmpuser.getUserId()%
%=tmpuser.getUserId()%td/tr
%
}
%
I am using commmand structure urls to hide my jsp views. I need to pass a
query string to an action from the view. How do I accomplish this? I have
tried http://www.mysite.com/do/next?page=2 but the url brings up an error. I
have read Ted Husted's catalog and am not sure I see or understand how
Once again, I'm happy to announce a new Early Access release of the JSP
Standard Tag Library (JSTL).
Early Access Release 3 introduces tags for database access and
incorporates some changes to the internationalization and XML-manipulation
libraries.
The reference implementation is available
On Thu, 13 Dec 2001, Paul DuBois wrote:
I haven't seen this in the docs that I've read so far. Is this:
- something I should just know
- an oversight in the docs or the distribution
- complete coincidence that installing js.jar fixed my pages :-)
It's definitely not the latter. :-) I've
87 matches
Mail list logo