Re: Any Problem faced after upgrading from Struts1.1 to Struts1.2.

2004-12-08 Thread Niall Pemberton
Upgrade notes are here:

http://wiki.apache.org/struts/StrutsUpgradeNotes11to124

Niall

- Original Message - 
From: "Srinivas" <[EMAIL PROTECTED]>
To: "Struts" <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 6:14 AM
Subject: Any Problem faced after upgrading from Struts1.1 to Struts1.2.


> Hi Guys ,
>
> We have developed our application on Struts1.1, now we
have to upgrade it to Struts1.2. But before that I have some questions in
ming. 1) Will I face any problem after upgrading. 2) what is the difference
between Struts1.1 and Struts1.2. I went through Releasenotes which says it
has added some new features aswell bugfixes. But I would like to know in
detail about the feautres. 3) Do I need to change any of my configuration
after upgrading to Struts1.2. Please let me know as I need to evaluate for
upgrading Strut1.1 to Struts1.2.
>
> Thanks in advance and thanks a lot,
>
> Srinivas
>
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



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



Any Problem faced after upgrading from Struts1.1 to Struts1.2.

2004-12-08 Thread Srinivas
Hi Guys ,
 
We have developed our application on Struts1.1, now we have to 
upgrade it to Struts1.2. But before that I have some questions in ming. 1) Will 
I face any problem after upgrading. 2) what is the difference between Struts1.1 
and Struts1.2. I went through Releasenotes which says it has added some new 
features aswell bugfixes. But I would like to know in detail about the 
feautres. 3) Do I need to change any of my configuration after upgrading to 
Struts1.2. Please let me know as I need to evaluate for upgrading Strut1.1 to 
Struts1.2. 
 
Thanks in advance and thanks a lot,
 
Srinivas

 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: what is the current production version of struts??

2004-12-08 Thread Niall Pemberton
1.2.6 is being voted in at the moment:

http://thread.gmane.org/gmane.comp.jakarta.struts.devel/23674

...so far 3 votes for beta status and if thats the end result of the vote
then theres likely to be a 1.2.7 soon.

As Hubert said 1.2.4 is the current "ga" release - if you want to know the
difference between 1.2.4 and 1.2.6, details are here...

http://www.niallp.pwp.blueyonder.co.uk/strutsversion126.html

Niall


- Original Message - 
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 08, 2004 8:21 PM
Subject: Re: what is the current production version of struts??


> The Struts dev team makes milestone builds and makes them available to
> the general public so people have access to versions that are more
> updated than the "production release" but more stable than the nightly
> builds.  Each milestone build is a potential "production release" (or
> a potential dud) depending on how the developers and users judge the
> build sometime after it's been released.
>
>
> On Wed, 8 Dec 2004 12:07:59 -0800 (PST), Ashish Kulkarni
> <[EMAIL PROTECTED]> wrote:
> > Hi
> > If 1.2.4 is current release then what are 1.2.5 and
> > 1.2.6,
> > why there are 2 builds which are in development
> > version and not only one?
> > Ashish
> >
> >
> > --- Hubert Rabago <[EMAIL PROTECTED]> wrote:
> >
> > > Right now it's still 1.2.4
> > > http://struts.apache.org/download.cgi#struts124
> > >
> > >
> > > On Wed, 8 Dec 2004 11:35:40 -0800 (PST), Ashish
> > > Kulkarni
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi
> > > > what is the current production version of struts,
> > > is
> > > > it 1.2.4 or 1.2.5 or 1.2.6,
> > > > I have a current struts project using 1.1, and
> > > have
> > > > apportunity to migrate to new struts version,
> > > which
> > > > one should i jump on
> > > > My application will be going live in next 2 months
> > > >
> > > > Ashish
> > > >
> > > > __
> > > > Do you Yahoo!?
> > > > Yahoo! Mail - Easier than ever with enhanced
> > > search. Learn more.
> > > > http://info.mail.yahoo.com/mail_250
> > > >
> > > >
> > >
> > -
> > > > 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]
> > >
> > >
> >
> >
> > =
> > A$HI$H
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Mail - 250MB free storage. Do more. Manage less.
> >
> >
> > http://info.mail.yahoo.com/mail_250
> >
>
> -
> 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: Controller Form not forwarding to Action

2004-12-08 Thread Niall Pemberton
Looks like you have a missing ">" in your struts-config after
input="/logon.jsp"

 
  
  
 

Niall

- Original Message - 
From: "Jim Douglas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 3:29 AM
Subject: Controller Form not forwarding to Action


> To all,
>   I have an LoginForm which is working fine.  The problem is struts is not
> forwarding after form validation.  It never gets into the LoginAction
class.
>
>   This is the output to the log file.
>
> DEBUG -  Validating input form properties
> INFO - IN LogonForm CLASS: ActionErrors METHOD
> INFO - password = jim
> INFO - username = butter
> DEBUG -   No errors detected, accepting input
> DEBUG -  Looking for Action instance for class app.web.LogonAction
> DEBUG -   Creating new Action instance
>
> This is my struts-config.xml
>
>   
>   
> 
>  type="app.web.LogonForm"/>
>   
> 
>   
> 
>  rewrite="true"/> -->
>   
>
>   
> 
> type="app.web.LogonAction"
>name="logonForm"
>scope="request"
>input="/logon.jsp"
>
>
> 
>
> Where else can I look?
>
> 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]



Re: Extending ActionMapping to use

2004-12-08 Thread Niall Pemberton
Everything you've done looks right. What version of Struts are you using,
because I believe the "type" attribute existed in Struts 1.0.x but was
ignored.

Niall

- Original Message - 
From: "Dahnke, Eric (Company IT)" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 08, 2004 11:19 PM
Subject: Extending ActionMapping to use 



Hello,

We would like to introduce a custom parameter into all action's
ActionMappings. I've looked at a bunch of examples and threads, but
can't get it to work. Here's the setup:

Struts-config:
--








CustomActionMapping:

package com.foo.bar.actions;
import org.apache.struts.action.ActionMapping;
public class CustomActionMapping extends ActionMapping {

protected String foo;

public CustomActionMapping() {
super();
}
public String getFoo() {
return foo;
}
public void setFoo(String foo) {
this.foo = foo;
}
}


Upload Action:
--
public class UploadAction extends Action {
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception {

String forward = "display";
CustomActionMapping cam = (CustomActionMapping) mapping;

System.out.println("Foo="+cam.getFoo());
}


cam.getFoo() is always null!?!?


A few questions:


Is the constructor in CustomActionMapping necessary?

Is the casting of the ActionMapping to CustomActionMapping the way to
get at the getter method of the property that is set? If not how do I
get at the set-property?


What am I missing? Thx, Eric


NOTICE: If received in error, please destroy and notify sender.  Sender does
not waive confidentiality or privilege, and use is prohibited.


-
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: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Niall Pemberton
Mick,

When you say "I did still have all the correct 1.2.4 libs in place though" -
this doesn't look true to me. The ''acceptCharset" setter was introduced in
Struts 1.2.4 - so when you get the following error:

The Tag class 'org.apache.struts.taglib.html.FormTag' has no setter method
corresponding to TLD declared attribute 'acceptCharset', (JSP 1.1 spec,
5.4.1)

It looks like you've deployed the TLD files for 1.2.4 - but not the
struts.jar for 1.2.4

Niall

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 1:10 AM
Subject: RE: Error upgrading from 1.1 to 1.2.4


Now I reverted all my xml files back to the original ones in cvs and then
deployed and I get this error:

Parsing of JSP File '/WEB-INF/default/default.jsp' failed:


 /WEB-INF/default/default.jsp(5): Error in using tag library
uri='/WEB-INF/struts-html.tld' prefix='html': The Tag class
'org.apache.struts.taglib.html.FormTag' has no setter method corresponding
to TLD declared attribute 'acceptCharset', (JSP 1.1 spec, 5.4.1)
probably occurred due to an error in /WEB-INF/default/default.jsp line 5:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>




I did still have all the correct 1.2.4 libs in place though.
Then, I added just the updated header for the struts-config.xml file to 1.2
and I get the same error as before

> >  > "action" failed to preload on startup in Web application: "/".
> > javax.servlet.UnavailableException: Parsing error processing
> > resource path



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Knutson, Mick
Sent: Wednesday, December 08, 2004 4:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Error upgrading from 1.1 to 1.2.4


No luck. I commented out all my actions, and the error did not change.


Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:57 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4


Mick,

Have you tried commenting out all actions from your action-mappings segment
to see if it is specific to that section or if it is something else in the
config file?  When all else fails, the process of elimination helps.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:51 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4


So how to fix it? :-) just so you don't get bored. I am definitely not bored
right now, and actually wish this would end as I would prefer bored over
this... ;-)



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:46 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
>
>
> The failure is actually when deploying the ear into web
> logic. So there is nothing that was called to get this error
> except starting up the action Servlet itself.
>
> BTW, Sorry for posting so much.

Hey, keeps me from being bored.

Right... I think the error is being thrown as the servlet reads the
struts-config.xml file.

>
>
> 

Re: Best practice question: Properties (ShoppingCart) per user

2004-12-08 Thread Frank W. Zammetti
Sounds good!  You'll find that the people here are extremely helpful, 
but they do tend to shy away from general questions (unless they are SO 
general as to be theoretical, in which case EVERYONE has an opinion :) 
), so the more specific a question you can ask, the better.

As for books to read, I would highly recommend grabbing the latest copy 
of Head First Servlets and JSP.  It's not Struts-specific, but it is 
really necassery to know what is going on beneath Struts, and it is the 
best I've seen in this area (I'm currently using it as a study guide for 
the SCWCD exam, but it's good for anyone I'd say).  Frankly, if you get 
everything in that book, most of Struts will make sense almost 
immediately.  For Struts, O'Reilly has a pretty good book, the title of 
which elludes me at the moment, but I suspect it's the only one they 
sell.  At times it goes into a little TOO much detail for people trying 
to get a start in Struts, but most of it is excellent.

As for your specific architecture questions... Generally speaking, your 
concern about putting all application state for a user in session is 
valid.  This isn't what session is for.  It's really for fairly small 
BITS of state information, things that will in all likelihood change 
frequently, and certainly nothing that should persist beyond a session 
(hence the name!).  But, in your case, since you are just using it as an 
example, I wouldn't worry about it, go ahead and use session, it'll be 
easier.

In Struts, Actions can be shared across requests, which means that if 
you have class-level variables, they are, potentially, shared across 
multiple requests.  Clearly this is a formula for disaster.

There are two ways you could go here... one is to use session as I said, 
the other is to have a "data storage class" that just has some static 
members, most probably a Map of some sort.  You can use this as 
something of a poor man's database.  Think of a HashMap for instance as 
a database table.  Now, assume each element you add to the HashMap is 
itself a HashMap.  You can think of these "inner HashMaps" as rows in 
the table.  Then, each element in that inner HashMap is a field in the 
table.  Make sense?  You can go so far as to create insertRow(), 
deleteRow() and updateRow() methods for your data storage class... These 
would do the functions their name implies on the HashMap, and you can in 
that way "key" your data, i.e., each "row" has an element recordKey 
let's say.  So, your insert method can throw an exception if a "record" 
exists with that key already.  In fact, you could go so far as to throw 
a SQLException, and in that way you could replace that data storage 
class with a class that talks to a database down the road, and nothing 
that uses that class should have to change.

But that's getting ahead of ourselves a bit :)  If you intend to build 
something that you know would usually use a database, then the second 
approach is a good idea.  Be sure to synchronize your access to your 
Maps (which would be a bottleneck in a real application, but you can get 
away with it here, and in general in any application that isn't going to 
have a big load).  But, using session might be easier, depends on how 
much work (and control) you want.  For a shopping cart, the volume of 
data isn't going to be great, so no worries there.

But, the golden rule with Struts to remember is no class-level 
variables!  That's what all this is designed to avoid.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Simon MARTIN wrote:
Hi,
thanks for your offering of help.
I know that my Struts knowlegde is not the best yet -- no question about 
it -- but I'm willing to change that, as far as my time allows it.

Fortunately, my lecture is not of that importance you might have 
assumed, as I'm 'only' giving a presentation at school. However, I of 
course want to present something I know about, so this does not really 
change the situation.

As I can see what you're telling me, I think my learning has been to 
practice-orientated and too less theory-orientated, which brings me into 
trouble when the requirements change.
So far, I've only strictly written Spring apps with Struts MVC or 
without Struts MVC, but, in any case, with Hibernate as ORM-framework. 
Therefore, I really came into troubles when using Struts alone, and then 
even doing so without a database.
Of course, I had thought about putting the stuff into the session, 
either, but putting complete client-state into the session seemed 
unclean to me, as I personally had prefered some kind of 
property-setting statically.
Please let me know about further architectural mistakes I've done.

I've started reading Wiley's 'Mastering Jakarta Struts', which 
unfortunately seems kind of outdated to me. Please let me know about 
better alternatives.

Furthermore, I'd appreciate any kind of help.
Kind regards and thanks in advance,
  Simon
[EMAIL PROTECTED] wrote:

Controller Form not forwarding to Action

2004-12-08 Thread Jim Douglas
To all,
 I have an LoginForm which is working fine.  The problem is struts is not 
forwarding after form validation.  It never gets into the LoginAction class.

 This is the output to the log file.
DEBUG -  Validating input form properties
INFO - IN LogonForm CLASS: ActionErrors METHOD
INFO - password = jim
INFO - username = butter
DEBUG -   No errors detected, accepting input
DEBUG -  Looking for Action instance for class app.web.LogonAction
DEBUG -   Creating new Action instance
This is my struts-config.xml
 
 
   
   
   type="app.web.LogonForm"/>
 

 
   
-->
 

 
   
   
  
   
Where else can I look?
Thanks,
Jim

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


Re: Best practice question: Properties (ShoppingCart) per user

2004-12-08 Thread Simon MARTIN
Hi,
thanks for your offering of help.
I know that my Struts knowlegde is not the best yet -- no question about it -- 
but I'm willing to change that, as far as my time allows it.

Fortunately, my lecture is not of that importance you might have assumed, as I'm 
'only' giving a presentation at school. However, I of course want to present 
something I know about, so this does not really change the situation.

As I can see what you're telling me, I think my learning has been to 
practice-orientated and too less theory-orientated, which brings me into trouble 
when the requirements change.
So far, I've only strictly written Spring apps with Struts MVC or without Struts 
MVC, but, in any case, with Hibernate as ORM-framework. Therefore, I really came 
into troubles when using Struts alone, and then even doing so without a database.
Of course, I had thought about putting the stuff into the session, either, but 
putting complete client-state into the session seemed unclean to me, as I 
personally had prefered some kind of property-setting statically.
Please let me know about further architectural mistakes I've done.

I've started reading Wiley's 'Mastering Jakarta Struts', which unfortunately 
seems kind of outdated to me. Please let me know about better alternatives.

Furthermore, I'd appreciate any kind of help.
Kind regards and thanks in advance,
  Simon
[EMAIL PROTECTED] wrote:
PLEASE do not take offense from what I am about to say.  I do not mean 
to be anything but constructive and helpful...

I am concerned that you are trying to build an example for those you 
will be teaching because I can see some fundamental misunderstandings, 
or gaps in your knowledge.  I'd be willing to guess that someone (your 
emoployer?) asked you to teach some people because you were the best of 
the group, and if that's the case I most certainly commend you for 
taking on the task.

However, I think it would be in your best interest, and certainly in 
your students' best interest, to take some time and become more familiar 
with the topic(s) you are going to be teaching.  I and others here could 
give you the answers, and we'd be happy to do so, but the questions you 
are asking are things that you really should be able to answer yourself 
in light of the fact that you are going to be teaching, and might face 
the same questions, or others that will test your fundamental 
knowledge.  I'm not just talking about learning Struts here, which 
certainly is a big part of it.  I sense you may have some learning to do 
with regard to web application development in general.

Again, I hope I have not offended you, that is not my intent in any 
way.  If your just learning this stuff yourself, that's great, we'll all 
help any way we can, but I would really try and hold off on the teaching 
for a while until you see these answers yourself.


