Re: Apparent bean:struts / DynaActionForm Class Incompatibility

2003-03-17 Thread darryl . staflund
Thank you very much Kris :-)  I've never worked with the FormBeanConfig class before, 
so I thought you were using a generic name in your last letter for the sake of 
example.  I'll brush up on the class and make sure I familiarize myself with more of 
the Struts API before posting in the future.  I appreciate your help.

Darryl

- Original Message -
From: Kris Schneider <[EMAIL PROTECTED]>
Date: Monday, March 17, 2003 2:06 pm
Subject: Re: Apparent bean:struts / DynaActionForm Class Incompatibility

> Darryl,
> 
> As I said, you're not getting an ActionForm (or even a 
> DynaActionForm), you're
> getting a FormBeanConfig.
> 
> http://jakarta.apache.org/struts/api/org/apache/struts/config/FormBeanConfig.html
> 
> FormBeanConfig doesn't have a "description" property, hence your 
> error. Even if
> it did, you'd likely get a different error since configuration 
> information is
> frozen once it's loaded.
> 
> If you need to get at the form bean associated with an action 
> mapping, I think
> you can do:
> 
> 
> 
> 
>  name="<%= String.valueOf(attribute) %>"
> scope="<%= String.valueOf(scope) %>"/>
> 
> Of course, this assumes the form bean has already been created...
> 
> Quoting [EMAIL PROTECTED]:
> 
> > Hi Kris,
> > 
> > Thanks for your help.  I think I described my problem a bit 
> incorrectly. 
> > This is how I get an error:
> > 
> > 1.  At the top of the JSP page, I have the following:
> > 
> > 
> > 
> > 2.  Later, I try writing the value of one of the properties as 
> follows:> 
> > 
> > 
> > 3.  This results in the following error:
> > 
> > org.apache.jasper.JasperException: No getter method for property 
> description> of bean theDocumentForm
> > 
> > If there is no casting issue going on, then I am not sure what I 
> am doing
> > wrong that would lead to this error.  Any suggestions?
> > 
> > Darryl
> > 
> > 
> > 
> > - Original Message -
> > From: Kris Schneider <[EMAIL PROTECTED]>
> > Date: Monday, March 17, 2003 1:28 pm
> > Subject: Re: Apparent bean:struts / DynaActionForm Class 
> Incompatibility> 
> > >  does *not* get you a handle to an ActionForm 
> > > instance. If you use:
> > > 
> > > 
> > > 
> > > Then you get a handle to a FormBeanConfig instance that 
> represents 
> > > the info in
> > > your  element.
> > > 
> > > Quoting [EMAIL PROTECTED]:
> > > 
> > > > Hi all,
> > > > Does anyone know how to get around the following problem:
> > > > 
> > > > 1. I am using a DynaActionForm class to mediate data 
> exchange 
> > > between my JSPs
> > > > and and Action classes.
> > > > 
> > > > 2. In one JSP, I use the  tag to copy one 
> > > DynaActionForm class
> > > > to a page scoped scripting variable.
> > > > 
> > > > 3. Once I have done this, though, I can no longer access the 
> > > properties of
> > > > the bean through the scripting variables because the 
> 'getter' 
> > > method for that
> > > > property cannot be found.
> > > > 
> > > > Here is what I think is happening. The  
> > > implicitly assumes
> > > > that my DynaActionForm class is actually an ActionForm 
> class. 
> > > Although this
> > > > is true since DynaActionForm subclasses ActionForm, their 
> getter 
> > > and setter
> > > > methods are quite different. Getter methods in the 
> ActionForm 
> > > class take the
> > > > form of 'get > > DynaActionForm class take
> > > > the form of 'get (')'. Since my class is of the type
> > > > DynaActionClass, my JSP fails.
> > > > 
> > > > Does anyone know a workaround to this?
> > > > 
> > > > Darryl
> > > > 
> > > > 
> > > > 
> > > > -
> 
> > > 
> > > > To unsubscribe, e-mail: struts-user-
> [EMAIL PROTECTED]> > > For additional commands, e-
> mail: [EMAIL PROTECTED]
> > > > 
> > > 
> > > 
> > > -- 
> > > Kris Schneider <')" >')" >mailto:[EMAIL PROTECTED]>
> > > D.O.Tech   <" target="l">" target="l">http://www.dotech.com/>
> > > 
> > > ---
> 
> > > --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: struts-user-
> [EMAIL PROTECTED]> > 
> > > 
> > 
> > 
> > -
> 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -- 
> Kris Schneider <')" >mailto:[EMAIL PROTECTED]>
> D.O.Tech   <" target="l">http://www.dotech.com/>
> 
> ---
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Re: Apparent bean:struts / DynaActionForm Class Incompatibility

2003-03-17 Thread darryl . staflund
Hi Kris,

Thanks for your help.  I think I described my problem a bit incorrectly.  This is how 
I get an error:

1.  At the top of the JSP page, I have the following:



2.  Later, I try writing the value of one of the properties as follows:



3.  This results in the following error:

org.apache.jasper.JasperException: No getter method for property description of bean 
theDocumentForm

If there is no casting issue going on, then I am not sure what I am doing wrong that 
would lead to this error.  Any suggestions?

Darryl



- Original Message -
From: Kris Schneider <[EMAIL PROTECTED]>
Date: Monday, March 17, 2003 1:28 pm
Subject: Re: Apparent bean:struts / DynaActionForm Class Incompatibility

>  does *not* get you a handle to an ActionForm 
> instance. If you use:
> 
> 
> 
> Then you get a handle to a FormBeanConfig instance that represents 
> the info in
> your  element.
> 
> Quoting [EMAIL PROTECTED]:
> 
> > Hi all,
> > Does anyone know how to get around the following problem:
> > 
> > 1. I am using a DynaActionForm class to mediate data exchange 
> between my JSPs
> > and and Action classes.
> > 
> > 2. In one JSP, I use the  tag to copy one 
> DynaActionForm class
> > to a page scoped scripting variable.
> > 
> > 3. Once I have done this, though, I can no longer access the 
> properties of
> > the bean through the scripting variables because the 'getter' 
> method for that
> > property cannot be found.
> > 
> > Here is what I think is happening. The  
> implicitly assumes
> > that my DynaActionForm class is actually an ActionForm class. 
> Although this
> > is true since DynaActionForm subclasses ActionForm, their getter 
> and setter
> > methods are quite different. Getter methods in the ActionForm 
> class take the
> > form of 'get DynaActionForm class take
> > the form of 'get (')'. Since my class is of the type
> > DynaActionClass, my JSP fails.
> > 
> > Does anyone know a workaround to this?
> > 
> > Darryl
> > 
> > 
> > 
> > -
> 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -- 
> Kris Schneider <')" >mailto:[EMAIL PROTECTED]>
> D.O.Tech   <" target="l">http://www.dotech.com/>
> 
> ---
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Apparent bean:struts / DynaActionForm Class Incompatibility

2003-03-17 Thread darryl . staflund
Hi all,
Does anyone know how to get around the following problem:

1. I am using a DynaActionForm class to mediate data exchange between my JSPs and and 
Action classes.

2. In one JSP, I use the  tag to copy one DynaActionForm class to a 
page scoped scripting variable.

3. Once I have done this, though, I can no longer access the properties of the bean 
through the scripting variables because the 'getter' method for that property cannot 
be found.

Here is what I think is happening. The  implicitly assumes that my 
DynaActionForm class is actually an ActionForm class. Although this is true since 
DynaActionForm subclasses ActionForm, their getter and setter methods are quite 
different. Getter methods in the ActionForm class take the form of 'get')'. 
Since my class is of the type DynaActionClass, my JSP fails.

Does anyone know a workaround to this?

Darryl



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



RE: [STRUTS] Please !

2002-09-12 Thread Darryl Nortje

Kiuma, without sounded condescending or anything, just by looking at the
error msg you got it seems to besomething wrong with your jsp page. I
haven't looked at your jsp page yet, but from a debugging, or problem
solving point of view, change your jsp page to simply say "testing" nested
in two  tags. Then start adding more and more tag to it, untill you
eventually have the jsp page shown below. You're getting a Nullpointer
exception in the userlist.jsp. So a variable that you're trying to access in
the jsp is null. Are you setting the variable in your action class???

-Original Message-
From: kiuma [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 7:18 PM
To: struts-user
Subject: Re: [STRUTS] Please !


Thx, but since I'm complitely new to struts I don't know what to do:

*Here is my action class*

public class ListedUserAction extends LookupDispatchAction {
   
protected String keyfinder = "";
   
protected Map getKeyMethodMap()
{
Map map = new HashMap();
map.put("button.find", "find");
map.put("button.delete.selected", "delete");
map.put("button.append", "append");
return map;
}
   
public ActionForward delete( ActionMapping mapping,
  ActionForm form,
  HttpServletRequest req,
  HttpServletResponse res ) throws 
Exception
{
//keyfinder = ((ListedUserForm)form).getUserToFind();
   
return mapping.findForward( IStrutsConstants.SUCCESS );
//"/secure/userlist.jsp?userToFind=" + keyfinder
}
   
public ActionForward find( ActionMapping mapping,
  ActionForm form,
  HttpServletRequest req,
  HttpServletResponse res ) throws 
Exception
{
//keyfinder = ((ListedUserForm)form).getUserToFind();
   
return mapping.findForward( IStrutsConstants.SUCCESS );
//"/secure/userlist.jsp?userToFind=" + keyfinder
}
   
public ActionForward append( ActionMapping mapping,
  ActionForm form,
  HttpServletRequest req,
  HttpServletResponse res ) throws 
Exception
{
//keyfinder = ((ListedUserForm)form).getUserToFind();
   
return mapping.findForward( IStrutsConstants.SUCCESS );
//"/secure/userlist.jsp?userToFind=" + keyfinder
}
   
}

*my jsp page:*

<%@page language="java"
contentType="text/html;charset=UTF-8"
session="true"
isThreadSafe="true"
isErrorPage="false"
import="javax.naming.*,
   com.wingstech.webappointments.interfaces.*,
   java.util.*"
%> 
<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean" %>















: 



   

   









<%--  --%>
<%--  --%>





*and my  config tag:*



 


*
I really can't see the error, can you help me please?*


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Dynamic name to the text fields

2002-09-02 Thread Darryl Nortje

Well, the way I did it was select from a table and in the while (rs.next())
loop build up the collection.

I don't know your particular scenario so can't help you there, other than to
say that you build up the collection as part of an action, or from a
database, depending on what you want to do at the end of the day

-Original Message-
From: Anoop [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 2:10 PM
To: 'Struts Users Mailing List'
Subject: RE: Dynamic name to the text fields


But, the same case arrises here, as in defining number of beans. How will be
the number of beans be pre-defined??

-Anoop.

-Original Message-
From: Darryl Nortje [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 4:19 PM
To: 'Struts Users Mailing List'
Subject: RE: Dynamic name to the text fields


Anoop, I did it by iterating through a collection of beans, each bean in the
collection for eg had a getKey() and getValue() method then the jsp looks
like this.


   
  
 "/>
  
   


It's very simple but it works

cheers
Darryl

-Original Message-
From: Donald Ball [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 4:44 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Dynamic name to the text fields


On 8/30/2002 at 7:28 PM Anoop wrote:

>Hi All,
>
>   I am a newbie to struts and taglibs, was trying to display text
fields
>dynamically using "html:iterator". Below is the scenario I was
>trying out.

You may be in luck, I've been recently trying to learn how to do something
similar myself.



>The html snippet for the above is something like:
>
>   
>   
>
>But I want it to be something like:
>
>   
>   
>
>Where the values("a" & "b") for the name attribute comes from an array
>defined in the Form Bean. What are the changes required in my jsp snippet?
>
>Also, if only it is possible to get an output as desired, does the
FormBean
>be modified to support this. As there won't be any getter/setter for "a"
>and
>"b".
>
>Appreciate any kind of help regarding this.

First, google around for "map-backed ActionForms" or similar. There's some
stuff over on jguru that might be helpful. Also, I'm trying to write
documentation for the struts user's guide for this, so I'd appreciate your
comments on how (un)clear the following is (apologies for the formatting,
my mail client sucks):


  The DynaActionForm classes offer the ability to create ActionForm
beans
 at initialization time, based on a list of properties enumerated in the
struts
configuration file. However, many HTML forms are generated dynamically at
request-time. Their ActionForm beans' properties are not all known ahead of
time, so we need a new approach.
  Struts allows you to make one (or more) of your ActionForm's
properties
' values a Map instead of a traditional atomic object. You can then store
your form's dynamic fields' data in that Map. Here is an example of a
map-backed ActionForm class:



  In its corresponding JSP page, you can access objects stored in
the values map using a special notation: mapname(keyname). The
parantheses in the bean property name serve to indicate that the bean
property named mapname should be a Map, and that struts should look
at the value stored with the key keyname in that Map to find the
"real" property for mapname(keyname).
  Here is a simple example:



  This will call the getValue() method on FooForm with a key value
of "foo" to find the property value. To create a form with dynamic field
names, you might do something like this:





Hope it helps, thanks in advance for any comments.

- donald


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

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



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

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




RE: Dynamic name to the text fields

2002-09-02 Thread Darryl Nortje

Anoop, I did it by iterating through a collection of beans, each bean in the
collection for eg had a getKey() and getValue() method then the jsp looks
like this.


   
  
 "/>
  
   


It's very simple but it works

cheers
Darryl

-Original Message-
From: Donald Ball [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 4:44 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Dynamic name to the text fields


On 8/30/2002 at 7:28 PM Anoop wrote:

>Hi All,
>
>   I am a newbie to struts and taglibs, was trying to display text
fields
>dynamically using "html:iterator". Below is the scenario I was
>trying out.

You may be in luck, I've been recently trying to learn how to do something
similar myself.



>The html snippet for the above is something like:
>
>   
>   
>
>But I want it to be something like:
>
>   
>   
>
>Where the values("a" & "b") for the name attribute comes from an array
>defined in the Form Bean. What are the changes required in my jsp snippet?
>
>Also, if only it is possible to get an output as desired, does the
FormBean
>be modified to support this. As there won't be any getter/setter for "a"
>and
>"b".
>
>Appreciate any kind of help regarding this.

First, google around for "map-backed ActionForms" or similar. There's some
stuff over on jguru that might be helpful. Also, I'm trying to write
documentation for the struts user's guide for this, so I'd appreciate your
comments on how (un)clear the following is (apologies for the formatting,
my mail client sucks):


  The DynaActionForm classes offer the ability to create ActionForm
beans
 at initialization time, based on a list of properties enumerated in the
struts
configuration file. However, many HTML forms are generated dynamically at
request-time. Their ActionForm beans' properties are not all known ahead of
time, so we need a new approach.
  Struts allows you to make one (or more) of your ActionForm's
properties
' values a Map instead of a traditional atomic object. You can then store
your form's dynamic fields' data in that Map. Here is an example of a
map-backed ActionForm class:



  In its corresponding JSP page, you can access objects stored in
the values map using a special notation: mapname(keyname). The
parantheses in the bean property name serve to indicate that the bean
property named mapname should be a Map, and that struts should look
at the value stored with the key keyname in that Map to find the
"real" property for mapname(keyname).
  Here is a simple example:



  This will call the getValue() method on FooForm with a key value
of "foo" to find the property value. To create a form with dynamic field
names, you might do something like this:





Hope it helps, thanks in advance for any comments.

- donald


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

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




RE: How to retrieve value from actionservlet?

2002-08-29 Thread Darryl Nortje

yes you can. Let's say your user object, is you form class. or similar
bean... it has in particular a getFullname() method. You store this user
bean on the request or session as "userstuff". Then when you want to write
out the username on a jsp page all you do is this -->   .

I don't see why this shouldn't work

Hi Daryl,

Thank you for your help. But, please bear with me
because I am trying very hard to make some sense out
of it. Is there any way that I can store the
information associated to a particular user in a user
object and then retrieve it later on my JSP page? In
other words, can I do the following? 

 ??

Thank you!!

Thanks,
Lee
--- Darryl Nortje <[EMAIL PROTECTED]> wrote:
> try this in your action class.
> 
> You have an instance of the form object.
> 
> UserInfoForm userForm = (UserInfoForm) form;
> then...
> String fullName = userForm.setFullName(fullName);
> return mapping.findForward("success");
> 
> then on your userInfoConfirm jsp you say
>  property="fullname"/>
> 
> That should work...
> 
> -Original Message-
> From: struts user [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 27, 2002 6:21 PM
> To: [EMAIL PROTECTED]
> Subject: How to retrieve value from actionservlet?
> 
> 
> 
> Hello everyone,
> 
> I am new to struts and I hope anyone out there can
> help me, please!
> 
> In my struts-config.xml file, I have:
> 
>  
>   
> type="com.mycompany.mydept.mypackage.UserInfoForm"/>
> 
> 
> 
> 
>   
> type="com.mycompany.mydept.mypackage.UserInfoAction"
>name="userInfoForm"
>scope="request"
>input="/userInput.jsp">
>path="/userInfoConfirm.jsp"/>
>
> 
> 
> In my UserInfoForm, I have the following setter and
> getter:
> 
> public void setFullname(String fullname){
>this.fullName = fullname;
> }
> 
> public String getFullname(){
>return (fullName);
> }
> In my UserInfoAction servlet, I did the following:
> 
> User myUser = new User(fullName);
> 
> I have a user object and I would like to retrive the
> user object value i.e. fullName and display it on my
> JSP page. How do I do that? I will have a
> collections
> of users and store them in a Hashtable eventually
> and
> retrieve user information associated to the user.
> But,
> I would like to know how to achieve my initial
> attempt
> above. Please help
> 
> Thank you,
> Lee
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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

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




RE: Hashmap and logic:equal

2002-08-29 Thread Darryl Nortje

I see what you're saying... I don't know why it doesn't work.
What I would try then is to set the Hashmap in the form and retrieve it off
the form object. 

Tell me, if item1 = "Y" do you want to show nothing, and can item2 be equal
to "x"

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 6:44 PM
To: Struts Users Mailing List
Subject: RE: Hashmap and logic:equal



"I think with Hashmap you just need key or value, so where you have
property="mapkey1" change to key or value"


I am a bit confused ,I will clarify..
Aa an eample, in my loadAction:
Map myMap = new Map();
myMap.put("item1","X");
myMap.put("item2","Y");
request.setAttrite("infoObject",myMap);


In my Page:


To:'Struts Users Mailing List' <[EMAIL PROTECTED]>
cc:

Subject:RE: Hashmap and logic:equal


This is how I got it of my form object


and this is how I got it out of a collection object

 

In the form object I have a getJspAction() method and in the collection
object I have a getIsReadonly() method.

I think with Hashmap you just need key or value, so where you have
property="mapkey1" change to key or value

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 6:10 PM
To: [EMAIL PROTECTED]
Subject: Hashmap and logic:equal


I am hoping that someone could point me in the right direction.
 I have been searching the archives and have not come accross anything that
I can relate to.

Using the equal tags, what is the best way to compare a value retieved from
a Hashmap?

I would like to put a Hashmap (or similar)  into request scope and use the
logic:equals tag. and do something like this.

 Show A 
 Show B 
 Show C 

Do I need to wrap this in simple class?
The docs make reference to the support of indexed properties, is there a
way to get the tag to look up the name of the key?


Thanks All



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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








--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to retrieve value from actionservlet?

2002-08-27 Thread Darryl Nortje

try this in your action class.

You have an instance of the form object.

UserInfoForm userForm = (UserInfoForm) form;
then...
String fullName = userForm.setFullName(fullName);
return mapping.findForward("success");

then on your userInfoConfirm jsp you say


That should work...

-Original Message-
From: struts user [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 6:21 PM
To: [EMAIL PROTECTED]
Subject: How to retrieve value from actionservlet?



Hello everyone,

I am new to struts and I hope anyone out there can
help me, please!

In my struts-config.xml file, I have:

 
   




   
  
   


In my UserInfoForm, I have the following setter and
getter:

public void setFullname(String fullname){
 this.fullName = fullname;
}

public String getFullname(){
 return (fullName);
}
In my UserInfoAction servlet, I did the following:

User myUser = new User(fullName);

I have a user object and I would like to retrive the
user object value i.e. fullName and display it on my
JSP page. How do I do that? I will have a collections
of users and store them in a Hashtable eventually and
retrieve user information associated to the user. But,
I would like to know how to achieve my initial attempt
above. Please help

Thank you,
Lee



__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Hashmap and logic:equal

2002-08-27 Thread Darryl Nortje

This is how I got it of my form object


and this is how I got it out of a collection object



In the form object I have a getJspAction() method and in the collection
object I have a getIsReadonly() method.

I think with Hashmap you just need key or value, so where you have
property="mapkey1" change to key or value

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 6:10 PM
To: [EMAIL PROTECTED]
Subject: Hashmap and logic:equal


I am hoping that someone could point me in the right direction.
 I have been searching the archives and have not come accross anything that
I can relate to.

Using the equal tags, what is the best way to compare a value retieved from
a Hashmap?

I would like to put a Hashmap (or similar)  into request scope and use the
logic:equals tag. and do something like this.

 Show A 
 Show B 
 Show C 

Do I need to wrap this in simple class?
The docs make reference to the support of indexed properties, is there a
way to get the tag to look up the name of the key?


Thanks All



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: please, help! debugging Struts with VisualAge for Java and Tomcat

2002-08-27 Thread Darryl Nortje

I am using VAJ4. It has Websphere Test Environment. I use that and then am
able to debug the webapp. I don't know if VAJ has a tomcat plugin, but
that's probably what the article Adrian sent you is all about.

If you want the full installation instructions for websphere test
environment and getting struts running in VAJ, gimme a shout I'll send it to
you.

cheers
Darryl

-Original Message-
From: Adrian Brown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 3:20 AM
To: Struts Users Mailing List
Subject: Re: please, help! debugging Struts with VisualAge for Java and
Tomcat


Hi Patria,

I found this article by Sheldon Wosnick to be of great
assistance.

http://www7.software.ibm.com/vad.nsf/data/document2389?OpenDocument

Let me know if you need any other help.

Adrian

 --- Patria Lukman <[EMAIL PROTECTED]> wrote: > Hello
everyone
> 
> I really don't want to bother you people, since this
> question might be addressed to VisualAge users...
> But I figure out that in this list there might be
> some
> people using it as a development tool.
> I have VAJ 3.5 Professional edition and Tomcat 4.0.b
> integrated with it...
> How can debug a Struts application using VAJ
> debugging
> facilities? I have followed the articles found in
> the
> Net but without much avail...
> Thank you very much for your time.
> P
> 
> 
>
__
> 
> Post your ad for free now! http://personals.yahoo.ca
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>  

http://digital.yahoo.com.au - Yahoo! Digital How To
- Get the best out of your PC!

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

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




RE: Editable/non-editable fields

2002-08-26 Thread Darryl Nortje

Gilles,

This is how I did it. Hope it helps


/>

The bean:write tag --> 
returns a String that either says readonly, or nothing, depending on my
condition works like a bomb

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 4:59 PM
To: Struts Users Mailing List
Subject: RE: Editable/non-editable fields



I don't understand your "The html tags don't support this attribute "

The struts tag html:text do have an attribute 'disabled' , so wat is it for
, if its not rendered in the 'DISABLED' attribute of the  tag?

Gilles Vandaele
0498 52 64 12
[EMAIL PROTECTED]


 

   "Kevin A. Smith"

   <[EMAIL PROTECTED] To:Struts Users Mailing List

   m>
<[EMAIL PROTECTED]>  
cc:

   26/08/2002 16:49 Subject:  RE:
Editable/non-editable fields   
 

Please respond to Struts Users
Mailing List  
 

 

 





Gilles -

This is the was the hacking my project team had to do. The html tags don't
support this attribute so it doesn't show up in the final rendered HTML. We
had to hack the tag code to add support for this.

--Kevin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:37 AM
To: Struts Users Mailing List
Subject: Re: Editable/non-editable fields



Hi all;
This list works too hard, some solutions comes out before I finish to type!

How can you set the "disabled" attribute on the controls (in order to see
an input field "grayed out")?
If I put an 'mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>


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






--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Iterate tag within an iterate tag

2002-08-26 Thread Darryl Nortje

Went through the achives to find out if having an iterate tag within an
iterate tag is possible. Didn't find anything.

So basically, my question is 1) is it possible. and 2) if so, how.

This is what I've done, but it's not working..


I am then able to access all this collections getters if they are returning
String via the 

if the getter returns a collection, how do I iterate through that result

the getter in the bean is (in this case) getAttDetails() for the collection
that I now need to iterate through.

If I do this  in the
first iterate tag it prints out the following to my jsp
[com.ag.armata.contentserver.OptionBean@475d,
com.ag.armata.contentserver.OptionBean@6275], which looks to me like it's
just simply calling the toString() method on the object. What I, in essence
want to do is this>



" id="attDets">
 = 


 This obviously does not work...
Does anyone know how to do what I've tried to explain as best as possible
here.

Thanks
Darryl

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




RE: EJB = bad = MS.net

2002-02-20 Thread Thompson, Darryl

 I STRONGLY disagree with this statement. We have been doing EJBs for 2 yrs
at my shop. Our Order Entry system  uses EJBs to capture customer orders in
36 cities (US) in every US timezone and we have had nothing but success. By
the way there is NO reason to buy BEA weblogic unless you are running EJBs
and don't trust JBOSS (which I do). Tomcat is much better at serving
webpages the WLS or Websphere, EJBs are one of the cornerstones of J2EE,
wake up Vic...

> -Original Message-
> From: Vic Cekvenich [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 20, 2002 11:42 AM
> To:   Struts Users Mailing List
> Cc:   [EMAIL PROTECTED]
> Subject:  EJB = bad = MS.net
> 
> Home page of Jakarta has this
> http://jakarta.apache.org/site/news.html#0130.2
> on this:
> http://www.mail-archive.com/general%40jakarta.apache.org/msg03376.html
> 
> I agree. Doing EJBs is bad on many levels and creates more problems. 
> Avoid EJB if you want to stay in Java.
> 
> Alternative is to just use Struts + TomCat + RowSet (or DAO if you are 
> doing something simple or small) and done. This is the sweet spot. MVC 
> is all you need.
> 
> Alternative, do EJBs and your organization WILL switch to MS .NET on the 
> next project, leave J2EE, and you have to learn VB.net.
> 
> EJBs are for newbies. (If you need middleware (very rare) use SOAP)
> 
> lol,
> Vic
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Nightly Builds

2002-02-14 Thread Thompson, Darryl


 Can any one tell me which nightly build is stable enough to actually
develop with? Often I encounter problems with missing tag handlers or
conflicting method definitions between the TLD and tag classes making the
build pretty much unusable...

Thanks

> -Original Message-
> From: Sid Stuart [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 9:18 AM
> To:   Struts Users Mailing List
> Subject:  Re: session beans
> 
> FilterBean filter = (FilterBean) session.getAttribute
> (FilterBean.FILTERBEAN_KEY);
> if (filter == null) {
> log.info ("Creating Filter");
> session.setAttribute (FilterBean.FILTERBEAN_KEY, new
> FilterBean
> ());
> }
> 
> Henry Lu wrote:
> 
> > How to set/get session beans in a formaction program? Could you show me
> an
> > example with a code?
> >
> > Thanks,
> >
> >
> --
> -
> > Henry Lu
> > MCITphone: (734) 936-2063
> > University of Michigan Medical Center   fax:   (734) 763-4372
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Creating RadioButton Group using Nested Extension

2002-02-13 Thread Thompson, Darryl

Hello all,

   I am using the MonkeyStruts Nested Extension and need help creating a
Radiobutton group from data retreived out of a Relational Table. Does anyone
have a code example of this or something similar using the nested extension?
Within my parent ActionForm (SalesOrderForm) I have a nested form
(LongDistanceServiceForm) and this form can contain a collection of
callingCard plans which must be rendered as a group of radio buttons.


Thanks for any help,
Darryl

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




RE: Menu tag

2002-02-13 Thread Thompson, Darryl

Hello Vic,

I use the HierMenu javascript  menu builder, it works well in Struts, see
link below
http://www.webreference.com/dhtml/hiermenus/


if anyone knows of a better Horizonal menuing approach I would like to
see/try it.

regards,
Daaryl
> -Original Message-
> From: Struts Newsgroup [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 4:40 PM
> To:   [EMAIL PROTECTED]
> Subject:  Menu tag
> 
> Subject: Menu tag
> From: Vic Cekvenich <[EMAIL PROTECTED]>
>  ===
> Other than struts-menu tag, what is another menu tag?
> 
> I want drop downs across the top?
> TIA,
> Vic
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: HTML / Struts Help

2002-02-13 Thread Thompson, Darryl

Hello,

When my JSPs contain multiple buttons that trigger different behaviour I use
the DispatchAction...

Here is a snippet of html for defining a button:
 

   //...

 In my struts-config.xml I create a mapping like this:
   
  
  
  
  


Then in the DispatchSalesOrderSetup class I handle any pre-page processing
in an execute(...) method before 
forwarding control to the appropriate page. The great thing about the
DispatchAction class is you don't have to code any conditional logic since
it uses
reflection to map the request argument (in this case the  "method"
parameter) value to a method name in the DispatchAction subclass.

Hope this helps...

/ Darryl
> -Original Message-
> From: Wijewickrema , Dina E. [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 9:16 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: HTML / Struts Help
> 
> Just define a hidden field in your form. Then when you press a button
> define
> an onclick event that sets the value of the hidden field.
> 
> For example:
> 
> 
> 
>  onclick="form.action.value='Process'">
> 
> -Original Message-
> From: Mattos, John [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 10:12 AM
> To: '[EMAIL PROTECTED]'
> Subject: HTML / Struts Help
> 
> 
> Hi.
> 
> I have a form that can be submitted by three different buttons, for
> example
> the buttons read
> 
> (Button Labels)
> Process
> View by Org
> View by Product
> 
> What I want to do is in the Action Class handling the submission, find out
> which button was pressed, and act accordingly, whether it's an
> actionForward
> (in the case of the "view" options) or kicking off another process (as
> will
> be done by the "process" button)
> 
> So, how can I figure out what button was pressed in that Action class? Is
> there a way to do that?
> 
> John Mattos
> Sr. Developer and Architect
> iNDEMAND
> 345 Hudson St. 16th Floor
> New York, New York
> 10014
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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




RE: Best Approach for Database Access?

2002-02-12 Thread Thompson, Darryl

Hello Keith,

 In my environment we employ options 2 and 3 but with this little twist:

  3) EJB environment (CMP)
 JSP -> ActionBean -> ( ServiceHelper -->ServiceLocator ) - >
ServiceBean -> DB

The ServiceLocator is a regular Java class that encapsulates all jndi Home
lookup logic, and the ther ServiceHelper is also a regular Java class that
contains methods to
support the business model. All ServiceHelper methods are static and the
Action Class calls these from the appropriate exec(..) method.

We are still trying to get a handle on this framework so if this is in left
field let me know.

Regards,
Darryl

> -Original Message-
> From: Keith Chew [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 2:47 PM
> To:   Struts Users Mailing List
> Subject:  RE: Best Approach for Database Access?
> 
> Hi Paul
> 
> I follow this design practice for both EJB and non-EJB applications. The
> ones marked with * live at the application server JVM.
> 
> (1) Non-EJB environment
> ===
> JSP -> ActionBean -> ServiceBean -> DaoBean -> DB
> 
> (2) EJB environment (BMP or Session)
> 
> JSP -> ActionBean -> * ServiceBean -> * DaoBean -> DB
> 
> (3) EJB environment (CMP)
> =
> JSP -> ActionBean -> * ServiceBean -> DB
> 
> Notes:
> ==
> ActionBeans are the action classes of Struts
> DaoBeans are normal JavaBean classes which knows how to communicate with
> the
> DB, ie all SQL code goes here.
> In (1), you need to take care of transactions on your own.
> The ServiceBean in (1) is a normal JavaBean, but an EJB in (2) and (3)
> In (3), we do not need a Dao, since the CMP does all that work for us.
> 
> Hope this helps
> Keith
> 
> -Original Message-
> From: Paul Idusogie [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 13 February 2002 9:38 a.m.
> To: [EMAIL PROTECTED]
> Subject: Best Approach for Database Access?
> Importance: High
> 
> 
> Could you kindly provide guidance on the best approach to implement
> database
> access.?
> I have encountered various schools of thought in my reading, that suggest
> extracting the business logic and database code from the jsp into a jsp
> bean
> or ejb or servlet.
> 
> Thanks,
> 
> Paul Idusogie
> Technical Architect
> Consulting Services
> Stellent Inc.
>  Golden Triangle Drive
> Eden Prairie, MN 55104
> Desk: 952.656.2755
> Fax: 952.903.2115
> Email: [EMAIL PROTECTED]
> website: http://www.stellent.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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




RE: use of on variable columns and rows?

2002-02-05 Thread Thompson, Darryl

Hello Leo,

Try using the "nested eXtension" (or MonkeyStruts as it is also called) it
could solve your problems...

Best of luck,
Darryl

> -Original Message-
> From: Leo Li [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, December 19, 2001 2:32 PM
> To:   [EMAIL PROTECTED]
> Subject:  use of  on variable columns and rows?
> 
> My application need to display a table with the
> variable column and row.
> I have tried to use nested  but it
> won't work. 
> 
> 
> 
> 
>
>  property="item"/>
>   
>   
> 
> 
> 
> Could someone help me?
> 
> Thanks
> 
> __
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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




RE: Struts IDE

2002-01-03 Thread Thompson, Darryl

Please explain how to configure the window's explorer file extension.
Thanks

> -Original Message-
> From: Chen, Yong [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 4:16 PM
> To:   'Struts Users Mailing List'
> Subject:  RE: Struts IDE
> 
> By combining the opentool external browser support
> http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=17071
> and set your windows explorer's file extension .jsp with Dreamweaver
> UltraDev, you can easily edit the page in dreamweaver from Jbuilder.
> 
> Yong Chen
> 
> 
> -Original Message-
> From: Dan Cancro [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 11:39 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Struts IDE
> 
> 
> Check out Macromedia's Dreamweaver Ultradev.  It has a nifty live data
> mode
> that lets you see the output and work on the source at the same time.
> It's
> also extensible.  I heard that someone wrote an extension for Struts tags
> in
> particular or for jsp tags in general, I can't remember which.  That might
> help out too.  One more thing.  Borland offers a package that somehow
> integrates Utradev into JBuilder, so that might be something else to
> consider.
> 
> Dan
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 20, 2001 6:25 AM
> > To: Struts Users Mailing List
> > Subject: Struts IDE
> > 
> > 
> > Hi,
> > 
> >Are there any IDE which helps the designer to view HTML 
> > pages having
> > struts tags incorporated in it?
> > 
> > (i.e For brevity's sake, only a snippet of the HTML code is 
> > given below
> > 
> > 
> >  > labelProperty="label"/>
> > 
> > 
> > 
> > TIA,
> > 
> > Jerome
> > 
> > 
> > **
> > *
> > Any opinions expressed in this email are those of the 
> > individual and not necessarily those of GamCom Solutions Ltd 
> > (herein after "GamCom") and/or its subsidiaries. This email 
> > and any files transmitted with it, including replies and 
> > forwarded copies (which may contain alterations) subsequently 
> > transmitted from GamCom and/or its subsidiaries, are 
> > confidential and solely for the use of the intended 
> > recipient. If you are not the intended recipient or the 
> > person responsible for delivering to the intended recipient, 
> > be advised that you have received this email in error and 
> > that any use is strictly prohibited; please notify us 
> > immediately and do not disclose, distribute, or retain this 
> > email or any part of it. We believe but do not warrant that 
> > this e-mail and any attachments are virus free. You must 
> > therefore take full responsibility for virus checking. GamCom 
> > and/or its subsidiaries reserve the right to monitor all 
> > email communications through their networks.
> > If you have received this email in error please notify GamCom 
> > by telephone on +44 (0)20 8838 5441 or via email to 
> > [EMAIL PROTECTED] , including a copy of this message.
> > **
> > *
> > 
> > --
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Smart login page

2001-12-04 Thread Darryl Nortje

I'm very new to Struts and the MVC design so if I get this wrong please
everyone let me know. Or rather let Stefano know how to do it. I'll get the
reply.

Stefano, the answetr to your question is 'Yes'. very vague but this is how I
see it working. 

You have two pages A, and B. Flow goes from A to B. Inbetween going from A
to B you have a check to see if user is still logged on, if he is not logged
on your controller servlet show the user the logon page, after success at
logon, the controller servlet knows that it must now show page B. Does this
make sense? Your logon page can be called from multiple parts within your
app.

-Original Message-
From: Stefano Mancarella [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 10:12 AM
To: Struts Users Mailing List
Subject: Smart login page


I'm developing a web application with Struts and I'd like to realize the
following behavior.
When I load a page which requires the user to be logged in, I want to invoke
a login page and, after a successful logon, forward back to the page I had
requested.
I can I realize this?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts-config not found in Websphere 3.5.2 FixPack3

2001-12-03 Thread Darryl Nortje

It's working YEEE HAAA. Jon thanks a million. No idea why it's working
as per my first e-mail that I sent you. But at least now I can debug it and
try to make my own subtle changes to see what happpens, etc etc. as I'm sure
you've noticed I have just gotten into programming and also just gotten into
Struts. Been busy with this for 2 & half weeks now. So great. Thanks again. 

cheers
Darryl

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 12:30 PM
To: 'Struts Users Mailing List'
Subject: RE: struts-config not found in Websphere 3.5.2 FixPack3


Hi Darryl,

It's been some time since I have done any WebSphere work so...

Have you made sure that the permission are OK on the struts-config.xml? Have
you tried changing the config param to read /web/WEB-INF/struts-config.xml?

Jon.

-Original Message-
From: Darryl Nortje [mailto:[EMAIL PROTECTED]] 
Sent: 03 December 2001 07:55
To: 'Struts Users Mailing List'
Subject: RE: struts-config not found in Websphere 3.5.2 FixPack3

Hi Jon, firstly thanks for your replies, and sorry for my late replies.
Rough weekend.
here is the excerp from strutsexample.webapp where the ActionServlet mapping
is specified and then the struts-config.xml parm is specified. Does this
answer your question?


  action
  Action Servlet
  org.apache.struts.action.ActionServlet
  *.do
  true
 
application 
ApplicationResources 
 
 
config 
/WEB-INF/struts-config.xml 
 

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:44 PM
To: 'Struts Users Mailing List'
Subject: RE: struts-config not found in Websphere 3.5.2 FixPack3


Hi,

Have you added the ActionServlet mapping into your .webapp
file? This mapping tells the action servlet where to find struts-config.xml.
If you have the mapping what entry do you have for the config parameter?

Jon Ridgway
www.upco.co.uk


-Original Message-
From: jpablo [mailto:[EMAIL PROTECTED]] 
Sent: 30 November 2001 12:30
To: Struts Users Mailing List
Subject: struts-config not found in Websphere 3.5.2 FixPack3


I'm configuring the Struts Action servlet on WebSphere 3.5.2
with fix pack 3, but I get an exception on startup (because this
server uses loadonstartup). The servlet cant find the
/WEB-INF/struts-config.xml file,

I have the following file:
  /opt/IBMWebAS/hosts/default_host/myapp/web/WEB-INF/struts-config.xml file,
And the documen root of my web application is:
/opt/IBMWebAS/hosts/default_host/myapp/web/

It is ok? Where shold be placed struts-config.xml? IMHO this
config is right.. but not working. Any suggestion or tip will be
really appreciated.


This is a fragment of default_servlet_stdout.log
---cut---
[01.11.30 10:04:39:385 GMT-02:00] e82f28da ServletInstan A SRVE0048I:
Loading servlet: "action"
[01.11.30 10:04:39:885 GMT-02:00] e82f28da WebGroup  A SRVE0091I:
[Servlet LOG]: "action: init" 
[01.11.30 10:04:39:987 GMT-02:00] e82f28da WebGroup  A SRVE0091I:
[Servlet LOG]: "action: Loading application resources from res
ource Cuida2Resources"

[01.11.30 10:04:39:990 GMT-02:00] e82f28da WebGroup  A SRVE0091I:
[Servlet LOG]: "action: Initializing configuration from resour
ce path /WEB-INF/struts-config.xml"

[01.11.30 10:04:40:005 GMT-02:00] e82f28da ServletInstan X Uncaught init()
exception thrown by servlet {0}: {1} 
 "action"

 javax.servlet.UnavailableException: Missing
configuration resource for path /WEB-INF/struts-config.
xml

at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1316) 
---cut---

--
Juan Pablo Villaverde
Tec. en Infraestructura de Redes
Soluciones Punto Com S.A. 
http://www.spcom.com.ar



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

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

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

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

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




RE: problems getting struts example to run

2001-12-03 Thread Darryl Nortje

Hi Jon,

Ja, you were right Jon. I changed the wrong one. Now that it's working can
you tell me at all what was wrong with 
"pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);"
and why 
"pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);" works.

Is something wrong witht he Struts code?

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 12:21 PM
To: 'Struts Users Mailing List'
Subject: RE: problems getting struts example to run


Hi Darryl,

There are to FormTag(s) in different packages. Make sure you have edited the
one in the org.apache.struts.taglib.html package. If Struts is in your VAJ
workspace put a break point in the class to ensure that the WTE is using
this copy when running and not another on your classpath.


Jon.

-Original Message-
From: Darryl Nortje [mailto:[EMAIL PROTECTED]] 
Sent: 03 December 2001 08:12
To: 'Struts Users Mailing List'
Subject: RE: problems getting struts example to run

Hi Jon, I changed the two lines to what you said. I did not make any
difference still got the error
java.lang.IllegalArgumentException: cant remove Attributes from request
scope.

There is something wrong with the Constants.BEAN_KEY. it is either not being
set which I was trying to trace in the FormTag.doStartTag() at the last line
--> pageContext.setAttribute(Constants.BEAN_KEY, bean);

I can't see anything wrong with the way it is setting the attribute, so the
way it is removing the attribute should not be a problem. Any more ideas you
might have would be welcome. I'll keep going on? Thanks again for the
replies.

cheers
Darryl

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:35 PM
To: 'Struts Users Mailing List'
Subject: RE: problems getting struts example to run


Hi,

Change the two lines of code in FormTag.doEndTag that remove attributes from
the request to read:

pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

Jon Ridgway
www.upco.co.uk

-Original Message-
From: Darryl Nortje [mailto:[EMAIL PROTECTED]] 
Sent: 30 November 2001 11:36
To: 'Struts Users Mailing List'
Subject: problems getting struts example to run

I have done my homework. I just cannot get the Struts example to run in
VAJ4.0 using WTE (not WAS). Please can someone help me. the following are
the symptoms.

I type in the url http:/localhost:8080/strutsexample/index.jsp  I then get
to the main page. When I click on the logon url, the following error msg
appears. (-*)

now I managed to trace this down to the doEndTag() method in
org.apache.struts.taglib.FormTag class. When it executes the line
"pageContext.removeAttribute(Constants.BEAN_KEY);" IT CHUCKS THE EXCEPTION.

Thanking you in advance for your help with this. *cos i don't have a clue.

regards
Darryl

-* Error 500
An error has occured while processing
request:http://localhost:8080/strutsexample/logon.jsp
Message: Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope

Target Servlet: jsp
StackTrace: 


Root Error-1: cant remove Attributes from request scope

java.lang.IllegalArgumentException: cant remove Attributes from request
scope
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalArgumentException(java.lang.String)
void
org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String,
int)
int org.apache.struts.taglib.html.FormTag.doEndTag()
void _logon_xjsp._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet
Request, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
java.lang.Throwable, boolean)
void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
voi

RE: When to store files in DB vs. File system

2001-12-03 Thread Darryl Nortje

Hi. 

Everyone is going to tell you that you must store it in the database. The
reason are that in different OS's, there is a limit to how many files you
can store in each directory. (windows i think is 1). I was faced with
this same problem under a time constraint, so never took the time to figure
out how to store the file directly into the database. So i went the a
directory storing route. What I did was Create a directory
root\1\1a\1aa\file.extension like this. Set a limit to the amount of files
in this directory and when that limit was reached incremented the directory
name to root\1\1a\1ab etc etc. And then just stored the directory and
filename in the database and retrieved it like that. I'm pretty sure that
this is not the correct way to do this sort of thing, but it does work. I
will be watching this mail to find out how to do it properly.

-Original Message-
From: Andy Timm [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 9:53 AM
To: [EMAIL PROTECTED]
Subject: When to store files in DB vs. File system


Hello, I am developing a webapp where users need to
store files (<200k).  I am wondering if these should
be stored in the (mysql) database, or in the file
system.  I am concerned about the number of files I
could get in the database (possibility for 20,000+
users, so 100,000 files).  On the other hand, I plan
on replicating my database across multiple servers. 
Do I then also replicate the download of each file, or
run a batch that copies them periodically?  I would
greatly appreciate advice from anyone who has dealt
with these design issues.  Thank you, Andrew Timm

__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: problems getting struts example to run

2001-12-03 Thread Darryl Nortje

Hi Jon, I changed the two lines to what you said. I did not make any
difference still got the error
java.lang.IllegalArgumentException: cant remove Attributes from request
scope.

There is something wrong with the Constants.BEAN_KEY. it is either not being
set which I was trying to trace in the FormTag.doStartTag() at the last line
--> pageContext.setAttribute(Constants.BEAN_KEY, bean);

I can't see anything wrong with the way it is setting the attribute, so the
way it is removing the attribute should not be a problem. Any more ideas you
might have would be welcome. I'll keep going on? Thanks again for the
replies.

cheers
Darryl

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:35 PM
To: 'Struts Users Mailing List'
Subject: RE: problems getting struts example to run


Hi,

Change the two lines of code in FormTag.doEndTag that remove attributes from
the request to read:

pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

Jon Ridgway
www.upco.co.uk

-Original Message-
From: Darryl Nortje [mailto:[EMAIL PROTECTED]] 
Sent: 30 November 2001 11:36
To: 'Struts Users Mailing List'
Subject: problems getting struts example to run

I have done my homework. I just cannot get the Struts example to run in
VAJ4.0 using WTE (not WAS). Please can someone help me. the following are
the symptoms.

I type in the url http:/localhost:8080/strutsexample/index.jsp  I then get
to the main page. When I click on the logon url, the following error msg
appears. (-*)

now I managed to trace this down to the doEndTag() method in
org.apache.struts.taglib.FormTag class. When it executes the line
"pageContext.removeAttribute(Constants.BEAN_KEY);" IT CHUCKS THE EXCEPTION.

Thanking you in advance for your help with this. *cos i don't have a clue.

regards
Darryl

-* Error 500
An error has occured while processing
request:http://localhost:8080/strutsexample/logon.jsp
Message: Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope

Target Servlet: jsp
StackTrace: 


Root Error-1: cant remove Attributes from request scope

java.lang.IllegalArgumentException: cant remove Attributes from request
scope
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalArgumentException(java.lang.String)
void
org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String,
int)
int org.apache.struts.taglib.html.FormTag.doEndTag()
void _logon_xjsp._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet
Request, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
java.lang.Throwable, boolean)
void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
ervletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
equest, javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
rvlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest,
javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
t.ServletRequest, javax.servlet.ServletResponse,
com.ibm.servlet.engine.w

RE: struts-config not found in Websphere 3.5.2 FixPack3

2001-12-03 Thread Darryl Nortje

Hi Jon, firstly thanks for your replies, and sorry for my late replies.
Rough weekend.
here is the excerp from strutsexample.webapp where the ActionServlet mapping
is specified and then the struts-config.xml parm is specified. Does this
answer your question?


  action
  Action Servlet
  org.apache.struts.action.ActionServlet
  *.do
  true
 
application 
ApplicationResources 
 
 
config 
/WEB-INF/struts-config.xml 
 

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:44 PM
To: 'Struts Users Mailing List'
Subject: RE: struts-config not found in Websphere 3.5.2 FixPack3


Hi,

Have you added the ActionServlet mapping into your .webapp
file? This mapping tells the action servlet where to find struts-config.xml.
If you have the mapping what entry do you have for the config parameter?

Jon Ridgway
www.upco.co.uk


-Original Message-
From: jpablo [mailto:[EMAIL PROTECTED]] 
Sent: 30 November 2001 12:30
To: Struts Users Mailing List
Subject: struts-config not found in Websphere 3.5.2 FixPack3


I'm configuring the Struts Action servlet on WebSphere 3.5.2
with fix pack 3, but I get an exception on startup (because this
server uses loadonstartup). The servlet cant find the
/WEB-INF/struts-config.xml file,

I have the following file:
  /opt/IBMWebAS/hosts/default_host/myapp/web/WEB-INF/struts-config.xml file,
And the documen root of my web application is:
/opt/IBMWebAS/hosts/default_host/myapp/web/

It is ok? Where shold be placed struts-config.xml? IMHO this
config is right.. but not working. Any suggestion or tip will be
really appreciated.


This is a fragment of default_servlet_stdout.log
---cut---
[01.11.30 10:04:39:385 GMT-02:00] e82f28da ServletInstan A SRVE0048I:
Loading servlet: "action"
[01.11.30 10:04:39:885 GMT-02:00] e82f28da WebGroup  A SRVE0091I:
[Servlet LOG]: "action: init" 
[01.11.30 10:04:39:987 GMT-02:00] e82f28da WebGroup  A SRVE0091I:
[Servlet LOG]: "action: Loading application resources from res
ource Cuida2Resources"

[01.11.30 10:04:39:990 GMT-02:00] e82f28da WebGroup  A SRVE0091I:
[Servlet LOG]: "action: Initializing configuration from resour
ce path /WEB-INF/struts-config.xml"

[01.11.30 10:04:40:005 GMT-02:00] e82f28da ServletInstan X Uncaught init()
exception thrown by servlet {0}: {1} 
 "action"

 javax.servlet.UnavailableException: Missing
configuration resource for path /WEB-INF/struts-config.
xml

at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1316) 
---cut---

--
Juan Pablo Villaverde
Tec. en Infraestructura de Redes
Soluciones Punto Com S.A. 
http://www.spcom.com.ar



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




problems getting struts example to run

2001-11-30 Thread Darryl Nortje

I have done my homework. I just cannot get the Struts example to run in
VAJ4.0 using WTE (not WAS). Please can someone help me. the following are
the symptoms.

I type in the url http:/localhost:8080/strutsexample/index.jsp  I then get
to the main page. When I click on the logon url, the following error msg
appears. (-*)

now I managed to trace this down to the doEndTag() method in
org.apache.struts.taglib.FormTag class. When it executes the line
"pageContext.removeAttribute(Constants.BEAN_KEY);" IT CHUCKS THE EXCEPTION.

Thanking you in advance for your help with this. *cos i don't have a clue.

regards
Darryl

-* Error 500
An error has occured while processing
request:http://localhost:8080/strutsexample/logon.jsp
Message: Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope

Target Servlet: jsp
StackTrace: 


Root Error-1: cant remove Attributes from request scope

java.lang.IllegalArgumentException: cant remove Attributes from request
scope
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalArgumentException(java.lang.String)
void
org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String,
int)
int org.apache.struts.taglib.html.FormTag.doEndTag()
void _logon_xjsp._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet
Request, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
java.lang.Throwable, boolean)
void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
ervletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
equest, javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
rvlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest,
javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
t.ServletRequest, javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c
om.ibm.servlet.engine.webapp.WebAppRequest,
javax.servlet.http.HttpServletResponse, boolean)
void
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet
.ServletRequest, javax.servlet.ServletResponse, boolean)
void
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Obje
ct)
void
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lan
g.Object)
void
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.S
tring, com.ibm.servlet.engine.srp.ISRPConnection)
void
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.ser
vlet.engine.oselistener.api.IOSEConnection)
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
java.net.Socket)
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()


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




RE: Tiles/Orion(Oracle)

2001-11-02 Thread Darryl Pentz

Hi Cedric,

So is there (was there) a known bug with Orion then? This sounds very much
like the problem I had with Orion where a search form worked the first time,
and then subsequently only returned the page of the first search's results.
The JSP seemed to hang at the  start tag.

Could you please explain what the problem was? I only recently rejoined the
mailing list so I'm not privy to previous discussions. Also, will the latest
Struts nightly build have your fix in it?

thanks,
Darryl

> -Original Message-
> From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
> Sent: 02 November 2001 12:21
> To: Struts Users Mailing List
> Subject: Re: Tiles/Orion(Oracle)
>
>
>
>   Hi,
>
>   Does the "ignore=true  not reset" bug in Orion still remain
> with the latest Tiles distribution ? I think I have corrected it.
> Can someone confirm it ?
>
>   For the Orion problem (submenu failed after second access), I
> am aware of it and will try to correct it asap.
>   A workaround is to set Orion webserver in development mode
> (force it to generate java classes for pages). If you have
> already tested your application, you should force Orion to
> regenerate your java classes. The simplest way is to remove all
> previously generated classes and serialized beans (in
> application-deployments).
>
>   Cedric
>
> Stephen Gissendaner wrote:
>
> > Octavio,
> >
> > I am using tiles with oc4j.
> >
> > the only bug issue that I ran into is that if you have an
>  and you don't pass the item in via
> the  then from the   on all of the
> tiles tags are ignored! Since you are using a submenu, It sounds
> like you may have this issue. (I am assuming that you can get
> basic stuff to work)
> >
> > My work around was to have a  value="/common/blank.jsp"/> in the master  and then
> override it when needed in the extended definitions.
> >
> > Hope that this helps.
> >
> > Stephen W. Gissendaner
> > Senior Application Engineer,
> > EPL
> >
> > -Original Message-
> > From: Otavio C. Decio [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 31, 2001 10:22 AM
> > To: Struts Users Mailing List
> > Subject: Tiles/Orion(Oracle)
> >
> > Hi all,
> >
> > Did anybody successfully installed an ran Tiles on Oracle's
> flavor of Orion? We have a new project starting, I wanted to use
> Tiles but so far I couldn't solve a problem with the submenu. If
> someone got it running, would you please tell me which platform
> and version are you using.
> >
> > Thanks!!
> >
> > Otavio
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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



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




RE: Duplication of Template Files Solution

2001-11-01 Thread Darryl Pentz

Cool. That's interesting. And you mentioned something about being able to
manipulate placement of tiles from within the Action class. How is that
done?

- Darryl

> -Original Message-
> From: Sandeep Takhar [mailto:[EMAIL PROTECTED]]
> Sent: 01 November 2001 18:23
> To: Struts Users Mailing List
> Subject: RE: Duplication of Template Files Solution
>
>
> When I tested it (a very simple test) I used the
> following in the struts-config.xml file:
>
> 
> type="org.apache.struts.example.tiles.test.SandeepTestAction">
>
> 
>
> Here was the tiles definition for the path attribute
> above (it can be any definition):
>
>path="/layout/classicLayout.jsp">
> 
> 
> 
> 
> 
>   
>
> I used the tiles-docs.war file for my testing.
>
> sorry if my cut & paste is all messed up.
>
> - Sandeep
>
>
> --- Darryl Pentz <[EMAIL PROTECTED]> wrote:
> > Sandeep,
> >
> > Can you post an example of a struts-config mapping
> > using Tiles. I tried to
> > use Tiles but couldn't get it to run a page twice.
> > In other words, I had a
> > search function which worked fine the first time
> > with Tiles, but when I
> > changed the search criteria and resubmitted, the
> > Action class ran, but when
> > it forwarded the result to the JSP, the application
> > hung at the insert tag.
> > This is what prompted me to try the inline thing
> > with the original Struts
> > template tags and it worked, without any changes, so
> > I deduced that Tiles is
> > buggy. I'm running Orion on Win2K with a nightly
> > build from about 10 days
> > ago.
> >
> > I didn't know about being able to reference the
> > Tiles definition from the
> > struts-config action mapping, hence my request
> > above.
> >
> > thanks,
> > Darryl
> >
> > > -Original Message-
> > > From: Sandeep Takhar
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: 01 November 2001 18:05
> > > To: Struts Users Mailing List
> > > Subject: Re: Duplication of Template Files
> > Solution
> > >
> > >
> > > man i suck, i did it again.
> > >
> > > finish the thought, than send the mail.
> > >
> > > ok -- what I meant was that unlike what your
> > initial
> > > e-implies: that tiles works exactly like
> > > template-tags, what I meant was that you can
> > create
> > > the duplicate definition in the xml file and than
> > > reference this layout definition/component in the
> > > action forward of a struts-config file.  I like
> > this
> > > solution better because you have clearly defined
> > all
> > > the layouts and are just forwarding to the correct
> > > one.
> > >
> > > This means that you don't need the duplicated jsp
> > > which is a pain to maintain.  So either solution
> > (the
> > > one you described) and this one will get rid of
> > that
> > > duplicate jsp.
> > >
> > > - Sandeep
> > > --- Sandeep Takhar <[EMAIL PROTECTED]>
> > wrote:
> > > > Tiles allows you to do this as well.
> > > >
> > > > btw: I have replied to another reply in this
> > same
> > > > thread about other things I like about tiles.
> > In my
> > > > usual haste I deleted the original message when
> > I
> > > > realized there was something more I wanted to
> > say.
> > > >
> > > > - sandeep
> > > > --- Darryl Pentz <[EMAIL PROTECTED]> wrote:
> > > > > I've discovered quite by accident that the
> > Struts
> > > > > templating framework
> > > > > allows me to eliminate duplication of my JSP
> > pages
> > > > > by simply including the
> > > > > body page inline to the template definition
> > page.
> > > > By
> > > > > this I mean I combine
> > > > > both pages into one as follows:
> > > > >
> > > > > 
> > > > >   
> > > > >   
> > > > >   
> > > > >
> > > > >   ... BODY HTML GOES HERE ...
> > > > >
> > > > >   
> > > > > 
> > > > >
> > > > > I'd previously enquired on this list how I
> > could
> > > > > eliminate the dupli

RE: Duplication of Template Files Solution

2001-11-01 Thread Darryl Pentz

Sandeep,

Can you post an example of a struts-config mapping using Tiles. I tried to
use Tiles but couldn't get it to run a page twice. In other words, I had a
search function which worked fine the first time with Tiles, but when I
changed the search criteria and resubmitted, the Action class ran, but when
it forwarded the result to the JSP, the application hung at the insert tag.
This is what prompted me to try the inline thing with the original Struts
template tags and it worked, without any changes, so I deduced that Tiles is
buggy. I'm running Orion on Win2K with a nightly build from about 10 days
ago.

I didn't know about being able to reference the Tiles definition from the
struts-config action mapping, hence my request above.

thanks,
Darryl

> -Original Message-
> From: Sandeep Takhar [mailto:[EMAIL PROTECTED]]
> Sent: 01 November 2001 18:05
> To: Struts Users Mailing List
> Subject: Re: Duplication of Template Files Solution
>
>
> man i suck, i did it again.
>
> finish the thought, than send the mail.
>
> ok -- what I meant was that unlike what your initial
> e-implies: that tiles works exactly like
> template-tags, what I meant was that you can create
> the duplicate definition in the xml file and than
> reference this layout definition/component in the
> action forward of a struts-config file.  I like this
> solution better because you have clearly defined all
> the layouts and are just forwarding to the correct
> one.
>
> This means that you don't need the duplicated jsp
> which is a pain to maintain.  So either solution (the
> one you described) and this one will get rid of that
> duplicate jsp.
>
> - Sandeep
> --- Sandeep Takhar <[EMAIL PROTECTED]> wrote:
> > Tiles allows you to do this as well.
> >
> > btw: I have replied to another reply in this same
> > thread about other things I like about tiles.  In my
> > usual haste I deleted the original message when I
> > realized there was something more I wanted to say.
> >
> > - sandeep
> > --- Darryl Pentz <[EMAIL PROTECTED]> wrote:
> > > I've discovered quite by accident that the Struts
> > > templating framework
> > > allows me to eliminate duplication of my JSP pages
> > > by simply including the
> > > body page inline to the template definition page.
> > By
> > > this I mean I combine
> > > both pages into one as follows:
> > >
> > > 
> > >   
> > >   
> > >   
> > >
> > >   ... BODY HTML GOES HERE ...
> > >
> > >   
> > > 
> > >
> > > I'd previously enquired on this list how I could
> > > eliminate the duplication
> > > of the pages where the main body HTML exists in a
> > > separate JSP page that is
> > > simply referred to from the definition file i.e.
> > >  > > content="/blah/blah/body.jsp"/>. Strangely nobody
> > > responded with the above
> > > solution so I'm wondering is this simply a
> > > side-effect of the PutTag class
> > > or Craig, did you intend for it to work this way?
> > > I'm quite surprised I
> > > haven't seen this technique used in any of the
> > > examples. Rather, the
> > > duplication is suggested. The new Tiles extension
> > > allows the above which
> > > prompted me to try it with the Struts template tag
> > > library just for grins,
> > > and it worked!
> > >
> > > Is there a problem with doing it inline like I
> > > illustrate above? I looked at
> > > the source code and I see the PutTag class does
> > > extend BodyTagSupport so
> > > everything should work fine. So far, the stuff
> > I've
> > > played around with seems
> > > to work fine with no problems.
> > >
> > > Any feedback would be appreciated.
> > >
> > > thanks,
> > > Darryl Pentz
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > __
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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




RE: Problem with Struts and Weblogic 6.1 SP1

2001-11-01 Thread Darryl Pentz

I last worked with Weblogic at v5.2 so bear that in mind with my comments.

WL has 2 classpaths... one for itself, the application server, and one for
the applications it runs. My guess is that you DO need to include struts.jar
in the classpath for WL since the servlet is installed before WL looks at
the WAR file.

thanks,
Darryl

> -Original Message-
> From: Jeff Mikres [mailto:[EMAIL PROTECTED]]
> Sent: 01 November 2001 08:01
> To: [EMAIL PROTECTED]
> Subject: Problem with Struts and Weblogic 6.1 SP1
>
>
> I'm having problems running a sample application that a basic JSP with
> struts tags that causes a POST to the actionservlet, using an ActionForm
> subclass and an Action subclass.  What I'm getting is a
> NoClassDefFoundError
> saying basically that it can't find org.apache.Struts.action.ActionForm
> class.  I have read all the posts that you must have the struts.jar in the
> WEB-INF/lib directory in your .WAR file, so this is not the problem.  In
> addition, I do not have the struts.jar in the weblogic classpath.  When my
> app is loaded when I start weblogic server I can see that ActionServlet is
> initialized so it must know where the struts.jar file is
> (WEB-INF/lib).  Any
> help with this would be greatly appreciated.  I've got Struts 1.0
> installed,
> running on Win2k with WebLogic SP1.
>
> Regards,
>
> J Mikres
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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




Duplication of Template Files Solution

2001-11-01 Thread Darryl Pentz

I've discovered quite by accident that the Struts templating framework
allows me to eliminate duplication of my JSP pages by simply including the
body page inline to the template definition page. By this I mean I combine
both pages into one as follows:






... BODY HTML GOES HERE ...




I'd previously enquired on this list how I could eliminate the duplication
of the pages where the main body HTML exists in a separate JSP page that is
simply referred to from the definition file i.e. . Strangely nobody responded with the above
solution so I'm wondering is this simply a side-effect of the PutTag class
or Craig, did you intend for it to work this way? I'm quite surprised I
haven't seen this technique used in any of the examples. Rather, the
duplication is suggested. The new Tiles extension allows the above which
prompted me to try it with the Struts template tag library just for grins,
and it worked!

Is there a problem with doing it inline like I illustrate above? I looked at
the source code and I see the PutTag class does extend BodyTagSupport so
everything should work fine. So far, the stuff I've played around with seems
to work fine with no problems.

Any feedback would be appreciated.

thanks,
Darryl Pentz


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




Tiles Problem

2001-10-28 Thread Darryl Pentz

Hi all,

I sent this email yesterday but it doesn't seem to have gotten through to 
the list, so I'm resending. Basically, I have a problem with Tiles execution 
of templates (components). I'm using the design where the main body of the 
page is inline to the  tag. In other words. I have:


   
   
   

   ... main body HTML here ...

   


This helps me eliminate the need for duplication of the pages. I thought it 
was working fine when I got the first page of my search page functionality 
to work. However when I re-run the search, the page simply redisplays the 
results of the first search, even though the Struts Action class correctly 
goes off and retrieves the results of the second search and places the 
result in the session.

I placed a simple <% System.out.println("Top of page reached."); %> above 
the insert tag and it is displayed on the console on the search retry, so it 
seems like somethings hanging trying to execute the template tags for the 
second time. One time, in frustration, I hit the 'Search' button numerous 
times, and when I Ctrl-C'ed the app server, a whole bunch of 'Connection 
reset by peer' stack traces appeared before the app server shut down, 
indicating that my requests were waiting somewhere. Where? I don't know.

So if someone has some idea where things might be going wrong, I'd 
appreciate any pointers. Cedric? Is there something in my code I should look 
for. It's not hanging at a point that it could be due to my code having a 
threadlock so I'm confused.

thanks in advance,
Darryl Pentz

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




Tiles Problem

2001-10-27 Thread Darryl Pentz

Hi All,

I'm having a problem using Tiles (nightly build of Struts). Cedric, I don't 
know if you'd perhaps be able to give me a suggestion.

I'm using a template and including the main body of the page inline, i.e. 
within the  tag. So I have a number of tags as 
follows:







... main body HTML here ..



In the backend Struts classes I trace the objects activity to see what's 
going on. When I do a search the first time, the page redisplays with a list 
of search results. However, if I do another search, the page simply 
redisplays the first search results, no matter what I input. However, 
looking at the trace, the system is performing the search successfully. It 
seems however that after the first search, and results display, when a 
second search is performed and the system does a findForward() back to the 
results page, the JSP execution goes awry at the first insert tag and just 
hangs... it doesn't return. I know this because I inserted a simple <% 
System.out.println("At start of page"); %> before the  
tag and this shows up on the console, but the results don't show on the 
browser... or at least, not the correct results, even though they are 
correctly retrieved. Sorry, I'm repeating myself just so I'm not ambiguous 
about anything I've explained about the problem.

One other clue is that when I got frustrated one time and hit the Search 
button a number of times, and then hit Ctrl-C to kill my appserver, the 
server suddenly spewed out a bunch of stack traces indicating connection 
reset by peer. So it seems like all my requests were queued somewhere 
waiting for a JSP resource or something to be released or something of that 
nature, but I'm not sure where.

Anyway, any help will be appreciated. I really like using the design above 
because it prevents me from having to duplicate all my template definitions 
and the main body pages and just combine them into one page.

regards,
Darryl Pentz

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: File Upload Problem

2001-06-26 Thread Darryl Pentz

Just to confirm to the NG that we do seem to have a problem with the way
that org.apache.struts.upload.MultipartIterator.java does the
createLocalFile(). I've tested this quite a bit today and have found that
Struts-b1 worked fine with this spreadsheet. Thereafter, the
createLocalFile() was COMPLETELY redesigned and it's also with this redesign
that the spreadsheet gets corrupted.

The change fixed the problem some found uploading ZIP files (including
myself) but this new problem persists.

thanks,
Darryl

-Original Message-----
From: Darryl Pentz [mailto:[EMAIL PROTECTED]]
Sent: 26 June 2001 13:47
To: [EMAIL PROTECTED]
Subject: RE: File Upload Problem


That's just it. We HAVE upgraded to Struts 1.0 final. This fixed a problem
we were having with ZIP files but now it seems we can't view spreadsheets
and documents that are successfully uploaded. In other words, they do upload
fine, but when you try and view them, Excel can't open them up.

- Darryl

-Original Message-
From: Krueger, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 26 June 2001 13:22
To: [EMAIL PROTECTED]
Subject: RE: File Upload Problem


I just got done fighting this problem for the last week.  Upgrade to struts
1.0 and that will solve your problem.

Jeff Krueger


-Original Message-
From: Darryl Pentz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 4:38 AM
To: [EMAIL PROTECTED]
Subject: File Upload Problem


Hi all,

Has anyone else experienced problems with the file upload lately? I'm
finding that uploaded files are being corrupted. It doesn't seem to matter
what type the document is. I've found an Excel spreadsheet and a Word
document that have displayed problems. It seems, doing a binary compare,
that a 0A is being inserted arbitrarily. I'm looking at
MultipartIterator.java as the possible culprit as that's where a 0A ('\n')
is being inserted.

If anyone can point out the error of my ways I'd appreciate it. I don't know
why we're only finding this problem now since we've been testing uploads
regularly. Unless it has to do with the fixes in 1.0 final that maybe broke
something. I'm a little out of my depth here since I'm still fairly new to
the intricacies of Struts.

thanks,
Darryl





RE: File Upload Problem

2001-06-26 Thread Darryl Pentz

That's just it. We HAVE upgraded to Struts 1.0 final. This fixed a problem
we were having with ZIP files but now it seems we can't view spreadsheets
and documents that are successfully uploaded. In other words, they do upload
fine, but when you try and view them, Excel can't open them up.

- Darryl

-Original Message-
From: Krueger, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 26 June 2001 13:22
To: [EMAIL PROTECTED]
Subject: RE: File Upload Problem


I just got done fighting this problem for the last week.  Upgrade to struts
1.0 and that will solve your problem.

Jeff Krueger


-Original Message-----
From: Darryl Pentz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 4:38 AM
To: [EMAIL PROTECTED]
Subject: File Upload Problem


Hi all,

Has anyone else experienced problems with the file upload lately? I'm
finding that uploaded files are being corrupted. It doesn't seem to matter
what type the document is. I've found an Excel spreadsheet and a Word
document that have displayed problems. It seems, doing a binary compare,
that a 0A is being inserted arbitrarily. I'm looking at
MultipartIterator.java as the possible culprit as that's where a 0A ('\n')
is being inserted.

If anyone can point out the error of my ways I'd appreciate it. I don't know
why we're only finding this problem now since we've been testing uploads
regularly. Unless it has to do with the fixes in 1.0 final that maybe broke
something. I'm a little out of my depth here since I'm still fairly new to
the intricacies of Struts.

thanks,
Darryl




File Upload Problem

2001-06-26 Thread Darryl Pentz

Hi all,

Has anyone else experienced problems with the file upload lately? I'm
finding that uploaded files are being corrupted. It doesn't seem to matter
what type the document is. I've found an Excel spreadsheet and a Word
document that have displayed problems. It seems, doing a binary compare,
that a 0A is being inserted arbitrarily. I'm looking at
MultipartIterator.java as the possible culprit as that's where a 0A ('\n')
is being inserted.

If anyone can point out the error of my ways I'd appreciate it. I don't know
why we're only finding this problem now since we've been testing uploads
regularly. Unless it has to do with the fixes in 1.0 final that maybe broke
something. I'm a little out of my depth here since I'm still fairly new to
the intricacies of Struts.

thanks,
Darryl




RE: problems with dbtags any suggestions!!

2001-06-12 Thread Darryl Pentz



It looks like 
your driver class file isn't in the CLASSPATH for your application server. Check 
that the JAR file for the PostgreSQL drivers is in the app server 
classpath.
 
- 
Darryl

  -Original 
  Message-From: Chuck Amadi 
  [mailto:[EMAIL PROTECTED]]Sent: 12 June 2001 
  16:04To: [EMAIL PROTECTED]Subject: problems 
  with dbtags any suggestions!! Hi , can anyone 
  desiphon this error message i have explored all the config's ie 
  tld's, xml and declartions.Any suggestions .The jsp in questions 
  as below not that i have exstablished a connection but the package was 
  beaneath my tomcat container /WEB-INF.as opposed to my struts-bbnpa 
  (web app).  Cheers Chuck     
  Error: 500 Location: /struts-bbnpa/dbtest.jsp Internal Servlet 
  Error: javax.servlet.ServletException: Driver class 
  'org.postgresql.Driver' not found 
  <%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" 
  prefix="sql" %>  
  dbtest 
   
  Opening connection to PostgreSql  
  <%-- open database connction--%>  
     
  jdbc:postgresql://172.16.1.15/test1   
  org.postgresql.Driver   
  chucka   


      select firstname, lastname, department from employee_1 
  order by 1      <%-- loop through 
  the rows of your query--%>  
   
   
  [no 
  description]  
   <%-- close a database connection --%> 


  -- The views expressed by the sender of this message don't 
  necessarily represent those of Brecon Beacons National Park Authority. 
  This message is intended for the addressee(s) only and is sent in 
  confidence; if you receive it in error, please can you let us know (at 
  [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir 
  gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc 
  Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y 
  derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych 
  yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni 
  (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.   



RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Darryl Pentz

Jonathan,

I don't think you understand... they're NECESSARY... but evil if you
disagree, you're obviously not married.  :)

Sorry, now I'm clogging up the list. Just joking naturally, for all the
ladies on the list.

- Darryl

-Original Message-
From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 14:50
To: [EMAIL PROTECTED]
Subject: Re: Handling Multipart forms (sort of Wizard)


Darryl, you need to get away from the pc a little more
;^>

- Original Message -
From: "Darryl Pentz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 6:19 AM
Subject: RE: Handling Multipart forms (sort of Wizard)


> Thanks, that'll be great. Look forward to the post. Ditto on
> documentation... one of those necessary evils in life you know,
> like women. ;)
>
> -Original Message-
> From: Andrew Steady [mailto:[EMAIL PROTECTED]]
> Sent: 12 June 2001 12:09
> To: [EMAIL PROTECTED]
> Subject: RE: Handling Multipart forms (sort of Wizard)
>
>
> Hi,
>
> I'm working on the documentation now and feel it would only be fair to
> contribute some of these diagrams back to the struts community. It will
> probably take me a couple of days to get it sorted though. I hate
> documentation, grg.
>
> Cheers,
>
> Andy S
>
> p.s. I think it has more to do with my style of writing than your lack of
> smartness - did I mention that I hate documentation?
>
>
>
>
> [EMAIL PROTECTED] on 12/06/2001 11:09:16
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
> Subject:  RE: Handling Multipart forms (sort of Wizard)
>
>
>
>
> This sounds like a very elegant though sophisticated design. Any way you
> could post some diagrams or something? I don't know, GIF's of object
models
> etc. Or is there a URL you could direct us to?
> Just curious because I wasn't smart enough to understand everything from
> your description.
> - Darryl
> -Original Message-
> From: Andrew Steady [mailto:[EMAIL PROTECTED]]
> Sent: 12 June 2001 11:34
> To: [EMAIL PROTECTED]
> Cc: Ben Radford
> Subject: RE: Handling Multipart forms (sort of Wizard)
>
> Hi,
> Our solution, using struts, is a mutli-page and multi-channel solution.
> It works on the principle of page numbers and has only one action per
> wizard regardless of the number of pages involved.
> There is a base class form which has a validate method that can validate
> any form in a generic method, validating only the fields on the current
> page, and after completion  of the wizard does a "finalValidate" check to
> make sure nothing remained unvalidated (this is necassary due to the
> dynamic way in which the page by page validation is executed). In our
> system we have a data dictionary most fields represent a field in the data
> dictionary - this link to the data dictionary which performs the
validation
> for that particular type of field e.g. a PostCode validator. The data
> dictionary also returns the possible values for fields which are of a
> select variety - the labels are then looked up based on the current
> language, the field type and the value. If a field is not representing a
> data dictionary member a localValidator must be written in the form object
> name e.g. validatePostCode. CrossFieldValidations are executed in a
similar
> manner and we have added functionality to ensure crossFieldValidations are
> run at the correct time (one of the tough bits!).
> The base class Form (which extends ActionForm) is then subclassed, one per
> wizard, the member field objects are defined in the initialise method, the
> fields have objects which have attributes and methods as necassary to
> complete the functionality. The getters and setters in the wizard form
> fetch the correct field from the collection and set/get the value to
return
> to the struts tag libraries/other code.
> Each form is then sublassed once per channel (Wap, HTML and iDTV - all of
> which we have working). The subclass specifies to the field objects which
> page each field is on for that particular channel, this enables the
> validation to work correctly and also means business validation errors
from
> the EJB container after wizard completion and submission can be directed
to
> the correct page for display. The sublassed channel specific form can add
> extra fields and specify which page they lie on (or set a field to be
> internal). An example of this is that the base class of a transaction may
> contain a single date field. On the Web channel this is actually 3 fields
> (day, month, year) on the Wap channel this is just a selection of
> today/tomorrow etc. A

RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Darryl Pentz

Thanks, that'll be great. Look forward to the post. Ditto on
documentation... one of those necessary evils in life you know,
like women. ;)

-Original Message-
From: Andrew Steady [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 12:09
To: [EMAIL PROTECTED]
Subject: RE: Handling Multipart forms (sort of Wizard)


Hi,

I'm working on the documentation now and feel it would only be fair to
contribute some of these diagrams back to the struts community. It will
probably take me a couple of days to get it sorted though. I hate
documentation, grg.

Cheers,

Andy S

p.s. I think it has more to do with my style of writing than your lack of
smartness - did I mention that I hate documentation?




[EMAIL PROTECTED] on 12/06/2001 11:09:16

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  RE: Handling Multipart forms (sort of Wizard)




This sounds like a very elegant though sophisticated design. Any way you
could post some diagrams or something? I don't know, GIF's of object models
etc. Or is there a URL you could direct us to?
Just curious because I wasn't smart enough to understand everything from
your description.
- Darryl
-Original Message-
From: Andrew Steady [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 11:34
To: [EMAIL PROTECTED]
Cc: Ben Radford
Subject: RE: Handling Multipart forms (sort of Wizard)

Hi,
Our solution, using struts, is a mutli-page and multi-channel solution.
It works on the principle of page numbers and has only one action per
wizard regardless of the number of pages involved.
There is a base class form which has a validate method that can validate
any form in a generic method, validating only the fields on the current
page, and after completion  of the wizard does a "finalValidate" check to
make sure nothing remained unvalidated (this is necassary due to the
dynamic way in which the page by page validation is executed). In our
system we have a data dictionary most fields represent a field in the data
dictionary - this link to the data dictionary which performs the validation
for that particular type of field e.g. a PostCode validator. The data
dictionary also returns the possible values for fields which are of a
select variety - the labels are then looked up based on the current
language, the field type and the value. If a field is not representing a
data dictionary member a localValidator must be written in the form object
name e.g. validatePostCode. CrossFieldValidations are executed in a similar
manner and we have added functionality to ensure crossFieldValidations are
run at the correct time (one of the tough bits!).
The base class Form (which extends ActionForm) is then subclassed, one per
wizard, the member field objects are defined in the initialise method, the
fields have objects which have attributes and methods as necassary to
complete the functionality. The getters and setters in the wizard form
fetch the correct field from the collection and set/get the value to return
to the struts tag libraries/other code.
Each form is then sublassed once per channel (Wap, HTML and iDTV - all of
which we have working). The subclass specifies to the field objects which
page each field is on for that particular channel, this enables the
validation to work correctly and also means business validation errors from
the EJB container after wizard completion and submission can be directed to
the correct page for display. The sublassed channel specific form can add
extra fields and specify which page they lie on (or set a field to be
internal). An example of this is that the base class of a transaction may
contain a single date field. On the Web channel this is actually 3 fields
(day, month, year) on the Wap channel this is just a selection of
today/tomorrow etc. As each page is submitted a method on the channel
specific sublass called mapData is called - in the Web channel this maps
the 3 fields into the 1 date field, on the Wap channel it maps todays date
or tomorrows date into the base class single date field. The validation is
then run and any errors are displayed by including the error tag to the
base class date field (although a mapError method could be called to map it
to the year field in the web channel etc.). When a form is prepopulated
from stored records before the user begins to complete it a mapInitialData
method is called - in the web channel this would pre-populate the
day/month/year fields based upon the date value in the base class - the
reverse of mapData. We have many more obscure mappings as well as simple
date ones.
There is an ActionMapping per channel for each transaction and as well as
having keys for when the Action has completed such as success, home, error
also have entries, one per page of the wizard like this . Using this we have
host of methods on the form (although these might be better located on an
ActionMapping sublass) which are a

RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Darryl Pentz

This sounds like a very elegant though sophisticated design. Any way you
could post some diagrams or something? I don't know, GIF's of object models
etc. Or is there a URL you could direct us to?

Just curious because I wasn't smart enough to understand everything from
your description.

- Darryl

-Original Message-
From: Andrew Steady [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 11:34
To: [EMAIL PROTECTED]
Cc: Ben Radford
Subject: RE: Handling Multipart forms (sort of Wizard)


Hi,

Our solution, using struts, is a mutli-page and multi-channel solution.

It works on the principle of page numbers and has only one action per
wizard regardless of the number of pages involved.

There is a base class form which has a validate method that can validate
any form in a generic method, validating only the fields on the current
page, and after completion  of the wizard does a "finalValidate" check to
make sure nothing remained unvalidated (this is necassary due to the
dynamic way in which the page by page validation is executed). In our
system we have a data dictionary most fields represent a field in the data
dictionary - this link to the data dictionary which performs the validation
for that particular type of field e.g. a PostCode validator. The data
dictionary also returns the possible values for fields which are of a
select variety - the labels are then looked up based on the current
language, the field type and the value. If a field is not representing a
data dictionary member a localValidator must be written in the form object
name e.g. validatePostCode. CrossFieldValidations are executed in a similar
manner and we have added functionality to ensure crossFieldValidations are
run at the correct time (one of the tough bits!).

The base class Form (which extends ActionForm) is then subclassed, one per
wizard, the member field objects are defined in the initialise method, the
fields have objects which have attributes and methods as necassary to
complete the functionality. The getters and setters in the wizard form
fetch the correct field from the collection and set/get the value to return
to the struts tag libraries/other code.

Each form is then sublassed once per channel (Wap, HTML and iDTV - all of
which we have working). The subclass specifies to the field objects which
page each field is on for that particular channel, this enables the
validation to work correctly and also means business validation errors from
the EJB container after wizard completion and submission can be directed to
the correct page for display. The sublassed channel specific form can add
extra fields and specify which page they lie on (or set a field to be
internal). An example of this is that the base class of a transaction may
contain a single date field. On the Web channel this is actually 3 fields
(day, month, year) on the Wap channel this is just a selection of
today/tomorrow etc. As each page is submitted a method on the channel
specific sublass called mapData is called - in the Web channel this maps
the 3 fields into the 1 date field, on the Wap channel it maps todays date
or tomorrows date into the base class single date field. The validation is
then run and any errors are displayed by including the error tag to the
base class date field (although a mapError method could be called to map it
to the year field in the web channel etc.). When a form is prepopulated
from stored records before the user begins to complete it a mapInitialData
method is called - in the web channel this would pre-populate the
day/month/year fields based upon the date value in the base class - the
reverse of mapData. We have many more obscure mappings as well as simple
date ones.

There is an ActionMapping per channel for each transaction and as well as
having keys for when the Action has completed such as success, home, error
also have entries, one per page of the wizard like this . Using this we have
host of methods on the form (although these might be better located on an
ActionMapping sublass) which are all used in a completely generic and
centralised way (in the ActionClass we created by extending the Action
class) page flow is controlled using methods such as getCurrentPage,
getNextPage, isLastPage, getNextPageActionForward, etc etc.

The benefits of this design are that no matter what channel is running, you
can be sure that a transaction will always be validated in one way and be
represented by one form. If the channel has a different way of completing
the same form, but to the same end, all you need to do is model the
differences in a subclass. This means extra channels can be added
*extremely* quickly, as all that needs to be created is an ActionMapping
and small Form subclass per transaction. Another benefit is that all page
flow is controlled only by data from the ActionMappings and only via
generic methods in base classes - so there will never be any hunting around
looking for hidden directives. Also all valida

RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Darryl Pentz

I think you're making things far too complicated. Read the note I posted a
little while ago.

- Darryl

-Original Message-
From: Victor Chai [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 10:26
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Handling Multipart forms (sort of Wizard)


Michael,

Regarding your proposed solution#2, design a mother
form bean that contains three child form beans. in
that case how the child form bean will be
instantiated?

and will these child form beans auto collect data
submited by users?

Rgds,
Victor


--- Michael Mok <[EMAIL PROTECTED]> wrote: >
Sandeep
>
> Let me try. See if the solution proposed makes sense
> as the techniques were
> discussed before.
>
> 1) Include a "PageNumber" attribute into your Form
> bean. In your JSP, store
> the PageNumber as a hidden attribute. In your
> form.validate() method,
> determine which page is passed then validate the
> appropriate fields. For
> this to work, you will need maintain your form bean
> in the session object
> (ie set the scope in your struts-config.xml file).
>
> 2) Create three form beans (ie one for each JSP) and
> create a "mother" bean
> that has all the attributes of the three form beans.
> In this case, each form
> beans can perform its validate method() and the form
> action class can copy
> each form properties to the "mother" bean using
> PropertyUtil.copyProperty
> method. Note you will need to store the "mother"
> bean into the session
> object.
>
> Regards
>
> Michael Mok
> www.webappcabaret.com/normad
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 12 June 2001 15:32
> To: [EMAIL PROTECTED]
> Subject: Handling Multipart forms (sort of Wizard)
>
>
>
>
>
> Hello All,
>
> I am using mulipart forms for adding an employee
> information.
> In this I have 3 forms namely, emplEducation,
> emplExperience, emplGeneral in
> separate JSPs.
> In this case, I am using only one form bean for all
> these JSPs and only one
> action class.
>
> My problem is how to validate the Form bean after
> each page submission:
>

> 
>
> I know the validation can be done in the form bean
> using validate() method
> or in
> the action class
>
> But, if user filled emplEducation form and press
> "Next", to go to
> emplExperience,
> how do I validate only those form bean fields
> related to emplEducation and
> not
> the others till they are entered by user??
> Is there any straight forward strategy for handling
> this??
>
> - Sandeep
>
>
>
>
>
>
>
>
>
>


__
Do You Yahoo!?
Yahoo! Greetings - Send dad a Father's Day Card!
http://greetings.yahoo.com.sg/




RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Darryl Pentz

Well I don't know if this is conventional, but what I've done is to add an
attribute to the form, say 'action', and to add action as a hidden field in
the form. Then assign it a different value on each form... in your case
maybe 'education', 'experience' and 'general'.



Then in your validate() method check what the action field is set to and
only validate the fields on that form.

Simple.

- Darryl

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 09:32
To: [EMAIL PROTECTED]
Subject: Handling Multipart forms (sort of Wizard)





Hello All,

I am using mulipart forms for adding an employee information.
In this I have 3 forms namely, emplEducation, emplExperience, emplGeneral in
separate JSPs.
In this case, I am using only one form bean for all these JSPs and only one
action class.

My problem is how to validate the Form bean after each page submission:



I know the validation can be done in the form bean using validate() method
or in
the action class

But, if user filled emplEducation form and press "Next", to go to
emplExperience,
how do I validate only those form bean fields related to emplEducation and
not
the others till they are entered by user??
Is there any straight forward strategy for handling this??

- Sandeep














RE: File Upload Corrupting Zip File

2001-06-11 Thread Darryl Pentz

The file it errors out on is an image .GIF file. The ZipException is:

java.util.zip.ZipException: invalid entry size (expected 18861 but got 18862
bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:355)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:144)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:93)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:71)
at com.wellcert.util.ZipUtil.listEntries(ZipUtil.java:105)

so it's throwing an extra byte in there during the upload. Unfortunately I'm
working on Win2000 right now and my DOS fc utility doesn't do a good job of
telling me what the errant byte is. Basically I know it's exactly one byte
longer.

thanks for any help,
Darryl

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: 10 June 2001 06:43
To: [EMAIL PROTECTED]
Subject: Re: File Upload Corrupting Zip File


Do you have a binary diff utility that you could use to see what changed in
the uploaded file? That would be very helpful.

Also, if you can tell me how many bytes were added to the file, and what
type of file it was that caused the problem, that might help too.

Thanks.

--
Martin Cooper


- Original Message -
From: "Darryl Pentz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 7:31 AM
Subject: File Upload Corrupting Zip File


> Hi all,
>
> Something happens to corrupt a file I'm uploading from a multipart form.
If
> I run a ZIP file through my unzip utility targeting the actual ZIP file,
it
> unzips just fine. If I point my unzip utility at the temporary file in the
> deployments temp directory of Orion Server (the app server I'm using), the
> utility fails with a ZipException indicating it expected x bytes but got
x+
> bytes on one of the zip entries.
>
> I did the same with WinZip and it worked on the original ZIP and also
failed
> on the uploaded temp file. It seems to me that the problem most likely
lies
> with Struts, particularly the DiskMultipartRequestHandler.java but there's
> nothing in there that appears suspicious. Does anyone have any insight on
> this or has anyone perhaps had this same problem?
>
> Interestingly though, I unzipped the file, removed the entry that was
> causing the problem, rezipped it and everything worked fine. That doesn't
> however exonerate Struts however, since both my zip utility AND WinZip
> worked on the original ZIP. The problem only occurs after Struts has
> uploaded the file.
>
> Here is the output that WinZip gave me when it failed to unzip the temp
> file:
>
> Extracting to "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\"
> Use Path: no   Overlay Files: yes
> warning
>
[C:/orion/application-deployments/wellcert/wellcert-web/temp/strts34531.tmp]
> :  extra 1 bytes at beginning or within Zip file (attempting to process
> anyway)
> Error in file #1:  bad Zip file offset (Error local header signature not
> found):  409756
> (attempting to re-compensate)
> Extracting Image36.gif
> Error: unexpected end of file encountered
> Error:  invalid compressed data to inflate
>
> thanks in advance,
> Darryl Pentz
>






File Upload Corrupting Zip File

2001-06-08 Thread Darryl Pentz

Hi all,

Something happens to corrupt a file I'm uploading from a multipart form. If
I run a ZIP file through my unzip utility targeting the actual ZIP file, it
unzips just fine. If I point my unzip utility at the temporary file in the
deployments temp directory of Orion Server (the app server I'm using), the
utility fails with a ZipException indicating it expected x bytes but got x+
bytes on one of the zip entries.

I did the same with WinZip and it worked on the original ZIP and also failed
on the uploaded temp file. It seems to me that the problem most likely lies
with Struts, particularly the DiskMultipartRequestHandler.java but there's
nothing in there that appears suspicious. Does anyone have any insight on
this or has anyone perhaps had this same problem?

Interestingly though, I unzipped the file, removed the entry that was
causing the problem, rezipped it and everything worked fine. That doesn't
however exonerate Struts however, since both my zip utility AND WinZip
worked on the original ZIP. The problem only occurs after Struts has
uploaded the file.

Here is the output that WinZip gave me when it failed to unzip the temp
file:

Extracting to "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\"
Use Path: no   Overlay Files: yes
warning
[C:/orion/application-deployments/wellcert/wellcert-web/temp/strts34531.tmp]
:  extra 1 bytes at beginning or within Zip file (attempting to process
anyway)
Error in file #1:  bad Zip file offset (Error local header signature not
found):  409756
(attempting to re-compensate)
Extracting Image36.gif
Error: unexpected end of file encountered
Error:  invalid compressed data to inflate

thanks in advance,
Darryl Pentz




Dynamic Error Messages

2001-05-04 Thread Darryl

I can't figure out how to return dynamic error messages in the ActionErrors 
collection. In other words, if an exception is thrown in an
Action object, I want to use the e.getMessage() to get the message description and use 
that to populate an ActionError. The ActionError
class doesn't seem to have a constructor that supports this. Help!

- Darryl




Re: Session invalidate()

2001-04-24 Thread Darryl

Sorry all. Please ignore my previous post. My assumptions were completely
wrong. You can use invalidate() since mapping variables are in application
scope, and in fact I had already put an invalidate() in my code which was
why the second invalidate() I added was throwing an exception.  Sorry
about the brainfart.

- Darryl

Darryl wrote:

> Hi all,
>
> Quick question about session.invalidate(). I created a login management
> framework that works fine but for one problem. When I introduce the
> session.invalidate() command for when the user logs out, naturally, all
> the Struts-required beans in the session are destroyed so a
> mapping.findforward("success") will also, naturally, fail.
>
> Given these obvious consequences, surely someone out there has dealt
> with this before. How does one invalidate a session without hozing all
> your Struts objects placed in the session... or better put, how does
> Struts implement session invalidation.
>
> thanks,
> Darryl
>
> P.S. I did search the archived messages that I have but couldn't find
> anything dealing with this topic.




Session invalidate()

2001-04-24 Thread Darryl

Hi all,

Quick question about session.invalidate(). I created a login management
framework that works fine but for one problem. When I introduce the
session.invalidate() command for when the user logs out, naturally, all
the Struts-required beans in the session are destroyed so a
mapping.findforward("success") will also, naturally, fail.

Given these obvious consequences, surely someone out there has dealt
with this before. How does one invalidate a session without hozing all
your Struts objects placed in the session... or better put, how does
Struts implement session invalidation.

thanks,
Darryl

P.S. I did search the archived messages that I have but couldn't find
anything dealing with this topic.




Re: Resources.properties -> trick?

2001-04-09 Thread Darryl

Mark,

One scenario would be when I'm doing some prototyping and I don't want to necessarily 
setup an ActionServlet to do some quick form designs etc. I might however, want to 
quickly play around with the page parameters using a properties file.

This is in fact the scenario in which I find myself right now. I'm POC'ing a 
template-based framework and I wanted to do a few screen prototypes but couldn't get 
the properties file stuff to work, hence my initial note. I didn't want to implement a 
separate solution as you
suggested I should do before I could determine whether or not something existed within 
Struts to do the same.

Thanks nonetheless for the responses.

- Darryl

"Geddes, Mark (ANTS)" wrote:

> I'm not sure how (or why) you should use the Struts implementation without
> using the Action servlet. However, Sun's i18n tutorial provides guidelines
> for using ResourceBundles backed up with properties files.
>
> http://java.sun.com/docs/books/tutorial/i18n/index.html
>
> Mark
>
> -Original Message-
> From: Darryl [mailto:[EMAIL PROTECTED]]
> Sent: 09 April 2001 13:11
> To: [EMAIL PROTECTED]
> Subject: Re: Resources.properties -> trick?
>
> Michael,
>
> Sorry, it looks like I've responded too quickly to your note. I must have
> been asleep when I read your note to have missed that you were using
> init-params. I apologize for the misstep.
>
> I think Mark has probably identified your problem correctly. Mark, any idea
> how to use a MessageResource file WITHOUT having to use ActionServlet.
>
> thanks,
> Darryl
>
> "Geddes, Mark (ANTS)" wrote:
>
> > Is your ResourceBundle called "Resources.properties" or
> > "Resource.properties"?
> >
> > Your mail implies a mis-match.
> >
> > Also, I assume your  is for the Struts Action Servlet.
> >
> > Mark
> >
> > -Original Message-
> > From: Michael Schommer [mailto:[EMAIL PROTECTED]]
> > Sent: 09 April 2001 12:57
> > To: [EMAIL PROTECTED]
> > Subject: Resources.properties -> trick?
> >
> > Hi,
> >
> > is there a trick using a "Resource.properties"-file.
> >
> > I'm creating a "Resource.properties"-file in WEB-INF/classes folder of my
> > application.
> > The web.xml looks like:
> >  ...
> > 
> >   application
> >   Resources
> > 
> > ...
> >
> > In the JSP-file the bean:message-Tag is:
> >
> >
> > By running the application an error displays
> > The Error is:
> >
> > A Servlet Exception Has Occurred
> >
> > Exception Report:
> >
> > javax.servlet.ServletException: Cannot find message resources under key
> > org.apache.struts.action.MESSAGE
> > at
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
> > pl.java:481)
> > at
> >
> _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> > _161.java:513)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
> > ava:184)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
> > at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> > hain.java:215)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> > ava:251)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> > ava:196)
> > at
> > org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
> > at
> >
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:
> > 242)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
> > at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16
> > 1)
> > at
> > org.apache

