Re: Multiple submit buttons solution

2002-03-06 Thread Peter Severin

Hi Larry,

This exactly the situation my solution would help. Eeach submit button would
have a different name but this would be transparently handled by struts. E.g.:



Convention would be that underscore(or any other char)  is parameter name/value
separator. So the parameter name 'action_save' would be transformed into
action=save. In the action form I would have a field named 'action' which would
take the value 'save' or 'saveAs' .

Regards,
Peter.

"Maturo, Larry" wrote:

> Hi Peter,
>
> Yes, indexed won't help with this situation, since
> it only works within an iterate tag.  The submit
> button doesn't have anything to help you in this
> situation, as far as I can tell.  The only thing
> I can think of is using value attributes like
> "Edit 1", "Edit 2", etc., but of course, the
> users would these as the buttons label, which
> would be ugly.
>
> -- Larry
>
> -Original Message-
> From: Peter Severin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 2:55 AM
> To: Maturo, Larry
> Subject: Re: Multiple submit buttons solution
>
> Hi Larry,
>
> Though I think indexed properties solve the problem with tables with submit
> in each row what happens when I simply want to have five different submit
> buttons in the form ? Sure I can give each button a different name but this
> results in five different member variables in the action form. It would be
> more clean to have a single field which value would be checked in the
> action.
>
> Regards,
> Peter.
>
> "Maturo, Larry" wrote:
>
> > Hi Peter,
> >
> > I haven't played with images, so I can't really
> > answer your question, but it would be worth a try
> > to see if it will work.  In Struts you end up
> > doing a lot of experimenting.
> >
> > -- Larry
> >
> > -Original Message-
> > From: Peter Severin [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 10:32 AM
> > To: Maturo, Larry
> > Subject: Re: Multiple submit buttons solution
> >
> > Hi Mauro,
> >
> > Thanks for your reply. It seems to solve the problem I have.
> > It seems I have been missing the latest struts trends. Though one which
> > problem
> > remains is internationalized submit button value. But it can be worked
> > around doing
> > null/not null check. Does this feature also works for image submits ? Can
> > be image submits be replaced with regular buttons without any code change
> > ?
> >
> > Thanks,
> > Peter.
> >
> > "Maturo, Larry" wrote:
> >
> > > Hi Peter,
> > >
> > > Are you trying to have a table with one or more buttons
> > > in each row?  If so, check out the Struts white paper
> > > at http://stealthis.athensgroup.com/presentations/, under
> > > the Model Layer Framework and look at the section
> > > on use of the indexed attribute under logic:iterate for
> > > example of how to do this.  I've evidently missed a
> > > previous post in this thread, but I don't know what
> > > problem you are trying to solve.
> > >
> > > -- Larry Maturo
> > >
> > > -Original Message-
> > > From: Peter Severin [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, March 05, 2002 9:11 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Multiple submit buttons solution
> > >
> > > Hi folks,
> > >
> > > I've been searching for a solution for multple submit buttons in the
> > > same form
> > > and how it can be achieved without using javascript. Summing up
> > > different suggesstions
> > > I came with the following solution. We can encode additional parameter
> > > values into the submit button name and make struts handle this
> > > parameters transparently for us.
> > > For example we could have the following html code:
> > > 
> > >
> > > ActionServlet would detect this parameter and auto populate the form
> > > with parameter 'deleteItemId' and value '10'.
> > > To extend this idea further we could have the following code:
> > >
> > > 
> > > 
> > >
> > > In the action we could test form.getAction() parameter value and to
> > > dispatch to the coresponding delete/edit method inside which we coule
> > > use form.getItemId() to execute the operation.
> > > You've got the point.
> > > I would like to hear comments and suggestions on this. I am willing to
> > > post the actual code in the future if the idea proves itself valuable.
> > >
> > > Regards,
> > > Peter.
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >


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




problems

2002-03-06 Thread rg

Hello struts-user,

  I have a problem with the taglib  in struts.

  I have search results in a collection and I iterate over the
  results. But in the results is also a user email address and I want
  that this emailaddress is a link.
  e.g. mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]

  With  I
  have the emailaddress, but how I make now a link???

  I tried it with this code, but it don't work!

  

  

  Someone any ideas?

-- 
Best regards,
 rg  mailto:[EMAIL PROTECTED]


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




Struts Upload - java.io.WriteAbortedException on DiskFile ??

2002-03-06 Thread Matt Raible

I keep getting the exception below in my log files after I upload and write a
file to disk.  I'm using code from the struts-upload example.  Could it be that
my application is marked distributed in web.xml or my Form that holds this file
is marked Serializable?

Thanks,

Matt

== Exception ===

java.io.WriteAbortedException: Writing aborted by exception;
java.io.NotSerializableException: org.a
pache.struts.upload.DiskFile
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:445)
at
java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
at
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1268)
at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:810)
at org.apache.catalina.session.FileStore.load(FileStore.java:317)
at
org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:295)
at org.apache.catalina.session.StoreBase.run(StoreBase.java:350)
at java.lang.Thread.run(Thread.java:484)

== Code ===

try {
//retrieve the file data
InputStream stream = file.getInputStream();

//write the file to the file specified
OutputStream bos = new FileOutputStream(filePath);
int bytesRead = 0;
byte[] buffer = new byte[8192];
while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
bos.write(buffer, 0, bytesRead);
}

bos.close();

//close the stream
stream.close();
} catch (FileNotFoundException fnfe) {
System.err.println("FileNotFoundException: " + fnfe);
fnfe.printStackTrace();
} catch (IOException ioe) {
System.err.println("IOException: " + ioe);
ioe.printStackTrace();
}

//destroy the temporary file created
file.destroy();

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: Downloading files locally

2002-03-06 Thread Nick Thomson

You can use a servlet push to accomplish this.  Change the content type in
the response header to text and then use print.out statements to output each
line of text.  This is a very general explanation so I leave it up to you to
research the specifics.  BTW you can use this technique to output about any
type of file; just change the response header content type to what you need.

