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:

For additional commands, e-mail:


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




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:  
> 
> For additional commands, e-mail:
> 
>  

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

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




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:   
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:   
For additional commands, e-mail: