Re: executing statements on subsets of actions without code duplication

2003-06-14 Thread Rob Leland
Rob wrote:

I have a set of statements I would like executed every time
an action is executed.  I would also like to only have to
code these set of statements once and have them transparently
executed for all actions (except for a small subset). 
When we were using a Servlet 2.2 container we derived a class
from Action named SecureAction, which checked that the user was logged in.
Then all the applications Actions would be SecureAction Children.

If struts had events then the event could be hooked instead, this is 
easy enough to do.

Under Servlet 2.3 filters could be used.

-Rob



Is there a facility in struts for doing this?  Is there an
example somewhere perhaps in the example application?
(I couldn't see one)
Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Is DiskFileUpload.java missing from Struts src ?

2003-06-14 Thread Rahul

I've been trying to compile struts source and get a missing class error for class 
DiskFileUpload being used in CommonsMultipartRequestHandler.java in package 
org.apache.struts.upload.

I am unable to find this class in the downloaded struts source. Am I missing something 
here or is it not there ? 

rahul
 


Re: executing statements on subsets of actions without code duplication

2003-06-14 Thread Rob
Rob Leland wrote:
Rob wrote:

I have a set of statements I would like executed every time
an action is executed.  I would also like to only have to
code these set of statements once and have them transparently
executed for all actions (except for a small subset). 


When we were using a Servlet 2.2 container we derived a class
from Action named SecureAction, which checked that the user was logged in.
Can you explain how this was done in a little more detail, particularly
what methods were used, where they were used etc..?  I have the current
arrangement where I extend Action with a BaseAction, which implements
my common method (the one to be called always) and then from subclasses
of BaseAction.execute() I call the common method.
It is this having to manually call the common method I would like to
eliminate and just have it transparently occur higher in the
hierarchy.
As for your suggestion of using filters could you direct me to more
information regarding that method I'm interested in exploring it.
Thanks

Then all the applications Actions would be SecureAction Children.

If struts had events then the event could be hooked instead, this is 
easy enough to do.

Under Servlet 2.3 filters could be used.

-Rob



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Login and security checks

2003-06-14 Thread Adam Hardy
What happens if you don't put a security constraint in the web.xml, but 
instead just specify a role in action in struts-config.xml?

Adam

Erik Price wrote:
You can limit the resources that are protected by container managed 
authentication in the deployment descriptor.  Whichever Action requires 
authentication, just make sure that you've specified it as requiring 
such in the web.xml.

Erik


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: a jsp question:how to get the web application's directory?

2003-06-14 Thread Rob
I prefer html:base/ for this.

lcl wrote:
Hi all,

I just have a question about jsp/servlet, how to gain the directory  in the
file system of a web application? because I want to create a file under the
web application, and redirect it to user.
Best Regards
lcl


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Generating Java constants class from message resources

2003-06-14 Thread Aaron Robinson
The most common approach I've seen to using error messages in code is set up 
a bunch of constants somewhere and then use these in the code...

public class blah
{
   private static int ERROR_CREATING_CLIENT = 1234;
   public void doThis()
   {
   raiseError(ERROR_CREATING_CLIENT)
   }
}
As Struts has an application resources file with all the error messages as 
properties it would be nice if I could derive a bunch of constants from the 
properties file so that I have one definition of the errors.

my idea is to write some code that will create a class that contains 
constants based on the application resource file. This will allow compile 
time checking of the error messages used in code.

So if the message resources file has

exception.clientexists=this client already exists

A class would be generated that has

public class messages
{
   public static string CLIENTEXISTS = exception.clientexists;
}
And the code would

public void doThis()
{
   raiseError(messages.CLIENTEXISTS);
}
Does anyone know of a better way of doing this? Has something like this 
already been done?

_
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: UML diagrams in Struts source

2003-06-14 Thread Aaron Longwell


Rob Leland wrote:

Rahul wrote:

Greetings All,
As for the source, it's well-documented, explained and with UML 
diagrams. ah ! that reminds me .. I would like to know if these 
UML diagrams are being generated by an open source tool. May be I 
could use something like that to get some neat UML diagrams for other 
few java project trees sitting on my PC and whose number of source 
files is dreary enuff to make me dizzzy.


The UML in the Java Doc was created with Silver Stream 1.1 which is a 
free UML tool.
The ones in Ted's Book was created with Together J.
Has anyone used ArgoUML? I've been wanting to try it for a while... is 
it worth the 10 second download?
http://argouml.tigris.org

Also, Do you have URLs for SilverStream and Together J?


Cheers,
rahul
;o)
 