-Original Message-
From: R. BIGGS [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 11:32 PM
To: Struts Users Mailing List
Subject: Re: Downloading files locally


What I have is a editor type of application in a browser. I wish to allow
the user to save the contents of what the entered locally to their machine.
- Original Message -
From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 11:08 PM
Subject: RE: Downloading files locally


>
> You mean the ability to send a file to a users machine?
> Try providing a link to a file :)
>
> Scott
>
> > -Original Message-
> > From: R. BIGGS [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, March 07, 2002 1:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: Downloading files locally
> >
> > Greetings,
> >
> > I know Struts provides the capability to upload files through the
browser
> > but does it posses this capability for downloading files? If Struts does
> > not provide this option does anyone know of any other way to achieve
this?
> >
> > TIA
> >
> > Biggs
>
> --
> 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: 




LookupDispatchAction - action parameter not submitted when using - IE 6

2002-03-06 Thread Matt Raible

I'm trying to use the LookupDispathAction and when I have my buttons like so:


  


  


which renders as:




For CSS and other purposes, I want to use the HTML 4.0  tag instead,
but the following always results in the first button's action being called,
rather than the appropriate one.

Upload
Delete

I just test this in Mozilla 0.9.8 and it works fine, but problem still exists
in IE 6.  Any ideas/workarounds?

Thanks,

Matt


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




LookupDispatchAction - getKeyMethodMap documentation

2002-03-06 Thread Matt Raible

In the javadocs for the LookupDispatchAction, it states that you need to
override the following method:

  protected Map getKeyMethodMap(ActionMapping mapping,
   ActionForm form,
  HttpServletRequest request) {
  Map map = new HashMap();
  map.put("button.add", "add");
  map.put("button.delete", "delete");
  return map;
  }


However, the method in the class has no parameters.  I downloaded the latest
nightly build and checked.  Is this a bug?

Also, can I override this method in my base class - will that work for all
subclasses?

Thanks,

Matt


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: Downloading files locally

2002-03-06 Thread R. BIGGS

What I have is a editor type of application in a browser. I wish to allow
the user to save the contents of what the entered locally to their machine.
- Original Message -
From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 11:08 PM
Subject: RE: Downloading files locally


>
> You mean the ability to send a file to a users machine?
> Try providing a link to a file :)
>
> Scott
>
> > -Original Message-
> > From: R. BIGGS [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, March 07, 2002 1:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: Downloading files locally
> >
> > Greetings,
> >
> > I know Struts provides the capability to upload files through the
browser
> > but does it posses this capability for downloading files? If Struts does
> > not provide this option does anyone know of any other way to achieve
this?
> >
> > TIA
> >
> > Biggs
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




RE: Using Torque and Struts

2002-03-06 Thread Sandra Cann

Hai

As you may know the open source Expresso is integrated with Struts. It has a
open source OR mapping tool which you might want to take a look at.

Cheers
Sandra

> -Original Message-
> From: Hoang, Hai [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 12:18 PM
> To: 'struts-user'
> Subject: Using Torque and Struts
>
>
> I am having hard time setting up Torque to work with Struts in
> Tomcat 4.  I
> really appreciate if some one can help me.
>
> I went through the Torque tutorial successfully but I don't know
> how to make
> torque works JSP/Struts.  Also, do you know how is torque
> compared to other
> open source OR mapping tools
>
>
>
> Thank You
>
>


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




RE: Downloading files locally

2002-03-06 Thread Barr, Scott [IBM GSA]


You mean the ability to send a file to a users machine?
Try providing a link to a file :)

Scott

> -Original Message-
> From: R. BIGGS [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 1:34 PM
> To:   [EMAIL PROTECTED]
> Subject:  Downloading files locally
> 
> Greetings,
> 
> I know Struts provides the capability to upload files through the browser
> but does it posses this capability for downloading files? If Struts does
> not provide this option does anyone know of any other way to achieve this?
> 
> TIA
> 
> Biggs

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




Re: Need help getting a production/stable version of v1.1

2002-03-06 Thread dIon Gillard

Ted Husted wrote:

>You might just start with the nightly build. If you are not doing
>anything fancy with your ActionServlet, this should work just fine for
>you, and will be basis for the beta release (as soon as we get around to
>that). 
>
Ted,
on the 'doing fancy stuff with ActionServlet' front. I was thinking this 
week (bad sign) about adding a Struts 1.0.x compatible implementation of 
the action servlet into the 1.1 build that had all the same extension 
points as 1.0, and used a special RequestProcessor etc to route 
processing back to it.

Does this make some sense?

-- 
dIon Gillard, Multitask Consulting
http://adslgateway.multitask.com.au/developers




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




RE: design flaw if using a template...

2002-03-06 Thread Keith Chew


Hmm, but I don't want to put anything to the template.jsp. I just want the
template to include the news.do. If what you are saying is correct, I should
really be using .

However, I'll give all 3 methods a go. I am sure you are correct.

Great stuff! Thanks Matt

Keith

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 3:31 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Keith, they're not the same thing, by any means. As you said, if you use
your method:

you get a "too many servlet includes `/template.jsp'" error. This is doesn't
really suprise me at all - you're basically trying to use something which
blatantly isn't a template, as a template.

However if you use the method I outlined in my examples, i.e. you "put"
content into a template, whether this content is a .jsp or an action mapping
url - it works.

Honestly, just use  as it is documented and your problems will
be solved.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 02:18
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

I will try this again tonight. But I am doing the same as you (well, just
another way):

In template.jsp, you can either go:



if you have passed in "somecontent" to the template, eg in thepage.jsp:





This is what you have done. Alternatively, in template.jsp, you can go:



if you don't pass "somecontent" to template.jsp. The line above is just like
a jsp:include tag.

Anyway, I will test this again tonight. I hope it's something stupid I have
done. I will also report the exact exception after the test.

Thanks again Matt.

Keith


-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 1:28 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going thro

Downloading files locally

2002-03-06 Thread R. BIGGS

Greetings,

I know Struts provides the capability to upload files through the browser but does it 
posses this capability for downloading files? If Struts does not provide this option 
does anyone know of any other way to achieve this?

TIA

Biggs



Design issue

2002-03-06 Thread Parimi Srinivas

Hi all,
I want to validate my design. 

One of our applications caters to 3 OEM's. Application has three business
functionalities and each business functionality has 4 to 5 screens on an
average. The only difference between OEM's is LOOK and FEEL of the
application. To achieve different LOOK and FEEL for OEM's, OEM names are
mapped to 3 different aliases ( OEM1, OEM2 and OEM3) of action servlet.
Mappings of OEM name and action servlet alias are stored in an xml mappings
file. When users belonging to a particular OEM access application for the
first time,  OEM name is retrieved depending up on the action servlet alias
and stored in a new session. Appropriate JSP's are processed depending up on
the OEM name stored in the session. 

There is no user authentication screen in the application. 

If a new OEM is added to the application, following steps are followed -
1. a new servlet alias is created
2. Create a mapping between OEM name and action servlet alias.
3. Create JSP pages for new OEM.

Any suggestions,




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




RE: design flaw if using a template...

2002-03-06 Thread Matt Read

Keith, they're not the same thing, by any means. As you said, if you use
your method:

you get a "too many servlet includes `/template.jsp'" error. This is doesn't
really suprise me at all - you're basically trying to use something which
blatantly isn't a template, as a template.

However if you use the method I outlined in my examples, i.e. you "put"
content into a template, whether this content is a .jsp or an action mapping
url - it works.

Honestly, just use  as it is documented and your problems will
be solved.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 02:18
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

I will try this again tonight. But I am doing the same as you (well, just
another way):

In template.jsp, you can either go:



if you have passed in "somecontent" to the template, eg in thepage.jsp:





This is what you have done. Alternatively, in template.jsp, you can go:



if you don't pass "somecontent" to template.jsp. The line above is just like
a jsp:include tag.

Anyway, I will test this again tonight. I hope it's something stupid I have
done. I will also report the exact exception after the test.

Thanks again Matt.

Keith


-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 1:28 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are 

RE: design flaw if using a template...

2002-03-06 Thread Keith Chew

Hi Matt

I will try this again tonight. But I am doing the same as you (well, just
another way):

In template.jsp, you can either go:



if you have passed in "somecontent" to the template, eg in thepage.jsp:





This is what you have done. Alternatively, in template.jsp, you can go:



if you don't pass "somecontent" to template.jsp. The line above is just like
a jsp:include tag.

Anyway, I will test this again tonight. I hope it's something stupid I have
done. I will also report the exact exception after the test.

Thanks again Matt.

Keith


-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 1:28 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles

Re: Action execute isCancelled

2002-03-06 Thread Matt Raible

Take a look at DispatchAction in the javadocs - I believe this does what you're
looking for.

Matt

--- Vic Cekvenich <[EMAIL PROTECTED]> wrote:
> Let me bounce this design (that might extend Struts 1.1 functionality) for
> suggestions/code snippets:
> 
> Q1.I want to create a base Action that "developers" will use instead of
> Action.
> In baseAction.execute() I want to have logic that will call:
> executeRet() to populate the formBean
> executeUp() to validate and save the formBean
> executeDel() to request a delete from a formBean
> and executeNew() to insert a row in a formBean
> 
> How do I do this?
> 
> I like isCancelled() on Action, that tells me the user clicked cancel button
> design.
> 
> One possibility?
> 
> or 
> 
> 
> Then in baseAction, do a request.getParameter("X")? and call the right
> method?
> Is there a bette way to find out button clicked?
> 
> Is there another way?
> 
> TIA,
> Vic
> 
> ps.
> 
> Q2. Also... I want to call Save,New,Delete from a menu sometimes and not a
> button. How would I do it then?
> Have a SaveAction that would detect the form or action used and then ask the
> right form to save?
> 
> Q3. If the user changes a page, and clicks on menu to go to another page, how
> do I pop up a message saying changes made/ do you want to save? And then go
> to the proper page requested orginally?
> Should I code the button and/or menu to to call a javascript that would check
> for changes?
> 
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Help with inside - variable in onmouseover problem

2002-03-06 Thread Antony Stace

Hi

I need some help constructing a  tag inside an  tag, 
what I need is logically this, 



 ,1)" >" />



but I do not know how to write this correctly.  Can someone please show
me how to write this correctly.

Thanks for your help

Tony



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




RE: cannot resolve '/tags/struts-template.tld during weblogic.jsp c

2002-03-06 Thread rgiri

yes that's true, try to check whether the web.xml file is well formed or not
as well as check if the web.xml is valid(i mean check against the DTD
mentioned on top of the web.xml file).
I ran into the same problem once, first time it was uri issue next time I
had the DTD part on top of web.xml wrong. 
hope that helps
Regards,
RG

-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 5:03 PM
To: 'Struts Users Mailing List'
Subject: RE: cannot resolve '/tags/struts-template.tld during
weblogic.jsp c


Here's my web.xml:


/tags/struts-html.tld
/WEB-INF/lib/struts-html.tld
  


I know that the uri & the location doesn't match but struts-html.tld is
physically located
at /WEB-INF/lib/struts-html.tld

I tried changing it so that it would match up but it still failed w/ the
following:

C:\viewstore\KDOMEN_view\ads\apps>java -classpath
.;C:\viewstore\KDOMEN_view\ads
\apps\ms3;c:\jdk1.2.2\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\we
blog
icaux.jar;c:\weblogic\myserver\clientclasses;C:\viewstore\KDOMEN_view\ads\ap
ps\m
s3\lib\struts-1.0.jar;C:\viewstore\KDOMEN_view\ads\apps\ms3\classes;C:\views
tore
\KDOMEN_view\ads\apps\ms3\lib\struts-templated.tld;;C:\viewstore\KDOMEN_view
\ads
\apps\ms3\lib\struts-bean.tld;C:\viewstore\KDOMEN_view\ads\apps\ms3\lib\stru
ts.t
ld -Dweblogic.home=c:\weblogic weblogic.jspc -docroot
C:\viewstore\KDOMEN_view\a
ds\apps\ms3 ms3\*.jsp
nested IOException: java.io.IOException: cannot resolve
'/tags/struts-html.tld'
into a valid tag library

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 8:36 AM
To: [EMAIL PROTECTED]
Subject: RE: cannot resolve '/tags/struts-template.tld during
weblogic.jsp c


I am not familiar with WLS5.1, but in WLS6.1

if the web.xml file has the following taglib declaration

/WEB-INF/struts-template.tld
/WEB-INF/struts-template.tld
  

it expects the struts-template.tld under the WEB-INF directory, check if you
have the struts-template.tld in the right directory. 

-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 7:54 AM
To: '[EMAIL PROTECTED]'
Subject: cannot resolve '/tags/struts-template.tld during weblogic.jspc


I'm just trying to precompile my jsp's using weblogic.jspc on WLS5.1sp10

and I get the following error:
nested IOException: java.io.IOException: cannot resolve
'/tags/struts-template.tld' into a valid tag library






--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: cannot resolve '/tags/struts-template.tld duringweblogic.jsp c

2002-03-06 Thread Domen, Ken

Here's my web.xml:


/tags/struts-html.tld
/WEB-INF/lib/struts-html.tld
  


I know that the uri & the location doesn't match but struts-html.tld is
physically located
at /WEB-INF/lib/struts-html.tld

I tried changing it so that it would match up but it still failed w/ the
following:

C:\viewstore\KDOMEN_view\ads\apps>java -classpath
.;C:\viewstore\KDOMEN_view\ads
\apps\ms3;c:\jdk1.2.2\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\we
blog
icaux.jar;c:\weblogic\myserver\clientclasses;C:\viewstore\KDOMEN_view\ads\ap
ps\m
s3\lib\struts-1.0.jar;C:\viewstore\KDOMEN_view\ads\apps\ms3\classes;C:\views
tore
\KDOMEN_view\ads\apps\ms3\lib\struts-templated.tld;;C:\viewstore\KDOMEN_view
\ads
\apps\ms3\lib\struts-bean.tld;C:\viewstore\KDOMEN_view\ads\apps\ms3\lib\stru
ts.t
ld -Dweblogic.home=c:\weblogic weblogic.jspc -docroot
C:\viewstore\KDOMEN_view\a
ds\apps\ms3 ms3\*.jsp
nested IOException: java.io.IOException: cannot resolve
'/tags/struts-html.tld'
into a valid tag library

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 8:36 AM
To: [EMAIL PROTECTED]
Subject: RE: cannot resolve '/tags/struts-template.tld during
weblogic.jsp c


I am not familiar with WLS5.1, but in WLS6.1

if the web.xml file has the following taglib declaration

/WEB-INF/struts-template.tld
/WEB-INF/struts-template.tld
  

it expects the struts-template.tld under the WEB-INF directory, check if you
have the struts-template.tld in the right directory. 

-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 7:54 AM
To: '[EMAIL PROTECTED]'
Subject: cannot resolve '/tags/struts-template.tld during weblogic.jspc


I'm just trying to precompile my jsp's using weblogic.jspc on WLS5.1sp10

and I get the following error:
nested IOException: java.io.IOException: cannot resolve
'/tags/struts-template.tld' into a valid tag library






--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: design flaw if using a template...

2002-03-06 Thread Matt Read

Sorry, I hope you spotted my mistake, the lines:


Should read:



Matt.

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:28
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a cu

Action execute isCancelled

2002-03-06 Thread Vic Cekvenich

Let me bounce this design (that might extend Struts 1.1 functionality) for 
suggestions/code snippets:

Q1.I want to create a base Action that "developers" will use instead of Action.
In baseAction.execute() I want to have logic that will call:
executeRet() to populate the formBean
executeUp() to validate and save the formBean
executeDel() to request a delete from a formBean
and executeNew() to insert a row in a formBean

How do I do this?

I like isCancelled() on Action, that tells me the user clicked cancel button design.

One possibility?

or 


Then in baseAction, do a request.getParameter("X")? and call the right method?
Is there a bette way to find out button clicked?

Is there another way?

TIA,
Vic

ps.

Q2. Also... I want to call Save,New,Delete from a menu sometimes and not a button. How 
would I do it then?
Have a SaveAction that would detect the form or action used and then ask the right 
form to save?

Q3. If the user changes a page, and clicks on menu to go to another page, how do I pop 
up a message saying changes made/ do you want to save? And then go to the proper page 
requested orginally?
Should I code the button and/or menu to to call a javascript that would check for 
changes?








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




RE: design flaw if using a template...

2002-03-06 Thread Matt Read

Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECT

iI8n and templates

2002-03-06 Thread Dave Wellman

I have a quick question.

does anyone know how to deal with localized templates?

I need to use a template based on a local

IE:

  

  

  


but I don't really know what page to use until runtime. So I would like to
do something like:

  ">
" direct="true"/>
  

  ">

  "/>

suggestions?


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




getting a list in Action class

2002-03-06 Thread Domen, Ken

If my jsp has the following:








Why won't my receiving Action class get these elements with:

ArrayList list = myForm.getSubstances();
Iterator i = list.iterator();
while (i.hasNext())
{
Substance s = (Substance)i.next();
System.out.println("s.getCasNumber(): " + s.getCasNumber());
}


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




RE: design flaw if using a template...

2002-03-06 Thread Keith Chew


Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which res

RE: design flaw if using a template...

2002-03-06 Thread Matt Read

I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


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



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsub

Struts Web App Challenging user with BASIC Auth

2002-03-06 Thread Satish Jeejula

Hi All,

I have a web application using struts running under apache\tomcat3.3
configuration. I want to make this app challenge the user  using HTTP BASIC
Auth scheme. 

The admin context that comes with tomcat does implement this. But the admin
is not using struts.

I have added security-constraint element to my web.xml file for my
application. But still it does not challenge me?

Is there anything else that I need to configure for the application using
struts to challenge??

Any pointers that will lead me to a solution.

Any help is appreciated.

Thanks,
Satish

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




RE: design flaw if using a template...

2002-03-06 Thread Keith Chew

Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


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



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




html:base and tiles - uses layout path

2002-03-06 Thread Matt Raible

I am using the  tag in my baseLayout.jsp file.  I was hoping this
would simply render the host + context of my application, however it gives the
full path to my base tiles template.

Any ideas?

My idea is to just do away with it.

Here's what it renders:

http://localhost/onpoint/layouts/baseLayout.jsp";>

Thanks,

Matt

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: design flaw if using a template...

2002-03-06 Thread Matt Read

My apologies if I'm misunderstanding your point but if you're concerned that
the elements that you "put" into your template are not going through the an
xxxAction then why not put the URL for the action in instead of a .jsp? This
way your ShowNewsAction is following the same flow as any other content.
E.g.




... some html



Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:02
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


--
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: design flaw if using a template...

2002-03-06 Thread Keith Chew

Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


--
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: design flaw if using a template...

2002-03-06 Thread Keith Chew


Tiles does not solve the problem. As far as I can see, Tiles makes it easy
to configure your presentation pages, and pass variables between templates.
It makes your presentation design work more OO.

However, my issue is more of an archietecture problem, not a presentation
problem.

Keith


-Original Message-
From: rajesh kalluri [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 10:46 a.m.
To: Struts Users Mailing List
Subject: Re: design flaw if using a template...


Keith, check out... http://www.lifl.fr/~dumoulin/tiles/
.the new examples that come with it solve some related problem.

> Hi
>
> Struts provides us with a nice MVC architecture, where:
> - a user's click maps to an Action
> - based on the results, the user is forwarded to the view
>
> 
>
> In news.jsp we can access the database and retrieve the news for display.
> This breaks the MVC pattern, since the view is accessing the model.
> Alternatively, we have have this in the template.jsp:
> 

---Every tile is associated with a controller (make sure you check out the
struts-config.xml that comes with tiles distrib)
--- Controller for each tile prepares the data required for each tile
(eliminating the need for your - news.jsp we can access the database and
retrieve the news for display)
---then in your template news.jsp you can import the data with tiles
specific tags like






> Here's an example:
> (1) User clicks on viewUserDetail.do
> (2) ViewDetialAction forwards to user.jsp
> (3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
> forwards to news.jsp
>
> Basically, I want to call
>
> 
>
> in the JSP. Has anyone done something like this?
>
> Keith
>
>
> --
> 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: design flaw if using a template...

2002-03-06 Thread Ross MacCharles

Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]] 
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-06 Thread Matt Raible

I've completed this task - however, it would've been MUCH easier to just use a
properties file.  Of course, it could just be my experience with XML parsing -
because I had to write a lot of code to grab 4 simple varaibles.

private synchronized void loadConfig() throws Exception {

// Initialize our configuration object
config = new Configuration();

logCat.debug("Looking for " + configFile + " in " +
Constants.USER_HOME);

// Acquire an input stream to our configuration file
InputStream is = new FileInputStream(Constants.USER_HOME + configFile);

// No file found in user.home
if (is == null) {
logCat.debug("File not found at " + Constants.USER_HOME +
configFile
+ " - looking in application's WEB-INF directory");

// Look for config.xml in WEB-INF
is = getServletContext()
.getResourceAsStream("/WEB-INF/" + configFile);

if (is == null) {
throw new Exception("Configuration file '" 
+ configFile + "' not found in '" 
+ Constants.USER_HOME + "', nor in '/WEB-INF/'");
}
}


// Get the XML Document
DocumentBuilderFactory builderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
Document doc = builder.parse(is);

// close the input stream
is.close();

// get the repository root
NodeList rep = doc.getElementsByTagName("root");
Node node = rep.item(0);
Text rootDir = (Text) node.getFirstChild();
config.setRepositoryRootDir(rootDir.getNodeValue());

// get the assets directory
rep = doc.getElementsByTagName("assets");
node = rep.item(0);
Text assetDir = (Text) node.getFirstChild();
config.setAssetDir(assetDir.getNodeValue());

// get the assetView path
rep = doc.getElementsByTagName("viewPath");
node = rep.item(0);
Text viewPath = (Text) node.getFirstChild();
config.setAssetViewPath(viewPath.getNodeValue());

// get the assetView path
rep = doc.getElementsByTagName("default-passing-score");
node = rep.item(0);
Text minScore = (Text) node.getFirstChild();
config.setAssessmentMinScore(new
Double(minScore.getNodeValue()).doubleValue());

logCat.debug(config.toString());

}

--- Ronald Haring <[EMAIL PROTECTED]> wrote:
> > Nothing is wrong with the properties file...Xml is just better
> > 
> > 1.  one config.xml file in one central place...it's so much 
> > easier to manage
> > then a whole bunch of properties
> 
> You can put all your properties in one file as well, lets call that file
> config.properties
> 
> > 2.  xml handle the structure data much better then properties file
> 
> data structure might be nice for communications between computers but for
> users?
> e.g.
> RepositoryRoot=d:\
> RepositoryAssets=assets
> RepositoryViewPath=file://d:/repository/assets
> 
> seems just as clear to me as
> > >   
> > >   d:/repository
> > >   assets
> > >   file://d:/repository/assets
> > >   
> etc.
> 
> Cons of xml
> - Carefull with that ",<,> sign eugene,
> - Slow parsing
> 
> Gr
> Ronald
> 
> 
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
> 
> 
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> 
> ---
> 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




[Newbie] logic:iterate

2002-03-06 Thread Slimane

Hi,

I try to do an iteration on a vector. When this vector contains only 
Strings, the iteration works well. For that, I use the following piece of code:

>
>   
>

But, when I try with a vector containing custom objects, it doesn't work :(
For example, I have a Vecor of Element. Element is a bean which contains 2 
attributes (2 String named: id and name)
To iterate on that vector, I use the following piece of code:

>type="be.stluc.info.struts.Element">
>   
>

That doesn't work, and the following exception is thrown:

>Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Errortype 
>Exception reportmessage Internal Server Errordescription The server 
>encountered an internal error (Internal Server Error) that prevented it 
>from fulfilling this request.exception java.lang.ClassCastException: 
>java.lang.String
>  at org.apache.jsp.ListNames$jsp._jspService(ListNames$jsp.java:178)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at 
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
>  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>  at 
> 
>org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
>  at 
> 
>org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
>  at 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970)
>  at 
> 
>org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404)
>  at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
>  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
>  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:468)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at 
> 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>  at 
> 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>  at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at 
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at 
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
>  at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>  at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
>  at 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at 
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
>  at 
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
>  at java.lang.Thread.run(Thread.java:536)


