Ted Husted strut by strut tutorial in weblogic5.1/jbuilder

2002-01-31 Thread Knoll, Zach

Hi I am just starting to learn about Struts and see how it can be used. I
tried starting with Ted Husted's strut by strut tutorial. I have weblogic5.1
integrated with Jbuilder4 enterprise. I downloaded the struts-stub.war and
edited my weblogic.properties file as follows 
weblogic.httpd.webApp.struts1=C:/Jakarta/struts_husted_tutorial/struts-stub.
war
upon restarting the server I tried going to the URL
http://localhost:7001/struts1. It compiles the index jsp so it seems that
the war file was deployed somewhat correctly but it cant find the needed
classes. My weblogic.out log is posted below but the main error seems to be
action: Error creating ActionForm instance of class 'ext.stub.samples.Form'
java.lang.ClassNotFoundException: ext.stub.samples.Form .I would manually
add these classes to my jbuilder classpath if they were in some kind of jar
(which I could go through the trouble of doing) but I want to know first if
this should be neccessary every time I want to deploy a war file on
weblogic?   


Thu Jan 31 12:48:40 PST 2002:I WebAppServletContext-struts1 *.jsp: init
Thu Jan 31 12:48:40 PST 2002:I WebAppServletContext-struts1 *.jsp: param
verbose initialized to: true Thu Jan 31 12:48:40 PST 2002:I
WebAppServletContext-struts1 *.jsp: param packagePrefix initialized to:
jsp_servlet Thu Jan 31 12:48:41 PST 2002:I WebAppServletContext-struts1
*.jsp: param compileCommand initialized to: javac Thu Jan 31 12:48:41 PST
2002:I WebAppServletContext-struts1 *.jsp: param srcCompiler initialized
to weblogic.jspc Thu Jan 31 12:48:41 PST 2002:I
WebAppServletContext-struts1 *.jsp: param superclass initialized to null
Thu Jan 31 12:48:41 PST 2002:I WebAppServletContext-struts1 *.jsp: param
workingDir initialized to:
C:\Jakarta\struts_husted_tutorial\WEB-INF\_tmp_war_struts1 Thu Jan 31
12:48:41 PST 2002:I WebAppServletContext-struts1 *.jsp: param
pageCheckSeconds initialized to: 1 Thu Jan 31 12:48:41 PST 2002:I
WebAppServletContext-struts1 *.jsp: initialization complete Thu Jan 31
12:48:41 PST 2002:I WebAppServletContext-struts1 *.jsp: 
##


##
pageCheckSeconds over-ruled in JSPServlet to : 1
##


##
 Thu Jan 31 12:48:41 PST 2002:I WebAppServletContext-struts1 action:
Processing a GET for /stub/Input Thu Jan 31 12:48:41 PST 2002:I
WebAppServletContext-struts1 action: Setting locale 'en_US' Thu Jan 31
12:48:42 PST 2002:I WebAppServletContext-struts1 action:  Looking for
ActionForm bean under attribute 'stubForm' Thu Jan 31 12:48:42 PST 2002:I
WebAppServletContext-struts1 action:  Creating new ActionForm instance of
class 'ext.stub.samples.Form' Thu Jan 31 12:48:42 PST 2002:E
WebAppServletContext-struts1 action: Error creating ActionForm instance of
class 'ext.stub.samples.Form' java.lang.ClassNotFoundException:
ext.stub.samples.Form   at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)  at
java.security.AccessController.doPrivileged(Native Method)  at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)  at
java.lang.ClassLoader.loadClass(ClassLoader.java:297)   at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)   at
java.lang.ClassLoader.loadClass(ClassLoader.java:253)   at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)   at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:120) at
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.java:
1700)   at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1562)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)   at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:158) at
weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:109)  at
org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173)
at jsp_servlet._index._jspService(_index.java:96)   at
weblogic.servlet.jsp.JspBase.service(JspBase.java:27)   at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)   at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:138)   at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:915) at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879) at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)   at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) 


**
This email and any files

Strut-by-strut adaptation /classpath (validator.jar) problem

2001-09-12 Thread bill milbratz

Hello,

This is a repost. I posted a question about this the other day, but never 
saw it in the email list. (I was transitioning from the digest to the 
regular subscription so probably missed it).

I'm adapting the strut-by-strut example and found an odd-ish classpath / 
jsp-compilation problem.

I get this message on the jsp page:

java.lang.NoClassDefFoundError: 
com/wintecinc/struts/action/ValidatorForm 
atjava.lang.ClassLoader.defineClass0(Native Method) 
at   java.lang.ClassLoader.defineClass(Unknown Source)

I use our projects standard ant script to compile and build the application.

My web-inf/lib directory (in the war file) has:
struts.jar
jakarta-regexp.jar
validator.jar

Since this directory contains both struts.jar and validator.jar,  the jsp 
page should find the validator.jar classes. (I confirmed that validator.jar 
contains the class it's looking for.)

I noted that our build.xml copies the all the web-application libraries 
into to *both* the ear's and the war's lib directories. i.e., the ear file 
*also* contains a lib directory with these files 
(struts.jar,jakarta-regexp.jar, validator.jar).

I've read about class not found exceptions occuring if struts.jar is 
deployed in wrong library.

any suggestions?  Thanks.


bill




Re: Strut-by-strut adaptation /classpath (validator.jar) problem

2001-09-12 Thread Ted Husted

It may be that there are multiple copies of the jar on your server's
path now, which, ironically, can cause NoClassDefFoundErrors. 

bill milbratz wrote:
 
 Hello,
 
 This is a repost. I posted a question about this the other day, but never
 saw it in the email list. (I was transitioning from the digest to the
 regular subscription so probably missed it).
 
 I'm adapting the strut-by-strut example and found an odd-ish classpath /
 jsp-compilation problem.
 
 I get this message on the jsp page:
 
 java.lang.NoClassDefFoundError:
 com/wintecinc/struts/action/ValidatorForm
 atjava.lang.ClassLoader.defineClass0(Native Method)
 at   java.lang.ClassLoader.defineClass(Unknown Source)
 
 I use our projects standard ant script to compile and build the application.
 
 My web-inf/lib directory (in the war file) has:
 struts.jar
 jakarta-regexp.jar
 validator.jar
 
 Since this directory contains both struts.jar and validator.jar,  the jsp
 page should find the validator.jar classes. (I confirmed that validator.jar
 contains the class it's looking for.)
 
 I noted that our build.xml copies the all the web-application libraries
 into to *both* the ear's and the war's lib directories. i.e., the ear file
 *also* contains a lib directory with these files
 (struts.jar,jakarta-regexp.jar, validator.jar).
 
 I've read about class not found exceptions occuring if struts.jar is
 deployed in wrong library.
 
 any suggestions?  Thanks.
 
 bill



Strut by Strut Example by Ted Husted

2001-09-12 Thread Nathan Anderson

I am trying to learn Struts, and I am impressed by the collection of
material on www.husted.com.  I have been able to successfully install and
run the tutorial from www.jspinsider.com, but the Strut by Strut example
doesn't seem to work.  Here is the system I'm running Struts on:

Windows 2000 [sp2]
Tomcat 3.2.3
Struts 1.0
JCreator v2.0 is my IDE [basically a highlighting text editor].

Here is what happens.  I have downloaded and installed the struts-stub.war,
then started up Tomcat.  When I point my browser to
http://localhost:8080/struts-stub/ I properly get directed to
http://localhost:8080/struts-stub/index.jsp.  The page displays, but when I
click on the Enter button nothing happens.  A snippet of the HTML source
follows.

Thanks for any help in this matter.

Nathan Anderson

---

form name=stubForm method=POST
action=/struts-stub/stub/Insert.do;jsessionid=67u3zh4l61 onsubmit=return
submitForm(this);

... [form fields omitted] ...

td align=right colspan=3nbsp;input type=hidden name=validate
value=0input type=submit name=submit value=ENTER
onclick=this.form.validate.value='1';nbsp;input type=submit
name=org.apache.struts.taglib.html.CANCEL value=CANCEL
onclick=this.form.validate.value='0';/td
/tr
/form
script language=JavaScript type=text/javascript
  !--
document.forms[stubForm].elements[property0].focus()
  // --
/script
SCRIPT LANGUAGE=Javascript1.1
!-- Begin
function validateStubForm(form) {
return null;
}
//  End --
/SCRIPT
script language=javascript
!--
function submitForm(form) {
  if (form.validate.value == 0) {
return true;
  }
  if (validateStubForm(form)) {
form.submit.value= ...;
return true;
  }
  else return false;
};
// --
/script




Re: [ANNOUNCMENT] Strut by Strut

2001-06-20 Thread Ted Husted

Sorry for the troubles with the inital WAR. I was experimenting with an
alternate configuration, which, as it turns out, is not compatible with
all versions of all containers. I've returned to the conventional
configuration, and you may wish to download the updated copy.

 http://www.husted.com/about/struts/struts-stub.zip 

Ted Husted wrote:
 
 A new article regarding building Struts applications is available at
 
  http://www.husted.com/about/struts/ 
 
 entitled Strut by Strut. Feedback is welcome. A followup article
 regarding using a database with Struts (Stepping Out) is nearly
 complete. Stay tuned.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel 716 737-3463.
 -- http://www.husted.com/about/struts/



Re: [ANNOUNCMENT] Strut by Strut

2001-06-20 Thread Ted Husted

If you want to convert an integer to a String on the fly, you can do
this:

/**
 * Return the script as int
 *
 * @return the script as int
 */
public int getScriptInt() {
return ( Integer.valueOf(this.script).intValue() );
}

Assuming the String has been validated first. 

To move the data from one bean to another, you can either use a bulk
setter or constructor

myBean.set( getScriptInt(),getTitle(),getCurrentDate() ); // or
new myBean( getScriptInt(),getTitle(),getCurrentDate() ); 

Or, if your internal bean is designed to accept Strings for incoming
data (as, say, RowSets are), then you could also have the ActionForm
bean generate a hash map that matched your internal bean's mutators with
the populate() method of Struts BeanUtil.

populate(myInternalBean,myActionForm.toMap());

Ryan Cornia wrote:
 
 Great article!
 
 I'm fairly new to Struts and am still struggling with ActionForm setters/getters vs. 
bean setters/getters. In your template file, all properties for both the form and 
bean are Strings. How would you implement an int property -
 
 In the form, it would it be -
 public String getProperty10() {
   return(this.property10);
 }
 
 public void setProperty10(String property10) {
   this.property10 = property10;
 }
 
 public int getProperty10Int() {
return this.property10.intValue();
 }
 
 In the bean, would it be? -
 
 int property10Int = 0;
 
 public int getProperty10Int() {
   return(this.property10Int);
 }
 
 public void setProperty10Int(int property10) {
   this.property10Int = property10;
 }
 
 If this is the case, how do you copy the properties from the FormBean to the Bean 
when the Action is done and validated?
 
 MyForm frm = (MyForm)form;
 MyBean bean = Should the bean be in the session?;
 
 /** What if I have 100 properties, is there a better way to set them all? **/
 bean.setProperty0(frm.getProperty0());
 .
 .
 .
 bean.setProperty10Int(frm.getProperty10Int());
 
 bean.writeToDatabase();
 
 Is this the best way to mesh all of this together?
 
 Thanks for all the hard work. It's a very valuable article.
 Ryan




Re: [ANNOUNCMENT] Strut by Strut

2001-06-20 Thread Ho Soo Aun



Ted Husted wrote:

 Sorry for the troubles with the inital WAR. I was experimenting with an
 alternate configuration, which, as it turns out, is not compatible with
 all versions of all containers. I've returned to the conventional
 configuration, and you may wish to download the updated copy.

  http://www.husted.com/about/struts/struts-stub.zip 

I download this WAR and its runs ok on JBOSS-2.2.2_Tomcat-3.2.2 on
win2kpro..
That was after I encounter this problem.

[EmbeddedTomcatSX] resolveEntity('-//Apache Software Foundation//DTD Struts
Configuration 1.0//EN',
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
[EmbeddedTomcatSX]  Resolving to alternate DTD
'jar:file:D:\JBoss_Tomcat\tomcat\webapps\struts-stub\WEB-INF\lib\struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd'

[EmbeddedTomcatSX] New org.apache.struts.action.ActionForward
[EmbeddedTomcatSX] Set org.apache.struts.action.ActionForward properties
[EmbeddedTomcatSX] Call
org.apache.struts.action.ActionServlet.addForward(ActionForward[welcome])
[EmbeddedTomcatSX] Pop org.apache.struts.action.ActionForward
[EmbeddedTomcatSX] New org.apache.struts.action.ActionForward
[EmbeddedTomcatSX] Set org.apache.struts.action.ActionForward properties
[EmbeddedTomcatSX] Call
org.apache.struts.action.ActionServlet.addForward(ActionForward[help])
[EmbeddedTomcatSX] Pop org.apache.struts.action.ActionForward
[EmbeddedTomcatSX] Parse Error at line 45 column -1: Element
struts-config does not allow form-beans here.
[EmbeddedTomcatSX] org.xml.sax.SAXParseException: Element struts-config
does not allow form-beans here.
[EmbeddedTomcatSX]  at
org.apache.crimson.parser.Parser2.error(Parser2.java:3013)
[EmbeddedTomcatSX]  at
org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(ValidatingParser.java:349)

Comparing the struts-config.xml  file with those in other struts example, I
move the form-beans element infront of global-forwards
and it works.
So the order is important here.

Just started to learn Struts.
Thanks

Soo Aun




RE: [ANNOUNCMENT] Strut by Strut

2001-06-19 Thread Kwang-Shi Shu

Hi,

I also encountered the same problem as Ho Soo.
Any work-around?

Shu, Kwang-shi  | Tel 732-460-7848
Village Networks, Inc.  | Fax 732-460-9851
246 Industrial Way West |
Eatontown, NJ 078724| email: [EMAIL PROTECTED]


-Original Message-
From: Ho Soo Aun [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 19, 2001 3:56 AM
To: [EMAIL PROTECTED]
Subject: Re: [ANNOUNCMENT] Strut by Strut


Sorry Ted,

I had just set up struts-1.0. and deploy struts-stub.war in
d:\Jboss_Tomcat\tomcat\webapps.
The examples from Struts-1.0 run all right.

But I had following error when running struts-stub.war off the box.
http://localhost:8080/struts-stub/index.jsp get

Error: 500

Location: /struts-stub/index.jsp

Internal Servlet Error:

javax.servlet.ServletException: Cannot find global ActionForward for
name welcome
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)

at
_0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0.
java:102)

at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)

at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)