Re: Resources.properties -> trick?

2001-04-09 Thread Darryl

Michael,

Sorry, it looks like I've responded too quickly to your note. I must have been asleep 
when I read your note to have missed that you were using init-params. I apologize for 
the misstep.

I think Mark has probably identified your problem correctly. Mark, any idea how to use 
a MessageResource file WITHOUT having to use ActionServlet.

thanks,
Darryl

"Geddes, Mark (ANTS)" wrote:

> Is your ResourceBundle called "Resources.properties" or
> "Resource.properties"?
>
> Your mail implies a mis-match.
>
> Also, I assume your  is for the Struts Action Servlet.
>
> Mark
>
> -Original Message-
> From: Michael Schommer [mailto:[EMAIL PROTECTED]]
> Sent: 09 April 2001 12:57
> To: [EMAIL PROTECTED]
> Subject: Resources.properties -> trick?
>
> Hi,
>
> is there a trick using a "Resource.properties"-file.
>
> I'm creating a "Resource.properties"-file in WEB-INF/classes folder of my
> application.
> The web.xml looks like:
>  ...
> 
>   application
>   Resources
> 
> ...
>
> In the JSP-file the bean:message-Tag is:
>
>
> By running the application an error displays
> The Error is:
>
> A Servlet Exception Has Occurred
>
> Exception Report:
>
> javax.servlet.ServletException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
> pl.java:481)
> at
> _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> _161.java:513)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
> ava:184)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:215)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> ava:251)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> ava:196)
> at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:
> 242)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16
> 1)
> at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
> at
> org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:225
> )
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
> a:159)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java
> :818)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897
> )
> at java.lang.Thread.run(Thread.java:484)
>
> Root Cause:
>
> javax.servlet.jsp.JspException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
> at
> org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)
> at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
> at
> _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> _161.java:168)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
> ava:184)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFil

