RE: caching custom tag results

2001-08-22 Thread Laine Donlan

Mike -

We sometimes use the page context to store tag results under a key name.
If tag executes multiple times per page then it checks the page context
for something under that key before going forward with processing.  One
thing though, if the results of the tag depend on the attributes
provided to it, then you have to some sort of intelligent keying so that
the tags with similar attributes will be cached correctly.

Laine

-Original Message-
From: Mike Dewhirst [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 12:19 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: caching custom tag results


If anybody has done this before, what is a good way of caching custom
tag
results? For instance, I have a custom tag, that generates image tags
(by
dynamically building up the url). I'd rather it didn't go through the
same
process 4 times for the same image. How can I get around this?

Thanks for any advice/suggestion.


=**

If you are not the intended recipient, employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination or copying of this communication and its
attachments is strictly prohibited.

If you have received this communication and its attachments in error,
please return the original message and attachments to the sender using
the reply facility on e-mail.

Internet communications are not secure and therefore the UCLES Group
does not accept legal responsibility for the contents of this message.
Any views or opinions presented are solely those of the author and do
not necessarily represent those of the UCLES Group unless otherwise
specifically stated.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses although this does not
guarantee that this email is virus free.

**=



RE: Nested classes

2001-07-13 Thread Laine Donlan

I have had no problem using inner classes with struts, is there a reason
your inner class is static?

As long as the inner classes are public Struts should be able to get to
the properties with reflection.

Laine

-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 6:54 AM
To: [EMAIL PROTECTED]
Subject: Nested classes


Hi all,

I am using an ActionForm with a collection of Rows which should be
editable. 

My ActionForm contains a property getRow(int i) which returns a bean
with the row's properties. 

Everything work perfectly, when the class returned from getRow(int) is
a standalone class. But as soon as I make this class a nested class
of my ActionForm, struts complains, if cannot find property setters:

This works:

public class MyForm ... {
public MyRow getRow(int i) {
...;
}
}

public class MyRow {
public setProperty(String value) {
...;
}
}


This does not: (cannot find property setter for row[0].property)

public class MyForm ... {
public MyRow getRow(int i) {
...;
}

public static class MyRow {
public setProperty(String value) {
...;
}
}


I'd really like to use nested classes. Is there a way?

--
gR





RE: Netbeans Support of Struts

2001-07-02 Thread Laine Donlan

Netbeans 3.2 has support for execution of JSPs and Servlets and with
some slight tweaking you can also debug a web-app.  Forte 4j 3.0 has a
little better support for this, but seems to still have some issues .
Both of them have Tomcat integrated as plug-ins and have pretty good
support for JSP editing.

Laine

-Original Message-
From: Cook, Levi [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 2:09 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Netbeans Support of Struts


Not directly--

I have, however, added Tomcat to my struts projects and ran the entire
process within NetBeans.

-- Levi

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: Netbeans Support of Struts
> 
> 
> Does the Netbeans IDE support the creation of Struts applications and
> running/debugging them inside Netbeans?
> 
> Dan
> 
> 



indexed tags (was - How can I pass extra information on Submit button?)

2001-06-26 Thread Laine Donlan

Dave -

I have been off the list for a while so I missed your original post.
Any idea if these indexed tags might make it into the formal releases?
We are beginning the process of transisitioning to the final 1.0 release
but would wait for an early 1.1 release if this would be included.

One other valuable thing I would think that might be useful to add to
the indexing would be some sort of property depth attribute.  In many
cases our form classes are merely wrappers for value objects (which in
some cases have their own arrays of value objects) so our form
properties may end of looking something like:



Thanks

Laine
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 4:10 PM
To: [EMAIL PROTECTED]
Subject: Re: How can I pass extra information on Submit button?




As already posted to the list, I have been working to change most of the
tags to
generate indexed names within an iterate loop, for just this kind of
situation.

I have just changed the code for submit, so that the index of your
iterated
collection is added to the name ie name="submit[0]" etc.  In your action
you can
then check which button was pressed, and display details for this
record.
Avoids javascript!

I am attaching an updated zip file to include this.  When I get some
time, I
will post all this to the dev list, to see about getting it added to
Struts.

Instructions as per previous posting:


Instructions for use:
- unpack attached zip file (this mailing list only accepts messages <
100K!!)
and copy .java files to ../org/apache/struts/taglib/html/
- rebuild struts
- add the struts-html.tld to your WEB-INF directory
- within an iterate tag, simply add "indexed=true" to the tag you wish
to use.
Eg to produce the text tag

  

use:
  
  ...

  ...
  

[in this case, simply do:  

Hope this helps,

Dave

(See attached file: struts indexed files.ZIP)





Peter Alfors <[EMAIL PROTECTED]> on
06/25/2001
03:39:28 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: How can I pass extra information on Submit button?




You could place the id in the name of the submit button...  Then the
action
could parse the name of the submit button that was pressed for the
id
There must be a better method than this... But I have not come across
this
before, and that is what popped in my head.

Or.. If you can use javascript, you can set the form action (with the
id) and
submit the form with a simple javascript call.
However, you must be able to gaurentee that all users will have
javascript
enabled.
We do this... (But we are able to force our users to enable javascript)

Pete


Jerzy Kalat wrote:

> Yes, you can see it already in my piece of code, the first 
>
> - Original Message -
> From: "Peter Alfors" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 25, 2001 3:24 PM
> Subject: Re: How can I pass extra information on Submit button?
>
> > Are you going to place a button next to each record in the list?
> >
> >
> > Jerzy Kalat wrote:
> >
> > > Thanks,
> > >
> > > Well, I know about this solution, but they insist on button.
> > >
> > > - Original Message -
> > > From: "Peter Alfors" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, June 25, 2001 3:18 PM
> > > Subject: Re: How can I pass extra information on Submit button?
> > >
> > > > You could use a link rather than the submit button.
> > > > Then when you iterate through your result-set, you just add the
'id'
> to
> > > > the link.
> > > >
> > > > Pete
> > > >
> > > >
> > > > Jerzy Kalat wrote:
> > > >
> > > > > Hi, I list many records on the form. Each record has 'Details'
> submit
> > > > > button, which suppose to flip form from 'List'mode to
'Details'
> mode,
> > > > > where only 1 record is visible with all it fields. On my jsp
page I
> > > > > have:   > > > > name="<%= Constants.GEO_ENTITY_LIST %>">
> > > > >  
> > > > > 
> > > > > 
> > > > ><%!
WHAT
> > > > > SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN
'position'?
> > > > > %>
> > > > > 
> > > > >   
> > > > >   
> > > > > 
> > > > >  
> > > > >   I tried different things here but it does
not
> work,
> > > > > or produce error. Any hints how to do it, or is there better
way to
> > > > > approach it? Thanks in advance, JK
> > > >
> >




RE: How can I pass extra information on Submit button?

2001-06-25 Thread Laine Donlan

In a similar situation we have used a hidden input to do this.  All you
would need is a hidden input for your position and then add an onclick
event to each submit button that would set the value of the input based
on the index of your iterate loop.

For example:
form
hidden - position
iterate
submit onclick="this.position.value=<%index of loop%>
iterate
form

Or perhaps it would make more sense to submit the selected if instead of
the position in the loop.  Hope this helps.

Laine

-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 3:39 PM
To: [EMAIL PROTECTED]
Subject: Re: How can I pass extra information on Submit button?



You could place the id in the name of the submit button...  Then the
action
could parse the name of the submit button that was pressed for the
id
There must be a better method than this... But I have not come across
this
before, and that is what popped in my head.

Or.. If you can use javascript, you can set the form action (with the
id) and
submit the form with a simple javascript call.
However, you must be able to gaurentee that all users will have
javascript
enabled.
We do this... (But we are able to force our users to enable javascript)

Pete


Jerzy Kalat wrote:

> Yes, you can see it already in my piece of code, the first 
>
> - Original Message -
> From: "Peter Alfors" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 25, 2001 3:24 PM
> Subject: Re: How can I pass extra information on Submit button?
>
> > Are you going to place a button next to each record in the list?
> >
> >
> > Jerzy Kalat wrote:
> >
> > > Thanks,
> > >
> > > Well, I know about this solution, but they insist on button.
> > >
> > > - Original Message -
> > > From: "Peter Alfors" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, June 25, 2001 3:18 PM
> > > Subject: Re: How can I pass extra information on Submit button?
> > >
> > > > You could use a link rather than the submit button.
> > > > Then when you iterate through your result-set, you just add the
'id'
> to
> > > > the link.
> > > >
> > > > Pete
> > > >
> > > >
> > > > Jerzy Kalat wrote:
> > > >
> > > > > Hi, I list many records on the form. Each record has 'Details'
> submit
> > > > > button, which suppose to flip form from 'List'mode to
'Details'
> mode,
> > > > > where only 1 record is visible with all it fields. On my jsp
page I
> > > > > have:   > > > > name="<%= Constants.GEO_ENTITY_LIST %>">
> > > > >  
> > > > > 
> > > > > 
> > > > ><%!
WHAT
> > > > > SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN
'position'?
> > > > > %>
> > > > > 
> > > > >   
> > > > >   
> > > > > 
> > > > >  
> > > > >   I tried different things here but it does
not
> work,
> > > > > or produce error. Any hints how to do it, or is there better
way to
> > > > > approach it? Thanks in advance, JK
> > > >
> >



RE: Unchecking radio buttons?

2001-05-09 Thread Laine Donlan

Sorry about that - here is the code again - there should be a zip file
attached.  I do not think that this code is going to be included in
Struts because it relies on some java script and therefore may not be
100% with all browsers, and would not work if a user disable j.s.
However it works well for us as we have control over the user
environment.


Laine


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Unchecking radio buttons?




Thanks for that (although I don't like inserting scriptlets!).

My problem, though, is that the underlying value in my form bean is not
being
displayed in the checkbox - it is set to FALSE, and yet the box appears
checked.

Is this an error in Struts?  Also, am concerned that the HTML spec is
not being
implemented with the "checked" attribute being unavailable.  Wouldn't it
be easy
to add?

Laine, is the code you submitted going to be added to Struts?  I didn't
get any
code in the mail by the way!

Cheers,

Dave




"Spencer Smith" <[EMAIL PROTECTED]> on
05/08/2001
05:44:30 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: Unchecking radio buttons?




All you really have to do is to manually set the checkbox value to false
after you display the current value:

ie:

   // notice that no value is
set
<% MyForm.setMycheckbox(false) %>// do this after you display
the
above line in same JSP

where:

protected boolean mycheckbox;// mycheckbox is of type boolean (small
b)

and you're in business.  If the checkbox is already checked it will
still be
checked when you do a submit, because it will read the value on the
page.
If you uncheck it though, it will be false which is correct too.

:-)




- Original Message -
From: "Laine Donlan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 2:30 PM
Subject: RE: Unchecking radio buttons?


Here is some code that I submitted to the dev list a while back. It
might be useful as it solves the problem of the 'unchecked' checkbox
submit.  Hope it helps.

Laine

-

In order to capture the act of a user unchecking checkboxes and to
initialize the checkbox as checked/unchecked with non boolean values I
made a couple of changes to the
org.apache.struts.taglib.html.CheckboxTag.

Basically the changes consisted of:

1) Using the supplied value attribute to match against the bean property
value and generating the 'checked' attribute accordingly.  If the value
is not supplied then the previously implemented method of checking 'on',
'true', or 'yes' is performed.  So I do not think that default behavior
should be affected.

2) Added support for two new attributes - submitUnchecked (boolean) and
uncheckedValue (String).  Neither of these attributes are required and
the submitUnchecked defaults to 'false'.  If a user chooses to submit
unchecked values then two form inputs will be generated that facilitate
this function.  See below for an example:

Tag notation -


Generated HTML -

 (where 0 is
the current value of the bean property)

So in this scenario the actual checkbox param in the request will be
ignored and the hidden input will be used to maintain the bean property
that the user wishes.

In the case where the user does not provide the two new attributes the
html will be generated as it is today with the exception of the
determination of the checked or unchecked mentioned above.

I could not see how this functionality was present in the current
checkbox tag without explicitly declaring two tags and adding javascript
to the checkbox tag.  Even then some scripting may be required to
differentiate between the two inputs and to initialize the hidden one.
If I missed something could someone point me in the right direction.  I
have attached the CheckboxTag.java file for review and use if anyone is
interested.

Thanks.  Comments would be appreciated.

Laine



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 5:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Unchecking radio buttons?




thanks for the replies.

Yes, I need the checkbox capabilities, not radio buttons.

Question with these, though - is there an equivalent to the "checked"
attribute
in HTML reference speck?

I am creating checkbox with the following:  , and underlying value of notFolders is "false".  Would
therefore
expect checkbox to appear as unchecked, and True to be submitted is
checkbox is
clicked.

Showing up as already checked, however.

Would appreciate any help...

Dave












 CheckboxTag.zip


RE: Unchecking radio buttons?

2001-05-08 Thread Laine Donlan

Here is some code that I submitted to the dev list a while back. It
might be useful as it solves the problem of the 'unchecked' checkbox
submit.  Hope it helps.

Laine

-

In order to capture the act of a user unchecking checkboxes and to
initialize the checkbox as checked/unchecked with non boolean values I
made a couple of changes to the
org.apache.struts.taglib.html.CheckboxTag.  

Basically the changes consisted of:

1) Using the supplied value attribute to match against the bean property
value and generating the 'checked' attribute accordingly.  If the value
is not supplied then the previously implemented method of checking 'on',
'true', or 'yes' is performed.  So I do not think that default behavior
should be affected.