> On Tue, December 7, 2004 1:59 pm, Bill Siggelkow said:
> Simon,
>
> Actions should not hold client-state; instead, you can create a
> ShoppingCart in the Action but then save it in the HttpSession.
>
> Without going into to many details, I suggest you take a look at the
> Struts MailReader example distributed with Struts.
>
> -Bill Siggelkow
>
>
> Simon MARTIN wrote:
>
>> Hi,
>>
>> I'm currently writing a short Struts application without a database (I
>> know that this would be better, but as it is only for teaching purposes,
>> I don't want to 'overflow' my audience with databases and ORM).
>> It should be a small online sales system -- I've got ShoppingItems,
>> ShoppingUsers (which are not yet used) and ShoppingCarts.
>>
>> I want a ShoppingCart which stores the ordered items per user. I had
>> something like this:
>>
>> public class ShoppingCartAction extends DispatchAction {
>>   private ShoppingCartManager shoppingCartManager;
>>   ...
>>
>>   public ActionForward order(...)
>>   ...
>>
>>   public ActionForward list(...)
>>   ...
>> }
>>
>> and thought that it would work. Unfortunately, each user (which is not
>> authenticated or anything yet) gets the same shopping cart when he calls
>> shoppingCart.do?method=list.
>>
>> So I did some research and found this:
>> http://www.jguru.com/faq/view.jsp?EID=1057609
>>
>> So I created an ShoppingCartMapping class
>>
>> public class ShoppingCartMapping extends ActionMapping {
>>   private ShoppingCartManager shoppingCartManager;
>>   ...
>> }
>>
>> and call it like this
>>
>> public ActionForward list(ActionMapping mapping, ActionForm form,
>>   HttpServletRequest request,
>>   HttpServletResponse response)
>>   throws Exception {
>> request.setAttribute("orderedItems",
>>   ((ShoppingCartMapping)mapping).getShoppingCartManager().getItems());
>> return mapping.findForward("list");
>> }
>>
>> which gives me a ClassCastException.
>>
>> Do I have to set my custom ActionMapping in web.xml or
>> struts-config.xml?
>> Am I on the right way, or is there a better way of doing this?
>>
>> Thanks in advande and kind regards,
>>   Simon
>>
>> PS: Plea

RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Mick.Knutson
Now I reverted all my xml files back to the original ones in cvs and then 
deployed and I get this error:

Parsing of JSP File '/WEB-INF/default/default.jsp' failed:

 /WEB-INF/default/default.jsp(5): Error in using tag library 
uri='/WEB-INF/struts-html.tld' prefix='html': The Tag class 
'org.apache.struts.taglib.html.FormTag' has no setter method corresponding to 
TLD declared attribute 'acceptCharset', (JSP 1.1 spec, 5.4.1)
probably occurred due to an error in /WEB-INF/default/default.jsp line 5:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> 



I did still have all the correct 1.2.4 libs in place though.
Then, I added just the updated header for the struts-config.xml file to 1.2 and 
I get the same error as before

> >  > "action" failed to preload on startup in Web application: "/".
> > javax.servlet.UnavailableException: Parsing error processing
> > resource path



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation."




-Original Message-
From: Knutson, Mick 
Sent: Wednesday, December 08, 2004 4:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Error upgrading from 1.1 to 1.2.4


No luck. I commented out all my actions, and the error did not change.


Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation."




-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:57 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4


Mick,

Have you tried commenting out all actions from your action-mappings segment
to see if it is specific to that section or if it is something else in the
config file?  When all else fails, the process of elimination helps.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:51 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4


So how to fix it? :-) just so you don't get bored. I am definitely not bored
right now, and actually wish this would end as I would prefer bored over
this... ;-)



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:46 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
>
>
> The failure is actually when deploying the ear into web
> logic. So there is nothing that was called to get this error
> except starting up the action Servlet itself.
>
> BTW, Sorry for posting so much.

Hey, keeps me from being bored.

Right... I think the error is being thrown as the servlet reads the
struts-config.xml file.

>
>
> 
> Mick Knutson
> Wells Fargo Business Direct
> (415) 222-1020
>
> "This message may contain confidential and/or privileged
> information. If you are not the addressee or authorized to
> receive this for the addressee, you must not use, copy,
> disclose, or take any action based on this message or any
> information herein. If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
> 
>
>
>
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wed

RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Mick.Knutson
No luck. I commented out all my actions, and the error did not change.


Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation."




-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:57 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4


Mick,

Have you tried commenting out all actions from your action-mappings segment
to see if it is specific to that section or if it is something else in the
config file?  When all else fails, the process of elimination helps.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:51 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4


So how to fix it? :-) just so you don't get bored. I am definitely not bored
right now, and actually wish this would end as I would prefer bored over
this... ;-)



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:46 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
>
>
> The failure is actually when deploying the ear into web
> logic. So there is nothing that was called to get this error
> except starting up the action Servlet itself.
>
> BTW, Sorry for posting so much.

Hey, keeps me from being bored.

Right... I think the error is being thrown as the servlet reads the
struts-config.xml file.

>
>
> 
> Mick Knutson
> Wells Fargo Business Direct
> (415) 222-1020
>
> "This message may contain confidential and/or privileged
> information. If you are not the addressee or authorized to
> receive this for the addressee, you must not use, copy,
> disclose, or take any action based on this message or any
> information herein. If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
> 
>
>
>
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 3:12 PM
> To: Struts Users Mailing List
> Subject: RE: Error upgrading from 1.1 to 1.2.4
>
>
> Mick,
>
> I think the point wasn't for you to post everything but to
> examine the path
> attribute of your action-mappings and see if you listed any
> as empty ("") or
> ONLY a slash "/", i.e. not "/SOMETHING".  If you do have ""
> or "/", you
> shouldn't do that.  Instead, we recommend you set the attribute
> unknown="true" for that particular action mapping to be used
> for anything
> which fails to match any other action mapping.  Think of it
> as a "default"
> action for unmatched struts invocations.
>
> Regards,
> David
> > -Original Message-
> > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 3:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Error upgrading from 1.1 to 1.2.4
> > Importance: High
> >
> >
> > Ok, I have removed the xml comments I made and I still get an error:
> >   > in Web application: "/".
> > (full error below)...
>
> It looks like your xml is now being parsed with no dtd problems.
>
> This looks like you have an action mapped to /.  Which is odd and
> probably is not the case.
> What does the rest of your struts-config look like?
>
>
>
>
>
> >
> > Here are my various xml descriptors:
> > 
> >
> > web.xml:
> > =
> > 
> >  >   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> >   "http://java.sun.com/dtds/web-app_2_3.dtd";>
> >
> >
> > 
> >
> > 
> > 
> > 
> >
> > 
> >
> > 
> >
> > 
> > 
> > 
> >
> > 
> > action
> >
> > com.wf.bd.ice.struts.ExtendedActionServlet > vlet-class>
> > 
> > config

RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread David G. Friedman
Mick,

Have you tried commenting out all actions from your action-mappings segment
to see if it is specific to that section or if it is something else in the
config file?  When all else fails, the process of elimination helps.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:51 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4


So how to fix it? :-) just so you don't get bored. I am definitely not bored
right now, and actually wish this would end as I would prefer bored over
this... ;-)



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:46 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
>
>
> The failure is actually when deploying the ear into web
> logic. So there is nothing that was called to get this error
> except starting up the action Servlet itself.
>
> BTW, Sorry for posting so much.

Hey, keeps me from being bored.

Right... I think the error is being thrown as the servlet reads the
struts-config.xml file.

>
>
> 
> Mick Knutson
> Wells Fargo Business Direct
> (415) 222-1020
>
> "This message may contain confidential and/or privileged
> information. If you are not the addressee or authorized to
> receive this for the addressee, you must not use, copy,
> disclose, or take any action based on this message or any
> information herein. If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
> 
>
>
>
> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 3:12 PM
> To: Struts Users Mailing List
> Subject: RE: Error upgrading from 1.1 to 1.2.4
>
>
> Mick,
>
> I think the point wasn't for you to post everything but to
> examine the path
> attribute of your action-mappings and see if you listed any
> as empty ("") or
> ONLY a slash "/", i.e. not "/SOMETHING".  If you do have ""
> or "/", you
> shouldn't do that.  Instead, we recommend you set the attribute
> unknown="true" for that particular action mapping to be used
> for anything
> which fails to match any other action mapping.  Think of it
> as a "default"
> action for unmatched struts invocations.
>
> Regards,
> David
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 6:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
> Importance: High
>
>
> 
>
> 
> 
> 
>
> 
>
>   dynamic="true"
>
> type="org.apache.struts.validator.DynaValidatorForm">
> 
> 
>
>   dynamic="true"
>
> type="org.apache.struts.validator.DynaValidatorForm">
> 
> 
>  type="java.lang.String" />
>  type="java.util.Collection" />
> 
>
> 
> type="org.apache.struts.validator.DynaValidatorForm">
> 
> 
>  type="java.lang.String" />
>  type="java.lang.String" />
> 
>
> 
> type="org.apache.struts.validator.DynaValidatorForm">
> 
>  type="java.lang.String" />
>  type="java.lang.String" />
> 
> 
>
> type="com.wf.bd.ice.form.ProductSelectionForm">
> 
>
> 
> type="com.wf.bd.ice.business.BusinessValidatorForm">
> 
>
> 
> type="com.wf.bd.ice.guarantor.GuarantorValidatorForm">
> 
>
> 
> type="com.wf.bd.ice.guarantor.GuarantorValidatorForm">
> 
>
> 
> type="org.apache.struts.validator.DynaValidatorForm">
> 
>  type="java.lang.String" />
> 
>
>
> 
> type="com.wf.bd.ice.product.BusinessLineValidatorForm">
> 
>
> 
> type="org.apache.struts.validator.DynaValidatorForm">
> 
>  type="java.lang.String" />
> 
>
> 
> type="com.wf.bd.ice.product.BusinessCardValidatorForm">
> 
>
>
> 
> type="org.apache.struts.validator.DynaValidatorForm">
>   

RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Mick.Knutson
The failure is actually when deploying the ear into web logic. So there is 
nothing that was called to get this error except starting up the action Servlet 
itself.

BTW, Sorry for posting so much.



Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation."




-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:12 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4


Mick,

I think the point wasn't for you to post everything but to examine the path
attribute of your action-mappings and see if you listed any as empty ("") or
ONLY a slash "/", i.e. not "/SOMETHING".  If you do have "" or "/", you
shouldn't do that.  Instead, we recommend you set the attribute
unknown="true" for that particular action mapping to be used for anything
which fails to match any other action mapping.  Think of it as a "default"
action for unmatched struts invocations.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:03 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4
Importance: High




























































































































 









































































Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 2:28 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
> Importance: High
>
>
> Ok, I have removed the xml comments I made and I still get an error:
>   in Web application: "/".
> (full error below)...

It looks like your xml is now being parsed with no dtd problems.

This looks like you have an action mapped to /.  Which is odd and
probably is not the case.
What does the rest of your struts-config look like?





>
> Here are my various xml descriptors:
> 
>
> web.xml:
> =
> 
>"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtds/web-app_2_3.dtd";>
>
>
> 
>
> 
> 
> 
>
> 
>
> 
>
> 
> 
> 
>
> 
> action
>
> com.wf.bd.ice.struts.ExtendedActionServlet vlet-class>
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> detail
> 1
> 
> 1
> 
>
>
>
>
>
>
> struts-config.xml:
> ==
> 
>"-//Apache Software Foundation//DTD Struts Configuration
> 1.2//EN"
>   "http://struts.apache.org/dtds/struts-config_1_2.dtd";

Extending ActionMapping to use

2004-12-08 Thread Dahnke, Eric (Company IT)

Hello,

We would like to introduce a custom parameter into all action's
ActionMappings. I've looked at a bunch of examples and threads, but
can't get it to work. Here's the setup:

Struts-config:
--








CustomActionMapping:

package com.foo.bar.actions;
import org.apache.struts.action.ActionMapping;
public class CustomActionMapping extends ActionMapping {

protected String foo;
 
public CustomActionMapping() {
super();
}
public String getFoo() {
return foo;
}
public void setFoo(String foo) {
this.foo = foo;
}
}


Upload Action:
--
public class UploadAction extends Action {
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception {

String forward = "display";
CustomActionMapping cam = (CustomActionMapping) mapping;

System.out.println("Foo="+cam.getFoo());
}


cam.getFoo() is always null!?!?


A few questions:


Is the constructor in CustomActionMapping necessary?

Is the casting of the ActionMapping to CustomActionMapping the way to
get at the getter method of the property that is set? If not how do I
get at the set-property?


What am I missing? Thx, Eric 

 
NOTICE: If received in error, please destroy and notify sender.  Sender does 
not waive confidentiality or privilege, and use is prohibited. 
 

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



RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread David G. Friedman
Mick,

I think the point wasn't for you to post everything but to examine the path
attribute of your action-mappings and see if you listed any as empty ("") or
ONLY a slash "/", i.e. not "/SOMETHING".  If you do have "" or "/", you
shouldn't do that.  Instead, we recommend you set the attribute
unknown="true" for that particular action mapping to be used for anything
which fails to match any other action mapping.  Think of it as a "default"
action for unmatched struts invocations.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:03 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4
Importance: High




























































































































 









































































Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 2:28 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
> Importance: High
>
>
> Ok, I have removed the xml comments I made and I still get an error:
>   in Web application: "/".
> (full error below)...

It looks like your xml is now being parsed with no dtd problems.

This looks like you have an action mapped to /.  Which is odd and
probably is not the case.
What does the rest of your struts-config look like?





>
> Here are my various xml descriptors:
> 
>
> web.xml:
> =
> 
>"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtds/web-app_2_3.dtd";>
>
>
> 
>
> 
> 
> 
>
> 
>
> 
>
> 
> 
> 
>
> 
> action
>
> com.wf.bd.ice.struts.ExtendedActionServlet vlet-class>
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> detail
> 1
> 
> 1
> 
>
>
>
>
>
>
> struts-config.xml:
> ==
> 
>"-//Apache Software Foundation//DTD Struts Configuration
> 1.2//EN"
>   "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
>
>
> 
>
> 
>
>
>
>
>
>
> validation-nbbc.xml:
> =
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>
> "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
>
> 
> ...more
>
>
>
>
>
>
>
> validation-rules.xml:
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>
> "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
>
>
>
>
>
>
>
>
> tiles-defs.xml:
> =
> 
>
>  "-//Apache Software Foundation//DTD Tiles
> Configuration 1.1//EN"
>"http://struts.apache.org/dtds/tiles-config_1_1.dtd";>
>
> 
>
>
>
>
>
>
>
>
> The ERROR I get:
> =
>  "action" failed to preload on startup in Web application: "/".
> javax.servlet.UnavailableException: Parsing erro

RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Mick.Knutson


























































































































 









































































Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation."




-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 2:28 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
> Importance: High
> 
> 
> Ok, I have removed the xml comments I made and I still get an error:
>   in Web application: "/".
> (full error below)...

It looks like your xml is now being parsed with no dtd problems.

This looks like you have an action mapped to /.  Which is odd and probably 
is not the case.
What does the rest of your struts-config look like?





> 
> Here are my various xml descriptors:
> 
> 
> web.xml:
> =
> 
>"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtds/web-app_2_3.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> action
>
> com.wf.bd.ice.struts.ExtendedActionServlet vlet-class>
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> detail
> 1
> 
> 1
> 
> 
> 
> 
> 
> 
> 
> struts-config.xml:
> ==
> 
>"-//Apache Software Foundation//DTD Struts Configuration
> 1.2//EN"
>   "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> validation-nbbc.xml:
> =
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>   
> "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
> 
> 
> ...more
> 
> 
> 
> 
> 
> 
> 
> validation-rules.xml:
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>   
> "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> tiles-defs.xml:
> =
> 
> 
>  "-//Apache Software Foundation//DTD Tiles 
> Configuration 1.1//EN"
>"http://struts.apache.org/dtds/tiles-config_1_1.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The ERROR I get:
> =
>  "action" failed to preload on startup in Web application: "/".
> javax.servlet.UnavailableException: Parsing error processing 
> resource path
> at 
> org.apache.struts.action.ActionServlet.handleConfigException(A
> ctionServlet.java:1035)
> at 
> org.apache.struts.action.ActionServlet.parseModuleConfigFile(A
> ctionServlet.java:1012)
> at 
> org.apache.struts.action.ActionServlet.initModuleConfig(Action
> Servlet.java:955)
> at 
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
> at 
> com.wf.bd.ice.struts.ExtendedActionServlet.init(ExtendedAction
> Servlet.java:38)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at 
> weblogic.serv

Invalid TLD resource path (was: ZipException: Permission denied)

2004-12-08 Thread Bernd Prager
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 08, 2004 4:49 PM
> To: Struts Users Mailing List
> Subject: RE: ZipException: Permission denied
> 
> 
> 
> You haven't said what your experience level with Linux and 
> Tomcat is... so this may be a quesiton you have already answered
> 
> Have you checked the permissions of the webapps directory and 
> made sure that whatever user tomcat is running as has rwx priveleges?
> 

I think I'm pretty solid with Linux but I'm still learning a lot with
Tomcat.

Your question made me re-check all the different directories and I
figured something that might be Debian specific. Debian pre-installed
Tomcat application live in a different directory then where tomcat is
installed.
They are in /usr/share/tomcat4/server/webapps/ while tomcat is installed
in /var/lib/tomcat4 and all relevant subdirectories are dynamic links
(e.g. /usr/share/tomcat4/webapps is a dynamic link to
/var/lib/tomcat4/webapps).
That confused me a lot. By moving my application to
/usr/share/tomcat4/server/webapps/ I got rid of the ZipException error.

But unfortunately the exception with
/WEB-INF/lib/commons-collections.jar didn't go away.
I still get:

2004-12-08 17:32:47 WebappLoader[/register]: Deploy JAR
/WEB-INF/lib/struts.jar to
/usr/share/tomcat4/server/webapps/register/WEB-IN
F/lib/struts.jar
2004-12-08 17:32:47 ContextConfig[/register] Exception processing JAR at
resource path /WEB-INF/lib/commons-collections.jar
javax.servlet.ServletException: Exception processing JAR at resource
path /WEB-INF/lib/commons-collections.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:
930)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868
)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j
ava:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3587
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:821)
at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162
)
at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerB
ase.java:182)
...
- Root Cause -
java.lang.IllegalArgumentException: Invalid TLD resource path
/WEB-INF/lib/commons-collections.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:
898)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868
)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j
ava:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3587
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:821)