Re: Resources.properties -> trick?

2001-04-09 Thread Darryl

Michael,

Looks like you're asking basically the same thing I was asking in my note
titled: "Bundle attribute for bean:message tag???"

The reason you're getting that error is that the MessageResources object has
not been initialized and placed in the session (page?) context under the key
"org.apache.struts.action.MESSAGE". It seems like you have to actually use the
ActionServlet to get this to happen. There's probably a way that one can hack
around this and instantiate it programatically at startup but I was hoping
there was some way Struts can do this already without me having to do a hack
solution.

Hopefully someone in the group will respond to our problem.

thanks,
Darryl

Michael Schommer wrote:

> Hi,
>
> is there a trick using a "Resource.properties"-file.
>
> I'm creating a "Resource.properties"-file in WEB-INF/classes folder of my
> application.
> The web.xml looks like:
>  ...
> 
>   application
>   Resources
> 
> ...
>
> In the JSP-file the bean:message-Tag is:
>
>
> By running the application an error displays
> The Error is:
>
> A Servlet Exception Has Occurred
>
> Exception Report:
>
> javax.servlet.ServletException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
> pl.java:481)
> at
> _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> _161.java:513)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
> ava:184)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:215)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> ava:251)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> ava:196)
> at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:
> 242)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16
> 1)
> at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
> at
> org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:225
> )
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
> a:159)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java
> :818)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897
> )
> at java.lang.Thread.run(Thread.java:484)
>
> Root Cause:
>
> javax.servlet.jsp.JspException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
> at
> org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)
> at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
> at
> _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> _161.java:168)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
> ava:184)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:215)
> at
> org.apache.catalina.core.StandardWrapperValve.i