-Rob

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: conditional validation in validation.xml

2003-06-14 Thread Gregory F. March

On Jun 13, 2003, Jordan Reed [EMAIL PROTECTED]  wrote:

 |So what the validator does is only validate the field if the page attribute
 |is =.

Right, and that's my problem.  I want the validation when the page
attribute == the value.

My form is generally created in page order, but not always, hence my
need for this feature.

I guess I'll have to write my own validator.

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HttpSession abstraction

2003-06-14 Thread Mike Whittaker

This concerns the development of a session mechanism that achieves the same
goal as the pattern where an ActionForm implements an interface that
abstracts the Struts layer for the Model layer to use.

I'd like to be able to use session data in the model layer in the same way I
use form bean data.

Since there is no HttpSessionWrapper class, I guess I'll have to get the
attribute names and iterate through them passing them into some DynaBean...

Any thoughts on any of this?

--
Mike W


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: UML diagrams in Struts source

2003-06-14 Thread Mark Lowe
Poseidon is a more stable version of basically the same thing,..

http://www.gentleware.com/

I haven't used it enough to have any real opinions, I'm also not sure 
whether Poseidon CE supports reverse engineering, which be to topic of 
this discussion sound like what you need, argo certainly does..

On Saturday, Jun 14, 2003, at 13:55 Europe/London, Aaron Longwell wrote:



Rob Leland wrote:

Rahul wrote:

Greetings All,
As for the source, it's well-documented, explained and with UML 
diagrams. ah ! that reminds me .. I would like to know if these 
UML diagrams are being generated by an open source tool. May be I 
could use something like that to get some neat UML diagrams for 
other few java project trees sitting on my PC and whose number of 
source files is dreary enuff to make me dizzzy.


The UML in the Java Doc was created with Silver Stream 1.1 which is a 
free UML tool.
The ones in Ted's Book was created with Together J.
Has anyone used ArgoUML? I've been wanting to try it for a while... is 
it worth the 10 second download?
http://argouml.tigris.org

Also, Do you have URLs for SilverStream and Together J?


Cheers,
rahul
;o)
-Rob

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: UML diagrams in Struts source

2003-06-14 Thread Per Jensen
I have bought Poseidon 1.6.1 SE and generally like it. I use it
primarily for modelling a database and can attest that it is very
stable.

Can't make the Undo and Redo functions work though. I have posted a
bugreport but have not got an answer yet from Gentleware.

/Per

On Sat, 2003-06-14 at 16:39, Mark Lowe wrote:
 Poseidon is a more stable version of basically the same thing,..
 
 http://www.gentleware.com/
 
 I haven't used it enough to have any real opinions, I'm also not sure 
 whether Poseidon CE supports reverse engineering, which be to topic of 
 this discussion sound like what you need, argo certainly does..
 
 On Saturday, Jun 14, 2003, at 13:55 Europe/London, Aaron Longwell wrote:
 
 
 
  Rob Leland wrote:
 
  Rahul wrote:
 
  Greetings All,
  As for the source, it's well-documented, explained and with UML 
  diagrams. ah ! that reminds me .. I would like to know if these 
  UML diagrams are being generated by an open source tool. May be I 
  could use something like that to get some neat UML diagrams for 
  other few java project trees sitting on my PC and whose number of 
  source files is dreary enuff to make me dizzzy.
 
 
  The UML in the Java Doc was created with Silver Stream 1.1 which is a 
  free UML tool.
  The ones in Ted's Book was created with Together J.
 
  Has anyone used ArgoUML? I've been wanting to try it for a while... is 
  it worth the 10 second download?
  http://argouml.tigris.org
 
  Also, Do you have URLs for SilverStream and Together J?
 
 
  Cheers,
  rahul
  ;o)
 
 
  -Rob
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  .
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Per Jensen [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] IDE with easy tomcat upgrade?