What does that mean?

Thanks,
-- Bernd



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



RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error upgrading from 1.1 to 1.2.4
> Importance: High
> 
> 
> Ok, I have removed the xml comments I made and I still get an error:
>   in Web application: "/".
> (full error below)...

It looks like your xml is now being parsed with no dtd problems.

This looks like you have an action mapped to /.  Which is odd and probably 
is not the case.
What does the rest of your struts-config look like?





> 
> Here are my various xml descriptors:
> 
> 
> web.xml:
> =
> 
>"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtds/web-app_2_3.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> action
>
> com.wf.bd.ice.struts.ExtendedActionServlet vlet-class>
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> detail
> 1
> 
> 1
> 
> 
> 
> 
> 
> 
> 
> struts-config.xml:
> ==
> 
>"-//Apache Software Foundation//DTD Struts Configuration
> 1.2//EN"
>   "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> validation-nbbc.xml:
> =
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>   
> "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
> 
> 
> ...more
> 
> 
> 
> 
> 
> 
> 
> validation-rules.xml:
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>   
> "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> tiles-defs.xml:
> =
> 
> 
>  "-//Apache Software Foundation//DTD Tiles 
> Configuration 1.1//EN"
>"http://struts.apache.org/dtds/tiles-config_1_1.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The ERROR I get:
> =
>  "action" failed to preload on startup in Web application: "/".
> javax.servlet.UnavailableException: Parsing error processing 
> resource path
> at 
> org.apache.struts.action.ActionServlet.handleConfigException(A
> ctionServlet.java:1035)
> at 
> org.apache.struts.action.ActionServlet.parseModuleConfigFile(A
> ctionServlet.java:1012)
> at 
> org.apache.struts.action.ActionServlet.initModuleConfig(Action
> Servlet.java:955)
> at 
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
> at 
> com.wf.bd.ice.struts.ExtendedActionServlet.init(ExtendedAction
> Servlet.java:38)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at 
> weblogic.servlet.internal.ServletStubImpl$ServletInitAction.ru
> n(ServletStubImpl.java:993)
> at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSubject.java:317)
> at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118)
> at 
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.java:869)
> at 
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImpl.java:848)
> at 
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.java:787)
> at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlet(
> WebAppServletContext.java:3252)
> at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppServletContext.java:3209)
> at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppServletContext.java:3195)
> at 
> weblogic.servlet.internal.WebAppServletContext.preloadResource
> s(WebAppServletContext.java:3174)
> at 
> weblogic.servlet.internal.WebAppServletContext.setStarted(WebA
> ppServletContext.java:5647)
> at 
> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:869)
> at 
> weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationCo
> ntainer.java:2022)
> at 
> weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicatio
> nContainer.java:2063)
> at 
> weblogic.management.deploy.slave.SlaveDeployer$ComponentActiva
> teTask.activateContainer(SlaveDeployer.java:2592)
> at 
> weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.do
> Commit(SlaveDeployer.java:2515)
> at 
> weblogic.management.deploy.slave.SlaveDeployer$Task.commit(Sla
> veDeployer.java:2317)
> at 
> weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoC
> ommit(SlaveDeployer.java:2399)
> at 
> weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(Sl
> aveDeployer.java:2311)
> at 
> weblogic.management.deploy.slave.Sla

RE: Error upgrading from 1.1 to 1.2.4

2004-12-08 Thread Mick.Knutson
Ok, I have removed the xml comments I made and I still get an error:
 
http://java.sun.com/dtds/web-app_2_3.dtd";>

















action
   
com.wf.bd.ice.struts.ExtendedActionServlet

config
/WEB-INF/struts-config.xml


detail
1

1







struts-config.xml:
==

http://struts.apache.org/dtds/struts-config_1_2.dtd";>











validation-nbbc.xml:
=

http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>


...more







validation-rules.xml:

http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>








tiles-defs.xml:
=


 http://struts.apache.org/dtds/tiles-config_1_1.dtd";>










The ERROR I get:
=















Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

"This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation."




-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 5:02 PM
To: Struts Users Mailing List
Subject: RE: Error upgrading from 1.1 to 1.2.4


Mick,

I copied your DTD's into my files (Struts-config.xml, tiles-defs.xml,
validation.xml, web.xml) and could not reproduce the error (I even did this
with my NIC disabled).  Scratch that idea.

How about this idea?  Is this a valid commented out section?

 

Shouldn't here be spaces after the opening  ?

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 7:10 PM
To: [EMAIL PROTECTED]
Subject: RE: Error upgrading from 1.1 to 1.2.4



struts-config:
==

http://struts.apache.org/dtds/struts-config_1_2.dtd";>
...





web.xml:
===

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

...

action

com.wf.bd.ice.struts.ExtendedActionServlet

config
/WEB-INF/struts-config.xml




detail
2

1





tiles-defs:
=


 http://struts.apache.org/dtds/tiles-config_1_1.dtd";>




validation:
===

http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>




validation-wfb:
===

http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>




validation-rules:
==
http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>



Here is the 500 error I get on the UI:





Error 503--Service Unavailable
javax.servlet.UnavailableException: Parsing error processing resource path
at
org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.j
ava:1035)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.j
ava:1012)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:9
55)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at
com.wf.bd.ice.struts.ExtendedActionServlet.init(ExtendedActionServlet.java:3
8)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubI
mpl.java:993)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:869)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va:848)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:787)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletC
ontext.java:3252)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServlet
Context.java:3209)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServlet
Context.java:3195)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServle
tContext.java:3174)
at
weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletConte
xt.java:5647)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:869)
at
weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2
022)
at
weblo

two step wizard like interface? [moved from dev list to answer here]

2004-12-08 Thread Dakota Jack
On Tue, 7 Dec 2004 03:59:39 + (UTC), Marc <[EMAIL PROTECTED]> wrote:
> Hi there. Help a struts rookie pls.
> 
> I have successfully implemented a two step wizard like interface where I have
> A.jsp for the first step and B.jsp for the second step.
> 
> But now I need an ability to dynamically change the jsp file at the step 2
> based on a field selection during step 1 !
> In other words at step two I might need either B.jsp or C.jsp.
> All three jsp files post to the same action class but are processed by
> different methods(I use DispatchAction and different method names). My problem
> is the form bean class. Currently it has getters/setters for all three jsps
> and this is exactly what I do not want to do.
> 
> Is there a more elegant way of doing this ? Can I use different form beans and
> yet use the same action class ?
> 
> Thanks in advance.

Your problem has various aspects.

First, you say that you want to use the same action class to go from A
to B or C.  That is no problem.  This is just a change in the
ActionForward.

Second, you say that when you have differing destinations or targets
(B or C) you want to use different methods to process the data.  That
is also not a problem.  You can use many varieties of methods used to
process multiple submits.  (I assume, perhaps wrongly, that you define
which of B or C is accessed by a choice of submits on the part of the
client.)  You use DispatchAction.  You might want to look at the
options on this at http://www.michaelmcgrady.com/button/ and I would
recommend in particular the DispatchUtil solution.

Third, you talk about wanting different action forms for the differing
end destinations or targets, i.e. B or C.  This is curious.  I am not
sure you mean this.  The action form is populated by the form on the
jsp page A, if you are going to B or C.  If your action prepopluates B
or C this is not a problem.  If B or C have different poplation fields
themselves, this is also not a problem.  This sort of problem is often
asked on the lists, and seems to involve some sort of confusion. 
Apparently what you want to do is to have two forms on the page A
which call the same action and have the same fields but which are
intended for different end pages B or C.  This does not require two
forms.  One form can do this without difficulty if you have code in
the form access differing methods.  You have no need at all of
multiple forms, so far as I can tell.

Jack
-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



RE: ZipException: Permission denied

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Bernd Prager [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: ZipException: Permission denied
> 
> 
> While setting up a struts framework on linux (Debian) I have trouble
> getting my application to work.
> I get two significant error messages and I hope by solving the first
> issue the second one disappears.
> I use the testing packages on Debian (tomcat4 4.1.30-6 and
> libstruts1.1-j 1.1-2).
>  
> The first error message is in catalina.log:
> 
> Dec 8, 2004 4:24:43 PM org.apache.struts.util.PropertyMessageResources
> 
> INFO: Initializing,
> config='org.apache.webapp.admin.ApplicationResources', returnNull=true
> java.util.zip.ZipException: Permission denied

You haven't said what your experience level with Linux and Tomcat is... so this 
may be a quesiton you have already answered

Have you checked the permissions of the webapps directory and made sure that 
whatever user tomcat is running as has rwx priveleges?



> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.(ZipFile.java:112)
> at java.util.jar.JarFile.(JarFile.java:127)
> at java.util.jar.JarFile.(JarFile.java:92)
> at
> org.apache.catalina.loader.WebappLoader.setRepositories(Webapp
> Loader.jav
> a:1066)
> at
> org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:665)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext
> .java:3550
> )
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(Contai
> nerBase.ja
> va:821)
> at
> org.apache.catalina.core.ContainerBase.access$000(ContainerBas
> e.java:162
> )
> at
> org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(
> ContainerB
> ase.java:182)
> at java.security.AccessController.doPrivileged(Native Method)
> ...
> 
> Now I checked the entire tomcat4 directory structure, all files are
> owned by tomcat4 and readable.
> Tomcat has write access to all project directories. I even checked the
> /var/cache/tomcat4 dir.
> I scanned the entire box for all existing jar files and confirmed
> they're readable as well.
> What else could cause that?
> 
> The second message is in localhost.log:
> 
> 2004-12-08 16:24:46 HostConfig[localhost]: Deploying web application
> directory register
> 2004-12-08 16:24:47 ContextConfig[/register] Exception 
> processing JAR at
> resource path /WEB-INF/lib/commons-collections.jar
> javax.servlet.ServletException: Exception processing JAR at resource
> path /WEB-INF/lib/commons-collections.jar
> at
> org.apache.catalina.startup.ContextConfig.tldScanJar(ContextCo
> nfig.java:
> 930)
> at
> org.apache.catalina.startup.ContextConfig.tldScan(ContextConfi
> g.java:868
> )
> ...
> - Root Cause -
> java.lang.IllegalArgumentException: Invalid TLD resource path
> /WEB-INF/lib/commons-collections.jar
> at
> org.apache.catalina.startup.ContextConfig.tldScanJar(ContextCo
> nfig.java:
> 898)
> at
> org.apache.catalina.startup.ContextConfig.tldScan(ContextConfi
> g.java:868
> )
> at
> org.apache.catalina.startup.ContextConfig.start(ContextConfig.
> java:647)
> at
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(Conte
> xtConfig.j
> ava:243)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
> ifecycleSu
> pport.java:166)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext
> .java:3587
> )
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(Contai
> nerBase.ja
> va:821)
> at
> org.apache.catalina.core.ContainerBase.access$000(ContainerBas
> e.java:162
> )
> at
> org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(
> ContainerB
> ase.java:182)
> at java.security.AccessController.doPrivileged(Native Method)
> 
> The application doesn't start of course.
> 
> Can anybody please help me here?
> Thanks a lot,
> -- Bernd
> 
> -
> 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: Nested Struts Tags

2004-12-08 Thread Lee Harrington







This code produced the following error:

[ServletException in:/form/MetricDisplayViewOnly.jsp] Unable to
compile class for JSP An error occurred at line: 54 in the jsp file:
/form/MetricDisplayViewOnly.jsp Generated servlet error: [javac]
Compiling 1 source file
C:\tomcat5\work\Catalina\localhost\dd3\org\apache\jsp\form\MetricDisplayViewOnly_jsp.java:174:
cannot resolve symbol symbol : method setValue (java.lang.Object)
location: class org.apache.struts.taglib.logic.EqualTag
_jspx_th_logic_equal_0.setValue( test ); ^ 1 error '


On Wed, 8 Dec 2004 22:25:47 +0100, Vadim Petrenko <[EMAIL PROTECTED]> wrote:
> Hi, Lee,
> 
> Did you try ?
> 
> 
> 
> 
> 
> 
> 
> 
> Vadim.
> 
> 
> 
> -Original Message-
> From: Lee Harrington [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 10:07 PM
> To: [EMAIL PROTECTED]
> Subject: Nested Struts Tags
> 
> I'm in a conundrum.  I have a page that normally displays a pick list.
>  Sometimes, though, I don't want folks to editso I just display
> the values.
> 
> But for picklists, I don't want to display the value, but what the
> pick list resolves to.  I already have the "list" the picklist uses in
> the request scope...so I try the following:
> 
> 
> 
> 
> 
> 
> 
> It works if I hard code the value (the 9 on the second line)
> 
> What I want is the form value.  I've tried lots of things.  None work:
> 
>   - value=""
>   - value="<%= dataStewardId %>"
>   - value="<%= metricForm.dataStewardId %>"
>   - value="<%= metricForm.get('dataStewardId') %>"
> 
> etc.
> 
> I either need to be able to nest the "" tag, or I
> need to get a java script handle on the form variable to use in "<%=
> =>".
> 
> I'm stuck,
> 
> Lee
> 
> -
> 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]



ZipException: Permission denied

2004-12-08 Thread Bernd Prager
While setting up a struts framework on linux (Debian) I have trouble
getting my application to work.
I get two significant error messages and I hope by solving the first
issue the second one disappears.
I use the testing packages on Debian (tomcat4 4.1.30-6 and
libstruts1.1-j 1.1-2).
 
The first error message is in catalina.log:

Dec 8, 2004 4:24:43 PM org.apache.struts.util.PropertyMessageResources

INFO: Initializing,
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
java.util.zip.ZipException: Permission denied
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:112)
at java.util.jar.JarFile.(JarFile.java:127)
at java.util.jar.JarFile.(JarFile.java:92)
at
org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.jav
a:1066)
at
org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:665)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3550
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:821)
at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162
)
at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerB
ase.java:182)
at java.security.AccessController.doPrivileged(Native Method)
...

Now I checked the entire tomcat4 directory structure, all files are
owned by tomcat4 and readable.
Tomcat has write access to all project directories. I even checked the
/var/cache/tomcat4 dir.
I scanned the entire box for all existing jar files and confirmed
they're readable as well.
What else could cause that?

The second message is in localhost.log:

2004-12-08 16:24:46 HostConfig[localhost]: Deploying web application
directory register
2004-12-08 16:24:47 ContextConfig[/register] Exception processing JAR at
resource path /WEB-INF/lib/commons-collections.jar
javax.servlet.ServletException: Exception processing JAR at resource
path /WEB-INF/lib/commons-collections.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:
930)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868
)
...
- Root Cause -
java.lang.IllegalArgumentException: Invalid TLD resource path
/WEB-INF/lib/commons-collections.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:
898)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868
)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j
ava:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3587
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:821)
at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162
)
at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerB
ase.java:182)
at java.security.AccessController.doPrivileged(Native Method)

The application doesn't start of course.

Can anybody please help me here?
Thanks a lot,
-- Bernd

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



RE: Nested Struts Tags

2004-12-08 Thread Vadim Petrenko
Hi, Lee,

Did you try ?



  




Vadim.

-Original Message-
From: Lee Harrington [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 10:07 PM
To: [EMAIL PROTECTED]
Subject: Nested Struts Tags

I'm in a conundrum.  I have a page that normally displays a pick list.
 Sometimes, though, I don't want folks to editso I just display
the values.

But for picklists, I don't want to display the value, but what the
pick list resolves to.  I already have the "list" the picklist uses in
the request scope...so I try the following:


  




It works if I hard code the value (the 9 on the second line)

What I want is the form value.  I've tried lots of things.  None work:

  - value=""
  - value="<%= dataStewardId %>"
  - value="<%= metricForm.dataStewardId %>"
  - value="<%= metricForm.get('dataStewardId') %>"

etc.

I either need to be able to nest the "" tag, or I
need to get a java script handle on the form variable to use in "<%=
=>".

I'm stuck,

Lee

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



Clarify proper uses of LookupDispatchAction with submit buttons, submit images, and links

2004-12-08 Thread Karr, David
I recently got into the implementation of a Struts application, which
I've sadly been away from for quite a while.  There's some issues that
I'm rusty on.  I've searched the archive, but I didn't find enough that
addressed all of my issues.  What I have right now actually works, but I
feel like what I had to do to get it to work was sort of weird (other
LUDA sufferers might just be nodding their heads right now).  I'd
appreciate any comments or suggestions on this.  Sorry this is so long.

The part of the application I'm currently working on is an editing view
of a hierarchical object.  There are numerous text fields and select
boxes that the user can edit.  There are operation buttons that apply to
the whole object, and there are buttons that only apply to specific
sub-objects.  I originally tried using normal buttons (html:submit) for
the "whole object" operations, and image&text links for the sub-object
operations.

For one, I wanted the ability to change arbitrary fields (text, select,
etc.) and then execute any of the operation buttons, which would
preserve the changed value of the fields, along with executing the
operation on the button.  I discovered that using links for sub-object
operations makes this difficult, because a normal link would execute the
operation, but not submit the field values.  I suppose it's possible I
could have gotten this working with some funky javascript, but I decided
to change the links to buttons to avoid that problem.

One annoyance I found was that I had to make sure that each button that
corresponded to a particular operation was named differently (the label,
that is) from all other buttons, even if it was obvious from the visual
context that the name could have been shorter.  This is a result of how
LUDA works, and I couldn't find any way around this.

Then, I encountered difficulties using an image button (html:image) with
LUDA.  To cut this short, I ended up with jsp code like this (using
Struts-EL):

  

(The javascript is to set a hidden form parameter to specify the index
of the list I'm operating on.)

Along with these other two excerpts:

resources.properties:
  sym.deleteThing   = deleteThing

getKeyMethodMap():
  result.put("sym.deleteThing", "deleteThing"); // Find "deleteThing"
method

Again, this works, it's just really weird.  In my archive search, I
noticed a note by Mark Lowe suggesting that you should just be able to
nest a "bean:message" inside the "html:image" to determine the submit
value, but this didn't work.

Related to this, I noticed that the behavior of the HTML "button"
element (type "submit") is different from the "input" element of the
same type.  It has more rational behavior with respect to letting you
control what shows on the button vs. what value is submitted.  This is
specified in HTML 4.0.1, but I have a feeling that it didn't exist
before that version.

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



Nested Struts Tags

2004-12-08 Thread Lee Harrington
I'm in a conundrum.  I have a page that normally displays a pick list.
 Sometimes, though, I don't want folks to editso I just display
the values.

But for picklists, I don't want to display the value, but what the
pick list resolves to.  I already have the "list" the picklist uses in
the request scope...so I try the following:


  




It works if I hard code the value (the 9 on the second line)

What I want is the form value.  I've tried lots of things.  None work:

  - value=""
  - value="<%= dataStewardId %>"
  - value="<%= metricForm.dataStewardId %>"
  - value="<%= metricForm.get('dataStewardId') %>"

etc.

I either need to be able to nest the "" tag, or I
need to get a java script handle on the form variable to use in "<%=
=>".

I'm stuck,

Lee

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



RE: multiple column update statement using subqueries

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 1:49 PM
> To: struts
> Subject: OT: multiple column update statement using subqueries
> 
> 
> hihi all,
> 
> my apologies i realize my question is not restricted to struts per se,
> but i'm hoping to get help from the many experts here... 
> 
> is there an ansi sql compliant way (ie. i'm using jdbc) to update many
> columns in a table with values from another table without using a
> subquery for each column being updated?

In addition to what Jason King suggested:
update TableOne
   inner join TableTwo on TableOne.commonID = TableTwo.commonID
set TableOne.field1 = TableTwo.fieldX

or

update TableOne, TableTwo
set TableOne.field1 = TableTwo.fieldX
where TableOne.commonID = TableTwo.commonID

> 
> ie. i want to avoid this:
> 
> update tableA
> set a = (select...),
> b = (select...),
> c = (select...)
> where
> id = 1
> 
> each column is being updated from the same other table (it would be
> same record in fact), not from many other different tables.
> 
> surely, someone has faced this situation?  i hope?
> 
> please and thanks,
> woodchuck
> 
> 
>   
> __ 
> Do you Yahoo!? 
> The all-new My Yahoo! - Get yours free! 
> http://my.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: multiple column update statement using subqueries

2004-12-08 Thread Jason King
I can't guarantee this is ANSI, but I know it works in Oracle.
UPDATE tableA
   SET (a,b,c) = ( select a,b,c FROM tableB where tableB.key = 
tableA.key )
Just make sure the select returns the same number of columns as in the 
set  and that the select only returns one row per updated table row.
Woodchuck wrote:

hihi all,
my apologies i realize my question is not restricted to struts per se,
but i'm hoping to get help from the many experts here... 

is there an ansi sql compliant way (ie. i'm using jdbc) to update many
columns in a table with values from another table without using a
subquery for each column being updated?
ie. i want to avoid this:
update tableA
set a = (select...),
   b = (select...),
   c = (select...)
where
id = 1
each column is being updated from the same other table (it would be
same record in fact), not from many other different tables.
surely, someone has faced this situation?  i hope?
please and thanks,
woodchuck
		
__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.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]


OT: multiple column update statement using subqueries

2004-12-08 Thread Woodchuck
hihi all,

my apologies i realize my question is not restricted to struts per se,
but i'm hoping to get help from the many experts here... 

is there an ansi sql compliant way (ie. i'm using jdbc) to update many
columns in a table with values from another table without using a
subquery for each column being updated?

ie. i want to avoid this:

update tableA
set a = (select...),
b = (select...),
c = (select...)
where
id = 1

each column is being updated from the same other table (it would be
same record in fact), not from many other different tables.

surely, someone has faced this situation?  i hope?

please and thanks,
woodchuck



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: what is the current production version of struts??

2004-12-08 Thread Hubert Rabago
The Struts dev team makes milestone builds and makes them available to
the general public so people have access to versions that are more
updated than the "production release" but more stable than the nightly
builds.  Each milestone build is a potential "production release" (or
a potential dud) depending on how the developers and users judge the
build sometime after it's been released.


On Wed, 8 Dec 2004 12:07:59 -0800 (PST), Ashish Kulkarni
<[EMAIL PROTECTED]> wrote:
> Hi
> If 1.2.4 is current release then what are 1.2.5 and
> 1.2.6,
> why there are 2 builds which are in development
> version and not only one?
> Ashish
> 
> 
> --- Hubert Rabago <[EMAIL PROTECTED]> wrote:
> 
> > Right now it's still 1.2.4
> > http://struts.apache.org/download.cgi#struts124
> >
> >
> > On Wed, 8 Dec 2004 11:35:40 -0800 (PST), Ashish
> > Kulkarni
> > <[EMAIL PROTECTED]> wrote:
> > > Hi
> > > what is the current production version of struts,
> > is
> > > it 1.2.4 or 1.2.5 or 1.2.6,
> > > I have a current struts project using 1.1, and
> > have
> > > apportunity to migrate to new struts version,
> > which
> > > one should i jump on
> > > My application will be going live in next 2 months
> > >
> > > Ashish
> > >
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Mail - Easier than ever with enhanced
> > search. Learn more.
> > > http://info.mail.yahoo.com/mail_250
> > >
> > >
> >
> -
> > > 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]
> >
> >
> 
> 
> =
> A$HI$H
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage less. 
> 
> 
> http://info.mail.yahoo.com/mail_250
>

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



Re: what is the current production version of struts??

2004-12-08 Thread Ashish Kulkarni
Hi
If 1.2.4 is current release then what are 1.2.5 and
1.2.6,
why there are 2 builds which are in development
version and not only one?
Ashish
--- Hubert Rabago <[EMAIL PROTECTED]> wrote:

> Right now it's still 1.2.4
> http://struts.apache.org/download.cgi#struts124
> 
> 
> On Wed, 8 Dec 2004 11:35:40 -0800 (PST), Ashish
> Kulkarni
> <[EMAIL PROTECTED]> wrote:
> > Hi
> > what is the current production version of struts,
> is
> > it 1.2.4 or 1.2.5 or 1.2.6,
> > I have a current struts project using 1.1, and
> have
> > apportunity to migrate to new struts version,
> which
> > one should i jump on
> > My application will be going live in next 2 months
> > 
> > Ashish
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Mail - Easier than ever with enhanced
> search. Learn more.
> > http://info.mail.yahoo.com/mail_250
> > 
> >
>
-
> > 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]
> 
> 


=
A$HI$H



__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



Re: what is the current production version of struts??

2004-12-08 Thread Hubert Rabago
Right now it's still 1.2.4 http://struts.apache.org/download.cgi#struts124


On Wed, 8 Dec 2004 11:35:40 -0800 (PST), Ashish Kulkarni
<[EMAIL PROTECTED]> wrote:
> Hi
> what is the current production version of struts, is
> it 1.2.4 or 1.2.5 or 1.2.6,
> I have a current struts project using 1.1, and have
> apportunity to migrate to new struts version, which
> one should i jump on
> My application will be going live in next 2 months
> 
> Ashish
> 
> __
> Do you Yahoo!?
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250
> 
> -
> 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]



what is the current production version of struts??

2004-12-08 Thread Ashish Kulkarni
Hi
what is the current production version of struts, is
it 1.2.4 or 1.2.5 or 1.2.6,
I have a current struts project using 1.1, and have
apportunity to migrate to new struts version, which
one should i jump on
My application will be going live in next 2 months

Ashish



__ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

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



Re: no sessions

2004-12-08 Thread Dmitrii CRETU
Hello josh,

this is the way we do it:

How to prevent struts application from session creation
===

You must prevent calls to "request.getSession()" (<==> request.getSession(true))
method wich creates HttpSession if it does not exist.

1.  Add to all *.jsp the directive
  <%@ page session="false" %>

2.  struts-config.xml:
  controller.locale=false

3.  struts-config.xml:
  action.scope=request

If action.scope=session --> HttpSession is created via request.getSession()

4.  struts-config.xml (when using Validator)
  action.validate=false

If action.validate=true --> Validator gets locale from session
by calling request.getSession()

5.  *.jsp when using "html:html" custom tag:
  

NB: in 1.2.4 the #5 can be acheaved by smth like this (not sure, check
documentaion of html:html):
 


HTH,
Dima.
 
  
j> Is there a way to specify a struts app not to create a session object?




-- 
Best regards,
 Dmitriimailto:[EMAIL PROTECTED]



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



RE: [OT]Threads and Servlets Question

2004-12-08 Thread Pilgrim, Peter
> -Original Message-
> From: Yves Sy [mailto:[EMAIL PROTECTED]
> 
> 
> Here's a follow-up question:
> 
> I remember creating a thread in one of my Action classes because I
> needed to show a "Wait while your request is being processed..." page.
> 
> The flow goes something like:
> 1. the MAIN thread returns an ActionForward right away that
> contains the "processing" page;
> 2. the NEW thread I created goes ahead and makes the back-end call
> that takes a considerable amount of time to process;
> 3. After NEW thread returns with the results, it sets a flag in
> the session that it's done with the processing;
> 4. Meanwhile, the processing page keeps refreshing itself and
> sending execution to an action which checks for the session flag set
> in #3;
>  5. When it finally finds the session flag, it forwards 
> to the results page.
> 
> Its working fine for me. No weird behavior on Weblogic or SAP WAS.
> Although now I'm curious: Is there a better way to approach this
> problem?
> 
> Regards,
> -Yves-

As others have noted JMS is one way of handling asynchronous processing.
You can think of it as glorified publish and subscribe / observer and
observee, since only an instruction is being passed.

What you describe is one of the solutions an idiom for asynchronous 
processing. You solution is cool for ``indeterminates datasets' where
you cant tell in advance how much data you have to query.

Generalise the step 2,3,4 into this.

2. the new LONG TERM thread LT is created and the ActionForm B
associated with the HttpSession (per Login account) registers its
self as a Observer of LT.

3. Whilst LT is processing, every so often, it fired an notification
event of the progress to the registered listener.

4. The processing page is refreshing or a Web User submits the page
for a new update. The Processing Action only has to call the accessor
of the ActionForm B to find out how far the LTT has process.

This is the solution for `determinate dataset'.

I have implemented the `determinate dataset' solution for the
`eForum' component that uses `Expresso Framework'. 
This framework has support for `Jobs' for long term processes.
I wrote a `Job' to index the forum messages using the Jakarta
Lucene and it has a `IndexingProgressionBean' or something
like that ...

You also might want to check out the `Quartz Scheduler'.

hth

--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==


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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
What he is putting on the page and what is in his application
resources properties cannot determine, ever, what keyMethodMap is
returning.  These are wrong avenues IF Alexander is accurate when he
says the class is seeking the method "weiter".  That can ONLY be the
case if the keyMethodMap holds the value "weiter" under the key being
called.  If a method is being returned at all, everything else is
working the way it should.  Did you change "weiter" to "forward" and
forget to recompile?

Jack


On Wed, 8 Dec 2004 09:13:34 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 8:03 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Hi
> >
> > You write that : The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > As far as I remember "weiter" is the German word for "forward" - There
> > might be a locale issue here.
> 
> That would be possible if he was getting the english version instead of the 
> german version he's apparently putting on the page.
> 
> >
> > Hermod
> 
> 
> >
> >
> > -Original Message-
> > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 2:14 PM
> > To: Struts Users Mailing List
> > Subject: Re: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Dakota Jack wrote:
> > > My experience is that the computer is always right, so I
> > would look in
> > > my properites file, if I were you, and see whether or not I had
> > > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > > feel compelled to reiterate that LookupDispatchAction is a
> > fairly poor
> > > example of the code needed to do this stuff, in my opinion.
> > >
> > > Jack
> > >
> > >
> >
> > I will definitely try your suggestion out, but before that, I
> > wanted to
> > figure out, what I had done wrong using the LookupDispatchAction.
> >
> > So now some direct copy & paste from my code.
> > My ApplicationRessurces.properties looks like this:
> > 
> > authors-form.button.forward = weiter
> > authors-form.button.back = zurück
> > 
> >
> > The jsp:
> > 
> >  > property="submit"> > key="authors-form.button.back"/>
> >  > property="submit"> > key="authors-form.button.forward"/>
> > 
> >
> > And finally the Action-Map:
> > 
> >   protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > map.put("authors-form.button.create",
> > "create");
> > map.put("authors-form.button.edit",   "edit");
> > map.put("authors-form.button.remove",
> > "remove");
> > map.put("authors-form.button.forward",
> > "forward");
> > map.put("authors-form.button.back",   "back");
> > return map;
> >   }
> > 
> >
> > The back-button works, while the forward doesn't.
> >
> > The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > Alexander
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > * * * * * * *
> >
> > This email with attachments is solely for the use of the individual or
> > entity to whom it is addressed. Please also be aware that the
> > DnB NOR Group
> > cannot accept any payment orders or other legally binding
> > correspondence with
> > customers as a part of an email.
> >
> > This email message has been virus checked by the virus programs used
> > in the DnB NOR Group.
> >
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > * * * * * * *
> >
> >
> > -
> > 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]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Dakota Jack [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 11:28 AM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> Sorry if this is not helpful to you, Jim.  However, I meant the
> opposite of what you are saying.  I am saying that the computer is
> doing exactly what is coded and, so, the answer lies in tracking the
> output.  I would never think that the impossible is possible or any
> other such philosophical drivel.  Sorry I gave that impression.  I am
> a preeminently practical person.  That is what I mean when I say "the
> computer is always right'.  Hopefully my next suggestion makes that
> clear.  I think this is really a simple problem to solve if one merely
> debugs following the LookupDispatchAction code and determines where
> the wrong value appears.  This is not a rocket science problem.  That
> is my point.

You missed my point.  Entirely.
Everything looks correct in your setup.  Looks exactly like what I'm using 
right now, in production.  Can't be that.
So.. what else is different.
The unecessary multiple use of  
> Jack
> 
> 
> On Wed, 8 Dec 2004 09:09:46 -0700, Jim Barrows 
> <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, December 08, 2004 6:14 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: LookupDispatchAction doesn't lookup mapping
> > >
> > >
> > > Dakota Jack wrote:
> > > > My experience is that the computer is always right, so I
> > > would look in
> > > > my properites file, if I were you, and see whether or not I had
> > > > reversed the myButtonForward=go to go=myButtonForward.  
> Did you?  I
> > > > feel compelled to reiterate that LookupDispatchAction is a
> > > fairly poor
> > > > example of the code needed to do this stuff, in my opinion.
> > > >
> > > > Jack
> > > >
> > > >
> > >
> > > I will definitely try your suggestion out, but before that, I
> > > wanted to
> > > figure out, what I had done wrong using the LookupDispatchAction.
> > >
> > > So now some direct copy & paste from my code.
> > > My ApplicationRessurces.properties looks like this:
> > > 
> > > authors-form.button.forward = weiter
> > > authors-form.button.back = zurück
> > > 
> > >
> > > The jsp:
> > 
> > This suggestion comes under the heading "When only the 
> impossible is left, the impossible must be possible".  I 
> don't think this is it.
> > Why do you have  with either button.  It shouldn't matter, but everything else 
> looks right, and exactly the way I have it working in my 
> code, except for the double form thing.  No idea why it would 
> make a difference... and don't really think it should... but..
> > 
> > 
> > 
> > 
> > > 
> > >  > > property="submit"> > > key="authors-form.button.back"/>
> > >  > > property="submit"> > > key="authors-form.button.forward"/>
> > > 
> > >
> > > And finally the Action-Map:
> > > 
> > >   protected Map getKeyMethodMap() {
> > > Map map = new HashMap();
> > > map.put("authors-form.button.create",
> > > "create");
> > > map.put("authors-form.button.edit",   
> "edit");
> > > map.put("authors-form.button.remove",
> > > "remove");
> > > map.put("authors-form.button.forward",
> > > "forward");
> > > map.put("authors-form.button.back",   
> "back");
> > > return map;
> > >   }
> > > 
> > >
> > > The back-button works, while the forward doesn't.
> > >
> > > The LookupDispatchAction tries to call a method named
> > > "weiter" instead
> > > of "forward", while it calls the "back"-method as expected.
> > >
> > > Alexander
> > >
> > > 
> -
> > > 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]
> > 
> > 
> 
> 
> -- 
> 
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for 
> eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> -
> 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: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
Given the accuracy of what Alexander has said, if the method return is
"weiter" from the keyMethodMap, then the key being called is returning
a value of "weiter" and that has to be in the key method map.  That is
not guesswork.  That is what has to be having, if the debug
information on this thread is correct.