Bundle attribute for bean:message tag???

2001-04-09 Thread Darryl

Hi all,

I'm wanting to use the  tag in an application where
I'm not using the ActionServlet and therefore, not setting up the
servlet specs in my web.xml file. Currently when the JSP page executes
the  tag it tells me:


 javax.servlet.jsp.JspException: Cannot find message resources
 under key org.apache.struts.action.MESSAGE


I thought I could fix the problem by specifying the bundle attribute of
the MessageTag class and setting it to the location in my
CLASSPATH where the properties file resides but it still doesn't find
the file. I have specified the file with a .properties extension and
double-checked that it is in my CLASSPATH at the specified location with
the name ApplicationResources.properties.

Any ideas? Anyone run into this before? I did search the messages I have
stored as well as scoured the Struts website but couldn't find anything
on this matter so I hope I'm not repeating something that was dealt with
previously.

thanks in advance,
Darryl




Re: Newbie Problem solved with hack, but not ideal

2001-03-23 Thread Darryl

I searched the newsgroups and found that a number of you have already
encountered and commented on this issue so my apologies for not determining
that before I posted my previous note.

I found I did fix the problem by removing the DTD from struts.jar and placing
it separately in the classpath. This is unfortunately a hack but I'll have to
go with this for now until Orion fixes it... or is it necessarily an Orion
bug? I found one posting that indicated that if you change some Struts code,
it also fixes the problem.

