config
files and JSP and someone will take a look.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ossible for the framework to "know" what method to call when it
goes through the parameters in the request and populates the Form bean.
http://java.sun.com/products/javabeans/reference/api/index.html
You must have had a mismatch between the name of the pro
you recompile EVERYTHING? A good compiler will in-line references
to a String it knows is not going to change...
Betcha the class that's _using_ the contant has the wrong path embedded in
it.
--
Wendy Smoak
-
To unsu
I'm using DynaValidatorForm and LookupDispatchAction for a multi-page form,
so I have the problem of needing different validations for each 'page' of
the form. I learned about getValidationKey and am successfully returning a
String that matches one
of the tags in validation.xml. That's working.
orking on your development machine, make the changes
required to go to production, recompile, make a .war file and deploy
everything together. I'd also move this path out to a .properties file so
it can be changed without recompiling.
--
Wendy Smoak
t to the JSP all you have to do is iterate
over what's there.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.
You could also put a Filter on the webapp and remove extraneous spaces from
the outbound HTML response.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
passing only the 'message' to it and so hiding all details from
your Action.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e is corrupt. I've removed and re-deployed the webapp several
times, so it would be odd if the same file were damaged every time.
Help, please!
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
rking) struts-examples webapp over to my own app and started it.
Same error.
Has anyone possibly run into anything like this before? The webapp works on
Windows, but when I deploy it to HP-UX, I get the errors in the log file and
it won't start.
--
Wendy Smoak
---
From: "Wendy Smoak" <[EMAIL PROTECTED]>
> 16:03:09,737 - ERROR org.apache.struts.validator.ValidatorPlugIn - JAR
entry
> org/apache/commons/validator/resources/validator_1_1_3.dtd not found in
> /opt/hpws/tomcat/webapps/benauth-test/WEB-INF/lib/commons-validator.jar
> j
combination of events. It will probably disappear with
our next round of patches and tuning. We used to have Tomcat mysteriously
crash once a month or so... that also went away. Meanwhile we shrug and
work around it!
--
Wendy Smoak
-
he jsp file. Most of us already prevent direct access to JSP's in various
ways-- I put them under WEB-INF and force all requests to go through an
Action.
In that case, does the rest of your argument still apply?
--
Wendy Smoak
---
ave an expression in there, so apparently
nobody is allergic to <%.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
in session scope, etc. I just place a
Session Attribute and use that to figure out where to go next.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
s causing the problem. My
bet is on a typo, I've never heard of Struts restricting you to only 50
mappings.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
at I use. Or there are plenty of
code-generation tools that will do it for you. Either way you should not
have to type in a bunch of get/set methods.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ting to access something they've created with
in a scriptlet, and you seem to be doing it the other way around,
but I think you're running into the same issue.
HTH,
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
chance the misbehaving server has a different JSTL implementation? Are
you using the one from Jakarta, or possibly one that came with WebLogic?
I have had a few things act differently on my Win2000 workstation vs. the
HP-UX web
In the 'execute'
method signature, you are given a _reference_ to the Form bean which is
already sitting where ever it belongs based on your configuration. Just use
it, set whatever properties you need to and then forward to the appropriate
JSP.
--
Wendy Smoak
--
the 'user' object has a 'getLogin' method.)
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
te of used for, and
can anyone tell what I'm doing wrong?
Thanks!
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e first message: I'm using Struts 1.2.5 .
Thanks for any ideas!
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
do for a problem... I missed one of the pieces of the package
name. And it works!
Thanks also to Erik for explaining the 'key' attribute. :)
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Graeme Miller" <[EMAIL PROTECTED]>
> How do I make it so that the
> html:form tag is scoped across both tiles as I want to be able to
> put controls in one tile and buttons to submit in another?
A search of the list archives turned up very little discussion of splitting
forms across differ
es not change the selection to "Y", the form is re-displayed with an error
message?
How do I validate that a form field is exactly equal to a string?
Thanks,
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
(validWhen is using 'error.required'.)
So I'm down to creating a custom "rule" copying validWhen but giving it a
different message, or just doing it manually in the Action, in which case I
think the info here will help:
http://wiki.apache.org/struts/StrutsDeprecatedActionErrors.
Thanks!
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
;Y")
[The bit you quoted from
http://struts.apache.org/userGuide/dev_validator.html is in serious need of
some commas!]
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
d to the input form, and Struts will display the value.
If you are allowing direct access to the JSP, don't. If you are retrieving
the 'outside bean' in the JSP, do it in the Action.
--
Wendy Smoak
-
To unsubscri
);
> then I forward
> on the jsp:
Can you post the actual code? I wonder if you are operating on the 'form'
object that was passed into the Action.execute() method, or not?
Also post the relevant parts of struts-config.xml (for the 'caller action'
you mentioned, and s
em goes away.
(Add scope="session" to the tag in struts-config.xml.) Or
perhaps someone else can see what the problem is.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ting
bean properties from this request
If you put a debug statement in the constructor or the 'setIdProponente'
method, you should be able to see when the form gets created and when that
property gets set. If you then see a second form creation, well, that's
where your value went!
You probably left out the name="formName" attribute, probably in the
tag in struts-config.xml. Post your actual config information
[just the tag] and some of your JSP code, and someone will probably
spot the error.
--
Wendy Smoak
-
are intranet apps and require a login,
if anyone tries it I'll know who it is and can go whack their hand with a
ruler.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
s so they look the same as the real submit button.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ionForm from the request. The best
way to see what's actually happening is to run the whole thing in a
debugger-- an hour with JSwat will teach you more than an entire day
studying the documentation.
--
Wendy Smoak
-
To unsu
ve to use a String?
What happens when somebody types "ABCDE" into your Integer field on the
form, and it fails validation? Can you re-display the incorrect user input
so they can see what they typed and why it was wrong?
--
Wendy Smoak
---
s wrong?
>
> Or more concisely, because HTML only has string types.
Oh, sure, take all the fun out of it. ;) Teach a man to fish, and all...
It begs the question though: is there a case for using Integer in an
ActionForm? I know the reasons *not* to (and I don'
though...)
Prevailing wisdom is that you "should not" use anything but String/String[]
(and possibly Boolean). Yet Integer is allowed, causing me to occasionally
snap at people who use it and then complain that it doesn't work right.
There had to be a reason that Integer ma
String[] accounts = (String[]) dvForm.get( "accounts" );
HTH,
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
checking the value of one thing and
then displaying either some spaces or else an asterisk.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hough about a struts plugIn , but it seems a bit heavy solution.
You can write a ContextListener and configure it in web.xml. I have one
that retrieves things from the database and places them in Application
scope. You could read from a .properties file, or do anything you need to
do when
? Where do I store the image temporarly?
> Any solutions?
Do you expect most of the images to be previewed and then accepted? It
might make sense to go ahead and put them where ever they're going to go for
real, and then run a cleanup job to get rid of the ones where the user
didn
ng in session scope. Yours might be a List, I
think any Collection would do. In the example, 'accounts' is a String[]
property of the Form bean.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If BeanUtils doesn't convert the way
you want it to, you can write your own Converter and register it.
Does a number with commas pass validation for a long?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e form fields is, as you've noted, prior
to the first submit, when the fields were blank to begin with. This isn't a
Struts issue, it's the way it's always been with HTML forms.
Hope that helps, post again if I've totally misinterpreted what
This is my first time having someone else do the page design. I'm thrilled
to have someone else do it, but they use DreamWeaver and I'm not sure what's
going to happen if it sees . Then there's the fun of JSTL
tags embedded within HTML tags, which works fine but can't exactly be
considered valid
tter off doing it myself. :/ I'll try
to get a clean formatted example out of them and just use that. Thankfully
we all agree that simple is better, so the pages are not too complicated,
but I still think I'm in for a bunch of editing. (And they're already
talking about changes...)
Th
From: "Nadia Kunkov" <[EMAIL PROTECTED]>
>
>
>
Struts will pre-select the item when the 'country' property of the form
matches the countryID of the option.
What is the exact value of the 'country' property of the form? I'm betting
y
ok
to the enclosing form bean. So use 'name' to tell it which bean to use.
Is there a reason to use over ? Just curious, I use the second one:
(Where contactTypes is a Map sitting in Application scope.)
--
Wendy Smoak
From: "Daniel Kies" <[EMAIL PROTECTED]>
> Can you offer a decent way of
> searching through the archives?
I like http://www.mail-archive.com. Put 'struts' in the box on the first
page, then choose the user list.
Why are you dismissing
cted' by Struts? (You need to use the Struts
tags for that to happen.)
Or is your question _how_ to set the values in the dynamic form bean?
Should be...
( (DynaActionForm) form ).set( "fieldName", myList );
Post some of the co
e you a date, they fill in the date field. If not, they don't. Why
make them check a box AND fill in a date?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
than forcing
everything to go through an Action. The system doesn't know that a certain
JSP 'belongs' to a certain Action. Many people use a separate 'setup'
action, I do it with DispatchActions that know to do d
Can someone explain what Struts Chain is or point me to some documentation?
I see it mentioned occasionally, but I can't find anything that sets out
what it is, how it works, and why I might want to use it.
Thanks,
Wendy
e Action for submit, then I
suppose you'd need a PrepareAction to go with it.
> The starting page is index.jsp that looks like this:
> <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
>
And this redirects them... where? Is it submit.do or submit.jsp
in order to offer any further guesses.
> I can define it as 'submit.jsp', but there is no difference in behavior.
No, that's definitely not going to fix it. Everything needs to go through
an action, which you seem to be doing.
--
Wendy Smoak
--
me):
I have no idea if an Enumeration will work. The docs for 'options' talk
about Collections, but my Map works just fine, so... give it a try.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ed to worry about Chain too much. For some
reason I thought it was something else entirely (something to help move
users through a series of required steps) and was curious.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTE
suggest that you strip the project down to the smallest example that
demonstrates the problem, zip it and post it somewhere we can retrieve it
and take a look.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
to get the list from the database
List myList = myDao.listFormDetail( userId );
HTH,
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
les Controller (or command line
or Swing app) doesn't know what kind of database you have, or even if there
IS a database. It just makes a DAO object, calls the method, and uses the
returned object however it intends to.
HTH,
Wendy Smoak
-
ny method of any class, and IMO should
not be. I think you've arrived at the correct solution-- pass the String
into the method that needs it.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
names match]. You can see
an example of this in struts-example.war.
Using the 'value' attribute (or nested tag) means that the form
will always be rendered with the values from the database-- this could be a
problem if you need to validate the form and re-display the inc
file lives in WEB-INF/classes/
HTH,
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
esources.properties
file. Maybe...
button.new=Add New User
There's supposed to be a way to add a parameter to the link, but I could not
puzzle out which attributes of should be used together to make
it happen. I'd have to play with it and see what works.
http://struts.apache.org/userGu
", list );
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
it's empty!
I'm not sure what it means for a bean to be empty though. Maybe you would
check to see if a particular property is null?
--
Wendy Smoak
--
nk u mean to say i can check for (MyBean.MyPropert == null ) ?
right ?
Yes, or, since you know in the Action that you haven't found the record, you
could forward to a 'no data' page rather than the one that displays the
data.
--
Wendy Smoak
-
he Struts code?
Struts has LazyValidatorForm, or you can use LazyDynaBean directly, so you
don't have to define properties in advance.
http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html
http://struts.apache.org/api/org/apache/struts/validator/LazyVa
ion you're using.
And here I was going to say that I didn't think you'd have any problems
moving up from 1.1, except that you'd see deprecation warnings about
ActionError. :(
--
Wendy Smoak
-
To unsu
bugger like JSwat.) Are you getting NPE's? Is the form bean not
getting populated at all, or are only some of the properties not coming
through?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
a Mapped
property in a normal ActionForm would do what you want? Do you really need
separate properties for each one, or would putting them all into a single
Map do just as well?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
what parameters.
I have a 'debug.jsp' class that I include at the bottom of the Tiles layout
when I'm developing. It prints out everything, all the request parameters,
cookies, the entire contents of request, session and context sco
ent.
Can you share that class?
Page, I should have said. I don't remember where it came from, it was
originally done with scriptlets and then I got help to change it over to
JSTL: http://wiki.wendysmoak.com/cgi-bin/wiki.pl?DebugJSP
HTH,
--
Wendy Smoak
-
on a DynaActionForm won't be found by the
reflection utilities."
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
nges) cleared the problem up.
Your original code violated the JavaBeans specification-- you're only
allowed one pair of get/set methods, and the types have to match. (Boolean
properties have slightly different rules.) Any additional methods will, as
you found out, confuse the intros
te your own ActionForward (rather than
looking it up from the ActionMapping) and return it, or just do the redirect
yourself and return null.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ndexed property might be
represented by four accessor methods.' So your code was correct, sorry!
Personally, I've never gotten anything but grief from having more than a
single pair of methods. Then again... all of my 'bean' experience is with
Struts and
added the beginnings of a test case to demonstrate the problem with
setting an indexed property when the bean has both setProp(String[]) and
setProp(int, String) methods. It fails with the same 'argument type
mismatch' that Will Stranathan was getting.
--
Wendy Smoak
the docs, assuming your is
surrounded by an tag, it should call getMonths on the form bean.
IIRC, the collection attribute will make it go hunting in
page|request|session|application scope for something with that name.
--
Wendy Smoak
the form bean (which is
probably a String[] or a List) to the values you want to show as selected
when the page is rendered. The Struts framework will automatically mark the
correct items as 'selected'.
--
Wendy Smoak
-
n rendering this input
field. If not specified, the bean associated with the enclosing
tag is utilized.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
here, or not. It seems to
me that if
is allowed, and
is allowed, then there should be
some way to say
.
I don't see that in the Struts taglib, other than the ability to pre-select
the items that match a bean property, either the form bean (by default)
p
> page.
Do the redirect yourself, and return null from execute().
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
trying
to feed the results of client-side JavaScript into a server-side JSP tag.
You can't, because all the JSP executes on the server, then the HTML goes to
the client, and then the JavaScript runs.
In other words, at th
7;name' of the bean that has this property. (Logic tags do not default to an
enclosing bean the way the html tags do.)
How about
">
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
on
on the wiki:
http://wiki.apache.org/struts/StrutsCatalogLazyList section 2.4 .
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
again submit
and update the form on the 'parent' page.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tribute is (or
that it's a request parameter) you can use the implicit objects.
Appendix A of JSTL in Action is available here:
http://www.manning.com/catalog/view.php?book=bayern&item=chapters
--
Wendy Smoak
-
T
lay.
When the user has submitted his changes, you go back the other way:
BeanUtils.copyProperties( person, form );
personDAO.update( person );
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
he user back
where they clicked. So... in the Action, I do:
request.setAttribute( "anchor", "someString" );
and then at the bottom of the JSP, so it won't get executed until the page
has loaded all the way...
y or will the user be updating the database?)
It doesn't sound like you need a form for that first page with the button.
Try it with a plain old and see if that works.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
much the same thing:
http://www.mail-archive.com/user@struts.apache.org/msg17576.html
The 1.2.5 release must not have gotten very far, I don't remember it. But
the release notes are on the same page with 1.2.6:
http://struts.apache.org/userGuide/release-notes.html
--
Wendy Smoak
-
gets, "Sorry, this record has been modified since you
started editing it." It works for me because the records in question are
usually added as new records, and only rarely modified.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
page with some error messages
on
> it, but the URL now reads something like .../action.do...
Allowing direct access to the jsp is generally not considered a good idea.
Is there some reason that the first URL they go to can't be /action.do?
Just don't let them see the jsp to begi
g the value if it's unset?
You probably could do it in the JSP, but IMO it would best be done in the
Action, before forwarding to the JSP. Isn't it similar to pre-populating
the form from a database record before displayin
gt; * Netscape iPlanet 6.1 connected through
> tomcat-connector to tomcat 4.1.24
Have you checked the archives for tomcat-user? I think a couple of people
have reported something similar. Unfortunately, as a rare, seemingly random
occurrence it's goin
serve images directly, so all my webapps have and those files live under Apache's document root.
(For development which I do with Tomcat alone, they're under the ROOT
webapp.)
--
Wendy Smoak
-
To unsubscribe, e-mail: [
m, works fine.
It will really help if you post some of your code, it's difficult to figure
out what's going on just from a description.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Barnett, Brian W." <[EMAIL PROTECTED]>
> Any suggestions for converting html to RTF and PDF inside an action
> class and then sending the RTF or PDF back to the client?
iText, but I don't do it in an Action, I redirect to a Servlet whose job it
is to output the
1 - 100 of 960 matches
Mail list logo