Hi,
I see three options:
a) make the config-bean a singleton: easy to access from everywhere in the JVM
b) put the config-bean into the servlet-context: makes it easy to access it
within the webapp, but somehow you need access to request or servlet-context
c) create a lookup-bean
Hi,
spawn of a thread doing the work. Then forward to a page containing the
please wait-message and a refresh-tag (making the browser do another
request, say every 15 seconds...). In the then called Action check for the
state of the background thread and forward either to the result- or
the
Hi,
the 100% pure Strust way could to write a index-page that automatically passes
control (redirect-meta-tag) to an action, which could call the model to
populate the collection, stuff it into the request and forward control to
a suitable jsp-page. If you supply a link to start the app from
I prefer to have 3 standard packages below the business-level and
if necessary more levels below...
com.business.control (- her go the actions, and servlets (if needed))
com.business.view(- all view-related stuff)
com.business.view.taglib
com.business.model (- model-related stuff)
just
in the ActionServlet's init() method this problem may be
fixed? i.e.
public void init()
{
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader(
));
log = LogFactory.getLog(this.getClass());
...
}
-ronel
-Original Message-
From: Jesse Alexander (KADA
Hi,
i did an attempt to define a WizardActionForm base-class that contains a special
automatic reset-method. The extending Form-class has to deliver a hashmap containing
all reset-values (name=property, value=reset-value). On the form-page a hidden-field
enumerates the properties contained the
Hi,
having done some classloading lately... I would say it is a standard issue
with J2EE-compatible servlet-engines.
It depends where you have the struts- and logging-jars. If they are in
one of the parent-classloader-paths then they cannot load the classes
from WEB-INF/lib (and classes) as
The error- and message-tags that have been introduced with David Winterfeldt's
validation package allow to do this quite easily.
I use them with Struts 1.0 (+ the matching validator-jar) and they perform
perfectly.
If you can use the nightly build or the Struts 1.1 beta the validator should be
Hi,
realizing its own defects is the first step for bettering oneself...
Do not assume that those who give smart answers always were that smart.
Others also started with questions like yours and then have grown up...
So just be happy it works now.
regards
Alexander
-Original Message-
not necessarily. make sure that you have your applications classes and struts
available within one class-loader. Either use the web-application classloader
(WEB-INF/lib, WEB-INF/classes and maybe other dirs configurable) or use
the system-classloader (eg. under wls, jrun) or the shared
,
Konstantina
- Original Message -
From: Jesse Alexander (KADA 12) [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, March 14, 2002 9:30 AM
Subject: RE: Downloading files
Hi,
write an action for the download. This can be a generic action within your
app
Hi,
write an action for the download. This can be a generic action within your app taking
the filename as a parameter.
In this action:
- grab request.out(standard servlet-programming)
- set the correct mime-type(standard servlet-programming)
- read the file(standard
dead on correct.
That's why we decided to write the configuration file in xml,
using include (external entities that get included in the complete
xml-stream) and a DTD (to check the format). Then we read it in
a framework-component and offer it to our app-programmers as
properties using the
Hi,
even though I do not use EJB's:
Ted's scaffolding page says that the Action is the place where this translation
(from Action-Form to backend-compatible) should take place (and vice-versa when
returning values).
I think that is the best place.
Alexander
-Original Message-
From:
Hi,
Struts is a server-based application-environment...
The functionality you describe is client-side...
So the only option is to use Javascript to get this dynamic behaviour.
This is live at the html-web-application programming side of live.
Without Javascript the only way you can do
For quite some time we tried to rely on JB's features, but lately
we enjoy ANT much more. Using the AntRunner plug-in it works
very nice from within JB. With ANT building the war is easier...
hth
Alexander
-Original Message-
From: Steve [mailto:[EMAIL PROTECTED]]
Sent: Montag, 11. März
Hi,
truth spoken here
It should not be on the recommended page tough...
It should be required reading before asking any further questions
(eg in the mailing list).
Alexander
-Original Message-
From: keithBacon [mailto:[EMAIL PROTECTED]]
Sent: Montag, 4. März 2002 14:12
To: Struts
Hi,
theoretically you would have to put the struts.jar into the
---default_context_dir---/WEB-INF/lib and then it should work.
There are messages in the mailing-list archive that show how
using Thread.currentThread().getContextClassLoader() instead
of Class.forName() will allow you to put
I'd suggest writing a helper to solve this. The helper would be built with plug-in
realm-specific classes. To make it easier to get access it from a model-class you
could
design it as a singleton, if you want to access it only form an action, store it in
the servlet-context (==
Are you on a servlet-spec 2.3 engine?
Then you could use a filter that gets executed before struts gets the request.
Of course the mapping would be available as URL, but Struts being opensource
lets you copy that part of the code...
hth
Alexnader Jesse
-Original Message-
From: Mike
About tying two pages and one action-handler together:
You can do it this way:
Action_1 -(forward)- JSP_1 -(submit)- Action_2 -(forward)- Action_3
- Action_1 populates the form-beans for JSP_1
- JSP_1 displays the data
- Action_2 evaluates the user-input and processes it
- Action_3 populates
Or go the other direction: create a super-tag spitting out the
complete spreadsheet (special requirements call for special solutions)
hth
Alexander
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Montag, 11. Februar 2002 19:28
To: [EMAIL PROTECTED]
Subject:
1. timestamp
If you use a Servlet 2.3 servlet-engine you could device a simple filter and scan for
url's. Not really clean, but should be working.
2. screens (events)
3. preprocessor
I usually use one action per form. There is an attribute (parameter) in the
action-mapping
How sure can you be that tomorrow will not lead to a request for a third,
fourth,... UI ???
OK XP means code as little as possible too early... but if you have two UI's
you should cater for the third, because the second already calls for the
isolation-layer.
just my 2cents
Alexander Jesse
Hi,
I usually do these transformations within the Action. Translating the
content of the form-beans into ValueObjects that are passed into
the model-backend which contains the business-logic. The same on
the way back (Backend generates value-objects, Action transforms into
view-model-classes
1 : no
2 : no
Struts allows to forward from an action to another action!!!
(should be documented in the mailing-list-archive and the dtd,...)
This way each page is a single problem (action to init, display,
action to evaluate). Struts-config.xml will tie them together.
Whether you use 1 or 2
1 actionform per page
except for wizards: 1 actionform per suite of pages that make up the wizard
There is doc around showing how to deal with Davids validation and wizards.
hth
Alexander Jesse
-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 21. Februar
Hi,
sounds good...
Chapter 1 + 2: hopefully short, as they appear in (almost) every Java-server-related
book
keep them to what Struts does differently
Chapter 8: Is this an introduction into using a taglib (then make it short) or an intro
into writing a taglib (does
Hi,
with a servlet 2.3 engine (like Tomcat 4,...) you could write a filter checking
for this and then either let the user proceed (if logged on) or reroute to
a login-page (if not).
regards
Alexander
-Original Message-
From: Antony Stace [mailto:[EMAIL PROTECTED]]
Sent: Monday, January
Hi
session.invalidate() comes to mind...
another way would be to persist the information so far entered (under some
artificial key) and use a cookie to reget that key from the user's browser
as soon as he comes back. With this you can let the session expire and still
have the information
Hi,
one way might be to use an apache as the webserver (and use its
capabilities to run CGI) and then attach a Tomcat for Java-Servlets.
Should you choose EJB's for the backend: add JBoss to the chain...
hope this helps
Alexander
-Original Message-
From: Thorbjørn Ravn Andersen
Well you sure loose all the uncommitted data (== data the user enters on his screen
without posting it to the server).
Offer the user to store the data with the promise that he can review it before
finally committing it...
hth
Alexander
-Original Message-
From: Craig Tataryn
?
Thanks in advance.
Arpit
-Original Message-
From: Jesse Alexander (KADA 12) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 11:38 AM
To: 'Struts Users Mailing List'
Subject: RE: Forwarding to a jsp in different war file
Hi,
a war is a web-application.
The servlet-engines
Hi,
a war is a web-application.
The servlet-engines consider different web-applications as if they were on different
servers. That's why the ONLY way to get from webapp_1 to webapp_2 is redirect.
hope this helps
Alexander
-Original Message-
From: Chokshi, Arpit (CAP, GEFA)
Hi,
I think EJB's should handle the business logic part of the app and a standard
web-application the front-end.
That said code the businnes-logic as if it were running without knowing what
frontend could be using it. This results in a (front-end view) black box that
does something. To scale up
Even though it might look cool to do abbreviations ...
sooneer or later you will hate you for the moment you took them...
- do it the clean way (using the action)
just my 2cents
Alexander
-Original Message-
From: Hai Hoang [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 16. Januar 2002 16:17
HI,
when you generate teh response (in your case the FDF) you do
not forward to a jsp-file! Just return null in your perform()-
method. The actionservlet will then end the processing and the
client gets your FDF...
hope this helps
Alexander
-Original Message-
From: [EMAIL PROTECTED]
37 matches
Mail list logo