2) Added support for two new attributes - submitUnchecked (boolean) and
uncheckedValue (String).  Neither of these attributes are required and
the submitUnchecked defaults to 'false'.  If a user chooses to submit
unchecked values then two form inputs will be generated that facilitate
this function.  See below for an example:

Tag notation -


Generated HTML -

 (where 0 is
the current value of the bean property)

So in this scenario the actual checkbox param in the request will be
ignored and the hidden input will be used to maintain the bean property
that the user wishes.

In the case where the user does not provide the two new attributes the
html will be generated as it is today with the exception of the
determination of the checked or unchecked mentioned above.

I could not see how this functionality was present in the current
checkbox tag without explicitly declaring two tags and adding javascript
to the checkbox tag.  Even then some scripting may be required to
differentiate between the two inputs and to initialize the hidden one.
If I missed something could someone point me in the right direction.  I
have attached the CheckboxTag.java file for review and use if anyone is
interested.
 
Thanks.  Comments would be appreciated.

Laine



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 5:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Unchecking radio buttons?




thanks for the replies.

Yes, I need the checkbox capabilities, not radio buttons.

Question with these, though - is there an equivalent to the "checked"
attribute
in HTML reference speck?

I am creating checkbox with the following:  , and underlying value of notFolders is "false".  Would
therefore
expect checkbox to appear as unchecked, and True to be submitted is
checkbox is
clicked.