2003-06-14 Thread Aaron Longwell
Isaac,

I too am in the market for an IDE. Can you give me some details about 
what features you like about NetBeans? Are you using any plugins? Any 
specific features that make J2EE development quicker?

Thanks,
Aaron
isaac wrote:

On 6/13/03 4:16 PM, Mike Whittaker [EMAIL PROTECTED] wrote:

 

Are any of the suggestions on this thread free? If not are there any?

At present I'm just using JCreator  Tomcat, but it seems I may be making my
life hard.
--
Mike W
   

Why not try NetBeans. This is what I use for most of my development, and
it's free!
http://www.netbeans.org

Thanks,
Isaac
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



IBM ServletManager vs Struts

2003-06-14 Thread Mingfai Ma
hi,

does anybody have experience in both IBM ServletManager[1] and Struts?

I know Struts well, but new to Servlet Manager, and would like to have your
comment on the comparsion between them. if possible, could you explain on
some background about ServletManager as well? afaik, IBM is a supportor of
Apache's projects and how come it doesn't use Struts but create its own
ServletManager? Or ServletManager is just a IBM version of Struts?

fyi, i read the old IBM has struts counterpart? thread. [2]

Thx and regards,
mingfai


[1] - IBM ServletManager http://alphaworks.ibm.com/tech/servletmanager

[2] -
http://nagoya.apache.org/eyebrowse/SearchList?listId=listName=struts-user%4
0jakarta.apache.orgsearchText=%22IBM+has+struts+counterpart%3F%22defaultFi
eld=subjectSearch=Search


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] IDE with easy tomcat upgrade?

