RE: Apache Tomcat web servers

2003-08-14 Thread Raible, Matt
I personally recommend kgbinternet.com - not only b/c of the cool name, but
because of the great support and cheap prices (around $12/mo USD for a
private JVM http://www.kgbinternet.com/privatejvm.html).  I've been up and
running there for over a year and they've been great.  I host a Struts-based
website that talks to a MySQL database and gets around 6 GB of traffic per
month.

http://raibledesigns.com/page/rd/20030807#pictures_you_requested

[FRIDAY] The beer in the pictures is for you Mark ;-)

HTH,

Matt

-Original Message-
From: yan [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 5:21 PM
To: [EMAIL PROTECTED]
Subject: Apache Tomcat web servers


Hi,

I am trying to find a Web host for my JSP applications, but I am finding
it very difficult locating a suitable host.  

Anyone know of any good Web hosting vendors who support MySQl, Apache
server and the Apache Tomcat servlet container?  I prefer a UK based
host as this is where I reside.

I have had a response to an enquiry from a hosting company called
'Houxou '.  This is what they have replied:

Assuming Tomcat is well-behaved, I would have no problem running on
our servers, but would need to investigate how happy it is to co-exist
with two competitors on the same machine:

Apache server pages; and 
Sun's Chilisoft ASP

I am not sure what they mean

Any advice would be gratefully received

yan

KickStartESolutions - Intelligent Web Services
[EMAIL PROTECTED]

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



RE: Extending Tiles Role Attribute

2003-08-14 Thread Raible, Matt
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15188

-Original Message-
From: Terry Brick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 2:29 PM
To: [EMAIL PROTECTED]
Subject: Extending Tiles Role Attribute


Hi,
I really need to ability to specify multiple roles in
my tiles tags (using the role attribute) like we can
with Actions.  I did a quick text search on the struts
source and it looks like maybe it's using Strut's
RequestProcessor.  In case anyone has done this, I'm
just hoping someone can point be to the right
direction so I can quickly implement something.  Any
pointers?
Thank you

Struts 1.1

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: Is StrutsTestcase is working for Struts1.1..????

2003-08-08 Thread Raible, Matt
I haven't used the verifyForwardPath() method in StrutsTestCase, but I am
using it with StrutsTestCase and yep, it works fine for me.

-Original Message-
From: Sachin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 3:10 AM
To: Struts Users Mailing List (E-mail)
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Is StrutsTestcase is working for Struts1.1..


Hi Daniel,
I have start learning TestCase for Struts by using
StrutsTestCase.for this i have used example comes with distribution.It works
fine with Cactus based Approach both on Client side and In Container.

Now when i have replced perform() (Deprecated..) with execute() in Action.I
start getting problem in testCase so can anyone suggest me.

What changes need to be done in your example to run for Struts1.1...

It works fine with struts1.0 but give follwoing error when used with
Struts1.1

Configuration is same as for Struts1.0..

Thanks
Sachin

Here is Error..

.F.F
Time: 2.297
There were 2 failures:
1)
testSuccessfulLogin(examples.cactus.TestCactusLoginAction)junit.framework.As
sertionFailedError: Was expecting '/testStruts/main/success.jsp' but it
appears the Action has tried to return an ActionForward that is not mapped
correctly.
at servletunit.struts.Common.verifyForwardPath(Common.java:164)
at
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.j
ava:537)
at
examples.cactus.TestCactusLoginAction.testSuccessfulLogin(TestCactusLoginAct
ion.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:332)
at
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:2
35)
at
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.
java:149)
at
org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(
AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):1
25)
at
org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(Ab
stractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):115
6)
at
org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWeb
TestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):101)
at
org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(ServletTes
tRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):123)
at
org.apache.cactus.server.ServletTestRedirector.around113_doPost(ServletTestR
edirector.java;org/apache/cactus/util/log/LogAsp

My Code

package examples.cactus;

import servletunit.struts.CactusStrutsTestCase;

public class TestCactusLoginAction extends CactusStrutsTestCase {

public TestCactusLoginAction(String testName) {
super(testName);
}

public void testSuccessfulLogin() {

addRequestParameter(username,deryl);
addRequestParameter(password,radar);
setRequestPathInfo(/login);
actionPerform();
verifyForward(success);
verifyForwardPath(/main/success.jsp);
assertEquals(deryl, getSession().getAttribute(authentication));
verifyNoActionErrors();
}

public void testFailedLogin() {

addRequestParameter(username,deryl);
addRequestParameter(password,express);
setRequestPathInfo(/login);
actionPerform();
verifyForward(login);
verifyForwardPath(/login/login.jsp);
verifyInputForward();
verifyActionErrors(new String[] {error.password.mismatch});
assertNull(getSession().getAttribute(authentication));
}

public static void main(String[] args) {
junit.textui.TestRunner.run(TestCactusLoginAction.class);
}

}





-
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: [OT] TLD question

2003-08-08 Thread Raible, Matt
It also looks in WEB-INF/lib/*.jar/META-INF/ for .tld files and simply
checks for the URI in .tld files.  It doesn't actually go to it.  For proof,
try the URI for Struts' HTML tag:

http://jakarta.apache.org/struts/tags-html


-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 1:41 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: [OT] TLD question


So it looks in the WEB-INF dir first for TLDs then goes to that URI?

-Original Message-
From: Alex Shneyderman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 15:34
To: 'Struts Users Mailing List'
Subject: RE: [OT] TLD question



This is easy to check if you run your server localy. Unplug your machine
and look what happens. But the short answer is 'no' it does not. It goes
thru your TLD and finds that URL. 

 -Original Message-
 From: Andy Kriger [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 06, 2003 3:29 PM
 To: Struts Users Mailing List
 Subject: RE: [OT] TLD question
 
 does putting an external URI on a page mean that webapp container is
going
 to make a request to that URI when it loads the page?
 


-
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: Dynamic Tree Menus --- HELP!!!

2003-07-31 Thread Raible, Matt
I'm willing to help if you send me the code.  Which Displayer are you using?

Matt

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic Tree Menus --- HELP!!!


Is anyone out there working with dynamic HTML trees at the moment (i.e. 
displaying data loaded from a data base) as i'm pulling my hair out here at 
the moment.

I downloaded the source for Struts Menu and implemented a change to allow me

to place a java bean with my tree menu details into HttpSession rather than 
loading it from the menu xml file. Every thing works fine until i tried to 
add triple nested node to the tree and it totally screws up presentation 
i.e. The node image is repeatedly displayed. Its not due to my changes as i 
tested it in the latest stable version and it fails also to render with the 
same results.

I've also taken a look into using http://www.kobrix.com/ offering but their 
configuration requirements to integrate with struts seems abit too much for 
my liking.




Any suggestions, or should i just go find the JavaScript i require elsewhere

and wrap it with my own custom tag library



From: Pat Quinn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Dynamic Html Tree Menus - Java Beans.
Date: Thu, 31 Jul 2003 10:22:51 +0100

I'm looking for a tag library to aid the rendering of a Tree Menu using 
session/request stored objects.
I want to included the menu data as a Java Bean in HttpSession for each 
user and then use tag libs in my JSP's. I've looked into the StrutsMenu 
Offering for Dynamic Menus but it loads menu data from an XML file.

Any ideas or am i better off to develop my own custom tag lib?

_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


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


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


-
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: XHTML 1.0 Strict, XHTML 1.1 and validation errors with form tags

2003-07-31 Thread Raible, Matt
According to my tests, the JavaScript does not need to change to support
form id= rather than form name=

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15023

Matt

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:56 AM
To: Struts Users Mailing List
Subject: Re: XHTML 1.0 Strict, XHTML 1.1 and validation errors with form
tags


--- [EMAIL PROTECTED] wrote:
 Could someone provide a definitive answer on whether Struts 1.1 Final
 can
 actually generate compliant valid XHTML strict markup?
 
 I have the html:xhtml/ tag in my jsp's and the markup is great except
 for
 the form tag which is presented back to the browser.  I have checked
 the
 mail archive for this topic and haven't found this answer.  If it is
 possible to generate clean strict xhtml what am I missing to force the
 form tag to generate an id=X attribute instead of a name=X
 attribute
 in the form tag.

This is one area where XHTML strict is not supported yet.  I believe
there's an open enhancement request relating to the id vs. name issue.  I
haven't had time to look into the javascript changes required (if any) to
support this change.

David


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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: Dynamic Tree Menus --- HELP!!!

2003-07-31 Thread Raible, Matt
It doesn't work in Mozilla/Netscape b/c it appears to be a IE-only menu,
notice the Javascript errors I get in Mozilla's Firebird (v 0.6.1):

Error: document.all has no properties
Source File:
javascript:toggleVis(document.all.branchDIV0,document.images.pointerBranch0)
;
Line: 1

document.all is an IE-only property.

Matt

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: Dynamic Tree Menus --- HELP!!!




How come the example doesn't work with Netscape (v7.02 and my JavaScript is
turned on)??

I was thinking about using the Struts menus but I have users that are on
UNIX work workstations (Intranet app).  Is this common for the menus not to
work on Netscape?



-Original Message-
From: Todd Fuller [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 2:09 PM
To: [EMAIL PROTECTED]
Cc: Pat Quinn
Subject: RE: Dynamic Tree Menus --- HELP!!!

Pat,

Check out the Multi-level tree example at the URL below.

http://www2.metanology.com:8080/struts-examples-web/index.jsp

Todd Fuller
Metanology Corporation
4625 Alexander Dr., Ste 105
Alpharetta, GA 30022
770.475.1301 Office
404.561.0294 Cell
www.metanology.com


-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Dynamic Tree Menus --- HELP!!!


I appreciate your kind offer my details are as follows:

I've broken it down into a very basic example once you view this the third
node will appear with a series of plus images.

---
Menu-Config.xml
---
?xml version=1.0 encoding=UTF-8 ?
MenuConfig
  Displayers
Displayer   name=ListMenu
type=com.fgm.web.menu.displayer.ListMenuDisplayer/
  /Displayers
  Menus

Menu  name=test1  title=test1  description=test width=200
   Item   name=test2   title=test2 width=200
   Item   name=test3   title=test3 width=200
Item   name=test4   title=test4 location=index.jsp
width=200/
/Item
   /Item
/Menu

  /Menus

/MenuConfig

-
JSP Code
-
%@ taglib uri=/WEB-INF/struts-menu.tld prefix=menu%

menu:useMenuDisplayer name=ListMenu
menu:displayMenu name=test1/
/menu:useMenuDisplayer


From: Raible, Matt [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Dynamic Tree Menus --- HELP!!!
Date: Thu, 31 Jul 2003 09:22:04 -0600

I'm willing to help if you send me the code.  Which Displayer are you
using?

Matt

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic Tree Menus --- HELP!!!


Is anyone out there working with dynamic HTML trees at the moment (i.e.
displaying data loaded from a data base) as i'm pulling my hair out here at
the moment.

I downloaded the source for Struts Menu and implemented a change to allow
me

to place a java bean with my tree menu details into HttpSession rather than
loading it from the menu xml file. Every thing works fine until i tried to
add triple nested node to the tree and it totally screws up presentation
i.e. The node image is repeatedly displayed. Its not due to my changes as i
tested it in the latest stable version and it fails also to render with the
same results.

I've also taken a look into using http://www.kobrix.com/ offering but their
configuration requirements to integrate with struts seems abit too much for
my liking.




Any suggestions, or should i just go find the JavaScript i require
elsewhere

and wrap it with my own custom tag library



 From: Pat Quinn [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Dynamic Html Tree Menus - Java Beans.
 Date: Thu, 31 Jul 2003 10:22:51 +0100
 
 I'm looking for a tag library to aid the rendering of a Tree Menu using
 session/request stored objects.
 I want to included the menu data as a Java Bean in HttpSession for each
 user and then use tag libs in my JSP's. I've looked into the StrutsMenu
 Offering for Dynamic Menus but it loads menu data from an XML file.
 
 Any ideas or am i better off to develop my own custom tag lib?
 
 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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

RE: Dynamic Tree Menus --- HELP!!!

2003-07-31 Thread Raible, Matt
Thanks Pat - I confirmed that this is a bug, and fixed it in CVS.  You can
see an example at the following URL:

http://raibledesigns.com/struts-menu/test1.jsp

Download the updated JAR at:

http://raibledesigns.com/downloads/struts-menu.jar

or build struts-menu from CVS.

HTH,

Matt


-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 9:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Dynamic Tree Menus --- HELP!!!


I appreciate your kind offer my details are as follows:

I've broken it down into a very basic example once you view this the third 
node will appear with a series of plus images.

---
Menu-Config.xml
---
?xml version=1.0 encoding=UTF-8 ?
MenuConfig
  Displayers
Displayer   name=ListMenu 
type=com.fgm.web.menu.displayer.ListMenuDisplayer/
  /Displayers
  Menus

Menu  name=test1  title=test1  description=test width=200
   Item   name=test2   title=test2 width=200
   Item   name=test3   title=test3 width=200
Item   name=test4   title=test4 location=index.jsp 
width=200/
/Item
   /Item
/Menu

  /Menus

/MenuConfig

-
JSP Code
-
%@ taglib uri=/WEB-INF/struts-menu.tld prefix=menu%

menu:useMenuDisplayer name=ListMenu
menu:displayMenu name=test1/
/menu:useMenuDisplayer


From: Raible, Matt [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Dynamic Tree Menus --- HELP!!!
Date: Thu, 31 Jul 2003 09:22:04 -0600

I'm willing to help if you send me the code.  Which Displayer are you 
using?

Matt

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic Tree Menus --- HELP!!!


Is anyone out there working with dynamic HTML trees at the moment (i.e.
displaying data loaded from a data base) as i'm pulling my hair out here at
the moment.

I downloaded the source for Struts Menu and implemented a change to allow 
me

to place a java bean with my tree menu details into HttpSession rather than
loading it from the menu xml file. Every thing works fine until i tried to
add triple nested node to the tree and it totally screws up presentation
i.e. The node image is repeatedly displayed. Its not due to my changes as i
tested it in the latest stable version and it fails also to render with the
same results.

I've also taken a look into using http://www.kobrix.com/ offering but their
configuration requirements to integrate with struts seems abit too much for
my liking.




Any suggestions, or should i just go find the JavaScript i require 
elsewhere

and wrap it with my own custom tag library



 From: Pat Quinn [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Dynamic Html Tree Menus - Java Beans.
 Date: Thu, 31 Jul 2003 10:22:51 +0100
 
 I'm looking for a tag library to aid the rendering of a Tree Menu using
 session/request stored objects.
 I want to included the menu data as a Java Bean in HttpSession for each
 user and then use tag libs in my JSP's. I've looked into the StrutsMenu
 Offering for Dynamic Menus but it loads menu data from an XML file.
 
 Any ideas or am i better off to develop my own custom tag lib?
 
 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


-
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]


_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


-
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: ValidatorForm and validation.xml

2003-07-29 Thread Raible, Matt
Make sure you have validate=true on your action-mapping.

-Original Message-
From: Jim Bruno Goldberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 4:14 PM
To: [EMAIL PROTECTED]
Subject: ValidatorForm and validation.xml


Hi, folks.

I am trying to use validation.xml, but it does not working.
Some info:

my struts-config.xml:


(...)
form-bean name=PersonEspecieForm
type=adama.sell.PersonEspecieForm/
(...)
plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property
property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
/plug-in
(...)


my validation.xml:
(...)
 formset 

form name=PersonEspecieForm
field
property=name
depends=required/
   
 /form
 /formset
(...)

my Form Class:
(...)
public class PersonEspecieForm
extendsorg.apache.struts.validator.ValidatorForm
implements java.io.Serializable
{
protected long oid;
protected java.lang.String descr;
protected java.lang.String name;
protected java.util.List all;

/** Construtor vazio padrão */
public PersonEspecieForm() {}

public long getOid()
{
return this.oid;
}

public void setOid( long oid )
{
this.oid = oid;
}

public java.lang.String getName()
{
return this.name;
}

public void setName( java.lang.String descr )
{
this.name = descr;
}

(...some getters, setters, but no validate method...)

}


There are something wrong, but I try find it all day and nothing. Can
anyone (please) help me?
The struts just ignorate de validation.xml configuration.
Thanks Everybody.


-- 
 CUL8R,[]s
 Jim Bruno Goldberg
http://www.md5.com.br

-
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: [OT] Servlets tied to J2EE in new spec

2003-07-28 Thread Raible, Matt
You can still use Tomcat.  Servlets have always been part of the J2EE spec.
You can still use Tomcat.  I have deployed Servlet 2.4/JSP 2.0 apps in
Tomcat 5.0.4 successfully.

HTH,

Matt

-Original Message-
From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 10:53 AM
To: 'Struts Users Mailing List'
Subject: [OT] Servlets tied to J2EE in new spec



Hi,

I just attended a conference this weekend.A speaker mentioned that with the
Servlet 2.4 spec, Servlets are being tied to the J2EE environment.I would
like to know in what way ? Also,does this mean that we can't use Tomcat
anymore ??

Thanks,
Vijay  

-
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: Struts + Hibernate: A few newbie questions about how to get this right?