Showing up as already checked, however.

Would appreciate any help...

Dave






RE: help with JavaScript and text box.

2001-04-09 Thread Laine Donlan

Alex -

Try using form['requisitionLines.requiredOnDate'].value = .  I was
having the same problem and this worked.

Hope it helps

Laine

-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 4:26 PM
To: Struts
Subject: help with JavaScript and text box.


Hi, I have a text box mapped to a bean via:



My form is called requisition.

If I try to set the value of the text box via JavaScript I have to
access
the box via
form.object or requisition.requsitionLine.requiredOnDate.

JavaScript can't find the box due to the numerous '.'.

Is there a way around this to access the box. Any help is appreciated.

Regards

Alex




Attempt to reduce/alleviate the loosely coupled nature of Struts

2001-04-02 Thread Laine Donlan

All -

I was hoping to tap the brain trust out there for any ideas on how to
address the following problem:

In the system I am currently working on there is a large amount of code
generated based on a database schema.  For example: for any given table
in the schema an entity bean is generated with some basic functionality
as well as a javabean (maps to the columns in the table) that is used to
pass data between the back-end to the front-end.

>From a Struts perspective the majority of our forms maintain a 'has-a'
relationship with on or more of these javabeans.  Therefore the
properties in the JSP's map directly into the generated javabeans.  This
has been working beautifully thus far.  However, we made some pretty
significant schema changes for the next release of our product, and am
now facing the problem of re-working the system to function against the
new schema.

