RE: ejb's and tomcat

2003-10-07 Thread Brian Richards
www.jboss.org

-brian 

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 07, 2003 9:51 PM
To: [EMAIL PROTECTED]
Subject: ejb's and tomcat

Hi!
does tomcat support ejb's. I'm building a web app which uses struts. i'm
using  ejb's  for the model part.
can i deploy the ejb component on tomcat?
what other alternate ways are there to do so?

thanks
cheers
ajay

_
ninemsn Premium transforms your e-mail with colours, photos and animated
text. Click here  http://ninemsn.com.au/premium/landing.asp


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




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



Books

2003-10-07 Thread Brian Richards
I'm a complete struts newb. I got tomcat 4.1 installed along with struts and
eclipse. I was wondering if you guys could recommend a book for learning
struts. Not necessarily a reference book. But it would be nice to have some
good examples. Getting laid off has me starving to learn something new. So
I'm trying to think of *something* to implement with struts. So yeah, book
recommendations?


-Brian Richards


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



RE: JavaScript Form/submit Function

2002-03-11 Thread Brian Richards

Sounds like you have an element in your form named submit.  Check your
html and make sure none of your elements are named submit.

bsr

-Original Message-
From: Bettina Gaus [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 9:57 AM
To: '[EMAIL PROTECTED]'
Subject: JavaScript Form/submit Function


Hello,

i tried to use the document.forms[0].submit() function in the onchange
property of a html:select tag, but i allways received the error
message: The object does not support this property or method. It must
be the
submit() function, because i.e the document.forms[0].length property
gives a result.

Does anybody got the same problem or can anybody help me

Bettina


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





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




RE: How to fill a String[] property?

2002-03-05 Thread Brian Richards

Try

void setActivities(int index, String parm)
{
  mActivities[index] = parm;
}



-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 2:02 PM
To: Struts
Subject: How to fill a String[] property?


Hi,
I have a form with a string array property 'Activities'. The form has
the following methods:

private String[] mActivities = new String[6];
public void setActivities(String[] parm1)   { mActivities = parm1;  }
public String[] getActivities() { return mActivities;   }

On my page I need 6 textboxes to be filled in each representing an
element in the mActivities array. I have tried the following:

tdhtml:text property=item.issue.chargeInfo.activities[0] //td
... tdhtml:text property=item.issue.chargeInfo.activities[5]
//td

but I get bean.populate errors.

Any help is appreciated.

Alex


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





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




RE: How to fill a String[] property-updated question.?

2002-03-05 Thread Brian Richards

The problem you're running into is that your form bean doesn't match the
Bean pattern for indexed properties.  In the populate method of the
BeanUtil class a check for IndexedPropertyDescriptor is done on the form
bean.  The javadocs for IndexedPropertyDescriptor state:

... if the argument name is fred, it will assume that there is an
indexed reader method getFred, a non-indexed (array) reader method
also called getFred, an indexed writer method setFred, and finally a
non-indexed writer method setFred. 

So to have a correct Bean, you need two getters and two setters for an
indexed property.  One for the entire array and one for an individual
element of the array.  

I've always though it is a bit confusing that the tags use the
non-indexed reader while the BeanUtils use the index writer.  That's how
it will populate the page initially but not populate the bean on the
post.  

Hope this helps

bsr


-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 3:20 PM
To: Struts
Subject: How to fill a String[] property-updated question.?


Hi,

just an update. Before I access the page I initialized the String[]
array elements to 1...6. When I get to the page the values in the
String[] array are properly displayed in the corresponding text boxes
but when I submit the page I get the following error:

java.lang.IllegalArgumentException: array element type mismatch
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.ja
va:8
51)
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.ja
va:7
85)

I don't understand why I can view the elements but not save the
elements.

Thanks for any info.

Alex


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





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




RE: submitting with link

2002-02-20 Thread Brian Richards

You need to make the submit a method call.

document.forms[0].submit();


bsr

-Original Message-
From: Syed Niaz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 20, 2002 8:51 AM
To: Struts Users Mailing List
Subject: submitting with link



Hi

Iam unable to submit a form using a link 

function fna()
{
alert(document.forms[0].name);
document.forms[0].submit ;
}
html:link href=javascript:fna()click/html:link

No error is generated , but the screen simply does not move to the
location defined in struts.config .

Instead , html:link page=/convert.do?name=aasfsdfsfsfsdf
/html:link works but iam unable to assign values to hidden variables .

Thanks ,

Regards,
Syed Niaz 


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





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




RE: problem with FormBean

2002-02-13 Thread Brian Richards

Make sure you have the input parameter set in the appropriate action tag
of the struts-config.xml.  The parameter should be set to the page you
posted from.

bsr



-Original Message-
From: Dua, Amit [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 13, 2002 9:35 AM
To: 'Struts Users Mailing List'
Subject: problem with FormBean


Hi 
I am using form bean for the first time in struts .
I wrote a simple form bean which sets and gets values.
Also, I override the validate method in form bean with my logic. My
action class does not do anything other than forwarding the control to
some xyz jsp on success.

So, now when I put in correct values for the text values(where
validation succeeds and there is no error). It goes to the correct page
i.e. xyz jsp.

But when I do not put correct values in text boxes. It shows me HTTP 500
error.


Can Any one tell me what I am doing wrong.


Amit

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





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




RE: Initializer servlet?

2002-02-08 Thread Brian Richards

The 2.3 Servlet API has Lifecyle Events.  You just have to use the
listener tag in your web.xml to specify a class that implements the
ServletContextListener interface.  There is an explanation at

http://developer.java.sun.com/developer/technicalArticles/Servlets/servl
etapi2.3/

under the Lifecyle Events section.  I've use this a few times in
Tomcat 4 with no problems.  

Bsr


-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 08, 2002 9:21 AM
To: Struts Users Mailing List
Subject: Initializer servlet?


Hello.

I've seen a few posts about initializer servlets that basically does
whatever setup/housekeeping work needs to be done for the application.
How do you guarantee that this servlet will run before anything else?
Is this something you can define within your servlet container? If so,
does anyone know how you'd do this with Tomcat?

Thanks,
-Mark


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





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