at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)

at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)

at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

at java.lang.Thread.run(Unknown Source)

Root cause:

javax.servlet.jsp.JspException: Cannot find global ActionForward for
name welcome
at
org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:148)
at
_0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0.
java:89)

at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)

at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)

at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)

at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)

at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

at java.lang.Thread.run(Unknown Source)

Soo Aun


Ted Husted wrote:

 A new article regarding building Struts applications is available at

  http://www.husted.com/about/struts/ 

 entitled Strut by Strut. Feedback is welcome. A followup article
 regarding using a database with Struts (Stepping Out) is nearly
 complete. Stay tuned.

 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel 716 737-3463.
 -- http://www.husted.com/about/struts/




Re: [ANNOUNCMENT] Strut by Strut

2001-06-19 Thread Felix von Delius

On Sun, Jun 17, 2001 at 07:34:47PM -0400, Ted Husted wrote:
 entitled Strut by Strut. Feedback is welcome. A followup article
 regarding using a database with Struts (Stepping Out) is nearly
 complete. Stay tuned. 

When I deploy struts-stub.war under Resin, I get the following error:

500 Servlet Exception
c:\webapps\struts-stub\WEB-INF\struts-config.xml:67: expected a single
 top-level element at `form-validation' 

And I wonder why nobody else got this problem: The struts-config.xml
is indeed not well formed XML. Or isn't the stub intended for direct
deployment?

-Felix



Re: [ANNOUNCMENT] Strut by Strut

2001-06-19 Thread Felix von Delius

On Tue, Jun 19, 2001 at 06:20:27PM +0200, Felix von Delius wrote:
 And I wonder why nobody else got this problem: The struts-config.xml
 is indeed not well formed XML. Or isn't the stub intended for direct
 deployment?

After cleaning up struts-config.xml (putting struts-config
tags at the beginning and end and remving all in the middle), the
sample works. But there is still some discrepancy with the article
Strut by Strut. In the article is mentioned, that the first form
field will accept only integers. On my machine it accepts everything
just fine and I can't see any signs in the source for an integer-only
validation.

I feel a little bit confused and ask myself it the struts-stub.war
file online is the right one.

-Felix



RE: [ANNOUNCMENT] Strut by Strut

2001-06-19 Thread Kwang-Shi Shu

I have the same problem as Felix. After modified the code as Felix
suggested, I could run the test program. However, there is no data
validation whatsoever.

Shu, Kwang-shi  | Tel 732-460-7848
Village Networks, Inc.  | Fax 732-460-9851
246 Industrial Way West |
Eatontown, NJ 078724| email: [EMAIL PROTECTED]


-Original Message-
From: Felix von Delius [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 19, 2001 12:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [ANNOUNCMENT] Strut by Strut


On Tue, Jun 19, 2001 at 06:20:27PM +0200, Felix von Delius wrote:
 And I wonder why nobody else got this problem: The struts-config.xml
 is indeed not well formed XML. Or isn't the stub intended for direct
 deployment?

After cleaning up struts-config.xml (putting struts-config
tags at the beginning and end and remving all in the middle), the
sample works. But there is still some discrepancy with the article
Strut by Strut. In the article is mentioned, that the first form
field will accept only integers. On my machine it accepts everything
just fine and I can't see any signs in the source for an integer-only
validation.

I feel a little bit confused and ask myself it the struts-stub.war
file online is the right one.

-Felix




Re: [ANNOUNCMENT] Strut by Strut

2001-06-19 Thread jaskirat

Hi Felix and Shu,
Thanks a lot for your postings.
I have been struggling with  this same problem for two days and I feel 
consoled to see this thread :) .. I was thinking it must be all my mistake 
:) ..

Please do post any other thing you guys are able to do to make 
struts-stub.war work properly.
Thanks
Jaski


At 06:52 PM 6/19/01 +0200, you wrote:
On Tue, Jun 19, 2001 at 06:20:27PM +0200, Felix von Delius wrote:
  And I wonder why nobody else got this problem: The struts-config.xml
  is indeed not well formed XML. Or isn't the stub intended for direct
  deployment?

After cleaning up struts-config.xml (putting struts-config
tags at the beginning and end and remving all in the middle), the
sample works. But there is still some discrepancy with the article
Strut by Strut. In the article is mentioned, that the first form
field will accept only integers. On my machine it accepts everything
just fine and I can't see any signs in the source for an integer-only
validation.

I feel a little bit confused and ask myself it the struts-stub.war
file online is the right one.

-Felix




Re: [ANNOUNCMENT] Strut by Strut

2001-06-18 Thread Ryan Cornia

Great article!

I'm fairly new to Struts and am still struggling with ActionForm setters/getters vs. 
bean setters/getters. In your template file, all properties for both the form and bean 
are Strings. How would you implement an int property -

In the form, it would it be -
public String getProperty10() {
  return(this.property10);
}

public void setProperty10(String property10) {
  this.property10 = property10;
}

public int getProperty10Int() {
   return this.property10.intValue();
}

In the bean, would it be? -

int property10Int = 0;

public int getProperty10Int() {
  return(this.property10Int);
}

public void setProperty10Int(int property10) {
  this.property10Int = property10;
}

If this is the case, how do you copy the properties from the FormBean to the Bean when 
the Action is done and validated?

MyForm frm = (MyForm)form;
MyBean bean = Should the bean be in the session?;

/** What if I have 100 properties, is there a better way to set them all? **/
bean.setProperty0(frm.getProperty0());
.
.
.
bean.setProperty10Int(frm.getProperty10Int());

bean.writeToDatabase();

Is this the best way to mesh all of this together? 

Thanks for all the hard work. It's a very valuable article.
Ryan




 [EMAIL PROTECTED] 06/17/01 05:34PM 
A new article regarding building Struts applications is available at 

 http://www.husted.com/about/struts/ 

entitled Strut by Strut. Feedback is welcome. A followup article
regarding using a database with Struts (Stepping Out) is nearly
complete. Stay tuned. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/




[ANNOUNCMENT] Strut by Strut

2001-06-17 Thread Ted Husted

A new article regarding building Struts applications is available at 

 http://www.husted.com/about/struts/ 

entitled Strut by Strut. Feedback is welcome. A followup article
regarding using a database with Struts (Stepping Out) is nearly
complete. Stay tuned. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Re: [ANNOUNCMENT] Strut by Strut

2001-06-17 Thread Dave Bettin

Your link to David Winterfeldt's page is broken.

Dave
--- Ted Husted [EMAIL PROTECTED] wrote:
 A new article regarding building Struts applications
 is available at 
 
  http://www.husted.com/about/struts/ 
 
 entitled Strut by Strut. Feedback is welcome. A
 followup article
 regarding using a database with Struts (Stepping
 Out) is nearly
 complete. Stay tuned. 
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel 716 737-3463.
 -- http://www.husted.com/about/struts/


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



Strut by Strut

2001-06-03 Thread Ted Husted

There's a working draft of a new article about building applications
with Struts available at 

 http://www.husted.com/about/struts/ 

under Coming Soon. 

It's no where near complete, but I would be interested in any feedback
on the early release. I'm especially interested in whether the design
patterns discussed here would work well with the way people are now
using EJBs.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/