i do not know if the following problem is due to Struts.
I do not think so but i try to post the message again to see if someone could help me.
I'm a little bit puzzled
i'm deploying my application on SunOS 5.8 and Weblogic 5.1sp9.
I followed all the steps described by jakarta for deplying
In a case like this I get lazy display the field in debug messages in every
relevant place.
- in the form Bean getter setter in reset if it changes the field.
- display the field in the JSP (bean write) (as well as the hidden version).
- at top of perform method before you send the form.
What's the best way to handle data that is displayed on the page but not
updateable on a form?
In my Action I put it in the request for the JSP to pick up.
I used to put it in the formBean but didn't like the clutter it caused there.
--- Ted Husted [EMAIL PROTECTED] wrote:
The form shouldn't
logic:equal
html:form
/html:form
/logic:equal
is valid xml should work (never done it myself).
logic:equal
html:form
/logic:equal
/html:form
isnt valid xml.
But this means you'll have a large piece of duplicated jsp code.
In my limited experience when I hit this
A quick reply probably crazy. But struts would try to call
formBean.getCreateButton().setX();
(It would I assume not try to call formBean.getCreatebutton().getX()).
it might be worth trying in your form bean:-
public class formBean extends ActionForm {
CreateButton createButton = new
see here :
http://www.theserverside.com/events/videos/CraigMcClanahan/dsl/interview.html
-
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
Could anyone provide a transscript for those not
being able to view videos over the web?
Thanx,
Hans-Joachim Matheus
-Ursprüngliche Nachricht-
Von: emmanuel.boudrant [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 15. Februar 2002 11:06
An: [EMAIL PROTECTED]
Betreff:
I don't have proof but it seems to me most validation
errors are not simple numeric/date format problems. So attempting
to catch such errors early on saves very little.
I validate for correct type in my business logic along with the other
validation don't bother anywhere else. My validation
On Fri, 2002-02-15 at 02:19, Ted Husted wrote:
I have a question along these lines:
Quite often I have thing like an acknowledge page, very much
like an Ok Dialog: The password has been changed successfully.
html:submitOK/html:submit. I'm toying with the idea of generalize
this by having an
HI
I have had a look Jan Sorenson's Dynamic Properties contribution
http://husted.com/struts/resources/DynamicProperties.htm
How useful is this code for reading from and writing to arbitary database
tables. It sounds like I can map any database column name to
an action form property.
For
Hi David, thanks for replying... I had a look at your example and in
particular the form beans. I notice your forms extend ValidatorForm, which
in turn extends ActionForm, but in the nightly builds of Validator there is
no class for ValidatorForm! I notice several other changes since earlier
For more details some code search the archive at
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
for:-
chainToPage - something I wrote mean to refine one day. No tags - controlled
from inside the action class. It works fine for me. It's designed for swapping
between lists of data
maybe heading off topic - forgive me - but I want struts systems to be well
designed!
The web is so darn slow - for repetitive use system confirmation/dialogs are a
real pain. I'm not a designer but I feel it's best to take the user to a useful
page put your message at the top of it.
eg. in
Hi Antony,
I guess you are not allowed to enclose a tag start within a logic tag
whithout enclosing the tag end as well.
This leads to :
logic:equal name="testPageBean" property="typeOfProcess" value="add"
html:form action="/addUser" focus="username"
...
/html:form
/logic:equal
Of course if the
Exists tags defined in struts.tld that seems like tags defined in the
struts-html.tld
For example:
struts:button ...
struts-html:button ...
or
struts:base...
struts-html:base...
or
.
What's the diference between them ?
thanks in advice
--
To unsubscribe, e-mail: mailto:[EMAIL
can't help you mate - but full sympathies.
I reckon the laws of cause effect got a bit fuzzy on the server side.
This multiple class loaders thing is a real pain in java. I reckon it's a
problem in the design of the language. It creates a mighty trap that catches
people again again. We are in
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=struts-html %
It's the prefix specified in the taglib definition. I guess people who use lots
of tags prefix the struts tags with struts-. People who only use struts leave
it off.
Not sure but I
OK, it's truth.
Look:
In struts.tld exists tags defined like this:
tag
namebutton/name
tagclassorg.apache.struts.taglib.ButtonTag/tagclass
attribute
nameaccessKey/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
I don't think 'struts.tld' exists anymore.
-Original Message-
From: Rubens Gama [mailto:[EMAIL PROTECTED]]
Sent: 15 February 2002 12:23
To: Struts Users Mailing List
Subject: RES: Taglib 'struts'
OK, it's truth.
Look:
In struts.tld exists tags defined like this:
tag
namebutton/name
That's what I do to.
Putting initialisation logic (like setting defaults) in the
form makes it a
very strange object. Partly a Utility for passing data
between Forms Action
classes partly a controller fetching data from the model to make it
accessible to the JSP. The second part there
You might want to start with an ActionForm bean that represents the OK
dialog page.
This should include properties for a base forward and for a paramId and
param (like the html:link tag).
The Action for the OK button would then look for the given forward,
ActionForward baseForward =
Thanks for the help. Keith yes it is a right royal pain in the Java.
I have fired up Tomcat and it works with Tomcat (still wont work with Resin
however), so I am continuing development on Tomcat, knowing full well that
it is to be deployed with Resin as the web server.
As Dr Smith would say,
The advice in the User Guide may be obsolete now that we support the
dotted syntax :o(
You may need to define a ImageButtonBean on the ActionForm with x and y
properties. The getCreateButton method could then call the getX() (or
getY()) method on that bean to determine whether it was pushed.
I don't use validate(). The only validation I have is in the business logic.
The business class that does validation accepts returns a string version of
the data (as well as the proper data type).
validate() introduces a new element of execution flow into the design
(validation occurs in 2 diff.
How to specify src path in the frame tag under struts?
I did the following and it didn't work
src=/WEB-INF/jsp/login/blank.jsp
neither
src=/do/someting
neither
src=/jsp/login/blank.jsp
Could you show me an example?
---
Sounds like you got the struts.jar virus from the rogue jakarta site; it
randomly reconfigures your server's classpath.
Mark
-Original Message-
From: Joe Latty [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 12:02 AM
This is driving me insane, first up I had the classic
Hi All,
I want to populate a table with data from a database, so presumably I create a bean on
a jsp which calls the database, and converts it and hands it to an iterator.
First, how do I make the data thread-safe? Is it thread-safe because it is in a jsp
which is therefore compiled into a
What exactly does this do? What is logic:equal comparing?
Mark
-Original Message-
From: Keith [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 4:43 AM
logic:equal
html:form
/html:form
/logic:equal
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For
If validation fails, the controller forwards to the input property,
which can be an action that populates any static properties on the
action form bean.
Ronald Haring wrote:
That's what I do to.
Putting initialisation logic (like setting defaults) in the
form makes it a
very strange
The domain-type validations, like whether it is a date, can be handled
in the ActionForm validate, if that's helpful. The Struts Validator is
very good for this, and keeps everything out in an XML file where it can
be easier reviewed. Range checks that depend on the model state would
still have
Is it possible to make struts reloadable so that classes are dynamically
added without restarting tomcat. For other jsp's , we set in the context
part in server.xml as reloadable=true and it works. Why not for struts?
_
Chat
how about
src=something.do
- Original Message -
From: Henry Lu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 15, 2002 1:34 PM
Subject: frame page src=?
How to specify src path in the frame tag under struts?
I did the following and it didn't work
On Fri, 2002-02-15 at 12:45, Keith wrote:
maybe heading off topic - forgive me - but I want struts systems to be well
designed!
The web is so darn slow - for repetitive use system confirmation/dialogs are a
real pain. I'm not a designer but I feel it's best to take the user to a useful
Sometimes it is preferrable to have a 'generic dialog' page, rather than messages at
the top of the screen. This isn't an either or situation, in our apps, both styles are
often required and used.
We implemented a solution that basically implements a 'navigation stack', as the needs
of our
No it doesn't work either. Could you show me a working examples?
---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center fax: (734) 763-4372
On
Hi Cedric,
I downloaded the latest struts build(20020215) and ran
it as it; and still got the same error, Can't get
definition 'examples.rssChannels.page' when accessing
Rss Channels hyperlink. This link can be reached by
clicking 'Live Examples (new)' in the default page and
then clicking
cripes - no wonder it doesn't work - some-one nicked the end off my lines.
looking at it closely someones nicked all me form fields as well. better
install CVS.
Mark's getting stroppy on Friday again. Most welcome.
--- Galbreath, Mark [EMAIL PROTECTED] wrote:
What exactly does this do? What is
In Struts, can we setup an action without form in the struts-config.xml
file? is the following legal?
action
pathe=/something
type=so.so.somthing
scope=request
...
/action
There is no name specified in this action.
I found 48 references in the archive for reloadable, many directly bearing
on your question.
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
Cheers!
Mark
-Original Message-
From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 9:00 AM
To: [EMAIL
;-) Had a pint of Bass at a local pub - want to get out of here!
-Original Message-
From: Keith [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 9:43 AM
Mark's getting stroppy on Friday again. Most welcome.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional
Being a bit slow off the mark with this iterator tag. I've found all sorts of examples
and some stuff in the archives here but it's confused me more than helped me.
If I want a list displayed, no form, just data, the best place to get it is in a page
context bean, right?
Second, how do I
What kind of errors do you receive?. Can you call something.do from the
url bar? are you using extension mapping or path mapping?
We use extension mapping (xxx.do). We call the url for the action in the
frame src= in the same way you would call an image or something i.e.
/home.do or something
Thanks for your suggestion. For something.do, it works now. But how bout a
jsp page. How do we specify a jsp page like:
src=/so/so/somejsp.jsp
It seems to me that the above setting doesn't work. Any working code for
jsp page specification?
In the action that will be forwarded to your jsp you put a list(e.g. an
ArrayList) on the request. This list contains bean of some kind.
Then in your jsp you can write :
logic:iterate id=item name=NameOfMyListOnTheRequest scope=request
bean:write name=item
yes
Henry Lu wrote:
In Struts, can we setup an action without form in the struts-config.xml
file? is the following legal?
action
pathe=/something
type=so.so.somthing
scope=request
...
/action
There is no name specified in this action.
Yowsa! Someone is listening. I've just got a bit of pressure on, which doesn't make it
easier. I did actually get that far in the thought process, but several Actions can
forward to this page, so can't I just do the stuff in a bean a tag?
How about ditching the seperate bean subclassing the
I know that a few other people have been confused by this bug, so I hope this clears
things up. The bug is just a small quirk in the Option Tag code. It seems that
StringBuffer works differently on the different JDKs. Here is an example:
StringBuffer sb = new StringBuffer();
String x = null;
You probably could do that but I'm pretty sure it will not be fast developping.
Also I think it is not the right way to do struts.
Just do what you have to do in a simple java action and throw your stuff on the
request or the session ( if the data needs to live longer then one request ) .
If you're calling jsp's directly then you just call them as you would any
other static resource such as a link or image. If you're jsp's are undert
WEB-INF then on some containers they;re hidden from direct view (I think!!
not sure). In our apps we never call a jsp directly we always call
Sorry, I missed the point with the forwarding completely. I can change the action
mapping in my struts-config to go to the new action instead of the jsp, right?
On Fri, 15 February 2002, [EMAIL PROTECTED] wrote:
You probably could do that but I'm pretty sure it will not be fast
What is the order in which the set/get methods of a form-bean are called? I
am expecting, its the order in which my form-elements occur in the HTML
code?
Any feedback is appreciated.
Thanks,
Shyam Gourisetty
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
thanks Ted:
Your recommendation is a great way of doing it.
Theron
Ted Husted
Hi,
I have a form bean with 2 lists populated via a database call...One is an
array of addresses JavaBeans, the other is an array of customers
JavaBeans...The 2 arrays are synch'd in the action (e.g. customerList[5]
corresponds to addressList[5], etc.).
Now, on the JSP page, I iterate through
Hello All,
In a jsp page which had form with this order or elements.
1) Element A (required)
2) Element B (required)
3) Element C (not Required).
some more elements
I submit the form with entering any data for the required fields.
In my validation method of the form, I check for required
Satish Jeejula would like to recall the message, Order Validation Errors.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
We do this all the time.
We have several web services that we developed with struts and tomcat.
They are all just actions with no forms.
works great!
Robert
-Original Message-
From: Louis Leung [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 8:49
To: Struts Users Mailing
You need to put the tags for addresses and customers in pairs in the iterator loop.
Thus the indexID goes:
address, customer, iterate
address, customer, iterate
address, customer, iterate
etc.
On Fri, 15 February 2002, Lilavois, Daniel wrote:
Hi,
I have a form bean with 2 lists
How are the two shaping up? Are there still problems using a newer version
of struts with tiles? There are some features of 1.1 that I need such as
the dynamic forms. Also, would a nightly Struts download be in the 1.1
series or will it be 1.0.2 with some additional fixes?
Thanks
dave
--
I was just looking in the ActionErrors class myself and the ActionError objects are
held in a hashtable, which I think has no defined ordering system.
The messages which go into the ActionError though can have up to five substitution
snippets, so you could put all your validation messages in
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
What is the order in which the set/get methods of a form-bean
are called? I
am expecting, its the order in which my form-elements occur
in the HTML
code?
The Servlet spec does not dictate that
I'm trying to do something simple-- to render the value of a bean in a
textfield.
html:text property=supplierID size=40 maxlength=40 value=bean
name=form property=supplierID / //td
when the documentation says use the bean property tags to get the value,
what does
it mean?
thanks.
ken
--
To
I think you are. :o) Do you really want two pages if the if statement
only changes one line? You could predetermine the line in an action but
it depends if you follow push or pull styles.. I prefer pull.
Bring on the if tag .. unless the equal tag is really if in disguise
(still learning the
Struts gurus and users,
I used Struts in several projects and have a question about Struts design.
If consider a Struts application with separated business
layer (like EJB or another way) as MVC example I see:
ActionServlet - Controller
Action- mixed Controller + View
JSP with tags -
In the nightly builds the order is maintained in
ActionErrors.
David
--- Adam Hardy [EMAIL PROTECTED] wrote:
I was just looking in the ActionErrors class myself
and the ActionError objects are held in a hashtable,
which I think has no defined ordering system.
The messages which go into
The Struts Validator is in the contrib/validator
directory.
contrib/validator/src/share/org/apache/struts/validator/action/ValidatorForm.java
A binary version is available on my website and is in
the dist directory of the download
(dist/struts-validator.jar).
I'm a little bit puzzled about bean:message behaviour.
Let's suppose the following situation
ApplicationResources.properties
key1=defaultKey1
key2=defaultKey2
ApplicationResources_de.properties
key1=germanKey1
ApplicationResources_it.properties
key1=italianKey1
key2=italianKey2
To switch the
Subject: Re: commons valiador
From: Vic Cekvenich [EMAIL PROTECTED]
===
It confuses people that Stuts-validator jars is not included in lib of
the sample apps.
I think Tiles jar and Validator jars should be in every sample lib, no
mater what (including 1.1 builds).
my 2 c.
Vic
David
I am putting an object in the session from my Action class.
like this:
myObject = SomeOtherClass.getMyObject();
HttpSession session = req.getSession();
session.setAttribute(MyObjectKey, myObject);
Then in my forwarded JSP,
I am using bean:write name=MyObjectKey property=password/
This is the
Adam, I've just cracked this myself.
In your Action, set your collection to a session attribute:
Vector someVec = valueBean.getSomeData();
session.setAttribute(itData, someVec);
Then in your JSP:
logic:iterate name=itData id=list scope=session
...
/logic:iterate
Hope this helps,
James.
Sorry, posted the last one without subject. Here it is again:
depends on where your pages are.
If you have them in the root web app dir, use:
frameset
frame src=myNavigation.jsp
frame src=myContent.jsp
/frameset
If you have it , let's say under root/myjsps, use:
frameset
frame
depends on where your pages are.
If you have them in the root web app dir, use:
frameset
frame src=myNavigation.jsp
frame src=myContent.jsp
/frameset
If you have it , let's say under root/myjsps, use:
frameset
frame src=myjsps/myNavigation.jsp
frame src=myjsps/myContent.jsp
/frameset
What is the benefit of configuring datasources in the struts-config.xml
file?
My meaning is, I am adapting my existing webapp to use struts. Obviously,
I replaced my home-grown controller because struts has many more features,
like token and validation.
But, I'm not sure I gain by
You can always turn autovalidation off on that form and then within your
action call validate(...) yourself. Then if errors are returned load the
default data, and if not, then do whatever it is your action needs to do
to process the data. Just and idea ... that's how we do it in those cases.
Hi there,
Has anyone had success placing struts.jar in %CATALINA_HOME%/lib to share it across
all webapps? The reason I ask is that I have a shared library of utility classes in
%CATALINA_HOME%/classes and one of them needs to import struts for image upload.
My problem is that the
Thanks - this is exactly what I was looking for.
Now that I have my jndi-lookup in a ServiceLocator class - does anyone
know how to run a Junit test (maybe using StrutsTestCase -
http://strutstestcase.sourceforge.net
http://strutstestcase.sourceforge.net/ ) to test this in Tomcat?
I have
i'm rewriting a web app using struts and have one remaining problem - the
content we render has hard coded links to other content - i've figured out
the format for these links and how we would translate / map them to new URLS
- pick up the 404 and, using apache's ErrorDocument send it to a
In a particular scenario im populating my form using logic:iterate
with data fetched based on a query the user may edit or view the same(for
each row)
lets say im populating my order form with line item enrty and the user wants
to edit or view each line item
Now how can one generate and track
Hi,
I have a problem for struts in my product server.The error message is
following:
Feb 13, 2002 6:07:50 AM EST Info HTTP
[WebAppServletContext(5236534,ISPServiceCenter.war)] action: Processing a
GET for /intranet/workflow/coordinator
Feb 13, 2002 6:07:50 AM EST Info HTTP
Just so someone else doesn't go through the same pain
as myself. Below is a synopsis of the problem and a
solution.
Problem:
I have a page with two forms (loginForm and
accountForm) on it. One form contains fields to log in
a user, the other contains fields to display the user
account
Hi All,
I am using the classes provide by http://struts.ditlinger.com/ to allow for
switching between Http and Https calls in my Struts application. I have
installed SSL and is working fine under a test certificate. I am using the
the extended ssl:form
, ssl:linktags and the secure property in
Hi,
I just finished doing something similar. I have an ArrayList with a bunch of
charging objects. When the user goes to the summary screen I iterate through
all the objects and show them the data. I have added two icons, edit and
delete at the end of each charging row. Each of these icons is a
Hi, I would like to use Itext to generate the PDF
files. Should the conversion be in the ActionForm?
If so, how can we redirect the page to the PDF
document after the action has been invoked?
Thanks
John
__
Do You Yahoo!?
Got something to say?
Unless performance is of major concern, I'd recommend fop over iText...I
personally don't really care for iText. I'd recommend only collecting any
necessary info in the ActionForm...I wouldn't do any business processing in
there. Rather take that info you collected in the ActionForm and
I still don't get it. I have been initialising my form bean values in the
reset method - clearly not the way intended.
A Simple example:
I have a page that lists stock items. On selecting an item the user is
taken to a different screen where they can edit the details for the selected
stock
If a page needs to have its controls populated from the model, then the
input property should be an action that handles that population. The
action can then forward to the page to display the data.
In between validate and the action, the controller would call reset and
populate the ActionForm.
John,
What do we return as the ActionForward in the
perform method if we were to put the pdf stream in the
response object?
Thanks
John
--- John M. Corro [EMAIL PROTECTED]
wrote:
Unless performance is of major concern, I'd
recommend fop over iText...I
personally don't really care for
We have a bunch of existing beans that we'd like to use w/ ActionForms. For each bean
we'll need to obviously expose the getters/setters in the corresponding ActionForm.
The ideal scenario we'd like to see happen is prevent the ActionForms from having all
the corresponding getters/setters
I have instances of beans within the ActionForm and then access them with
the name of the bean and the name of the property in the bean when using
them in the JSP. The only problem is having non-Strings in the bean. You
need to do some sort of conversion within the ActionForm to get around this.
Hey gang. Here's something I've not run into before).
I have struts delegating database access to several (like 12) entity EJBs
through a session facade. I have a utility class that has extracted
numerous common functions out of the entity beans like setting the context,
the appropriate SQL,
In our case we did...
byte[] content = null;
content = class that returns byte[] which is the contents of the PDF doc as
a byte array
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
- Original Message -
From: John
Why would you do this (no joke)?
Mark
-Original Message-
From: SHURTLEFF,ROBERT (HP-FtCollins,ex1)
[mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 12:23 PM
To: 'Struts Users Mailing List'
Cc: 'Louis Leung'
Subject: RE: action without form
We do this all the time.
We have
And then return null as the ActionForward to indicate that there is nothing
more to do.
-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 3:09 PM
To: Struts Users Mailing List
Subject: Re: Itext - PDF from struts
In our case we
Unless I'm misunderstanding, I'm not sure if that will do what we're hoping
for
When you use the html:form tag (and corresponding input tags from the html
tag lib) on a JSP page there's error checking to make sure you have a
corresponding get/set method in the ActionForm. If we have the
Pre-JDK 1.4, the only way I know to do this required getting and parsing the
stack trace. It can get rather ugly. You might look at the log4j
LocationInfo class as example.
JDK 1.4 added a Throwable.getStackTrace() method which returns an array of
StackTraceElement objects, providing a much
F.Y.I.
We were doing the same thing(streaming pdf through the response
object). We ran into a bug in i.e. while running on a secure
port(https://). I.E. does not allow buffering when the port is secure,
and will give you a strange error on the browser. This piece of
functionality worked fine
You will have a getter and setter for the bean. Then in the jsp you will
access the bean something like
html:text property=nameOfBean.propertyOfBean size=10/
Kim
-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 3:18 PM
To: Struts Users
I'm not sure if this is a weblogic or struts error but when I turn SSL on
in weblogic, an intermittent runtime error gets thrown.
weblogic.utils.AssertionError: *** ASSERTION FAILED ***[
Attempt to invoke 0 byte request ]
at java.lang.Throwable...
HTTP Connection
Is there any examples with struts template tag? I have had difficulties to
use it. I got error:
Invalid directive
Any idea?
---
Henry Lu
MCITphone: (734) 936-2063
University of
Very interesting
So in your example is 'propertyOfBean' exposed in 'nameOfBean' via a public
get method or simply as a public data member? In other words, if I were
just accessing the value via a scriptlet would I say
nameOfBean.getPropertyOfBean() or nameOfBean.propertyOfBean
-
Yes there is, and there was a recent article in JavaDev Journal
describing this. Basically what you have to do is is create a Throwable
object, which you can then inspect the stacktrace. The stack trace
contains the calling order of objects. Yes you have to parse it, but it
works. The article
1 - 100 of 126 matches
Mail list logo