2003-07-24 Thread Raible, Matt
I've created a project that uses Struts, XDoclet and Hibernate and also
generates ActionFroms from POJOs.  Maybe it'll help.

http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse

Matt

-Original Message-
From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 7:12 AM
To: Struts Users Mailing List
Subject: Struts + Hibernate: A few newbie questions about how to get
this right?


I have spent quite some time working with creating a new web interface 
on top of an existing database.  As we want to eventually change the 
schema we have decided to put an abstraction layer on top of it, which I 
am in the process of modelling as Hibernate beans, where Ihave just 
started dealing with the process of updating information in these 
persisted beans (previously was read-only), and presenting them with 
bean:* and the display taglib.

I have previously written a search interface accessing the database 
directly (due to some very complicated where-clauses) using Struts in 
order to gather the user preferences for refining the search, which has 
worked well for quite a while.  So I am familiar with the basic concept 
of using a form bean to store the information, and Struts taglibs for 
creating web-forms to alter this information.

Now I want to edit my persistent beans (containing multi-level 
master-detail information) with a Struts-based interface, and in order 
to avoid spending time reinventing the wheel, I would like to ask the 
community first:

* Can I use a persistant bean as my FormBean (or would that be asking 
for inconsistencies), or should I work with a DynaBean and then copy the 
result to the persistant bean in the end?  I will probably need some 
validation.

* If not, is there an easy way to populate such a DynaBean from my 
persistant bean and vice versa?  I would rather not have to write a lot 
of setXX( getXX()) statements.

* I have understood from the struts-hibernate example by Ted Husted that 
Struts can utilize Hibernate as a plugin, but I did not understand what 
this implies.  Is there a ressource that explains this?  Is there any 
benefit from just using the two packages directly?

Any insight would be appreciated :)  Thanks in advance.


-- 
  Thorbjoern Ravn Andersen Scandiatransplant
   Skejby Sygehus, indgang 3
  +45 89 49 53 01  DK-8200 AArhus N
  http://biobase.dk/~tra 



-
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: Auto submit with JavaScript

2003-07-23 Thread Raible, Matt
Shouldn't it submit a form, rather than focusing on an element?

onchange=this.form.submit()

this.form can be used as a shortcut to the form on any elements w/in the
form.

HTH,

Matt

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Auto submit with JavaScript


Hello,
I am developing a an application that automatically submits a form when
a user selects a value from a drop down.

html:select property=reasonCode styleClass=requiredselect
onchange=document.forms.accountAdjustmentForm.notes.focus();

This works fine using the normal HTML select tag but does nothing deployed
as a struts app.   I don't even receive a JavaScript error. 

Is there a conflict with the struts included focus javascript?   Can this be
disabled?

Thanks
Guy Molinari



-
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: Struts Expandable Trees

2003-07-22 Thread Raible, Matt
If you're using struts-menu, this has been fixed in CVS.  JavaScript and
cookies are used to remember the menus that should be expanded.

HTH,

Matt

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 2:43 AM
To: [EMAIL PROTECTED]
Subject: Struts Expandable Trees


I'm currently developing a prototype using struts tiles for my layout 
definition. I want to have a dynamic html tree (i.e. 
http://raibledesigns.com/struts-menu/dhtmlExpandable.jsp) on the left hand 
side, this menu will control the body content.

I'm trying to avoid using frames and javascript as i really like the clean 
development process i get from using tiles. My problem however is when i 
navigate down the tree and select a node (i.e. request a new view) my tree 
resort back to it initial state i.e. root node visible only.

I could use a frameset and refresh only the main content area but this means

using javascript and possibly not using tiles... am i correct in assuming 
this or is there an alternative solution???

Any comments or suggestions appreciated.

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


-
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: [Friday] How far can we let the clients push us?

2003-07-18 Thread Raible, Matt
We had the same requirement from our client - and we actually implemented
it!  Using JavaScript and the DOM, we're able to add/delete rows, sort by
columns, have tabs for different sheets - pretty slick IMO.  Of course, it's
an intranet app, so we require standards-compliant browsers
(http://webstandards.org/upgrade/).

I think you have to estimate how long it will take to develop (and maintain)
this, vs. a simpler system.  If they're willing to pay you for it - why not?
If you tell them it'll cost them $500,000 for the online spreadsheet vs.
$100,000 for the simpler version, they'll start to see the light.

HTH,

Matt

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 10:12 AM
To: 'Struts Users Mailing List'
Subject: [Friday] How far can we let the clients push us?



To them, Online spreadsheet data-entry is a reasonable request.  They don't
want
to change their ways of practise, what can we do?  They are paying us!

Darn, life is so hard!
 


-
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: [Friday] How far can we let the clients push us?

2003-07-18 Thread Raible, Matt
Every cell contains a form element (i.e. input type=text), and then using
indexed properties, they're submitted just like a regular form.  Validation
is done in the validate() method of the form, as usual.

Matt

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:29 AM
To: Struts Users Mailing List
Subject: Re: [Friday] How far can we let the clients push us?




Raible, Matt wrote:
 We had the same requirement from our client - and we actually implemented
 it!  Using JavaScript and the DOM, we're able to add/delete rows, sort by
 columns, have tabs for different sheets - pretty slick IMO.

That is cool.  DOM is unwieldy, but it's an incredibly powerful 
mechanism in web pages -- it really does add a ton of control.  What I'm 
curious, though, is what was done with this data after the users had 
entered it into the spreadsheet -- was every single cell a form field, 
or did you implode the cells into a big string and ship that to the server?



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]



html-el: page attribute doesn't accept run-time expressions

2003-07-17 Thread Raible, Matt
In struts-html.tld, the page attribute allows run-time expressions:

attribute
namepage/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute

However, in struts-html-el, the page attribute does not allow run-time
expressions:

attribute
namepage/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue --
/attribute

Is this a bug?  

The reason I ask is because the following code works fine in Tomcat 4.1.24:

%-- Get Javascript List --%
tiles:useAttribute id=scriptList name=scripts 
classname=java.util.List ignore=true/

c:forEach var=js items=${scriptList}
script type=text/javascript
src=html-el:rewrite page=${js}//script
/c:forEach

But in Tomcat 5.0.4, maybe things are stricter or something, but I get the
following error:

org.apache.jasper.JasperException: /layouts/baseLayout.jsp(22,17) According
to TLD or attribute dire
ctive in tag file, attribute page does not accept any expressions

If I change it to the following, everything works fine:

c:forEach var=js items=${scriptList}
script type=text/javascript
src=%=request.getContextPath()%${js}//script
/c:forEach

Thanks,

Matt


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



RE: html-el: page attribute doesn't accept run-time expressions

2003-07-17 Thread Raible, Matt
Yes it does - thanks for the tip!  So I'm guessing (since this works) that I
can replace all my html:rewrite page=/ with c:url value=/?  I dig
that - much shorter.

Matt

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 9:59 AM
To: Struts Users Mailing List
Subject: Re: html-el: page attribute doesn't accept run-time expressions


Does this work:

c:forEach var=js items=${scriptList}
  script type=text/javascript
  src=c:url value=${js}/
  /script
/c:forEach

None of the EL tags should have rtexprvalue set to true, right? That's for
JSP
expressions, not EL expressions.

Quoting Raible, Matt [EMAIL PROTECTED]:

 In struts-html.tld, the page attribute allows run-time expressions:
 
 attribute
 namepage/name
 requiredfalse/required
 rtexprvaluefalse/rtexprvalue
 /attribute
 
 However, in struts-html-el, the page attribute does not allow run-time
 expressions:
 
 attribute
 namepage/name
 requiredfalse/required
 rtexprvaluefalse/rtexprvalue --
 /attribute
 
 Is this a bug?  
 
 The reason I ask is because the following code works fine in Tomcat
4.1.24:
 
 %-- Get Javascript List --%
 tiles:useAttribute id=scriptList name=scripts 
 classname=java.util.List ignore=true/
 
 c:forEach var=js items=${scriptList}
 script type=text/javascript
 src=html-el:rewrite page=${js}//script
 /c:forEach
 
 But in Tomcat 5.0.4, maybe things are stricter or something, but I get the
 following error:
 
 org.apache.jasper.JasperException: /layouts/baseLayout.jsp(22,17)
According
 to TLD or attribute dire
 ctive in tag file, attribute page does not accept any expressions
 
 If I change it to the following, everything works fine:
 
 c:forEach var=js items=${scriptList}
 script type=text/javascript
 src=%=request.getContextPath()%${js}//script
 /c:forEach
 
 Thanks,
 
 Matt

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
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: html-el: page attribute doesn't accept run-time expressions

2003-07-17 Thread Raible, Matt
Actually, c:url is just what I was looking for.  I've been writing a
workaround (i.e. request.getContextPath()) for the module thingy, which I
considered a bug, rather than a feature ;-)

Thanks,

Matt

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 12:42 PM
To: Struts Users Mailing List
Subject: RE: html-el: page attribute doesn't accept run-time expressions


Yup, that should be just fine, except maybe if you're using modules. I think
html:rewrite treats the value of the page attribute as module-relative
so it
does a little extra work to generate the actual URI. c:url just treats
value
as either absolute (starts with a scheme) or context-relative (starts with a
/).

Quoting Raible, Matt [EMAIL PROTECTED]:

 Yes it does - thanks for the tip!  So I'm guessing (since this works) that
 I
 can replace all my html:rewrite page=/ with c:url value=/?  I dig
 that - much shorter.
 
 Matt
 
 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 17, 2003 9:59 AM
 To: Struts Users Mailing List
 Subject: Re: html-el: page attribute doesn't accept run-time expressions
 
 
 Does this work:
 
 c:forEach var=js items=${scriptList}
   script type=text/javascript
   src=c:url value=${js}/
   /script
 /c:forEach
 
 None of the EL tags should have rtexprvalue set to true, right? That's
 for
 JSP
 expressions, not EL expressions.
 
 Quoting Raible, Matt [EMAIL PROTECTED]:
 
  In struts-html.tld, the page attribute allows run-time expressions:
  
  attribute
  namepage/name
  requiredfalse/required
  rtexprvaluefalse/rtexprvalue
  /attribute
  
  However, in struts-html-el, the page attribute does not allow run-time
  expressions:
  
  attribute
  namepage/name
  requiredfalse/required
  rtexprvaluefalse/rtexprvalue --
  /attribute
  
  Is this a bug?  
  
  The reason I ask is because the following code works fine in Tomcat
 4.1.24:
  
  %-- Get Javascript List --%
  tiles:useAttribute id=scriptList name=scripts 
  classname=java.util.List ignore=true/
  
  c:forEach var=js items=${scriptList}
  script type=text/javascript
  src=html-el:rewrite page=${js}//script
  /c:forEach
  
  But in Tomcat 5.0.4, maybe things are stricter or something, but I get
 the
  following error:
  
  org.apache.jasper.JasperException: /layouts/baseLayout.jsp(22,17)
 According
  to TLD or attribute dire
  ctive in tag file, attribute page does not accept any expressions
  
  If I change it to the following, everything works fine:
  
  c:forEach var=js items=${scriptList}
  script type=text/javascript
  src=%=request.getContextPath()%${js}//script
  /c:forEach
  
  Thanks,
  
  Matt
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
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: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Raible, Matt
If you're just looking for the values, grab it as a resource bundle. Here's
how I grab it in a Business Delegate:

// Get the application's messages resources
ResourceBundle resources =
ResourceBundle.getBundle(ApplicationResources);
String appDBVersion = resources.getString(webapp.db_version);

And then of course, there's errors and messages - where it grabs it
automagically:

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError(errors.existing.user,
   userForm.getUsername(),
   userForm.getEmail()));

messages.add(ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage(user.deleted,
userForm.getEmail()));

And lastly, you can get it from the servlet context in a servlet outside of
struts:

MessageResources resources =
((MessageResources)
getServletContext().getAttribute(Globals.MESSAGES_KEY));

resources.getMessage(userFormEx.username);


HTH,

Matt

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: How do you access an application.properties value directly from
within a class?


When Struts load, it grabs application.properties and stores it's keys and
values somewhere.  From within an action class I need to access a value in
application.properties.  How could one do this?

tia,
mark



-
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: How do you access an application.properties value directly fr om within a class?

2003-07-15 Thread Raible, Matt
I forgot to add the simplest way in an Action class:

MessageResources resources = getResources(request);

resources.getMessage(keyName);


-Original Message-
From: Raible, Matt 
Sent: Tuesday, July 15, 2003 10:51 AM
To: 'Struts Users Mailing List'
Subject: RE: How do you access an application.properties value directly
fr om within a class?


If you're just looking for the values, grab it as a resource bundle. Here's
how I grab it in a Business Delegate:

// Get the application's messages resources
ResourceBundle resources =
ResourceBundle.getBundle(ApplicationResources);
String appDBVersion = resources.getString(webapp.db_version);

And then of course, there's errors and messages - where it grabs it
automagically:

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError(errors.existing.user,
   userForm.getUsername(),
   userForm.getEmail()));

messages.add(ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage(user.deleted,
userForm.getEmail()));

And lastly, you can get it from the servlet context in a servlet outside of
struts:

MessageResources resources =
((MessageResources)
getServletContext().getAttribute(Globals.MESSAGES_KEY));

resources.getMessage(userFormEx.username);


HTH,

Matt

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: How do you access an application.properties value directly from
within a class?


When Struts load, it grabs application.properties and stores it's keys and
values somewhere.  From within an action class I need to access a value in
application.properties.  How could one do this?

tia,
mark



-
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: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Raible, Matt
Or how about an ugly way? ;-)

%@ page import=org.apache.struts.util.MessageResources,
 org.apache.struts.action.Action%

% 
MessageResources resources = 
(MessageResources) request.getAttribute(Action.MESSAGES_KEY); 
%

%=resources.getMessage(userForm.userId)%

Matt

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 12:04 PM
To: Struts Users Mailing List
Subject: Re: How do you access an application.properties value directly
from within a class?


You mean like this?

bean:define id=someKey
 bean:message key=some.key/
/bean:define

some:otherTag value=%=someKey%/

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx


- Original Message -
From: Mike Deegan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 1:53 PM
Subject: Re: How do you access an application.properties value directly from
within a class?


 Hey Matt / All,

 Do you have an elegant way -  in scriptlet form - at the JSP level to grab
 an application.properties value to then use as a JSP expression (
%=...%)
 in the value attribute of a tag.

 I had tried to use the bean:message tag to get the value to populate
into
 the value attribute of another tag - that is when trying to combine two
 tags - but the page fails to compile. Can't remember the exact error msg
but
 it was along the lines of  = expected ...

 I know you can use JSP expressions ( %=...%) in the value attribute of
 tags - but JSP compile fails when I try to use bean:message tag to
