I'm making using struts for more or less than first time.
I read the FAQ on how to handle logins to an application and I'm left with
one question:
Why stop a storing a Boolean in the session to determine logged-inness?
Why not just store the (validated) User object in the session and check
The problems/questions I can see are:
As a single textfile is used, when there are several thousand
entries it will become difficult to manage. Can updates be
made, during operation, to the content ?
What happens if a
user requests the files content while it is being edited ?
Why
I'm using JBuilder 8 Enterprise and Tomcat 4.1.
Whenever you use JB to build a servlet application, it defaults to
building the project such that the root directory is named after the
project itself.
This is especially annoying in struts as I'm finding I need to name all
my actions
Suggestion:
In your filter, stick the current timestamp as an attribute in the
httpSession.
Before you do that though, check the timestamp that got stuck there on
the last request. If the delta threshold, bounce the user to the right
page.
If you *really* wanted, you could generate an
Figured out how to get at the Default WebApp.
And IDE's were supposed to makes things intuitive...
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 4:07 AM
To: [EMAIL PROTECTED]
Subject: JBuilder Servlet path issue
I'm using
this, I have a colleague
experiencing the same issue.
Personally, i'm using IDEA... no problems here ;)
Thanks in advance,
James.
Joe Hertz wrote:
Figured out how to get at the Default WebApp.
And IDE's were supposed to makes things intuitive...
-Original Message
Struts in Action says to copy struts-validator.dtd into WEB-INF.
Couldn't find it. So I checked Manning's site for errata to this (since
it was beta at the time) like the book suggested. Nothing.
So I googled (imagine!). This changed since in the final release, to be
part of struts-html.tld,
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 5:02 AM
To: [EMAIL PROTECTED]
Subject: Re: Struts-validator.dtd, or why lame newbie
questions happen.
So I googled (imagine!). This changed since in the final
release, to
Anyone see anything wrong with this validation.xml snippet?
I have 3 fields on my login page. User Id, Email Address and PW. I want
to allow the user to enter *either* his email address or user id. (okay,
I'm not stopping him from entering both yet.
It seems my attempt to say this field is
Your doing a bean:write of the team name inside of your iterate, so
yeah, the team name is going to show up on every iteration.
What approaches have you tried already? Which is the part your not
getting?
-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Saturday,
Depends=required,minlength doesn't work (despite the example in SIA and
all over the net now...).
According to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19595
this bug is marked as WontFix as Password fields are deliberately not
checked in this way for security reasons
Should I interpret
Of course, right after I send it, I find the updated bug report under
Commons Validator, still open:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23652
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 23, 2003 6:55 AM
To: 'Struts Users Mailing
Marc,
I'm doing largely the same thing as you are and having a bit more
success, but not complete success.
Some thoughts:
1) Are you *really* sure that validator.xml is loading? Your
depends=required,minLength makes me wonder since the identifier is
really minlength.
2) I can't get minLength
I got it working when I started with the struts-hibernate example that
Ted Husted wrote. Used the plugin from it.
I believe JNDI is avoided entirely with it.
I get some Hibernate SessionFactory Errors on startup occasionally, but
they stopped me cold.
Fix the addClass() calls here, but
I'm probably misunderstanding this woefully. Hope someone can set me
straight.
For my login, I'm using a UserLoginForm class that extends
DynaValidatorActionForm. The Action class is an extension of
DispatchAction (it handles all User related actions).
If in my Login.jsp, I remove the
SESSION_FACTORY_KEY. :)
http://www.hibernate.org/105.html
Regards,
David
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 1:29 AM
To: 'Struts Users Mailing List'
Subject: RE: Hibernate plugin
I got it working when I started
Curious. Changing the ActionForm from a DynaValidatorActionForm to a
DynaValidatorForm gets me backend validation.
Have I just stumbled onto a bug?
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 1:46 AM
To: 'Struts Users Mailing List
.
Regards,
David
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 2:07 AM
To: 'Struts Users Mailing List'
Subject: RE: Validator Backend Issues
Curious. Changing the ActionForm from a
DynaValidatorActionForm to a DynaValidatorForm gets me
URL's with session state information will cause search engines problems
in trying to index the content. (Makes sense -- the generated URLs wont
be valid for anyone else).
Google isn't about to store cookies as it indexes content, I'm sure.
So doesn't this make Struts a poor choice for
Probably a very basic question, and infinitely dealableI hope.
I have a User object, which itself contains a Set of UserData objects
(the UserData is stuff that needs to be multilingual. Each instance has
the part of the user's data that would vary when presented in each
language).
So, in my
Why is this necessary?
Isn't /*.do a subset of /* ???
-Original Message-
From: Ralf Rapude [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 6:28 AM
To: Struts Users Mailing List
Subject: Re: [OT] Athentication filter doesn't filter actions
Hi,
just repeat the
]
Subject: Re: Stupid Bean tricks
Why not convert your Set into a Map keyed by language / locale? Then
get(locale) is effectively provided for you.
--
Martin Cooper
Joe Hertz [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
oss.local...
Probably a very basic question
What's the url pattern for your action servlet defined in web.xml?
-Original Message-
From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 1:48 PM
To: Struts Users Mailing List
Subject: .do's come back as 404 file not found
Hello Everyone,
IE 5.X and 6.0 are very different beasts. 6.0 in some ways is *less*
compliant with the specs then 5.2.
-Original Message-
From: Jarnot Voytek Contr AU HQ/SC
[mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 1:59 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] IE
Actually, you haven't illustrated it. You've just stated it.
In the ActionForm there are methods like validate() that accept as
parameters an ActionMapping and an httpServletRequest, and from the
httpServletRequest you can call getSession().
Same holds true in the Action class' execute() method.
Actually, you haven't illustrated it. You've just stated it.
In the ActionForm there are methods like validate() that accept as
parameters an ActionMapping and an httpServletRequest, and from the
httpServletRequest you can call getSession().
Same holds true in the Action class' execute() method.
]
Subject: Re: Stupid Bean tricks
Assuming your User object is stored in the request under the
key user, the language you want is en (English), and the
UserData property you want is message, you would do:
bean:message name=user property=en.message/
--
Martin Cooper
Joe Hertz [EMAIL
Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Stupid Bean tricks
a complete example on how to use this concept is located at
http://www.orionserver.com/tutorials/taglibs/8.html
viel Glueck,
Martin
- Original Message -
From: Joe Hertz [EMAIL PROTECTED]
To: 'Struts Users
Is there (now) a better way to dynamically specify a property name than
the method outlined here?
http://www.mail-archive.com/[EMAIL PROTECTED]/msg21090.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
As of JSP 1.1 (and apparently 1.2 as I'm experiencing this with Tomcat
4.x) the following does not work:
bean:write name=myBean property=myMap.%=myKey%.myProperty/
One has to declare the entire String and implement it like this:
bean:write name=myBean property=%=myString%/
Anyone know if this
I've got a similar problem.
You could write a scriptlet function that appended the correct
languageCode onto your default property name and use the result of
that string in the bean:write tag.
Please let me know if you find a more elegant way around this.
-Original Message-
From:
I agree entirely. A pointer bean to the right data in the request. I'm
so there.
Thanks Ted.
YTH
-Joe
-Original Message-
From: Tsang, F (Fred) [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 5:06 AM
To: Struts Users Mailing List
Subject: RE: logic tag using locale
Normally I agree. American Laagers are pretty much identical. I've been
known to ask what is on tap, hear the list, and then order a pepsi.
A Sam Adam's Double Bock however, and I am quite happy.
I think Sam Adams at one point claimed to be the only American brewer
who exported to Germany.
I want to have a date entry validated using the date format based on the
locale.
When datePattern is unspecified (what Struts in Action led me to believe
would accomplish the above goal), I get no javascript validations to
happen.
With some experimentation, I find that I get no javascript popups
Okay, so the datePattern issue is a bug.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16810
Is the Locale issue one as well? I can just make a new formset for the
languages I'll support. It's not a huge deal, but still, would be nice
to know.
-Original Message-
From: Joe Hertz
Damn, I hate when I keep finding answers right after I post.
Not supported in 1.1
-Joe
Never Mind - Emily Litella
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 6:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Validator for dates
My (newbie also) I'd suggest that in your struts-config.xml you mess
with the null property for your message resource.
message-resources null=true|false
parameter=ApplicationResources/
Configured the right way, instead of null results, you'll see what
message resource it
I read that and my reaction was, It was suggested all of three months
ago.. How can the author make a determination as to why it *wasn't*
added if no new features have come out since then? Was there some
discussion on the dev list he was referring to?
Even if he's right, that's a complaint with
Not sure how OT this question is.
My current plan (unless this is bad for some reason, but if so, Ted H
should change his example app :-) is to stash the hibernate Session for
a user into his httpSession, and reuse it on each request.
A Hibernate Session instance isn't threadsafe. I imagine if
Yuck. And may I say, Yuck, again?
It's not the Session object per se, as much as it is the particular
attribute I want to store there.
It does strike me that the storage of a Hibernate Session in the
httpSession is a fairly common thing, so I doubt this bites people very
often. It does seem to
on the Hibernate site for a few minutes and found these:
http://www.hibernate.org/42.html http://www.hibernate.org/43.html
Quoting Joe Hertz [EMAIL PROTECTED]:
Yuck. And may I say, Yuck, again?
It's not the Session object per se, as much as it is the particular
attribute I want to store
- Original Message -
From: Joe Hertz [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:20 AM
Subject: RE: Are httpSessions thread safe?
I saw these. I just had this grand idea of minimizing the Hibernate
connections
Yeah, I get it too.
Silly me, I just assumed that it was a legitimate company, and some
(probably their only one, IMHO) employee sub'd to the struts list and
this was some sort of auto-responder for him. I mainly thought this
because it didn't look like Spam. Only in the last WEEK has started to
I am passing in an object my JSP page needs in with request scope. Works fine.
I'm also using the Validator, which also, individually, works fine.
They however, fight with eachother. Here's how:
When you use the validator and put a depends=required on a form's select box,
the check isn't
It was left handed bashing. To paraphrase-
Bill was announcing .NET when Struts was only a glimmer in Craig's eye.
Microsoft is committed to .NET and therefore .NET is Windows. With
Struts/J2EE you are at the mercy of whoever develops the implementation of
the Servlet Container, et al, or
Well, first off:
In your (dyna) form, you don't create setters and getters for the properties
though. With DynaForms you would say set(myPropertyName, myString)
instead of calling setMyPropertyName(myString). This is the Dyna part of
DynaForms. It's much less tedious IMHO.
In your action, you
) // new topic
{
threadBean.setLastPostMemberName( memberName
);
threadBean.setThreadCreationDate( now );
.
.
threadID = thandler.insertThread( threadBean
);
}
...
...
}
}
--- Joe Hertz
To borrow from the title of a movie:
Dude, where's my constructor?
this is my newitemForm.java
newitemForm.java
=
package net.foong;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import
Craig,
I agree with everything you said, but would absolutely love a clarification
from you on the following:
Other folks will disagree with me on this, of course, but in
my general response is show me where the back button and
bookmarks window are in a Swing app, and I'll make them
I had a requirement like this once, but the reports were generated by Seagate
Crystal. It generated the static HTML. JSP seems like the wrong tool to be
using here.
I would think (speaking out of my hat here) if the report itself was a JSP
page what you MAY be able to do is something like, in
I assume your goal is to say If this operation, DON'T use the rules defined
in rule_validation.xml?
What's in your rule_validation.xml and relevant JSP? Is that your whole
validate() method???
Just based on instinct. I suspect the problem may be in the JSP tags vs what
errors you are
Based upon choices the user makes, he finds himself at a one of four possible
screens with fields for him enter. Once he enters his stuff, I take the data
and then, using BeanUtils, dump it all into a nicely formatted string and
email it.
The data all comes in on a DynaValidatorActionForm-
Scuse me, I *wanted* to use BeanUtils. It doesn't do this though.
I've tried two ways of doing this.
1) Getting the keySet from form.getMap() and using an iterator from it to get
the corresponding value from the form.getMap()
2) Using the getDynaClass.getDynaProperties() method of my
, 2004 4:30 AM
To: \'Struts Users Mailing List\'
Subject: RE: Validator
Yes. That is what I am assuming.
I tried html:errors / too
The other methods are blocked. I can see that. The messages
are not appearing though.
Mohan
-Original Message-
From: Joe Hertz [mailto:[EMAIL
are blocked. I can see that. The messages are not
appearing though.
Mohan
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 1:20 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Validator
I assume your goal
I see an action that uses the JavaMail API in your future.
Nice little QuickStart article can be found here:
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail-p1.html
-Original Message-
From: hhlow [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 9:41 PM
To:
Herndon is a pretty sweet place. I used to work in Reston,
actually on the top floor at Reston Town Center, and that
area is tops. It sure does beat this place that I'm at now,
hands down! A salary of $50K would be pretty meager living
though, especially in that area. You'd most
I currently use JBuilder 8 Enterprise and I'm eval'ing JBuilder X. Anyone
else using X for Struts dev? I'm curious as to your thoughts.
Personally, I'm underwhelmed. I so wanted to see the validator framework
being leveraged...or even addressed. It's existence is barely acknowledged.
Is it my
Wendy,
I'm not getting something (and it's me being dense I'm sure).
It sounds to me like you've found yourself in a position where you are
pushing the limits of the validation framework.
What would be the problem with biting the bullet and implementing validate()
in your ActionForm and
I went thru this myself with Windows and IIS --
If it's a *nix install, you can use a symbolic link.
If it's a Windows install (2K) or later, see the following URL about
Junctions which are more or less the same thing.
http://www.sysinternals.com/ntw2k/source/misc.shtml
HTH,
Joe
I'm trying to an application in progress to use a /do/* url pattern instead
of a *.do.
I'm finding some strange behavior I haven't quite isolated, but the least of
it is that each successive mouseclick is prepending an extra /do to the uri
portion of the url.
Is there something I need to
Check the Bugzilla. I believe it works in the html:errors tag, but you
won't get a javascript popup.
If memory serves, there's a security concern about using minlength in
password fields -- basically the logic goes something like, Do you really
want to be providing a front end validation that
I have a simple iterate in a piece of JSP (snippet follows) that provides an
interface inside of an HTML table to modify items that came out of the
database.
What I want to do is provide an extra row or two for new items to be inserted
into the database. Short of embeddeding scriptlet code
with using CreditCost as a form property it will make life
harder if you ever want to decouple the web and model tiers.
If you cant be arsed having webtier beans/forms then perhaps
use a map
or dynabean to do the same thing.
On 22 Mar 2004, at 08:42, Joe Hertz wrote:
I have
I have a bean I persist with Hibernate. It's properties are:
2 Floats
1 Integer (the key)
2 Dates
Now, relying on my handy dandy copies of Struts KickStart, Struts In Action,
and all of the Web, I'm apparently supposed to declare these methods in the
Form I am using as Strings since automatic
=27321
though like I said, the dev team has plans for supporting
this functionality in a future version. How near or far into
the future might be influenced by user requests. :)
--- Joe Hertz [EMAIL PROTECTED] wrote:
I have a bean I persist with Hibernate. It\'s properties are:
2
Since I just wrestled greatly with this particular beast, my $.02 follows.
Subclass whatever flavor of ActionForm you use, and give it a method with a
footprint like-
java.util.Date StringToDate(String)
{
}
This way you can do something like this in your action:
public ActionForward
67 matches
Mail list logo