Those types of plugins dont' exist in Struts 2, since today it is just
as easy to use a conventional listener or filter to initialize stuff.
For example, the updated S2 MailReader application uses a listener to
load its database from an XML file.
-Ted.
On 10/17/06, Juan Espinosa [EMAIL
Hi,
First of all you need to create a class which implements
org.apache.struts.action.PlugIn.
Then you need to override method init(ActionServlet servlet, ModuleConfig
modConfig) and do your own initializations.
Finally you have to configure this class under struts-config.xml using
plugin tag as
: Martes, 17 de Octubre de 2006 09:19 a.m.
Para: Struts Users Mailing List
Asunto: Re: Plugin
Those types of plugins dont' exist in Struts 2, since today it is just as
easy to use a conventional listener or filter to initialize stuff.
For example, the updated S2 MailReader application uses a listener
: Thursday, January 27, 2005 11:17 PM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
David,
Also, as I said early the Axis architecture is such that it does not
provide any of the information related to the HTTP layer beneath SOAP.
The only think you know is that your dispatcher
snip
On Fri, 28 Jan 2005 08:02:46 -0600, David Suarez
[EMAIL PROTECTED] wrote:
Just the same, it's
likely not a problem for your server to figure out where the request
came from if that is needed for the protocol (the receiver of the
initial message). It's the callback that you have a problem
snip
On Fri, 28 Jan 2005 08:02:46 -0600, David Suarez
[EMAIL PROTECTED] wrote:
I think the answer here would be configuration is the only way in the
scenario above. The question is, do you really need the call backs for
what you're really doing? In the licensing example above, you likely
Kishore,
This turns out to be the exact solution that I require. I just extended
AxisServlet and scrape off the requestURL which is the URL that was used
to reach the WS. That did the trick.
offTopic
And again, this illustrates what I consider a flaw in the Axis
implementation. If you look
On Fri, 28 Jan 2005 08:21:40 -0800, Dakota Jack [EMAIL PROTECTED] wrote:
I am not sure at this point David S. what you have tried, but I can
assure you that your conclusion that configuration is the only way in
this scenario above is incorrect, because I do this all the time with
no
While I absolutely acknowledge the cleverness of this solution, it's not one I
would personally employ. Making a server application dependent on another
server for startup configuration strikes me as quite a hack (albeit a clever
one!)
It in fact does make sense to assume that a web service
Lo, Eddie,
See infra:
snip
How many different host/port combinations are the applications you use
this strategy in deployed to?
/snip
Thousands.
snip
In the environment I live, apps deploy on multiple servers (always
2+ for high availability), and are likely to be accessed by a
different
snip
On Fri, 28 Jan 2005 09:03:07 -0800 (PST), [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
While I absolutely acknowledge the cleverness of this solution, it's not one
I would personally employ. Making a server application dependent on another
server for startup configuration strikes me as
snip
On Fri, 28 Jan 2005 11:15:35 -0600, Eddie Bush [EMAIL PROTECTED] wrote:
See Frank's post on the web service. He expressed it more eloquently
than I did.
/snip
But, Frank and I are in agreement. If you are not talking about the
Web, then you are saying that the solution is not a solution
Just so everyone is knowingly on the same page, the basics are at
http://webserver.cpg.com/ws/3.4/.
Jack
--
--
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~
You can't wake a person who is pretending to be asleep.
~Native
-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Friday, January 28, 2005 9:49 AM
To: Struts Users Mailing List
Cc: Martin Wegner
Subject: Re: PlugIn and the base URL
snip
On Fri, 28 Jan 2005 08:02:46 -0600, David Suarez
[EMAIL PROTECTED] wrote:
Just the same, it's
likely not a problem for your
:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 1:06 AM
To: Struts Users Mailing List
Subject: Re: PlugIn and the base URL
On Wed, 26 Jan 2005 13:32:50 -0500, David G. Friedman
[EMAIL PROTECTED] wrote:
A Devil's Advocate says:
I agree with the theory that the webapp Context name within
Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 11:51 PM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn and the base URL
Thanks to everybody who contributed to this topic. There appears to be
no
foolproof solution to the particular problem that I have. I think I
: David Suarez
Sent: Thursday, January 27, 2005 8:12 AM
To: 'Martin Wegner'; Struts Users Mailing List; Dakota Jack
Subject: RE: PlugIn and the base URL
The light came on when the ip address is sufficient came up. I had
context paths and ports in my head. If that's all you need, look
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 11:51 PM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn and the base URL
Thanks to everybody who contributed to this topic. There appears to be
no
foolproof solution to the particular problem that I have. I think
Martin Wegner wrote:
In have a Struts PlugIn that needs to determine the
URL for the containing web application
(http://localhost:8080/BlahBlahBlah/).
Martin, since you seem firm on this issue, can we/I ask WHY you need this
information in your webapp during initialization? What are you doing
David,
I do not mean to speak for Martin, but my guess is that he might want
to send SOAP prior to a request. He might even have to send and to
receive SOAP prior to a request.I know that this is why I often need
to do this sort of thing.
Jack
On Thu, 27 Jan 2005 18:50:08 -0500, David G.
I think it is important to remember that the URL is a detail that is
wholly independent of the application or the machine. This is an
external device for the benefit of human beings whom do not do as well
with numbers as with letters in the memonic department. Therefore, I
don't think that this
David,
As I said in a previous message my Struts app has an Axis-based SOAP
service. The business logic behind the WS needs to know a/the URL that
can be used to access the WS. This is a requirement of the WS. This part
can't be changed. It is part of the protocol of the answer sent back by
David,
Also, as I said early the Axis architecture is such that it does not
provide any of the information related to the HTTP layer beneath SOAP.
The only think you know is that your dispatcher gets called. So my
problem may be considered a limitation in Axis.
--Marty
Martin, since you
On Thu, 27 Jan 2005 21:17:07 -0800 (PST), Martin Wegner
[EMAIL PROTECTED] wrote:
David,
Also, as I said early the Axis architecture is such that it does not
provide any of the information related to the HTTP layer beneath SOAP.
The only think you know is that your dispatcher gets called. So
:
-- Forwarded message --
From: Dakota Jack [EMAIL PROTECTED]
Date: Thu, 27 Jan 2005 22:24:00 -0800
Subject: Re: PlugIn and the base URL
To: Martin Wegner [EMAIL PROTECTED]
snip
On Thu, 27 Jan 2005 21:25:11 -0800 (PST), Martin Wegner
[EMAIL PROTECTED] wrote:
Jack,
How do you have
snip
On Thu, 27 Jan 2005 22:46:20 -0800 (PST), Martin Wegner
[EMAIL PROTECTED] wrote:
Jack,
Your solution would work. But I don't have the ability to deploy a
foreign machine to do the echo.
Someone just wrote in about a Struts filter on /axis/ which may actually
do the trick. I need to
dave-thomas-voicewhy does it have to be a plugin?/dave-thomas-voice
On Tue, 25 Jan 2005 22:18:20 -0800 (PST), Martin Wegner
[EMAIL PROTECTED] wrote:
I am looking for the:
http://blahblahblah.com:8080/AppName/
As Craig said I can get that if I have a Request object. But from a
?)
Just a thought...djsuarez
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 12:18 AM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn and the base URL
I am looking for the:
http://blahblahblah.com:8080/AppName
I need to find the URL of my web app at start up. I need it as soon as
possible in the boot process. So Listerners and Plug Ins are the only two
ways I know of that allow me to hook into the startup of the app. Is
there another mechanism available?
--Marty
--- Larry Meadors [EMAIL
to populate on the first request? A base action that lazy loads
your config stuff?)
Just a thought...djsuarez
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 12:18 AM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn
Subject: Re: PlugIn and the base URL
I am looking for the:
http://blahblahblah.com:8080/AppName/
As Craig said I can get that if I have a Request object. But from a
PlugIn I don't have that. I can think of some ugly hacks but nothing
clean.
--Marty
--- Dakota Jack
]
To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, January 26, 2005 3:12 PM
Subject: RE: PlugIn and the base URL
David,
My Struts app contains an Axis-based SOAP service. The Struts app
initializes the call dispatcher for the SOAP service. This dispatcher
needs to know the URL
26, 2005 3:12 PM
Subject: RE: PlugIn and the base URL
David,
My Struts app contains an Axis-based SOAP service. The Struts app
initializes the call dispatcher for the SOAP service. This dispatcher
needs to know the URL of itself. This is a requirement of the
semantics
of the SOAP
://blahblahblah.com:8080/AppName//
/plug-in
Niall
- Original Message -
From: Martin Wegner [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, January 26, 2005 3:12 PM
Subject: RE: PlugIn and the base URL
David,
My Struts app contains an Axis-based
in config as someone else mentioned?
Regards...djsuarez
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 9:12 AM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
David,
My Struts app contains an Axis-based SOAP service
My Struts app contains an Axis-based SOAP service. The Struts app
initializes the call dispatcher for the SOAP service. This dispatcher
needs to know the URL of itself. This is a requirement of the semantics
of the SOAP service (outside of my control). So a Listener or a Plug In
appear to
Message -
From: Martin Wegner [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, January 26, 2005 3:27 PM
Subject: Re: PlugIn and the base URL
Niall,
That would. Except it would require our customer to copy the WAR file to
the webapps directory, start
Cedric,
No doubt it is confusing. I admit it is an odd requirement.
The WS response has to contain the URL that was used to access the WS.
This is a requirement of the XML Schema that defines the WS response
payload. I have no control over this.
So when the WS call comes in the Axis-based
The WS response has to contain the URL that was used to
access the WS.
This is a requirement of the XML Schema that defines the WS response
payload. I have no control over this.
I know this might be stupid, but whenever I see an odd requirement like this my
first experiment is to see
Agreed. That approach works more often than not. Except in this case.
The client of the WS does indeed use the URL that is sent back. That is
part of the overal protocol. So it has to be a valid URL that reaches the
WS inside of my Struts app.
One could argue that the real problem is within
: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 12:53 PM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
Agreed. That approach works more often than not. Except in this case.
The client of the WS does indeed use the URL that is sent back
, January 26, 2005 10:33 AM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
A Devil's Advocate says:
I agree with the theory that the webapp Context name within the application
server /myapp should be available to the servlet but not the
host/port/etc. Why? Imagine you work
Mailing List'
Subject: RE: PlugIn and the base URL
Hey David, that is a great idea.
Let me build on it a bit...
When the .war file is deployed, the baseURL property will be blank.
When the application starts up, it will check this property. If the property
is blank, the app will be in 'inactive
) or fire off a
message to a licensing or billing server (for hosted apps, etc).
Wiebe de Jong
-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 10:33 AM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
)
thinking is going with this?
-David, having a 'bald' moment
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 2:13 PM
To: user@struts.apache.org
Subject: RE: PlugIn and the base URL
I would personally couple this with the thread idea I
a 'bald' moment
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 2:13 PM
To: user@struts.apache.org
Subject: RE: PlugIn and the base URL
I would personally couple this with the thread idea I mentioned earlier...
Spawn a thread
(for hosted apps, etc).
Wiebe de Jong
-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 10:33 AM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
A Devil's Advocate says:
I agree with the theory that the webapp
a 'bald' moment
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 2:13 PM
To: user@struts.apache.org
Subject: RE: PlugIn and the base URL
I would personally couple this with the thread idea I mentioned
earlier...
Spawn
.
Regards,
David
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 3:39 PM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
Yes, this is the scenario. The web container could change, the port
number could change and the WAR
,
David
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 3:39 PM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
Yes, this is the scenario. The web container could change, the port
number could change and the WAR filename could
?
Regards,
David, happy at finding a conditional answer that works on his one-tested
Java server.
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 3:57 PM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
David,
Right. I cannot
request? A base action that lazy loads
your config stuff?)
Just a thought...djsuarez
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 12:18 AM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn and the base URL
a thought...djsuarez
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 12:18 AM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn and the base URL
I am looking for the:
http://blahblahblah.com:8080
Even if you did need to know it, why not get it at the first request
and then cache it?
Jack
On Wed, 26 Jan 2005 16:59:17 +0100, Cedric Levieux
[EMAIL PROTECTED] wrote:
My Struts app contains an Axis-based SOAP service. The Struts app
initializes the call dispatcher for the SOAP service.
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 3:39 PM
To: Struts Users Mailing List
Subject: RE: PlugIn and the base URL
Yes, this is the scenario. The web container could change, the port
number could change and the WAR filename could change. So the PlugIn
needs
action that lazy loads
your config stuff?)
Just a thought...djsuarez
-Original Message-
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 12:18 AM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: PlugIn and the base URL
: Re: PlugIn and the base URL
I am looking for the:
http://blahblahblah.com:8080/AppName/
As Craig said I can get that if I have a Request object. But from
a
PlugIn I don't have that. I can think of some ugly hacks but
nothing
clean.
--Marty
On Wed, 26 Jan 2005 13:32:50 -0500, David G. Friedman
[EMAIL PROTECTED] wrote:
A Devil's Advocate says:
I agree with the theory that the webapp Context name within the application
server /myapp should be available to the servlet but not the
host/port/etc.
The assumption that a particular
I seem to remember trying to solve this problem myself and coming to the
conclusion that there was no way to do it independent of a request. I
wound up just sticking it in my application config file that gets read
in the plugin anyway. Can anyone prove me wrong? :)
--
Frank W. Zammetti
I'm not entirely sure, but I think Struts itself has some code that
goes through some length to get information like this. Could be in
the Struts ActionServlet object. I don't have time to check right
now, though.
On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
I
On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
I seem to remember trying to solve this problem myself and coming to the
conclusion that there was no way to do it independent of a request. I
wound up just sticking it in my application config file that gets read
The OP was looking for a way to construct the entire path. I too got as
far as ServletContext, but I'm not sure what in it would give you that,
or even all the pieces to constuct it... Maybe getAttribute()? I'm not
sure what it will return, although you can use getAttributeNames() to
see.
As far as I can tell the attributes offer no insight. I have yet to find
a way to get to the container from within a PlugIn. But I will keep
looking. Using an initParam is not an option in this application.
--Marty
--- Frank W. Zammetti [EMAIL PROTECTED] wrote:
The OP was looking for a
Not sure what you want. Does this help?
package whatever;
import java.io.File;
import java.net.URL;
public final class Classpath {
public static final String SLASH= File.separator;
public static final String HERE =
Classpath.class.getClassLoader().getResource(whatever +
That is actually useful, but I don't think it's what the OP was looking
for... I think he literally wants the complete URL to the current
webapp's root. That's what I was looking for way back when too.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
Jack,
That tells me where the JAR files are stored which is cool. But what I am
looking for a valid URL (of which there may be many) to access my given
web application. This info has to come from the container which may be
the problem. I don't see anything in the container standard which
On Tue, 25 Jan 2005 21:05:30 -0800 (PST), Martin Wegner
[EMAIL PROTECTED] wrote:
Jack,
That tells me where the JAR files are stored which is cool. But what I am
looking for a valid URL (of which there may be many) to access my given
web application. This info has to come from the container
Do you want the URL or the Internet Protocol address? I have some
ideas on the latter.
Jack
On Tue, 25 Jan 2005 21:05:30 -0800 (PST), Martin Wegner
[EMAIL PROTECTED] wrote:
Jack,
That tells me where the JAR files are stored which is cool. But what I am
looking for a valid URL (of which
I am looking for the:
http://blahblahblah.com:8080/AppName/
As Craig said I can get that if I have a Request object. But from a
PlugIn I don't have that. I can think of some ugly hacks but nothing
clean.
--Marty
--- Dakota Jack [EMAIL PROTECTED] wrote:
Do you want the URL or the
Nathan,
Can't you just add getters and setters to your mypluginclass so set-property
works directly on them? *scratches his head in confusion* That seems to be
the way the DigestingPlugIn does it in the example application.
v1.2.4 frozen cvs DigestingPlugIn code from it's
When you include a nested set-property element (as you did in your
example below), Struts expects your PlugIn implementation class to
have a corresponding public property setter method that can be used to
pass on that value. Thus, if you have:
plug-in className=com.mycompany.MyPlugIn
thanks Craig, David,
hmmm Craig David is a crap pop singer but that's another story.
kinda obvious really, for my info, what is passed in the properties in
the PluginConfig?
Craig McClanahan wrote:
When you include a nested set-property element (as you did in your
example below), Struts expects
Coast [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 8:02 PM
To: Struts Users Mailing List
Subject: Re: plugin config confusion
thanks Craig, David,
hmmm Craig David is a crap pop singer but that's another story.
kinda obvious really, for my info, what is passed in the properties
I am using both the standard tiles and validator plugins plus some custom
Plugins of my own in Struts 1.2.4 and have had no problems at all with the
upgrade from 1.1.
Are you sure something else isn't going wrong first when you app starts up
so that the PlugIn initialization isn't even being
/init-param
/servlet
From: Niall Pemberton [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Plugin problem upgrading 1.1 -- 1.2.4
Date: Mon, 4 Oct 2004 17:38:46 +0100
I am using both the standard tiles
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param
/servlet
From: Niall Pemberton [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Plugin
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message -
From: Gurjinder Bal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 04, 2004 12:45 PM
Subject: Re: Plugin problem upgrading 1.1 -- 1.2.4
I don't think
PROTECTED]
Sent: Monday, September 13, 2004 11:55 AM
To: 'Struts Users Mailing List'
Subject: RE: PlugIn/ ActionServlet init() method called 2 times in Linux
hi Uma,
If the same application is working fine with tomcat + windows
and
not working with tomcat+ linux, try out follwoing,it may
and it works fine on Linux
also.
Sorry for trouble and thanks a lot for your help.
Regards,
Uma.
-Original Message-
From: Uma Yarakaraju [mailto:[EMAIL PROTECTED]
Sent: Monday, September 13, 2004 1:48 PM
To: 'Struts Users Mailing List'
Subject: RE: PlugIn/ ActionServlet init() method called
Can anyone pl suggest ways to initialize a struts webapp other than
plugIn and extended ActionServlet.
If you are using Servlet 2.3 or newer, you could use a ServletContextListener
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContextListener.html
Although from what you describe, I
On Fri, 13 Aug 2004 15:22:46 +0900, Prasad, Kamakshya
[EMAIL PROTECTED] wrote:
Dear Craig,
Could you please elaborate more on this? Kindly if possible some code
snippets which may help me understand it better.
As I said in my previous message, the nightly builds of the
Struts-Faces
Hi, the MyFaces-JSF-Impl. (http://myfaces.org)
uses some Validator-rules for its custom-validators.
but you can also use client-side validation in JSF
via Commons-Validator. The CoreJSF-Book tells you
examples on it.
Hope it helps.
Regards,
Matthias
-Original Message-
From: Prasad,
On Thu, 12 Aug 2004 20:46:33 +0900, Prasad, Kamakshya
[EMAIL PROTECTED] wrote:
Hi All,
Is it possible to plugin struts validator framework to Javaserver faces
web framework?
Yes, if you use the Struts-Faces integration library -- currently
available in nightly builds. You can take full
-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 12:37 AM
To: Struts Users Mailing List
Subject: Re: Plugin struts validator framework to JSF
On Thu, 12 Aug 2004 20:46:33 +0900, Prasad, Kamakshya
[EMAIL PROTECTED] wrote:
Hi All
84 matches
Mail list logo