directly
 populate a tag's value attribute.

 So do you have an elegant way -  in scriptlet form - at the JSP level to
 grab an application.properties value to then use as a JSP expression (
 %=...%) in the value attribute of a tag.

 I searched for some time for an answer on this but got lost in the maze.
 Maybe the wording of my searches let me down.

 Or should I be attempting to do this in another way ... without scriptlets
 ... to get an application.properties value to populate into the value
 attribute of another tag.

 Any help appreciated ...
 Mike

 - Original Message -
 From: Raible, Matt [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Tuesday, July 15, 2003 10:53 AM
 Subject: RE: How do you access an application.properties value directly fr
 om within a class?


  I forgot to add the simplest way in an Action class:
 
  MessageResources resources = getResources(request);
 
  resources.getMessage(keyName);
 
 
  -Original Message-
  From: Raible, Matt
  Sent: Tuesday, July 15, 2003 10:51 AM
  To: 'Struts Users Mailing List'
  Subject: RE: How do you access an application.properties value directly
  fr om within a class?
 
 
  If you're just looking for the values, grab it as a resource bundle.
 Here's
  how I grab it in a Business Delegate:
 
  // Get the application's messages resources
  ResourceBundle resources =
  ResourceBundle.getBundle(ApplicationResources);
  String appDBVersion = resources.getString(webapp.db_version);
 
  And then of course, there's errors and messages - where it grabs it
  automagically:
 
  errors.add(ActionErrors.GLOBAL_ERROR,
 new ActionError(errors.existing.user,
 userForm.getUsername(),
 userForm.getEmail()));
 
  messages.add(ActionMessages.GLOBAL_MESSAGE,
   new ActionMessage(user.deleted,
  userForm.getEmail()));
 
  And lastly, you can get it from the servlet context in a servlet outside
 of
  struts:
 
  MessageResources resources =
  ((MessageResources)
  getServletContext().getAttribute(Globals.MESSAGES_KEY));
 
  resources.getMessage(userFormEx.username);
 
 
  HTH,
 
  Matt
 
  -Original Message-
  From: Mark Galbreath [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 15, 2003 10:28 AM
  To: 'Struts Users Mailing List'
  Subject: How do you access an application.properties value directly from
  within a class?
 
 
  When Struts load, it grabs application.properties and stores it's keys
and
  values somewhere.  From within an action class I need to access a value
in
  application.properties.  How could one do this?
 
  tia,
  mark
 
 
 
  -
  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]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Java Script Confirm and struts

2003-07-15 Thread Raible, Matt
onclick=return confirm('Your message here')

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 12:39 PM
To: [EMAIL PROTECTED]
Subject: Java Script Confirm and struts


Hi i wud like to have a confirm box that displays a message saying

 make sure all the values are correct, once it is submitted it cannot be
take back

I want to have this when a user clicks a continue on a JSP page, if the
user clicks yes on the continue box it shud submit the form but if the
user
clicks no then the form shud not be submitted.I started writing it but i
donno what to

  html:submit property=Submit value=Continue onclick= /

what do i need to write for the onclick for what i need to happen.


--Thanx in advance
   Mohan



-
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: Iterating the resultset contents in the view (jsp)

2003-07-14 Thread Raible, Matt
The easiest way IMO is to do the following:

1.  Create ActionForms or POJOs to represent each row returned from your
table.
2.  Put these in a List and put them in a scope (i.e. request or session).
3.  Display them with the Display Tag Library (http://displaytag.sf.net).

HTH,

Matt

-Original Message-
From: Richard Hill [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 5:36 PM
To: '[EMAIL PROTECTED]'
Subject: Iterating the resultset contents in the view (jsp)


Hi,
I'm working on an action that gets a resultset from a database table
containing 4 columns. I need to pass that information back to the view (jsp)
which will iterate over results. My question is what is the best way to do
this. Do I create an array for each row in the resultset and insert each
array in a collection, passing that back to the view? 

If so, how would you iterate over each array in the collection with the
logic:iterate taglib? All of the examples only show iterations over single
column lists.

Any help would be appreciated.

Thanks,
Richard


-
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: Xdoclet

2003-07-11 Thread Raible, Matt
I wrote a sample app that might be just what you're looking for:

http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse

HTH,

Matt

-Original Message-
From: Saman Ghodsian [mailto:[EMAIL PROTECTED]
Sent: Friday, July 11, 2003 1:02 PM
To: [EMAIL PROTECTED]
Subject: Xdoclet


Hi everyone,
 Just starting with struts, I'm looking for xdoclet for 
 struts, where I can put attributes on my model source code 
 and it will generate all the Action, form, etc and xml files 
 for me. Any ideas? Pointers appreciated..

Saman Ghodsian
CTO
Middle Earth Technologies Ltd.
www.metca.com
Cell (604)-839-7791
Vancouver, BC
Canada




-
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: Réf. : RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread Raible, Matt
www.jstlbook.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 8:45 AM
To: Struts Users Mailing List
Subject: Réf. : RE: Using JSTL tags instead of Struts tags



can someone point me out a tutorial or a good book about JSLT.

Meissa




Mike Jasnowski [EMAIL PROTECTED]
10/07/2003 16:33
Veuillez répondre à Struts Users Mailing List



Pour :  Struts Users Mailing List
[EMAIL PROTECTED]
cc :

Objet : RE: Using JSTL tags instead of Struts tags


I would think you'd run into that possibility with either Struts or
JSTL.
Our designers love JSTL because it's succinct and a bit more obvious in

what
object.property you are working with. But it's sometimes up to me and

other
engineers to steer the designers away from bad practices.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:29 AM
To: Struts Users Mailing List
Subject: Re: Using JSTL tags instead of Struts tags


I started using JSTL but found that it encouraged site builders to
start embedding logic in JSP's. While I can see that JSLT is more
powerful, isn't it true to say that it encourages breaking with the
view-controller demarcation?

I find the struts tags on the other hand, used with zero scriptlet
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise
of the folks who developed struts, but whenever I read use JSLT it
seems to me  a step backwards.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:


 Start using it and you will :-).  The expression language is the best
 thing since sliced bread.

 David
 I agree, I'm even using the EL parser to do stuff on completely
 different
 layers for scripting logic.  Also, you can VERY easily use JSTL's
 parsing
 objects in your own tags to make them a little more flexible.
 Jacob


 - Keith


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags


 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the
 fmt:message
 tag and the Struts logic tags are all replaced with a combination of
 the
 c:if and c:forEach tags plus the expression language.

 The JSPs are remarkably easy to maintain and debug using this
strategy
 because there aren't any scriptlets or complicated business logic in
 them.

 David

 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.


 -Original Message-
 From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags


 A previous thread had encouraged me to look into JSTL.  It looks
like
 there
 are several tags which I could use instead of Struts tags.  Has
 anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?

 Joshua


 This communication, including attachments, is for the exclusive use
 of

 addressee and may contain proprietary, confidential or privileged
 information. If you are not the intended recipient, any use,
copying,
 disclosure, dissemination or distribution is strictly prohibited. If
 you are not the intended recipient, please notify the sender
 immediately by return email and delete this communication and
destroy
 all
 copies.



-
 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]



 __
 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]

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



 __
 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]

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



-
To unsubscribe, e-mail: [EMAIL 

RE: fmt:message

2003-07-10 Thread Raible, Matt
I did this today and it was pretty simple.  Check out
http://tinyurl.com/gkp1.

HTH,

Matt

-Original Message-
From: Ben Anderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 1:44 PM
To: [EMAIL PROTECTED]
Subject: fmt:message


As per earlier requests, I attempted to switch my bean:message tags to 
fmt:message tags, however I have been unsuccessful thus far.

This is what worked:
keys are defined in MessagesMyBundle.properties

code file=struts-config.xml
  
  message-resources key=MESSAGE_MY_BUNDLE
   parameter=path.to.my.stuff.MessagesMyBundle/
  
/code
code file=myJsp.jsp
  
bean:message key=my.message.to.display bundle=MESSAGE_MY_BUNDLE/
/code


I changed to this and I can't seem to get it working
code file=myJsp.jsp
  
fmt:setBundle baseName=MESSAGE_MY_BUNDLE var=myBundle/
fmt:message key=my.message.to.display bundle=${myBundle}/
/code

the page renders but instead of displaying the message, it displays
???my.message.to.display???

did I put too much code in here?
Thanks,
Ben

_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
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: Using rewrite to reference HTML Assets - Tip #9 Question

2003-07-02 Thread Raible, Matt
You might try a the HTML4/XHTML standard way of writing this:

script type=text/javascript src=/js/overlib_mini.js/script

Notice the all lowercase attributes and the /script is on the same line.
And ype, this is backwards compatible with all browsers to my knowledge.

Matt

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 8:28 AM
To: Struts Users Mailing List
Subject: Re: Using rewrite to reference HTML Assets - Tip #9 Question



Yes, the taglib def for html and other tags are in the header and all tags
(html, logic, etc.) work fine everywhere else.

Here's the generated html:

SCRIPT language='javascript'
   SRC='/js/overlib_mini.js'
/SCRIPT
SCRIPT language='javascript'
   SRC='/js/calendar.js'
/SCRIPT

Also, I noticed that I get a syntax error on the 2nd /SCRIPT when I load
the page.

Richard




 

Nicolas De

Loof  To: Struts Users Mailing
List [EMAIL PROTECTED] 
nicolas.deloofcc:

@cgey.com Subject: Re: Using rewrite to
reference HTML Assets - Tip #9 Question
 

07/02/2003

09:48 AM

Please respond

to Struts

Users Mailing

List

 

 





Did you include the taglib definition on JSP header :

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

Look at generated HTML to see if html:rewrite tag has been fully
translated by JSP compiler.

Nico.


 Just signed up to the mailing list a few minutes ago so as you would
 probably expect, I have a question that I am hoping someone can help me
 with.

  I'm trying to reference two javascript files but am unable to do it
 successfully using the example in tip#9.

 Everything works fine when I use

 script language=JavaScript src=/js/overlib_mini.js/script
 script language=JavaScript src=/js/calendar.js/script

 when I run the app in Netbeans with Tomcat but when I move the app to
 another server and it gets an application name, it loses the context
 relative URL so I tried to code it using the html rewrite as tip#9
 suggested but get an object expected error (it can't find the js files)
 when I click on the linked image.

 Can someone tell me what I am doing wrong or what else I can try to get
 this to work? I have been unable to find any documentation or examples
 elsewhere.


 Here's the applicable code:

 head

 SCRIPT language='javascript'
SRC='html:rewrite page=/js/overlib_mini.js/'
 /SCRIPT
 SCRIPT language='javascript'
SRC='html:rewrite page=/js/calendar.js/'
 /SCRIPT

 /head


 body
 html:form

 a href=javascript:show_calendar
 ('containerForm.containerCreatedDate'); onMouseOver=window.status='Date
 Picker'; overlib('Click here to choose a date from a one month pop-up
 calendar.'); return true; onMouseOut=window.status=''; nd(); return
 true;html:img page=/Images/show-calendar.gif width=24 height=22
 border=0//a

 /html:form
 /body


 Thanks!

 Richard

 **
 This message is intended only for the designated recipient(s).  It may
 contain confidential or proprietary information and may be subject to
 the attorney-client privilege or other confidentiality protections.
 If you are not a designated recipient, you may not review, use, copy
 or distribute this message.  If you receive this in error, please
 notify the sender by reply e-mail and delete this message.  Thank you.

 ***


 -
 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]





**
This message is intended only for the designated recipient(s).  It may
contain confidential or proprietary information and may be subject to
the attorney-client privilege or other confidentiality protections.
If you are not a designated recipient, you may not review, use, copy
or distribute this message.  If you receive this in error, please
notify the sender by reply e-mail and delete this message.  Thank you. 

***


-
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: Webapp Security?

2003-07-02 Thread Raible, Matt
How about using container managed security with tomcat's realms?  It works
great for me.

Here's an example app if you're interested: http://tinyurl.com/fuvq

HTH,

Matt

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 11:27 AM
To: Struts Mailing List
Subject: Webapp Security?


Just curious how others have gone about protecting the resouces within their
webapp.. in our personal setup we would like to control access to every
resource if possible, we have our own custom login page that sets session
variables, and pulls the data from the database.

We can authenticate people with code in each of the actions, but nothing is
preventing someone from directly going to a jpg or a jsp file or anything of
the like.  What I thought about doing was subclassing the tomcat connectors,
the default, the jsp one, and the struts one and then authenticating each
request.. but that adds a lot of overhead.  Anybody have any other good
ideas?  We'd like to stick with just tomcat 4.1.24... no apache (no
.htaccess).. what is everyone else implementing?
-David


-
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: Webapp Security?

2003-07-02 Thread Raible, Matt
If you want to give user's dynamic permissions at runtime, you could add a
filter on top of container managed authentication (CMA).  CMA is nice b/c
you can use any authenticate with LDAP, a database (my example uses MySQL),
or a flat file - or even an NT Domain.

You'll probably have to setup some sort of system that defines who can see
what - so you'll eventually (probably) end up implementing some sort of
roles/groups - unless you're planning on checking for individual usernames
or some such attribute before allowing access.

Tomcat's security constraint stuff is the same thing as CMA.

HTH,

Matt

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 11:54 AM
To: Struts Users Mailing List
Subject: Re: Webapp Security?


Is it based on using security restraints and having all your users set into
groups in the tomcat-users.xml file?  If so our problem is we don't want to
have users based into groups but want to give permissions to users
individually to many different things.. and we want to store our users in a
database rather than tomcat's xml file.. if I am mistaken on how this works
please correct me =)  (I havn't actually looked at it, I've just looked at
tomcat's security restraint stuff before)
-David

- Original Message - 
From: Raible, Matt [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 11:47 AM
Subject: RE: Webapp Security?


 How about using container managed security with tomcat's realms?  It works
 great for me.

 Here's an example app if you're interested: http://tinyurl.com/fuvq

 HTH,

 Matt

 -Original Message-
 From: David Erickson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 02, 2003 11:27 AM
 To: Struts Mailing List
 Subject: Webapp Security?


 Just curious how others have gone about protecting the resouces within
their
 webapp.. in our personal setup we would like to control access to every
 resource if possible, we have our own custom login page that sets session
 variables, and pulls the data from the database.

 We can authenticate people with code in each of the actions, but nothing
is
 preventing someone from directly going to a jpg or a jsp file or anything
of
 the like.  What I thought about doing was subclassing the tomcat
connectors,
 the default, the jsp one, and the struts one and then authenticating each
 request.. but that adds a lot of overhead.  Anybody have any other good
 ideas?  We'd like to stick with just tomcat 4.1.24... no apache (no
 .htaccess).. what is everyone else implementing?
 -David


 -
 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]

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



RE: [ANNOUNCEMENT] Struts 1.1 Final released

2003-06-30 Thread Raible, Matt
Looks great guys - nice work!

test-all:

BUILD SUCCESSFUL
Total time: 5 minutes 35 seconds

Matt

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 1:39 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [ANNOUNCEMENT] Struts 1.1 Final released


The Struts team is proud, and extremely pleased, to announce the Final
release of Struts 1.1. This release includes significant new
functionality, as well as numerous fixes for bugs which were reported
against the previous release, and supersedes the earlier 1.0.2 version as
the latest official release of Struts from the Apache Software Foundation.

The binary distribution is available at:

http://www.apache.org/dist/jakarta/struts/binaries/

and the source distribution is available at:

http://www.apache.org/dist/jakarta/struts/source/

In addition, the library distribution, which contains updated binaries
without the sample applications, is available at:

http://www.apache.org/dist/jakarta/struts/library/

Details of the changes in this release are available in the Release Notes,
which can be found here:

http://jakarta.apache.org/struts/userGuide/release-notes-1.1.html

--
Martin Cooper

-
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: html:link forward to tiles definition?

2003-06-26 Thread Raible, Matt
How about the good ol' ForwardAction - you can specify a definition name as
it's parameter:

action
path=/mainMenu
type=org.apache.struts.actions.ForwardAction
parameter=.mainMenu/

HTH,

Matt