Olli Poyry notes that in ActionServlet.java, if you replace (~line 881):

URL url = this.getClass().getResource(registrations[i+1]);

with:

URL url = getServletContext().getResource(registrations[i+1]);

the dtd is found and everything works. My question is, should Orion work
regardless or would it be better to change Struts as indicated above?

Comments from anyone?

thanks,
Darryl



Darryl wrote:

> Hi all,
>
> I was wondering whether you could look at this stack trace below and see
> if you
> see anything that you've encountered before. I'm running Orion Server
> 1.4.5 and I wouldn't expect there to be a problem with JNDI. (see stack
> trace line re: unknown protocol: jndi)
> They (Orion) don't specify any setup needed for JNDI to be running as a
> service. Furthermore, I've checked the struts-config.xml and it
> seems fine. I've pasted it in below the stack trace.
>
> I'd appreciate any help you could offer because I've been wrestling with
> this thing for some time now and can't seem to find any
> problems. My JSP form action works the same (i.e. breaks) whether I'm
> using 'login.do' or '/login.do'.
>
> thanks again,
> Darryl
>
> Stack Trace:
>
>  3/23/01 10:55 AM Started
>  3/23/01 10:58 AM login-web: org.apache.struts.action.ActionServlet:
> init
>  3/23/01 10:58 AM login-web: Error preloading servlet
>  javax.servlet.ServletException: Parsing error processing resource
> path /WEB-INF/struts-config.xml
>  at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1306)
>
>  at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
>  at
> javax.servlet.GenericServlet.init(GenericServlet.java:232)
>  at com.evermind.server.http.HttpApplication.w1(JAX)
>  at com.evermind.server.http.HttpApplication.wj(JAX)
>  at com.evermind.server.http.HttpApplication.wu(JAX)
>  at com.evermind.server.http.HttpApplication.v4(JAX)
>  at com.evermind.server.http.HttpApplication.(JAX)
>  at com.evermind.server.Application.ur(JAX)
>  at com.evermind.server.http.el.ur(JAX)
>  at com.evermind.server.http.ek.nm(JAX)
>  at com.evermind.server.http.ef.s1(JAX)
>  at com.evermind.server.http.ef.do(JAX)
>  at com.evermind.util.f.run(JAX)
>  Root cause is; java.net.MalformedURLException: unknown protocol:
> jndi
>  at
> org.apache.struts.digester.Digester.resolveEntity(Digester.java:581)
>  at
> com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:46)
>
>  at com.sun.xml.parser.Parser.pushReader(Parser.java:2768)
>  at
> com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2504)
>  at
> com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
>  at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
>
>  at com.sun.xml.parser.Parser.parse(Parser.java:284)
>  at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
>  at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
>  at
> org.apache.struts.digester.Digester.parse(Digester.java:716)
>  at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1301)
>
>  at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
>  at
> javax.servlet.GenericServlet.init(GenericServlet.java:232)
>  at com.evermind.server.http.HttpApplication.w1(JAX)
>  at com.evermind.server.http.HttpApplication.wj(JAX)
>  at com.evermind.server.http.HttpApplication.wu(JAX)
>  at com.evermind.server.http.HttpApplication.v4(JAX)
>  at com.evermind.server.http.HttpApplication.(JAX)
>  at com.evermind.server.Application.ur(JAX)
>  at com.evermind.server.http.el.ur(JAX)
>  at com.evermind.server.http.ek.nm(JAX)
>  at com.evermind.server.http.ef.s1(JAX)
>  at com.evermind.server.http.ef.do(JAX)
>  