Could somebody please show me the right way to acomplish the iteration ?

Thanx in advance,
Slimane

My configuration:
Apache Tomcat 4.0.1
JBuilder 6.0
JDK 1.4
Struts - nightly build of 2002/02/28

Bart: Hey, why is it destroying other toys?
Lisa: They must have programmed it to eliminate the competition.
Bart: You mean like Microsoft?
Lisa: Exactly.
[The Simpsons - 19

nesting: iterate cannot find attrribute

2002-03-06 Thread Elijah Jacobs

Hi All,

I'm trying to do a simple iterate .. it's even simpler that than one I
download from Arron Bate's site since the formbean has the reference to the
list of objects.

In my FormBean I have:

private Vector x = null;

public Object[] getX(){
return  this.x.toArray();
}
 public void setX(Vector x) { this.x = x; }



I first set this attribute to some value in my action class.  In my jsp page
I have:


 something


Note: I put this right under the  tag since it's in the
FormBean class.

The problem is that weblogic is not finding the getter for property "x".

I get the error:
javax.servlet.jsp.JspException: No getter method for property x of bean
auctionForm

Does anyone have any suggestions on how I can go about solving this?

thanks for any help in this,
- ej

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




Re: design flaw if using a template...

2002-03-06 Thread rajesh kalluri

Keith, check out... http://www.lifl.fr/~dumoulin/tiles/
.the new examples that come with it solve some related problem.

> Hi
>
> Struts provides us with a nice MVC architecture, where:
> - a user's click maps to an Action
> - based on the results, the user is forwarded to the view
>
> 
>
> In news.jsp we can access the database and retrieve the news for display.
> This breaks the MVC pattern, since the view is accessing the model.
> Alternatively, we have have this in the template.jsp:
> 

---Every tile is associated with a controller (make sure you check out the
struts-config.xml that comes with tiles distrib)
--- Controller for each tile prepares the data required for each tile
(eliminating the need for your - news.jsp we can access the database and
retrieve the news for display)
---then in your template news.jsp you can import the data with tiles
specific tags like






> Here's an example:
> (1) User clicks on viewUserDetail.do
> (2) ViewDetialAction forwards to user.jsp
> (3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
> forwards to news.jsp
>
> Basically, I want to call
>
> 
>
> in the JSP. Has anyone done something like this?
>
> Keith
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




I18n for number formatting on Struts

2002-03-06 Thread @Basebeans.com

Subject: I18n for number formatting on Struts
From: "Eduardo André Mallmann" <[EMAIL PROTECTED]>
 ===
Hi all,

I'm using Struts on a project in the company. The Internacionalization for
the messages and labels on the Web pages work fine and we didn't have much
problem.

But for the internacionalization of some number formats (write 1.000,00
instead of 1,000.00, etc) we had to set somethings hard coded because we
didn't find support on Struts for this kind of thing.

Do you know if it's possible to let Struts do by himself the formatting of
numbers, dates, etc. automatically using the Locale catched from the
session, like it does for the messages and labels?

Thanks in advance,

Eduardo

Eduardo André Mallmann | Analista de sistemas

mercador.com - varejistas e fornecedores juntos em um só lugar

Rua Dona Laura, 320 / 7º andar

CEP: 90430-090, Porto Alegre, RS - Brasil

Tel.: 55.51.3378 9014

Fax: 55.51.3378 9048

mailto:[EMAIL PROTECTED]

http://www.mercador.com




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




RE: Session Timeout?

2002-03-06 Thread Michelle Popovits

No, this is just a web application with container managed auth.

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 2:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Session Timeout?


Are you using session EJBs?

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 1:49 PM
To: '[EMAIL PROTECTED]'
Subject: Session Timeout?


I have a struts web application which uses container managed authentication.

When a user is logged into the application and the session times out, the
next user-initiated action will result in the login page being displayed
(the j2ee container makes this happen).  

How is it possible to tell that the reason that the user was directed to the
login page was because the session timed out and not because it was the
users first attempt at accessing the resource? 

I would like to display message to the user indicating that the reason they
are in the login page is the result of a session timeout.

I am currently constrained to use of the Servlet 2.2/JSP 1.1 spec.

TIA,
Michelle

--
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: Multiple submit buttons solution

2002-03-06 Thread ?HelpDesk-Service de dépannage

multipart/signed; protocol="application/x-pkcs7-signature";
micalg=sha1; boundary="msD6B016F0322BE8AAB5C6733B"
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

--msD6B016F0322BE8AAB5C6733B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Keith,

Yes you can use links but sometimes you need to submit the form for each
action. I'll give you an example:




Question name
Question text


Re: Forwarding action to a servlet?

2002-03-06 Thread Sidhartha Jain

I think so no you just have to name the servlet in the path along 
with your action in your struts.config file

eg:


Hope this helps you
Sidh

On Thu, 07 Mar 2002 [EMAIL PROTECTED] wrote :
>
>What do you have to do to have the Action class forward to a 
>servlet
>(instead of a jsp)?  Do you have to use any special syntax in 
>the
>struts-config.xml or web.xml?
>
>I need to have more control over the response sent to the 
>client
>(formatting, etc).
>
>Any help would be greatly appreciated.
>
>thanks,
>Theron
>
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>


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




design flaw if using a template...

2002-03-06 Thread Keith Chew

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


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




RE: Application Scope Variables

2002-03-06 Thread Farrell, Sarah

Hello,

I was searching around in the struts-user list archives for the correct
getServletContext() syntax and found Robert's response to a post:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg22768.html

I am trying to compile an ActionForm and I need to access the *application*
scoped bean (not a session bean).

I tried:

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) 
{

Object o =
request.getSession().getServletContext().getAttribute("attribute_name");

}

And it won't compile:

[javac] C:\cvs
work\energizer\source\edu\cccs\energizer\SupplementalForm.java:280: cannot
resolve symbol
[javac] symbol  : method getServletContext  ()
[javac] location: interface javax.servlet.http.HttpSession
[javac] Object o =
request.getSession().getServletContext().getAttribute("attribute_name");
[javac] 

The difference btw what I'm doing and what Robert had suggested is that I'm
trying to do it within the ActionForm and not within the Action, but I can't
figure out why it won't work in the ActionForm.


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




Forwarding action to a servlet?

2002-03-06 Thread theron . kousek


What do you have to do to have the Action class forward to a servlet
(instead of a jsp)?  Do you have to use any special syntax in the
struts-config.xml or web.xml?

I need to have more control over the response sent to the client
(formatting, etc).

Any help would be greatly appreciated.

thanks,
Theron



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




RE: Session Timeout?

2002-03-06 Thread Michelle Popovits

Do you use container managed authentication?
If so, where did you make this check?

My understanding is that the container will take control and send the user
directly to the login page with a new session in place (in the same way as a
new user login would).

-Michelle


-Original Message-
From: Thinh Doan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 2:42 PM
To: Struts Users Mailing List
Subject: RE: Session Timeout?


The way we did it was checking an object (e.g. user) in session.  If it's
null, do
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("session.timeout"));

(session.timeout is defined in your app resource properties)
thenreturn (mapping.findForward("logout"));

this logout fwd will then go back to the login page with the time out
message.

Thinh

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:49 PM
To: '[EMAIL PROTECTED]'
Subject: Session Timeout?


I have a struts web application which uses container managed authentication.

When a user is logged into the application and the session times out, the
next user-initiated action will result in the login page being displayed
(the j2ee container makes this happen).

How is it possible to tell that the reason that the user was directed to the
login page was because the session timed out and not because it was the
users first attempt at accessing the resource?

I would like to display message to the user indicating that the reason they
are in the login page is the result of a session timeout.

I am currently constrained to use of the Servlet 2.2/JSP 1.1 spec.

TIA,
Michelle

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




Simper Example Webapp

2002-03-06 Thread Matt Raible

Any chance of getting the simper webapp to use DynaActionForm without too much
trouble?

Also - how does simper handle transactions, and SQLExceptions?

Thanks,

Matt

--- Bryan Field-Elliot <[EMAIL PROTECTED]> wrote:
> Simper's representation of a database row is in the class SimperBean.
> SimperBean is a relatively shallow extension of the DynaBean (actually
> DynaBean is an interface -- BasicDynaBean is a concrete class which
> SimperBean extends) -- see the commons project "BeanUtils" for the
> source to DynaBean.
> 
> Table columns, as well as relations, are represented as dynamic
> properties using the DynaBean/DynaClass mechanisms. It does NOT produce
> "get" and "set" methods for each column or relation. Instead, there is a
> single "get" method and a single "set" method, whose first parameter is
> the property name. This isn't a Simper convention, it's a DynaBean
> convention.
> 
> DynaBeans/DynaClasses are supported by the latest (nightly builds) of
> the other "beanutils" classes, which is why the Struts tags like
> , , etc., all work with SimperBeans (and why
> I chose DynaBeans as a basis).
> 
> With all that said, I really don't know much about the new Nesting tags
> or how they work. If they rely upon the same introspection mechanisms as
> , , etc., then they should work with Simper
> just fine. That's just a guess.
> 
> Bryan
> 
> 
> On Wed, 2002-03-06 at 08:04, John Menke wrote:
> 
> >> Just give it a bash. Run a simper model through the NeXt tags. I lay
> my
> >> money on it working as-is.
> 
> Sounds great.  I will do this today.  Just trying to understand the
> internals a little better.
> 
> >> So as long as the simper beans have bean property conformity (eg:
> >> getMyProperty, setMyProperty) then the beans are ready to go with NeXt
> >> as they are wihout mods. I'd be very surprised if it needed mods,
> >> really. You can use Castor types straight up because the properties
> are
> >> valid bean properties.
> 
> I understand this it looks like Simper will create these methods property
> methods
> 
> >> A nested bean is simply one object that is returned by the method of
> >> another.
> 
> This is what was unclear to me.  I guess when you create relations
> between
> tables in Simper these get Methods to return another bean will be created
> in
> the SimperBean automatically?
> 
> 
> 
> 
> 
> -Original Message-
> From: Arron Bates [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 12:47 AM
> To: Struts Users Mailing List
> Subject: Re: simper-NeXt
> 
> 
> Almost.
> NeXt is only working off of Bean properties, and as with all beans, it
> doesn't care as to what goes on behind those method definitions. The
> constructor is one of those details it cares not about.
> 
> So as long as the simper beans have bean property conformity (eg:
> getMyProperty, setMyProperty) then the beans are ready to go with NeXt
> as they are wihout mods. I'd be very surprised if it needed mods,
> really. You can use Castor types straight up because the properties are
> valid bean properties.
> 
> A nested bean is simply one object that is returned by the method of
> another. As each property getter method has "get" on the front of it,
> we're laughin'. At the point of changing a property, you'll need that
> "set" on the front of it, naturally. For example, to get the nesting
> level deeper in my Monkey examples, I had a "fake" nested property that
> returned "this".
> 
> eg:
> public MonkeyBean getOtherMonkey() { return this; }
> 
> To the internals of BeanUtils (the part of Struts that makes it all
> happen), it's treated as an entirely different object. It makes no other
> assumptions, rightly so. The system is that explicit.
> 
> Just give it a bash. Run a simper model through the NeXt tags. I lay my
> money on it working as-is.
> 
> Arron.
> 
> 
> John Menke wrote:
> 
> >I'm working through the Simper examples and the NeXt examples and trying
> to
> >understand how I can use both together. Here is what I have so far:
> >
> >
> >In the NeXt you associate nested beans with a parent and children
> >relationship by inserting a private member variable to the parent bean
> the
> >will create a new child bean:
> >
> >ie.
> >
> >
> >
> >private BunchBean bunchBean = new BunchBean();
> >
> >
> >This will give us a new instance of the BunchBean when this MonkeyBean
> is
> >created. Just what we want. Now we need to provide the getter method to
> the
> >bean under the property name "pickedBunch". This will create a getter
> which
> >will look something like this example...
> >
> >Example...
> >public BunchBean getPickedBunch() {
> >  return t

RE: Session Timeout?

2002-03-06 Thread Galbreath, Mark

Are you using session EJBs?

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 1:49 PM
To: '[EMAIL PROTECTED]'
Subject: Session Timeout?


I have a struts web application which uses container managed authentication.

When a user is logged into the application and the session times out, the
next user-initiated action will result in the login page being displayed
(the j2ee container makes this happen).  

How is it possible to tell that the reason that the user was directed to the
login page was because the session timed out and not because it was the
users first attempt at accessing the resource? 

I would like to display message to the user indicating that the reason they
are in the login page is the result of a session timeout.

I am currently constrained to use of the Servlet 2.2/JSP 1.1 spec.

TIA,
Michelle

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Session Timeout?

2002-03-06 Thread Thinh Doan

The way we did it was checking an object (e.g. user) in session.  If it's
null, do
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("session.timeout"));

(session.timeout is defined in your app resource properties)
thenreturn (mapping.findForward("logout"));

this logout fwd will then go back to the login page with the time out
message.

Thinh

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:49 PM
To: '[EMAIL PROTECTED]'
Subject: Session Timeout?


I have a struts web application which uses container managed authentication.

When a user is logged into the application and the session times out, the
next user-initiated action will result in the login page being displayed
(the j2ee container makes this happen).

How is it possible to tell that the reason that the user was directed to the
login page was because the session timed out and not because it was the
users first attempt at accessing the resource?

I would like to display message to the user indicating that the reason they
are in the login page is the result of a session timeout.

I am currently constrained to use of the Servlet 2.2/JSP 1.1 spec.

TIA,
Michelle

--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Session Timeout?

2002-03-06 Thread Michelle Popovits

I have a struts web application which uses container managed authentication.

When a user is logged into the application and the session times out, the
next user-initiated action will result in the login page being displayed
(the j2ee container makes this happen).  

How is it possible to tell that the reason that the user was directed to the
login page was because the session timed out and not because it was the
users first attempt at accessing the resource? 

I would like to display message to the user indicating that the reason they
are in the login page is the result of a session timeout.

I am currently constrained to use of the Servlet 2.2/JSP 1.1 spec.

TIA,
Michelle

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




RE: NeXt question

2002-03-06 Thread John Menke

The Nesting Extension to Struts.  See
http://www.keyboardmonkey.com/struts/index.html

-Original Message-
From: Francisco Hernandez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 2:13 PM
To: Struts Users Mailing List
Subject: Re: NeXt question


what exactly is NeXt?

It's been mentioned quite a bit recently..


- Original Message -
From: "John Menke" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 7:23 AM
Subject: NeXt question


> Is it a requirement of NeXt that the outermost bean in a nested structure
> extend ActionForm?  The tutorial is structured in this manner but it does
> not appear to say this in the docs explicitly.  I'm guessing that having
the
> outermost bean extend ActionForm is tied into having struts call the set
> methods of sub beans automatically.  Is this correct? Or can I use any
type
> of bean (SimperBean) as the outermost bean.
>
> -john
>
>
>
> --
> 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: NeXt question

2002-03-06 Thread Francisco Hernandez

what exactly is NeXt?

It's been mentioned quite a bit recently..


- Original Message -
From: "John Menke" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 7:23 AM
Subject: NeXt question


> Is it a requirement of NeXt that the outermost bean in a nested structure
> extend ActionForm?  The tutorial is structured in this manner but it does
> not appear to say this in the docs explicitly.  I'm guessing that having
the
> outermost bean extend ActionForm is tied into having struts call the set
> methods of sub beans automatically.  Is this correct? Or can I use any
type
> of bean (SimperBean) as the outermost bean.
>
> -john
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




Re: nesting tags cannot find EmptyTag

2002-03-06 Thread Elijah Jacobs

Thanks Arron!

you've just made our (my development team's) lives a lot easier.