The main problem is, as the entire code base is being re-worked we
cannot deploy and run the system.  Therefore, it is not a trivial task
to search through the JSP code to determine what properties will break
the next time a page is run.  Just as a baseline for the size of the
system we have roughly 500 jsps that use Struts tags and 50 + form
objects that may have changed structure based on the newly introduced
schema.

My initial thoughts on this were to somehow scan through the JSP's and
attempt to resolve the proper form associated with it and then attempt
to call the appropriate getters and setters using the Struts facilities.
I would preferably like to piggyback on the work already being done by
the JSP compilation services (Jasper, etc) but am having a little
difficulty determining if I can insert some process along the way or
mimic the function using the services components.

The eventual out put of such a process could be something as simple as a
report of what properties will be problematic and in what pages they
live.  Then work could be done to pro-actively fix these places while
the rest of the system is being re-worked.

Any thoughts would be greatly appreciated.

Laine







RE: problem using weblogic 6 and struts 1.0

2001-03-28 Thread Laine Donlan

It looks like you are ending you action tag in the first tag (i.e
) .  Try removing that and it should be fine.
 
Laine

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 12:09 PM
To: '[EMAIL PROTECTED]'
Subject: problem using weblogic 6 and struts 1.0


Running this example on weblogic 6 gives the following error. Can
somebody point out the mistake i am making...Below is the action mapping
where i am getting the error. The error is got at the  tag.
 



   

  
 

