You action classes perform function should do a jndi lookup of a session bean
(stateless or not, I prefer stateless), passing a value object holding the relevant
data. Do not be tempted to use the form bean, create a value object with no struts
stuff in.The session bean should then do any
PST
Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: Re: Editing a database record best practice?
On Tue, 12 February 2002, "Jonathan Gibbons" wrote:
>
> I guess the really OTT answer is:
>
> User/GU
ell, if that's true, forget it. I'll just use scriptlets, although I feel
like we're mixing too much java that way.
John
-Original Message-
From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 11:38 AM
To: Struts Users Mailing List
Subjec
Hi,
I've been thinking about this and have just arrived at the point you left behind!
OK, the issue is that there is a data layer that holds EVERYTHING. And its all
normalised inside databases and is pretty hard to utilise within your business code.
So we create a business layer which loads
If there are plans for an if then else tag can they please be dropped.
Scriptlets are far cleaner than inventing a tag which exactly mimics java.
Jonathan
Message History
From: "Mattos, John" <[EMAIL PROTECT
Hi,
If I were you I'd seperate login ENTIRELY from the struts part of the site. Have the
authentication do its stuff and set up a session object which the rest of the site
looks at to validate the user - or makes use of/or whatever model you use.
The reason is that login is often something
Hi Ted,
I was implementing this and noticed a problem in V1.0.1
1. Struts config is as below
2. The code for AdminSessionViewSrchAction does the following:
AdminSessionViewForm form_obj =
sess_bean.maintainStrutSearchAdminSessionViewForm(params);
re
Hi Stephen,
Download my struts example, it includes paged searches implemented in stateless
session beans - actually pretend stateless session beans, so you don't need an app
server.
http://www.faraway.co.uk/tallsoft/lowroad/
click on downloads, agree, examples, example 2
Jonathan
---
My guess is that there is proxy caching going on someplace. Setting the
HttpServletResponse header fields should do it, not sure if there is a tag, but its
easy enough to do in the JSP itself
<%
response.addHeader("Pragma","no-cache");
response.addHeader("Cache-Control","no-cache");
%>
Jonat
5. The code in FindClientResultsAction examines the contents of the
clientFindForm and contstructs a SQL statement to retrieve the correct data.
6. /pages/findClientResults.jsp renders the results from the database.
Matt.
-Original Message-
From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]]
I made this same 'mistake'.
Actions MUST only be called when a form is submitted. Never to generate the JSP.
Thats why they are called actions.
Or two put it another way, you do need several URL's
a) URL to JSP on a GET
b) URL to action the POST
The easiert way to do it is to have all for
Hi,
I can't remember where I read this, but it was in the struts docn or code someplace.
You struts config has something like:
OK, so when you browse to
/jsp/adminsrch.jsp
Struts knows that the form bean associated with this page will be called a
Hi,
The problem with too many tags is one of maintenance. Each tag you write becomes part
of your bespoke project 'language'. With large groups producing many tens or hundreds
of tags it can become a nightmare for new staff. Far better to stick to the core
tags, and struggle not to add ma
Matt,
nicely said. Pretty much what I feel, but could not describe. I guess it comes down
to:
ITS TOO EARLY.
i.e use it for prototypes and dept projects. Don't start designing customer web sites
with it until you have sorted out tools, maintenance, evolving xslt/xml specs and so
on.
Jon
Hi,
one thing I'm doing today is:
a) Add formatting strings to the resource bundles
b) Adding util classes which can apply the formatting, either in form object
getter/setter or wherever.
Step b could be done in one of your own tag libs, but I can't be bothered to do that.
This means I can sp
to think of Java as doing
"pass-reference-by-value" when objects are involved.
Now I notice that the original message was posted to the J2EE mailing list
too. Perhaps I should have left it to those folks to address. After all,
we already receive a plethora of messages from this list
Java doesn't have pointers! Just mudying the waters, or was it serious? If so sorry.
Think of it as chucking water over someone, as opposed to passing them a cup of water.
Thats pretty similar.
or, um, having someone talk to you, rather than pass you a piece of paper. hmmm.
J,
--
There are loads of them, for example the LowRoad
http://www.faraway.co.uk/tallosft/lowroad/
But its a little heavy if all you want is get and set. Others may suggest XDoclet,
I'd suggest you simply write your own. It will take you all of 5 or 10 minutes.
Jonathan
Hi,
I also think you are worrying about the wrong critical path. The first thing is the
number of users. Is up to 200 or is it up to 2000. With up to 200 there is no real
issue. Even with a single box holding the DB and webserver your app will be fine -
eg Athlon 2GHz, 512 mem. You c
bubble to the top. But that solution
won't always show up in the next JDK. And even if it does, that doesn't mean
that it then becomes the _only_ solution for the entire community. Choice is
a "good thing".
Best regards,
Jim Cakalic
> -Original Message-
> Fr
ing List'" <[EMAIL PROTECTED]>
cc:
Subject: RE: RES: handling exceptions
That's all very good (and I especially like the inclusion of the RegExp
class in 1.4) but when will we have servlet and app containers that can
support with 1.4?
Mark
-Original Message-
From: Jon
Yes it does!
Stick it in WEB-INF/libs/classes12.jar.
That works just fine.
Jonathan
===
Want to generate heaps of code? Visit:
http://www.faraway.co.uk/tallsoft/lowroad/
Message History
I have used a combination of ip_address and jsessionid which I store in an
active_session table.
Every action they do I check the table - if the ip address changes (ie someone has
nicked the session id) then I ditch the record and make em log in again.
If the same user logs in again from same
Hi,
JDK1.4 is at final release candidate stage. They include nested exceptions
(including all remote exceptions) and a logging framework.
Use these, and not any other version (eg log4j), you will be future proofing your CV
and code.
Jonathan
===
For EJB and Struts code gener
24 matches
Mail list logo