Jack


On Wed, 8 Dec 2004 09:09:46 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> > -Original Message-
> > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 6:14 AM
> > To: Struts Users Mailing List
> > Subject: Re: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Dakota Jack wrote:
> > > My experience is that the computer is always right, so I
> > would look in
> > > my properites file, if I were you, and see whether or not I had
> > > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > > feel compelled to reiterate that LookupDispatchAction is a
> > fairly poor
> > > example of the code needed to do this stuff, in my opinion.
> > >
> > > Jack
> > >
> > >
> >
> > I will definitely try your suggestion out, but before that, I
> > wanted to
> > figure out, what I had done wrong using the LookupDispatchAction.
> >
> > So now some direct copy & paste from my code.
> > My ApplicationRessurces.properties looks like this:
> > 
> > authors-form.button.forward = weiter
> > authors-form.button.back = zurück
> > 
> >
> > The jsp:
> 
> This suggestion comes under the heading "When only the impossible is left, 
> the impossible must be possible".  I don't think this is it.
> Why do you have  It shouldn't matter, but everything else looks right, and exactly the way I 
> have it working in my code, except for the double form thing.  No idea why it 
> would make a difference... and don't really think it should... but..
> 
> 
> 
> 
> > 
> >  > property="submit"> > key="authors-form.button.back"/>
> >  > property="submit"> > key="authors-form.button.forward"/>
> > 
> >
> > And finally the Action-Map:
> > 
> >   protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > map.put("authors-form.button.create",
> > "create");
> > map.put("authors-form.button.edit",   "edit");
> > map.put("authors-form.button.remove",
> > "remove");
> > map.put("authors-form.button.forward",
> > "forward");
> > map.put("authors-form.button.back",   "back");
> > return map;
> >   }
> > 
> >
> > The back-button works, while the forward doesn't.
> >
> > The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > Alexander
> >
> > -
> > 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]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
Sorry if this is not helpful to you, Jim.  However, I meant the
opposite of what you are saying.  I am saying that the computer is
doing exactly what is coded and, so, the answer lies in tracking the
output.  I would never think that the impossible is possible or any
other such philosophical drivel.  Sorry I gave that impression.  I am
a preeminently practical person.  That is what I mean when I say "the
computer is always right'.  Hopefully my next suggestion makes that
clear.  I think this is really a simple problem to solve if one merely
debugs following the LookupDispatchAction code and determines where
the wrong value appears.  This is not a rocket science problem.  That
is my point.

Jack


On Wed, 8 Dec 2004 09:09:46 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> > -Original Message-
> > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 6:14 AM
> > To: Struts Users Mailing List
> > Subject: Re: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Dakota Jack wrote:
> > > My experience is that the computer is always right, so I
> > would look in
> > > my properites file, if I were you, and see whether or not I had
> > > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > > feel compelled to reiterate that LookupDispatchAction is a
> > fairly poor
> > > example of the code needed to do this stuff, in my opinion.
> > >
> > > Jack
> > >
> > >
> >
> > I will definitely try your suggestion out, but before that, I
> > wanted to
> > figure out, what I had done wrong using the LookupDispatchAction.
> >
> > So now some direct copy & paste from my code.
> > My ApplicationRessurces.properties looks like this:
> > 
> > authors-form.button.forward = weiter
> > authors-form.button.back = zurück
> > 
> >
> > The jsp:
> 
> This suggestion comes under the heading "When only the impossible is left, 
> the impossible must be possible".  I don't think this is it.
> Why do you have  It shouldn't matter, but everything else looks right, and exactly the way I 
> have it working in my code, except for the double form thing.  No idea why it 
> would make a difference... and don't really think it should... but..
> 
> 
> 
> 
> > 
> >  > property="submit"> > key="authors-form.button.back"/>
> >  > property="submit"> > key="authors-form.button.forward"/>
> > 
> >
> > And finally the Action-Map:
> > 
> >   protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > map.put("authors-form.button.create",
> > "create");
> > map.put("authors-form.button.edit",   "edit");
> > map.put("authors-form.button.remove",
> > "remove");
> > map.put("authors-form.button.forward",
> > "forward");
> > map.put("authors-form.button.back",   "back");
> > return map;
> >   }
> > 
> >
> > The back-button works, while the forward doesn't.
> >
> > The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > Alexander
> >
> > -
> > 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]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
The problem with this analysis, Hermod, is that the determination of
what method to call happens after the correct key is found, and the
correct key can be found only if there is no locale issue.

I am assuming that when Alexander says the method weiter is being
called he means that.

Jack


On Wed, 8 Dec 2004 16:03:27 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi
> 
> You write that : The LookupDispatchAction tries to call a method named
> "weiter" instead
> of "forward", while it calls the "back"-method as expected.
> 
> As far as I remember "weiter" is the German word for "forward" - There
> might be a locale issue here.
> 
> Hermod
> 
> 
> 
> 
> -Original Message-
> From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 2:14 PM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a fairly poor
> > example of the code needed to do this stuff, in my opinion.
> >
> > Jack
> >
> >
> 
> I will definitely try your suggestion out, but before that, I wanted to
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:
> 
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> 
> 
> And finally the Action-Map:
> 
> protected Map getKeyMethodMap() {
>   Map map = new HashMap();
>   map.put("authors-form.button.create",
> "create");
>   map.put("authors-form.button.edit",   "edit");
>   map.put("authors-form.button.remove",
> "remove");
>   map.put("authors-form.button.forward",
> "forward");
>   map.put("authors-form.button.back",   "back");
>   return map;
> }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named "weiter" instead
> of "forward", while it calls the "back"-method as expected.
> 
> Alexander
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the DnB NOR Group
> cannot accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
> 
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
The code in LookupDispatchAction is:


String key = (String) lookupMap.get(name);

String methodName = (String) keyMethodMap.get(key);

Therefore, if you know what your code is returning as "key" and you
know what your code is returning as "methodName" and if the "key" is
correct, the keyMethodMap has to contain the wrong value for the
"key".

Jack


On Wed, 08 Dec 2004 14:14:18 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a fairly poor
> > example of the code needed to do this stuff, in my opinion.
> >
> > Jack
> >
> >
> 
> I will definitely try your suggestion out, but before that, I wanted to
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:
> 
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> And finally the Action-Map:
> 
> protected Map getKeyMethodMap() {
>   Map map = new HashMap();
>   map.put("authors-form.button.create", "create");
>   map.put("authors-form.button.edit",   "edit");
>   map.put("authors-form.button.remove", "remove");
>   map.put("authors-form.button.forward","forward");
>   map.put("authors-form.button.back",   "back");
>   return map;
> }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named "weiter" instead
> of "forward", while it calls the "back"-method as expected.
> 
> 
> 
> Alexander
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: Form validation

2004-12-08 Thread Niall Pemberton
set the onclick attribute to "bCancel=true;"

The Cancel tag does this automatically and it causes the server side
validation to be skipped as well, but it sets the name to
Constants.CANCEL_PROPERTY. You could create your own custom version by
extending CancelTag and overriding the prepareName() method.

Niall

- Original Message - 
From: "Donie Kelly" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 08, 2004 5:35 PM
Subject: RE: Form validation


