Ant is the key to solving this problem. Unfortunately I don't have the
gift of being able to elegantly summarize the solution for you, but I
will tell you that I rely on Ant to solve this problem for me, and it
works! The key is to have multiple property file sets, and work out a
way to
Struts Plug-In is useful any time you have a resource that needs to be
initialized with the web application. In the past you would have needed
to extend the ActionServlet and override init(), now you declare a
plug-in in your struts-config.xml
Troy
Mohan Radhakrishnan wrote:
Hi
I am
Mark,
Still another approach is to use JMS and process the command
asynchronously. This approach would not preclude you from using any of
the tricks others have mentioned that keep the user occupied while the
work is being done, but at the same time it would give you other
options. Asside
On Tue, 2002-11-26 at 02:28, Affan Qureshi wrote:
I want to forward the request from my Action to another action which expects an
ActionForm instance for processing. But my current Action does not have access to
that Form. Can I instantiate an ActionForm and store it in the request/session
You can use the same database for CMA and user profile storage, if your
container supports JAAS authentication. All you need to do is write a
LoginModule (see JAAS docs on sun's site) that accesses the user profile
database. When your LoginModule is accessed to login a user it will need
to create
They teach patterns at the University of Utah. In our advanced software
engineering course we touched on patterns and anti-patterns.
On Mon, 2002-10-14 at 13:33, Chappell, Simon P wrote:
I have no idea whether they teach patterns in University. I graduated in 1990 and we
didn't even have the
did a
*beautiful* job of rendering it though!
Regards,
Eddie
Troy Hart wrote:
I recognize this doesn't solve your problem with html conversions, but I
thought I would throw this out there for those that may not know. There
are no shortage of products available on both linux and windows
You can look at html:rewrite/, but you will probably have the same
nested tag problem (?). Alternatively, you can use the following
scriptlet:
% String url = request.getContextPath() + relativeURL %
Then pass your url String around as needed. NOTE: you may need to do
something additional to
class using standard api's. I am starting to believe
that this would not be a struts api, but rather a servlet configuration
api of some sort.
Any help appreciated.
Andreas
-Original Message-
From: Troy Hart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 15:53
You can solve this problem by providing a business service framework for
your application (There has been a lot of talk about this sort of thing
on this list...I can't think of a particular thread to reference for you
so you may just want to go through the archives). My approach to this
problem
not satisfied than x+y requests with
30% satisfaction. If you understand what I mean?
Your help or advice will be appreciated.
Frederic
I've excluded EJB for my project because most of the data is read only or
linked to one user only.
-Original Message-
From: Troy Hart [mailto
IMHO the value of the struts framework has more to do with providing a
set of actions that invoke business processes in the request/response
(ie servlet) paradigm. One of the cool features that struts provides in
this endeavor is an automatic mapping of the request parameters into
forms that can
On Thu, 2002-08-29 at 12:28, Troy Hart wrote:
IMHO the value of the struts framework has more to do with providing a
set of actions that invoke business processes in the request/response
(ie servlet) paradigm.
To clarify, I DO NOT mean to imply that the business processes know
anything about
On Wed, 2002-08-21 at 21:31, Craig R. McClanahan wrote:
On Wed, 21 Aug 2002, Max Cooper wrote:
Date: Wed, 21 Aug 2002 13:07:47 -0700
From: Max Cooper [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED],
Hello,
Sorry for this off topic post, put I am trying to put the final pieces
together that will enable me to write a portable struts application that
uses CMA, or maybe a security filter (maybe Max's or something similar).
I have a couple of questions about assigning Principals in my custom
Max,
Have you considered using JAAS for authentication? Why or why not?
Thanks,
Troy
On Wed, 2002-08-21 at 14:13, Max Cooper wrote:
Elderclei,
Todd mentioned my SecurityFilter project as a possible alternative for you,
and I enourage you to try it. Not having access to the server
On Thu, 2002-08-15 at 12:37, Chandra Sekharan Bhaskaran wrote:
I have submit button in the iterate tag
I need to pass the parameter bean:write name=companionInfo
property=companionArticleNumber /,this)
to deletescript and it gives me parsing error.
any one had worked on this pls let me know
Why not have both?
public Iterator getIterator() {
return this.iterator();
}
Troy
On Wed, 2002-08-14 at 11:24, David Marine wrote:
The convention of naming the method to access a collection's iterator
iterator instead of the Bean compliant getIterator is one set by Sun
itself. It is
This topic has been discussed quite a bit on this list. I think the
consensus is that you should really use container managed authentication
(cma). You should search through the archives for discussions on the
topic. According to some you would be crazy (or maybe even stupid) to do
it any other
I can think a one technique that would give you what you are looking
for. Use an action mapping that both your global forward and your local
forward refer to. Take the following struts-config for example:
global-forwards
forward name=login
path=/login.do/
/globa-forwards
I tend to think the action is the wrong place for this sort of thing. I
could be wrong but that's just how it occurs to me. It seems that this
should either be handled in front of your web application (using
cma/filters) or by the front controller components in the struts
framework (NOTE:
I don't think it is that much work to put an action in front of every
jsp page that represents page in your application. I actually think it
is a very good abstraction. A couple of the advantages I can think of
right now include:
1) It gives your web-app a stable interface and simultaneously
I haven't used tiles yet so I am in unfamiliar territory here, but I
think you are not precluded from subclassing the request processor when
you adopt them. I have noticed that there is a base RequestProcessor
that must be used with tiles applications but it would seem that you
could extend it,
You could extend the request processor if you are using 1.1 or the
ActionServlet otherwise. Every request is handled by these front
controllers and therefore they provide a good place to put logic that
pertains to all your actions. To answer your last question, look at the
process() method of the
Craig,
What do you mean below??? I am trying to understand how sub-applications
work and I thought I had a handle on it, but I am now confused. Why/how
are you bypassing the controller servlet when using
html:link forward=foo/
Can you tell me where my understanding of the this process breaks
Is there way to tell the template tag libs to treat URIs as context
relative?
I am working on a large struts application that has been split into
multiple sub-apps. We are using the template tag libs and I would like
to be able to share some of the templates/content across all the
sub-apps.
Never mind, I figured it out. It turns out the the template:insert and
template:put tags do not prefix the sub-app name to the given URI
(which is a relief). I had a problem in my struts-config that made it
look like this was happening.
Thanks,
Troy
On Wed, 2002-07-17 at 15:50, Troy Hart wrote
Does anyone have any information on the status of the SwitchAction. It
simply doesn't work as far as I can tell...
I've read all the emails on this list that talk about it, and I've
looked at the source. I've also previously posted a message on the topic
but no one has responded...
Has anyone
I have recently started using the new sub-application feature of
struts-1.1 and I think it is an excellent addition. However, the
standard SwitchAction does not seem to work as advertised. I am
currently able to work around this issue by defining global forwards
(with the contextRelative
Ted, your response caught my attention. I haven't noticed problems, but
I also haven't got down to serious debugging so maybe I just haven't
noticed it yet... Anyway, are you supposed to call setServlet() whey you
instantiate a Form yourself and put it on the session (say from within
some
storck writes:
Could someone HELP me with my previously posted messages
Its urgent!
I guess this is the previous message of which you speak...
storck writes:
Hi,
How can I acces the index of a iterator-tag within a logic-tag ?
logic:iterate id=bean name=formBean property=list
John, your solution is similar to how most people would do it, but it
wouldn't be client side sorting. The only way you are going to do client
side sorting would be to use javascript or an applet... Personally, I
wouldn't recomend client side sorting.
Raj, are you sure you want to do this on
I do exactly this, and it works great!
Rahim Lalani writes:
Hi,
I would like to hide all of my jsp pages under the WEB-INF directory so that
I can place all of my security in my actions. However, I would also like to
use the Struts Template taglib such that my ActionForwards return
You'd have the same problems if you used request scope. What you need to do
is reset your form after the acton has successfully processed it.
Troy
On Tuesday 04 September 2001 04:02 am, you wrote:
As much as I know, if you redisplay your form, and you use session for
your scope, it will show
That is true or false based on whether or not the attribute can accept a run
time expression. That is, in the jsp can you do the following or not:
prefix:someTag someAttribute=%= myRuntimeExpression % ... /
On Monday 03 September 2001 05:01 pm, you wrote:
In the .tld files, every attribute
Has anyone ever used a collection within a collection???
On Monday 03 September 2001 10:59 am, Troy wrote:
Is there a convenient way to work with the iterate tag, using the indexed
attribute, and data structures that are doubly nested?
I have a search form with a dynamic set of search
Instead of trying to add a parameter to the forward, it sounds like you would
be better served to simply add a request attribute to specify the formName.
In your action class you do this:
request.setAttribute(formName, action);
Then on your jsp page:
html:hidden name=formName /
That should
Beans that were in the request when the page was rendered are long gone when
you submit a new request from that page. Therefore, you must re-create them
and put them back in the request if the validation fails. Many people forego
validation in the form and do it in the action instead to
look at html:link forward=someGlobalForward
Troy
On Wednesday 29 August 2001 04:24 am, you wrote:
Hi,
Is there any way to obtain the action forward urls in jsps using their
logical 'struts-config' name? I'd like to code links etc point to certain
action forward urls found in struts config
I could be wrong but I can't think of anything that would be very convenient.
The only way I could imagine doing it (and I'm not sure it would even work)
would be to invoke a javascript function every time the page loads. You could
add a bean with the data needed by the javascript to the
On Thursday 16 August 2001 01:55 pm, you wrote:
I could be wrong but I can't think of anything that would be very
convenient. The only way I could imagine doing it (and I'm not sure it
would even work) would be to invoke a javascript function every time the
page loads. You could add a bean
ENOUGH ALREADY!!!
On Friday 14 July 2000 12:59 am, you wrote:
Hi everybody
is there any book where i can find strut related material???
praveen
I'm not sure, but I would guess Business Model Objects.
On Tuesday 14 August 2001 02:21 am, you wrote:
Hi i didn't get a response or a suggestion regarding BMO (Session Beans
) Thus i would like to know what this acronym stands for . I have come
across a UML class diagram that connects a BMO
Thanks, sorry for being snippy.
On Tuesday 14 August 2001 09:01 am, you wrote:
The server is doing that, not the messenger. I had that happen to one of
my previous messages also...
Troy Hart
[EMAIL PROTECTED]To:
[EMAIL PROTECTED
There is no way to approach this problem as you currently are. You should be
able to achieve the same effect however, but you will need to restructure
your approach. Not knowing the details of you situation I would advise you to
think in terms of having an action initialize your action form
title,
and the other with the content as well as possibly other things separated?
Erik
- Original Message -
From: troy hart [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 01, 2001 9:25 AM
Subject: Re: Templates: a design question
The approach I use (and I
The approach I use (and I believe it is a common approach) is to have two
jsp pages for each page on my site that is going to use templates. For
example, if I have an ecommerce site it is likely I will have a shopping
cart page, a search page and a search results pages... For this example, the
You seem to have action element a little messed up... try the following
(notice the change to path and the addition of name):
action-mappings
action
path=/tklsDaily
name=genTklsDailyForm
type=com.blah.TicketlessDailyReportFormAction
unknown=false
forward
actually, my reply was a little hasty...on a closer look I'm little confused
at what you want...but here's my best guess.
If you really want to invoke the action associated with
genTklsDailyForm.do then the action of your form must not be
action=tklsDaily.do, but rather
This would be entirely up to you... Depending upon the nature of the two
actions one choice may be preferable to the other.
If you wanted to have one action class you would need to check the request
to see which button was pressed. There would be a number of ways to do this
but the most straight
Try JBuilder, it has a bean wizard tool. Also, I don't know for sure but I'd
imagine most of the top tier java IDEs (like Forte or NetBeans or VisualAge
for Java...) would have similar features...
Troy
- Original Message -
From: Marc-andre Thibodeau [EMAIL PROTECTED]
To: struts [EMAIL
I have a situation in which I need to forward to a
certain place with a form (i.e. I need to reference an anchor in my href...). I
can code my action class to determine what the anchor needs to be, but I'm at a
loss for how I would get the ActionForward to include the anchor...
I could
To the best of knowledge, you can't use the
bean:write tag that way. I believe it would be:
html:link page="/target.cm" paramId="value"
paramName="%= myCollectionElement.getId() %"click
here/html:link
Hope this helps...
- Original Message -
From:
Rama
Krishna
To:
this.
is there anyother way???
- Original Message -
From:
troy hart
To: [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 1:08
PM
Subject: Re: html:link problem
To the best of knowledge, you can't use the
bean:write tag that way. I believe it would
html:link
- Original Message -
From:
Rama
Krishna
To: [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 2:40
PM
Subject: Re: html:link problem
cause it assumes myCollectionElement as a
normal java Object and says no method getId() in java.lang.Object
e"
html:link page="/target.cm" paramId="value"
paramName="%= myCollectionElement.getId() %"click
here/html:link
This way your referece to myCollectionElement will
be of the correct type, so getId() will be valid...
Hope this helps,
Troy
- Original Message
I know there has been talk around this subject, if it hasn't been addressed
directly, but I can't seem to find the answer that will work.
My problem:
I have a bean (instance of an ActionForm), lets call it OrderForm. It has an
ArrayList of LineItem objects, and each LineItem contains ArrayList
You could do the following in, say, one of your action classes to remove a
session scoped bean called foo
request.getSession().removeAttribute(foo);
- Original Message -
From: Gangadharappa, Kiran [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 5:52 PM
Subject: RE:
You could implement your class as a singleton.
-Original Message-
From: Young, Wayne [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 11:10 AM
To: Struts-User@Jakarta. Apache. Org (E-mail)
Subject: servlet context attribute?
I've seen references on this list about storing an
It's easier than that even. Your action class subclasses
org.apache.struts.action.Action which defines a protected instance of the
ActionServlet (servlet). So all you need to do from your action class is:
servlet.getServlerContext()...
Troy
-Original Message-
From: Nanduri, Amarnath
The controller servlet (ActionServlet) is responsible for identifying the
action form and populating it with data from the request, before calling the
perform() method on your actioin class. So you are correct that the code
from EditRegistrationAction will never execute (why is it there then???).
This doesn't work. In the case you show below, the title ends up being:
"b bean:message key="publish.title" / /b"
Troy
Luckly someone answered this last week:
template:put name="title" direct="true"
b bean:message key="publish.title
I am using struts-template.tld and I want to be able to use my application
resources to get the correct title for any given page. I thought I had seen
this talked about somewhere but I can't find it anyplace in the mail
archives. I'm sure people that use struts templates must be doing this, but
the biggest thing for me is that you limit the potential layout bugs, and
you make it possible to change the layout, site wide, with the editing of a
single file. The alternative (just using jsp:include.../) forces you to
replicate the layout framework (typically this includes a set of nested
I have been prototyping an app using struts on my windows workstation for a
week now and have never had a problem.
Troy
-Original Message-
From: JOEL VOGT [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 17, 2001 4:48 AM
To: [EMAIL PROTECTED]
Subject: Re: Please Help
Okay,
After
The template custom actions (including "insert", "put", and "get") are
absolutely distinct from the JSP "include" action. I would recommend that
you review the code for the struts-template web application that comes with
struts1.0 beta 1. In a nutshell, the template allows you to define a single
check orion out... (http://www.orionserver.com/)
-Original Message-
From: James Howe [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 3:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Performance of struts
If Tomcat's performance is pretty awful, what are some JSP implementations
map *.js such that the JspServlet processes it,
but this seems arbitrarily complex.
Troy
-Original Message-
From: Martijn Spronk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 10:13 AM
To: Troy Hart
Subject: RE: dynamically constructing non-jsp pages
I assume one way should
Try turbine: http://jakarta.apache.org/turbine/.
-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 11:54 AM
To: Troy Hart
Subject: Alternative Frameworks
Does anyone know of some good JSP/Servlet MVC Frameworks besides Struts?
69 matches
Mail list logo