-Original Message-
From: Chip Paul [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 2:30 PM
To: Struts Users Mailing List
Subject: RE: html:link forward to tiles definition?


Because it's just a link from a jsp to another page.  I suppose I could make
an action that does nothing but that seems like overkill.  It's part of a
menu that goes to a more detailed menu so no action really takes place.
Maybe I should get rid of all of it and do a client side JS popup menu.

Chip

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 1:52 PM
To: 'Struts Users Mailing List'
Subject: RE: html:link forward to tiles definition?


Why wouldn't you want to use an ActionForward?
It's the struts way.

- Keith


-Original Message-
From: Chip Paul [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 2:28 PM
To: Struts User
Subject: html:link forward to tiles definition?


Is there a way to make a link (not an action forward) point to a tiles
definition, or do I have to create a wrapper jsp that inserts the def, and
use that page as the link?

Chip


-
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]

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



RE: Need a Tag

2003-06-24 Thread Raible, Matt
Here's a way to add asc/desc indicators to the display tag:

http://tinyurl.com/f4zy

HTH,

Matt

-Original Message-
From: Jason Meredith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 10:05 AM
To: Struts Users Mailing List
Subject: Need a Tag



Chaps

I have looked at the Display Tag, which is great, but does not help me
with some of my tables, due to the complexity involved.

I have to put Ascending/Descending into my table columns, but don't want to
have to code it, because there are so many tables, and each one is
different..

Is there a tag for ASC/DEC on columns? Also need one for exporting to
excel.

Regards

Jason Meredith
Telephone: 020 7676 8232




***
The e-mail and any attachments are confidential. They may contain
privileged information and are intended for the named addressee(s)
only. If you are not the intended recipient, please notify us
immediately and do not disclose, distribute, or retain this e-mail
or any part of it.

Unless expressly stated, opinions in this e-mail are those of the
individual sender and not of the FIMAT Group. We believe but do not
warrant that this e-mail and any attachments are virus free. 
You must therefore take full responsibility for virus checking. 
The FIMAT Group reserve the right to monitor e-mail communications
through its networks. 

Where this communication constitutes a financial promotion it is issued
and approved by Fimat International Banque S.A. (UK Branch) and is 
only intended for persons of a kind described in article 19(5) of the
Financial Services and Markets Act 2000 (Financial Promotion) Order
2001.  This information is not intended to be distributed to UK Private
Customers (as defined by the Financial Services Authority).

Fimat International Banque S.A. (UK Branch) whose registered branch
in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised
by the Commission Bancaire in France and by the UK Financial Services
Authority; regulated by the Financial Services Authority for the conduct of
UK Business and is entered in the Financial Services Authority's register
(Register Number 183415), access to which can be gained via the following
link: www.fsa.gov.uk/register/

Member and a SETS Participant of the London Stock Exchange (LSE).
Where this communication is confirming an on exchange transaction
(as defined by the LSE),the transaction is subject to the rules of the LSE.
Any information, opinions, estimates and forecasts contained in this 
document have been arrived at or obtained from public sources believed
to be reliable and in good faith which has not been independently 
verified and no warranty, express or implied, is made as to their accuracy,
completeness or correctness.  

This document is not an offer to sell or a solicitation to acquire or
dispose
of an interest in financial instruments. 

If you have received this transmission in error, please telephone
+44 020 7676 8999 immediately so that we can arrange for its return.
***


-
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: ExceptionConfig bundle Attribute Using Multiple Message Resourc es.

2003-06-24 Thread Raible, Matt
new ActionError(error.key) works fine - why not use that?  or use
MessageResources resources = getResources(request) like you normally would.
Here's a sample/discussion I recently posted:

http://raibledesigns.com/page/rd?anchor=re_using_struts_declared_exceptions

-Original Message-
From: Butash, Bob [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 10:41 AM
To: 'Struts Users Mailing List'
Subject: ExceptionConfig bundle Attribute  Using Multiple Message
Resourc es.


We are trying to create an ExceptionHandler that has some built in logging
capabilities and one of the items that we would like to log is the Formatted
message that is associated with the Error key.  So we are trying to
determine a way to get visibility to the message resources.  The
ExceptionHandler's execute method does not get the Action class therefore
there is no visibility to the ServletContext.  Does anyone have any ideas in
this area?

Also while we were investigating this we stumbled on a couple of questions
that we have not been able to resolve.

ExceptionConfig has a bundle attribute:
I have seen very little documentation as to what this is actually used for.
If I provide an actual ResourceBundle name here it is not used when
formatting the message to the view.  Does anyone know what this is intended
to be used for?

Taking advantage of multiple message resources:
It is clearly documented how you establish multiple message-resources, but I
have not been able to locate how you designate that you want to use a
secondary message resource.  For example I want to create an ActionError
with a message key that is obtained from a different message resource file,
how is this done?

Any help would be great, thanks in advance.

-
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: Struts-menu

2003-06-23 Thread Raible, Matt
The easiest thing to do is to use container-managed authentication - i.e.
Tomcat's JDBCRealm.  Since you'll have to hard-code your roles in web.xml -
why not code them in menu-config.xml as well.

Of course, you could allow all roles by using * in web.xml.  This is the way
I've done it and it might take a bit to setup, but who has permissions to
see what on a menu rarely changes (at least not on my projects).

HTH,

Matt

-Original Message-
From: Mykola Ostapchuk [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 10:07 AM
To: Struts Users Mailing List
Subject: Struts-menu


Hello,

I couldn't get any response from Struts-menu mail list, so I'm wandering if
somebody here could help me.
I'm new to struts-menu. I want to create a role-based expandable menu. I
have an existing system with Roles DB table.
How can I specify menu permissions for particular Role and save it to
menu-config.xml?
Does anybody has any examples?


-
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: Struts Menu question

2003-06-18 Thread Raible, Matt
The latest and greatest version of struts-menu has a roles attribute that
will hide menus if you're not in the list of roles.  

BTW - you'll probably get a quicker response for struts-menu on the
struts-menu mailing list. ;-)

Matt

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 9:21 AM
To: Struts Users Mailing List
Subject: Re: Struts Menu question


Yes, ofcourse
You can do this in your actions or in jsp (using struts logic tags, or use 
JSTL).

Cheers,

Harm de Laat
Informatiefabriek
The Netherlands




Filip Polsakiewicz [EMAIL PROTECTED] 
06/17/2003 10:01 AM
Please respond to
Struts Users Mailing List [EMAIL PROTECTED]


To
Struts Users Mailinglist [EMAIL PROTECTED]
cc

Subject
Struts Menu question






Hi,
i'm pretty new to Struts Menu and have one simple question before i start:

is it possible to display menuitems depending on some conditions. e.g. 
only
displaying an admin-menu if the user is logged on as Administrator?

thanks in advance

Filip Polsakiewicz


-
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: Making Value Objects Into Form Objects

2003-06-18 Thread Raible, Matt
When I first started developing with Struts (pre 1.0), I'd just have a
simple form with a DTO (VO back then) as a getter/setter on my form.  In the
last year, I've changed to have a DTO and a Form, where the DTO has the true
data types (Long, Date, etc) and the form has only Strings.  After doing it
both ways, it seems like the DTO as a getter/setter is really the better way
to go.  I'm not trying to say it's the *right* way according to the design
patterns, I'm just offering my $.02 from experience. I continue to do it the
BeanUtils.copyProperties() way, but the projects I work on that do it the
other way seem cleaner.

For an example of a DTO - BeanUtils.copyProperties() - Form, check out the
following links:

DTO - User.java (source: http://tinyurl.com/emo7)
Conversion - UserManagerImpl.java (source: http://tinyurl.com/emof - see
convert() method).  This extends BaseManager (http://tinyurl.com/emok),
which registers custom converters.  No DateConverter in this example, but
I've done it at my day job, so I know it's fairly easy.
Form - UserForm.java (generated via XDoclet from User.java)

Of course, you can download the entire project (that has these examples in
it) at http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse.

HTH,

Matt

-Original Message-
From: Blake Whitmore [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 9:55 AM
To: Struts Users Mailing List
Subject: RE: Making Value Objects Into Form Objects


Hey Alan,

It seems to be a pretty popular mechanism out there.
Anyone else have any other ideas? And Alan, dig deeper
into the API - it does more conversions than you think
:)  

For a while I had protected (my form would be in the
same package as my action) 'convienence methods' for
converting between value objects and actionforms. 
Later I went to using another layer of indirection
with a separate class.  But, using the BeanUtils has
made my life easier.  Be careful with 'Date' things
though.  Good luck.

-Blake

--- Weissman, Alan [EMAIL PROTECTED] wrote:
 Thanks Blake!
 This doesn't seem as comprehensive a tool or design
 pattern as I would have
 liked.  Is this what everyone is using?  It seems
 like a lot of work,
 especially because it doesn't do data type
 conversions for you!
 Alan
 
 -Original Message-
 From: Blake Whitmore
 [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 11:14 AM
 To: Struts Users Mailing List
 Subject: Re: Making Value Objects Into Form Objects
 
 
 Alan,
 
 A good tool for this is the

org.apache.commons.beanutils.BeanUtils.copyProperties()
 method.
 

http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
 /BeanUtils.html
 
 
 
 
 --- Weissman, Alan [EMAIL PROTECTED] wrote:
  
  Ok so I'm a little new to Struts but not J2EE and
  I've been noticing that my
  Value Objects that come out of EJB's in my data
  layer are the exact same
  objects as the ActionForms that are used by
  Strutsand I'm sure I'm not
  the first to notice this.
  
  So here's my question:  How can I make one class
  that can serve as both an
  ActionForm and a ValueObject?  
  
  The problems with solutions that I've brainstormed
  are this:
  
  1) I can't make my Value Objects extend ActionForm
  for obvious reasons.
  2) I would rather not use an interface to get
 around
  this issue because then
  I have two classes to maintain again.
  
  Thanks for any advice!
  
  Alan
  
  
 

-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 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]
 

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


__
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]

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



Is there a reason Struts doesn't trim incoming values?

2003-06-18 Thread Raible, Matt
I've recently found it necessary to use StringUtils.trim(value) on all my
ActionForm.set() methods.  While this is easy for me b/c I use XDoclet to
generate my ActionForms, I'm wondering if this can be an added feature to
Struts.  Or should I create a custom StringConverter that trims and Struts'
BeanUtils.copyProperties will use this?

Thanks,

Matt

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



RE: Is there a reason Struts doesn't trim incoming values?

2003-06-18 Thread Raible, Matt
I'm just trimming leading and trailing whitespace though - can you give an
example of a reason I might want to keep leading/trailing whitespace?

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:34 AM
To: Struts Users Mailing List
Subject: RE: Is there a reason Struts doesn't trim incoming values?


Not all whitespace is unwanted (just ask a Python geek) so to trim away all
whitespace out of fields would be a most unwise thing for the action forms
to do. Such behaviour should be restricted to your interface objects (those
objects from your system that directly communicate with Struts) where you
are free to make value judgements on whitespace.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense. - Sir Winston Churchill


-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:28 AM
To: '[EMAIL PROTECTED]'
Subject: Is there a reason Struts doesn't trim incoming values?


I've recently found it necessary to use 
StringUtils.trim(value) on all my
ActionForm.set() methods.  While this is easy for me b/c I use 
XDoclet to
generate my ActionForms, I'm wondering if this can be an added 
feature to
Struts.  Or should I create a custom StringConverter that 
trims and Struts'
BeanUtils.copyProperties will use this?

Thanks,

Matt

-
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: Is there a reason Struts doesn't trim incoming values?

2003-06-18 Thread Raible, Matt
Good point, and since it's easy for me to add/remove (with XDoclet), it's
nice to be aware of this.  Personally, I've never used a leading/trailing
space on any of my passwords, so I'm not too worried.

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:48 AM
To: Struts Users Mailing List
Subject: RE: Is there a reason Struts doesn't trim incoming values?


Matt,

The only example that I can think of is a password field. On most operating
systems (and especially Unix ones) a space is a valid password character and
there is no reason why one could not go at the start or finish of a field.
As a general web application framework, Struts cannot make judgement calls
on what to do with the data that it transfers within action forms.

I know that within our application we trim the whitespace from our text
inputs, but I would be very upset if Struts did it for me (a user selectable
option would be fine) because it has no business making modifications to my
data.

Simon

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:37 AM
To: 'Struts Users Mailing List'
Subject: RE: Is there a reason Struts doesn't trim incoming values?


I'm just trimming leading and trailing whitespace though - can 
you give an
example of a reason I might want to keep leading/trailing whitespace?

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:34 AM
To: Struts Users Mailing List
Subject: RE: Is there a reason Struts doesn't trim incoming values?


Not all whitespace is unwanted (just ask a Python geek) so to 
trim away all
whitespace out of fields would be a most unwise thing for the 
action forms
to do. Such behaviour should be restricted to your interface 
objects (those
objects from your system that directly communicate with 
Struts) where you
are free to make value judgements on whitespace.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense. - Sir Winston Churchill


-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:28 AM
To: '[EMAIL PROTECTED]'
Subject: Is there a reason Struts doesn't trim incoming values?


I've recently found it necessary to use 
StringUtils.trim(value) on all my
ActionForm.set() methods.  While this is easy for me b/c I use 
XDoclet to
generate my ActionForms, I'm wondering if this can be an added 
feature to
Struts.  Or should I create a custom StringConverter that 
trims and Struts'
BeanUtils.copyProperties will use this?

Thanks,

Matt

-
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]



-
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: StrutsTestCase question

2003-06-18 Thread Raible, Matt
I use it daily (hourly?) and it works great for me.  Here's a sample
TestCase: http://tinyurl.com/emwp

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:55 AM
To: Struts Mailing List (E-mail)
Subject: StrutsTestCase question


Has anyone had any luck getting StrutsTestCase to work? It's an extension of
JUnit, which we already use on our project, but I have had no luck getting
it to run. I've read that HowTo and the FAQ and the Intro and looked at the
sourceforge forums, but have found nothing that helps.

Time to call for International Rescue! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense. - Sir Winston Churchill

-
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: How to instantiate a DynaActionForm?

2003-06-18 Thread Raible, Matt
http://www.mail-archive.com/[EMAIL PROTECTED]/msg12356.html

-Original Message-
From: Joseph Yang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:07 AM
To: 'Struts Users Mailing List'
Subject: How to instantiate a DynaActionForm?


Hello,

I have two pages: login.jsp and userProfile.jsp

I defined two DynaActionForm(s) in struts-config.xml: loginForm and
userProfileForm

Now inside loginAction class, after handle the authentication, I want to get
the user profile information from database, then instantiate userProfileForm
and put it into the request. what I did was:

DynaActionForm form = new DynaActionForm();
form.set(firstName, John);
form.set(lastName, Doe);
...
request.setAttribute(userProfileForm, form);

The setters throw Null pointer exception

Please help me out here

Thanks





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



RE: StrutsTestCase question

2003-06-18 Thread Raible, Matt
One difference I noticed is that you're using the Mock approach, while I'm
using the in-container approach.  Here's the relevant part of my JUnit task
(adapted from Erik Hatcher's JDWA book).  This is actually used to run *all*
my tests - JUnit/Cactus/StrutsTestCase/etc.

junit printsummary=no
errorProperty=test.failed
failureProperty=test.failed
fork=${junit.fork}
classpath
pathelement path=${additional.src.dirs}/
path refid=test.classpath/
pathelement location=${build.dir}/${module}/classes/
pathelement location=${test.dir}/${module}/classes/
pathelement path=${java.class.path}/
/classpath

formatter type=xml/
formatter type=plain/
batchtest todir=${test.dir}/data if=testcase
fileset dir=${test.dir}/${module}/classes
includes=**/*${testcase}*.class
/
/batchtest
batchtest todir=${test.dir}/data unless=testcase
fileset dir=${test.dir}/${module}/classes
includes=**/*Test.class
/
/batchtest
/junit

HTH,

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:14 PM
To: Struts Users Mailing List
Subject: RE: StrutsTestCase question


Matt,

I think my issue is more of configuration, the test cases look pretty
straightforward themselves.

Simon

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:14 PM
To: 'Struts Users Mailing List'
Subject: RE: StrutsTestCase question


I use it daily (hourly?) and it works great for me.  Here's a sample
TestCase: http://tinyurl.com/emwp

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:55 AM
To: Struts Mailing List (E-mail)
Subject: StrutsTestCase question


Has anyone had any luck getting StrutsTestCase to work? It's 
an extension of
JUnit, which we already use on our project, but I have had no 
luck getting
it to run. I've read that HowTo and the FAQ and the Intro and 
looked at the
sourceforge forums, but have found nothing that helps.

Time to call for International Rescue! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense. - Sir Winston Churchill

-
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]

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



RE: StrutsTestCase question

2003-06-18 Thread Raible, Matt
Try explicitly putting it in your classpath - that's what I do - rather than
relying on Ant's classloader.

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:58 PM
To: Struts Users Mailing List
Subject: RE: StrutsTestCase question


Matt,

I'm just not getting it. But I am getting a NoClassDefFoundError on
MocStrutsTestCase and there are lots of classloader references in the stack
trace. I have strutstest-2.0.0.jar in my ant lib directory, so why can't
junit see it?

Simon

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:20 PM
To: 'Struts Users Mailing List'
Subject: RE: StrutsTestCase question


One difference I noticed is that you're using the Mock 
approach, while I'm
using the in-container approach.  Here's the relevant part of 
my JUnit task
(adapted from Erik Hatcher's JDWA book).  This is actually 
used to run *all*
my tests - JUnit/Cactus/StrutsTestCase/etc.

junit printsummary=no
errorProperty=test.failed
failureProperty=test.failed
fork=${junit.fork}
classpath
pathelement path=${additional.src.dirs}/
path refid=test.classpath/
pathelement 
location=${build.dir}/${module}/classes/
pathelement location=${test.dir}/${module}/classes/
pathelement path=${java.class.path}/
/classpath

formatter type=xml/
formatter type=plain/
batchtest todir=${test.dir}/data if=testcase
fileset dir=${test.dir}/${module}/classes
includes=**/*${testcase}*.class
/
/batchtest
batchtest todir=${test.dir}/data unless=testcase
fileset dir=${test.dir}/${module}/classes
includes=**/*Test.class
/
/batchtest
/junit

HTH,

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:14 PM
To: Struts Users Mailing List
Subject: RE: StrutsTestCase question


Matt,

I think my issue is more of configuration, the test cases look pretty
straightforward themselves.

Simon

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:14 PM
To: 'Struts Users Mailing List'
Subject: RE: StrutsTestCase question


I use it daily (hourly?) and it works great for me.  Here's a sample
TestCase: http://tinyurl.com/emwp

Matt

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:55 AM
To: Struts Mailing List (E-mail)
Subject: StrutsTestCase question


Has anyone had any luck getting StrutsTestCase to work? It's 
an extension of
JUnit, which we already use on our project, but I have had no 
luck getting
it to run. I've read that HowTo and the FAQ and the Intro and 
looked at the
sourceforge forums, but have found nothing that helps.

Time to call for International Rescue! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense. - Sir Winston Churchill

-
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]

-
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: Making Value Objects Into Form Objects

2003-06-18 Thread Raible, Matt
You are correct.  UserFormEx is an extension of the generated UserForm.
Reason:  I don't want to put any form-specific stuff in my User object (why
should it care about UI stuff like indexed properties and the reset() and
validate() method).  This allows me to *Ex*tend the form. ;0)

I only need to create an extension form when I have indexed properties,
custom validation (the validate() method) or checkboxes (the reset()
method).

HTH,

Matt

-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 4:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Making Value Objects Into Form Objects


Hi Matt

I was just browsing thru your source code.  I am not familiar with XDoclet
but have I got this correct...

You have UserForm (generated from User using XDoclet) which extends BaseForm
and then have UserFormEx extending UserForm.

Boy that was a mouthful :-)

Cheers
Shane



Of course, you can download the entire project (that has these examples in
it) at http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse.

HTH,

Matt



-
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: StrutsMenu 1.2?

2003-06-16 Thread Raible, Matt
Nope.  But since it *is* an open source project, feel free to add this
feature ;-)

Matt