- ej


- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 12:34 PM
Subject: Re: nesting tags cannot find EmptyTag


> You're running an older version of Struts I take it (1.0, 1.01)?...
>
> There's a jar made especially for these versions of Struts that doesn't
> have the extra tags like the empty tag.
> Download "nested_tags_10.jar" (binaries), "nested_tags-src_10.jar"
> (source) from...
> http://www.keyboardmonkey.com/struts
>
> That should get it working. You will also have to replace the tld with
> that which comes in the jars, otherwise weblogic will still complain
> (All this is because weblogic parses and checks the tld's). The location
> and name of the tld's don't matter, as long as it matches the definition
> in your web.xml and JSP's etc.
>
> Hopefully that will get you working.
>
> Arron.
>
>
> Elijah Jacobs wrote:
>
> >Hi All,
> >
> >I am using nested-tag from Arron Bates. I have a working sample in my
tomcat
> >webapp, but when I try to run that app with my weblogic 5.1 i get this
> >error:
> >
> >java.lang.NoClassDefFoundError: org/apache/struts/taglib/logic/EmptyTag
> >
> >I can't seem to find anything on the user group under "EmptyTag" and my
> >struts.jar is uptodate.
> >
> >There is one difference in my webapp setup under weblogic...I put my
*.TLD
> >right under my web-inf folder .. while in tomcat, the tuturial I got from
> >the web, has it under web-inf/taglib/ .. but I don't think that makes a
> >difference.
> >
> >Any suggestions on how to go about solving this?
> >
> >thanks in advanced,
> >- ej
> >
> >I am using WebLogic 5.1 on Windows 2000
> >
> >--
> >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: 




Seeking Clarification on Implementation of The Business Logic Components

2002-03-06 Thread Goldberg, Joel S


> In the Struts User Guide at
>   The
> statement is made:
> 
> "For the simplest applications, an Action object may sometimes handle the
> business logic associated with a request. However, in most cases, an
> Action object should invoke another object, usually a JavaBean, to perform
> the actual business logic. This lets the Action focus on error handling
> and control flow, rather than business logic. To allow reuse on other
> platforms, business-logic JavaBeans should not refer to any Web
> application objects. The Action object should translate needed details
> from the HTTP request and pass those along to the business-logic beans as
> regular Java variables. "
> 
> It seems clear that the author advocates the business logic to be
> separated from, and ignorant of, web environment classes (even Struts
> classes) to maximize reusability.   But we need help to settle a
> misunderstanding of what is meant by the term "JavaBeans" in this passage.
> 
> 
> Question 1: Which interpretation is correct:
> 1.  The Business Logic should be in vanilla Java Classes that perform
> the business logic and follow Java Bean protocol (such as using getters
> and setters).  
>  It doesn't seem that introspection to allow visual development is
> relevant here - hence the confusion over the meaning of "JavaBean."  
> 2.  All business logic that has been factored out of the Action should
> be in EJBs.  
> 3.  Either 1 or 2 depending on what makes sense to make into EJBs.
> 
> Then if  the answer to Question 1 is  1 or 3,  I have two follow on
> questions:
> 
> Question 2:   Is it okay for the business logic classes to run on the same
> tier (JVM) as the Action?
> Question 3:   Is it okay to create separate instances of the business
> logic classes to remain thread safe or should they be Singletons (as the
> Actions are).  If they are JavaBeans, this seems to imply the are instance
> based (i.e. not singletons) and thus can have instance variables as
> needed. 
>  
> One last question,  if the answer is that they could be EJBs,  what
> criteria do you apply to determine good candidates for EJBs? 
> 
> Please elaborate on any of the above as you see fit.
> 
>  
>   Joel Goldberg 
> 
> 

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




Accessing values in hashMap through key with struts

2002-03-06 Thread eugene neymark

Hi!
Any clues to how to access HashMap through a key with struts?
Strut documentation is very vague on this subject.
here a sample of what i tried and it doesn't werk even though it compiles...


]" type="java.util.ArrayList"/>

so the above compiles but whn i try to iterate the  'arrayOfRoles' it says
that there is no collection. strangely enough there is no collection as i
can not even access the 'arrayOfRoles'  through the scriplet.

here's what i do instead and it worx but i want it to be purely in struts..


<% int id = ((User)user).getId();
   roles = (ArrayList)((HashMap)hashOfUsers).get("" + id);
for(int i = 0; i < roles.size(); i++){
%>
<%=((Role)roles.get(i)).getName()%>
<%}%>


Thanks !
Eugene


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




Simper Vs. Torque

2002-03-06 Thread Hoang, Hai

How is Simper compared to Torque?  If anyone used both, please share with us
the experience?




RE: simper and linking tables (many to many relationships)

2002-03-06 Thread John Menke

Ok will do (join the mailing list) will also add the primary key column

-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 1:04 PM
To: Struts Users Mailing List
Subject: Re: simper and linking tables (many to many relationships)


m-m is not yet supported in an elegent way by Simper. In the docs I
mention 1-1 and 1-m but I don't mention m-m for this reason.

As a tempoary workaround to get going, create another field in your
portfolio_stock table, called "id", and use it as a (pseudo) primary-key
(assigning it unique values, etc, upon every insert). I know that m-m
tables shouldn't require a primary key field (other than a composite of
the foreign keys), but that's just what Simper requires at this point.

Also -- perhaps you might join the simper-users mailing list at SF? I'm
not sure we want to bog down the Struts users lists with Simper usage
discussions.

Thanks!

Bryan


On Wed, 2002-03-06 at 10:56, John Menke wrote:

I have the following model:

-- Table: stock
CREATE TABLE "stock" (
  "stock_pkey" int4 NOT NULL,
  "symbol" varchar(5) NOT NULL,
  "name" varchar(50) NOT NULL,
  "price" numeric(5, 3),
  CONSTRAINT "stock_symbol_key" UNIQUE ("symbol"),
  CONSTRAINT "stock_pkey" PRIMARY KEY ("stock_pkey")
);