Parse Fatal Error at line 271 column 13: The element type
"action-mappings" must be terminated by the matching end-tag "
".
org.xml.sax.SAXParseException: The element type "action-mappings" must
be terminated by the matching end-tag "".
at
weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:10
08)
at
weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(
XMLDocumentScanner.java:634)
at
weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocum
entScanner.java:683)
at
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.di
spatch(XMLDocumentScanner.java:1187)
at
weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumen
tScanner.java:380)
at
weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
at
weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)
at
weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:105)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:13
17)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.
java:687)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp
l.java:625)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl
.java:573)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl
.java:517)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServ
letContext.java:940)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppSer
vletContext.java:915)
at
weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:483)
at
weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:394)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:116)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Deploym
entTarget.java:283)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Deploym
entTarget.java:109)
at
weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.j
ava:76)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBean
Impl.java:559)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.ja
va:545)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configuration
MBeanImpl.java:285)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:431)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:172)
at $Proxy30.addWebDeployment(Unknown Source)
at
weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeplo
yment(WebServerMBean_CachingStub.java
:985)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Deploym
entTarget.java:269)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Deploym
entTarget.java:109)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBean
Impl.java:559)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.ja
va:545)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configuration
MBeanImpl.java:285)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(C
onfigurationMBeanImpl.java:405)
at
weblogic.management.inter

Indexed bean property names and Javascript

2001-02-18 Thread Laine Donlan

I was wondering if anyone has had experience using javascript with form
elements containing nested properties.  Basically I am trying to avoid
looping through the forms elements and matching names to find the
element I want.  However I am having a problem with javascript not
liking form elements names with "."'s in them.

i.e. 
A form generated by the text tag like the following: 


cannot be accessed by javascript using the
form.someBean.someProperty.value.  

Has anyone had success doing anything like this, or am I missing
something all together?  Thanks in advance.

Laine
 



Linking actions together

2001-01-30 Thread Laine Donlan

All -

Is it possible to link actions together via the action forward
mechanism.  The following is an example of what I am trying to
accomplish but am having a little difficulty getting it to work:










I tried the above with and without re-direct with no success.  Any
thoughts would be appreciated on getting the above to work or other ways
to solve the same problem would be appreciated.

Thanks

Laine



Experience with/best practices to avoid memory leaks or memory related problems with Struts

2001-01-17 Thread Laine Donlan

All -

I was wondering if anyone had experience with Struts as it relates to
managing the amount of objects created by the Framework.  I am
relatively new to Struts as well as jsp development and would appreciate
any pointers or 'things to keep in mind' to avoid resources being
wasted.

Thanks in advance.

Laine



RE: Invoking EJB from Action classes

2001-01-16 Thread Laine Donlan

>Roger Kjensrud wrote:

>> Jannik,
>>
>> thanks for your input.
>>
>> The concept of the EJB session manager returning references to other
EJBs is
>> interesting. This EJB must be a stateful EJB with one instance per
session,
>> correct? Not having the lookup and create logic in the Action class
means
>> that this code does not have to be duplicated in a non-HTTP
environment
>> where the Action classes probably don't exist. You just have to
lookup the
>> session manager, and it will return references for you.
>>
>> I don't fully understand the JNDI concept with this approach. From
your
>> Action class you tell the session manager to return a specific EJB
>> reference, so you have to give it a JNDI name, correct? If this is
true,
>> where is the name stored? Hard coded? Config file?
>>

>The web application deployment descriptor includes several elements
(such as
>) for precisely this purpose.  The details of how they are
used is
>defined in the J2EE specification, which you can grab via
>.

I was under the impression that the  entries were not required
elements of the spec.  And that not all servers.  Isn't support slated
for Tomcat 4.0?  Has anyone implemented it in Weblogic 5.1 sp 8.

Thanks

Laine


>>
>> Thanks,
>> Roger
>>

>Craig McClanahan