Newbie Problem with Struts Configuration, I think...

2001-03-23 Thread Darryl

Hi all,

I was wondering whether you could look at this stack trace below and see
if you
see anything that you've encountered before. I'm running Orion Server
1.4.5 and I wouldn't expect there to be a problem with JNDI. (see stack
trace line re: unknown protocol: jndi)
They (Orion) don't specify any setup needed for JNDI to be running as a
service. Furthermore, I've checked the struts-config.xml and it
seems fine. I've pasted it in below the stack trace.

I'd appreciate any help you could offer because I've been wrestling with
this thing for some time now and can't seem to find any
problems. My JSP form action works the same (i.e. breaks) whether I'm
using 'login.do' or '/login.do'.

thanks again,
Darryl

Stack Trace:

 3/23/01 10:55 AM Started
 3/23/01 10:58 AM login-web: org.apache.struts.action.ActionServlet:
init
 3/23/01 10:58 AM login-web: Error preloading servlet
 javax.servlet.ServletException: Parsing error processing resource
path /WEB-INF/struts-config.xml
 at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1306)

 at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
 at
javax.servlet.GenericServlet.init(GenericServlet.java:232)
 at com.evermind.server.http.HttpApplication.w1(JAX)
 at com.evermind.server.http.HttpApplication.wj(JAX)
 at com.evermind.server.http.HttpApplication.wu(JAX)
 at com.evermind.server.http.HttpApplication.v4(JAX)
 at com.evermind.server.http.HttpApplication.(JAX)
 at com.evermind.server.Application.ur(JAX)
 at com.evermind.server.http.el.ur(JAX)
 at com.evermind.server.http.ek.nm(JAX)
 at com.evermind.server.http.ef.s1(JAX)
 at com.evermind.server.http.ef.do(JAX)
 at com.evermind.util.f.run(JAX)
 Root cause is; java.net.MalformedURLException: unknown protocol:
