Re: splitting struts-config into multiple files

2004-02-29 Thread Jim Anderson
Yes, that certainly sounds possible, but what I'd rather do, if it's 
possible, is to reference a "global forwards" config file at run time 
which resides externally of any app.

So my question is, "Are runtime config files that  reside outside the 
application context supported?" Perhaps a symbolic link from WEB-INF... 
Or maybe they could reside in a "static war"?

On Feb 29, 2004, at 7:03 AM, Nadeem Bitar wrote:

You can take advantage of xdoclet merging capabilities.
You would have your action mapping in struts-actions.xml, your global-
forwards in global-forwards.xml, your form beans inside struts-forms.
xml ... and xdoclet would merge the files for you.


On Sat, 2004-02-28 at 13:36 -0700, Manish Singla wrote:

May be Ant task can help in your environment.

HTH
Manish Singla
Jim Anderson wrote:

We have many apps that require the same global forwards. Rather than
copy this info into the config file for each app, we'd like to be 
able
to place it in a struts-config file that lives somewhere on the
filesystem outside WEB-INF, and then specify that as one of the 
config
files to use. I know it's possible to split struts-config, but is 
there
some way that one of the config files can reside outside the app?

Thanks,

jim

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

Nadeem Bitar
Software Engineer
IzuCode, LLC
5230 Fiore Terrace #k208
San Diego, Ca 92122

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

jim



splitting struts-config into multiple files

2004-02-28 Thread Jim Anderson
We have many apps that require the same global forwards. Rather than 
copy this info into the config file for each app, we'd like to be able 
to place it in a struts-config file that lives somewhere on the 
filesystem outside WEB-INF, and then specify that as one of the config 
files to use. I know it's possible to split struts-config, but is there 
some way that one of the config files can reside outside the app?

Thanks,

jim

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


Re: client-side validation not working

2004-02-15 Thread Jim Anderson
Niall,

You're absolutely right! Adding the elements you show below did the 
trick. It never occurred to me to revisit my validation.xml file since 
server-side validation was working fine.

Thanks very, very much!

jim

On Feb 15, 2004, at 1:33 PM, Niall Pemberton wrote:

Actually,

I just tried it out and it has to be the datePatternStrict version for
Struts 1.1

 datePatternStrict
 dd/MM/
 
The javascript functions have moved to commons and appear to now cater 
for
the datePattern variable - so probably from Struts 1.2 you could choose
which version.

