the exception that describes what really happened, and let
Struts do its thing.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
need to subclass it to provide the 'reset' method.
If you don't do this, as you've noticed, it's impossible to ever
un-check a checkbox on your form.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
opulate at the
very beginning, not every time the get/set method is called.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e HTML and then apply CSS. Or any number of other things I'm not
creative enough to think up.
Hope that helps! If not, describe in more detail what you're concerned
about.
--
Wendy Smoak
Application Systems A
e Java classes in addition to the struts-config.xml setup.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
That's the solution
I use, and I have lots of links that set hidden form fields and then
submit the form. They work fine.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To
I can remember, and have no problems putting a nightly build into
production. Test it, look at the outstanding bugs to make sure none of
them affects you, and go for it.
Struts is one of those places where the bleeding edge isn't terribly
painful. ;)
--
Wendy Smoak
Application Sys
7;t use , so seeing the generated HTML would also help
make sure nothing's wrong there. My links are generated with
StrutsMenu, and switching tabs necessitates submitting the form on the
current tab, or else the input is lost.
script:function()" syntax is frowned upon by JavaScript
purists...
My links turn out looking like this:
Manual Lookup
Where 'noscript.html' is a page that people never see. Well, unless
they hava JavaScript turned off, in which case they never would have
gotten this far in my webap
e
Apache to send an alternate image instead of a 404.
If I had to do it in Tomcat, I'd map a Servlet to the .jpg file
extension, read in the requested image, and either send it or send the
'no image found' image out to the b
uessing this is not running on a single Tomcat instance...
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> From: Hookom, Jacob [mailto:[EMAIL PROTECTED]
> Actually, I think you can do this pretty easily with CSS...
Here's a thread that might be helpful...
http://www.webmasterworld.com/forum91/1871.htm
--
Wendy Smoak
-
now "allowed" in a new JavaBeans spec, or is 1.4 "smarter" when
it comes to figuring out what method to call with
Reflection/introspection?
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
---
ActionForms, BeanUtils.copyProperties, etc.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Users can
choose whether or not to display each section. Works fine... There is
some JavaScript involved in mine, but I don't think it's required.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
? Do you have any objection to JavaScript?
With Struts-EL and JSTL, I haven't needed to venture into the Nested
taglib, although I understand there are things it can do that
Struts-EL/JSTL cannot. This may be one of them...
--
Wendy Smoak
Application Systems Analy
ean class.
Or, my preferred solution is a bit of onClick JavaScript to set the form property and
submit the form. This only works in situations where where you can require that
JavaScript be enabled.
--
Wendy Smoak
Application Systems Analyst, Sr.
enlightening experience.
Given that you've learned all this stuff in three weeks, you're doing
great!
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
a redirect instead of a forward.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e I figured I'd give it a shot.)
Craig posted a detailed explanation of how this all works not too long
ago, in response to a inquiry I made here. Unfortunately, none of the
archives is cooperating with me right now, perhaps someone else can turn
it up.
Were you having problems that
e page with the HTML
form:
If that's not helpful, you might want to post more information about your Struts
project, and see if that prompts another response.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
--
n't
buy tech books anymore, they go out of date too fast. Instead, I "rent"
them from O'Reilly for a while: http://safari.oreilly.com
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
t be don't bug me about things like that, they merely want
working web applications. ;)
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
; rendering a drop down box.
It will mark whatever value matches the value of the property of the
enclosing tag.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail
just throw in a regular tag instead?
I have the same issue, only my buttons have images on them, and no label. I
solved it with JavaScript, the onClick sets the form element to whatever
value I need, and that gets passed to the server.
--
Wendy Smoak
Utils.copyProperties.
It goes something like...
1. read Value Object from database
2. copy matching properties over to form bean
3. forward to JSP
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
orting to building the table in the bean.
I would use JSTL tags (c:forEach) to iterate over the ArrayList and display
the data. But there are other ways, also. Struts doesn't tie you to any
particular way to display things, so use
you
out of writing all those get/set methods, or you can (apparently) use
xdoclet to generate the Java code.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
can see having two forms on a single page and giving the user a choice of
which one to submit. But if you want all the elements from both forms to be
submitted, you might as well put them all in one form and make your life
easier.
--
Wendy Smoak
---
t;${anchor}"/>";
That wiill tack on the #something to the end of the URL and the page will
jump to the anchor.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
after all:
http://wiki.apache.org/struts/StrutsLimerick
(Can somebody fix the line breaks?)
See also:
http://wiki.apache.org/struts/StrutsHaiku
if you're more into that sort of thing. ;)
--
Wendy Smoak
-
To unsubscribe, e-mail: [EM
ge, it sends an email to the dev
list. Use the 'preview' button liberally to avoid annoying the developers
with a bunch of minor changes. :)
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ic forms or not doesn't really matter... you just use the 'form' object
that gets passed into your method. And since it's a reference to the form
that's sitting in request or session scope, you don't have to "put" it
anywhere, it's already there.
--
Wen
on code, then Struts can properly handle
what to display in the HTML form.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
could use multibox in place of checkbox, but if
you're expecting multiple values, checkbox won't work, you'll only ever see
the final value that the browser submitted.
HTH,
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
so that
does save space.)
What's the reason here for not wanting to use session? Someone mentioned
security... but if they've got access to what's in memory/on disk of your
web server, you're already in pretty bad shape.
--
Wendy Smoak
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
ase wait' page
- the sample code I started with was already a Servlet
- it's not tied to Struts. It looks at something in the session, reads
stuff from the database and spits out a PDF.
If it works for you from an Action, I won't argue that you
be to pass the needed information as request parameters
when you pop the window. It's a separate request (which is probably what's
causing your initial data-passing problem) so you can send it
?parameters=on&the=url.
HTH,
Wendy Smoak
-
the archives:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg06117.html
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
of clicking a "CANCEL" button on the form, such as hitting
the
> ESC key and having that trigger an event in the JSP that is the same as
> clicking the "CANCEL" button.
I don't think so... in fact ESC is the same as cli
answers your question, but that part jumped out at me.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Nathan Maves" <[EMAIL PROTECTED]>
> Anyone have a quick replacement for the following?
>
>
>
>
>
>
See if this helps:
http://wiki.apache.org/struts/StrutsDe
From: "Andrew Close" <[EMAIL PROTECTED]>
> function sl_addMemberProdNbrs(frm) {
> frm.action += "?prodType=Member";
> frm.submit();
> return;
> }
Instead of messing with the action of the form, actually add the attribute
to the form. You might need prodType to be an existing, hidden form
el
"submit"
is it? If so, JavaScript might get confused between 'submit' the form
element and 'submit()' the function. Try changing it to 'userAction' or
something else, or just comment it out for now.
--
Wendy Smoak
--
nd I *have* to make the form submit when the user clicks to
switch to another tab, or I lose whatever they've typed on the form. I do
it with JavaScript:
function standardTab() {
document.forms[0].mode.value="";
document.forms[0].target="_self"
aScript
to set one of the form elements & submit the form. Mostly so I could POST
the form and keep the user from bookmarking something they shouldn't.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ven appear to need JavaScript *or* a
form, much less buttons on it.
I'm going to bow out of this now-- you have your solution, I have mine, both
of them work, and the OP can choose one of the many ideas that have been
thrown out there and be on his way.
--
Wendy Smoak
-
From: "Andrew Close" <[EMAIL PROTECTED]>
> the one thing i'm still fuzzy with is why would the actionform only
> populate with one of the three hidden field values?
That whole thing where you were adding parameters to the action attribute of
the form, then submitting it with JavaScript called from
It works exactly the same way with Tiles, only instead of forwarding to the
'view page' you forward to the tile definition. So continue to do your
setup in the Action (or in supporting classes that you call from the Action)
and
From: "Jim Barrows" <[EMAIL PROTECTED]>
>
I have nothing with .do in my tiles-defs.xml file. One of mine looks like:
accountInquiry.jsp has the form in it, and the Action that forwards to
'account.inquiry.page' handles prepopulating the form if necessary.
I don't think
s, POJO's should have types that make sense for the type of data
stored in them.
Since you can generate the code for the Form (xdoclet?) or use Dynamic
forms, the amount of effort you save by trying to reuse the Value Object
(your POJO) is IMO not worth the problems it's likely to caus
ed from the request by the Struts framework, so if
you're concerned about having to call all the get/set methods yourself, that
is already taken care of.
HTH,
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
ruts is based on Servlets, but you don't have to know
anything about Servlets to make a useful Struts webapp.
To the OP, if no one has yet suggested it, Jason Hunter's "Java Servlet
Programming" book is getting dated (perha
ly works just fine. In that case, the powers
that be may not be all that interested in having it rewritten.
If he is particularly unlucky, the app is exactly what I described, a bunch
of Servlets spitting out HTML. I hope not, but it's entirely possible, and
calling it "nuts" is
xample in a debugger (JSwat?) for an hour will reveal all sorts of things
it would otherwise take you days and weeks to figure out.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Andrew Close" <[EMAIL PROTECTED]>
> for example, page 1 has a select list containing shape objects. upon
> selecting the shape you want an action fetches and populates colors,
> another select list on the page. the problem is that the users are
> selecting the shape and then immediately at
ay.)
Make sure you don't have multiple 'setMyProp' methods with different types.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ame Action mapped to two different URL patterns, with a separate
set of forwards for each.
You could do it with CSS and dynamically pick which stylesheet to use based
on something in the user's session.
--
Wendy Smoak
-
T
*be* a relative path to the web application.
IIRC from the Servlet spec, the container is required to provide a temporary
location for files.
What is it you're trying to do?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PR
EG and .jpeg are not the
same.
Does your browser understand what to do with a .jpeg file? Try renaming it
.jpg and see what happens.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
make
sure it's not corrupted and really is an image? Are other images showing up
on your page, is only this one giving you a problem?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ing simple. On Unix the next thing I would suspect is
file permissions, less so on Windows but still... is the file marked hidden
or something weird?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
in a
debugger (JSwat, if you don't already have a favorite,) for an hour, and
most of the mysteries will be solved.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Erik Weber" <[EMAIL PROTECTED]>
> Rick, I tried putting a hidden submit button ( style="display:none"/>) in front of my cancel button to intercept the
> "Enter" key, but again, this worked in Mozilla but not IE (just like my
> key listener JavaScript).
> So I'm still looking for an Enter key
d!
Some of my early posts read like I randomly selected words from the Struts
website and strung them together.
The lightbulb will come on soon. :) [Weird, I used that phrase in my note
suggesting debugging struts-example.war and deleted it thinking it was too
flip.]
--
Wendy Smoak
--
s (including the one we use for HP-UX)
often require some tweaking to work right. When we first started, Tomcat
would inexplicably crash every so often. It took recompiling the HP-UX
kernel with some different tuning parameters to make everything work
correctly.
--
Wendy Smoak
es to "WEB-INF" that
> involves anything security related. This was the result of examining all
> files found doing a brute-force search of files in the file system.
Have you asked on tomcat-user? If you think Tomcat is misbehaving, they may
h
x' tag, not the 'checkbox' tag.
And if you're trying to do what I think you are, Struts-EL might be of help.
Here's an example from one of my projects:
The 'accounts' property in the Form bean is a String[].
HTH,
--
Wendy Smoak
-
If you just want to display information, consider (or ).
You can't have form elements (text areas, text fields) without a form.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
solve by
doing this, someone may have a different solution you can try.
It doesn't make sense to load a page and immediately submit the form... if
you're not going to give the user a chance to fill in the form before it
submits, you don't need to display it.
--
Wendy Smoak
---
m,
which won't be there unless it was POSTed.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
g of the messageForm.jsp and the closing
> tag at the end of the messageForm.jsp.
>
> I got the error message 'cannot retrieve
> definition for form bean null'
That's because your tag doesn't have a 'name' parameter. When
Struts gets to yo
ruts comes to an tag, it looks to the
action mapping (the tag in struts-config.xml) for the 'name'
attribute to tell it what Form bean to use. No name attribute present?
That's where your 'form bean null' error is coming from.
--
Wendy Smoak
--
your
struts-config.xml file with some @tokens@ in it, and then use the 'replace'
task to change them to what you want in the output file. I do this with my
log4j.properties file, so that dev/test/live have different log file na
;t that do it?
You may also want to go talk with these guys:
http://www.paypaldev.org/topic.asp?TOPIC_ID=3239
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ult is amazing. Enjoy the show, answer some questions, ask some more,
it'll get done when it gets done.
Try as you might... you're not going to change the culture here. We like it
this way. ;)
--
Wendy Smoak
...doing "real work" with open source software...
-
ked about it on the dev list, hopefully someone can drop the 1.1 files
into some directory and the download page (which is a .cgi) will magically
change. (Well, after all the mirrors get updated... which might be the
reason for leaving 1.2.2 there, knowing another release is coming soo
From: "Wendy Smoak" <[EMAIL PROTECTED]>
> He has a point-- if you go to Download->Binaries it gives you 1.2.2.
>
> I asked about it on the dev list, hopefully someone can drop the 1.1 files
> into some directory and the download page (which is a .cgi) will magically
mcat entirely, just the individual webapp.
I do it with Ant targets, first 'install' then 'reload'.
If that's one of the files that gets read once when the webapp starts up,
the only way to get it to be read again is to reload
ction in whatever scope it's in. I
believe it looks in order: page|request|session|application scope and uses
the first one it finds, but I could be making that up. :)
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
necessary if you want to use the "original" Struts tags and a
non-dynamic Form.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
t will become clear. Every time a
request comes in, validate gets called (if you have it configured that way).
This happens *before* the form gets displayed.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
extends DynaValidatorActionForm implements
Serializable
{
public ActionErrors validate( ActionMapping mapping, HttpServletRequest
request )
{
...
Don't forget to change struts-config.xml so it uses your newly created
class,
ruts? Think of your dynamic form as an
ActionForm, only instead of writing all those get/set methods, you put that
part in struts-config.xml. The validate and reset methods work the same in
either case.
--
Wendy Smoak
-
To u
o
> pass the index to the forward, like path="/master.jsp#XX".
I do it with a bit of JavaScript:
document.location = "#<c:out value="${anchor}"/>";
If I need the page to jump, then 'ancho
n putting them under WEB-INF as if you need to restrict
access to them, so I'm not sure. Is this Tomcat-only or is Apache involved?
We've used .htaccess to restrict access to files to only the IP address the
request came from.
HTH,
--
Wendy Smoak
--
your String[] property.
I'm using Struts-EL and JSTL, so I'm not sure if you really need the
'indexed' attribute or not. I don't use it.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
you using a JSP 2.0 container, and do you have it configured so that
expressions are automatically evaluated?
If not, you'll need to use the "EL" Struts tags.
I have an example from my own project posted here:
http://www.wendysmoak.com/wi
uot; that memberList is a
property of some form. I don't know if it does that or not... try
property="deleteForm.memberList" instead.
But actually I'd just put the search results in session scope and either
modify them as you do the deletes, or refresh it after the deletes. T
in
session scope. To the consternation of my network and server admins, I tend
to assume that memory and disk space are infinite resources until I'm proven
wrong. ;) Premature optimization is the cause of more problems than it
fixes!
--
Wendy Smoak
--
m as
default
> Form for searchresults.jsp. I know I have it mapped for the deleteAction.
You can set it up, but it's the tag that makes it work.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hen they
> click on 'Google' in my JSP. The above HTML tag gives
> me a problem.
What kind of problem? It looks fine to me, and if all you need is a plain
old static link, I wouldn't use a taglib either.
Post the JSP and the resulting HTML a
search engine,
> ignores everything past the "?", thus making the rest of the web site
> un-indexed in most search engines (since google is used to run most search
> engines).
I just went to Google and ran several searches, all of which turned
From: "Anna Kerekes" <[EMAIL PROTECTED]>
Does anyone know where I can get a copy of this file? In its default form?
Yes, we do. ;)
(There's one in the 'lib' directory of the Struts 1.2.4 distribution.)
--
Wendy Smoak
-
ing is
preventing java on HP-UX from reading the commons-validator.jar file.
Has anyone seen this before? What could be wrong?
Thanks,
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Wendy Smoak" <[EMAIL PROTECTED]>
> Today I tried to deploy a .war file to my production web server which runs
> HP-UX. When it unpacks the war and tries to deploy the webapp, it
> complains:
I dropped back to 1.2.0 and HP-UX is happy again.
Never mind about n
"it's not working". Are you getting errors? What do the
log files say?
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tion you give, the more likely you are to get help.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
to fail? Without reset, the value
is still set in your form, unless it's request scope.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1 - 100 of 960 matches
Mail list logo