-- Table: portfolio
CREATE TABLE "portfolio" (
  "portfolio_pkey" int4 NOT NULL,
  "name" varchar(50),
  "investor_pkey" int4,
  CONSTRAINT "portfolio_pkey" PRIMARY KEY ("portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("investor_pkey") REFERENCES
"investor"
("investor_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

-- Table: portfolio_stock
CREATE TABLE "portfolio_stock" (
  "stock_pkey" int4 NOT NULL,
  "portfolio_pkey" int4 NOT NULL,
  CONSTRAINT "portfolio_stock_pkey" PRIMARY KEY ("stock_pkey",
"portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("portfolio_pkey") REFERENCES
"portfolio" ("portfolio_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION
NOT
DEFERRABLE INITIALLY IMMEDIATE,
  CONSTRAINT "" FOREIGN KEY ("stock_pkey") REFERENCES "stock"
("stock_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

The portfolio_stock table is a linking table and does not have a primary
key.  Is it possible to use this type of table in Simper?

registerTable requires a primary key and my linking table does not
contain a
primary key.  I guess my question is can you do many to many
relationships?
If not is there a workaround?

-john




--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: simper and linking tables (many to many relationships)

2002-03-06 Thread John Menke

Doh... I see where I have a primary key afterall... That was STUPID on my
part.

-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:56 PM
To: struts-user
Subject: simper and linking tables (many to many relationships)


I have the following model:

-- Table: stock
CREATE TABLE "stock" (
  "stock_pkey" int4 NOT NULL,
  "symbol" varchar(5) NOT NULL,
  "name" varchar(50) NOT NULL,
  "price" numeric(5, 3),
  CONSTRAINT "stock_symbol_key" UNIQUE ("symbol"),
  CONSTRAINT "stock_pkey" PRIMARY KEY ("stock_pkey")
);


-- Table: portfolio
CREATE TABLE "portfolio" (
  "portfolio_pkey" int4 NOT NULL,
  "name" varchar(50),
  "investor_pkey" int4,
  CONSTRAINT "portfolio_pkey" PRIMARY KEY ("portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("investor_pkey") REFERENCES "investor"
("investor_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

-- Table: portfolio_stock
CREATE TABLE "portfolio_stock" (
  "stock_pkey" int4 NOT NULL,
  "portfolio_pkey" int4 NOT NULL,
  CONSTRAINT "portfolio_stock_pkey" PRIMARY KEY ("stock_pkey",
"portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("portfolio_pkey") REFERENCES
"portfolio" ("portfolio_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT
DEFERRABLE INITIALLY IMMEDIATE,
  CONSTRAINT "" FOREIGN KEY ("stock_pkey") REFERENCES "stock"
("stock_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

The portfolio_stock table is a linking table and does not have a primary
key.  Is it possible to use this type of table in Simper?

registerTable requires a primary key and my linking table does not contain a
primary key.  I guess my question is can you do many to many relationships?
If not is there a workaround?

-john




--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: simper and linking tables (many to many relationships)

2002-03-06 Thread Bryan Field-Elliot

m-m is not yet supported in an elegent way by Simper. In the docs I
mention 1-1 and 1-m but I don't mention m-m for this reason.

As a tempoary workaround to get going, create another field in your
portfolio_stock table, called "id", and use it as a (pseudo) primary-key
(assigning it unique values, etc, upon every insert). I know that m-m
tables shouldn't require a primary key field (other than a composite of
the foreign keys), but that's just what Simper requires at this point.

Also -- perhaps you might join the simper-users mailing list at SF? I'm
not sure we want to bog down the Struts users lists with Simper usage
discussions.

Thanks!

Bryan


On Wed, 2002-03-06 at 10:56, John Menke wrote:

I have the following model:

-- Table: stock
CREATE TABLE "stock" (
  "stock_pkey" int4 NOT NULL,
  "symbol" varchar(5) NOT NULL,
  "name" varchar(50) NOT NULL,
  "price" numeric(5, 3),
  CONSTRAINT "stock_symbol_key" UNIQUE ("symbol"),
  CONSTRAINT "stock_pkey" PRIMARY KEY ("stock_pkey")
);


-- Table: portfolio
CREATE TABLE "portfolio" (
  "portfolio_pkey" int4 NOT NULL,
  "name" varchar(50),
  "investor_pkey" int4,
  CONSTRAINT "portfolio_pkey" PRIMARY KEY ("portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("investor_pkey") REFERENCES "investor"
("investor_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

-- Table: portfolio_stock
CREATE TABLE "portfolio_stock" (
  "stock_pkey" int4 NOT NULL,
  "portfolio_pkey" int4 NOT NULL,
  CONSTRAINT "portfolio_stock_pkey" PRIMARY KEY ("stock_pkey",
"portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("portfolio_pkey") REFERENCES
"portfolio" ("portfolio_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT
DEFERRABLE INITIALLY IMMEDIATE,
  CONSTRAINT "" FOREIGN KEY ("stock_pkey") REFERENCES "stock"
("stock_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

The portfolio_stock table is a linking table and does not have a primary
key.  Is it possible to use this type of table in Simper?

registerTable requires a primary key and my linking table does not contain a
primary key.  I guess my question is can you do many to many relationships?
If not is there a workaround?

-john




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





simper and linking tables (many to many relationships)

2002-03-06 Thread John Menke

I have the following model:

-- Table: stock
CREATE TABLE "stock" (
  "stock_pkey" int4 NOT NULL,
  "symbol" varchar(5) NOT NULL,
  "name" varchar(50) NOT NULL,
  "price" numeric(5, 3),
  CONSTRAINT "stock_symbol_key" UNIQUE ("symbol"),
  CONSTRAINT "stock_pkey" PRIMARY KEY ("stock_pkey")
);


-- Table: portfolio
CREATE TABLE "portfolio" (
  "portfolio_pkey" int4 NOT NULL,
  "name" varchar(50),
  "investor_pkey" int4,
  CONSTRAINT "portfolio_pkey" PRIMARY KEY ("portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("investor_pkey") REFERENCES "investor"
("investor_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

-- Table: portfolio_stock
CREATE TABLE "portfolio_stock" (
  "stock_pkey" int4 NOT NULL,
  "portfolio_pkey" int4 NOT NULL,
  CONSTRAINT "portfolio_stock_pkey" PRIMARY KEY ("stock_pkey",
"portfolio_pkey"),
  CONSTRAINT "" FOREIGN KEY ("portfolio_pkey") REFERENCES
"portfolio" ("portfolio_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT
DEFERRABLE INITIALLY IMMEDIATE,
  CONSTRAINT "" FOREIGN KEY ("stock_pkey") REFERENCES "stock"
("stock_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);

The portfolio_stock table is a linking table and does not have a primary
key.  Is it possible to use this type of table in Simper?

registerTable requires a primary key and my linking table does not contain a
primary key.  I guess my question is can you do many to many relationships?
If not is there a workaround?

-john




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




RE: "Best Practice" for parsing an XML file for application confi guration parameters?

2002-03-06 Thread keithBacon

properties for a shallow/flat structure
xml for deep/hierarchical/complex structure

xml for hieraglyphics that make non-programmers respect us more & to hammer
networks with more traffic describing data than actual data. oh & it's a widely
used standard.

--- Ronald Haring <[EMAIL PROTECTED]> wrote:
> ever since the hype of xml started, people tend to forget about properties.
> what is wrong with a properties file nowadays?
> Its fast, its simple, and good enough for most configuration issues I have
> encountered so far.
> 
> Gr
> Ronald 
> 
> > -Original Message-
> > From: Matt Raible [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 06, 2002 4:42 PM
> > To: Struts Users Mailing List
> > Subject: "Best Practice" for parsing an XML file for application
> > configuration parameters?
> > 
> > 
> > I am developing an application that will require different 
> > application settings
> > for different machines/customers.
> > 
> > Because of this, I want to to externalize certain 
> > configuration settings to a
> > XML file outside of web.xml - let's call this myApp.xml.
> > 
> > I have a StartupServlet that I can parse this file with.
> > 
> > 1.  What should I use to parse this file - SAX, DOM, Digester?
> > 
> > 2.  Should I have a bean that represents all the 
> > configuration settings, and
> > put this in the ServletContext as an attirubute, or each 
> > individual setting?
> > 
> > 3.  If I use Digester and a bean (seems good), should I 
> > change my XML in the
> > following snippet?
> > 
> > 
> > 
> > d:/repository
> > assets
> > file://d:/repository/assets
> > 
> > 
> > 
> > 75
> > 
> > 
> > 
> > Any help (or URLs) are appreciated!
> > 
> > Matt
> > 
> > __
> > Do You Yahoo!?
> > Try FREE Yahoo! Mail - the world's greatest free email!
> > http://mail.yahoo.com/
> > 
> > --
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> 
> 
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
> 
> 
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> 
> ---
> 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: how to edit an array of records with action forms?

2002-03-06 Thread keithBacon

>> I just dont have time to expriement 
then you're in trouble mate!
Sorry i can't answer I've avoided editing in grids so far.
Beware that you'll end up with lots of  wrote:
> 
> Hi all,
> 
> Got an array of records and I want to put them onto the screen to edit. What
> is the technique to go about this? (i am using the nightly 1.1 at the moment)
> 
> is it create an action form that maps a single record and create a load of
> them? or create an action form with the properties being arrays of the
> information?
> 
> one form in total or one form per record?
> 
> i take it the indexed= attribute for the html tags is going to be useful?
> 
> It's not obvious how to do this and I just dont have time to expriement
> (deadline to meet). Any help appreciated
> 
> Cheers
> Ian
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: simper-NeXt

2002-03-06 Thread John Menke

Agree. Simply brilliant.  Hat's off to both Bryan and yourself as well the
other responsible developers.  Thank you!

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:18 PM
To: Struts Users Mailing List
Subject: Re: simper-NeXt


Because NeXt is an extension of the original tags, it uses whatever the
original tags use to get their logic happening. BeanUtils was adapted
for DynaBeans, all the tags use BeanUtils, and so therefore, all the
tags can use DynaBeans. Including the nested ones.

In regards to how everything fits together... a well based technology is
a well based technolgy. From java itself all the way up to the
construction of Struts itself. All done to a very high standard. You
look at some of the code in java's standard API's... some of it is
simply brilliant.

Arron.

John Menke wrote:

>>>DynaBeans/DynaClasses are supported by the latest (nightly builds) of
>>>the other "beanutils" classes, which is why the Struts tags like
>>>, , etc., all work with SimperBeans (and why
>>>I chose DynaBeans as a basis).
>>>
>
>I guess that this is what handles the "conversion" of a getProperty method
>into a get(String property) method?
>
>>>Table columns, as well as relations, are represented as dynamic
>>>properties using the DynaBean/DynaClass mechanisms.
>>>
>
>So the get methods to relate beans should be handled in similar fashion?
>
>That's great if it's the case.  I will assemble a test of Simper-NeXt today
>and see if it works.  Amazing that everything fits together like this! I
>expected it to be more difficult.
>
>
>-Original Message-
>From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, March 06, 2002 10:29 AM
>To: Struts Users Mailing List
>Subject: RE: simper-NeXt
>
>
>Simper's representation of a database row is in the class SimperBean.
>SimperBean is a relatively shallow extension of the DynaBean (actually
>DynaBean is an interface -- BasicDynaBean is a concrete class which
>SimperBean extends) -- see the commons project "BeanUtils" for the
>source to DynaBean.
>
>Table columns, as well as relations, are represented as dynamic
>properties using the DynaBean/DynaClass mechanisms. It does NOT produce
>"get" and "set" methods for each column or relation. Instead, there is a
>single "get" method and a single "set" method, whose first parameter is
>the property name. This isn't a Simper convention, it's a DynaBean
>convention.
>
>DynaBeans/DynaClasses are supported by the latest (nightly builds) of
>the other "beanutils" classes, which is why the Struts tags like
>, , etc., all work with SimperBeans (and why
>I chose DynaBeans as a basis).
>
>With all that said, I really don't know much about the new Nesting tags
>or how they work. If they rely upon the same introspection mechanisms as
>, , etc., then they should work with Simper
>just fine. That's just a guess.
>
>Bryan
>
>
>On Wed, 2002-03-06 at 08:04, John Menke wrote:
>
>>> Just give it a bash. Run a simper model through the NeXt tags. I lay
>my
>>> money on it working as-is.
>
>Sounds great.  I will do this today.  Just trying to understand the
>internals a little better.
>
>>> So as long as the simper beans have bean property conformity (eg:
>>> getMyProperty, setMyProperty) then the beans are ready to go with
>NeXt
>>> as they are wihout mods. I'd be very surprised if it needed mods,
>>> really. You can use Castor types straight up because the properties
>are
>>> valid bean properties.
>
>I understand this it looks like Simper will create these methods
>property
>methods
>
>>> A nested bean is simply one object that is returned by the method of
>>> another.
>
>This is what was unclear to me.  I guess when you create relations
>between
>tables in Simper these get Methods to return another bean will be
>created in
>the SimperBean automatically?
>
>
>
>
>
>-Original Message-
>From: Arron Bates [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, March 06, 2002 12:47 AM
>To: Struts Users Mailing List
>Subject: Re: simper-NeXt
>
>
>Almost.
>NeXt is only working off of Bean properties, and as with all beans, it
>doesn't care as to what goes on behind those method definitions. The
>constructor is one of those details it cares not about.
>
>So as long as the simper beans have bean property conformity (eg:
>getMyProperty, setMyProperty) then the beans are ready to go with NeXt
>as they are wihout mods. I'd be very surprised if it needed mods,
>really. You can use Castor types straight up because the properties are
>valid bean properties.
>
>A nested bean is simply one object that is returned by the method of
>another. As each property getter method has "get" on the front of it,
>we're laughin'. At the point of changing a property, you'll need that
>"set" on the front of it, naturally. For example, to get the nesting
>level deeper 

Re: nesting tags cannot find EmptyTag

2002-03-06 Thread Arron Bates

You're running an older version of Struts I take it (1.0, 1.01)?...

There's a jar made especially for these versions of Struts that doesn't 
have the extra tags like the empty tag.
Download "nested_tags_10.jar" (binaries), "nested_tags-src_10.jar" 
(source) from...
http://www.keyboardmonkey.com/struts

That should get it working. You will also have to replace the tld with 
that which comes in the jars, otherwise weblogic will still complain 
(All this is because weblogic parses and checks the tld's). The location 
and name of the tld's don't matter, as long as it matches the definition 
in your web.xml and JSP's etc.

Hopefully that will get you working.

Arron.


Elijah Jacobs wrote:

>Hi All,
>
>I am using nested-tag from Arron Bates. I have a working sample in my tomcat
>webapp, but when I try to run that app with my weblogic 5.1 i get this
>error:
>
>java.lang.NoClassDefFoundError: org/apache/struts/taglib/logic/EmptyTag
>
>I can't seem to find anything on the user group under "EmptyTag" and my
>struts.jar is uptodate.
>
>There is one difference in my webapp setup under weblogic...I put my *.TLD
>right under my web-inf folder .. while in tomcat, the tuturial I got from
>the web, has it under web-inf/taglib/ .. but I don't think that makes a
>difference.
>
>Any suggestions on how to go about solving this?
>
>thanks in advanced,
>- ej
>
>I am using WebLogic 5.1 on Windows 2000
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




RE: Using Torque and Struts

2002-03-06 Thread Hoang, Hai

http://jakarta.apache.org/turbine/index.html


-Original Message-
From: Rubens Gama [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 06, 2002 11:30 AM
To: Struts Users Mailing List
Subject: RES: Using Torque and Struts

where can i get information about Torque, please?

thanks in advance
Rubens Gama

-Mensagem original-
De: Hoang, Hai [mailto:[EMAIL PROTECTED]]
Enviada em: quarta-feira, 6 de março de 2002 14:18
Para: 'struts-user'
Assunto: Using Torque and Struts


I am having hard time setting up Torque to work with Struts in Tomcat 4.  I
really appreciate if some one can help me.

I went through the Torque tutorial successfully but I don't know how to make
torque works JSP/Struts.  Also, do you know how is torque compared to other
open source OR mapping tools



Thank You



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RES: Using Torque and Struts

2002-03-06 Thread Rubens Gama

where can i get information about Torque, please?

thanks in advance
Rubens Gama

-Mensagem original-
De: Hoang, Hai [mailto:[EMAIL PROTECTED]]
Enviada em: quarta-feira, 6 de março de 2002 14:18
Para: 'struts-user'
Assunto: Using Torque and Struts


I am having hard time setting up Torque to work with Struts in Tomcat 4.  I
really appreciate if some one can help me.

I went through the Torque tutorial successfully but I don't know how to make
torque works JSP/Struts.  Also, do you know how is torque compared to other
open source OR mapping tools



Thank You



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




nesting tags cannot find EmptyTag

2002-03-06 Thread Elijah Jacobs

Hi All,

I am using nested-tag from Arron Bates. I have a working sample in my tomcat
webapp, but when I try to run that app with my weblogic 5.1 i get this
error:

java.lang.NoClassDefFoundError: org/apache/struts/taglib/logic/EmptyTag

I can't seem to find anything on the user group under "EmptyTag" and my
struts.jar is uptodate.

There is one difference in my webapp setup under weblogic...I put my *.TLD
right under my web-inf folder .. while in tomcat, the tuturial I got from
the web, has it under web-inf/taglib/ .. but I don't think that makes a
difference.

Any suggestions on how to go about solving this?

thanks in advanced,
- ej

I am using WebLogic 5.1 on Windows 2000

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




Re: how to edit an array of records with action forms?

2002-03-06 Thread Arron Bates

If you're on a nightly build, you'll have the nested extension already 
there. It will help you make light work of iterating objects.

For a pimer and tutorial, go here...
http://www.keyboardmonkey.com/struts

And for mor implementation detail for each of the tags, the Struts site 
has the most complete info.

Arron.

Ian Tomey wrote:

>Hi all,
>
>Got an array of records and I want to put them onto the screen to edit. What is the 
>technique to go about this? (i am using the nightly 1.1 at the moment)
>
>is it create an action form that maps a single record and create a load of them? or 
>create an action form with the properties being arrays of the information?
>
>one form in total or one form per record?
>
>i take it the indexed= attribute for the html tags is going to be useful?
>
>It's not obvious how to do this and I just dont have time to expriement (deadline to 
>meet). Any help appreciated
>
>Cheers
>Ian
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




Re: simper-NeXt

2002-03-06 Thread Arron Bates

Because NeXt is an extension of the original tags, it uses whatever the 
original tags use to get their logic happening. BeanUtils was adapted 
for DynaBeans, all the tags use BeanUtils, and so therefore, all the 
tags can use DynaBeans. Including the nested ones.

In regards to how everything fits together... a well based technology is 
a well based technolgy. From java itself all the way up to the 
construction of Struts itself. All done to a very high standard. You 
look at some of the code in java's standard API's... some of it is 
simply brilliant.

Arron.

John Menke wrote:

>>>DynaBeans/DynaClasses are supported by the latest (nightly builds) of
>>>the other "beanutils" classes, which is why the Struts tags like
>>>, , etc., all work with SimperBeans (and why
>>>I chose DynaBeans as a basis).
>>>
>
>I guess that this is what handles the "conversion" of a getProperty method
>into a get(String property) method?
>
>>>Table columns, as well as relations, are represented as dynamic
>>>properties using the DynaBean/DynaClass mechanisms.
>>>
>
>So the get methods to relate beans should be handled in similar fashion?
>
>That's great if it's the case.  I will assemble a test of Simper-NeXt today
>and see if it works.  Amazing that everything fits together like this! I
>expected it to be more difficult.
>
>
>-Original Message-
>From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, March 06, 2002 10:29 AM
>To: Struts Users Mailing List
>Subject: RE: simper-NeXt
>
>
>Simper's representation of a database row is in the class SimperBean.
>SimperBean is a relatively shallow extension of the DynaBean (actually
>DynaBean is an interface -- BasicDynaBean is a concrete class which
>SimperBean extends) -- see the commons project "BeanUtils" for the
>source to DynaBean.
>
>Table columns, as well as relations, are represented as dynamic
>properties using the DynaBean/DynaClass mechanisms. It does NOT produce
>"get" and "set" methods for each column or relation. Instead, there is a
>single "get" method and a single "set" method, whose first parameter is
>the property name. This isn't a Simper convention, it's a DynaBean
>convention.
>
>DynaBeans/DynaClasses are supported by the latest (nightly builds) of
>the other "beanutils" classes, which is why the Struts tags like
>, , etc., all work with SimperBeans (and why
>I chose DynaBeans as a basis).
>
>With all that said, I really don't know much about the new Nesting tags
>or how they work. If they rely upon the same introspection mechanisms as
>, , etc., then they should work with Simper
>just fine. That's just a guess.
>
>Bryan
>
>
>On Wed, 2002-03-06 at 08:04, John Menke wrote:
>
>>> Just give it a bash. Run a simper model through the NeXt tags. I lay
>my
>>> money on it working as-is.
>
>Sounds great.  I will do this today.  Just trying to understand the
>internals a little better.
>
>>> So as long as the simper beans have bean property conformity (eg:
>>> getMyProperty, setMyProperty) then the beans are ready to go with
>NeXt
>>> as they are wihout mods. I'd be very surprised if it needed mods,
>>> really. You can use Castor types straight up because the properties
>are
>>> valid bean properties.
>
>I understand this it looks like Simper will create these methods
>property
>methods
>
>>> A nested bean is simply one object that is returned by the method of
>>> another.
>
>This is what was unclear to me.  I guess when you create relations
>between
>tables in Simper these get Methods to return another bean will be
>created in
>the SimperBean automatically?
>
>
>
>
>
>-Original Message-
>From: Arron Bates [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, March 06, 2002 12:47 AM
>To: Struts Users Mailing List
>Subject: Re: simper-NeXt
>
>
>Almost.
>NeXt is only working off of Bean properties, and as with all beans, it
>doesn't care as to what goes on behind those method definitions. The
>constructor is one of those details it cares not about.
>
>So as long as the simper beans have bean property conformity (eg:
>getMyProperty, setMyProperty) then the beans are ready to go with NeXt
>as they are wihout mods. I'd be very surprised if it needed mods,
>really. You can use Castor types straight up because the properties are
>valid bean properties.
>
>A nested bean is simply one object that is returned by the method of
>another. As each property getter method has "get" on the front of it,
>we're laughin'. At the point of changing a property, you'll need that
>"set" on the front of it, naturally. For example, to get the nesting
>level deeper in my Monkey examples, I had a "fake" nested property that
>returned "this".
>
>eg:
>public MonkeyBean getOtherMonkey() { return this; }
>
>To the internals of BeanUtils (the part of Struts that makes it all
>happen), it's treated as an entirely different objec

Using Torque and Struts

2002-03-06 Thread Hoang, Hai

I am having hard time setting up Torque to work with Struts in Tomcat 4.  I
really appreciate if some one can help me.  

I went through the Torque tutorial successfully but I don't know how to make
torque works JSP/Struts.  Also, do you know how is torque compared to other
open source OR mapping tools

 

Thank You 




Re: Backporting mapped properties in Struts 1.0

2002-03-06 Thread Peter Pilgrim


FYI Here are my developer notes

*Backup the target files beforehand*

copy common-beanutils-1.2/**/PropertyUtils.java   to 
struts-1.0.2/**/PropertyUtils.java
copy common-beanutils-1.2/**/BeanUtils.java to struts-1.0.2/**/BeanUtils.java
copy common-beanutils-1.2/**/MappedPropertyDescriptor..java to struts-1.0.2/**/...

Well it basically compiles except two errors from Ant

compile.library:
Compiling 2 source files to 
/home/pilgpe/Products/jakarta-struts-1.0.2-src/target/library/classes
/home/pilgpe/Products/jakarta-struts-1.0.2-src/src/share/org/apache/struts/util/PropertyUtils.java:910:
 cannot resolve symbol
symbol  : variable MethodUtils
location: class org.apache.struts.util.PropertyUtils
return (MethodUtils.getAccessibleMethod(descriptor.getReadMethod()));
^
/home/pilgpe/Products/jakarta-struts-1.0.2-src/src/share/org/apache/struts/util/PropertyUtils.java:979:
 cannot resolve symbol
symbol  : variable MethodUtils
location: class org.apache.struts.util.PropertyUtils
return (MethodUtils.getAccessibleMethod(descriptor.getWriteMethod()));
^
Note: 
/home/pilgpe/Products/jakarta-struts-1.0.2-src/src/share/org/apache/struts/util/PropertyUtils.java
 uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.


Solution.
getAccessible() methods that belonged in PropertyUtils.java moved to struts 1.1 
specific MethodUtils.
Get the original method back from the back up java file. Cut and paste 
getAccessibleMethod()
back into the new file. Change the lines to revert back to

return (  getAccessibleMethod(descriptor.getReadMethod()) );

return (  getAccessibleMethod(descriptor.getWriteMethod()) );

Recompile Struts 1.0.2 using Ant
Should work now

--
Peter Pilgrim   ++44 (0)207-545-9923

 Swamped under electronic mails


 Message History 



From:  Peter Pilgrim/DMGIT/DMG UK/DeuBa@DMG UK on 06/03/2002 15:07

Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>

To:[EMAIL PROTECTED]
cc:
Subject:Backporting mapped properties in Struts 1.0


Hi

I would like to introduce mapped bean properties into Struts 1.0.

I can copy the source code from commons/bean-utils 1.2
PropertyUtils.java and BeanUtils.java and
the new MappedPropertyDescriptior.java back to the Struts 1.0
source base. This is the simple part, but ...

Is there anything else I need to be aware of?

--
Peter Pilgrim   ++44 (0)207-545-9923

 Swamped under electronic mails


--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Re: NeXt question

2002-03-06 Thread Arron Bates

The real answer is... whatever makes a valid Struts form bean.

What I like is that only the top bean has restrictions. Every other 
level down doens't care in the slightest.

Arron.

John Menke wrote:

>Is it a requirement of NeXt that the outermost bean in a nested structure
>extend ActionForm?  The tutorial is structured in this manner but it does
>not appear to say this in the docs explicitly.  I'm guessing that having the
>outermost bean extend ActionForm is tied into having struts call the set
>methods of sub beans automatically.  Is this correct? Or can I use any type
>of bean (SimperBean) as the outermost bean.
>
>-john
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




Forcing a form-reload OR a select Options reload

2002-03-06 Thread theron . kousek


Is  there a way to cause an html select control to "reload from a different
collection" -OR- to "update the collection and have the html select be
refreshed"?

If I have:

 

Can I automatically repopulate the psindustrytype collection if the user
clicks on a checkbox on the form?Is there a way to do this without
having to resubmit the form? I am guessing not

Another approach would be to have a javascript function (that gets called
when the user clicks on a checkbox) call an Action.   Is the best way to do
that in Javascript use use the "self.location=WhateverActionToCall"

thanks,
Theron


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




RE: DHTML Menus and Form Objects

2002-03-06 Thread Matt Raible

I've used the following javascript function to hide selects and checkboxes. 
I've tested it with "standards-compliant" browsers
(http://archive.webstandards.org/upgrade) and it works great.

/* Function to hide form elements that show through
   the search form when it is visible */
function toggleForm(frmObj, iState) // 1 visible, 0 hidden 
{
for(var i = 0; i < frmObj.length; i++) {
if (frmObj.elements[i].type.indexOf("select") == 0 ||
frmObj.elements[i].type.indexOf("checkbox") == 0) {
frmObj.elements[i].style.visibility = iState ? "visible" :
"hidden";
}
} 
}

Hope this helps,

Matt

--- [EMAIL PROTECTED] wrote:
> I think the layer thing works in very new versions of IE (newer than IE5 --
> maybe starting with 5.5?). Back when I was looking at such things, the only
> solution I could find for IE 5 was to hide the offending form elements when
> the show menu function is fired. Kind of clunky, but that's exactly what
> Microsoft used to do on their site.
> 
> Netscape/Mozilla is another story altogether. 
> 
> 
> -Original Message-
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 10:37 AM
> To: [EMAIL PROTECTED]
> Subject: OT: DHTML Menus and Form Objects
> 
> 
> This is off topic from Struts, but I was wondering if anyone else has run
> into this
> 
> If you have one of those DHTML/JS pulldown menus, it'll get hidden behind
> specific types of form objects (mostly select boxes).  I've scoured google
> to see how to get around this and the only posts I've seen (that don't say
> "you're SOL" - which is most of them) that have any constructive input say
> to surround the form object w/ a div tag and to set the z-index property to
> something very low, then to set your DHTML/JS menu to something very high.
> The idea being that the form objects are assigned a lower z index than the
> menu so the menu should display over all the form object elements.  
> 
> I've tried that w/ the following statement:  and
> wasn't able to get it to work.  I've tried surrounding the entire form and
> just the offending form element, but neither way has worked.  Has anyone
> been able to effectively make this type of workaround work?
> 
> I'm using HierMenus from www.dhtml.com on a W2k box w/ IE 5.
> 
> John M. Corro
> Cornerstone Consulting
> 414.212.3500
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: Multiple submit buttons solution

2002-03-06 Thread Maturo, Larry

We have a different solution to this problem.
One of the guys I work with thought of it. It
seems to work pretty well.

We have a subclass of Action and a subclass of 
ActionFrom, that together implement the if then 
else test.  We actually convert to integer and 
use the following switch statement:
switch (myForm.getCommandType()){
case SUBMIT_TYPE: 
errors = doSubmit(mapping, myForm, request, response);
forward = mapping.findForward("submit");
break;
  case SAVE_TYPE:
errors = doSave(mapping, myForm, request, response);
forward = mapping.findForward("save"); 
break;
  case PROCEED_TYPE:
errors = doProceed(mapping, myForm, request, response);
forward = mapping.findForward("proceed");  
break;
  case CANCEL_TYPE:
errors = doCancel(mapping, myForm, request, response);
forward = mapping.findForward("cancel");
break;
  case ADD_TYPE:
errors = doAdd(mapping, myForm, request, response);
forward = mapping.findForward("add");  
break;
  case DELETE_TYPE:
errors = doDelete(mapping, myForm, request, response);
forward = mapping.findForward("delete");
break;
  case EDIT_TYPE:
errors = doEdit(mapping, myForm, request, response);
forward = mapping.findForward("edit");
break;
  default:
errors = doDefault(mapping, myForm, request, response);
forward = new ActionForward(mapping.getInput());
}

The routines called are defined like this:
protected ActionErrors doDefault(ActionMapping mapping, 
 AgActionForm form, 
 HttpServletRequest request, 
 HttpServletResponse response)
{
return null;
}

and then in the the action classes we derive from this, we just have to
override the appropriate routine.  It puts all the code in one file,
which isn't perfect, but gets rid of the if then else ugliness in the
code.

-- Larry Maturo

 

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 6:40 AM
To: [EMAIL PROTECTED]
Subject: Re: Multiple submit buttons solution


Subject: Re: Multiple submit buttons solution
From: "Pim" <[EMAIL PROTECTED]>
 ===
Ok,

What I want is using multiple actionforms. The reason for this is because I
want to use different validations. I want no validation for create, I want a
validation for Save and I want a validation for say, fetch.Validations for
save and fetch are different.

What I don't want is one actionform with an if -then -else statement saying
if create, then do this, if save then do that. I want to have one superclass
with the properties of the jsp and the subclasses for different
actions(create, save, fetch).

So what we figured out was different mappings for the different actions
(create, save, fetch). The problem however is that the  can only contain one action of course. Our solution to that is
with the help of javascript we change the action.
For example if I press the fetch button, the action becomes one like this:


So, does this makes sense? Are we on the right track or are we missing
something?

Gr,

Pim

The problem is
"Ronald Haring" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Ah no sorry, my mistake.
>
> It will all go to the same action form. I have created a field called
> action. A better name would have been navigation.
>
> In the action form I check this action/navigation field and then redirect
to
> the right page. But you can do this with multiple forms, e.g.
>
> 
> function go(form,navigate) {
> form.navigate.value=navigate;
> form.submit();
> }
> 
> 
> 
> 
> 
> 
> 
> edit)
> delete)
>
> or even better
>
> 
> function go(form) {
> form.submit();
> }
> 
> 
> 
> 
> 
> 
> 
> edit)
> delete)
>
> Gr
> Ronald
>
> > -Original Message-
> > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 06, 2002 11:40 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Multiple submit buttons solution
> >
> >
> > Subject: Re: Multiple submit buttons solution
> > From: "Pim" <[EMAIL PROTECTED]>
> >  ===
> > Hi Ronald,
> >
> > So what you actually do is adjusting the html:form action, right?
> >
> > Example:
> > 
> >
> > And if I push the deletebutton -->
> > 
> >
> > This will change to:
> > 
> >
> > Because this is what we figured out to do also..
> >
> > My question: How do you do that with the default submit buttons
> > ()?
> >
> > My guess is something like  > go('deleteregistration')> .
> > I'm a on the right track here?
> >
> > Tanx in advance,
> >
> > Pim
> >
> >
> >
> >
> >
> >
> >
> >
> > "Ronald Haring" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > here is what I usually use, using links and sub

RE: Poolman is gone, I hardly knew ya

2002-03-06 Thread Adriano Labate

Yes I agree too, Ted.  Poolman is an excellent, highly configuable, product.


I only regret that it lacks one final feature that other connection pools
already have, the pooling of prepared statements. 
It was one of the new features of the last 2.1beta version but it seems that
it was too buggy and a lot of people (including myself) had to go back 2.04.

I've proposed the author to donate its project to Jakarta hoping that it
could continue to evolve but I had received no answer so far.

Adriano


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:48 PM
To: Struts Users Mailing List
Subject: Re: Poolman is gone, I hardly knew ya


Excellent point Ted.  And poolman has features you won't find in many of the
other connection pools currently available.

Despite it no longer being supported, it seems it may still be the best
solution.

Thanks so much for your thoughtful words!

Eddie

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 10:03 PM
Subject: Re: Poolman is gone, I hardly knew ya


> Personally, I wouldn't overreact. Poolman has always been an excellent
> product, and the fact that the original maintainer isn't working on
> further improvements won't change that. I'd snag the 2.0.4 release from
> sourceforge and park it on a CD for safekeeping. Once it's running, it
> will just keep running, and you can let it be.
>
> And, hey, software doesn't die, it just stops growing. And in the
> forseeable future, poolman's already way big enough for me =:o)
>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
>
>
> Bryan Field-Elliot wrote:
> >
> > According to the website:
> >
> > http://www.codestudio.com/
> >
> > Poolman is no more. What a bummer for me as I just learned it and
> > deployed it on a new project less than a week ago!
> >
> > Previously, I was using the pooling mechanism built into Struts, but due
> > to many folks refering to it as "not industrial strength", I moved on
> > (to Poolman).
> >
> > So what else are people using? Is there one built into Tomcat now? I
> > read that somewhere, I think in a mailing list message here, but I can't
> > seem to find any docs on it (looking at the Tomcat 4.0 docs).
> >
> > Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
> > sure of it's status, if people are using it, etc.
> >
> > Opinions appreciated!
> >
> > Bryan
>
> --
> 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: cannot resolve '/tags/struts-template.tld during weblogic.jspc

2002-03-06 Thread rgiri

I am not familiar with WLS5.1, but in WLS6.1

if the web.xml file has the following taglib declaration

/WEB-INF/struts-template.tld
/WEB-INF/struts-template.tld
  

it expects the struts-template.tld under the WEB-INF directory, check if you
have the struts-template.tld in the right directory. 

-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 7:54 AM
To: '[EMAIL PROTECTED]'
Subject: cannot resolve '/tags/struts-template.tld during weblogic.jspc


I'm just trying to precompile my jsp's using weblogic.jspc on WLS5.1sp10

and I get the following error:
nested IOException: java.io.IOException: cannot resolve
'/tags/struts-template.tld' into a valid tag library






--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: Issue with data sources in mySQL

2002-03-06 Thread Immanuel, Gidado-Yisa

Juan,

I recently put in a mysql JDBC driver.  What I've noticed is
that when the controller (ActionServlet) initializes, it tries
to initialize the DataSource (using the associated connection
pool?).  If there is a problem with initialization, the
ActionServlet init fails.  The error that led to failure in all
my uses, was having the username and password set incorrectly.

Look in the logs for the exact error message.  For example,
in Tomcat 4.0.1, you would go to ${CATALINA.HOME}/logs

hope this helps,
Gidado

> -Original Message-
> From: Juan Alvarado [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 8:47 AM
> To: Struts
> Subject: Issue with data sources in mySQL
> 
> 
> Recently I tried setting up a data source in my struts config 
> file to work
> with mySQL. The version of tomcat I'm using is 3.2.2 and the 
> mySQL drive I
> is the type mm.mysql version 2.0.6 . What happens is that after going
> through the whole set up, I start my tomcat and then try to connect to
> http://localhost:8080 and my browser just hangs and hangs; it never
> connects. When I comment out the data source definition in
> struts-config.xml, tomcat starts just fine and I can connect to
> http://localhost:8080. I AM using the latest release of mySQL 
> (Downloaded it
> just a couple days ago), and I have the jdbc optional extension that
> contains the DataSource class.
> 
> If anybody has run into this issue and know the problem and 
> the fix, I would
> greatly appreciate if you could let me know what your solution was.
> 
> Best regards,
> 
> **
> Juan Alvarado

> 

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




RE: "Best Practice" for parsing an XML file for application confi guration parameters?

2002-03-06 Thread Ronald Haring

> Nothing is wrong with the properties file...Xml is just better
> 
> 1.  one config.xml file in one central place...it's so much 
> easier to manage
> then a whole bunch of properties

You can put all your properties in one file as well, lets call that file
config.properties

> 2.  xml handle the structure data much better then properties file

data structure might be nice for communications between computers but for
users?
e.g.
RepositoryRoot=d:\
RepositoryAssets=assets
RepositoryViewPath=file://d:/repository/assets

seems just as clear to me as
> > 
> > d:/repository
> > assets
> > file://d:/repository/assets
> > 
etc.

Cons of xml
- Carefull with that ",<,> sign eugene,
- Slow parsing

Gr
Ronald


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




Re: Logging & Log4J in 1.1

2002-03-06 Thread David Winterfeldt

Log4J recently added some new classes.  I would check
that you have a version of Log4J and Commons Logging
from the same time.  I had some trouble too until I
went and downloaded the latest version of each.

David

--- Chris Hane <[EMAIL PROTECTED]> wrote:
> 
> I'm trying to get a Struts 1.0 application running
> under the new build 1.1 
> and seem to be experiencing an issue with the new
> logging capabilities.  I 
> use Log4J in my application and there is an
> interaction between the 
> commons-logger and Log4J that is causing the
> ActionServlet to not 
> initialize in TomCat 4.0.
> 
> I can get the struts-example application to work
> just fine.  I seem to have 
> narrowed my problem to the log4j.jar file.  Anyone
> have a suggestion on how 
> to configure the setup so the Struts 1.1 (with the
> commons-logger.jar) and 
> Log4J can work together.  I've read some of the
> logger documentation and 
> have not seen a specific configuration I need to
> perform.
> 
> The error I'm getting when I try to initialize the
> ActionServlet is 
> below.  It appears to be trying to instantiate
> (newInstance) something; but 
> of what?  And how do I define or setup what it
> needs.
> 
> - Root Cause -
>
org.apache.commons.logging.LogConfigurationException:
> 
> java.lang.reflect.InvocationTargetException
>   at 
>
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:509)
>   at 
>
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:285)
> 
> Thanks,
> Chris
> 
> 
> 
> 
> 
> === Full Error Message ===
> 
> 2002-03-05 18:51:28 StandardWrapper[/mr:invoker]:
> Loading container servlet 
> invoker
> 2002-03-05 18:51:28 invoker: init
> 2002-03-05 18:51:28 StandardWrapper[/mr:jsp]: Using
> Jasper classloader for 
> servlet jsp
> 2002-03-05 18:51:28 jsp: init
> 2002-03-05 18:51:28 LMSControl: init
> 2002-03-05 18:51:29 StandardContext[/mr]: Servlet
> /mr threw load() exception
> javax.servlet.ServletException: Servlet.init() for
> servlet LMSControl threw 
> exception
>   at
>
org.apache.catalina.core.StandardWrapper.load(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardContext.loadOnStartup(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardContext.start(Unknown
> Source)
>   at
>
org.apache.catalina.core.ContainerBase.addChild(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardHost.addChild(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardHost.install(Unknown
> Source)
>   at
>
org.apache.catalina.startup.HostConfig.deployApps(Unknown
> Source)
>   at
> org.apache.catalina.startup.HostConfig.start(Unknown
> Source)
>   at
>
org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown
> Source)
>   at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown
> 
> Source)
>   at
> org.apache.catalina.core.ContainerBase.start(Unknown
> Source)
>   at
> org.apache.catalina.core.ContainerBase.start(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardEngine.start(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardService.start(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardServer.start(Unknown
> Source)
>   at
> org.apache.catalina.startup.Catalina.start(Unknown
> Source)
>   at
> org.apache.catalina.startup.Catalina.execute(Unknown
> Source)
>   at
> org.apache.catalina.startup.Catalina.process(Unknown
> Source)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> org.apache.catalina.startup.Bootstrap.main(Unknown
> Source)
> - Root Cause -
>
org.apache.commons.logging.LogConfigurationException:
> 
> java.lang.reflect.InvocationTargetException
>   at 
>
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:509)
>   at 
>
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:285)
>   at
>
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:400)
>   at
>
org.apache.commons.digester.Digester.(Digester.java:309)
>   at
>
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1037)
>   at
>
org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
>   at
>
javax.servlet.GenericServlet.init(GenericServlet.java:258)
>   at
>
org.apache.catalina.core.StandardWrapper.load(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardContext.loadOnStartup(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardContext.start(Unknown
> Source)
>   at
>
org.apache.catalina.core.ContainerBase.addChild(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardHost.addChild(Unknown
> Source)
>   at
>
org.apache.catalina.core.StandardHost.install(Unknown
> Source)
>   at
>
org.apache.catalina.startup.HostConfig.deployApps(Unknown
> Source)
>   at
> org.apache.catalina.startup.HostConfig.start(Unknown
> Source)
>   at
>
org.apache.

RE: "Best Practice" for parsing an XML file for application confi guration parameters?

2002-03-06 Thread Hoang, Hai

Nothing is wrong with the properties file...Xml is just better

1.  one config.xml file in one central place...it's so much easier to manage
then a whole bunch of properties
2.  xml handle the structure data much better then properties file



-Original Message-
From: Ronald Haring [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 06, 2002 10:08 AM
To: 'Struts Users Mailing List'
Subject: RE: "Best Practice" for parsing an XML file for application confi
guration parameters?

ever since the hype of xml started, people tend to forget about properties.
what is wrong with a properties file nowadays?
Its fast, its simple, and good enough for most configuration issues I have
encountered so far.

Gr
Ronald 

> -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 4:42 PM
> To: Struts Users Mailing List
> Subject: "Best Practice" for parsing an XML file for application
> configuration parameters?
> 
> 
> I am developing an application that will require different 
> application settings
> for different machines/customers.
> 
> Because of this, I want to to externalize certain 
> configuration settings to a
> XML file outside of web.xml - let's call this myApp.xml.
> 
> I have a StartupServlet that I can parse this file with.
> 
> 1.  What should I use to parse this file - SAX, DOM, Digester?
> 
> 2.  Should I have a bean that represents all the 
> configuration settings, and
> put this in the ServletContext as an attirubute, or each 
> individual setting?
> 
> 3.  If I use Digester and a bean (seems good), should I 
> change my XML in the
> following snippet?
> 
> 
>   
>   d:/repository
>   assets
>   file://d:/repository/assets
>   
>   
>   
>   75
>   
> 
> 
> Any help (or URLs) are appreciated!
> 
> Matt
> 
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---


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




how to edit an array of records with action forms?

2002-03-06 Thread Ian Tomey


Hi all,

Got an array of records and I want to put them onto the screen to edit. What is the 
technique to go about this? (i am using the nightly 1.1 at the moment)

is it create an action form that maps a single record and create a load of them? or 
create an action form with the properties being arrays of the information?

one form in total or one form per record?

i take it the indexed= attribute for the html tags is going to be useful?

It's not obvious how to do this and I just dont have time to expriement (deadline to 
meet). Any help appreciated

Cheers
Ian


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




RE: "Best Practice" for parsing an XML file for application confi guration parameters?

2002-03-06 Thread Hoang, Hai

JDOM is great! It's so easy to used and it's part of the JCP.
Jdom.org has a bunch of tutorials and articles written about it.  

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 06, 2002 10:03 AM
To: 'Struts Users Mailing List'
Subject: RE: "Best Practice" for parsing an XML file for application confi
guration parameters?

JDOM made the cover of this month's "XML Magazine," 
should you need a primer on it. I don't know if it's
online, but the URL is www.xml-mag.com.

Mark

-Original Message-
From: Peter Pilgrim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:55 AM

(1) I would could using JDOM for this? Depends on deployment size of the
application. You will need xerces.jar as well as jdom.jar.

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: "Best Practice" for parsing an XML file for application configuration parameters?

2002-03-06 Thread Ronald Haring

ever since the hype of xml started, people tend to forget about properties.
what is wrong with a properties file nowadays?
Its fast, its simple, and good enough for most configuration issues I have
encountered so far.

Gr
Ronald 

> -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 4:42 PM
> To: Struts Users Mailing List
> Subject: "Best Practice" for parsing an XML file for application
> configuration parameters?
> 
> 
> I am developing an application that will require different 
> application settings
> for different machines/customers.
> 
> Because of this, I want to to externalize certain 
> configuration settings to a
> XML file outside of web.xml - let's call this myApp.xml.
> 
> I have a StartupServlet that I can parse this file with.
> 
> 1.  What should I use to parse this file - SAX, DOM, Digester?
> 
> 2.  Should I have a bean that represents all the 
> configuration settings, and
> put this in the ServletContext as an attirubute, or each 
> individual setting?
> 
> 3.  If I use Digester and a bean (seems good), should I 
> change my XML in the
> following snippet?
> 
> 
>   
>   d:/repository
>   assets
>   file://d:/repository/assets
>   
>   
>   
>   75
>   
> 
> 
> Any help (or URLs) are appreciated!
> 
> Matt
> 
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




bean:write and XSLT Coldjava taglib

2002-03-06 Thread Rajagopal V

Hi all
Im using the Coldjava Taglib for XSLT Operations and
the input that  I feed to it is a request scope
variable.


 


I have a request scope variable called xmlString which
contains a Stringified version of my DOM. When I do
this, it throws me a "Markup in the document preceding
the root element is not well-formed". My XML is 
perfect. because if i use it this way



 <%= pageContext.findAttribute("xmlString") %>


It works fine this way. Why isnt the first one
working??

TIA
raj


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: "Best Practice" for parsing an XML file for application configuration parameters?

2002-03-06 Thread Galbreath, Mark

JDOM made the cover of this month's "XML Magazine," 
should you need a primer on it. I don't know if it's
online, but the URL is www.xml-mag.com.

Mark

-Original Message-
From: Peter Pilgrim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:55 AM

(1) I would could using JDOM for this? Depends on deployment size of the
application. You will need xerces.jar as well as jdom.jar.

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




Re: "Best Practice" for parsing an XML file for applicationconfiguration parameters?

2002-03-06 Thread Dave Weis


On Wed, 6 Mar 2002, Matt Raible wrote:
> I am developing an application that will require different application
> settings for different machines/customers.
> Because of this, I want to to externalize certain configuration
> settings to a XML file outside of web.xml - let's call this myApp.xml.
> I have a StartupServlet that I can parse this file with.
> 1.  What should I use to parse this file - SAX, DOM, Digester?

I have used jdom and really like it. It's not blindingly fast, but it
saves me enough time that I don't mind.

> 2.  Should I have a bean that represents all the configuration settings, and
> put this in the ServletContext as an attirubute, or each individual setting?

I think the settings should all be contained in a bean.

> 3.  If I use Digester and a bean (seems good), should I change my XML in the
> following snippet?
> 
>   
>   d:/repository
>   assets
>   file://d:/repository/assets
>   
>   
>   
>   75
>   
> 

Looks reasonable.

dave

-- 
Dave Weis "I believe there are more instances of the abridgement
[EMAIL PROTECTED]   of the freedom of the people by gradual and silent
  encroachments of those in power than by violent 
  and sudden usurpations."- James Madison


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




RE: Tiles question: Using inside tiles:put

2002-03-06 Thread Andre Beskrowni

i use this technique all the time, though i specify the type (can't remember
why...):

  

  

ab


> -Original Message-
> From: Molitor, Stephen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 10:37 AM
> To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> Subject: Tiles question: Using  inside tiles:put
> 
> 
> Is it OK to use bean:message to look up a message inside a 
> tiles:put tag?
> For example:
> 
>   
> 
>   
> 
> The instantiating page might get the title like this:
> 
>   
> 
> Is anyone else doing this?  Usually this works for me, but 
> sometimes the
> servlet container (WebLogic SP8) blows up on the getAsString.
> 
> Thanks!
> 
> Steve Molitor
> [EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




Re: DHTML Menus and Form Objects

2002-03-06 Thread John M. Corro

Mark, you thank ; ) .guess I had it backwards...I was using a Netscape
reference

http://developer.netscape.com/docs/manuals/htmlguid/tags12.htm#1701758

Gave the div tags a try again w/ the corrected z-index, but unfortunately no
go. Thanks again, Markor is it Mark, again thanks?



- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 9:45 AM
Subject: RE: DHTML Menus and Form Objects


> It's the opposite, John.  The lower the z-index, the more foreground
> preference the object has.  I like the "SOL" idiom, too.  :-)
>
> Mark
>
> -Original Message-
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 10:37 AM
>
> If you have one of those DHTML/JS pulldown menus, it'll get hidden behind
> specific types of form objects (mostly select boxes).  I've scoured google
> to see how to get around this and the only posts I've seen (that don't say
> "you're SOL" - which is most of them) that have any constructive input say
> to surround the form object w/ a div tag and to set the z-index property
to
> something very low, then to set your DHTML/JS menu to something very high.
> The idea being that the form objects are assigned a lower z index than the
> menu so the menu should display over all the form object elements.
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>
>


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




Re: "Best Practice" for parsing an XML file for application configurationparameters?

2002-03-06 Thread Peter Pilgrim



(1) I would could using JDOM for this? Depends on deployment size of the application
You will need xerces.jar as well as jdom.jar.

For mini applications then common digester is worth considering.

Oh yes www.jdom.org

(2) Yes or make it accessible as static property of the StartupServlet.


--
Peter Pilgrim   ++44 (0)207-545-9923

 Swamped under electronic mails


 Message History 



From:  Matt Raible <[EMAIL PROTECTED]> on 06/03/2002 07:41 PST

Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>

To:Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
Subject:"Best Practice" for parsing an XML file for application configuration 
parameters?

I am developing an application that will require different application settings
for different machines/customers.

Because of this, I want to to externalize certain configuration settings to a
XML file outside of web.xml - let's call this myApp.xml.

I have a StartupServlet that I can parse this file with.

1.  What should I use to parse this file - SAX, DOM, Digester?

2.  Should I have a bean that represents all the configuration settings, and
put this in the ServletContext as an attirubute, or each individual setting?







--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




cannot resolve '/tags/struts-template.tld during weblogic.jspc

2002-03-06 Thread Domen, Ken

I'm just trying to precompile my jsp's using weblogic.jspc on WLS5.1sp10

and I get the following error:
nested IOException: java.io.IOException: cannot resolve
'/tags/struts-template.tld' into a valid tag library






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




RE: DHTML Menus and Form Objects

2002-03-06 Thread Galbreath, Mark

I forgot...check out the instructors' websites at

http://staff.westlake.com/

There is a SL of DHTML stuff there.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, March 06, 2002 10:46 AM

It's the opposite, John.  The lower the z-index, the more foreground
preference the object has.  I like the "SOL" idiom, too.  :-)

Mark

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:37 AM

If you have one of those DHTML/JS pulldown menus, it'll get hidden behind
specific types of form objects (mostly select boxes).  I've scoured google
to see how to get around this and the only posts I've seen (that don't say
"you're SOL" - which is most of them) that have any constructive input say
to surround the form object w/ a div tag and to set the z-index property to
something very low, then to set your DHTML/JS menu to something very high.
The idea being that the form objects are assigned a lower z index than the
menu so the menu should display over all the form object elements.

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Poolman is gone, I hardly knew ya

2002-03-06 Thread Eddie Bush

Excellent point Ted.  And poolman has features you won't find in many of the
other connection pools currently available.

Despite it no longer being supported, it seems it may still be the best
solution.

Thanks so much for your thoughtful words!

Eddie

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 10:03 PM
Subject: Re: Poolman is gone, I hardly knew ya


> Personally, I wouldn't overreact. Poolman has always been an excellent
> product, and the fact that the original maintainer isn't working on
> further improvements won't change that. I'd snag the 2.0.4 release from
> sourceforge and park it on a CD for safekeeping. Once it's running, it
> will just keep running, and you can let it be.
>
> And, hey, software doesn't die, it just stops growing. And in the
> forseeable future, poolman's already way big enough for me =:o)
>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
>
>
> Bryan Field-Elliot wrote:
> >
> > According to the website:
> >
> > http://www.codestudio.com/
> >
> > Poolman is no more. What a bummer for me as I just learned it and
> > deployed it on a new project less than a week ago!
> >
> > Previously, I was using the pooling mechanism built into Struts, but due
> > to many folks refering to it as "not industrial strength", I moved on
> > (to Poolman).
> >
> > So what else are people using? Is there one built into Tomcat now? I
> > read that somewhere, I think in a mailing list message here, but I can't
> > seem to find any docs on it (looking at the Tomcat 4.0 docs).
> >
> > Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
> > sure of it's status, if people are using it, etc.
> >
> > Opinions appreciated!
> >
> > Bryan
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




RE: simper-NeXt

2002-03-06 Thread John Menke

>> DynaBeans/DynaClasses are supported by the latest (nightly builds) of
>> the other "beanutils" classes, which is why the Struts tags like
>> , , etc., all work with SimperBeans (and why
>> I chose DynaBeans as a basis).

I guess that this is what handles the "conversion" of a getProperty method
into a get(String property) method?

>> Table columns, as well as relations, are represented as dynamic
>> properties using the DynaBean/DynaClass mechanisms.

So the get methods to relate beans should be handled in similar fashion?

That's great if it's the case.  I will assemble a test of Simper-NeXt today
and see if it works.  Amazing that everything fits together like this! I
expected it to be more difficult.


-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:29 AM
To: Struts Users Mailing List
Subject: RE: simper-NeXt


Simper's representation of a database row is in the class SimperBean.
SimperBean is a relatively shallow extension of the DynaBean (actually
DynaBean is an interface -- BasicDynaBean is a concrete class which
SimperBean extends) -- see the commons project "BeanUtils" for the
source to DynaBean.

Table columns, as well as relations, are represented as dynamic
properties using the DynaBean/DynaClass mechanisms. It does NOT produce
"get" and "set" methods for each column or relation. Instead, there is a
single "get" method and a single "set" method, whose first parameter is
the property name. This isn't a Simper convention, it's a DynaBean
convention.

DynaBeans/DynaClasses are supported by the latest (nightly builds) of
the other "beanutils" classes, which is why the Struts tags like
, , etc., all work with SimperBeans (and why
I chose DynaBeans as a basis).

With all that said, I really don't know much about the new Nesting tags
or how they work. If they rely upon the same introspection mechanisms as
, , etc., then they should work with Simper
just fine. That's just a guess.

Bryan


On Wed, 2002-03-06 at 08:04, John Menke wrote:

>> Just give it a bash. Run a simper model through the NeXt tags. I lay
my
>> money on it working as-is.

Sounds great.  I will do this today.  Just trying to understand the
internals a little better.

>> So as long as the simper beans have bean property conformity (eg:
>> getMyProperty, setMyProperty) then the beans are ready to go with
NeXt
>> as they are wihout mods. I'd be very surprised if it needed mods,
>> really. You can use Castor types straight up because the properties
are
>> valid bean properties.

I understand this it looks like Simper will create these methods
property
methods

>> A nested bean is simply one object that is returned by the method of
>> another.

This is what was unclear to me.  I guess when you create relations
between
tables in Simper these get Methods to return another bean will be
created in
the SimperBean automatically?





-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:47 AM
To: Struts Users Mailing List
Subject: Re: simper-NeXt


Almost.
NeXt is only working off of Bean properties, and as with all beans, it
doesn't care as to what goes on behind those method definitions. The
constructor is one of those details it cares not about.

So as long as the simper beans have bean property conformity (eg:
getMyProperty, setMyProperty) then the beans are ready to go with NeXt
as they are wihout mods. I'd be very surprised if it needed mods,
really. You can use Castor types straight up because the properties are
valid bean properties.

A nested bean is simply one object that is returned by the method of
another. As each property getter method has "get" on the front of it,
we're laughin'. At the point of changing a property, you'll need that
"set" on the front of it, naturally. For example, to get the nesting
level deeper in my Monkey examples, I had a "fake" nested property that
returned "this".

eg:
public MonkeyBean getOtherMonkey() { return this; }

To the internals of BeanUtils (the part of Struts that makes it all
happen), it's treated as an entirely different object. It makes no other
assumptions, rightly so. The system is that explicit.

Just give it a bash. Run a simper model through the NeXt tags. I lay my
money on it working as-is.

Arron.


John Menke wrote:

>I'm working through the Simper examples and the NeXt examples and
trying to
>understand how I can use both together. Here is what I have so far:
>
>
>In the NeXt you associate nested beans with a parent and children
>relationship by inserting a private member variable to the parent bean
the
>will create a new child bean:
>
>ie.
>
>
>
>private BunchBean bunchBean = new BunchBean();
>
>
>This will give us a new ins

RE: DHTML Menus and Form Objects

2002-03-06 Thread Galbreath, Mark

It's the opposite, John.  The lower the z-index, the more foreground
preference the object has.  I like the "SOL" idiom, too.  :-)

Mark

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:37 AM

If you have one of those DHTML/JS pulldown menus, it'll get hidden behind
specific types of form objects (mostly select boxes).  I've scoured google
to see how to get around this and the only posts I've seen (that don't say
"you're SOL" - which is most of them) that have any constructive input say
to surround the form object w/ a div tag and to set the z-index property to
something very low, then to set your DHTML/JS menu to something very high.
The idea being that the form objects are assigned a lower z index than the
menu so the menu should display over all the form object elements.

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




RE: DHTML Menus and Form Objects

2002-03-06 Thread Assenza, Chris

To the best of my knowledge there is no workaround, it's a "feature" of
today's browsers. No amount of finagling z-indexes is going to help.  

A viable option that Microsoft implemented was to hide (as in hide the
layer) the select boxes whenever a menu came in contact with one, then to
unhide it when the menu was gone.  It's a little more trouble then it is
worth to implement and not the most reliable of solutions.

Just another reason not to use drop-downs on a web page actually. 
This stupid bug has been a thorn in my side before. :\  Shame really,
drop-downs nice for application development. 

Here's a link to one guys experience with this back in IE4 days. 
http://www.wdvl.com/Authoring/DHTML/Menus/des.html

-Chris Assenza

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:37 AM
To: [EMAIL PROTECTED]
Subject: OT: DHTML Menus and Form Objects


This is off topic from Struts, but I was wondering if anyone else has run
into this

If you have one of those DHTML/JS pulldown menus, it'll get hidden behind
specific types of form objects (mostly select boxes).  I've scoured google
to see how to get around this and the only posts I've seen (that don't say
"you're SOL" - which is most of them) that have any constructive input say
to surround the form object w/ a div tag and to set the z-index property to
something very low, then to set your DHTML/JS menu to something very high.
The idea being that the form objects are assigned a lower z index than the
menu so the menu should display over all the form object elements.  

I've tried that w/ the following statement:  and
wasn't able to get it to work.  I've tried surrounding the entire form and
just the offending form element, but neither way has worked.  Has anyone
been able to effectively make this type of workaround work?

I'm using HierMenus from www.dhtml.com on a W2k box w/ IE 5.

John M. Corro
Cornerstone Consulting
414.212.3500

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




"Best Practice" for parsing an XML file for application configuration parameters?

2002-03-06 Thread Matt Raible

I am developing an application that will require different application settings
for different machines/customers.

Because of this, I want to to externalize certain configuration settings to a
XML file outside of web.xml - let's call this myApp.xml.

I have a StartupServlet that I can parse this file with.

1.  What should I use to parse this file - SAX, DOM, Digester?

2.  Should I have a bean that represents all the configuration settings, and
put this in the ServletContext as an attirubute, or each individual setting?

3.  If I use Digester and a bean (seems good), should I change my XML in the
following snippet?



d:/repository
assets
file://d:/repository/assets



75



Any help (or URLs) are appreciated!

Matt

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: DHTML Menus and Form Objects

2002-03-06 Thread ltorrence

I think the layer thing works in very new versions of IE (newer than IE5 --
maybe starting with 5.5?). Back when I was looking at such things, the only
solution I could find for IE 5 was to hide the offending form elements when
the show menu function is fired. Kind of clunky, but that's exactly what
Microsoft used to do on their site.

Netscape/Mozilla is another story altogether. 


-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 10:37 AM
To: [EMAIL PROTECTED]
Subject: OT: DHTML Menus and Form Objects


This is off topic from Struts, but I was wondering if anyone else has run
into this

If you have one of those DHTML/JS pulldown menus, it'll get hidden behind
specific types of form objects (mostly select boxes).  I've scoured google
to see how to get around this and the only posts I've seen (that don't say
"you're SOL" - which is most of them) that have any constructive input say
to surround the form object w/ a div tag and to set the z-index property to
something very low, then to set your DHTML/JS menu to something very high.
The idea being that the form objects are assigned a lower z index than the
menu so the menu should display over all the form object elements.  

I've tried that w/ the following statement:  and
wasn't able to get it to work.  I've tried surrounding the entire form and
just the offending form element, but neither way has worked.  Has anyone
been able to effectively make this type of workaround work?

I'm using HierMenus from www.dhtml.com on a W2k box w/ IE 5.

John M. Corro
Cornerstone Consulting
414.212.3500



Tiles question: Using inside tiles:put

2002-03-06 Thread Molitor, Stephen

Is it OK to use bean:message to look up a message inside a tiles:put tag?
For example:

  

  

The instantiating page might get the title like this:

  

Is anyone else doing this?  Usually this works for me, but sometimes the
servlet container (WebLogic SP8) blows up on the getAsString.

Thanks!

Steve Molitor
[EMAIL PROTECTED]

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




Re: Poolman is gone, I hardly knew ya

2002-03-06 Thread Eddie Bush

The same discussion (about connection pools) has passed on the tomcat list
recently too.  I don't think I'd use the Tyrex pool.  Have a look through
the Tomcat Users Mailing List archive before you decide on this one.

Eddie

- Original Message -
From: "Matt Raible" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 10:40 PM
Subject: RE: Poolman is gone, I hardly knew ya


> I use the one that is built in with Tomcat - it's called Tyrex and can be
> obtained from http://tyrex.exolab.org (same folks that make Castor!) - or
just
> use what's already provided by tomcat.  It has worked real slick for me,
and
> I'd be more than happy to help anyone figure out how to use it.
>
> Uses JNDI to do lookups and seems to work just fine.
>
> Matt
>
> --- "Robert D. Morse" <[EMAIL PROTECTED]> wrote:
> > Check out Torque.  It works great for me, although it may be overkill
for
> > just a connection pool.  Doesn't the PoolMan stuff come with source?
> > Connection pools aren't rocket science.
> >
> > http://jakarta.apache.org/turbine/torque/index.html
> >
> >
> > -Original Message-
> > From: Satish Jeejula [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 6:35 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Poolman is gone, I hardly knew ya
> >
> >
> > I had my application working with PoolMan and put it in  production too
just
> > TODAY.
> >
> > I cannot break this news to my higher-ups. So is there any good
connection
> > pooling software.
> >
> > thanks,
> > satish
> >
> > -Original Message-
> > From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 8:50 PM
> > To: Struts Users Mailing List
> > Subject: Poolman is gone, I hardly knew ya
> >
> >
> > According to the website:
> >
> > http://www.codestudio.com/
> >
> > Poolman is no more. What a bummer for me as I just learned it and
> > deployed it on a new project less than a week ago!
> >
> > Previously, I was using the pooling mechanism built into Struts, but due
> > to many folks refering to it as "not industrial strength", I moved on
> > (to Poolman).
> >
> > So what else are people using? Is there one built into Tomcat now? I
> > read that somewhere, I think in a mailing list message here, but I can't
> > seem to find any docs on it (looking at the Tomcat 4.0 docs).
> >
> > Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
> > sure of it's status, if people are using it, etc.
> >
> > Opinions appreciated!
> >
> > Bryan
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >
>
>
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




OT: DHTML Menus and Form Objects

2002-03-06 Thread John M. Corro

This is off topic from Struts, but I was wondering if anyone else has run into this

If you have one of those DHTML/JS pulldown menus, it'll get hidden behind specific 
types of form objects (mostly select boxes).  I've scoured google to see how to get 
around this and the only posts I've seen (that don't say "you're SOL" - which is most 
of them) that have any constructive input say to surround the form object w/ a div tag 
and to set the z-index property to something very low, then to set your DHTML/JS menu 
to something very high.  The idea being that the form objects are assigned a lower z 
index than the menu so the menu should display over all the form object elements.  

I've tried that w/ the following statement:  and wasn't able to 
get it to work.  I've tried surrounding the entire form and just the offending form 
element, but neither way has worked.  Has anyone been able to effectively make this 
type of workaround work?

I'm using HierMenus from www.dhtml.com on a W2k box w/ IE 5.

John M. Corro
Cornerstone Consulting
414.212.3500



  1   2   >