-Original Message-
From: William Salvucci [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 1:19 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: StrutsMenu 1.2?


Can struts-tiles be used to implement dynamic menus?

 [EMAIL PROTECTED] 06/09/03 09:42AM 
You might consider struts menu but you would have to heavily modify the
menu.  Basically, the menu structure runs off of a collection of beans which
you would have to dynamically re-create and modify the menu displayers to
pick up your dynamic menus.  If you did do this in conjuction with struts
menu, it is the most asked for feature and the code would be a welcome
addition.

If the dynamic aspect of the menu can be implemented with a dynamic root
menu, then struts menu is a very viable option.

Edgar

 -Original Message-
 From: Bjorn T Johansen [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 09, 2003 6:33 AM
 To: 'Struts Users Mailing List'
 Subject: StrutsMenu 1.2?
 
 
 I need some kind of dynamic generation of menu items in my 
 webapp, is StrutsMenu the way to go or should I look into 
 something else, or implement it myself?
 
 
 Regards,
 
 BTJ
 
 -- 
 --
 --
 ---
 Bjørn T Johansen (BSc,MNIF)
 Executive Manager
 [EMAIL PROTECTED]  Havleik Consulting
 Phone : +47 67 54 15 17 Conradisvei 4
 Fax : +47 67 54 13 91   N-1338 Sandvika
 Cellular : +47 926 93 298   http://www.havleik.no 
 --
 --
 ---
 The stickers on the side of the box said Supported 
 Platforms: Windows 98, Windows NT 4.0, Windows 2000 or 
 better, so clearly Linux was a supported platform.
 --
 --
 ---
 
 

-
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]



[Struts EL Tags] Is it possible to replace the standard tags?

2003-06-16 Thread Raible, Matt
Is it possible to replace:

%@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean %

with:

%@ taglib uri=http://jakarta.apache.org/struts/tags-bean-el; prefix=bean
%

And get all of the same functionality that tags-bean has?

Thanks,

Matt

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



RE: [Struts EL Tags] Is it possible to replace the standard tags?

2003-06-16 Thread Raible, Matt
Makes sense.  Good thing I have a common/taglibs.jsp file - this sucker is
getting huge!

%@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean %
%@ taglib uri=http://jakarta.apache.org/struts/tags-bean-el;
prefix=bean-el %
%@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html %
%@ taglib uri=http://jakarta.apache.org/struts/tags-html-el;
prefix=html-el %
%@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic
%
%@ taglib uri=http://jakarta.apache.org/struts/tags-logic-el;
prefix=logic-el %
%@ taglib uri=http://jakarta.apache.org/struts/tags-nested;
prefix=nested %
%@ taglib uri=http://jakarta.apache.org/struts/tags-tiles; prefix=tiles
%
%@ taglib uri=http://jakarta.apache.org/taglibs/display; prefix=display
%
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0.1; prefix=s
%


-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Monday, June 16, 2003 8:40 AM
To: 'Struts Users Mailing List'
Subject: RE: [Struts EL Tags] Is it possible to replace the standard
tags?


Matt wrote:
 Is it possible to replace:
 %@ taglib uri=http://jakarta.apache.org/struts/tags-bean;
prefix=bean
%
 with:
 %@ taglib uri=http://jakarta.apache.org/struts/tags-bean-el;
prefix=bean %
 And get all of the same functionality that tags-bean has?

Perhaps I misunderstand, but the point of the Struts-EL tags was to port
only that which JSTL could not handle.  What I did was globally change
'bean' to 'bean-el' in a JSP, then set about fixing the compilation
errors
by changing (for example) bean:write to c:out.  Similarly,
logic:iterate changes to c:forEach, etc.  

HTH,
-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Public Affairs, Information Resources Management
Arizona State University, Tempe AZ 

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



RE: struts menu 1.2 question

2003-06-16 Thread Raible, Matt
There is a demo at http://raibledesigns.com/struts-menu and you can also
download the latest CVS snapshot from here at
http://raibledesigns.com/struts-menu/struts-menu.war

HTH,

Matt

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Monday, June 16, 2003 9:47 AM
To: [EMAIL PROTECTED]
Subject: struts menu 1.2 question


Hi,
has anyone used struts menu to build drop down menu to
any level, 
I was trying to use coolmenu3 and it fails when i go
to levels down, 
any  suggestions, about it

Ashish

=
A$HI$H

__
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]

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



RE: [OT] - Lucene Intergration with Struts/Struts Jobs

2003-06-13 Thread Raible, Matt
Check out Erik Hatcher's example app:

http://www.ehatchersolutions.com/JavaDevWithAnt/

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 1:43 AM
To: Struts Users Mailing List
Subject: Re: [OT] - Lucene Intergration with Struts/Struts Jobs


I don't know how tied you are to staying where you're based, but in 
jobserve, I put in struts and it came back with 49 hits, mostly GB though.

Pat Quinn wrote:
 Hey guys, I know its not really a struts question but is anyone out 
 there using Jakarta Lucene with struts. I've started looking into it to 
 enable full text searching of product catalogues rather than screwing 
 around with SQL Like statements.
 
 Any Comments??
 
 Anyone know where i might find some Struts work Contract/Permanent... 
 theres not much of a demand here in Ireland for struts skills at the 
 moment, just been laid off so its time to getting looking... any 
 suggestions? I guess it all happening in the USA if its happening 
 anywhere what's the chances of getting company visa sponsorship in 
 the USA theses days?
 
 _
 Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
 http://join.msn.com/?page=features/featuredemail
 
 
 -
 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: struts menu tutorial??