> Hi Jim
>
> Tried that but I have Javascript validation turned on for the page. It's
> kicking in before the submit. Is there a way to disable the javascript
> validation when the cancel button is pressed.
>
> Thanks
> Donie
>
>
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: 08 December 2004 17:36
> To: Struts Users Mailing List
> Subject: RE: Form validation
>
>
>
> > -Original Message-
> > From: Donie Kelly [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 10:22 AM
> > To: Struts Users Mailing List
> > Subject: RE: Form validation
> >
> >
> > Thanks Jim, that works for the initial validation. Thank you.
> >
> > However, if you look at my code below you'll see I have a
> > reset button on
> > the page. When I press this I want the form to repopulate
> > like it does on
> > initial entry. However, the validation is kicking in.
> >
> > If I have bad values on the form I cannot reset the page.
> >
> > What can I do in this case?
>
> Oh... in that case the reset button should go to the action that displays
> the page in the first place, which will have the validation=false on it.
> This is a good place for one of the dispatch actions.
>
>
> > Thanks
> > Donie
> >
> >
> > -Original Message-
> > From: Jim Barrows [mailto:[EMAIL PROTECTED]
> > Sent: 08 December 2004 17:28
> > To: Struts Users Mailing List
> > Subject: RE: Form validation
> >
> >
> >
> > > -Original Message-
> > > From: Donie Kelly [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, December 08, 2004 10:14 AM
> > > To: Struts Users Mailing List
> > > Subject: Form validation
> > >
> > >
> > > Hi all
> > >
> > >
> > >
> > > I have a form that uses the standard form validation based on the
> > > validation.xml file. It all works fine except for when I'm
> > > pre-populating
> > > the form on first showing. The validation is kicking in
> > > before the data is
> > > retrieved from the database.
> >
> > It's not the action class... it's in the struts-config file.
> > validation="false" I believe is what you want for the
> > pre-population to work
> > without validation.
> >
> >
> > >
> > >
> > >
> > > Can anybody show me how to initialise the form correctly.
> > > Here is my Action
> > > class
> > >
> > >
> > >
> > > Thanks
> > >
> > > Donie
> > >
> > >
> > >
> > >
> > >
> > > import java.util.Locale;
> > >
> > > import javax.servlet.http.HttpServletRequest;
> > >
> > > import javax.servlet.http.HttpServletResponse;
> > >
> > > import javax.servlet.http.HttpSession;
> > >
> > > import org.apache.log4j.Category;
> > >
> > > import org.apache.struts.action.Action;
> > >
> > > import org.apache.struts.action.ActionForm;
> > >
> > > import org.apache.struts.action.ActionForward;
> > >
> > > import org.apache.struts.action.ActionMapping;
> > >
> > > import org.apache.struts.util.MessageResources;
> > >
> > > import org.apache.commons.beanutils.BeanUtils;
> > >
> > >
> > >
> > > import com.tecnomen.mms.sm.backend.*;
> > >
> > >
> > >
> > > public final class ContentAdaptationFormMainAction extends Action
> > >
> > > {
> > >
> > > static Category log =
> > >
> > Category.getInstance(ContentAdaptationFormMainAction.class.getName());
> > >
> > > public ActionForward execute(ActionMapping
> > > mapping,ActionForm form,
> > > HttpServletRequest request,HttpServletResponse response)
> > > throws Exception
> > >
> > >   {
> > >
> > > Locale locale =
> > > getLocale(request);
> > >
> > > MessageResources
> > > messages =
> > > getResources(request);
> > >
> > > HttpSession session =
> > > request.getSession();
> > >
> > > ActionForward forward =
> > > mapping.findForward("success"); //default
> > >
> > >
> > >
> > > // Get the data for
> > > oSystemContentAdaptation
> > >
> > >
> > > ContentAdaptationService service
> > > = new ContentAdaptationService();
> > >
> > >
> > > ContentAdaptationForm theForm =
> > > (ContentAdaptationForm) form;
> > >
> > >
> > > ContentAdaptationDTO caDTO;
> > >
> > >
> > >
> > >
> > >
> > >
> > > int buttonSelect =
> > > theForm.getSelected();
> > >
> > >
> > >
> > > switch(buttonSelect)
> > >
> > >

Re: Form validation

2004-12-08 Thread Wendy Smoak
From: "Donie Kelly" <[EMAIL PROTECTED]>
> Tried that but I have Javascript validation turned on for the page. It's
> kicking in before the submit. Is there a way to disable the javascript
> validation when the cancel button is pressed.

In your case, it sounds to me like the cancel/reset buttons do not need to
be form elements.  Try taking them out and just making some plain-text links
back to whatever URL makes the pre-populated form get displayed at the
beginning of the user interaction.  If that's the behavior you want, then
make them links with images so they look the same as the real submit button.

-- 
Wendy Smoak


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



RE: Form validation

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Donie Kelly [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 10:35 AM
> To: Struts Users Mailing List
> Subject: RE: Form validation
> 
> 
> Hi Jim
> 
> Tried that but I have Javascript validation turned on for the 
> page. It's
> kicking in before the submit. Is there a way to disable the javascript
> validation when the cancel button is pressed.

Well... sure... change the way the javascript fires.  The javascript is 
probably being fired by the sumit event, change it so that it only fires when 
the right button is pressed.  That should be part of the jap page, and not a 
configuration issue/action issue at all.


> 
> Thanks
> Donie
> 
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED] 
> Sent: 08 December 2004 17:36
> To: Struts Users Mailing List
> Subject: RE: Form validation
> 
> 
> 
> > -Original Message-
> > From: Donie Kelly [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 10:22 AM
> > To: Struts Users Mailing List
> > Subject: RE: Form validation
> > 
> > 
> > Thanks Jim, that works for the initial validation. Thank you.
> > 
> > However, if you look at my code below you'll see I have a 
> > reset button on
> > the page. When I press this I want the form to repopulate 
> > like it does on
> > initial entry. However, the validation is kicking in. 
> > 
> > If I have bad values on the form I cannot reset the page.
> > 
> > What can I do in this case?
> 
> Oh... in that case the reset button should go to the action 
> that displays
> the page in the first place, which will have the 
> validation=false on it.
> This is a good place for one of the dispatch actions.
> 
> 
> > Thanks
> > Donie
> > 
> > 
> > -Original Message-
> > From: Jim Barrows [mailto:[EMAIL PROTECTED] 
> > Sent: 08 December 2004 17:28
> > To: Struts Users Mailing List
> > Subject: RE: Form validation
> > 
> > 
> > 
> > > -Original Message-
> > > From: Donie Kelly [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, December 08, 2004 10:14 AM
> > > To: Struts Users Mailing List
> > > Subject: Form validation
> > > 
> > > 
> > > Hi all
> > > 
> > >  
> > > 
> > > I have a form that uses the standard form validation based on the
> > > validation.xml file. It all works fine except for when I'm 
> > > pre-populating
> > > the form on first showing. The validation is kicking in 
> > > before the data is
> > > retrieved from the database. 
> > 
> > It's not the action class... it's in the struts-config file.
> > validation="false" I believe is what you want for the 
> > pre-population to work
> > without validation.
> > 
> > 
> > > 
> > >  
> > > 
> > > Can anybody show me how to initialise the form correctly. 
> > > Here is my Action
> > > class
> > > 
> > >  
> > > 
> > > Thanks
> > > 
> > > Donie
> > > 
> > >  
> > > 
> > >  
> > > 
> > > import java.util.Locale;
> > > 
> > > import javax.servlet.http.HttpServletRequest;
> > > 
> > > import javax.servlet.http.HttpServletResponse;
> > > 
> > > import javax.servlet.http.HttpSession;
> > > 
> > > import org.apache.log4j.Category;
> > > 
> > > import org.apache.struts.action.Action;
> > > 
> > > import org.apache.struts.action.ActionForm;
> > > 
> > > import org.apache.struts.action.ActionForward;
> > > 
> > > import org.apache.struts.action.ActionMapping;
> > > 
> > > import org.apache.struts.util.MessageResources;
> > > 
> > > import org.apache.commons.beanutils.BeanUtils;
> > > 
> > >  
> > > 
> > > import com.tecnomen.mms.sm.backend.*;
> > > 
> > >  
> > > 
> > > public final class ContentAdaptationFormMainAction extends Action
> > > 
> > > {
> > > 
> > > static Category log =
> > > 
> > 
> Category.getInstance(ContentAdaptationFormMainAction.class.getName());
> > > 
> > > public ActionForward execute(ActionMapping 
> > > mapping,ActionForm form,
> > > HttpServletRequest request,HttpServletResponse response) 
> > > throws Exception
> > > 
> > >   {
> > > 
> > > Locale locale =
> > > getLocale(request);
> > > 
> > > MessageResources 
> > > messages =
> > > getResources(request);
> > > 
> > > HttpSession session =
> > > request.getSession();
> > > 
> > > ActionForward 
> forward =
> > > mapping.findForward("success"); //default
> > > 
> > > 
> > > 
> > > // Get the data for
> > > oSystemContentAdaptation
> > > 
> > > 
> > > ContentAdaptationService service
> > > = new ContentAdaptationService();
> > > 
> > > 
> > > ContentAdaptationForm theForm =
> > > (ContentAdaptationForm) form;
> > > 
> > > 
> > > ContentAdaptationDTO caDTO;
> > > 
> > >

RE: Form validation

2004-12-08 Thread Donie Kelly
Hi Jim

Tried that but I have Javascript validation turned on for the page. It's
kicking in before the submit. Is there a way to disable the javascript
validation when the cancel button is pressed.

Thanks
Donie


-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED] 
Sent: 08 December 2004 17:36
To: Struts Users Mailing List
Subject: RE: Form validation



> -Original Message-
> From: Donie Kelly [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 10:22 AM
> To: Struts Users Mailing List
> Subject: RE: Form validation
> 
> 
> Thanks Jim, that works for the initial validation. Thank you.
> 
> However, if you look at my code below you'll see I have a 
> reset button on
> the page. When I press this I want the form to repopulate 
> like it does on
> initial entry. However, the validation is kicking in. 
> 
> If I have bad values on the form I cannot reset the page.
> 
> What can I do in this case?

Oh... in that case the reset button should go to the action that displays
the page in the first place, which will have the validation=false on it.
This is a good place for one of the dispatch actions.


> Thanks
> Donie
> 
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED] 
> Sent: 08 December 2004 17:28
> To: Struts Users Mailing List
> Subject: RE: Form validation
> 
> 
> 
> > -Original Message-
> > From: Donie Kelly [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 10:14 AM
> > To: Struts Users Mailing List
> > Subject: Form validation
> > 
> > 
> > Hi all
> > 
> >  
> > 
> > I have a form that uses the standard form validation based on the
> > validation.xml file. It all works fine except for when I'm 
> > pre-populating
> > the form on first showing. The validation is kicking in 
> > before the data is
> > retrieved from the database. 
> 
> It's not the action class... it's in the struts-config file.
> validation="false" I believe is what you want for the 
> pre-population to work
> without validation.
> 
> 
> > 
> >  
> > 
> > Can anybody show me how to initialise the form correctly. 
> > Here is my Action
> > class
> > 
> >  
> > 
> > Thanks
> > 
> > Donie
> > 
> >  
> > 
> >  
> > 
> > import java.util.Locale;
> > 
> > import javax.servlet.http.HttpServletRequest;
> > 
> > import javax.servlet.http.HttpServletResponse;
> > 
> > import javax.servlet.http.HttpSession;
> > 
> > import org.apache.log4j.Category;
> > 
> > import org.apache.struts.action.Action;
> > 
> > import org.apache.struts.action.ActionForm;
> > 
> > import org.apache.struts.action.ActionForward;
> > 
> > import org.apache.struts.action.ActionMapping;
> > 
> > import org.apache.struts.util.MessageResources;
> > 
> > import org.apache.commons.beanutils.BeanUtils;
> > 
> >  
> > 
> > import com.tecnomen.mms.sm.backend.*;
> > 
> >  
> > 
> > public final class ContentAdaptationFormMainAction extends Action
> > 
> > {
> > 
> > static Category log =
> > 
> Category.getInstance(ContentAdaptationFormMainAction.class.getName());
> > 
> > public ActionForward execute(ActionMapping 
> > mapping,ActionForm form,
> > HttpServletRequest request,HttpServletResponse response) 
> > throws Exception
> > 
> >   {
> > 
> > Locale locale =
> > getLocale(request);
> > 
> > MessageResources 
> > messages =
> > getResources(request);
> > 
> > HttpSession session =
> > request.getSession();
> > 
> > ActionForward forward =
> > mapping.findForward("success"); //default
> > 
> > 
> > 
> > // Get the data for
> > oSystemContentAdaptation
> > 
> > 
> > ContentAdaptationService service
> > = new ContentAdaptationService();
> > 
> > 
> > ContentAdaptationForm theForm =
> > (ContentAdaptationForm) form;
> > 
> > 
> > ContentAdaptationDTO caDTO;
> > 
> > 
> > 
> >  
> > 
> > 
> > int buttonSelect =
> > theForm.getSelected();
> > 
> > 
> > 
> > switch(buttonSelect)
> > 
> > {
> > 
> > 
>  case
> > ContentAdaptationForm.SUBMIT_BUTTON:
> > 
> >  
> > log.info("Submit CA form");
> > 
> >  
> > 
> >  
> > // Create new data object for this form
> > 
> >  
> > caDTO = new ContentAdaptationDTO();
> > 
> >  
> > BeanUtils.copyProperties(caDTO, theForm );
> > 
> >  
> > service.setContentAdaptation(caDTO);
> > 
> >  
> > forward = new ActionF

RE: Form validation

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Donie Kelly [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 10:22 AM
> To: Struts Users Mailing List
> Subject: RE: Form validation
> 
> 
> Thanks Jim, that works for the initial validation. Thank you.
> 
> However, if you look at my code below you'll see I have a 
> reset button on
> the page. When I press this I want the form to repopulate 
> like it does on
> initial entry. However, the validation is kicking in. 
> 
> If I have bad values on the form I cannot reset the page.
> 
> What can I do in this case?

Oh... in that case the reset button should go to the action that displays the 
page in the first place, which will have the validation=false on it.  This is a 
good place for one of the dispatch actions.


> Thanks
> Donie
> 
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED] 
> Sent: 08 December 2004 17:28
> To: Struts Users Mailing List
> Subject: RE: Form validation
> 
> 
> 
> > -Original Message-
> > From: Donie Kelly [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 10:14 AM
> > To: Struts Users Mailing List
> > Subject: Form validation
> > 
> > 
> > Hi all
> > 
> >  
> > 
> > I have a form that uses the standard form validation based on the
> > validation.xml file. It all works fine except for when I'm 
> > pre-populating
> > the form on first showing. The validation is kicking in 
> > before the data is
> > retrieved from the database. 
> 
> It's not the action class... it's in the struts-config file.
> validation="false" I believe is what you want for the 
> pre-population to work
> without validation.
> 
> 
> > 
> >  
> > 
> > Can anybody show me how to initialise the form correctly. 
> > Here is my Action
> > class
> > 
> >  
> > 
> > Thanks
> > 
> > Donie
> > 
> >  
> > 
> >  
> > 
> > import java.util.Locale;
> > 
> > import javax.servlet.http.HttpServletRequest;
> > 
> > import javax.servlet.http.HttpServletResponse;
> > 
> > import javax.servlet.http.HttpSession;
> > 
> > import org.apache.log4j.Category;
> > 
> > import org.apache.struts.action.Action;
> > 
> > import org.apache.struts.action.ActionForm;
> > 
> > import org.apache.struts.action.ActionForward;
> > 
> > import org.apache.struts.action.ActionMapping;
> > 
> > import org.apache.struts.util.MessageResources;
> > 
> > import org.apache.commons.beanutils.BeanUtils;
> > 
> >  
> > 
> > import com.tecnomen.mms.sm.backend.*;
> > 
> >  
> > 
> > public final class ContentAdaptationFormMainAction extends Action
> > 
> > {
> > 
> > static Category log =
> > 
> Category.getInstance(ContentAdaptationFormMainAction.class.getName());
> > 
> > public ActionForward execute(ActionMapping 
> > mapping,ActionForm form,
> > HttpServletRequest request,HttpServletResponse response) 
> > throws Exception
> > 
> >   {
> > 
> > Locale locale =
> > getLocale(request);
> > 
> > MessageResources 
> > messages =
> > getResources(request);
> > 
> > HttpSession session =
> > request.getSession();
> > 
> > ActionForward forward =
> > mapping.findForward("success"); //default
> > 
> > 
> > 
> > // Get the data for
> > oSystemContentAdaptation
> > 
> > 
> > ContentAdaptationService service
> > = new ContentAdaptationService();
> > 
> > 
> > ContentAdaptationForm theForm =
> > (ContentAdaptationForm) form;
> > 
> > 
> > ContentAdaptationDTO caDTO;
> > 
> > 
> > 
> >  
> > 
> > 
> > int buttonSelect =
> > theForm.getSelected();
> > 
> > 
> > 
> > switch(buttonSelect)
> > 
> > {
> > 
> > 
>  case
> > ContentAdaptationForm.SUBMIT_BUTTON:
> > 
> >  
> > log.info("Submit CA form");
> > 
> >  
> > 
> >  
> > // Create new data object for this form
> > 
> >  
> > caDTO = new ContentAdaptationDTO();
> > 
> >  
> > BeanUtils.copyProperties(caDTO, theForm );
> > 
> >  
> > service.setContentAdaptation(caDTO);
> > 
> >  
> > forward = new ActionForward(mapping.findForward("submit"));
> > 
> >  
> > break;
> > 
> >  
> > 
> > 
>  case
> > ContentAdaptationForm.CANCEL_BUTTON:
> > 
> >  
> > log.info("Cancel CA form");
> > 
> >  
> > forward = new ActionForward(mapping.findForward("cancel

Re: Form validation

2004-12-08 Thread Wendy Smoak
From: "Donie Kelly" <[EMAIL PROTECTED]>
> I have a form that uses the standard form validation based on the
> validation.xml file. It all works fine except for when I'm pre-populating
> the form on first showing. The validation is kicking in before the data is
> retrieved from the database.

In the Form class, I have:
public ActionErrors validate( ActionMapping mapping, HttpServletRequest
request ) {
  ActionErrors errors = new ActionErrors();
  if ( "POST".equals( request.getMethod() ) ) {
 log.debug( "User has submitted the form, validating..." );
 errors = super.validate( mapping, request );}
  return errors;  }

That stops the validation from happening unless the user has actually
submitted the form.  I suppose you'd have to deal with someone constructing
a URL and doing a GET, but since mine are intranet apps and require a login,
if anyone tries it I'll know who it is and can go whack their hand with a
ruler.

-- 
Wendy Smoak



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



RE: Form validation

2004-12-08 Thread Donie Kelly
Thanks Jim, that works for the initial validation. Thank you.

However, if you look at my code below you'll see I have a reset button on
the page. When I press this I want the form to repopulate like it does on
initial entry. However, the validation is kicking in. 

If I have bad values on the form I cannot reset the page.

What can I do in this case?
Thanks
Donie


-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED] 
Sent: 08 December 2004 17:28
To: Struts Users Mailing List
Subject: RE: Form validation



> -Original Message-
> From: Donie Kelly [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 10:14 AM
> To: Struts Users Mailing List
> Subject: Form validation
> 
> 
> Hi all
> 
>  
> 
> I have a form that uses the standard form validation based on the
> validation.xml file. It all works fine except for when I'm 
> pre-populating
> the form on first showing. The validation is kicking in 
> before the data is
> retrieved from the database. 

It's not the action class... it's in the struts-config file.
validation="false" I believe is what you want for the pre-population to work
without validation.


> 
>  
> 
> Can anybody show me how to initialise the form correctly. 
> Here is my Action
> class
> 
>  
> 
> Thanks
> 
> Donie
> 
>  
> 
>  
> 
> import java.util.Locale;
> 
> import javax.servlet.http.HttpServletRequest;
> 
> import javax.servlet.http.HttpServletResponse;
> 
> import javax.servlet.http.HttpSession;
> 
> import org.apache.log4j.Category;
> 
> import org.apache.struts.action.Action;
> 
> import org.apache.struts.action.ActionForm;
> 
> import org.apache.struts.action.ActionForward;
> 
> import org.apache.struts.action.ActionMapping;
> 
> import org.apache.struts.util.MessageResources;
> 
> import org.apache.commons.beanutils.BeanUtils;
> 
>  
> 
> import com.tecnomen.mms.sm.backend.*;
> 
>  
> 
> public final class ContentAdaptationFormMainAction extends Action
> 
> {
> 
> static Category log =
> Category.getInstance(ContentAdaptationFormMainAction.class.getName());
> 
> public ActionForward execute(ActionMapping 
> mapping,ActionForm form,
> HttpServletRequest request,HttpServletResponse response) 
> throws Exception
> 
>   {
> 
> Locale locale =
> getLocale(request);
> 
> MessageResources 
> messages =
> getResources(request);
> 
> HttpSession session =
> request.getSession();
> 
> ActionForward forward =
> mapping.findForward("success"); //default
> 
> 
> 
> // Get the data for
> oSystemContentAdaptation
> 
> 
> ContentAdaptationService service
> = new ContentAdaptationService();
> 
> 
> ContentAdaptationForm theForm =
> (ContentAdaptationForm) form;
> 
> 
> ContentAdaptationDTO caDTO;
> 
> 
> 
>  
> 
> 
> int buttonSelect =
> theForm.getSelected();
> 
> 
> 
> switch(buttonSelect)
> 
> {
> 
>  case
> ContentAdaptationForm.SUBMIT_BUTTON:
> 
>  
> log.info("Submit CA form");
> 
>  
> 
>  
> // Create new data object for this form
> 
>  
> caDTO = new ContentAdaptationDTO();
> 
>  
> BeanUtils.copyProperties(caDTO, theForm );
> 
>  
> service.setContentAdaptation(caDTO);
> 
>  
> forward = new ActionForward(mapping.findForward("submit"));
> 
>  
> break;
> 
>  
> 
>  case
> ContentAdaptationForm.CANCEL_BUTTON:
> 
>  
> log.info("Cancel CA form");
> 
>  
> forward = new ActionForward(mapping.findForward("cancel"));
> 
>  
> break;
> 
>  case
> ContentAdaptationForm.RESET_BUTTON:
> 
>  
> log.info("Reset CA form");
> 
>   
>default:
> 
>  
> // Populate the form
> 
>  
> caDTO = new ContentAdaptationDTO();
> 
>  
> caDTO = service.getContentAdaptation();
> 
>  
> BeanUtils.copyProperties( theForm, caDTO );
> 
>  
> break;
> 
> }
> 
> return forward;
> 
> }
> 
> }
> 
> 

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

---

RE: Form validation

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Donie Kelly [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 10:14 AM
> To: Struts Users Mailing List
> Subject: Form validation
> 
> 
> Hi all
> 
>  
> 
> I have a form that uses the standard form validation based on the
> validation.xml file. It all works fine except for when I'm 
> pre-populating
> the form on first showing. The validation is kicking in 
> before the data is
> retrieved from the database. 

It's not the action class... it's in the struts-config file.  
validation="false" I believe is what you want for the pre-population to work 
without validation.


> 
>  
> 
> Can anybody show me how to initialise the form correctly. 
> Here is my Action
> class
> 
>  
> 
> Thanks
> 
> Donie
> 
>  
> 
>  
> 
> import java.util.Locale;
> 
> import javax.servlet.http.HttpServletRequest;
> 
> import javax.servlet.http.HttpServletResponse;
> 
> import javax.servlet.http.HttpSession;
> 
> import org.apache.log4j.Category;
> 
> import org.apache.struts.action.Action;
> 
> import org.apache.struts.action.ActionForm;
> 
> import org.apache.struts.action.ActionForward;
> 
> import org.apache.struts.action.ActionMapping;
> 
> import org.apache.struts.util.MessageResources;
> 
> import org.apache.commons.beanutils.BeanUtils;
> 
>  
> 
> import com.tecnomen.mms.sm.backend.*;
> 
>  
> 
> public final class ContentAdaptationFormMainAction extends Action
> 
> {
> 
> static Category log =
> Category.getInstance(ContentAdaptationFormMainAction.class.getName());
> 
> public ActionForward execute(ActionMapping 
> mapping,ActionForm form,
> HttpServletRequest request,HttpServletResponse response) 
> throws Exception
> 
>   {
> 
> Locale locale =
> getLocale(request);
> 
> MessageResources 
> messages =
> getResources(request);
> 
> HttpSession session =
> request.getSession();
> 
> ActionForward forward =
> mapping.findForward("success"); //default
> 
> 
> 
> // Get the data for
> oSystemContentAdaptation
> 
> 
> ContentAdaptationService service
> = new ContentAdaptationService();
> 
> 
> ContentAdaptationForm theForm =
> (ContentAdaptationForm) form;
> 
> 
> ContentAdaptationDTO caDTO;
> 
> 
> 
>  
> 
> 
> int buttonSelect =
> theForm.getSelected();
> 
> 
> 
> switch(buttonSelect)
> 
> {
> 
>  case
> ContentAdaptationForm.SUBMIT_BUTTON:
> 
>  
> log.info("Submit CA form");
> 
>  
> 
>  
> // Create new data object for this form
> 
>  
> caDTO = new ContentAdaptationDTO();
> 
>  
> BeanUtils.copyProperties(caDTO, theForm );
> 
>  
> service.setContentAdaptation(caDTO);
> 
>  
> forward = new ActionForward(mapping.findForward("submit"));
> 
>  
> break;
> 
>  
> 
>  case
> ContentAdaptationForm.CANCEL_BUTTON:
> 
>  
> log.info("Cancel CA form");
> 
>  
> forward = new ActionForward(mapping.findForward("cancel"));
> 
>  
> break;
> 
>  case
> ContentAdaptationForm.RESET_BUTTON:
> 
>  
> log.info("Reset CA form");
> 
>   
>default:
> 
>  
> // Populate the form
> 
>  
> caDTO = new ContentAdaptationDTO();
> 
>  
> caDTO = service.getContentAdaptation();
> 
>  
> BeanUtils.copyProperties( theForm, caDTO );
> 
>  
> break;
> 
> }
> 
> return forward;
> 
> }
> 
> }
> 
> 

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



Form validation

2004-12-08 Thread Donie Kelly
Hi all

 

I have a form that uses the standard form validation based on the
validation.xml file. It all works fine except for when I'm pre-populating
the form on first showing. The validation is kicking in before the data is
retrieved from the database. 

 

Can anybody show me how to initialise the form correctly. Here is my Action
class

 

Thanks

Donie

 

 

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import org.apache.log4j.Category;

import org.apache.struts.action.Action;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionForward;

import org.apache.struts.action.ActionMapping;

import org.apache.struts.util.MessageResources;

import org.apache.commons.beanutils.BeanUtils;

 

import com.tecnomen.mms.sm.backend.*;

 

public final class ContentAdaptationFormMainAction extends Action

{

static Category log =
Category.getInstance(ContentAdaptationFormMainAction.class.getName());

public ActionForward execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request,HttpServletResponse response) throws Exception

  {

Locale locale =
getLocale(request);

MessageResources messages =
getResources(request);

HttpSession session =
request.getSession();

ActionForward forward =
mapping.findForward("success"); //default



// Get the data for
oSystemContentAdaptation

ContentAdaptationService service
= new ContentAdaptationService();

ContentAdaptationForm theForm =
(ContentAdaptationForm) form;

ContentAdaptationDTO caDTO;



 


int buttonSelect =
theForm.getSelected();



switch(buttonSelect)

{

 case
ContentAdaptationForm.SUBMIT_BUTTON:

 
log.info("Submit CA form");

 

 
// Create new data object for this form

 
caDTO = new ContentAdaptationDTO();

 
BeanUtils.copyProperties(caDTO, theForm );

 
service.setContentAdaptation(caDTO);

 
forward = new ActionForward(mapping.findForward("submit"));

 
break;

 

 case
ContentAdaptationForm.CANCEL_BUTTON:

 
log.info("Cancel CA form");

 
forward = new ActionForward(mapping.findForward("cancel"));

 
break;

 case
ContentAdaptationForm.RESET_BUTTON:

 
log.info("Reset CA form");

 default:

 
// Populate the form

 
caDTO = new ContentAdaptationDTO();

 
caDTO = service.getContentAdaptation();

 
BeanUtils.copyProperties( theForm, caDTO );

 
break;

}

return forward;

}

}



RE: Tiles and Tabs

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 9:27 AM
> To: Struts help (E-mail)
> Subject: Tiles and Tabs
> 
> 
> HI,
> Another newbie question.
> I need to build several pages with tabs.  I'm using tiles.  
> What is the best way to implement it?  Any examples, tutorials?

Checkout struts-menu on sourceforge!  Wonderful tool that will do tabs as well. 
 
However, to more directly answer your question you implement each "tab" as a 
link to the appropriate page.  Your main tiles page ( the layout page, or 
whatever you want to call it) has the tabs on it.  Something like:


Header (could even be a tiles include or 

Tab1|Tab2|Tab better spaced and looking on page|




A tiles definition for each tab.  A forward to each tiles defintion in 
struts-config, preferably to an Action (ForwardAction even), the does the 
actual forward to the tiles definition.

That should give you the basic skeleton.

> Thanks
> Nadia
> 
> 
> -
> 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: Tiles and Tabs

2004-12-08 Thread Steven Leija
Check out Struts Menu
 
http://struts-menu.sourceforge.net/

-Original Message- 
From: Nadia Kunkov [mailto:[EMAIL PROTECTED] 
Sent: Wed 12/8/2004 10:27 AM 
To: Struts help (E-mail) 
Cc: 
Subject: Tiles and Tabs



HI,
Another newbie question.
I need to build several pages with tabs.  I'm using tiles.  What is the 
best way to implement it?  Any examples, tutorials?
Thanks
Nadia


-
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 and Tabs

2004-12-08 Thread Nadia Kunkov
HI,
Another newbie question.
I need to build several pages with tabs.  I'm using tiles.  What is the best 
way to implement it?  Any examples, tutorials?
Thanks
Nadia


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



RE: Tiles or Frames or Both

2004-12-08 Thread Nadia Kunkov
Thanks to all of you for the replies.  I decided to go with tiles since my app 
is very simple.
Again, I appreciate the input.
Nadia

-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 4:07 PM
To: Struts Users Mailing List
Subject: Re: Tiles or Frames or Both


On Tuesday 07 December 2004 17:15, Luiz Esmiralha wrote:
> On Mon, 06 Dec 2004 16:55:43 -0500, Frank W. Zammetti

Hi, 

> When you are starting out you really can't make the decision all by
> yourself, can you? The only reason you presented for using frames is
> increasing performance. If your application doesn't have the huge
> performance requirements that frames can help with, why bother using
> them at all?

Well, I generally hate frames too and rather extensively use Tiles.
Still, there are situations where frames are better suited (IFRAMES,
even), as they can improve user experience. Think of a search
mask, embedded in a Tiles-generated View. The visual design
guys stubbornly require to present the search results being
presented as a 'scroll box', fixed size, scrolling contents, pagers
or anything in this direction are a no-go. Two approaches are
possible: the  tag solution where the whole page is
generated again (DIV can be told to scroll if needed), or the
 alternative which is much more difficult to handle, as
you have to deal with two pages in a single (Tiles-based) View
which you have to keep in sync. For comparison, I implemented
both, and both solutions finally worked as desired. But: while
the single-page DIV tag thing briefly, but still noticably, flashed
upon each requery, with the IFRAME solution, everything except
the 'result window' kept steady, just as in a normal GUI app. So
finally the IFRAME solution won. From a developers's view, I
always would prefer a 'single page' solution, but then, it's
the user who decides if he likes the page or not. I must admit
the IFRAME thing gives a much better user experience, so I
would be reluctant to totally condemn frames. Furthermore,
FRAMES | IFRAMES are the only way to transparently embed
contents from your server into another server's pages
(think of portals written in PHP or the like), which may well
be a point when it comes to monetary things (JSTL provides
a tag suited for such situations, but in my experience, very
few portals actually run on Java, and even fewer of them
are JSTL-capable).

> Cheers,
> Luiz

Cheers,
-- Chris 

NB. But the new JDeveloper 10g Preview is totally cool.
Everybody should at least have a look at it. Go, Oracle
JDev team!

-
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: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: RE: LookupDispatchAction doesn't lookup mapping
> 
> 
> Hi
> 
> You write that : The LookupDispatchAction tries to call a method named
> "weiter" instead 
> of "forward", while it calls the "back"-method as expected.
> 
> As far as I remember "weiter" is the German word for "forward" - There
> might be a locale issue here.

That would be possible if he was getting the english version instead of the 
german version he's apparently putting on the page.


> 
> Hermod
> 
> 
> -Original Message-
> From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 2:14 PM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I 
> would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a 
> fairly poor
> > example of the code needed to do this stuff, in my opinion.
> > 
> > Jack
> > 
> > 
> 
> I will definitely try your suggestion out, but before that, I 
> wanted to 
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:
> 
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> And finally the Action-Map:
> 
>   protected Map getKeyMethodMap() {
> Map map = new HashMap();
> map.put("authors-form.button.create",
> "create");
> map.put("authors-form.button.edit",   "edit");
> map.put("authors-form.button.remove",
> "remove");
> map.put("authors-form.button.forward",
> "forward");
> map.put("authors-form.button.back",   "back");
> return map;
>   }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named 
> "weiter" instead 
> of "forward", while it calls the "back"-method as expected.
> 
> Alexander
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * * *
> 
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the 
> DnB NOR Group
> cannot accept any payment orders or other legally binding 
> correspondence with
> customers as a part of an email. 
> 
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * * *
> 
> 
> -
> 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 I pre-populat, with the same data, after validation?

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of marc
> Sent: Wednesday, December 08, 2004 6:49 AM
> To: [EMAIL PROTECTED]
> Subject: How do I pre-populat, with the same data, after validation?
> 
> 
> I have a form that I pre-populat with some data that I'm 
> passing forward 
> from the action that point's to the form.
> But then when I validat, and the validation fails. I then get 
> returned 
> to the form, as struts works.
> But have do I get the origainal data in the form again. And 
> not just the 
> data from the reset funktion?

This has been discussed extensively on the list.. a search of the history 
should reveal a number of ways.


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



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 6:14 AM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I 
> would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a 
> fairly poor
> > example of the code needed to do this stuff, in my opinion.
> > 
> > Jack
> > 
> > 
> 
> I will definitely try your suggestion out, but before that, I 
> wanted to 
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:

This suggestion comes under the heading "When only the impossible is left, the 
impossible must be possible".  I don't think this is it.
Why do you have  
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> And finally the Action-Map:
> 
>   protected Map getKeyMethodMap() {
> Map map = new HashMap();
> map.put("authors-form.button.create", 
> "create");
> map.put("authors-form.button.edit",   "edit");
> map.put("authors-form.button.remove", 
> "remove");
> map.put("authors-form.button.forward",
> "forward");
> map.put("authors-form.button.back",   "back");
> return map;
>   }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named 
> "weiter" instead 
> of "forward", while it calls the "back"-method as expected.
> 
> Alexander
> 
> -
> 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]



i18n and validation

2004-12-08 Thread kjc
Are there any known problem with the Struts validator framework and 
handling international characters.

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


RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread hermod . opstvedt
Hi

You write that : The LookupDispatchAction tries to call a method named
"weiter" instead 
of "forward", while it calls the "back"-method as expected.

As far as I remember "weiter" is the German word for "forward" - There
might be a locale issue here.

Hermod


-Original Message-
From: Alexander Czernay [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 2:14 PM
To: Struts Users Mailing List
Subject: Re: LookupDispatchAction doesn't lookup mapping


Dakota Jack wrote:
> My experience is that the computer is always right, so I would look in
> my properites file, if I were you, and see whether or not I had
> reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> feel compelled to reiterate that LookupDispatchAction is a fairly poor
> example of the code needed to do this stuff, in my opinion.
> 
> Jack
> 
> 

I will definitely try your suggestion out, but before that, I wanted to 
figure out, what I had done wrong using the LookupDispatchAction.

So now some direct copy & paste from my code.
My ApplicationRessurces.properties looks like this:

authors-form.button.forward = weiter
authors-form.button.back = zurück


The jsp:





And finally the Action-Map:

protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put("authors-form.button.create",
"create");
  map.put("authors-form.button.edit",   "edit");
  map.put("authors-form.button.remove",
"remove");
  map.put("authors-form.button.forward",
"forward");
  map.put("authors-form.button.back",   "back");
  return map;
}


The back-button works, while the forward doesn't.

The LookupDispatchAction tries to call a method named "weiter" instead 
of "forward", while it calls the "back"-method as expected.

Alexander

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


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



Re: How do I pre-populat, with the same data, after validation?

2004-12-08 Thread marc
Thank you, that helped :-)
Erik Weber wrote:
I use Session-scoped forms. Not much to think about. But, this might help:
http://www.reumann.net/struts/articles/request_lists.jsp
Erik

marc wrote:
I have a form that I pre-populat with some data that I'm passing 
forward from the action that point's to the form.
But then when I validat, and the validation fails. I then get returned 
to the form, as struts works.
But have do I get the origainal data in the form again. And not just 
the data from the reset funktion?

regards
-
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 I pre-populat, with the same data, after validation?

2004-12-08 Thread Erik Weber
I use Session-scoped forms. Not much to think about. But, this might help:
http://www.reumann.net/struts/articles/request_lists.jsp
Erik

marc wrote:
I have a form that I pre-populat with some data that I'm passing 
forward from the action that point's to the form.
But then when I validat, and the validation fails. I then get returned 
to the form, as struts works.
But have do I get the origainal data in the form again. And not just 
the data from the reset funktion?

regards
-
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: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Bala . Paranj

Please ignore this message.
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 7:47 AM
To: Struts Users Mailing List
Subject: Re: LookupDispatchAction doesn't lookup mapping


My experience is that the computer is always right, so I would look in
my properites file, if I were you, and see whether or not I had
reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
feel compelled to reiterate that LookupDispatchAction is a fairly poor
example of the code needed to do this stuff, in my opinion.

Jack


On Wed, 08 Dec 2004 09:51:58 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> 
> > On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
> > <[EMAIL PROTECTED]> wrote:
> >
> >> The problem is, that only one of those buttons
> >>works, while the other throws a MissingResourceAction. That sounds like
> >>a typo, but the strange thing is, that it tries to lookup the button's
> >>value rather than it's name (eg. having a ressource mapping like
> >>mybutton.forward=go it would try to lookup "go").
> >
> >
> > I presume that you know that lookup dispatch action DOES lookup the
> > buttons value rather than its name?  I just mention this because your
> > wording half indicates that you find this surprising.
> >
> > Jack
> >
> 
> Well, as far as I understand it, it takes the button value (eg. "go")
> and tries to match it in Application.properties, where it should find
> "mybutton.forward" that it looks up in the getKeyMethodMap() inside the
> LookupDispatchAction. My problem is, that my application tries to lookup
> "go" rather than "mybutton.forward" for one button, while it works for
> the other.
> 
> I double-checked all occurences of the lookup-string and also tried to
> rename it in case of some cruel naming conflict. It just doesn't work.
> 
> Alexander
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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

Note:  The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material.  Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited.  The recipient should check this email and
any attachments for the presence of viruses.  Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer.  This e-mail is and any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you.  NOVA Information Systems, Inc.

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



Re: How do I pre-populat, with the same data, after validation?

2004-12-08 Thread Joe Germuska
At 2:49 PM +0100 12/8/04, marc wrote:
I have a form that I pre-populat with some data that I'm passing 
forward from the action that point's to the form.
But then when I validat, and the validation fails. I then get 
returned to the form, as struts works.
But have do I get the origainal data in the form again. And not just 
the data from the reset funktion?
reset is not intended for a complete clearing of all properties, as 
you might guess if you think in analogy to the "release()" method in 
JSP custom tags.  If you are using request scoped beans, then you 
rarely need to implement reset().  I can't remember the last time I 
did.

The bean is populated with the user data before it's validated, so if 
you change your reset() implementation so as not to interfere with 
that, you'll be fine.  Then if you find that there is some piece of 
form state which actually does need to be reset, handle only that 
piece in your implementation of reset().

As noted in the JavaDoc, reset() is not intended for populating a 
form with initial values; that should be done in a setup Action by 
calling setter methods.

Hope this helps
Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: ValidatorForm ???

2004-12-08 Thread Derek Broughton
On Wednesday 08 December 2004 05:09, Guillaume Cottenceau wrote:
> Bala.Paranj 'at' novainfo.com writes:
> > Note:  The information contained in this email and in any attachments is
> > intended only for the person or entity to which it is addressed and may
> > contain confidential and/or privileged material.  Any review,
> > retransmission, dissemination or other use of, or taking of any action in
> > reliance upon, this information by persons or entities other than the
> > intended recipient is prohibited.  The recipient should check this email
> > and any attachments for the presence of viruses.  Sender accepts no
> > liability for any damages caused by any virus transmitted by this email.
> > If you have received this email in error, please notify us immediately by
> > replying to the message and delete the email from your computer.  This
> > e-mail is and any response to it will be unencrypted and, therefore,
> > potentially unsecure. Thank you.  NOVA Information Systems, Inc.
>
> Lawyers have said that these notices have no legal value. Thus,
> it's simply annoying.

Which is not to say that lawyers have agreed you _can_ retransmit this mail in 
any way.  The author _still_ holds copyright, and the extremely annoying 
blurb says nothing that isn't true of copyright in any case, and you can't 
disclaim your liability for sending viruses.
-- 
derek

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



How do I pre-populat, with the same data, after validation?

2004-12-08 Thread marc
I have a form that I pre-populat with some data that I'm passing forward 
from the action that point's to the form.
But then when I validat, and the validation fails. I then get returned 
to the form, as struts works.
But have do I get the origainal data in the form again. And not just the 
data from the reset funktion?

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


Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Alexander Czernay
Dakota Jack wrote:
My experience is that the computer is always right, so I would look in
my properites file, if I were you, and see whether or not I had
reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
feel compelled to reiterate that LookupDispatchAction is a fairly poor
example of the code needed to do this stuff, in my opinion.
Jack

I will definitely try your suggestion out, but before that, I wanted to 
figure out, what I had done wrong using the LookupDispatchAction.

So now some direct copy & paste from my code.
My ApplicationRessurces.properties looks like this:

authors-form.button.forward = weiter
authors-form.button.back = zurück

The jsp:





And finally the Action-Map:

protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put("authors-form.button.create",   "create");
  map.put("authors-form.button.edit", "edit");
  map.put("authors-form.button.remove",   "remove");
  map.put("authors-form.button.forward",  "forward");
  map.put("authors-form.button.back", "back");
  return map;
}

The back-button works, while the forward doesn't.
The LookupDispatchAction tries to call a method named "weiter" instead 
of "forward", while it calls the "back"-method as expected.

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


Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
I meant mybutton.forward=go to go=mybutton.forward


On Wed, 8 Dec 2004 04:46:58 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> My experience is that the computer is always right, so I would look in
> my properites file, if I were you, and see whether or not I had
> reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> feel compelled to reiterate that LookupDispatchAction is a fairly poor
> example of the code needed to do this stuff, in my opinion.
> 
> Jack
> 
> On Wed, 08 Dec 2004 09:51:58 +0100, Alexander Czernay
> 
> 
> <[EMAIL PROTECTED]> wrote:
> > Dakota Jack wrote:
> >
> >
> > > On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > >> The problem is, that only one of those buttons
> > >>works, while the other throws a MissingResourceAction. That sounds like
> > >>a typo, but the strange thing is, that it tries to lookup the button's
> > >>value rather than it's name (eg. having a ressource mapping like
> > >>mybutton.forward=go it would try to lookup "go").
> > >
> > >
> > > I presume that you know that lookup dispatch action DOES lookup the
> > > buttons value rather than its name?  I just mention this because your
> > > wording half indicates that you find this surprising.
> > >
> > > Jack
> > >
> >
> > Well, as far as I understand it, it takes the button value (eg. "go")
> > and tries to match it in Application.properties, where it should find
> > "mybutton.forward" that it looks up in the getKeyMethodMap() inside the
> > LookupDispatchAction. My problem is, that my application tries to lookup
> > "go" rather than "mybutton.forward" for one button, while it works for
> > the other.
> >
> > I double-checked all occurences of the lookup-string and also tried to
> > rename it in case of some cruel naming conflict. It just doesn't work.
> >
> > Alexander
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
My experience is that the computer is always right, so I would look in
my properites file, if I were you, and see whether or not I had
reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
feel compelled to reiterate that LookupDispatchAction is a fairly poor
example of the code needed to do this stuff, in my opinion.

Jack


On Wed, 08 Dec 2004 09:51:58 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> 
> > On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
> > <[EMAIL PROTECTED]> wrote:
> >
> >> The problem is, that only one of those buttons
> >>works, while the other throws a MissingResourceAction. That sounds like
> >>a typo, but the strange thing is, that it tries to lookup the button's
> >>value rather than it's name (eg. having a ressource mapping like
> >>mybutton.forward=go it would try to lookup "go").
> >
> >
> > I presume that you know that lookup dispatch action DOES lookup the
> > buttons value rather than its name?  I just mention this because your
> > wording half indicates that you find this surprising.
> >
> > Jack
> >
> 
> Well, as far as I understand it, it takes the button value (eg. "go")
> and tries to match it in Application.properties, where it should find
> "mybutton.forward" that it looks up in the getKeyMethodMap() inside the
> LookupDispatchAction. My problem is, that my application tries to lookup
> "go" rather than "mybutton.forward" for one button, while it works for
> the other.
> 
> I double-checked all occurences of the lookup-string and also tried to
> rename it in case of some cruel naming conflict. It just doesn't work.
> 
> Alexander
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



[OT] Tomcat vs Resin

2004-12-08 Thread Leon Rosenberg


> -Ursprüngliche Nachricht-
> Von: Bill Keese [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 8. Dezember 2004 08:44
> An: Struts Users Mailing List
> Betreff: Re: [OT] Tomcat vs Resin
> 
> 
> >With lightweight pages resins performance is double of tomcat performance
> >(400 requests per second compared to aprox 200 requests per second)
> >
> I'm just curious.  What is the bottleneck with serving pages?  With 400
> pages/sec is your CPU pegged at 100%?  Or is there a disk bottleneck?  I
> read a recent post saying that the most expensive part of serving pages
> is data movement;  if each page is 25K then 400 pages / second is 10M /
> sec.  Is that the issue?


In our case it was the CPU.

The pages were 1-2K (I extra wrote lightweight:-)) 

With more sophisticated pages it's the CPU and some "bugs" in java garbage
collection, which forces java to leak memory under load. 

Regards
Leon



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



[OT] Tomcat vs Resin

2004-12-08 Thread Leon Rosenberg


> -Ursprüngliche Nachricht-
> Von: Bill Keese [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 8. Dezember 2004 08:44
> An: Struts Users Mailing List
> Betreff: Re: [OT] Tomcat vs Resin
> 
> 
> >With lightweight pages resins performance is double of tomcat performance
> >(400 requests per second compared to aprox 200 requests per second)
> >
> I'm just curious.  What is the bottleneck with serving pages?  With 400
> pages/sec is your CPU pegged at 100%?  Or is there a disk bottleneck?  I
> read a recent post saying that the most expensive part of serving pages
> is data movement;  if each page is 25K then 400 pages / second is 10M /
> sec.  Is that the issue?


In our case it was the CPU.

The pages were 1-2K (I extra wrote lightweight:-)) 

With more sophisticated pages it's the CPU and some "bugs" in java garbage
collection, which forces java to leak memory under load. 

Regards
Leon



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



RE: [OT]Threads and Servlets Question

2004-12-08 Thread Marco Mistroni
Hello,
Sorry for little intrusion 
Wanna schedule jobs? Use quartz ... it's cool!

Regards
marco

-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] 
Sent: 07 December 2004 23:43
To: Struts Users Mailing List
Subject: Re: [OT]Threads and Servlets Question

Interesting!  Thanks.

Jack


On Tue, 07 Dec 2004 01:15:13 -0500, Erik Weber
<[EMAIL PROTECTED]> wrote:
> This is covered by JMX. For example, see javax.management.timer.Timer
> (which can be initialized/destroyed by a ServletContextListener). The
> idea is that you can schedule asynchronous operations but leave the
> Threads to be managed by the server.
> 
> JBoss supports this but I haven't had any luck determining if Tomcat
has
> any support in this area. WebLogic appears to have superior support in
> this area.
> 
> Erik
> 
> 
> 
> 
> Andrew Hill wrote:
> 
> > 
> > DON'T spawn threads inside a servlet container unless you really,
REALLY
> > have to. It'll tend to save you headaches more times than not. But
if
> > you gotta do it, do it with care :)
> > 
> >
> > Or as they say "dont try this at home kids" :-)
> >
> > 
> > a policy that prohibits them. (For example,
> > if I was running an ISP hosting service, that's something I would
> > almost certainly restrict.)
> > 
> > That's an excellent point... especially for someone developing an
app
> > that they intend to deploy to a shared environment
> > 
> > 
> >
> > Which leads me to wonder how one does scheduled jobs in such an
> > environment? Would this be a technique that is specific to the host
in
> > question?
> >
> >
> > Frank W. Zammetti wrote:
> >
> >> Craig McClanahan wrote:
> >>
> >>> You might be thinking of the J2EE platform spec, which identifies
some
> >>> of the issues with threads in EJB containers, or when you're
trying to
> >>> use transactions. The servlet spec describes a bunch of things
that
> >>> are either likely to or guaranteed to not work when you deal with
> >>> multiple threads in the context of a single request.
> >>
> >>
> >>
> >> That sounds like it, but I'm admittedly working from fuzzy
> >> half-memories... reading the big specs isn't something I tend to do
> >> as a hobby :)
> >>
> >>> It is. Who ever said that "popular" and "a good idea" were always
> >>> synoymous? :-)
> >>
> >>
> >>
> >> Certainly not me :)
> >>
> >>> It's also the case that a very large number of webapps are
installed
> >>> on standalone servlet containers like Tomcat, which don't enforce
the
> >>> "no threads" restriction unless you configure them to run a
security
> >>> manager, and then provide a policy that prohibits them. (For
example,
> >>> if I was running an ISP hosting service, that's something I would
> >>> almost certainly restrict.)
> >>
> >>
> >>
> >> That's an excellent point... especially for someone developing an
app
> >> that they intend to deploy to a shared environment, they definitely
> >> want to keep this in mind.
> >>
> >>> Just out of curiousity, how do ensure that the threads are ever
shut
> >>> down correctly?
> >>
> >>
> >>
> >> I frankly don't. Because of the nature of these threads, they can
die
> >> inelegantly with no problem (unless the server goes down WHILE they
> >> are processing, but I'm sure that's true of any thread). They are
> >> like scheduled tasks really, one fires once a day, on fires once an
> >> hour, etc. But because they make use of a lot of business logic
from
> >> the app, logic that isn't exposed any other way, making them daemon
> >> threads made sense (we also get to use the connection pool already
> >> established for the app, and some other minor resources that only
> >> exist when the app is running). These threads don't service
requests
> >> in any way, they do periodic processing (one ages records according
> >> to some complex business rules, another re-sends non-time-critical
> >> asynchronous messages to a mainframe-based system if the message
had
> >> previously failed, things like that).
> >>
> >>> Are there any controls to ensure that other parts of
> >>> your app won't hang forever waiting for a response from such a
thread?
> >>> Are there any places where you pass in a servlet request or
session
> >>> object to another thread (even as a parameter to a method that
returns
> >>> synchronously)? Are you assuming that you can propogate
transaction
> >>> context across threads (most implementations use a thread local
> >>> variable to store this context, so passing a message to a new
thread
> >>> will typically *not* have the same transaction privileges as the
old
> >>> one).
> >>
> >>
> >>
> >> As per my last comment, they aren't servicing requests, so these
> >> points don't apply in this particular case. Good points to be sure
> >> though.
> >>
> >>> If you're not having any of those problems, you're probably fine
...
> >>> that's only the things to watch out for I thought of in the time
it
> >>> took me to type the paragraph (there's undoubtedly a bunch more).
> >>
> >>
> >>
> >> Isn't there al

Re: ValidatorForm ???

2004-12-08 Thread Guillaume Cottenceau
Bala.Paranj 'at' novainfo.com writes:

> Note:  The information contained in this email and in any attachments is
> intended only for the person or entity to which it is addressed and may
> contain confidential and/or privileged material.  Any review,
> retransmission, dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other than the
> intended recipient is prohibited.  The recipient should check this email and
> any attachments for the presence of viruses.  Sender accepts no liability
> for any damages caused by any virus transmitted by this email. If you have
> received this email in error, please notify us immediately by replying to
> the message and delete the email from your computer.  This e-mail is and any
> response to it will be unencrypted and, therefore, potentially unsecure.
> Thank you.  NOVA Information Systems, Inc.

Lawyers have said that these notices have no legal value. Thus,
it's simply annoying.

-- 
Guillaume Cottenceau

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Alexander Czernay
Dakota Jack wrote:
On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
The problem is, that only one of those buttons
works, while the other throws a MissingResourceAction. That sounds like
a typo, but the strange thing is, that it tries to lookup the button's
value rather than it's name (eg. having a ressource mapping like
mybutton.forward=go it would try to lookup "go"). 

I presume that you know that lookup dispatch action DOES lookup the
buttons value rather than its name?  I just mention this because your
wording half indicates that you find this surprising.
Jack
Well, as far as I understand it, it takes the button value (eg. "go") 
and tries to match it in Application.properties, where it should find 
"mybutton.forward" that it looks up in the getKeyMethodMap() inside the 
LookupDispatchAction. My problem is, that my application tries to lookup 
"go" rather than "mybutton.forward" for one button, while it works for 
the other.

I double-checked all occurences of the lookup-string and also tried to 
rename it in case of some cruel naming conflict. It just doesn't work.

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