2003-06-14 Thread Brandon Goodin
Netbeans is not easily upgraded as new Tomcat releases become available and
the Swing environment can be burdensome and buggy unlike SWT (which is what
eclipse is built on). Eclispe via the Sysdeo plugin does a great job and
allows you to upgrade your version of Tomcat at will. Heck!, they have
plugins for just about every server out there
(http://eclipse-plugins.2y.net/eclipse/index.jsp).  Eclipse may be weak on
the JSP support but that will be coming along soon (see:
http://www.eclipse.org/webtools/main.html). All in all Eclipse is more
intuitive. Also, I am not speaking from religious prejudice. I was a long
time user of Netbeans and ardent defender against Eclipse. But, Since
Eclipse 2.x things are much better. The future of Eclipse is only looking
better. The version 3.0 M1 build is already out. Anyways, I know several
developers who have made the switch to Eclipse.

Brandon Goodin

-Original Message-
From: Aaron Longwell [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 14, 2003 9:17 AM
To: Struts Users Mailing List
Subject: Re: [OT] IDE with easy tomcat upgrade?


Isaac,

I too am in the market for an IDE. Can you give me some details about
what features you like about NetBeans? Are you using any plugins? Any
specific features that make J2EE development quicker?

Thanks,
Aaron

isaac wrote:

On 6/13/03 4:16 PM, Mike Whittaker [EMAIL PROTECTED] wrote:



Are any of the suggestions on this thread free? If not are there any?

At present I'm just using JCreator  Tomcat, but it seems I may be making
my
life hard.


--
Mike W



Why not try NetBeans. This is what I use for most of my development, and
it's free!

http://www.netbeans.org


Thanks,
Isaac


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IBM ServletManager vs Struts

2003-06-14 Thread David Graham
ServletManager is posted on alphaWorks which means it's alpha level 
technology and not necessarily supported by IBM.  IBM's WSAD (and many other 
IDEs) has Struts support built into it.  Struts also has an active 
development team and users list for support.

David


hi,

does anybody have experience in both IBM ServletManager[1] and Struts?

I know Struts well, but new to Servlet Manager, and would like to have your
comment on the comparsion between them. if possible, could you explain on
some background about ServletManager as well? afaik, IBM is a supportor of
Apache's projects and how come it doesn't use Struts but create its own
ServletManager? Or ServletManager is just a IBM version of Struts?
fyi, i read the old IBM has struts counterpart? thread. [2]

Thx and regards,
mingfai
[1] - IBM ServletManager http://alphaworks.ibm.com/tech/servletmanager

[2] -
http://nagoya.apache.org/eyebrowse/SearchList?listId=listName=struts-user%4
0jakarta.apache.orgsearchText=%22IBM+has+struts+counterpart%3F%22defaultFi
eld=subjectSearch=Search
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Is DiskFileUpload.java missing from Struts src ?

2003-06-14 Thread Rahul
hhhmmm... IMHO the following import statement seems to be missing from
CommonsMultipartRequestHandler.java

import org.apache.commons.fileupload.DiskFileUpload;

That fixed it !!


- Original Message - 
From: Rahul [EMAIL PROTECTED]
To: Struts Users [EMAIL PROTECTED]
Sent: Saturday, June 14, 2003 6:33 PM
Subject: Is DiskFileUpload.java missing from Struts src ?



I've been trying to compile struts source and get a missing class error for
class DiskFileUpload being used in CommonsMultipartRequestHandler.java in
package org.apache.struts.upload.

I am unable to find this class in the downloaded struts source. Am I missing
something here or is it not there ?

rahul




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: new LabelValueBean(nbsp + obj.getName(), obj.getValue()) is not working

2003-06-14 Thread James Mitchell
Which tag are you using to display these values?

html:options and html:optionsCollection provide an attribute
(filter=false) that keep this from happening.


--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
770-822-3359
AIM:jmitchtx


- Original Message - 
From: Martin Naskovski [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, June 13, 2003 8:46 PM
Subject: new LabelValueBean(nbsp + obj.getName(), obj.getValue()) is not
working


 When my LabelValueBean which I construct as:

 lvb = new LabelValueBean(nbsp + obj.getName(), obj.getValue());

 when it gets displayed, it translates the  into amp; and what comes out
 is, literally nbsp, when in fact I wanted spaces :).

 Does anyone know how to specify a nbsp; for the Label value in a label
 value bean? :)

 Thanks
 Martin


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Login and security checks

2003-06-14 Thread Dan Tran
if role check fails, Struts sets HttpResponse code 400 (Bad Request)

-D
- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, June 14, 2003 2:44 AM
Subject: Re: Login and security checks


 What happens if you don't put a security constraint in the web.xml, but
 instead just specify a role in action in struts-config.xml?

 Adam

 Erik Price wrote:
  You can limit the resources that are protected by container managed
  authentication in the deployment descriptor.  Whichever Action requires
  authentication, just make sure that you've specified it as requiring
  such in the web.xml.
 
 
  Erik


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ejbc error

2003-06-14 Thread Rajat Nayer
Hi!!!

I am trying to run my first app that has Struts 1.0.2
and EJBs using Weblogic 7.0. I am doing the foll.:

First of all, I am trying to run my first EJB using
Weblogic 7.0. I have created the Home, Remote and Bean
classes in D:\myjavawork\EJB\DEMO folder.After that i
did the foll.:
1) compiled these using javac with weblogic.jar in the
classpath.
2) created ejb-jar.xml and weblogic-ejb-jar.xml in
D:\myjavawork\EJB\DEMO\META-INF folder
3) created the jar file demo.jar at
D:\myjavawork\EJB\DEMO.
4) when i run weblogic.ejbc, it gives an error :
...Unable to load the class ejb.demo.DemoBean.. even
though the class file is there.

Please help me solve this.

if possible, pls let m eknow what all needs to be done
after this ejbc command is successful.

I am looking for some hand-holding support here.

thanks!! 




__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]