2003-06-13 Thread Raible, Matt
How about a demo site (http://raibledesigns.com/struts-menu) and a project
site (http://sf.net/projects/struts-menu)?

HTH,

Matt

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 10:00 AM
To: [EMAIL PROTECTED]
Subject: struts menu tutorial??


Hi,
does any one have a struts menu tutorial or any web
site or book where i can get it, please let me the
location or book or if anyone has  written one

Ashish

=
A$HI$H

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-
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: Correct validator DTD

2003-06-11 Thread Raible, Matt
This one seems to work for me:

!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.1//EN
  http://jakarta.apache.org/commons/dtds/validator_1_1.dtd;

With struts 1.1 RC2.

Matt

-Original Message-
From: Rob Leland [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 9:41 PM
To: Struts Users Mailing List
Subject: Re: Correct validator DTD


Raible, Matt wrote:

Which is the correct DTD for the Validator:

!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.0//EN
  http://jakarta.apache.org/commons/dtds/validator_1_0.dtd;


If you are using Validator with struts 1.1 RC 1 or RC2  then it is

  http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd



OR 1.1?

!DOCTYPE form-validation PUBLIC 
-//Apache Software Foundation//DTD Struts Validation Configuration
1.1//EN
http://jakarta.apache.org/struts/dtds/validation_1_1.dtd;


This is used if you are using the Validator nightly build by itself or have
rebuilt struts from its source code against the nightly validator.

-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]



Correct validator DTD

2003-06-10 Thread Raible, Matt
Which is the correct DTD for the Validator:

!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.0//EN
  http://jakarta.apache.org/commons/dtds/validator_1_0.dtd;

OR 1.1?

!DOCTYPE form-validation PUBLIC 
-//Apache Software Foundation//DTD Struts Validation Configuration
1.1//EN
http://jakarta.apache.org/struts/dtds/validation_1_1.dtd;

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



RE: Using Validation Framework to control display

2003-06-09 Thread Raible, Matt
I've done this with LabelTag (http://tinyurl.com/dw0p), originally written
by Erik Hatcher.  It basically adds a * for required fields, as well as a
class=required to the label element.  It also shows the text as red (or
whatever your label.error CSS class says) when their is a server-side
validation error.  Works great for me, I've even modified it to show a
warning icon when database validation errors occur and are looked up from a
database table (custom code that wouldn't apply here).

IMO, there's no reason to have a combined label with a text field (i.e.
html:text property=lastName label=userForm.lastName/ since often
you'll want to put these in a table in separate td's.  

HTH,

Matt

-Original Message-
From: Molitor, Stephen L [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 5:03 PM
To: 'Struts Users Mailing List'
Subject: Using Validation Framework to control display


 Has anyone tried using the validation framework to control the display of
 the JSP?  For example, if I mark a field as required in validation.xml,
 maybe I could write my own form tag that puts a red asterisk next to the
 edit box.  It might also be nice to configure things like
 enabled/disabled, perhaps by firing off custom rule classes, that check
 security or whatever.  
 
 Thanks!
 
 Steve
 

-
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: html:options for simple 1-50 menu

2003-06-09 Thread Raible, Matt
Use JSTL's forEach with begin and end attributes.

c:forEach begin=0 end=50 step=1 var=option
c:out value=${option}/
/c:forEach

-Original Message-
From: Barry Volpe [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 5:08 PM
To: Struts Users Mailing List
Subject: html:options for simple 1-50 menu


What is the easiest way to create a menu with name and values of 1-50.

Should I do this strictly in my JSP?  Should I use a % for loop %?

Seems like alot of work to use html:options Collection just to generate
numbers 1-50.

Barry



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



RE: commons-logging problem in 1.1 RC2

2003-06-09 Thread Raible, Matt
Yep.

-Original Message-
From: Hohlen, John C [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 5:14 PM
To: 'Struts Users Mailing List'
Subject: RE: commons-logging problem in 1.1 RC2


Anyone know if RC 2 works with the Commons Logging shipped with RC 1?

Thanks,

JOHN

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 5:39 PM
To: Struts Users Mailing List
Subject: Re: commons-logging problem in 1.1 RC2


same here, I had to replace an older version to common-loggin to get my app
working ing rc2

-D
- Original Message - 
From: Raible, Matt [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 3:10 PM
Subject: commons-logging problem in 1.1 RC2


 I found that this release candidate has a (seemingly) bad
 commons-logging.jar.

 I have a nightly build of Struts (20030326) and it's commons-logging.jar
is
 31K.  The one shipped with 1.1 RC2 is only 22K and none of my JUnit tests
 emit any log messages.  If I replace 1.1 RC2's commons-logging.jar with
the
 one that's 31K, everything works as expected.

 Looks like the following files are missing:

 Log4jCategoryLog.class
 Log4jFactory.class
 Log4JLogger.class
 LogKitLogger.class

 package.html

 Here's a screenshot of the diff between the two: http://tinyurl.com/dvtw

 Is this as designed?

 Thanks,

 Matt


 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2003 1:29 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: [ANNOUNCEMENT] Struts 1.1 Release Candidate 2 released


 The Struts team is proud to announce the release of Struts 1.1 Release
 Candidate 2. This release includes some new functionality, but mostly just
 fixes for a number of bugs which were reported against earlier versions.
 The Struts Team believes that this release is ready for prime time, hence
 its designation as a release candidate.

 The binary distribution is available at:

 http://www.apache.org/dist/jakarta/struts/binaries/

 and the source distribution is available at:

 http://www.apache.org/dist/jakarta/struts/source/

 In addition, the library distribution, which contains updated binaries
 without the sample applications, is available at:

 http://www.apache.org/dist/jakarta/struts/library/

 Details of the changes in this release are available in the Release Notes,
 which can be found here:

 http://jakarta.apache.org/struts/userGuide/release-notes-1.1-rc2.html

 Special thanks to Ted Husted for his help in preparing this release.

 --
 Martin Cooper

 -
 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]

-
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]



commons-logging problem in 1.1 RC2

2003-06-09 Thread Raible, Matt
I found that this release candidate has a (seemingly) bad
commons-logging.jar.

I have a nightly build of Struts (20030326) and it's commons-logging.jar is
31K.  The one shipped with 1.1 RC2 is only 22K and none of my JUnit tests
emit any log messages.  If I replace 1.1 RC2's commons-logging.jar with the
one that's 31K, everything works as expected.

Looks like the following files are missing:

Log4jCategoryLog.class
Log4jFactory.class
Log4JLogger.class
LogKitLogger.class

package.html

Here's a screenshot of the diff between the two: http://tinyurl.com/dvtw

Is this as designed?

Thanks,

Matt


-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 1:29 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [ANNOUNCEMENT] Struts 1.1 Release Candidate 2 released


The Struts team is proud to announce the release of Struts 1.1 Release
Candidate 2. This release includes some new functionality, but mostly just
fixes for a number of bugs which were reported against earlier versions.
The Struts Team believes that this release is ready for prime time, hence
its designation as a release candidate.

The binary distribution is available at:

http://www.apache.org/dist/jakarta/struts/binaries/

and the source distribution is available at:

http://www.apache.org/dist/jakarta/struts/source/

In addition, the library distribution, which contains updated binaries
without the sample applications, is available at:

http://www.apache.org/dist/jakarta/struts/library/

Details of the changes in this release are available in the Release Notes,
which can be found here:

http://jakarta.apache.org/struts/userGuide/release-notes-1.1-rc2.html

Special thanks to Ted Husted for his help in preparing this release.

--
Martin Cooper

-
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: concept for active tab

2003-06-06 Thread Raible, Matt
In struts-menu, the way I've implemented active tab is done using
JavaScript - and it's none obtrusive.  Basically, I set an onclick event on
each tab (an li) when the page loads.  Clicking on the tab then sets a
cookie.  When the page loads, the active tab is set by comparing the current
URL with the URLs in each menu item.  If duplicates are found (highly likely
since you might want the same menu item under different tabs), the cookie is
used.  This could also done in Java (setting the .selected CSS class), but
I like CSS and JavaScript, so I did it that way.

All the JavaScript can be viewed in this file:
http://raibledesigns.com/struts-menu/scripts/tabs.js

More info at http://raibledesigns.com/struts-menu/tabbedMenu.jsp?Home

HTH,

Matt

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 1:36 AM
To: Struts Users Mailing List
Subject: RE: concept for active tab


Im not using tiles and tiles tabs but my app does have navigation links that
need to be highlighted.
These links come from a config file (navigation-config.xml) , which
specifies such things as the links label key and the url to which it points
(usually an action - but often with appended url parameters). (Most of my
links are in a tree and the navigation renderer uses the navigation config
to construct a javascript tree widget)

To work out which link to highlight , the renderer will compare the request
path with whats in the config. It also does some comparisons based on the
appended parameters so it knows which link to highlight when several point
at the same base action path. It seems to work quite well.

-Original Message-
From: Dan Allen [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 June 2003 15:33
To: Struts-User List
Subject: concept for active tab


I have a site that has 6 or so main tabs.  I was thinking how I
would know which tab was active based on the page the user was
currently visiting.  I came up with one idea, but perhaps other
people have ideas as well.

In my tiles I set aside a variable name 'section' which by default
is Home.  In each jsp page, I define the section variable to
equivalent to the section the page belongs to, else it will default
to Home.  Then, when I render my master layout with the
navigation, I check to see if the section variable is equivalent to
the tab and if so, I display a highlighted tab.  Instead of putting
it in each jsp file I suppose I could make a mapping file of some
sort, but I haven't gotten that far yet.

Any other ideas?

Dan

--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, [EMAIL PROTECTED]
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Real programmers don't change their wardrobe too often: there
are no clothes stores that are open at two o'clock in the morning.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
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: validator with password fields

2003-06-04 Thread Raible, Matt
You're probably doing something wrong - it works fine for me.

Matt

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:42 AM
To: Struts Users Mailing List
Subject: validator with password fields


Hi all,

when trying to make a password field required using the validator, the
javascript doesn't seem to work. 
The server side validation does work. Strangely, the javascript
validation works in the same form for text fields.

Anyone ever encountered this before?

Am I just doing something wrong?
brian

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



How we solved our tomcat/oracle connectivity issues

2003-06-03 Thread Raible, Matt
A while back, I e-mailed this list regarding Tomcat - Oracle connectivity
issues across a firewall.  Basically, the firewall would kill connection
pool-based connections after 90 minutes.  We finally figured out a solution
(rather than workarounds) - and the best news is - it's from the Oracle
side, not on the Tomcat/application side.

Read more here: http://tinyurl.com/d9cv

HTH,

Matt


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



ValidatorUtil deprecated?

2003-06-03 Thread Raible, Matt
I just downloaded and installed Struts from last night (6/02/2003).  Now I'm
getting deprecation errors for ValidationUtil, yet the API docs say nothing
about what it's been replaced with (http://tinyurl.com/dac9).  Any ideas?

Also, ValidatorResources has a couple deprecated methods too.

ValidatorResources.get(java.util.Locale,java.lang.Object)
  .getFieldMap()

Thanks,

Matt


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



Using the Validator outside of Struts

2003-05-31 Thread Raible, Matt
I'm trying to use the Validator to validate that a user has entered their
information in a self-registration servlet.

However, I'm getting a NullPointerException at the following line when
running a test using Cactus:

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

Error:

[junit] java.lang.NullPointerException
[junit] at
javax.servlet.GenericServlet.getServletContext()Ljavax.servlet.ServletContex
t;(Ge
nericServlet.java:204)
[junit] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execute(Ljav
ax.se
rvlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Reg
istrationServlet.java:12
2)

Full code:

ValidatorResources resources = new ValidatorResources();

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

ValidatorResourcesInitializer.initialize(resources, rules);

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

ValidatorResourcesInitializer.initialize(resources, forms);

// Create a validator with the userForm
Validator validator = new Validator(resources, userFormEx);

// Tell the validator which bean to validate against.  
validator.addResource(Validator.BEAN_KEY, userForm);

// Validate the checkoutForm object and store the validation results
try {
// Execute the validation rules
ValidatorResults results = validator.validate();

if (log.isDebugEnabled()) {
log.debug(results.getResultValueMap());
}
} catch (ValidatorException ex) {
// Log the validation exception
log.warn(A validation exception occurred, ex);
}

Any help is appreciated.

Thanks,

Matt


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



RE: Why do ActionForms allow non-string properties?

2003-05-31 Thread Raible, Matt

 Though, there is still a ton maintenance going on here. We have the 
 properties defined in the HTML form, and the struts-config, and in the 
 validator.xml, and then in some type of corresponding property in the 
 business bean, not to mention the actual data store. So to add a 
 field, we have to update five (or more) components.


In my XDoclet-enabled apps, if I had a new property, I only have to add it
in two places - in my POJO and in my JSP.  validation.xml is generated, as
well as the ActionForm.  Using Erik Hatcher's StrutsGen Tool, you can also
generate a skeleton JSP from the generated ActionForm - but this is only
logical to do the first time.  I don't know if it'll ever be possible to
eliminate the editing of the JSP - unless we add an XML file or something in
the ActionForm that specifies field order, field type, etc.  Still, there's
so much custom stuff (label taglib, javascript pop-up calendars) that I put
into forms, I doubt this will ever be possible.

IMO, XDoclet is the best thing that's happened to Java Development since
Ant.

Matt




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



RE: Login

2003-05-31 Thread Raible, Matt
I prefer form-based authentication - for an advanced example, see
http://static.raibledesigns.com/downloads - download security-example.
Documentation will be coming on this project soon in Professional JSP 2.0 by
Apress (formerly was going to be by Wrox).

HTH,

Matt

-Original Message-
From: Jonathan Holloway [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: Login 


Could somebody tell me what the best way to implement a login mechanism is
into a Struts application.  

Is the use of a custom login tag at the top of every page recommended or is
there a better way.  We already have the server side functionality present
but want to know the best way to enforce this in the JSP's and Action
classes.

Many thanks,
Jonathan Holloway.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

-
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]



NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
In a regular servlet, I'm trying to do the following:

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
ideas why this may be happening?

Thanks,

Matt


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



RE: NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
I'm doing this in an execute(request,response) method that both doGet() and
doPost() call.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:39 PM
To: Struts Users Mailing List
Subject: Re: NPE with getResourceAsStream


Are you doing this in the constructor or an overridden init(ServletConfig)
that
hasn't invoked super.init(config)?

Quoting Raible, Matt [EMAIL PROTECTED]:

 In a regular servlet, I'm trying to do the following:
 
 InputStream forms =
  
 getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
 
 But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
 ideas why this may be happening?
 
 Thanks,
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
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: NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
It turned out to be an issue with my Cactus TestCase.  See solution marked
-- below

protected void setUp() throws Exception {
super.setUp();
servlet = new RegistrationServlet();
servlet.init(config); -- Adding this fixed the problem.
}

Thanks for kicking my brain into gear.

Matt

-Original Message-
From: Raible, Matt 
Sent: Friday, May 30, 2003 12:55 PM
To: 'Struts Users Mailing List'
Subject: RE: NPE with getResourceAsStream


I'm doing this in an execute(request,response) method that both doGet() and
doPost() call.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:39 PM
To: Struts Users Mailing List
Subject: Re: NPE with getResourceAsStream


Are you doing this in the constructor or an overridden init(ServletConfig)
that
hasn't invoked super.init(config)?

Quoting Raible, Matt [EMAIL PROTECTED]:

 In a regular servlet, I'm trying to do the following:
 
 InputStream forms =
  
 getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
 
 But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
 ideas why this may be happening?
 
 Thanks,
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
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: Using the Validator outside of Struts

2003-05-31 Thread Raible, Matt
Ok, now that I've gotten past super.init(config), onto the validator not
working.  I get the following error:

 [java] 2003-05-30 14:12:43,734 ERROR [Ajp13Processor[8009][0]]
Validator.validateFieldForRule(4
61) | reflection: null
 [java] java.lang.reflect.InvocationTargetException
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 [java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java
:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:324)
 [java] at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:4
54)
 [java] at
org.apache.commons.validator.Validator.validateField(Validator.java:544)
 [java] at
org.apache.commons.validator.Validator.validate(Validator.java:582)
 [java] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execute(Regi
strat
ionServlet.java:146)

From the following code:

ValidatorResources resources = new ValidatorResources();

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

ValidatorResourcesInitializer.initialize(resources, rules);

InputStream custom =
getServletContext().getResourceAsStream(/WEB-INF/validator-rules-custom.xml
);

ValidatorResourcesInitializer.initialize(resources, custom);

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

ValidatorResourcesInitializer.initialize(resources, forms);

// Create a validator with the userForm
Validator validator = new Validator(resources, userFormEx);

// Tell the validator which bean to validate against.
validator.addResource(Validator.BEAN_KEY, userForm);

// Validate the checkoutForm object and store the validation results
try {
// Execute the validation rules
146:ValidatorResults results = validator.validate(); -- Error
occurs here

if (log.isDebugEnabled()) {
log.debug(results.getResultValueMap());
}
} catch (ValidatorException ex) {
// Log the validation exception
log.warn(A validation exception occurred, ex);
}

The validator is working fine in my Action classes, just not outside.  I'm
trying to use it in a servlet that's not an Action because all my actions
(/do/*) are protected by form-based authentication.  This servlet is used
for users to self-register.  If anyone has an elegant solutions to
self-register (not using a servlet), let me know.

Thanks,

Matt

-Original Message-
From: Raible, Matt 
Sent: Friday, May 30, 2003 7:13 AM
To: '[EMAIL PROTECTED]'
Subject: Using the Validator outside of Struts


I'm trying to use the Validator to validate that a user has entered their
information in a self-registration servlet.

However, I'm getting a NullPointerException at the following line when
running a test using Cactus:

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

Error:

[junit] java.lang.NullPointerException
[junit] at
javax.servlet.GenericServlet.getServletContext()Ljavax.servlet.ServletContex
t;(Ge
nericServlet.java:204)
[junit] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execute(Ljav
ax.se
rvlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Reg
istrationServlet.java:12
2)

Full code:

ValidatorResources resources = new ValidatorResources();

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

ValidatorResourcesInitializer.initialize(resources, rules);

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

ValidatorResourcesInitializer.initialize(resources, forms);

// Create a validator with the userForm
Validator validator = new Validator(resources, userFormEx);

// Tell the validator which bean to validate against.  
validator.addResource(Validator.BEAN_KEY, userForm);

// Validate the checkoutForm object and store the validation results
try {
// Execute the validation rules
ValidatorResults results = validator.validate();

if (log.isDebugEnabled()) {
log.debug(results.getResultValueMap());
}
} catch (ValidatorException ex) {
// Log the validation exception
log.warn(A validation exception occurred, ex);
}

Any help is appreciated.

Thanks,

Matt


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

RE: Using the Validator outside of Struts

2003-05-31 Thread Raible, Matt
I'm not using Struts for the self registration.  I'm protecting all of the
struts actions (/do/*), so I cannot use struts w/o logging in.  I cannot
login if I don't have a username...

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 2:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Using the Validator outside of Struts


basicPortal has self register example code, w/validation using Struts 
JSP, you can click join, on basebeans.com and then click login (and then 
look under the monkey, I kill myslef).
So then you have a default role (you can aprove content if you are not 
admin role).

I can't imagine where you might be stuck, but here is the jsp:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/WEB-INF/portle
ts/memberSec/User.jsp

.V


Raible, Matt wrote:

Ok, now that I've gotten past super.init(config), onto the validator not
working.  I get the following error:

 [java] 2003-05-30 14:12:43,734 ERROR [Ajp13Processor[8009][0]]
Validator.validateFieldForRule(4
61) | reflection: null
 [java] java.lang.reflect.InvocationTargetException
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9
)
 [java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l
..java
:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:324)
 [java] at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:
4
54)
 [java] at
org.apache.commons.validator.Validator.validateField(Validator.java:544)
 [java] at
org.apache.commons.validator.Validator.validate(Validator.java:582)
 [java] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execute(Reg
i
strat
ionServlet.java:146)

From the following code:

ValidatorResources resources = new ValidatorResources();

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

ValidatorResourcesInitializer.initialize(resources, rules);

   InputStream custom =
getServletContext().getResourceAsStream(/WEB-INF/validator-rules-custom.xm
l
);
   
   ValidatorResourcesInitializer.initialize(resources, custom);
   
InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

ValidatorResourcesInitializer.initialize(resources, forms);

// Create a validator with the userForm
Validator validator = new Validator(resources, userFormEx);

// Tell the validator which bean to validate against.
validator.addResource(Validator.BEAN_KEY, userForm);

// Validate the checkoutForm object and store the validation
results
try {
// Execute the validation rules
146:ValidatorResults results = validator.validate(); -- Error
occurs here

if (log.isDebugEnabled()) {
log.debug(results.getResultValueMap());
}
} catch (ValidatorException ex) {
// Log the validation exception
log.warn(A validation exception occurred, ex);
}

The validator is working fine in my Action classes, just not outside.  I'm
trying to use it in a servlet that's not an Action because all my actions
(/do/*) are protected by form-based authentication.  This servlet is used
for users to self-register.  If anyone has an elegant solutions to
self-register (not using a servlet), let me know.

Thanks,

Matt

-Original Message-
From: Raible, Matt 
Sent: Friday, May 30, 2003 7:13 AM
To: '[EMAIL PROTECTED]'
Subject: Using the Validator outside of Struts


I'm trying to use the Validator to validate that a user has entered their
information in a self-registration servlet.

However, I'm getting a NullPointerException at the following line when
running a test using Cactus:

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

Error:

[junit] java.lang.NullPointerException
[junit] at
javax.servlet.GenericServlet.getServletContext()Ljavax.servlet.ServletConte
x
t;(Ge
nericServlet.java:204)
[junit] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execute(Lja
v
ax.se
rvlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Re
g
istrationServlet.java:12
2)

Full code:

ValidatorResources resources = new ValidatorResources();

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

ValidatorResourcesInitializer.initialize(resources, rules);

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

ValidatorResourcesInitializer.initialize(resources, forms);

// Create a validator with the userForm
Validator validator = new Validator(resources

RE: Using the Validator outside of Struts

2003-05-31 Thread Raible, Matt
My url-pattern is /do/* - where you have individual actions listed.

I'm abandoning my try at using the validation outside of struts and
instead going for initializing it like the PlugIn does.  However, I get a
NPE in the Validator's Recources.java at:

String prefix =
((ModuleConfig)
request.getAttribute(Globals.MODULE_KEY)).getPrefix();

when using:

Validator validator =
Resources.initValidator(userFormEx, userForm,
getServletContext(), request, errors, 2);

What's the easiest way to create a ModuleConfig and set the prefix?  I'm
guessing it would be , since I have no modules.

Thanks,

Matt

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 2:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Using the Validator outside of Struts


I do same thing. take a look at my WEB.XML in web CVS.

Raible, Matt wrote:

I'm not using Struts for the self registration.  I'm protecting all of
the
struts actions (/do/*), so I cannot use struts w/o logging in.  I
cannot
login if I don't have a username...

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 2:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Using the Validator outside of Struts


basicPortal has self register example code, w/validation using Struts 
JSP, you can click join, on basebeans.com and then click login (and
then 
look under the monkey, I kill myslef).
So then you have a default role (you can aprove content if you are not 
admin role).

I can't imagine where you might be stuck, but here is the jsp:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/WEB-INF/p
ortle
ts/memberSec/User.jsp

..V


Raible, Matt wrote:

  

Ok, now that I've gotten past super.init(config), onto the validator
not
working.  I get the following error:

[java] 2003-05-30 14:12:43,734 ERROR [Ajp13Processor[8009][0]]
Validator.validateFieldForRule(4
61) | reflection: null
[java] java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:3


9
  

)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImp


l
  

..java
:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.
java:


4
  

54)
[java] at
org.apache.commons.validator.Validator.validateField(Validator.java:54
4)
[java] at
org.apache.commons.validator.Validator.validate(Validator.java:582)
[java] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execut
e(Reg


i
  

strat
ionServlet.java:146)



From the following code:
  

   ValidatorResources resources = new ValidatorResources();

   InputStream rules =

getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml
);

   ValidatorResourcesInitializer.initialize(resources, rules);

  InputStream custom =
getServletContext().getResourceAsStream(/WEB-INF/validator-rules-cust
om.xm


l
  

);
  
  ValidatorResourcesInitializer.initialize(resources,
custom);
  
   InputStream forms =

getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

   ValidatorResourcesInitializer.initialize(resources, forms);

   // Create a validator with the userForm
   Validator validator = new Validator(resources, userFormEx);

   // Tell the validator which bean to validate against.
   validator.addResource(Validator.BEAN_KEY, userForm);

   // Validate the checkoutForm object and store the validation


results
  

   try {
   // Execute the validation rules
146:ValidatorResults results = validator.validate(); --
Error
occurs here

   if (log.isDebugEnabled()) {
   log.debug(results.getResultValueMap());
   }
   } catch (ValidatorException ex) {
   // Log the validation exception
   log.warn(A validation exception occurred, ex);
   }

The validator is working fine in my Action classes, just not outside.
I'm
trying to use it in a servlet that's not an Action because all my
actions
(/do/*) are protected by form-based authentication.  This servlet is
used
for users to self-register.  If anyone has an elegant solutions to
self-register (not using a servlet), let me know.

Thanks,

Matt

-Original Message-
From: Raible, Matt 
Sent: Friday, May 30, 2003 7:13 AM
To: '[EMAIL PROTECTED]'
Subject: Using the Validator outside of Struts


I'm trying to use the Validator to validate that a user has entered
their
information in a self-registration servlet.

However, I'm getting a NullPointerException at the following line when
running a test using Cactus:

   InputStream rules

RE: more an HTML/JSP issue rather than struts.. but..

2003-05-30 Thread Raible, Matt
You could do a couple things:

1.  With plain HTML, add #anchorName to the URL that appears in your
browser's address bar, and then a name=anchorName where you want it to
be.

2.  With JavaScript, use onLoad=location.hash='anchorName'

HTH,

Matt

-Original Message-
From: Sundar Narasimhan [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 7:54 AM
To: [EMAIL PROTECTED]
Subject: Q: more an HTML/JSP issue rather than struts.. but..


Hi, I have the need to scroll the displayed jsp page (as the result of
a struts action) to a specific place on the resultant html page. 

Is there a standard way to do this? (I thought one could use
javascript onLoad or somehow re-write the URL to force the browser to
move to an anchor, but both don't seem to be working.. I suspect it
might be that struts is rewriting the visited page URL to be the
action.do page somehow which always moves it to the top? ).

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]



RE: Possible Validator Bug

2003-05-29 Thread Raible, Matt
Try changing methodparams to methodParams...

-Original Message-
From: Brown, Melonie S. - Contractor
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:46 AM
To: '[EMAIL PROTECTED]'
Subject: Possible Validator Bug


I created a custom validator and thought that I had everything configured
properly, but couldn't get it to work.  Since I was using an older version
of Struts (December/January), I downloaded the latest nightly build. 

I then started getting the following error:
ERROR Date = 2003-05-28 09:35:46,489 [Thread-5]
org.apache.commons.validator.Validator Line = 471 - reflection:
foo.SecurePasswordValidator.validateComplexPassword()
 java.lang.NoSuchMethodException:
foo.SecurePasswordValidator.validateComplexPassword()
at java.lang.Class.getMethod0(Class.java:1756)
at java.lang.Class.getMethod(Class.java:963)
at
org.apache.commons.validator.Validator.executeValidationMethod(Validator.jav
a:448)
at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:3
71)
at
org.apache.commons.validator.Validator.validateField(Validator.java:616)
at
org.apache.commons.validator.Validator.validate(Validator.java:696)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)


It is correct that I do not have a validateComplexPassword() - 

I have validateComplexPassword(Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)

In my validator rules, I specified the following.  

validator name=complexpassword
 classname=foo.SecurePasswordValidator
 method=validateComplexPassword
 methodparams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionErrors,
   javax.servlet.http.HttpServletRequest 
 msg=errors.changepasswordnotfollowrules
 /validator

I added a method with no parameters for test purposes, and that's the method
that gets called during validation.

Why would the method with no parameters be called when I specifically set
parameters?  Is this a bug or feature? 

-
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: [OT] My Struts webapp and hosting

2003-04-05 Thread Raible, Matt
I *highly* recommend KGB Internet.  I've been using them for almost a year
and they've got the best customer support I've ever seen from an ISP.  Keith
responds within 5 minutes (via e-mail) usually to requests.  They also give
you your own Tomcat instance that you can stop/restart and do whatever you
want with - even upgrade!

Matt

 -Original Message-
 From: Steve Armstrong [mailto:[EMAIL PROTECTED]
 Sent: Saturday, April 05, 2003 8:59 AM
 To: Struts Users Mailing List
 Subject: RE: [OT] My Struts webapp and hosting
 
 
 Quick plug for inexpensive Java web app hosting:
 
 http://www.kgbinternet.com/
 
 Cheers,
 -Steve
 
 -Original Message-
 From: Guido [mailto:[EMAIL PROTECTED]
 Sent: Saturday, April 05, 2003 7:19 AM
 To: [EMAIL PROTECTED]
 Subject: [OT] My Struts webapp and hosting
 
 ...
 Now the application is in my PC with Tomcat because I have 
 not found any
 very cheep_ Struts hosting.
 
 
 -
 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]



[validator] requiredif based on a value

2003-04-04 Thread Raible, Matt
Is it possible to require a field based on the value of another field?  I
tried the following, but no dice:

  field property=effectiveDate
 depends=requiredif

  arg0 key=changeRequestFormEx.effectiveDate/
  var
var-namefield/var-name
var-valuestate/var-value
  /var
  var
var-namefieldTest/var-name
var-valueEQUAL/var-value
  /var
  var
var-namefieldValue/var-name
var-value940/var-value
  /var
  /field

Thanks,

Matt


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



Password rules with the Validator?

2003-04-04 Thread Raible, Matt
Does anyone know of any open source packages or techniques for implementing
password rules. For instance, I need to implement the following rules for
password in my application:

Passwords must be made up of at least three (3) of the four (4) following 
classes of characters: Lowercase letters, Uppercase letters, Numbers,
Special 
Characters.

I can probably whip up some JavaScript for this, but I'd need server-side
code to catch if JavaScript is disabled. I'm guessing this is not possible
with regular expressions in the Validator.

Thanks,

Matt



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



RE: Password rules with the Validator?

2003-04-04 Thread Raible, Matt
I agree with the security risk, but since passwords will only be able to be
set by Administrators (after they've logged in) security is not much of a
concern. Also, we'll have to display what the password rules are in order
for a person (admin) to comply with them.

I didn't realize it (been heads down all day), but it looks like I've gotten
some suggestions from posting this same question on my website
(http://tinyurl.com/8urg).

Matt


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 04, 2003 4:00 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Password rules with the Validator?
 
 
 Validating passwords in javascript is a *very* bad idea.  A 
 hacker then has 
 access to all your password rules and makes it easier to 
 start guessing 
 passwords.  This is the reason validator doesn't provide a password 
 validation.
 
 David
 
 
 
 From: Raible, Matt [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]
 Subject: Password rules with the Validator?
 Date: Fri, 4 Apr 2003 15:56:57 -0700
 
 Does anyone know of any open source packages or techniques 
 for implementing
 password rules. For instance, I need to implement the 
 following rules for
 password in my application:
 
 Passwords must be made up of at least three (3) of the four 
 (4) following
 classes of characters: Lowercase letters, Uppercase letters, Numbers,
 Special
 Characters.
 
 I can probably whip up some JavaScript for this, but I'd 
 need server-side
 code to catch if JavaScript is disabled. I'm guessing this 
 is not possible
 with regular expressions in the Validator.
 
 Thanks,
 
 Matt
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 _
 The new MSN 8: advanced junk mail protection and 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 -
 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: [validator] requiredif based on a value

2003-04-04 Thread Raible, Matt

 So, you're saying that effectiveDate is requiredif state == 940?
 

Yep.

 Try adding [0] to the end of the field* vars.
 

That worked - thanks!  I've hacked together some client-side javascript for
this since there's not one in the validator natively - I'll try to work a
method up for equals.

Matt

 David
 
 Is it possible to require a field based on the value of 
 another field?  I
 tried the following, but no dice:
 
field property=effectiveDate
   depends=requiredif
 
arg0 key=changeRequestFormEx.effectiveDate/
var
  var-namefield/var-name
  var-valuestate/var-value
/var
var
  var-namefieldTest/var-name
  var-valueEQUAL/var-value
/var
var
  var-namefieldValue/var-name
  var-value940/var-value
/var
/field
 
 Thanks,
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8. 
 http://join.msn.com/?page=features/junkmail
 
 
 -
 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: DynaForms perfomance

2003-04-02 Thread Raible, Matt
Unless, of course, you generate your Forms using XDoclet, and then it takes
no time at all ;-)

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 10:40 AM
 To: Struts Users Mailing List
 Subject: Re: DynaForms perfomance
 
 
 
 
 On Wed, 2 Apr 2003, Guido wrote:
 
  Date: Wed, 02 Apr 2003 12:20:41 +0200
  From: Guido [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: DynaForms perfomance
 
  Is there any perfomance comparation DynaActionForms vs 
 ActionForms?
  What is the penalty of using Dyna ones (perfomance and 
 other drawbacks)?
 
 
 Examining the source :-) will tell you that DynaActionForm 
 uses a HashMap
 to store the current values of all the properties, so the getters and
 setters do take a little longer to run that getters and 
 setters that just
 refer to an instance variable of the bean class.
 
 However, this is pretty unlikely to have any practical impact 
 on response
 time of a web application.  Nearly always, the database is the biggest
 consumer of time, and the network is second -- the difference we are
 talking about is a tiny amount of CPU time, and adding CPU 
 capacity to an
 app is generally pretty cheap.  Usually *lots* cheaper than 
 paying your
 developers the extra hours it takes to build the standard form beans.
 
  Thank you,
  Guido.
 
 Craig
 
 -
 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: html:rewrite breaking images

2003-04-02 Thread Raible, Matt
For your images and stylesheets, I suggest using html:rewrite for the
paths - works great for me.

img src=html:rewrite page=/images/myImage.gif/ alt=alt text /

HTH,

Matt

 -Original Message-
 From: Dan Allen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 12:54 PM
 To: Struts-User List
 Subject: html:rewrite breaking images
 
 
 When I visit a struts page for the very first time in a browser
 (best way to test this is simply with lynx -source) it is adding the
 following to the end of all urls:
 
 ;jsessionid=F4CF99D47374DF90EA1CEB573A0A32A5
 
 which is breaking the images and stylesheet references until I
 reload (or in the case of lynx get it to store my cookie).
 
 To see what I mean, visit:
 
 lynx -source http://home.mojavelinux.com:8080/iprc/do/Home
 
 and look at any graphic on the page.  Basically, it is missing the
 '?' that needs to appear after the resource and before the query
 string.  This seems to be like a bug, but I need someone to confirm.
 
 Dan
  
 -- 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Daniel Allen, [EMAIL PROTECTED]
 http://www.mojavelinux.com/
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Microsoft's Law of Software Engineering: 
 Don't worry if it doesn't work right. 
 If everything did, we'd be out of a job.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 -
 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: OnMouseOut

2003-04-01 Thread Raible, Matt
Try the struts-menu user list.  I didn't write this displayer, but I'm
guessing it doesn't support these attributes.

Matt

 -Original Message-
 From: Alessio [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 5:33 AM
 To: Struts User
 Subject: OnMouseOut
 
 
 Hi, i' ve a problem with StrutsMenu...how use OnMouseOut with
 StrutsMenu? i try in this way:
 
 Menu  name=menu  title=Mymenu
Item  name=first  title=item 1 toolTip=mymenu.item1
location=javascript:document.forms.MyForm.submit()
 OnMouseOut=...OnMouseOut  OnMouseOver=...OnMouseOver...   /
 /Menu
 
 in this example i use an SimpleMenuDisplayer for render it and an form
 for submit my information...but the OnMouseOver and OnMouseOut don't
 work...whi?
 
 Thanks in advance.
 Alessio
 


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



RE: [OT] OJB or Hibernate??

2003-03-31 Thread Raible, Matt
Are there any OJB examples with Struts?  The reason I ask is that I know of
two Hibernate/Struts examples:

http://sf.net/projects/struts

hibernate and resume modules

HTH,

Matt

 -Original Message-
 From: Tim Shadel [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 2:26 PM
 To: Struts Users Mailing List
 Subject: Re: [OT] OJB or Hibernate??
 
 
 For what it's worth, Here's a few links I found through Google:
 
 http://www.freeroller.net/page/ceperez/20021212
 http://www.rollerweblogger.org/page/roller/20021212
 
 Tim
 
 Bill Johnson wrote:
  *This message was transferred with a trial version of 
 CommuniGate(tm) Pro*
  I'm curious which is the framework of choice?  What
  the strengths are of each, etc.?
  
  Thanks,
  
  Bill
  
  __
  Do you Yahoo!?
  Yahoo! Platinum - Watch CBS' NCAA March Madness, live on 
 your desktop!
  http://platinum.yahoo.com
  
  
 -
  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: [Q] how specify wrap=OFF for html:textarea ?

2003-03-26 Thread Raible, Matt
Just use a regular textarea and bean:write our c:out to populate it.

HTH,

Matt

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 1:09 PM
 To: [EMAIL PROTECTED]
 Subject: [Q] how specify wrap=OFF for html:textarea ?
 
 
 Hello,
 
 Subj. Pls
 
 textarea 
 Best Regards.
 Michael.
 
 
 -
 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]



FYI... Upgrading from 1.1 RC1 to Nightly Build

2003-03-26 Thread Raible, Matt
Today I upgraded from 1.1 RC1 to a Nightly build - thought I'd share the
experience.

http://tinyurl.com/87xa

Matt


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



RE: error with JBoss: Missing message for key

2003-03-26 Thread Raible, Matt
Have you tried putting MessageProperties in WEB-INF/classes?

 -Original Message-
 From: Rabih Yazbeck [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 2:14 PM
 To: 'Struts Users Mailing List'
 Subject: error with JBoss: Missing message for key
 
 
 Hello,
 
 I have received an error (copied below) when deploying my 
 Struts application on JBoss-Tomcat4.18, but I dont have 
 problem with the stand-alone Tomcat4.18 or WebLogic using the 
 same war file... my MessageProperties files are in the war 
 file under WEB-INF/lib .. I also tried to put them in JBoss 
 under server/all/lib/ but with no success.. 
 
 By the way, I am using Tiles. And the header, where the error 
 occurred, contains:
 tiles:importAttribute name=title/ bean:message name=title
 
 ..any idea? Thank you in advance..
 
 the error is:
 
 [ServletException in:/layouts/header.jsp] Missing message for 
 key home.title' javax.servlet.ServletException: Missing 
 message for key home.title at 
 org.apache.jasper.runtime.PageContextImpl.handlePageException(
 PageContextImpl.java:530) at 
 org.apache.jsp.header_jsp._jspService(header_jsp.java:76) at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java
 :137) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:204) at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:295) at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:2
 41) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
 ionDispatcher.java:684) at 
 org.apache.catalina.core.ApplicationDispatcher.doInclude(Appli
 cationDispatcher.java:575) at 
 org.apache.catalina.core.ApplicationDispatcher.include(Applica
 tionDispatcher.java:498) at 
 org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.
 java:118) at 
 org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:161
 ) at 
 org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.j
 ava:702) at 
 org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTa
 g(InsertTag.java:817) at 
 org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.ja
 va:466) at 
 org.apache.jsp.layout_0002ddefault_jsp._jspx_meth_tiles_insert
 _0(layout_0002ddefault_jsp.java:207) at 
 org.apache.jsp.layout_0002ddefault_jsp._jspx_meth_html_html_0(
 layout_0002ddefault_jsp.java:102) at 
 org.apache.jsp.layout_0002ddefault_jsp._jspService(layout_0002
 ddefault_jsp.java:69) at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java
 :137) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:204) at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:295) at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:2
 41) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
 ionDispatcher.java:684) at 
 org.apache.catalina.core.ApplicationDispatcher.doForward(Appli
 cationDispatcher.java:432) at 
 org.apache.catalina.core.ApplicationDispatcher.forward(Applica
 tionDispatcher.java:356) at 
 org.apache.struts.action.RequestProcessor.doForward(RequestPro
 cessor.java:1058) at 
 org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesR
 equestProcessor.java:269) at 
 org.apache.struts.tiles.TilesRequestProcessor.processTilesDefi
 nition(TilesRequestProcessor.java:249) at 
 org.apache.struts.tiles.TilesRequestProcessor.internalModuleRe
 lativeForward(TilesRequestProcessor.java:333) at 
 org.apache.struts.action.RequestProcessor.processForward(Reque
 stProcessor.java:578) at 
 org.apache.struts.action.RequestProcessor.process(RequestProce
 ssor.java:260) at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1420) at 
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.jav
 a:502) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:247) at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:193) at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.java:260) at 
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:643) at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:480) at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
 va:995) at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardC
 ontextValve.java:191) at 
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:643) at 
 

RE: Design Doubt

2003-03-26 Thread Raible, Matt
Easiest way without too many details (lots of opinions on getting data from
database):

1.  Put data into an ArrayList of Beans (forms, POJOs, whatever).
2.  Use display tag library for display/sorting/paging -
http://displaytag.sf.net (it's open source, so if you want to improve it
feel free!)

Matt

 -Original Message-
 From: Jagadeesan,Sivakumar 
 [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 4:09 PM
 To: 'Struts Users Mailing List'
 Subject: Design Doubt
 
 
 * I want to develop a Product Catalog.
 * The product list is present in the database
 * I want to display 10 products in one JSP page. I don't want 
 to load all
 the
 products from the Database and keep it in the memory. I also 
 don't want to
 return
 the ResultSet to the Servlet/JSP Layer.
 
 What is the best way to do this ?
 
 This is common functionality almost all the web sites have, 
 but for some
 reason I am not able to figure it out.
 
 --Siva Jagadeesan
 
 -
 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: form scope question

2003-03-26 Thread Raible, Matt
I've seen this a lot with Struts - it seems you can't have forms with the
same name in any two scopes.  To work around this issue, I name my forms
differently.  For instance, I store the logged-in user's form in the session
as currentUserForm and when I edit a user, I call it userForm.

HTH,

Matt

 -Original Message-
 From: Kevin Williams [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 4:12 PM
 To: [EMAIL PROTECTED]
 Subject: form scope question
 
 
 Hi,
 
 I am hoping someone can clarify what is exactly happening in my
 application.  I was trying to retrieve a form object in a custom tag
 through the pageContext.findAttribute method, but with no success.  I
 discovered the reason that I wasn't retrieving the value was because I
 had set the form object at the session level, and for some reason an
 additional form object existed at the request level.  Why is there a
 duplicate form object at the request level (whose values are NOT set)
 when I have never specified request scope on any of my action objects
 that use this form?
 
 Thanks,
 
 Kevin Williams
 
 
 
 -
 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]



Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread Raible, Matt
I have a requirement to send a notification e-mail when an item in my app is
deleted.  I was hoping to use a string (post-substitution) from
ApplicationResource.properties to do this, but alas, it does not work like I
hoped.  Is this possible without loading it as a ResourceBundle and calling
getString()?

// deletedBy and appURL are set previously as String variables

new ActionMessage(cr.deleted.msg, deletedBy, appURL).toString()

results in...

[EMAIL PROTECTED]

Thanks,

Matt



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



RE: original file name and path

2003-03-24 Thread Raible, Matt
According to the HTML spec, you cannot populate an input type=file's
value attribute.  It's a security feature.  Some browsers will do this for
you, but others will not.

Matt

 -Original Message-
 From: Sukhenko, Mikhail (Contr) [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 2:29 PM
 To: 'Struts Users Mailing List'
 Subject: original file name and path
 
 
 Do any of you guys know how to get the original file path on 
 the clients
 computer?
 i.e. something like c:\my documents\myfile.doc?
 
 I need it to repopulate the upload file box whenever the user 
 comes back to
 the page.
 
 Thanks a lot in advance
 Mikhail
 
 -
 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: images in html buttons

2003-03-20 Thread Raible, Matt
Just use an HTML button.  There's nothing in struts that prevents you from
hand-coding HTML.  The html:button tag just renders and input
type=button...   - just view-source and substitute the required values
accordingly.  I do this all the time.

Matt

 -Original Message-
 From: Wayne A Christian [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 20, 2003 10:38 AM
 To: struts user (E-mail)
 Subject: images in html buttons
 
 
 Within the body of a standard HTML button tag, I can place 
 HTML, such as the img tag and this will get rendered
 as the button image.  With struts html:button tag, this 
 doesn't work and I get the raw text rendered as the button text.
 Is there a way around this other than going to image maps 
 which don't work the same way as buttons do?
 
 Wayne Christian
 Sr. Staff Software Engineer
 Genesys Telecommunications Labs
 2100 Gateway Centre Blvd.  Suite 300
 Morrisville,  NC  27560
 ? Office: (919) 466-6151
   Fax:(919) 466-6157
 ? EMail:  mailto:[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]



[Tiles] Is it possible to get a definition name in a layout.jsp

2003-03-20 Thread Raible, Matt
I have the following definition in my tiles-config.xml:

definition name=.login extends=baseLayout
put name=title.key  value=login.title/
put name=heading.key value=login.heading/
put name=content value=/WEB-INF/pages/welcome.jsp/
/definition

baseLayout has a path of:

definition name=baseLayout path=/layouts/baseLayout.jsp

In baseLayout.jsp, is it possible to retrieve the definition's name (i.e.
.login).  I'd like to use this in my body tag as an id, so after the
login definition is rendered, I'll have:

body id=.login

My reason for wanting this is so I can specify minor CSS tweaks on a
per-page basis.  This idea was inspired by
http://diveintomark.org/archives/2003/01/16/body_ids.html.

Thanks,

Matt


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



[Tiles] Is it possible to get a definition name in a layout.jsp

2003-03-20 Thread Raible, Matt
I have the following definition in my tiles-config.xml:

definition name=.login extends=baseLayout
put name=title.key  value=login.title/
put name=heading.key value=login.heading/
put name=content value=/WEB-INF/pages/welcome.jsp/
/definition

baseLayout has a path of:

definition name=baseLayout path=/layouts/baseLayout.jsp

In baseLayout.jsp, is it possible to retrieve the definition's name (i.e.
.login).  I'd like to use this in my body tag as an id, so after the
login definition is rendered, I'll have:

body id=.login

My reason for wanting this is so I can specify minor CSS tweaks on a
per-page basis.  This idea was inspired by
http://diveintomark.org/archives/2003/01/16/body_ids.html.

Thanks,

Matt


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



RE: One-time initializing in struts

2003-03-13 Thread Raible, Matt
If you're using a Servlet 2.3 container, I'd recommend using a
ServletContextListener over a StartupServlet.  I recently changed my apps to
use this, and it was pretty simple to do.  After all, that's what the SCL
was designed for.

As an example:

http://tinyurl.com/7elp

HTH,

Matt

 -Original Message-
 From: Scott Barr [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 11:39 PM
 To: Struts Users Mailing List
 Subject: RE: One-time initializing in struts
 
 
 
 Hi Karl
 
 I use a Servlet to do app initialisation. 
 Add the Servlet to web.xml, and set the load-on-startup 
 parameter. Then
 you put the initialisation code in the Servlet, and you're away.
 
 Scott Barr
 www.exergonic.com.au
 
 
 On Thu, 2003-03-13 at 17:05, Andrew Hill wrote:
  Struts PlugIn might be the best option for that. Check the 
 docs. Dont think
  its supported in 1.0 though, just 1.1. (With each 1.1.x 
 version having a
  different interface!)
  
  -Original Message-
  From: Karl [mailto:[EMAIL PROTECTED]
  Sent: Thursday, 13 March 2003 14:26
  To: Struts Users Mailing List
  Subject: One-time initializing in struts
  
  
  Is there a way to do one-time initialization in struts 
 without having to put
  check logicn in every action?
  
  I want to use turbine as my persistance back-end but I need to call
  Torque.init(Torque.properties); somewhere.
  
  
  
 -
  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]
 


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



RE: Issues with unsubscribing

2003-03-13 Thread Raible, Matt
For some, this does not work.  Here's my story:

I have successfully subscribed and unsubcribed to this list many times using
my @raibledesigns.com account.  However, at my day job (@cable.comcast.com),
I cannot unsubscribe from any lists that require e-mail verification.

Currently I'm subscribed to approx 8 lists that I can't unsubscribe from.
Basically, the firewall is preventing the confirm e-mails from coming
through.  So now I get to watch my inbox fill up daily - approx 1000 e-mails
per day.  I have filters for most to reduce the pain.  I dread the day that
I go on a week-long vacation ;-)

Matt

 -Original Message-
 From: Mark Lowe [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 10:24 AM
 To: Struts Users Mailing List
 Subject: Re: struts-user Digest 13 Mar 2003 16:26:10 - Issue 2866
 
 
 
 can't you click this link at the bottom of each email?
 
 [EMAIL PROTECTED]
 
 Giovedì, 13 mar 2003, alle 18:11 Europe/Rome, Gehlot, Narendra ha 
 scritto:
 
  [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: [displaytag-user] Using the display:* taglib with tiles

2003-03-13 Thread Raible, Matt
The easiest way to find these is by looking in the display.tld file with
your favorite XML editor.

 -Original Message-
 From: James CE Johnson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 2:46 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [displaytag-user] Using the display:* taglib with tiles
 
 
  Hi,
 
  I'm pretty sure I read the solution to this just last 
 night but now I
  can't find it...
 
  The display:* taglib will let me do something like this:
  display:table width=75% name=reportList
display:column property=reportCategoryName
  title=Category group=1 sort=true/
 
  The resulting HTML will be a table and the 'Category' 
 header will be
  a link of the form:
  http://.../MyApplication/WEB-INF/jsp/layout.jsp?order=decsort=1
 
  What I want is more along the lines of:
  http://.../MyApplication/some/action.do?order=decsort=1
 
  Isn't there some tiles trick that sets things up so that 
 this works?
 
  Thanks,
  J
 
 
  You can specify a requestURI attribute as part of the 
 display:table
  tag.
 
 Yes, thank you. That does help a lot. Not to be a dumbass... 
 but where the
 heck are all those attribute documented?
 
 
  HTH,
 
  Matt
 
 
 -
 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: StrutsMenu

2003-03-12 Thread Raible, Matt
All three of the links allow roles to be specified in menu-config.xml -
this is how the roles are used.  For an online example, see:

http://raibledesigns.com/struts-menu/rolesMenu.jsp

The dhtml menus use ListDisplayer, not DropDownDisplayer, so you're right
in that it's not in that one.  The IE6 problem is b/c the dhtmlDropDown does
not currently support nested children  2.  

Care to donate your cookie code?

One enhancement I was thinking of for struts-menu was to make an
XSLDisplayer that uses XSL on the menu-config.xml file to change the menus.
It might be a lot of work, who knows until I get into it.  The idea would be
that there would be default XSL files for all menus, and then I'd add a path
attribute to the tag library so users could customize there own.  Thoughts?


Anyone know how to read an XSL file from a JAR file?

Matt



 -Original Message-
 From: Edgar P. Dollin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 6:30 AM
 To: 'Matt Raible'
 Cc: 'Struts Users Mailing List'
 Subject: RE: StrutsMenu
 
 
 Matt:
  
 The links below don't seem to do any role stuff that I can find.  BTW:
 there are some bugs in the dhtmlDropdown.jsp with IE6.  
  
 Maybe I am reading the code incorrectly but the DropDown 
 displayer never
 calls isAllowed or works with an object that does  The coolmenu
 displayer does makes calls although it's structure is a tad different
 than the drop down.  I have started doing the analysis of where to put
 the checks to enable the role/permission implementation.
  
 The tree menu link is really interesting.  The guy and his bud's are
 really good. 
  
 BTW: I reworked the cookies and got the menu's to act 
 consistently from
 page to page.  
  
 Thanks again
  
 Edgar
  
 -Original Message-
 From: Matt Raible [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 11, 2003 9:35 PM
 To: Edgar Dollin
 Cc: 'Struts Users Mailing List'
 Subject: RE: StrutsMenu
 
 
 
 It should already be built into the following Displayers using the
 roles attribute on a menu or item.
  
 http://raibledesigns.com/struts-menu/dhtmlDropdown.jsp
 http://raibledesigns.com/struts-menu/dhtmlExpandable.jsp
 http://raibledesigns.com/struts-menu/coolmenu4.jsp
  
 For saving a menu's expanded location - you might want to look at the
 following Tree menu.  I hope to add support for this type of 
 menu in the
 coming weeks.
  
 http://webfx.eae.net/dhtml/xtree/demo.html
  
 HTH,
  
 Matt
 
 -Original Message-
 From: Edgar Dollin [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 11, 2003 6:04 PM
 To: '[EMAIL PROTECTED]'
 Cc: 'Struts Users Mailing List'
 Subject: StrutsMenu
 
 
 Would it be simple to implement roles and permissions on the
 DropDownDisplayer?  I have started to look at it and am not 
 sure of all
 the touch points.
  
 BTW: my solution for restoring a menu position on a target 
 page with the
 same menu as the prior page is sub-optimal.  The only solution I could
 come up with saved menu down and up movements and created expiring
 cookies on menu selection.  Of course if you do any other action the
 menu doesn't redrop.  If you are using contexts, the cookies are
 discarded across the change of context.  It looks like the only way to
 really make menu position controllable is to do some server 
 side stuff.
 An interesting project.
  
 Thanks for your help.
  
 Edgar
 
 


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



RE: StrutsMenu

2003-03-12 Thread Raible, Matt
You're suggesting that it's generated from a Bean or something like that?
Vic mentioned he's interested in it, but the honest truth is that it'll
probably be implemented when a committer wants to use it.  Anybody want to
become a committer? ;-)



 -Original Message-
 From: Witbeck, Shane [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 7:36 AM
 To: [EMAIL PROTECTED]
 Subject: RE: StrutsMenu
 
 
 Is there any work being done to generate struts menu's 
 dynamically? If so,
 is there an estimate for when this might be available?
 
 Thanks,
 
 Shane
 
 -Original Message-
 From: Raible, Matt [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 9:17 AM
 To: 'Struts Users Mailing List'
 Subject: RE: StrutsMenu
 
 
 All three of the links allow roles to be specified in 
 menu-config.xml -
 this is how the roles are used.  For an online example, see:
 
 http://raibledesigns.com/struts-menu/rolesMenu.jsp
 
 The dhtml menus use ListDisplayer, not DropDownDisplayer, 
 so you're right
 in that it's not in that one.  The IE6 problem is b/c the 
 dhtmlDropDown does
 not currently support nested children  2.  
 
 Care to donate your cookie code?
 
 One enhancement I was thinking of for struts-menu was to make an
 XSLDisplayer that uses XSL on the menu-config.xml file to 
 change the menus.
 It might be a lot of work, who knows until I get into it.  
 The idea would be
 that there would be default XSL files for all menus, and then 
 I'd add a path
 attribute to the tag library so users could customize there 
 own.  Thoughts?
 
 
 Anyone know how to read an XSL file from a JAR file?
 
 Matt
 
 
 
  -Original Message-
  From: Edgar P. Dollin [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 12, 2003 6:30 AM
  To: 'Matt Raible'
  Cc: 'Struts Users Mailing List'
  Subject: RE: StrutsMenu
  
  
  Matt:
   
  The links below don't seem to do any role stuff that I can 
 find.  BTW:
  there are some bugs in the dhtmlDropdown.jsp with IE6.  
   
  Maybe I am reading the code incorrectly but the DropDown 
  displayer never
  calls isAllowed or works with an object that does  The coolmenu
  displayer does makes calls although it's structure is a tad 
 different
  than the drop down.  I have started doing the analysis of 
 where to put
  the checks to enable the role/permission implementation.
   
  The tree menu link is really interesting.  The guy and his bud's are
  really good. 
   
  BTW: I reworked the cookies and got the menu's to act 
  consistently from
  page to page.  
   
  Thanks again
   
  Edgar
   
  -Original Message-
  From: Matt Raible [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, March 11, 2003 9:35 PM
  To: Edgar Dollin
  Cc: 'Struts Users Mailing List'
  Subject: RE: StrutsMenu
  
  
  
  It should already be built into the following Displayers using the
  roles attribute on a menu or item.
   
  http://raibledesigns.com/struts-menu/dhtmlDropdown.jsp
  http://raibledesigns.com/struts-menu/dhtmlExpandable.jsp
  http://raibledesigns.com/struts-menu/coolmenu4.jsp
   
  For saving a menu's expanded location - you might want to 
 look at the
  following Tree menu.  I hope to add support for this type of 
  menu in the
  coming weeks.
   
  http://webfx.eae.net/dhtml/xtree/demo.html
   
  HTH,
   
  Matt
  
  -Original Message-
  From: Edgar Dollin [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, March 11, 2003 6:04 PM
  To: '[EMAIL PROTECTED]'
  Cc: 'Struts Users Mailing List'
  Subject: StrutsMenu
  
  
  Would it be simple to implement roles and permissions on the
  DropDownDisplayer?  I have started to look at it and am not 
  sure of all
  the touch points.
   
  BTW: my solution for restoring a menu position on a target 
  page with the
  same menu as the prior page is sub-optimal.  The only 
 solution I could
  come up with saved menu down and up movements and created expiring
  cookies on menu selection.  Of course if you do any other action the
  menu doesn't redrop.  If you are using contexts, the cookies are
  discarded across the change of context.  It looks like the 
 only way to
  really make menu position controllable is to do some server 
  side stuff.
  An interesting project.
   
  Thanks for your help.
   
  Edgar
  
  
 
 
 -
 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]



Is it possible to change the base tile on the fly

2003-03-12 Thread Raible, Matt
I have the following base tile definition that all my other definitions
extend:

definition name=baseLayout path=/layouts/baseLayout.jsp
put name=title.key/
put name=heading.key/
put name=header value=/common/header.jsp/
put name=footer value=/common/footer.jsp/
  /definition

Is it possible to change the path attribute of this definition on-the-fly
- perhaps based on a value received in an Action?  If so, how?

Thanks,

Matt


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



RE: Is it possible to change the base tile on the fly

2003-03-12 Thread Raible, Matt
The reason I want to do this is to have two totally different skins based on
a user's settings.  How can I change a baseLayout and all children on the
fly?  Is it possible - can I just point to a specific tiles-config.xml after
they login?

I realize this is possible using stylesheets and some fancy CSS, but I'd
like to explore doing this using Tiles.

Thanks,

Matt

 -Original Message-
 From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 10:27 AM
 To: Struts Users Mailing List
 Subject: Re: Is it possible to change the base tile on the fly
 
 
 
   It is possible to change a definition attribute like the 
 path on the 
 fly, but this will not change all the child definitions has 
 you expect.
   This is because in the actual implementation all definitions have 
 their own copy of the attributes. There is no lookup to the 
 parent value.
 
  Cedric
 
 Raible, Matt wrote:
 
 I have the following base tile definition that all my other 
 definitions
 extend:
 
  definition name=baseLayout path=/layouts/baseLayout.jsp
  put name=title.key/
  put name=heading.key/
  put name=header value=/common/header.jsp/
  put name=footer value=/common/footer.jsp/
   /definition
 
 Is it possible to change the path attribute of this 
 definition on-the-fly
 - perhaps based on a value received in an Action?  If so, how?
 
 Thanks,
 
 Matt
 
 
 -
 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: struts-menu

2003-03-10 Thread Raible, Matt
Edgar,

I'm a committer on struts-menu, so hopefully I can help you out.

I believe using the location attribute vs. page attribute will strip out
your context and use the exact value you specify in location rather than
pre-pending the context.

As for remembering the position - which layout are you using?  I can
possibly add the remembering functionality, but it will probably involve
cookies or something.

Matt

 -Original Message-
 From: Edgar Dollin [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 10, 2003 6:20 AM
 To: 'Struts Users Mailing List'
 Subject: struts-menu
 
 
 Does anyone know how to suppress the leading '/' in strutsmenu.
  
 Does anyone know how to get the menu to remember it's position if the
 target
 page, i.e. tiles, has the same menu.
  
 Thanks in advance
  
 Edgar
 


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



RE: [HK] struts-faces.war problem

2003-03-10 Thread Raible, Matt
I removed commons-logging.jar from WEB-INF/lib and it works fine for me on
Tomcat 4.1.18 on Windows and Linux.

HTH,

Matt

 -Original Message-
 From: harish krishnaswamy [mailto:[EMAIL PROTECTED]
 Sent: Sunday, March 09, 2003 2:12 PM
 To: Struts Users Mailing List
 Subject: [HK] struts-faces.war problem
 
 
 Anyone having the problem below while trying to deploy
 the struts-faces example? Apparently commons logging
 is having a problem with Jdk14Logger. Any ideas??
 
 -Harish
 
 Caused by:
 org.apache.commons.logging.LogConfigurationException:
 org.apache.commons.logging.LogConfigurationException:
 Class org.apache.commons.logging.impl.Jdk14Logger does
 not implement Log
   at
 org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct
 or(LogFactoryImpl.java:434)
   at
 org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Log
 FactoryImpl.java:561)
   ... 36 more
 Caused by:
 org.apache.commons.logging.LogConfigurationException:
 Class org.apache.commons.logging.impl.Jdk14Logger does
 not implement Log
   at
 org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct
 or(LogFactoryImpl.java:430)
   ... 37 more
 
 
 __
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, more
 http://taxes.yahoo.com/
 
 -
 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: struts-menu

2003-03-10 Thread Raible, Matt
http://sf.net/projects/struts-menu

demo at:

http://raibledesigns.com/struts-menu


 -Original Message-
 From: Stephen Smithstone [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 10, 2003 8:38 AM
 To: Struts Users Mailing List
 Subject: Re: struts-menu
 
 
 what is this struts-menu and where can i find some examples / 
 downloads ? 
 please 
 
 On Monday 10 March 2003 3:22 pm, Raible, Matt wrote:
  Edgar,
 
  I'm a committer on struts-menu, so hopefully I can help you out.
 
  I believe using the location attribute vs. page 
 attribute will strip
  out your context and use the exact value you specify in 
 location rather
  than pre-pending the context.
 
  As for remembering the position - which layout are you using?  I can
  possibly add the remembering functionality, but it will 
 probably involve
  cookies or something.
 
  Matt
 
   -Original Message-
   From: Edgar Dollin [mailto:[EMAIL PROTECTED]
   Sent: Monday, March 10, 2003 6:20 AM
   To: 'Struts Users Mailing List'
   Subject: struts-menu
  
  
   Does anyone know how to suppress the leading '/' in strutsmenu.
  
   Does anyone know how to get the menu to remember it's 
 position if the
   target
   page, i.e. tiles, has the same menu.
  
   Thanks in advance
  
   Edgar
 
  
 -
  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]



  1   2   3   >