>
> > -Original Message-
> > From: Jannik Nørgaard Steen [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, January 13, 2001 3:09 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Invoking EJB from Action classes
> >
> >
> > Hi,
> >
> > we are storing references to our EJB in the HTTP-session context and
it
> > works just fine.
> >
> > We have created an EJB that acts as a session manager. This manager
can
> > supply clients with all EJB references to other EJB's one might
> > need during
> > a HTTP-session.
> >
> > On the client side we have a class (to represent a user) that
> > implements the
> > HttpBindingListener interface. When this class is bound to the
> > HTTP-session
> > a reference to the session manager is placed in the HTTP-session
> > and we are
> > ready to go.
> > Once a EJB reference (remote interface) is returned by the session
manager
> > it is stored in the HTTP-session by one of our action classes.
> > When the HTTP-session is invalidated remove() is called on all EJB
> > references stored in the
> > HTTP-session. The last to be removed is the session manager so it
> > will have
> > a chance to end transactions.
> >
> > In question of the JNDI lookup, we use a CORBA server (we call it a
> > preferences manager) to supply all clients with the JNDI name
> > space for the
> > EJB's.
> >
> >
> > Cheers,
> >
> > Jannik Nørgaard Steen
> > Software developer
> > Digital Zone International A/S
> >
> > - Original Message -
> > From: "Roger Kjensrud" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, January 12, 2001 9:50 PM
> > Subject: Invoking EJB from Action classes
> >
> >
> > > Hello,
> > >
> > > I've searched archive about calling EJBs from the Action classes
and how
> > to
> > > store the EJB reference, and there did not seem to be consensus
> > of how to
> > do
> > > this. Since the Action class needs to be coded thread-safe, and
> > you would
> > > like to keep the EJB reference, at least for stateful session
EJBs, it
> > won't
> > > work to use an instance variable to store the reference.
> > >
> > > What about storing the reference in the session?
> > >
> > > So, in the perform() method of the Action class you will check to
see if
> > the
> > > session contains the reference, and if not you will call a method,
could
> > be
> > > static, that returns the ejbhome reference. This reference can be
stored
> > on
> > > the session or you can call the create() method on the ejbhome to
get a
> > > reference to the ejb and store this to the session.
> > >
> > > I would also consider creating a custom mapping where I would
> > specify the
> > > EJB JNDI lookup name in the struts-config.xml file for this
particular
> > > Action class avoiding hardcoding.
> > >
> > > Feedback on this approach is appreciated,
> > >
> > > thanks,
> > > Roger Kjensrud
> > >
> > >
> >



Embedding template's within other custom tags

2000-12-28 Thread Laine Donlan

I am attempting to build a template for creating easily customizable
tables using jsp templating.  Basically I have a result set that is
returned and am using the metadata to build the basic table structure
(headers, etc) and would like to iterate through the rows and call a
'row template' for each row to be displayed.  





However... because the tempalte:get tag calls a flush on the output
stream, I get an error .  Any thoughts on
how this could be accomplished would be appreciated.

Laine



RE: agh! Suddenly Tomcat does not start with struts!

2000-12-28 Thread Laine Donlan

Ned -

I ran into the same type of problem when trying to start up Tomcat
(Inside Forte Internet Edition) when I also had the Jsdkee1.2.1 in my
classpath. The j2ee jar included with that dev kit had a conflicting
version of the Tomcat classes and was causing some problems.

Good luck

Laine

-Original Message-
From: Ned Seagoon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 28, 2000 8:00 AM
To: [EMAIL PROTECTED]
Subject: agh! Suddenly Tomcat does not start with struts!



Hi Guys, hope you all had a good xmas...

I tried to start up struts-29/11/00 with tomcat 3.1 (inside VAJ 3.5p2)
today 
and had the following errors. Anybody got any ideas? BTW, it worked ok
last 
week!

I also checked all the .xml files and they don't seem to have any
structural 
errors in them.

Cheers
Ned

error:
Thread[main,5,main] (Alive)
Exception Caught: java.lang.ArrayIndexOutOfBoundsException


console:
Context log path="/pw" :tomcat.errorPage: init
Context log: path="/pw" XmlReader - init  /pw 
C:\jakarta\jakarta-struts\web\paine
Context log: path="/pw" Reading C:\web\conf\web.xml
Context log: path="/pw" Reading 
C:\jakarta\jakarta-struts\web\paine\WEB-INF\web.xml
Context log: path="/pw" Loading -2147483646 jsp
Context log path="/pw" :jsp: init
Context log: path="/pw" Loading -2147483646 default
Context log path="/pw" :default: init
Context log: path="/pw" Loading 2 action
Context log path="/pw" :action: init
Context log path="/pw" :action: Loading application resources from
resource 
org.secretsquirrel.pwdemo.ApplicationResources
Context log path="/pw" :action: Initializing configuration from resource

path /WEB-INF/struts-config.xml

Stack trace attached.

_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.