jndi
 at
org.apache.struts.digester.Digester.resolveEntity(Digester.java:581)
 at
com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:46)

 at com.sun.xml.parser.Parser.pushReader(Parser.java:2768)
 at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2504)
 at
com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
 at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)

 at com.sun.xml.parser.Parser.parse(Parser.java:284)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
 at
org.apache.struts.digester.Digester.parse(Digester.java:716)
 at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1301)

 at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
 at
javax.servlet.GenericServlet.init(GenericServlet.java:232)
 at com.evermind.server.http.HttpApplication.w1(JAX)
 at com.evermind.server.http.HttpApplication.wj(JAX)
 at com.evermind.server.http.HttpApplication.wu(JAX)
 at com.evermind.server.http.HttpApplication.v4(JAX)
 at com.evermind.server.http.HttpApplication.(JAX)
 at com.evermind.server.Application.ur(JAX)
 at com.evermind.server.http.el.ur(JAX)
 at com.evermind.server.http.ek.nm(JAX)
 at com.evermind.server.http.ef.s1(JAX)
 at com.evermind.server.http.ef.do(JAX)
 at com.evermind.util.f.run(JAX)
 3/23/01 10:58 AM login-web: 1.4.5 Started
 3/23/01 10:58 AM login-web: Servlet error
 javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection
 at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
 at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
 at /login.jsp._jspService(/login.jsp.java:40) (JSP page
line 8)
 at com.orionserver.http.OrionHttpJspPage.service(JAX)
 at com.evermind.server.http.HttpApplication.xj(JAX)
 at com.evermind.server.http.JSPServlet.service(JAX)
 at com.evermind.server.http.d3.sw(JAX)
 at com.evermind.server.http.d3.su(JAX)
 at com.evermind.server.http.ef.s1(JAX)
 at com.evermind.server.http.ef.do(JAX)
 at com.evermind.util.f.run(JAX)


struts-config.xml:

 

 http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

 

 
 
 

 
 
 
 
 
 




ActionMappings

2001-03-22 Thread Darryl


Hi all,
I'm a relative newbie to Struts. I'm developing a reusable login component
and have just got it packaged into a WAR file today in order to test. Unfortunately
I'm getting the following error when trying to pull up the default JSP
page that has a few form: struts tags in it.
 
500 Internal Server Error
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans
collection
    at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
    at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
    at /login.jsp._jspService(/login.jsp.java:40)
(JSP page line 8)
    at com.orionserver.http.OrionHttpJspPage.service(JAX)
    at com.evermind.server.http.HttpApplication.xj(JAX)
    at com.evermind.server.http.JSPServlet.service(JAX)
    at com.evermind.server.http.d3.sw(JAX)
    at com.evermind.server.http.d3.su(JAX)
    at com.evermind.server.http.ef.s1(JAX)
    at com.evermind.server.http.ef.do(JAX)
    at com.evermind.util.f.run(JAX)
 
As you can tell, I'm running under Orion Server. Has anyone encountered
this error before? If so, please let me know what I'm doing wrong or where
I'm going wrong. Any feedback would be appreciated.
thanks,
Darryl