(The difference between datePattern and datePatternStrict is that the 
data
input has to match the length of the format in the strict version. So 
if for
example 1/1/2004 would be invalid in strict version with a pattern of
dd/MM/ - the user would have to key in 01/01/2004 for the date to 
be
valid.

Niall

- Original Message -
From: "Niall Pemberton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, February 15, 2004 10:44 AM
Subject: Re: client-side validation not working

James,

In your validation configuration file you have not set the date 
pattern
variable - there are two forms of it - datePattern and 
datePatternStrict.

 

   
 
   
   
datePattern
dd/MM/

 
 
   
   
datePattern
dd/MM/

 
   
 

Try that.

Niall

- Original Message -
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Saturday, February 14, 2004 6:08 PM
Subject: RE: client-side validation not working

Yes and yes.

-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 4:17 PM
To: 'Struts Users Mailing List'
Subject: RE: client-side validation not working
So, did you find the validateDate function, and was it called?

-Original Message-
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 3:29 PM
To: Struts Users Mailing List
Subject: RE: client-side validation not working
Struts 1.1

-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 11:25 AM
To: 'Struts Users Mailing List'
Subject: RE: client-side validation not working
Try to put some alerts in the validateDate javascript function in the
validator-rules.xml file and see if the function is called. BTW, what
version of Struts you are using?
Saul

-Original Message-
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 10:12 AM
To: Struts Users Mailing List
Subject: RE: client-side validation not working
To test the possibility of it being a problem with using html:image
instead of html:submit, I replaced html:image by html:submit but got 
the
same result, i.e., the client-side validation is not being invoked.

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 9:42 AM
To: Struts Users Mailing List
Subject: Re: client-side validation not working
Everything looks OK to me.

Have you checked what javascript is being generated - use "view 
source"
in your browser when you are looking at the page. is there a
validateActivityViewForm() method and is that method doing the
validations you expect?

A second thought is how are you submitting your page - I had problems
when I was using javascript with a link tag. If your doing that, then
try putting an ordinary submit button on the page and see if that 
works.

Save

Niall

- Original Message -
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 2:23 PM
Subject: client-side validation not working
Server-side validation is working fine, but I can't seem to get
client-side working.
I know I must be doing something wrong, but I can't figure out what 
it
is :-(

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


...
   ...
  
...
 

  

  



Here's the piece of validation.xml:



  

  


  

  


Here's the Action entry from struts-config:


ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements 
Serializable
{

As I said, server-side validation is working fine, but the 
javascript on
the client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,

jim



-
To uns

Re: OT: Need help downloading latest commons-sandbox and Struts Contrib from CVS

2004-02-09 Thread Jim Anderson
Thanks! It worked a treat.

On Feb 1, 2004, at 9:25 PM, James Mitchell wrote:

jakarta-commons-sandbox
jim

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


OT: question about using CVS to download commons-scaffold

2004-02-06 Thread Jim Anderson
I followed the instructions on page 
http://jakarta.apache.org/commons/sandbox/scaffold/cvs-usage.html,
namely:

	cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
 	cvs -z3 -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co 
jakarta-commons/scaffold

and got the following error:

cvs server: cannot find module `jakarta-commons/scaffold' - ignored
cvs [checkout aborted]: cannot expand modules
What am I doing wrong?

Thanks,

jim


OT: Need help downloading latest commons-sandbox and Struts Contrib from CVS

2004-02-01 Thread Jim Anderson
Sorry, I'm feeling very stupid, but could someone please send me the 
cvs command(s) needed to download each of these from the Jakarta site? 
IIn case you haven't guessed, I'm rather new to CVS :-)

Thanks very much!

A CVS ignoramus...

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


Re: REPOST: newbie datasource config problems

2004-01-28 Thread Jim Anderson
Matthias,

Thanks very much for responding! It seems there's a misunderstanding on 
my side. I guess I'll have to rethink it. From what you say, there 
isn't any reason to include a  element in struts-config 
since the persistence layer should be invisible to Struts. Am I 
understanding you correctly?

On Jan 28, 2004, at 12:26 PM, Matthias Wessendorf wrote:

hi jim!

did you add struts-legacy.jar in WEB-INF/lib ?

but in 1.2 its not more supported (GenericDataSource)

look here:
http://jakarta.apache.org/struts/faqs/database.html
(The Struts DataSource Manager)
then you need pool.jar and
dbcp.jar
from the corresponding commons-projects
- http://jakarta.apache.org/commons/pool/
- http://jakarta.apache.org/commons/dbcp/
greetings

matthias

-Original Message-
From: Jim Anderson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 6:14 PM
To: Struts Users Mailing List
Subject: REPOST: newbie datasource config problems
(The original msg didn't seem to make it to the list.)

I'm trying to configure my Struts 1.1 app (Tomcat 4) for MySQL access
and getting nothing but grief. Currently, I'm showing the following
error in the log file:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
Could someone please send me samples of what web.xml and
struts-config.xml should look like when properly configured?
Thanks very much,

jim





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

jim

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


newbie datasource config problems

2004-01-28 Thread Jim Anderson
I'm trying to configure my Struts 1.1 app for MySQL access and getting 
nothing but grief. Currently, I'm showing the following error in the 
log file:

	java.lang.NoClassDefFoundError: 
org/apache/struts/legacy/GenericDataSource

Could someone please send me samples of what web.xml and 
struts-config.xml should look like when properly configured?

Thanks very much,

jim


REPOST: newbie datasource config problems

2004-01-28 Thread Jim Anderson
(The original msg didn't seem to make it to the list.)

I'm trying to configure my Struts 1.1 app (Tomcat 4) for MySQL access 
and getting nothing but grief. Currently, I'm showing the following 
error in the log file:

	java.lang.NoClassDefFoundError: 
org/apache/struts/legacy/GenericDataSource

Could someone please send me samples of what web.xml and 
struts-config.xml should look like when properly configured?

Thanks very much,

jim





Q: html:img question

2004-01-15 Thread Jim Anderson
I'm converting a perl web app to Java/Struts and have run into a couple 
of problems converting html files.

First, I started converting  tags to  but discovered 
that a number of them use the name attribute with javascript to 
implement mouseover popup menus, e.g. . 
When I changed these to , I got errors like "Cannot find bean 
place_holder01 in any scope".

Second, I put all graphics in an images directory at the top level of 
the application context, e.g., /myapp/images. The problem is that 
they're not being found. I tried both with and w/o  in the 
 section. Here's the  section from View Source when using 



  
Smith Barney
http://localhost:8080/portfolio/tiles/layouts/mainLayout1.jsp";>
  

Any help greatly appreciated,

jim


need some sample Tiles definitions usage

2003-12-30 Thread Jim Anderson
I've taken the Login example from "Struts in Action" and converted it, 
step by step, to use Tiles. I'm at the point where I've created a 
definition entry in tiles-defs.xml but haven't been able to figure out 
how to "invoke" it. Although the book is generally pretty good with 
examples, it unfortunately doesn't give one here.

Any examples appreciated!

Thanks,

jim

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


Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Jim Anderson
To clarify: I would like to be able to define ActionForwards for use 
within the app but which cannot be entered directly into the browser by 
the user. Is this possible?

Thanks.

jim

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


newbie question/problem

2003-12-22 Thread Jim Anderson
I've been trying to modify the logon app from "Struts in Action" to use 
the new features in Struts 1.1 but am having a problem I haven't be 
able to solve. I replaced  in Logon.jsp with


  

and get the following error:

org.apache.jasper.JasperException: /pages/Logon.jsp(7,0) No such tag 
messages in the tag library imported with prefix html

Of course it looks like I'm somehow referencing the 1.0 version of 
struts-html, but I don't see how that can be.

In web.xml I've got:

  
/tags/struts-html
/WEB-INF/lib/struts-html.tld
  
and the struts-html.tld in /WEB-INF/lib contains:

http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>
...

messages
org.apache.struts.taglib.html.MessagesTag
org.apache.struts.taglib.html.MessagesTei
...

Any ideas???

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