RE: Help on struts

2004-03-26 Thread Shoaib
Thanks for your guidance.
You are right , we are in the case where user will come back from search
page.
I will try as you suggested and give feedback.
 
Regards
Shoaib
 
 
 
I guess the first thing to consider is what you mean by "come back to
the
previous page".
Do you just mean have the user redirected back to that url when they
have
finished playing with the search? or is it more complex. For example the
previous page is a form, and they are halfway through filling it in when
they need to search, and on completion need to take up where they left
off
with filling it in?
 
In the first case the easiest way (Im assuming there are multiple places
that send you to the search page) might be to have the link to the
search
page add a parameter to the url containing the name of an ActionForward
that
will take the user back to this page.
 
The search page can make note of this forward name, and when the user is
finished searching can look it up and return it as the forward from the
searchs action.
 
-Original Message-
From: Shoaib [mailto:[EMAIL <mailto:%5bEMAIL>  PROTECTED]
Sent: Saturday, 13 March 2004 14:01
To: 'Struts Users Mailing List'
Subject: Help on struts
 
 
We are using struts 1.1.
 
We have some pages where user is going to have some search icon and if
user clicks on that then he will move to search page where he can search
the value and then come back to the previous page.
 
Can somebody please give some idea how to do it.
 
Regards
Shoaib
 


Re: help with modules

2004-03-26 Thread James Norman
Try adding contextRelative="true" to the forwards in your
struts-config.  I remember a similar problem I had a while back, but I'm
not entirely sure this will solve it.  Here is an example of an Action I
had in a struts module I wrote:





-james
 
On Fri, 2004-03-26 at 10:08, Bruce Christie wrote:
> Hello,
> 
> I am playing around with modules and things work pretty nicely =
> except
> 
> I have a tiles template that reads in a menu.jsp from the default =
> WEB-INF.  The links to the actions are prepended with the module. (i.e. =
> . )
> 
> This works fine expect that once I am in the correct module the link =
> then points to  module1/module1/dosomething.do.  Is there a way that the =
> link tag can be used so that it will drop the module prefix when I am in =
> the module asscoiated with the action?
> 
> I think I read something about adding a module @ to the link tag but DTD =
> complains.
> 
> Thanks
> Bruce
> 
> -
> 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]



RE: Pls help me in configuring common logger

2004-03-26 Thread Van Riper, Mike
Sougata,

I can point you in the right direction, but, I don't have time to spell
everything out for you. I think you need to do some work on your own reading
the commons logging docs. You need to  understand the commons logging
package and how to configure it to use log4j or the native logging
facilities in JDK 1.4. When I mentioned the simple logger, I was referring
to this implementation of org.apache.commons.logging.Log:

  org.apache.commons.logging.impl.SimpleLog

If you are using the commons logging package, it has a properties file you
can use to specify which Log interface implementation to use. I could be
wrong, but, when this file is not provided my experience has been that it
will automatically detect the presence of a properly configured log4j and
instantiate a org.apache.commons.logging.impl.Log4JLogger. If a properly
configured log4j is not detected, it will default back to the SimpleLog
implementation.

Good Luck, Van

> -Original Message-
> From: sougata [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 26, 2004 4:12 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Pls help me in configuring common logger
> 
> 
> Hi Van
> I am not using simple logger.I am using apache's  commons 
> logger.Pls le me
> know how to do it
> Thanks
> Sougata
> 
> -Original Message-
> From: Van Riper, Mike [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 26, 2004 12:38 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Pls help me in configuring common logger
> 
> 
> > -Original Message-
> > From: sougata [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 25, 2004 9:15 PM
> > To: Struts Users Mailing List
> > Subject: Pls help me in configuring common logger
> >
> >
> > Hi Guys
> > I am facing a problem in configuration apaches common logger using
> > weblogic8.1.I want to send all my log message to a perticular
> > file.I am
> > using Common logger for my logging message.How to configure
> > Pls let me know
> 
> The simple logger that is included in the commons logging 
> package doesn't
> support logging to a file, just to the console. You need to 
> understand that
> it is primarily intended to provide the common logging API (the simple
> logger is included just to get you started) and then you 
> configure it to use
> whatever logging facility under the covers that you want to. 
> Most people use
> log4j, but, you could also use the native logging support in 
> JDK 1.4 or
> greater.
> 
> I recommend configuring to use log4j. I also recommend taking 
> the time to
> read the short intro manual to log4j found here:
> 
> http://tinyurl.com/3hlrq
> 
> I recently posted the contents of a simple log4j 
> configuration file that
> does have an example of the necessary configuration to write 
> log messages
> both to the console and to file. Check the list archives for 
> a recent post
> on logging by me. I use this setup with Tomcat and Weblogic. The one
> configuration difference I found is that Weblogic doesn't 
> like relative file
> paths for location of log files and Tomcat handles that just fine.
> 
> Good luck, Van
> 
> Mike "Van" Riper
> Silicon Valley Struts User Group
> http://www.baychi.org/bof/struts/
> 
> P.S. You can either remove the commons logging properties 
> file or explicitly
> configure it to use log4j. As long as you setup log4j properly in your
> runtime environment, the commons logging logic will use it by 
> default unless
> you have a commons logging properties file that explicitly specifies a
> different logger implementation.
> 
> > Thanks
> > Sougata
> 
> -
> 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]



help with modules

2004-03-26 Thread Bruce Christie
Hello,

I am playing around with modules and things work pretty nicely =
except

I have a tiles template that reads in a menu.jsp from the default =
WEB-INF.  The links to the actions are prepended with the module. (i.e. =
. )

This works fine expect that once I am in the correct module the link =
then points to  module1/module1/dosomething.do.  Is there a way that the =
link tag can be used so that it will drop the module prefix when I am in =
the module asscoiated with the action?

I think I read something about adding a module @ to the link tag but DTD =
complains.

Thanks
Bruce

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



Re: Pls help me in configuring common logger

2004-03-26 Thread roy-strutsuser
On 26 Mar 2004 13:59:25 -, struts-user-digest-help wrote
> Re: Pls help me in configuring common logger
>   109791 by: sougata

sougata, if you're using Log4j you need to add a file called
commons-logging.properties file under your WEB-INF/classes directory.  In that
file you need one line:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

Its been my experience that the commons logger does not actually default to
Log4j if its available.

Here is an example of a log4j.properties file:
log4j.rootLogger=ERROR, A1, A2

log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A2.file=[file path]
log4j.appender.A2.append=true
log4j.appender.A2.layout=org.apache.log4j.PatternLayout 
log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

The first one is configured for standard out.  The second one writes logs to a
file [file path].  This file should also go under WEB-INF/classes

Roy.

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



RE: Pls help me in configuring common logger

2004-03-26 Thread sougata
Hi Van
I am not using simple logger.I am using apache's  commons logger.Pls le me
know how to do it
Thanks
Sougata

-Original Message-
From: Van Riper, Mike [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 12:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Pls help me in configuring common logger


> -Original Message-
> From: sougata [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 25, 2004 9:15 PM
> To: Struts Users Mailing List
> Subject: Pls help me in configuring common logger
>
>
> Hi Guys
> I am facing a problem in configuration apaches common logger using
> weblogic8.1.I want to send all my log message to a perticular
> file.I am
> using Common logger for my logging message.How to configure
> Pls let me know

The simple logger that is included in the commons logging package doesn't
support logging to a file, just to the console. You need to understand that
it is primarily intended to provide the common logging API (the simple
logger is included just to get you started) and then you configure it to use
whatever logging facility under the covers that you want to. Most people use
log4j, but, you could also use the native logging support in JDK 1.4 or
greater.

I recommend configuring to use log4j. I also recommend taking the time to
read the short intro manual to log4j found here:

http://tinyurl.com/3hlrq

I recently posted the contents of a simple log4j configuration file that
does have an example of the necessary configuration to write log messages
both to the console and to file. Check the list archives for a recent post
on logging by me. I use this setup with Tomcat and Weblogic. The one
configuration difference I found is that Weblogic doesn't like relative file
paths for location of log files and Tomcat handles that just fine.

Good luck, Van

Mike "Van" Riper
Silicon Valley Struts User Group
http://www.baychi.org/bof/struts/

P.S. You can either remove the commons logging properties file or explicitly
configure it to use log4j. As long as you setup log4j properly in your
runtime environment, the commons logging logic will use it by default unless
you have a commons logging properties file that explicitly specifies a
different logger implementation.

> Thanks
> Sougata

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



Re: Pls help me in configuring common logger

2004-03-25 Thread Rajat Pandit
i shall my two cents to this, do read the article on onlamp.com and go
though the source code as well. i just had to do the same this morning to
refresh my log4j skills.

- Original Message -
From: "Van Riper, Mike" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, March 26, 2004 12:37 PM
Subject: RE: Pls help me in configuring common logger


> > -Original Message-
> > From: sougata [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 25, 2004 9:15 PM
> > To: Struts Users Mailing List
> > Subject: Pls help me in configuring common logger
> >
> >
> > Hi Guys
> > I am facing a problem in configuration apaches common logger using
> > weblogic8.1.I want to send all my log message to a perticular
> > file.I am
> > using Common logger for my logging message.How to configure
> > Pls let me know
>
> The simple logger that is included in the commons logging package doesn't
> support logging to a file, just to the console. You need to understand
that
> it is primarily intended to provide the common logging API (the simple
> logger is included just to get you started) and then you configure it to
use
> whatever logging facility under the covers that you want to. Most people
use
> log4j, but, you could also use the native logging support in JDK 1.4 or
> greater.
>
> I recommend configuring to use log4j. I also recommend taking the time to
> read the short intro manual to log4j found here:
>
> http://tinyurl.com/3hlrq
>
> I recently posted the contents of a simple log4j configuration file that
> does have an example of the necessary configuration to write log messages
> both to the console and to file. Check the list archives for a recent post
> on logging by me. I use this setup with Tomcat and Weblogic. The one
> configuration difference I found is that Weblogic doesn't like relative
file
> paths for location of log files and Tomcat handles that just fine.
>
> Good luck, Van
>
> Mike "Van" Riper
> Silicon Valley Struts User Group
> http://www.baychi.org/bof/struts/
>
> P.S. You can either remove the commons logging properties file or
explicitly
> configure it to use log4j. As long as you setup log4j properly in your
> runtime environment, the commons logging logic will use it by default
unless
> you have a commons logging properties file that explicitly specifies a
> different logger implementation.
>
> > Thanks
> > Sougata
>
> -
> 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]



RE: Pls help me in configuring common logger

2004-03-25 Thread Van Riper, Mike
> -Original Message-
> From: sougata [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 25, 2004 9:15 PM
> To: Struts Users Mailing List
> Subject: Pls help me in configuring common logger
> 
> 
> Hi Guys
> I am facing a problem in configuration apaches common logger using
> weblogic8.1.I want to send all my log message to a perticular 
> file.I am
> using Common logger for my logging message.How to configure 
> Pls let me know

The simple logger that is included in the commons logging package doesn't
support logging to a file, just to the console. You need to understand that
it is primarily intended to provide the common logging API (the simple
logger is included just to get you started) and then you configure it to use
whatever logging facility under the covers that you want to. Most people use
log4j, but, you could also use the native logging support in JDK 1.4 or
greater.

I recommend configuring to use log4j. I also recommend taking the time to
read the short intro manual to log4j found here:

http://tinyurl.com/3hlrq

I recently posted the contents of a simple log4j configuration file that
does have an example of the necessary configuration to write log messages
both to the console and to file. Check the list archives for a recent post
on logging by me. I use this setup with Tomcat and Weblogic. The one
configuration difference I found is that Weblogic doesn't like relative file
paths for location of log files and Tomcat handles that just fine.

Good luck, Van

Mike "Van" Riper
Silicon Valley Struts User Group
http://www.baychi.org/bof/struts/

P.S. You can either remove the commons logging properties file or explicitly
configure it to use log4j. As long as you setup log4j properly in your
runtime environment, the commons logging logic will use it by default unless
you have a commons logging properties file that explicitly specifies a
different logger implementation.
 
> Thanks
> Sougata

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



Pls help me in configuring common logger

2004-03-25 Thread sougata
Hi Guys
I am facing a problem in configuration apaches common logger using
weblogic8.1.I want to send all my log message to a perticular file.I am
using Common logger for my logging message.How to configure Pls let me know
Thanks
Sougata


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



validwhen (please help)

2004-03-25 Thread Betty Koon
Hi all,

I have followed the example in struts documentation (validwhen validaton
section).  I have an email address field that needs to be validated when one
other field's value is set to "true".  But I can't get it to work at all.

This is the example I cut and paste from struts web site.   I am getting the
following exception. See below.  Any idea?
Here is my version:

  

  test
  ((someFiled != 'some_value') or (*this* !=
null))






As an example of how this would work, consider a form with fields
sendNewsletter and emailAddress. The emailAddress field is only required if
the sendNewsletter field is not null. You could code this using the
validwhen rule as:



  

  test
  ((sendNewsletter == null) or (*this* !=
null))

  



14:22:36,603 ERROR [STDERR] line 1:23: expecting ''', found '_'
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenLexer.nextToken(ValidWhenLexe
r.java:228)
14:22:36,603 ERROR [STDERR] at antlr.TokenBuffer.fill(TokenBuffer.java:69)
14:22:36,603 ERROR [STDERR] at antlr.TokenBuffer.LA(TokenBuffer.java:80)
14:22:36,603 ERROR [STDERR] at antlr.LLkParser.LA(LLkParser.java:52)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenParser.value(ValidWhenParser.
java:380)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenParser.comparisonExpression(V
alidWhenParser.java:434)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.j
ava:415)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenParser.joinedExpression(Valid
WhenParser.java:446)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.j
ava:420)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhenParser.expression(ValidWhenPa
rser.java:406)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.validwhen.ValidWhen.validateValidWhen(ValidWhen.
java:155)
14:22:36,603 ERROR [STDERR] at
sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
14:22:36,603 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
14:22:36,603 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:324)
14:22:36,603 ERROR [STDERR] at
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Validat
orAction.java:610)
14:22:36,603 ERROR [STDERR] at
org.apache.commons.validator.Field.validateForRule(Field.java:848)
14:22:36,603 ERROR [STDERR] at
org.apache.commons.validator.Field.validate(Field.java:927)
14:22:36,603 ERROR [STDERR] at
org.apache.commons.validator.Form.validate(Form.java:211)
14:22:36,603 ERROR [STDERR] at
org.apache.commons.validator.Validator.validate(Validator.java:407)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:151)
14:22:36,603 ERROR [STDERR] at
com.adobe.edc.server.presentation.fw.EDCActionForm.validate(EDCActionForm.ja
va:96)
14:22:36,603 ERROR [STDERR] at
com.adobe.edc.server.presentation.policy.AssignPermissionAction.addExternal_
onClick(AssignPermissionAction.java:200)
14:22:36,603 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:22:36,603 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
14:22:36,603 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
14:22:36,603 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:324)
14:22:36,603 ERROR [STDERR] at
com.cc.framework.adapter.struts.FWAction.handleFormAction(Unknown Source)
14:22:36,603 ERROR [STDERR] at
com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:462)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:267)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1187)
14:22:36,603 ERROR [STDERR] at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:451)
14:22:36,603 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
14:22:36,603 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
14:22:36,603 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
14:22:36,603 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
14:22:36,603 ERROR [STDERR] at
com.adobe.edc.server.presentation.util.SetCharacterEncodingFilter.doFilter(S
etCharacterEncodingFilter.java:14

RE: HELP: applet-to-action anomaly

2004-03-23 Thread w i l l i a m b o y d
...this is how to reproduce the problem:

1) *FIRST* load http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?
areaid=3. you should be taken to the error page.

2) then, load http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp. 
you can see that the user is "logged in" by the message at the very bottom 
of the page.

3) then click on the "Standard Area Page" node of the navigation applet on 
the left-hand side of the page. if you've done the steps in the above order, 
then you will have been forwarded to the error page (which isn't suppose to 
happen because you are "logged in")...

...also, the applet's "Standard Area Page" link to the action will also work 
correctly, *BUT ONLY IF* index.jsp is the first page loaded...

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



Re: Please help....Struts 1.0.2b and JDK 1.4.2

2004-03-23 Thread Martin Cooper
You asked exactly the same question only 24 hours ago. Patience is a virtue.
;-)

Do you mean 1.0.2 beta? Wow, that's old! There is no reason that it
shouldn't, but I haven't run anything that old for some time now. I would
recommend upgrading to 1.1 anyway. :-)

--
Martin Cooper


"Kramer, Brad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Can anyone either confirm or deny if Struts 1.0.2b is compatible with
JDK 1.4.2?


Thanks a lot!


  _

Brad Kramer
Pager -  [EMAIL PROTECTED]
  _








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



Please help....Struts 1.0.2b and JDK 1.4.2

2004-03-23 Thread Kramer, Brad
 Can anyone either confirm or deny if Struts 1.0.2b is compatible with
JDK 1.4.2? 

 
Thanks a lot!
 

  _  

Brad Kramer
Pager -  [EMAIL PROTECTED]
  _  

 
 



RE: HELP: applet-to-action anomaly

2004-03-23 Thread Pady Srinivasan

For me, clicking on "Standard Area Page: took me to the page with "SoA site
- Standard area...". It seems to work ok.
 

Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: w i l l i a m b o y d [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 12:57 AM
To: [EMAIL PROTECTED]
Subject: HELP: applet-to-action anomaly

hi,

please can someone help? i am building a struts 1.1 based web app using 
j2sdk1.4.2, tomcat 4.0.6. i'm using a 3rd-party tree applet for site 
navigation (a constraint specified by the client). i've got an action which 
can be accessed with this uri:

http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?areaid=3

if you attempt to load this uri directly into your browser (i'm testing with

msie 6.0 on win xp home) then, as expected, the action fails, and forwards 
to a dummy error page placeholder letting you know that you haven't logged 
in yet. that is what should happen if you try to enter the area without 
having logged in.

i've got another dummy page where you can see this 3rd-party navigation 
applet i mentioned:

http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp

for testing, within a scriptlet inside index.jsp, i've simulated a logged-in

user by instantiating a user bean and putting 

this user bean in the session when this index.jsp page loads. to verify that

this user bean is, in fact, in the session, i write out the user bean's 
email address at the very bottom of the page (the bit in red that 
says, "there is a reader in the session: bebop-at-propelnewmedia.com"). 

the navigation applet reads in a text file that contains the links needed to

render the nodes. i've set the "Standard Area Page" node to point at the 
enterAreaToRead.do?areaid=3 action:

The Society
|
+ Groups
|
|_Lorem Ipsum
|
+ BRG
| 
+ PCG
|
+ UMSIG
|
|_ Standard Area Page <-- points to action
|
|_ Lorem Ipsum
|
|_ Lorem Ipsum
|
|_ Lorem Ipsum
|
|_ Lorem Ipsum


the problem is: under certain conditions, loading the index.jsp page, then 
clicking on the "Standard Area Page" node in the applet takes you to the 
error page when it shouldn't. it shouldn't because the action should only 
forward to that error page 

if there is no user bean in the session. but there *IS* a user bean in the 
session which is verified by the presence of the bean's email address which 
i pull out of the session at the very bottom of index.jsp. this is how to 
reproduce the problem:

1) *FIRST* load
http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?
areaid=3. you should be taken to the error page.

2) then, load http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp. 
you can see that the user is "logged in" by the 

message at the very bottom of the page.

3) then click on the "Standard Area Page" node of the navigation applet on 
the left-hand side of the page. if you've done the steps in the above order,

then you will have been forwarded to the error page (which isn't suppose to 
happen because you are "logged in").

the curious thing is: also at the very bottom of the index,jsp page is 
an "Enter Area" link (rendered by an "html:link" tag) that points to the 
exact same action that the applet points to. the action forwards correctly 
if you click on this link. 

also, the applet's "Standard Area Page" link to the action will also work 
correctly, *BUT ONLY IF* index.jsp is the first page loaded. i suspect that 
it is something to do with the applet not knowing about the session for some

reason. short of recoding the 

applet by having it append the session string to the uri via a passed-in 
parameter, is there some other - more straight forward (struts-specific 
maybe) -  way around this problem that you know of?

thanks in advance for your help.

--
Open WebMail Project (http://openwebmail.org)
--- End of Forwarded Message ---


--
Open WebMail Project (http://openwebmail.org)


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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



HELP: applet-to-action anomaly

2004-03-22 Thread w i l l i a m b o y d
hi,

please can someone help? i am building a struts 1.1 based web app using 
j2sdk1.4.2, tomcat 4.0.6. i'm using a 3rd-party tree applet for site 
navigation (a constraint specified by the client). i've got an action which 
can be accessed with this uri:

http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?areaid=3

if you attempt to load this uri directly into your browser (i'm testing with 
msie 6.0 on win xp home) then, as expected, the action fails, and forwards 
to a dummy error page placeholder letting you know that you haven't logged 
in yet. that is what should happen if you try to enter the area without 
having logged in.

i've got another dummy page where you can see this 3rd-party navigation 
applet i mentioned:

http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp

for testing, within a scriptlet inside index.jsp, i've simulated a logged-in 
user by instantiating a user bean and putting 

this user bean in the session when this index.jsp page loads. to verify that 
this user bean is, in fact, in the session, i write out the user bean's 
email address at the very bottom of the page (the bit in red that 
says, "there is a reader in the session: bebop-at-propelnewmedia.com"). 

the navigation applet reads in a text file that contains the links needed to 
render the nodes. i've set the "Standard Area Page" node to point at the 
enterAreaToRead.do?areaid=3 action:

The Society
|
+ Groups
|
|_Lorem Ipsum
|
+ BRG
| 
+ PCG
|
+ UMSIG
|
|_ Standard Area Page <-- points to action
|
|_ Lorem Ipsum
|
|_ Lorem Ipsum
|
|_ Lorem Ipsum
|
|_ Lorem Ipsum


the problem is: under certain conditions, loading the index.jsp page, then 
clicking on the "Standard Area Page" node in the applet takes you to the 
error page when it shouldn't. it shouldn't because the action should only 
forward to that error page 

if there is no user bean in the session. but there *IS* a user bean in the 
session which is verified by the presence of the bean's email address which 
i pull out of the session at the very bottom of index.jsp. this is how to 
reproduce the problem:

1) *FIRST* load http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?
areaid=3. you should be taken to the error page.

2) then, load http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp. 
you can see that the user is "logged in" by the 

message at the very bottom of the page.

3) then click on the "Standard Area Page" node of the navigation applet on 
the left-hand side of the page. if you've done the steps in the above order, 
then you will have been forwarded to the error page (which isn't suppose to 
happen because you are "logged in").

the curious thing is: also at the very bottom of the index,jsp page is 
an "Enter Area" link (rendered by an "html:link" tag) that points to the 
exact same action that the applet points to. the action forwards correctly 
if you click on this link. 

also, the applet's "Standard Area Page" link to the action will also work 
correctly, *BUT ONLY IF* index.jsp is the first page loaded. i suspect that 
it is something to do with the applet not knowing about the session for some 
reason. short of recoding the 

applet by having it append the session string to the uri via a passed-in 
parameter, is there some other - more straight forward (struts-specific 
maybe) -  way around this problem that you know of?

thanks in advance for your help.

--
Open WebMail Project (http://openwebmail.org)
--- End of Forwarded Message ---


--
Open WebMail Project (http://openwebmail.org)


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



UTF-8 encoding problem (Urgent, please help)

2004-03-22 Thread Betty Koon
Hi all,
 
I ran into a problem of posting a hidden form field with a special UTF-8
characters and when it gets to the action and I looked at the action form
had a different value, it's no longer containing UTF-8 characteres instead a
'?" was replaced.  In my jsp, I have to put <%@ page
contentType="text/html;charset=UTF-8" language="java" %> at the top of my
JSP and I have added and set up the setCharacterEncodingFilter for every
request.  Is there something else I am doing wrong?
 
-Betty


Re: WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-21 Thread Craig R. McClanahan
Quoting Lukas Latz <[EMAIL PROTECTED]>:

> Is there a problem with using Tomcat 3.23 and Struts 1.1 ?

Yes, there is.  Tomcat 3.2.x has many bugs with the way that class loading is
handled that make it totally unsuitable for Struts 1.1 applications.  You
should upgrade to a more current Tomcat release -- if you want realistic
support, then I'd recommend upgrading to the most recent Tomcat 5.0.x stable
release.

Craig McClanahan


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



Re: Pls help on shopping cart App

2004-03-20 Thread Mark Lowe
A little off topic .. but does weblogic actually cost money? Sounds 
worse then Jrun to me.

Anyway if I understood the problem, if "weblogic struts" which I assume 
is struts 1.0 doesn't support indexed="true" (as struts 1.0 doesn't) 
then you have to put the index in youself


	<%
		java.lang.String item = "item["+ java.lang.Integer.toString(index) 
+"]";
		pageScope.setAttribute("item",item);
	%>
	


Again, perhaps I didn't understand the question, or perhaps things look 
more like this.


	<%
		java.lang.String price = "price["+ java.lang.Integer.toString(index) 
+"]";
		pageScope.setAttribute("price", price);
	%>
	


I assume this is how matey boy fixed his "weblogic struts" problem.



On 20 Mar 2004, at 06:06, Prakasan OK wrote:

Hi,

I am also facing the same problem.. Can u explain how you have solved 
it?

On Thu, 18 Mar 2004 sougata wrote :
No it is not like that since I am using weblogic's struts .Anyway I 
solved
that.Thanks for your reply
Sougata

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 1:36 PM
To: Struts Users Mailing List
Subject: Re: Pls help on shopping cart App
Do your 

On 18 Mar 2004, at 07:07, sougata wrote:

Hi All,
I have a shopping cart apps.When the user is buying items it is 
coming
to
"mycart" .In "my mycart" page I am showing all the products and the
beside
that I have a update button by which I can update the quantity of my
each
item which is in a textbox.I am follwing struts for that.My text box
name is
same in every row(say quantity).if its name is quantity in servlet I 
am
getting a String array of quantity.But when I am coming to the same
page its
showing

value="[Ljava.lang.String;@1765ae" which is the reference of my 
string
array.How to get the original value

Pls let me know ASAP.

Thanks

Sougata



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


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


Re: RE: Pls help on shopping cart App

2004-03-19 Thread Prakasan OK

Hi,

I am also facing the same problem.. Can u explain how you have solved it?

On Thu, 18 Mar 2004 sougata wrote :
>No it is not like that since I am using weblogic's struts .Anyway I solved
>that.Thanks for your reply
>Sougata
>
>-Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>Sent: Thursday, March 18, 2004 1:36 PM
>To: Struts Users Mailing List
>Subject: Re: Pls help on shopping cart App
>
>
>Do your 
>
>On 18 Mar 2004, at 07:07, sougata wrote:
>
> > Hi All,
> > I have a shopping cart apps.When the user is buying items it is coming
> > to
> > "mycart" .In "my mycart" page I am showing all the products and the
> > beside
> > that I have a update button by which I can update the quantity of my
> > each
> > item which is in a textbox.I am follwing struts for that.My text box
> > name is
> > same in every row(say quantity).if its name is quantity in servlet I am
> > getting a String array of quantity.But when I am coming to the same
> > page its
> > showing
> >
> > value="[Ljava.lang.String;@1765ae" which is the reference of my string
> > array.How to get the original value
> >
> > Pls let me know ASAP.
> >
> > Thanks
> >
> > Sougata
> >
>
>
>-
>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]
>


Pl. help options collection

2004-03-19 Thread ddd ddd
Dear All 
Can any body complete this oode , I mean to say that what needs to be done in 
configuration file struts-config, where ARRAY information must be kept.. Can any body 
complete the code that it will be directly a working code .I have  successfully 
completed select using simple options .


 


But want to learn using collections I am suing struts1.1.
I am trying from so many days ...pl. help 
Many many thanks in advance pl. help..

Kind Regards 
Strutsguy 
If nay boy needs all code for  above I can send all with java class and config file .


ARRAY information 
ArrayList prod = new ArrayList();
prod.add( new org.apache.struts.util.LabelValueBean( "Widget", "20" ) );
prod.add( new org.apache.struts.util.LabelValueBean( "Sprocket", "29-2a" ) );
prod.add( new org.apache.struts.util.LabelValueBean( "Cog", "29s" ) );
prod.add( new org.apache.struts.util.LabelValueBean( "Dunsel", "943" ) );

LabelValueBean takes the first String argument as the displayed name and the second as 
the value returned. We’ll see more about this in a bit.
Now that you have prod set up, you pass that as a session or request bean to the JSP.
request.setAttribute( Constants.PRODUCT_KEY, prod );
(the Constants.PRODUCT_KEY is set to our bean name: "products"; we use this to 
centralize bean name management)
To use the data in the JSP, add the following code:
  

  
Notes: product_id is the variable the JSP will set to the product ID value of the 
product selected by the user. products is the name of the bean (it must match what is 
in Contants.PRODUCT_KEY -- we probably could've said
... collection="<%= Constants.PRODUCT_KEY %>" ...
in place of hard-coding the name. The choice is up to you.
property="value" and labelProperty="label" are automatically set by 
org.apache.struts.util.LabelValueBean, so only use the values shown here.
The resulting HTML will look something like:

Widget
Sprocket
Cog
Dunsel





Help with StrutsStudio

2004-03-19 Thread Farrokh


Has anyone used JNDI Naming for Excadel Struts Studio using
Tomcat Server 4.

following is the code (how it shud be) for JNDI Naming for an
EJB with JNDI Name VesselManager 

Context ctx = new javax.naming.InitialContext();
Object ref = ctx.lookup("VesselManager");   
VesselManagerHome vesselManagerHome = (VesselManagerHome)
PortableRemoteObject.narrow(ref, VesselManagerHome.class);

vesselManager = vesselManagerHome.create();

According to Tomcat Documentatin .. it should be like this ::

Context ctx = new javax.naming.InitialContext();Context
envCtx = (Context) ctx.lookup("java:comp/env");
Object ref2 = envCtx.lookup("VesselManager");   
VesselManagerHome vesselManagerHome = (VesselManagerHome)
PortableRemoteObject.narrow(ref2, VesselManagerHome.class);
vesselManager = vesselManagerHome.create();

.. any help for using EJBs in StrutsStudio Or even just struts
would be highly appreciated.

Thanks in Advance... farrokh.

15 Mbytes Free Web-based and  POP3
Sign up now: http://www.gawab.com

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



RE: Pls help on shopping cart App

2004-03-18 Thread sougata
No it is not like that since I am using weblogic's struts .Anyway I solved
that.Thanks for your reply
Sougata

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 1:36 PM
To: Struts Users Mailing List
Subject: Re: Pls help on shopping cart App


Do your  Hi All,
> I have a shopping cart apps.When the user is buying items it is coming
> to
> "mycart" .In "my mycart" page I am showing all the products and the
> beside
> that I have a update button by which I can update the quantity of my
> each
> item which is in a textbox.I am follwing struts for that.My text box
> name is
> same in every row(say quantity).if its name is quantity in servlet I am
> getting a String array of quantity.But when I am coming to the same
> page its
> showing
>
> value="[Ljava.lang.String;@1765ae" which is the reference of my string
> array.How to get the original value
>
> Pls let me know ASAP.
>
> Thanks
>
> Sougata
>


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



Re: Pls help on shopping cart App

2004-03-18 Thread Mark Lowe
Do your 

On 18 Mar 2004, at 07:07, sougata wrote:

Hi All,
I have a shopping cart apps.When the user is buying items it is coming 
to
"mycart" .In "my mycart" page I am showing all the products and the 
beside
that I have a update button by which I can update the quantity of my 
each
item which is in a textbox.I am follwing struts for that.My text box 
name is
same in every row(say quantity).if its name is quantity in servlet I am
getting a String array of quantity.But when I am coming to the same 
page its
showing

value="[Ljava.lang.String;@1765ae" which is the reference of my string
array.How to get the original value
Pls let me know ASAP.

Thanks

Sougata



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


Pls help on shopping cart App

2004-03-17 Thread sougata
Hi All,
I have a shopping cart apps.When the user is buying items it is coming to
"mycart" .In "my mycart" page I am showing all the products and the beside
that I have a update button by which I can update the quantity of my each
item which is in a textbox.I am follwing struts for that.My text box name is
same in every row(say quantity).if its name is quantity in servlet I am
getting a String array of quantity.But when I am coming to the same page its
showing

value="[Ljava.lang.String;@1765ae" which is the reference of my string
array.How to get the original value

Pls let me know ASAP.

Thanks

Sougata



Re: Re: Drop box problem please help

2004-03-17 Thread ddd ddd


On Tue, 16 Mar 2004 as as wrote :
>Hi,
>Try my snippet below
>I populated my jsp/form bean with values from database (dynamic)
>
>
>
><%
>
>java.util.List driversList = (java.util.List)request.getAttribute("drivers");
>
>
>
>
>
>%>
>
>
>
>
>
>
Can i know what fullName,supervisor,supervisors ,employeeID i fpossible pl. send 
cation ,actionform class...thanx alot 
strutsguy 


>
>
> ">
>
>
>
>
>
>
>
>
>
>
>
>
>ddd ddd <[EMAIL PROTECTED]> wrote:
>
>Hi All
>
>I am new bie and learning to populate the drop box by all different ways .
>
>1. By Collections of strings
>2. By collections beans
>3. Hard coding
>I am unable to achieve even first way tried a lot but failed can any body suggest me 
>where I am wrong. Also pl. suggest me how the “collection of beans” will be coded . 
>any body has simple java nd jsp code please Post me
>
>
>Manay many thanks
>
>
>Regrds
>StrutsGuy
>[EMAIL PROTECTED]
>
>
>Below is Jps ,stutsconfig and java files and errors of browser .
>
>
>
>
>
>
>
>
>
>
>
>LOGIN PAGE
>
>
>
>
>
>
>LOGIN ID
>
>PASSWORD
>
>
>
>
>
>
>
>
>
>
>
>
>import org.apache.struts.action.ActionError;
>import org.apache.struts.action.ActionErrors;
>import org.apache.struts.action.Action;
>import org.apache.struts.action.ActionForward;
>import org.apache.struts.action.ActionMapping;
>import org.apache.struts.action.ActionForm;
>import org.apache.commons.beanutils.BeanUtils;
>import javax.servlet.http.HttpServletRequest;
>import javax.servlet.http.HttpServletResponse;
>import java.util.*;
>import javax.servlet.jsp.PageContext;
>
>// use The seSSion stuf
>public class StudentAction extends Action
>{
>public ActionForward execute( ActionMapping map,ActionForm form, HttpServletRequest 
>req , HttpServletResponse res) throws Exception
>{
>String action = req.getParameter("action");
>if (action == null)
>{
>StudentDatabase stBase = new StudentDatabase ();
>StudentForm sf= new StudentForm();
>String[] str = stBase.getAllNames();
>String strng ="blah" ;
>sf.setPasswd(strng);
>req.setAttribute("sf", sf);
>ActionErrors er= new ActionErrors();
>er.add(ActionErrors.GLOBAL_ERROR , new ActionError("errorRakesh"));
>if(!er.empty())
>{
>saveErrors(req,er);
>return(map.findForward("RakyError"));
>}
>else
>return(map.findForward("RakyCancel"));
>}
>else
>{
>return(map.findForward("RakyCancel"));
>}
>
>}// end of class
>}
>
>import org.apache.struts.action.ActionForm;
>import org.apache.struts.action.ActionMapping;
>import javax.servlet.http.HttpServletRequest;
>import org.apache.struts.action.ActionErrors;
>import org.apache.struts.action.*;
>import org.apache.struts.validator.ValidatorForm;
>
>public class StudentForm extends ValidatorForm
>{
>private int student =0;
>private String passwd = null;
>public StudentForm()
>{
>student=0;
>passwd = new String();
>}
>public StudentForm( int student ,String passwd)
>{
>student=student;
>passwd= passwd;
>}
>public int getStudent()
>{
>return this.student;
>}
>public void setStudent(int student)
>{
>this.student=student;
>}
>
>public String getPasswd( )
>{
>return this.passwd;
>}
>public void setPasswd(String passwd)
>{
>this.passwd=passwd;
>}
>public void reset(ActionMapping mapping ,HttpServletRequest request)
>{
>this.student=0;
>this.passwd=null;
>}
>public ActionErrors validate( ActionMapping map,HttpServletRequest req)
>{
>ActionErrors errors=super.validate(map,req);
>if(student == 0)
>{
>System.out.println("HELLO blah "+student);
>errors.add("student", new ActionError("IDProblem"));
>}
>return errors;
>} // end of action errors
>}// end of Student from class
>
>
>
>"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
>"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>propertyInfo.properties
>hello=This is test page
>start=This is first page of the application
>info=This page stores contains text files and drop downs
>error=There is problem please have a look
>submit=ADD TO DATABASE
>clear=Clear the Data
>cancel=Cancel Button
>click=Please Click to start the application
>button=Login
>cancel=CancelButton
>reset=ResetButton
>IDProblem=There is problem in id has greater value than 4 pl. recheck it
>prompt.username= Please Enter the User Name by blah
>prompt.password=Please enter the password by bla
>errors.required={0} is required.
>errors.minlength={0} cannot be less than {1} characters.
>errors.maxlength={0} cannot be greater than {2} characters.
>errors.invalid={0} is invalid.
>errors.byte={0} must be an byte.
>errors.short={0} must be an short.
>errors.integer={0} must be an integer.
>errors.long={0} must be an long.
>errors.float={0} must be an float.
>errors.double={0} must be an double.
>errors.date={0} is not a date.
>errors.range={0} is not in the range {1} through {2}.
>errors.creditcard={0} is not a valid credit card number.
>errors.email={0} is an invalid e-mail address.
>rakeshErROR=This is first ssuccessfyl errro by blah
>errorRakesh=This is type of error in jsp page
>
>
>eError is
>
>HTTP Status 500

help with access nested hash in jsp

2004-03-16 Thread Karina Wong
Hi,

For my structs application I have a Hash Map of Hash Maps, the outer hash is 
keyed by pagenumber and the inner hash is keyed by date.  Sample data.

hash{1}={ {2004-03-14 =34}, {2004-03-13 =33}... }
hash{2}={ {2004-03-14 =33}, {2004-03-13 =23}... }

How do I access a specific value of the inner hash inside a jsp page?  For 
example if I want to display the count for page 2 on date 2004-03-13.

I can render the whole inner hash with :


    


I tried to render a specific value using :

    


but it did not render anything.

I've already wrapped the inner hash with a hasbean, which defines a 
getValue(String key) method, but that still doesn't work.

Please help

Thanks

KK


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



Re: Drop box problem please help

2004-03-16 Thread as as
Hi,
Try my snippet below
I populated my jsp/form bean with values from database (dynamic)
 


<%

java.util.List driversList = (java.util.List)request.getAttribute("drivers");





%>

 







 ">












ddd ddd <[EMAIL PROTECTED]> wrote:

Hi All 

I am new bie and learning to populate the drop box by all different ways .

1. By Collections of strings 
2. By collections beans 
3. Hard coding 
I am unable to achieve even first way tried a lot but failed can any body suggest me 
where I am wrong. Also pl. suggest me how the “collection of beans” will be coded . 
any body has simple java nd jsp code please Post me 


Manay many thanks 


Regrds 
StrutsGuy
[EMAIL PROTECTED]


Below is Jps ,stutsconfig and java files and errors of browser . 











LOGIN PAGE 






LOGIN ID

PASSWORD












import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm; 
import org.apache.commons.beanutils.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import javax.servlet.jsp.PageContext;

// use The seSSion stuf
public class StudentAction extends Action
{
public ActionForward execute( ActionMapping map,ActionForm form, HttpServletRequest 
req , HttpServletResponse res) throws Exception
{
String action = req.getParameter("action");
if (action == null)
{ 
StudentDatabase stBase = new StudentDatabase ();
StudentForm sf= new StudentForm();
String[] str = stBase.getAllNames();
String strng ="blah" ;
sf.setPasswd(strng);
req.setAttribute("sf", sf);
ActionErrors er= new ActionErrors();
er.add(ActionErrors.GLOBAL_ERROR , new ActionError("errorRakesh"));
if(!er.empty()) 
{
saveErrors(req,er);
return(map.findForward("RakyError"));
}
else
return(map.findForward("RakyCancel")); 
}
else
{ 
return(map.findForward("RakyCancel")); 
}

}// end of class
}

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.*;
import org.apache.struts.validator.ValidatorForm;

public class StudentForm extends ValidatorForm
{
private int student =0;
private String passwd = null;
public StudentForm()
{
student=0;
passwd = new String();
}
public StudentForm( int student ,String passwd)
{
student=student;
passwd= passwd; 
}
public int getStudent()
{
return this.student;
}
public void setStudent(int student)
{
this.student=student; 
}

public String getPasswd( )
{
return this.passwd;
}
public void setPasswd(String passwd)
{
this.passwd=passwd; 
}
public void reset(ActionMapping mapping ,HttpServletRequest request)
{
this.student=0; 
this.passwd=null;
}
public ActionErrors validate( ActionMapping map,HttpServletRequest req)
{
ActionErrors errors=super.validate(map,req);
if(student == 0)
{
System.out.println("HELLO blah "+student);
errors.add("student", new ActionError("IDProblem"));
}
return errors;
} // end of action errors
}// end of Student from class



"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
























propertyInfo.properties
hello=This is test page
start=This is first page of the application
info=This page stores contains text files and drop downs 
error=There is problem please have a look 
submit=ADD TO DATABASE 
clear=Clear the Data 
cancel=Cancel Button
click=Please Click to start the application
button=Login
cancel=CancelButton
reset=ResetButton
IDProblem=There is problem in id has greater value than 4 pl. recheck it 
prompt.username= Please Enter the User Name by blah
prompt.password=Please enter the password by bla 
errors.required={0} is required.
errors.minlength={0} cannot be less than {1} characters.
errors.maxlength={0} cannot be greater than {2} characters.
errors.invalid={0} is invalid.
errors.byte={0} must be an byte.
errors.short={0} must be an short.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.float={0} must be an float.
errors.double={0} must be an double.
errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
rakeshErROR=This is first ssuccessfyl errro by blah 
errorRakesh=This is type of error in jsp page


eError is 

HTTP Status 500 - 

type Exception report
message 
description The server encountered an internal error () that prevented it from 
fulfilling this request.
exception 
org.apache.jasper.JasperException: Cannot create iterator for [EMAIL PROTECTED]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.s

Re: please help, using logic:iterate and html:form

2004-03-16 Thread as as
Mike,

What error are you getting
 
-Sam.

Mu Mike <[EMAIL PROTECTED]> wrote:
Hi, all, last week, I spent a whole day trying to figure the below problem 
out, and you warmhearted guys just came and helped me,but to greatly 
disappiont you, I m still at a loss to know where the problem is ,so I 
decided to explain detailedly and completely of what I did and hope you 
nice buddies can help me find the problem


goal: I want to submit an array of Fonbean(java class file listed below) to 
an action
strategy: I decide to use html:form and logic:iterate to do this

1.what I have in my configruation xml


type="com.mycom.form.TestBeanForm"/>



type="com.mycom.action.TestAction"
name="testBeanForm"
scope="session">



2.TestBeanForm.java

public class TestBeanForm extends ActionForm {

public FontBean[] getTestBean() {
if(testBean==null)
{
testBean=new FontBean[2];
testBean[0]=new FontBean();
testBean[1]=new FontBean();
}
return testBean;
}

public void setTestBean(FontBean[] testBean) {
this.testBean = testBean;
}

FontBean[] testBean;
}


3. FontBean.java

public class FontBean {
public int getSize() {
return size;
}

public void setSize(int size) {
this.size = size;
}

public String getFontName() {
return fontName;
}

public void setFontName(String fontName) {
this.fontName = fontName;
}

private int size;
private String fontName;

}

4. my jsp file


type="com.mycom.bean.propertybean.FontBean" id="mybean" indexId="index1">
indexed="true"/>

/* I think when I submit, the testBeanForm will automatically fill 
its testBean's elements of their fontName attributes with "font1" */


Submit Changes



5.my action class file

public class TestAction extends Action {
public ActionForward execute(ActionMapping actionMapping,
ActionForm form,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) 
throws Exception
{
System.out.println("stepped into action");
TestBeanForm bform=(TestBeanForm)form;

/*I stopped here to check if the form has its testBean variable filled 
with
"font1" of its fontName attribute, but it doesnt, the testBean of form is 
just the object I created in getTestBean(),that is, contains two elements, 
both the fontName attributes of the two elements are null */

return actionMapping.findForward("error");
}
}



so what on earth is the problem?

Thanks&Regards
Mike

_
ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com 


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

Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

Pls help

2004-03-16 Thread sougata
Hi All
I have a shopping cart apps.The user is buying  items it is coming to my
cart .In my mycart page I am showing all the products and the beside that I
have a update button by which I can update the quantity of my each item
which is in a textbox.I am follwing struts for that.My text box name is same
in each time.if its name is quantity in servlet I am getting an array of
quantity.But when I am coming to the same page its showing
 value="[Ljava.lang.String;@1765ae" which is the reference of my string
array.How to get the original value
Thanks
Sougata


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



Pl. help urgent Using optionsCollection - LabelValueBean

2004-03-15 Thread ddd ddd


On Mon, 15 Mar 2004 ddd  ddd wrote :
>
>
>Hi All
>
>   I am new bie and learning to populate the drop box by all different ways .
>
>1. By Collections of strings
>2. By collections beans
>3. Hard coding
>I am unable to achieve even first way tried a lot but failed can any body suggest me 
>where I am wrong. Also pl. suggest me how the  “collection of beans” will be coded . 
>any body has simple java nd jsp code please  Post me
>
>
>Manay many thanks
>
>
>Regrds
>StrutsGuy
>[EMAIL PROTECTED]
>
>
>  Below is Jps  ,stutsconfig  and java files and errors of browser .
>
><%@ page language="java" import="StudentForm" %>
><%@ taglib uri="/WEB-INF/struts-html.tld"  prefix="html" %>
><%@ taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean" %>
>
>
>
>
> 
>
>
>LOGIN PAGE 
>
>
>
>
>
>
>LOGIN ID
>
>PASSWORD
> 
>
>
>
>
>
>staticJavascript="true"/>
>
>
>
>
>
>import org.apache.struts.action.ActionError;
>import org.apache.struts.action.ActionErrors;
>import org.apache.struts.action.Action;
>import org.apache.struts.action.ActionForward;
>import org.apache.struts.action.ActionMapping;
>import org.apache.struts.action.ActionForm;
>import org.apache.commons.beanutils.BeanUtils;
>import javax.servlet.http.HttpServletRequest;
>import javax.servlet.http.HttpServletResponse;
>import java.util.*;
>import javax.servlet.jsp.PageContext;
>
>// use The seSSion stuf
>public class StudentAction extends Action
>{
>  public ActionForward execute( ActionMapping map,ActionForm form, HttpServletRequest 
> req , HttpServletResponse  res) throws Exception
>  {
>String action = req.getParameter("action");
>   if (action == null)
>   {
>StudentDatabase  stBase = new StudentDatabase ();
>StudentForm sf= new StudentForm();
>String[] str = stBase.getAllNames();
>String strng ="blah" ;
>sf.setPasswd(strng);
> req.setAttribute("sf", sf);
>ActionErrors er= new ActionErrors();
>er.add(ActionErrors.GLOBAL_ERROR , new ActionError("errorRakesh"));
>if(!er.empty())
>  {
>   saveErrors(req,er);
>   return(map.findForward("RakyError"));
>  }
>  else
>  return(map.findForward("RakyCancel"));
>   }
>  else
>   {
>   return(map.findForward("RakyCancel"));
>   }
>
>}// end of class
>}
>
>import org.apache.struts.action.ActionForm;
>import org.apache.struts.action.ActionMapping;
>import javax.servlet.http.HttpServletRequest;
>import org.apache.struts.action.ActionErrors;
>import org.apache.struts.action.*;
>  import org.apache.struts.validator.ValidatorForm;
>
>public class StudentForm extends  ValidatorForm
>{
>   private int student =0;
>  private String passwd = null;
>public  StudentForm()
>{
>  student=0;
>passwd = new String();
>}
>  public StudentForm( int student ,String passwd)
>  {
>  student=student;
>   passwd= passwd;
>  }
>public int  getStudent()
>{
>return this.student;
>}
>public void setStudent(int student)
>{
>this.student=student;
>}
>
>public String getPasswd( )
>{
>return this.passwd;
>}
>public void setPasswd(String passwd)
>{
>this.passwd=passwd;
>}
>public void reset(ActionMapping mapping ,HttpServletRequest request)
>{
>this.student=0;
>this.passwd=null;
>}
>public ActionErrors validate( ActionMapping map,HttpServletRequest req)
>{
>  ActionErrors errors=super.validate(map,req);
>  if(student == 0)
>  {
>   System.out.println("HELLO blah "+student);
>   errors.add("student", new ActionError("IDProblem"));
>  }
>return errors;
>} // end of action errors
>}// end of Student from class
>
>
>
>   "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
>
>  
>
>
>
>
>
>
>
>validate="true">
>
>
>
>
>
>
>
> 
>   
>
>
>propertyInfo.properties
>hello=This is test page
>start=This is first page of the application
>info=This page stores  contains text files and drop downs
>error=There is problem please have  a look
>submit=ADD TO DATABASE
>clear=Clear the Data
>cancel=Cancel Button
>click=Please Click to start the application
>button=Login
>cancel=CancelButton
>reset=ResetButton
>IDProblem=There is problem in id  has greater value than 4 pl. recheck it
>prompt.username= Please Enter the User Name by blah
>prompt.password=Please enter the password by bla
>errors.required={0} is required.
>errors.minlength={0} cannot be less than {1} characters.
>errors.maxlength={0} cannot be greater than {2} characters.
>errors.invalid={0} is invalid.
>errors.byte={0} must be an byte.
>errors.short={0} must be an short.
>errors.integer={0} must be an integer.
>errors.long={0} must be an long.
>errors.float={0} must be an float.
>errors.double={0} must be an double.
>errors.date={0} is not a date.
>errors.range={0} is not in the range {1} through {2}.
>errors.creditcard={0} is not a valid credit card number.
>errors.email={0} is an invalid e-mail address.
>rakeshErROR=This is first ssucc

RE: help in java script

2004-03-15 Thread Andrew Hill
Remember the JSP script is evaluated server side and its result is what is
rendered to the browser.
Only the resulting html is what is evaluated by the browser which knows
nothing of the original scriptlets.

To check this out just do 'view source' in your browser on the page so you
can see what is actually being rendered to the response and seen by the
browser!

% String value="hello";%>


Will cause (something like) this to be rendered:



BTW: Should have spotted earlier the "javascript:" which also is not
wanted - you only use that for hrefs! Take that out you get:


As you can see you are trying to pass a javascript variable named hello to
your method.
Surely you want to pass a javascript string containing the text hello?
ie:


Hence my suggestion to add in the quotes.
And lose that "javascript:" prefix!
(And shove a semicolon on the end though I think its optional in this case!)

hth
Andrew

-Original Message-
From: Andreas Solarik [mailto:[EMAIL PROTECTED]
Sent: Monday, 15 March 2004 17:57
To: 'Struts Users Mailing List'
Subject: AW: help in java script


Hi Andrew and Shobhana,

As far as I know, you cant mix static text and dynamic text within a JSP. If
I remember correctly, something like the following code should work.

<%
  String tempString="javascript:find(" + value + "\";"; // Not sure about
the semicolon...
%>

and then:



I'll make sure to try the single quotes (') around the dynamic text some
time, cause it's really annoying to use the method im describing here.


Regards, Andreas

-Ursprüngliche Nachricht-
Von: Andrew Hill [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. M?rz 2004 10:30
An: Struts Users Mailing List
Betreff: RE: help in java script


Should not that be:



(note the ' around value)

-Original Message-
From: Shobhana.S, ASDC Chennai [mailto:[EMAIL PROTECTED]
Sent: Monday, 15 March 2004 17:27
To: Struts Users Mailing List
Subject: help in java script


Hi !

I'm getting a problem when i use java script in my struts application.

My code runs as follows:


funtion change(value)
 {
 alert(value);
}



...
,,,
<% String value="hello";%>


the problem is the onchange event is not being called.

when i don't pass a scriplet variable the event gets called..say
onchange="javascript:find('hello'); it gets callled..

could anyone suggest me how to pass a dynamic value to javascript function
in struts?

Thank you.

Shobhana



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



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



RE: help in java script

2004-03-15 Thread Shobhana.S, ASDC Chennai


Hi Andreas!

It worked..Thank you.

Shobhana



-Original Message-
From: Andreas Solarik [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 3:27 PM
To: 'Struts Users Mailing List'
Subject: AW: help in java script


Hi Andrew and Shobhana,

As far as I know, you cant mix static text and dynamic text within a JSP. If
I remember correctly, something like the following code should work.

<%
  String tempString="javascript:find(" + value + "\";"; // Not sure about
the semicolon...
%>

and then:



I'll make sure to try the single quotes (') around the dynamic text some
time, cause it's really annoying to use the method im describing here.


Regards, Andreas

-Ursprüngliche Nachricht-
Von: Andrew Hill [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. M?rz 2004 10:30
An: Struts Users Mailing List
Betreff: RE: help in java script


Should not that be:



(note the ' around value)

-Original Message-
From: Shobhana.S, ASDC Chennai [mailto:[EMAIL PROTECTED]
Sent: Monday, 15 March 2004 17:27
To: Struts Users Mailing List
Subject: help in java script


Hi !

I'm getting a problem when i use java script in my struts application.

My code runs as follows:


funtion change(value)
 {
 alert(value);
}



...
,,,
<% String value="hello";%>


the problem is the onchange event is not being called.

when i don't pass a scriplet variable the event gets called..say
onchange="javascript:find('hello'); it gets callled..

could anyone suggest me how to pass a dynamic value to javascript function
in struts?

Thank you.

Shobhana



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


AW: help in java script

2004-03-15 Thread Andreas Solarik
Hi Andrew and Shobhana,

As far as I know, you cant mix static text and dynamic text within a JSP. If
I remember correctly, something like the following code should work.

<%
  String tempString="javascript:find(" + value + "\";"; // Not sure about
the semicolon...
%>

and then:



I'll make sure to try the single quotes (') around the dynamic text some
time, cause it's really annoying to use the method im describing here.


Regards, Andreas

-Ursprüngliche Nachricht-
Von: Andrew Hill [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. M?rz 2004 10:30
An: Struts Users Mailing List
Betreff: RE: help in java script


Should not that be:



(note the ' around value)

-Original Message-
From: Shobhana.S, ASDC Chennai [mailto:[EMAIL PROTECTED]
Sent: Monday, 15 March 2004 17:27
To: Struts Users Mailing List
Subject: help in java script


Hi !

I'm getting a problem when i use java script in my struts application.

My code runs as follows:


funtion change(value)
 {
 alert(value);
}



...
,,,
<% String value="hello";%>


the problem is the onchange event is not being called.

when i don't pass a scriplet variable the event gets called..say
onchange="javascript:find('hello'); it gets callled..

could anyone suggest me how to pass a dynamic value to javascript function
in struts?

Thank you.

Shobhana



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



RE: help in java script

2004-03-15 Thread Shobhana.S, ASDC Chennai
Hi!

If my value is an int variable then how shld i pass the value>?

Say,

<% 
int value=10;
%>

I want to pass this value to my onchange event. 

Unliek this case where i've defined the value in my program the value is
determined dynamically.

Thank you

Shobhana


RE: help in java script

2004-03-15 Thread Andrew Hill
Should not that be:



(note the ' around value)

-Original Message-
From: Shobhana.S, ASDC Chennai [mailto:[EMAIL PROTECTED]
Sent: Monday, 15 March 2004 17:27
To: Struts Users Mailing List
Subject: help in java script


Hi !

I'm getting a problem when i use java script in my struts application.

My code runs as follows:


funtion change(value)
 {
 alert(value);
}



...
,,,
<% String value="hello";%>


the problem is the onchange event is not being called.

when i don't pass a scriplet variable the event gets called..say
onchange="javascript:find('hello'); it gets callled..

could anyone suggest me how to pass a dynamic value to javascript function
in struts?

Thank you.

Shobhana



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



help in java script

2004-03-15 Thread Shobhana.S, ASDC Chennai
Hi !

I'm getting a problem when i use java script in my struts application.

My code runs as follows:


funtion change(value)
 {
 alert(value);
}



...
,,,
<% String value="hello";%>


the problem is the onchange event is not being called.

when i don't pass a scriplet variable the event gets called..say
onchange="javascript:find('hello'); it gets callled..

could anyone suggest me how to pass a dynamic value to javascript function
in struts?

Thank you.

Shobhana



please help, using logic:iterate and html:form

2004-03-15 Thread Mu Mike
Hi, all, last week, I spent a whole day trying to figure the below problem 
out, and you warmhearted guys just came and helped me,but to greatly 
disappiont you, I m still at a loss to know where the problem is ,so I 
decided to explain detailedly and completely of what I did and hope you 
nice buddies can help me find the problem

goal: I want to submit an array of Fonbean(java class file listed below) to 
an action
strategy: I decide to use html:form and logic:iterate to do this

1.what I have in my configruation xml


   
   

  


  
2.TestBeanForm.java

public class TestBeanForm extends ActionForm {

   public FontBean[] getTestBean() {
   if(testBean==null)
   {
 testBean=new FontBean[2];
 testBean[0]=new FontBean();
 testBean[1]=new FontBean();
   }
   return testBean;
   }
   public void setTestBean(FontBean[] testBean) {
   this.testBean = testBean;
   }
   FontBean[] testBean;
}
3. FontBean.java

public class FontBean  {
   public int getSize() {
   return size;
   }
   public void setSize(int size) {
   this.size = size;
   }
   public String getFontName() {
   return fontName;
   }
   public void setFontName(String fontName) {
   this.fontName = fontName;
   }
   private int size;
   private String fontName;
}

4. my jsp file


  
 

 /* I think when I submit, the testBeanForm will automatically fill 
its testBean's elements of their fontName attributes with "font1" */

  
  Submit Changes

5.my action class file

public class TestAction extends Action {
   public ActionForward execute(ActionMapping actionMapping,
ActionForm form,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) 
throws Exception
   {
   System.out.println("stepped into action");
   TestBeanForm bform=(TestBeanForm)form;

/*I stopped here to check if the form has its testBean variable filled 
with
"font1" of its fontName attribute, but it doesnt, the testBean of form is 
just the object I created in getTestBean(),that is, contains two elements, 
both the fontName attributes of the two elements are null */

   return actionMapping.findForward("error");
   }
}



so what on earth is the problem?

Thanks&Regards
Mike
_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


Drop box problem please help

2004-03-14 Thread ddd ddd

Hi All 

  I am new bie and learning to populate the drop box by all different ways .

1.  By Collections of strings 
2.  By collections beans 
3.  Hard coding 
I am unable to achieve even first way tried a lot but failed can any body suggest me 
where I am wrong. Also pl. suggest me how the  “collection of beans” will be coded . 
any body has simple java nd jsp code please  Post me 


Manay many thanks 


Regrds 
StrutsGuy
[EMAIL PROTECTED]


 Below is Jps  ,stutsconfig  and java files and errors of browser . 

<%@ page language="java" import="StudentForm" %>
<%@ taglib uri="/WEB-INF/struts-html.tld"  prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean" %>
 



 


LOGIN PAGE 

 




LOGIN ID

PASSWORD
 











import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm; 
import org.apache.commons.beanutils.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import javax.servlet.jsp.PageContext;

// use The seSSion stuf
public class StudentAction extends Action
{
 public ActionForward execute( ActionMapping map,ActionForm form, HttpServletRequest 
req , HttpServletResponse  res) throws Exception
 {
   String action = req.getParameter("action");
  if (action == null)
  { 
   StudentDatabase  stBase = new StudentDatabase ();
   StudentForm sf= new StudentForm();
   String[] str = stBase.getAllNames();
   String strng ="blah" ;
   sf.setPasswd(strng);
req.setAttribute("sf", sf);
   ActionErrors er= new ActionErrors();
   er.add(ActionErrors.GLOBAL_ERROR , new ActionError("errorRakesh"));
   if(!er.empty()) 
 {
  saveErrors(req,er);
  return(map.findForward("RakyError"));
 }
 else
 return(map.findForward("RakyCancel")); 
  }
 else
  {  
  return(map.findForward("RakyCancel"));  
  }
  
}// end of class
}

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.*;
 import org.apache.struts.validator.ValidatorForm;

public class StudentForm extends  ValidatorForm
{
  private int student =0;
 private String passwd = null;
public  StudentForm()
{
 student=0;
passwd = new String();
}
 public StudentForm( int student ,String passwd)
 {
 student=student;
  passwd= passwd; 
 }
public int  getStudent()
{
return this.student;
}
public void setStudent(int student)
{
this.student=student; 
}

public String getPasswd( )
{
return this.passwd;
}
public void setPasswd(String passwd)
{
this.passwd=passwd; 
}
public void reset(ActionMapping mapping ,HttpServletRequest request)
{
this.student=0; 
this.passwd=null;
}
public ActionErrors validate( ActionMapping map,HttpServletRequest req)
{
 ActionErrors errors=super.validate(map,req);
 if(student == 0)
 {
  System.out.println("HELLO blah "+student);
  errors.add("student", new ActionError("IDProblem"));
 }
return errors;
} // end of action errors
}// end of Student from class



http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>


 














   

  


propertyInfo.properties
hello=This is test page
start=This is first page of the application
info=This page stores  contains text files and drop downs 
error=There is problem please have  a look 
submit=ADD TO DATABASE 
clear=Clear the Data 
cancel=Cancel Button
click=Please Click to start the application
button=Login
cancel=CancelButton
reset=ResetButton
IDProblem=There is problem in id  has greater value than 4 pl. recheck it  
prompt.username= Please Enter the User Name by blah
prompt.password=Please enter the password by bla  
errors.required={0} is required.
errors.minlength={0} cannot be less than {1} characters.
errors.maxlength={0} cannot be greater than {2} characters.
errors.invalid={0} is invalid.
errors.byte={0} must be an byte.
errors.short={0} must be an short.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.float={0} must be an float.
errors.double={0} must be an double.
errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
rakeshErROR=This is first ssuccessfyl errro by blah 
errorRakesh=This is type of error in jsp page


eError is 

HTTP Status 500 - 

type Exception report
message 
description The server encountered an internal error () that prevented it from 
fulfilling this request.
exception 
org.apache.jasper.JasperException: Cannot create iterator for [EMAIL PROTECTED]
a

Re: Newbie needs help: Validator not working with Struts/Velocity

2004-03-14 Thread Marino A. Jonsson
I see nothing wrong - the actions look fine and #errorMarkup() should take
care of displaying any form errors.  Did you model this after the validator
example in the velstruts appliction that comes with Velocity Tools 1.1-rc1?

cheers,
Marinó

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm fairly new to Struts, and have been trying to get my simple
> application to work - using Struts 1.1, Velocity 1.3.1, Velocity
> Tools 1.1-rc1, and Tomcat 4.1.29. The application (such as it is)
> works as far as presentation and workflow - but _isn't_ working is
> the Validator framework. I've spent the last day mining the web for
> help and haven't been able to progress at all...
>
> The validator files _are_ being loaded - I see them in the log
> files. And the rules/formset are being parsed - again, I see it in
> the log. However, when the form is submitted on the first page
> (payment.vm) and it goes to the second...no validation takes place.
> No errors are appearing in either the catalina.out or localhost
> log file. I have kicked up the log level to trace and still see
> nothing wrong - other than the validation doesn't seem to happen.
>
> Any help or suggestions would be GREATLY appreciated - I'm rather
> stuck at the moment. I'm sure its just some silly configuration
> or other error...
>
> I'm including all the relevant files inline below.
>
> Thank you very much
>
>   Andy Akins
>
> == web.xml
>
> 
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
>   CCPAY
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   debug
>   2
> 
> 
>   detail
>   2
> 
> 
>   validate
>   true
> 
> 2
>   
>   
> velocity
>
org.apache.velocity.tools.view.servlet.VelocityViewServlet
> 
>   org.apache.velocity.toolbox
>   /WEB-INF/toolbox.xml
> 
> 
>   org.apache.velocity.properties
>   /WEB-INF/velocity.properties
>
>10
>   
>   
> action
> *.do
>   
>   
> velocity
> *.vm
>   
>   
> index.html
>   
> 
>
> = struts-config.xml
> 
>"-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
>   
> 
>   
> 
>   
>   
>type="org.apache.struts.actions.ForwardAction"
>   name="paymentForm"
>   validate="false"
>   parameter="/payment.vm"/>
>type="org.apache.struts.actions.ForwardAction"
>   name="paymentForm"
>   input="/Payment.do"
>   validate="true"
>   parameter="/processing.vm"/>
>   
>   
>   
>value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
>   
> 
>
> = validation.xml - I'm using the standard validate-rules.xml
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.0//EN"
>   "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>
> 
>   
> 
>depends="required,email">
> 
> 
>   
> 
>   
> 
>
> = Toolbox.xml
> 
>
> 
>   
>  link
>  org.apache.velocity.tools.struts.StrutsLinkTool
>   
>   
>  slink
>  org.apache.velocity.tools.struts.SecureLinkTool
>   
>   
>  text
>  org.apache.velocity.tools.struts.MessageTool
>   
>   
>  errors
>  org.apache.velocity.tools.struts.ErrorsTool
>   
>   
>  messages
>  org.apache.velocity.tools.struts.ActionMessagesTool
>   
>   
>  form
>  org.apache.velocity.tools.struts.FormTool
>   
>   
>  tiles
>  org.apache.velocity.tools.struts.TilesTool
>   
>   
>  validator
>  org.apache.velocity.tools.struts.ValidatorTool
>   
> 
>
> = payment.vm
> 
>   
> CCPAY
> 
> 
> 
>   
>   
>   #errorMarkup()
> 
>   
> 
>   Fee to be billed to your card
>$
> 
>   
> 
>   
>   
> 
>   
> 
>
> = processing.vm
> 
> 
>   
> Processing Page.
> 
> 
> 
>   
>   
>  
> 
> 
>   Processing ...
> Thank you for your patience
> $!paymentForm.amount
> https://www.tennesseeanytime.org/tnanytime/apps/processing.gif";
alt="Showing Progress.">
> 
>   
> 
>
> = VM_global_library.vm
> ## Display all queued Struts errors
> #macro (errorMarkup)
> #if ($errors.exist() )
> 
> #foreach ($e in $errors.all )
> $e
> #end
> 
> #end
> #end




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



RE: Help on struts

2004-03-13 Thread Andrew Hill
I guess the first thing to consider is what you mean by "come back to the
previous page".
Do you just mean have the user redirected back to that url when they have
finished playing with the search? or is it more complex. For example the
previous page is a form, and they are halfway through filling it in when
they need to search, and on completion need to take up where they left off
with filling it in?

In the first case the easiest way (Im assuming there are multiple places
that send you to the search page) might be to have the link to the search
page add a parameter to the url containing the name of an ActionForward that
will take the user back to this page.

The search page can make note of this forward name, and when the user is
finished searching can look it up and return it as the forward from the
searchs action.

-Original Message-
From: Shoaib [mailto:[EMAIL PROTECTED]
Sent: Saturday, 13 March 2004 14:01
To: 'Struts Users Mailing List'
Subject: Help on struts


We are using struts 1.1.

We have some pages where user is going to have some search icon and if
user clicks on that then he will move to search page where he can search
the value and then come back to the previous page.

Can somebody please give some idea how to do it.

Regards
Shoaib


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



Help on struts

2004-03-12 Thread Shoaib
We are using struts 1.1.

We have some pages where user is going to have some search icon and if
user clicks on that then he will move to search page where he can search
the value and then come back to the previous page.

Can somebody please give some idea how to do it.

Regards
Shoaib


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



RE: help implementing modules...

2004-03-12 Thread Damm, Gary
Thanks, this is the best explanation I've read so far on switching
modules.

One issue I have with this.  In my applications I always have an
application specific BaseAction that all of my Action classes extend
from.  This is to enforce my business rules on every request.  I do not
use generic/predefined Actions.  When I have found the need for the
functionality of the predefined actions (Success, Dispatch, Switch, etc)
I've reimplemented them so they extend my BaseAction.

What I would like to see, and this is targeted to the community in
general, is a way to use these generic behaviors without having to
bypass my BaseAction or reimplement them.  Maybe as helper classes that
I call from my actions.  

There are several ways to solve this and I just thought I should put it
out there to see if others have experienced the same issues and have
some other solutions.

> -Original Message-
> From: Srikanth Shenoy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 7:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: help implementing modules...
> 
> Hi Gary,
> 
> I would suggest download the following free chapter from my book -
> Struts Survival Guide.
> Go to http://www.objectsource.com and find the link there to download
> Chapter 4.
> It tells you how to setup and use modules.
> 
> Hope that helps,
> 
>   Srikanth Shenoy
>   Author
>   Struts Survival Guide: Basics to Best Practices
> <http://www.objectsource.com/strutsbook.html>
>   J2EE Project Survival Guide
> <http://www.theserverside.com/books/review/J2EESurvivalGuide.tss>
> 
> 
> "Damm, Gary" <[EMAIL PROTECTED]> wrote in message
>
news:<[EMAIL PROTECTED]>...
> I've successfully used Struts for several applications and have been
> very happy with it.  I am getting ready to use it for a larger project
> and would like to use modules but I'm having some problems.
> 
> It appears that when I attempt to switch from the default module to a
> new module (module1) it never actually recognizes the new module.
When
> I attempt to go to a page in the new module that references an action
> that is defined in the new module action mappings I consistently get
the
> following error.  I have looked through the documentation and browsed
> the list archive and still can not figure out what I'm doing wrong.
Any
> help appreciated.
> 
> Also, if anyone knows a good book that documents modules well I'd like
> to know (Struts In Action and Jakarta Struts have little information
on
> modules).
> 
> The error:
> ...
> [2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch
> javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> /DomainSearch
> at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> at
> org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> at
>
org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> at _module1._home__jsp._jspService(_home__jsp.java:448)
> ...
> 
> Here is my web.xml where I define the module:
> 
> ...
> 
>   config/module1
>   /WEB-INF/struts-config-module1.xml
> 
> ...
> 
> Here is my forward to the page in module1:
> ...
>path="/Module1HomeLink"
>   type="com.qualcomm.bds.struts.SampleAppSuccessAction"
>   unknown="false"
>   validate="false" >
> 
>  name="success"
>   path="/module1/Home.jsp"
>   contextRelative="true"
>   redirect="true" />
> 
> 
> ...
> 
> Here is my link on the originating jsp (in default module):
> ...
>  key="label.module1"/>
> ...
> 
> Here is the form in the new module that references the action: ...
>  ...
> 
> Here is the action in the module1 config file:
> ...
>path="/DomainSearch"
>   name="SearchForm"
>   type="com.qualcomm.bds.struts.SampleAppSearchAction"
>   unknown="false"
>   validate="true"
>   input="/module1/Home.jsp" >
> 
>name="success"
> path="/module1/List.jsp"
> contextRelative="true" />
> 
>  key="errors.generic"
>   type="java.lang.Exception"/>
> 
> 
> ...
> --

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



RE: help implementing modules...

2004-03-12 Thread Liu, Anne I
After doing a little more research, it looks like the html:form tag only
uses the current module.  Thus, what you need to do is switch modules before
you do a form post.

One way to do this is change your default config xml to link to the html
form page in your module1



 



Then in your struts-config-module1.xml add the following entry




Hope this helps!
> -Original Message-
> From: Liu, Anne I [SMTP:[EMAIL PROTECTED]
> Sent: Friday, March 12, 2004 10:13 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: help implementing modules...
> 
> I think it might be a problem with using the html tag library?? 
> 
> I use straight HTML and it seems to work fine
> 
> 
> > -Original Message-
> > From:   Damm, Gary [SMTP:[EMAIL PROTECTED]
> > Sent:   Thursday, March 11, 2004 5:50 PM
> > To: Daniel; Struts Users Mailing List
> > Subject:RE: help implementing modules...
> > 
> > Thanks for the feedback.  I removed these and still the same problem.
> > 
> > Also, I originally put them in on the guidance of the UserGuide.
> > 
> > Anything else look like a problem?
> > 
> > Thanks,
> > Gary
> > 
> > > -Original Message-
> > > From: Daniel [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, March 11, 2004 1:41 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: help implementing modules...
> > > 
> > > ops ;-) and contextRelative too.
> > > 
> > > 
> > > - Original Message -
> > > From: "Liu, Anne I" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Thursday, March 11, 2004 5:08 PM
> > > Subject: RE: help implementing modules...
> > > 
> > > 
> > > > I don't know if this will help, but you have to prepend the module
> > name
> > > into
> > > > your URL.
> > > >
> > > > Thus, your link should look like
> > > >
> > > > 
> > > >
> > > > I've found the short section in the struts the most helpful when
> > dealing
> > > > with modules
> > > >
> > > >
> > >
> > http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_
> > mo
> > > du
> > > > les
> > > >
> > > > > -Original Message-
> > > > > From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> > > > > Sent: Thursday, March 11, 2004 1:56 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: help implementing modules...
> > > > >
> > > > > I've successfully used Struts for several applications and have
> > been
> > > > > very happy with it.  I am getting ready to use it for a larger
> > project
> > > > > and would like to use modules but I'm having some problems.
> > > > >
> > > > > It appears that when I attempt to switch from the default module
> > to a
> > > > > new module (module1) it never actually recognizes the new module.
> > > When
> > > > > I attempt to go to a page in the new module that references an
> > action
> > > > > that is defined in the new module action mappings I consistently
> > get
> > > the
> > > > > following error.  I have looked through the documentation and
> > browsed
> > > > > the list archive and still can not figure out what I'm doing
> > wrong.
> > > Any
> > > > > help appreciated.
> > > > >
> > > > > Also, if anyone knows a good book that documents modules well I'd
> > like
> > > > > to know (Struts In Action and Jakarta Struts have little
> > information
> > > on
> > > > > modules).
> > > > >
> > > > > The error:
> > > > > ...
> > > > > [2004/03/11 11:23:07] Cannot retrieve mapping for action
> > /DomainSearch
> > > > > javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> > > > > /DomainSearch
> > > > > at
> > > > > org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> > > > > at
> > > > > org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> > > > > at
> > > > >
> 

RE: help implementing modules...

2004-03-12 Thread Liu, Anne I
I think it might be a problem with using the html tag library?? 

I use straight HTML and it seems to work fine


> -Original Message-
> From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 5:50 PM
> To:   Daniel; Struts Users Mailing List
> Subject:  RE: help implementing modules...
> 
> Thanks for the feedback.  I removed these and still the same problem.
> 
> Also, I originally put them in on the guidance of the UserGuide.
> 
> Anything else look like a problem?
> 
> Thanks,
> Gary
> 
> > -Original Message-
> > From: Daniel [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 11, 2004 1:41 PM
> > To: Struts Users Mailing List
> > Subject: Re: help implementing modules...
> > 
> > ops ;-) and contextRelative too.
> > 
> > 
> > - Original Message -
> > From: "Liu, Anne I" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Thursday, March 11, 2004 5:08 PM
> > Subject: RE: help implementing modules...
> > 
> > 
> > > I don't know if this will help, but you have to prepend the module
> name
> > into
> > > your URL.
> > >
> > > Thus, your link should look like
> > >
> > > 
> > >
> > > I've found the short section in the struts the most helpful when
> dealing
> > > with modules
> > >
> > >
> >
> http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_
> mo
> > du
> > > les
> > >
> > > > -Original Message-
> > > > From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> > > > Sent: Thursday, March 11, 2004 1:56 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: help implementing modules...
> > > >
> > > > I've successfully used Struts for several applications and have
> been
> > > > very happy with it.  I am getting ready to use it for a larger
> project
> > > > and would like to use modules but I'm having some problems.
> > > >
> > > > It appears that when I attempt to switch from the default module
> to a
> > > > new module (module1) it never actually recognizes the new module.
> > When
> > > > I attempt to go to a page in the new module that references an
> action
> > > > that is defined in the new module action mappings I consistently
> get
> > the
> > > > following error.  I have looked through the documentation and
> browsed
> > > > the list archive and still can not figure out what I'm doing
> wrong.
> > Any
> > > > help appreciated.
> > > >
> > > > Also, if anyone knows a good book that documents modules well I'd
> like
> > > > to know (Struts In Action and Jakarta Struts have little
> information
> > on
> > > > modules).
> > > >
> > > > The error:
> > > > ...
> > > > [2004/03/11 11:23:07] Cannot retrieve mapping for action
> /DomainSearch
> > > > javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> > > > /DomainSearch
> > > > at
> > > > org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> > > > at
> > > > org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> > > > at
> > > >
> >
> org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> > > > at _module1._home__jsp._jspService(_home__jsp.java:448)
> > > > ...
> > > >
> > > > Here is my web.xml where I define the module:
> > > >
> > > > ...
> > > > 
> > > > config/module1
> > > > /WEB-INF/struts-config-module1.xml
> > > > 
> > > > ...
> > > >
> > > > Here is my forward to the page in module1:
> > > > ...
> > > >  > > >   path="/Module1HomeLink"
> > > >   type="com.qualcomm.bds.struts.SampleAppSuccessAction"
> > > >   unknown="false"
> > > >   validate="false" >
> > > >
> > > >> > > name="success"
> > > > path="/module1/Home.jsp"
> > > > contextRelative="true"
> > > > redirect="true" />
> > > >
> > > &

Re: help! I m going mad

2004-03-12 Thread Siamack
Hello:
 
the  "name" attribute in your logic:iterate should be your object name not your class 
name. Hope this helps.
 

   
<%-- --%>
   
   Submit Changes




 
regards,
 
 



-
Post your free ad now! Yahoo! Canada Personals


Re: asking for help about indexed properties

2004-03-12 Thread Lenny Sorey
On Thu, 11 Mar 2004 21:08:23 -0800, Michael McGrady wrote:

>http://jakarta.apache.org/struts/faqs/indexedprops.html
>
>At 07:15 PM 3/11/2004, you wrote:
>>I have the follow in a jsp file
>>
>>  
>>   >  indexId="ctr">
>> (QUESTION: WHAT DO name,property,id,indexId MEAN HERE? WHAT VALUES 
>> CAN I SET TO THEM?)
>>
>>>   property='<%= "labelValue[" + ctr + "].label" %>' />
>> (QUESTION: WHAT DO name,property  MEAN HERE? WHAT VALUES CAN I SET TO 
>> THEM?)
>>
>>   
>>   Submit Changes
>>  
>>
>>I searched online about the meaning of these properties only fail to find 
>>any clear descritpions, the api of struts says little about them, can 
>>anyone tell me the meanings of them?
>>by the way, for this jsp file ,can any one give me the related bean files 
>>that can be used in it?
>>
>>Thanks&Regards
>>
>>_
>>ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  http://messenger.msn.com/cn
>>
>>
>>-
>>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]
>


-BEGIN PGP PUBLIC KEY BLOCK-
Version: PGP SDK 3.0

mQGiBEAClqERBADeE/tHvN70Bkf9PhQ/WiouqfbXKLeQKQ0baG/FWrbmvOzhcHg7
huljwUY0KuxkdZH0Hdgfn0YPh44A0C/lKTPAzoXhy6ANHx4A0szhu74M2tbRunFS
74wNHQhEPFq9B6gRCYzKyk1GYBQGjTBPtWztgNdC5VxcLDNS36RLZmLEIQCg/4Tb
vDfmEkH4P4QrzCqcKNCmTG8EAJZzv4z+wukdzJV8Vkx+c3dxWLx+S1tfTn/BH0U4
VVPn7S73p77PY7ziuIR4t8mBfUmm1TvW2LDEb0zcJo6BOVr0iADOAhNkHtahIBFv
uoyF9OQksH8o5pTbR6hTqXjIQZAZDKk3MI4jnGF7kc0cplgN6MNh1yplc+4lwkP5
HSTUBAC/UGkVxa1HTG1FSnCP0Ln8M85Pp7Z2liZRpuJmxQLbLq0Qb87+OlDP6ciV
2+X1GTrHVfT4JzAbDHBKN0DPUmiZ1kRtiT0SxkCQ+DiyjNKNrC+rLyODZouKUnWk
8Nk07fTf62nBl/9PQCL5hWJbVHSjXQdzeJgK3GcTC1YILfhwJ7QgTGVubnkgU29y
ZXkgPGxyc29yZXlAZmF0ZG90LmNvbT6JAF0EEBECAB0FAkAClqENCwMCATA0OEOJ
4AIZAQUbAwAKCRDmL6PAFcSh0XUGAKCsOdUe81UztypXUwLLBqC1FP/n
rACgtY34ocZm19ODpmuCdQrllJOOgOi5Ag0EQAKWoRAIAPZCV7cIfwgXcqK61qlC
8wXo+VMROU+28W65Szgg2gGnVqMU6Y9AVfPQB8bLQ6mUrfdMZIZJ+AyDvWXpF9Sh
01D49Vlf3HZSTz09jdvOmeFXklnN/biudE/F/Ha8g8VHMGHOfMlm/xX5u/2RXscB
qtNbno2gpXI61Brwv0YAWCvl9Ij9WE5J280gtJ3kkQc2azNsOA1FHQ98iLMcfFst
jvbzySPAQ/ClWxiNjrtVjLhdONM0/XwXV0OjHRhs3jMhLLUq/zzhsSlAGBGNfISn
CnLWhsQDGcgHKXrKlQzZlp+r0ApQmwJG0wg9ZqRdQZ+cfL2JSyIZJrqrol7DVeky
CzsAAgIH/R+ctSJOUSBUfJ4e2q+VAESrSy4iu1QMLY0KeU5jR3BlayXPw/N5i9z2
7biYjoPAMqZq2Cq9hrPgpNixP9tOnJxSRYQ1W26nXTGYLRZnJRQOjfxD2ZiHIFzO
A03fGk6YjmTq71cc9LQSR4RxO0Lb02/whqndyugli59bAeL/g4WDNKh1SdfIB8z7
KdAbS0NIFV2Ncluoj1pUywqzHKrJ9Ckxj2esBAhV7FN4D6o6upY7NfCde0NxhsCP
NzhyFgUcVstDnCyvPaDi4CtODMAohLHM2uDWvUpkm/Di/M+uvWMf0U+3b8BlBz/i
ro+Ya29HpXFlSaYdjDaN59ssZuFlo7uJAEwEGBECAAwFAkAClqEFGwwACgkQ
5i+jwBXEodEsRgCfbDiOdvtHdFmjeQBt+9qHv1i0oW0An2Wx3POznsfG9o7++FuR
E9FPi8V6
=Wjdw
-END PGP PUBLIC KEY BLOCK-




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



Re: help! I m going mad

2004-03-12 Thread Niall Pemberton
In your struts-config.xml, is the action which initially displays your jsp
page associated with TestBeanForm?

Niall

- Original Message - 
From: "Mu Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 12, 2004 10:17 AM
Subject: help! I m going mad


> I just cant use logic:iterate correctly!
>
> this is my form bean class:
> public class TestBeanForm extends ActionForm {
>
> public String[] getTestBean() {
> return testBean;
> }
>
> public void setTestBean(String[] testBean) {
> this.testBean = testBean;
> }
>
> String[] testBean;
>
> and this is my form bean declaration
> 
> and this is what I have in my jsp file:
>
> 
> indexId="index1" >
> <%-- --%>
>
>Submit Changes
> 
>
> you can see, I commented out the  line, but I still kept
getting
> "No collection found" error, why? arent String[] a collection?
>
> _
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn
>
>
> -
> 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]



Re: help! I m going mad

2004-03-12 Thread Mark Lowe
Okay here's a full example, first of all i'm going to mess with your 
naming conventions as they'd drive me mad also
//bean
package com.sparrow.struts;

public class TestBean {
private String name;
public String getName() {
return name;
}   

public void setName(String name) {
this.name = name;
}
}
//the form
package com.sparrow.struts;
import java.util.ArrayList;
import java.util.List;
import org.apache.struts.action.ActionForm;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.collections.Factory;
public class TestBeanForm extends ActionForm {

	private List testBeanList;

public SizesForm() {
initLists();
}
private void initLists() {
Factory factory = new Factory() {
public Object create() {
return new TestBean();
}
};
this. testBeanList = ListUtils.lazyList(new ArrayList(), 
factory);
}
	
	public List getTestBeans() {
		return testBeanList;
	}

public void setTestBeans(List testBeanList) {
this. testBeanList = testBeanList;
}
public TestBean getTestBean(int index) {
return (TestBean) testBeanList.get(index);
}
public void setTestBean(int index,TestBean testBean) {
this. testBeanList.add(index, testBean);
}
}

//struts config





//jsp





...




On 12 Mar 2004, at 11:17, Mu Mike wrote:

I just cant use logic:iterate correctly!

this is my form bean class:
public class TestBeanForm extends ActionForm {
   public String[] getTestBean() {
   return testBean;
   }
   public void setTestBean(String[] testBean) {
   this.testBean = testBean;
   }
   String[] testBean;

and this is my form bean declaration
   
and this is what I have in my jsp file:


  
<%-- --%>
  
  Submit Changes


you can see, I commented out the  line, but I still kept 
getting "No collection found" error, why? arent String[] a collection?

_
~{SkA*;z5DEsSQ=xPP=;Aw#,GkJ9SC~} MSN Messenger:  http://messenger.msn.com/cn
-
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]


help! I m going mad

2004-03-12 Thread Mu Mike
I just cant use logic:iterate correctly!

this is my form bean class:
public class TestBeanForm extends ActionForm {
   public String[] getTestBean() {
   return testBean;
   }
   public void setTestBean(String[] testBean) {
   this.testBean = testBean;
   }
   String[] testBean;

and this is my form bean declaration
   
and this is what I have in my jsp file:

  
<%-- --%>
  
  Submit Changes


you can see, I commented out the  line, but I still kept getting 
"No collection found" error, why? arent String[] a collection?

_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

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


Re: WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-12 Thread Lukas Latz
> I see your confusion. I don't use TC, but remembered a while back there 
> was a lot of conversation about certain versions people had trouble with. 
> Perhaps it does work, but maybe you have to jump through hoops to get it 
> to do so. The archives might have more background on the specific issues 
> with TC 3.2.x. If you wanted, you could submit a bugzilla request for site
> 
> documentation clarification.
> 
> Good luck,
> Susan 

I've now upgraded to TC 3.3.2 and everything worked right away. I see your
point about how 3.2.x might be considered workable with twists.

Thanks

Lukas


-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz


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



Re: asking for help about indexed properties

2004-03-11 Thread Michael McGrady
http://jakarta.apache.org/struts/faqs/indexedprops.html

At 07:15 PM 3/11/2004, you wrote:
I have the follow in a jsp file

 
  
 indexId="ctr">
(QUESTION: WHAT DO name,property,id,indexId MEAN HERE? WHAT VALUES 
CAN I SET TO THEM?)

   
  property='<%= "labelValue[" + ctr + "].label" %>' />
(QUESTION: WHAT DO name,property  MEAN HERE? WHAT VALUES CAN I SET TO 
THEM?)

  
  Submit Changes
 
I searched online about the meaning of these properties only fail to find 
any clear descritpions, the api of struts says little about them, can 
anyone tell me the meanings of them?
by the way, for this jsp file ,can any one give me the related bean files 
that can be used in it?

Thanks&Regards

_
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  http://messenger.msn.com/cn
-
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]


RE: can anyone help me address this issue

2004-03-11 Thread Andrew Hill
I sometimes have to do things like this. You can only submit strings in the
request, so what you want is a method of representing your information as a
string in a simple way.

In this case it should be quite easy as its just an array of a simple
structure of two ints so Id probably just have two delimiters, one for the
values in the structure, and one for the structures, so for example I might
submit the lot in a hidden field as something like:

1,32;2,48;3,10;4,50


Where I use a comma to delimit between the colIndex and newWidth values, and
a semicolon to seperate each instance of the structure. You can use any old
char as a delimiter so long as it wont be confused with the values. Since
these are ints and not strings life is easy in this case!

Over on the server side you have some code that parses this string to
reconstitute the values into some kind of java classes. You may even want to
do it in your action forms setter or getter - where you pass the string when
it is set and have a (differently named) getter that can return it as the
equivelent Structure[]

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 March 2004 10:24
To: Struts Users Mailing List
Subject: RE: can anyone help me address this issue


You can't send "data structures" over HTTP you can only send strings.

You could set those values as hidden form elements with a naming
convention that would enable your server side code to recognize
the elements in the request and create the appropriate server side
data structure. This is essentially what Chris has suggested.

robert

> -Original Message-
> From: Mu Mike [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 8:25 PM
> To: [EMAIL PROTECTED]
> Subject: RE: can anyone help me address this issue
>
>
> Sorry,maybe I didnt make my question clear
> my question is:
>
> the java script variable is supposed to be an array of such a
> strutcture(although java doesnt have a struture, I just use it here to
> describe my idea,maybe I should use a class instead) ,I d like to know how
> I can submit such a value?
>
>
> Structure[] javascriptvalue;
>
> Structure{
>  int colIndex
>  int newWidth
> }
>
>
> Thanks&Regards
>
>
>
> >From: "McCormack, Chris" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: can anyone help me address this issue
> >Date: Thu, 11 Mar 2004 12:24:43 -
> >
> >use onResize on the html element that is clicked to report its new value
> to a form variable. use an onChange for the form to auto submit itself. If
> you need to hide the submission of the form use an IFrame.
> >
> >messy eugh, javascript is the pits.
> >
> >Chris
> >
> >-Original Message-
> >From: Mu Mike [mailto:[EMAIL PROTECTED]
> >Sent: 11 March 2004 12:16
> >To: [EMAIL PROTECTED]
> >Subject: RE: can anyone help me address this issue
> >
> >
> >I really need to get some idea about this issue, any suggestions?
> >
> >Thanks&Regards
> >
> >
> > >From: "Mu Mike" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: can anyone help me address this issue
> > >Date: Thu, 11 Mar 2004 05:12:16 +
> > >
> > >I m using javascript "doing" dhtml, now  I have a table, every time
> > >a user changes the width of a specific column(by draging the border
> > >line), I will save the column index and the new width to variables
> > >in javascript.Now ,after doing many such changes, I need to submit
> > >those values saved in the vairables to the server side program by
> > >submiting a form, which has an action path designing what action
> > >should be called after it get the submitted value. Now, I m
> > >wondering how I should define such javasript variables and how I can
> > >submit these values by submiting a form? I m using struts, is there
> > >any possibility to implement this idea in struts?
> > >
> > >Thanks&Regards
> > >
> > >_
> > >享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >___

RE: help me about indexed properties

2004-03-11 Thread Mu Mike
Thank you 
Craig

now I have a form

TestBeanForm.java
public class TestBeanForm extends ActionForm {
   public ArrayList getTestBean() {
   if(testBean==null)
 testBean=new ArrayList();
   return testBean;
   }
   public void setTestBean(ArrayList testBean) {
   this.testBean = testBean;
   }
   private ArrayList  testBean;

}

and I write in the jsp this:

  
   
 (QUESTION: I DONT KNOW WHAT TO SET TO THIS PROPERTY NOW, YET IT 
IS A MUST HAVE ATTRIBUTE)  

  
  Submit Changes

and this is what I have in my configuration file

   
   
what should I do to submit values for my ArrayList type object testBean?

well, I suddenly found that testBean is not a bean, so those I have in the 
jsp file is meaningless, but then how can I submit values for an ArrayList 
object?

Thanks&Regards






From: "Craig Tataryn" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: help me about indexed properties
Date: Thu, 11 Mar 2004 21:11:42 -0600 (CST)
Hi Mike, the attributes for logic iterate are all explained here:
http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate
and
http://jakarta.apache.org/struts/faqs/indexedprops.html
I've put it in my own words for you below:

For logic:iterate
==
name attribute: tag looks in all three scopes 
(page,request,application)for a bean with the name
equal to the value of this attribute.  If it is found, and there is no 
"property" attribute
specified elsewhere in the tag, then it will use the bean from the name 
attribute as the List/Map to
iterate over.

property attribute: The property specified in the property attribute will 
be applied against the
bean found in the name attribute and the value of this property will be 
used as the List/Map to
iterate.  So if you specify name="MyForm" and property="addresses" then 
the list which will be
iterated over will be the value passed back from the interate tag 
evaluating MyForm.getAddresses()
id attribute: for each loop of the iterate tag, place the next element 
from the list into a
page-level bean named by the value of the id attribute.

idIndex attribute: for each loop of the iterate tag, place the current 
index value of the element
from our List in the page-level int variable named by the value of the 
idIndex attribute (value is
in [0..list.length])

For html:text
===
The attributes are pretty well explained in
http://jakarta.apache.org/struts/userGuide/struts-html.html#text
Hope that's enough to get you started.

Craig

On Fri, 12 Mar 2004 02:53:11 +, "Mu Mike" wrote:

>
> sorry, the last mail doesnt display correctly, but when I tried to 
write a
> new one, I saw it displays correctly as the below
>
> Thanks&Regards
>
> >From: "Mu Mike" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: help me about  indexed properties
> >Date: Fri, 12 Mar 2004 02:49:47 +
> >
> >I have the below jsp file needs help
> >
> >
> >
> ><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> ><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> >
> >
> >  
> >>  indexId="ctr">
> >
> > >   property='<%= "labelValue[" + ctr + "].label" %>' />
> >
> >
> >   
> >   Submit Changes
> >  
> >
> >
> >
> >and I dont have the related bean files ,can anyone give me example
> >bean files that can be used for this jsp file?
> >
> >Thanks&Regards
> >
> >_
> >与联机的朋友进行交流,请使用 MSN Messenger:
> >http://messenger.msn.com/cn
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> 享用世界上最大的电子邮件系统? MSN Hotmail。  http://www.hotmail.com
>
>
> -
> 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]
_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

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


Re: asking for help about indexed properties

2004-03-11 Thread Srikanth Shenoy
Mike,

You wont find descriptions about them in API Javadoc.
In the Struts 1.1 distribution that you have downloaded, go to webapps
folder and deploy the struts-documentation.war in your favorite servlet
container and then look for
/userGuide/struts-logic.html and /userGuide/struts-html.html

These two files contain the description of what each attribute in these
tags stand for

Hope that helps.
  Srikanth Shenoy
  Author
  Struts Survival Guide: Basics to Best Practices
 
  J2EE Project Survival Guide
 




"Mu Mike" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> I have the follow in a jsp file
> 
>   
>   indexId="ctr">
>  (QUESTION: WHAT DO name,property,id,indexId MEAN HERE? WHAT 
> VALUES CAN
> I SET TO THEM?)
> 
> property='<%= "labelValue[" + ctr + "].label" %>' />
>  (QUESTION: WHAT DO name,property  MEAN HERE? WHAT VALUES CAN I 
> SET TO
> THEM?)
> 
>
>Submit Changes
>   
> 
> I searched online about the meaning of these properties only fail to 
> find
> any clear descritpions, the api of struts says little about them, can 
> anyone tell me the meanings of them? 
> 
> by the way, for this jsp file ,can any one give me the related bean 
> files
> that can be used in it?
> 
> Thanks&Regards
> 
> _
> ??,??? MSN Messenger:  http://messenger.msn.com/cn  


Re: help implementing modules...

2004-03-11 Thread Srikanth Shenoy
Hi Gary,

I would suggest download the following free chapter from my book -
Struts Survival Guide.
Go to http://www.objectsource.com and find the link there to download
Chapter 4.
It tells you how to setup and use modules.

Hope that helps,

  Srikanth Shenoy
  Author
  Struts Survival Guide: Basics to Best Practices
<http://www.objectsource.com/strutsbook.html> 
  J2EE Project Survival Guide
<http://www.theserverside.com/books/review/J2EESurvivalGuide.tss> 


"Damm, Gary" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
I've successfully used Struts for several applications and have been
very happy with it.  I am getting ready to use it for a larger project
and would like to use modules but I'm having some problems.

It appears that when I attempt to switch from the default module to a
new module (module1) it never actually recognizes the new module.  When
I attempt to go to a page in the new module that references an action
that is defined in the new module action mappings I consistently get the
following error.  I have looked through the documentation and browsed
the list archive and still can not figure out what I'm doing wrong.  Any
help appreciated.

Also, if anyone knows a good book that documents modules well I'd like
to know (Struts In Action and Jakarta Struts have little information on
modules).

The error:
...
[2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch
javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/DomainSearch
at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at
org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
at _module1._home__jsp._jspService(_home__jsp.java:448)
...

Here is my web.xml where I define the module:

...

config/module1
/WEB-INF/struts-config-module1.xml

...

Here is my forward to the page in module1:
...

  
  


...

Here is my link on the originating jsp (in default module):
...

...

Here is the form in the new module that references the action: ...
 ...

Here is the action in the module1 config file:
...

  
  




...
--


asking for help about indexed properties

2004-03-11 Thread Mu Mike
I have the follow in a jsp file

 
  
 indexId="ctr">
(QUESTION: WHAT DO name,property,id,indexId MEAN HERE? WHAT VALUES CAN 
I SET TO THEM?)

   
  property='<%= "labelValue[" + ctr + "].label" %>' />
(QUESTION: WHAT DO name,property  MEAN HERE? WHAT VALUES CAN I SET TO 
THEM?)

  
  Submit Changes
 
I searched online about the meaning of these properties only fail to find 
any clear descritpions, the api of struts says little about them, can 
anyone tell me the meanings of them? 

by the way, for this jsp file ,can any one give me the related bean files 
that can be used in it?

Thanks&Regards

_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

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


RE: help me about indexed properties

2004-03-11 Thread Craig Tataryn
Hi Mike, the attributes for logic iterate are all explained here:
http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate
and
http://jakarta.apache.org/struts/faqs/indexedprops.html

I've put it in my own words for you below:

For logic:iterate
==
name attribute: tag looks in all three scopes (page,request,application)for a bean 
with the name
equal to the value of this attribute.  If it is found, and there is no "property" 
attribute
specified elsewhere in the tag, then it will use the bean from the name attribute as 
the List/Map to
iterate over.

property attribute: The property specified in the property attribute will be applied 
against the
bean found in the name attribute and the value of this property will be used as the 
List/Map to
iterate.  So if you specify name="MyForm" and property="addresses" then the list which 
will be
iterated over will be the value passed back from the interate tag evaluating 
MyForm.getAddresses()

id attribute: for each loop of the iterate tag, place the next element from the list 
into a
page-level bean named by the value of the id attribute.

idIndex attribute: for each loop of the iterate tag, place the current index value of 
the element
from our List in the page-level int variable named by the value of the idIndex 
attribute (value is
in [0..list.length])

For html:text
===
The attributes are pretty well explained in
http://jakarta.apache.org/struts/userGuide/struts-html.html#text

Hope that's enough to get you started.

Craig


On Fri, 12 Mar 2004 02:53:11 +, "Mu Mike" wrote:

> 
> sorry, the last mail doesnt display correctly, but when I tried to write a 
> new one, I saw it displays correctly as the below
> 
> Thanks&Regards
> 
> >From: "Mu Mike" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: help me about  indexed properties
> >Date: Fri, 12 Mar 2004 02:49:47 +
> >
> >I have the below jsp file needs help
> >
> >
> >
> ><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> ><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> >
> >
> >  
> >>  indexId="ctr">
> >
> > >   property='<%= "labelValue[" + ctr + "].label" %>' />
> >
> >
> >   
> >   Submit Changes
> >  
> >
> >
> >
> >and I dont have the related bean files ,can anyone give me example 
> >bean files that can be used for this jsp file?
> >
> >Thanks&Regards
> >
> >_
> >ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  
> >http://messenger.msn.com/cn
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> _
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¨D MSN Hotmail¡£  http://www.hotmail.com  
> 
> 
> -
> 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]



Re: (again)help me about indexed properties

2004-03-11 Thread Hubert Rabago

--- Mu Mike <[EMAIL PROTECTED]> wrote:
>(QUESTION: what do name property ,id ,indexID mean here? what value can 
> I set to them?)
>  I searched online only fail to find any doc that give detailed 
> explaination about  these proeprties>
> property='<%= "labelValue[" + ctr + "].label" %>' />
> (QUESTION:what do name and propetry mean here? what value can I set 
> to them?)

You can always consult the Struts home page for info on tags and attributes.
http://jakarta.apache.org/struts/userGuide/index.html
http://jakarta.apache.org/struts/userGuide/struts-logic.html
http://jakarta.apache.org/struts/userGuide/struts-html.html

Hubert


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



(again)help me about indexed properties

2004-03-11 Thread Mu Mike
well,sorry again, my qeustion is the below

I have the below jsp file needs help

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


 
  
 indexId="ctr">
  (QUESTION: what do name property ,id ,indexID mean here? what value can 
I set to them?)
I searched online only fail to find any doc that give detailed 
explaination about  these proeprties>
   
  property='<%= "labelValue[" + ctr + "].label" %>' />
   (QUESTION:what do name and propetry mean here? what value can I set 
to them?)

  
  Submit Changes
 


and I dont have the related bean files ,can anyone give me example 
bean files that can be used for this jsp file?

Thanks&Regards

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


RE: can anyone help me address this issue

2004-03-11 Thread Michael McGrady
If you want to get really fancy, of course, you can convert binary to 
strings and back.

At 06:23 PM 3/11/2004, you wrote:
You can't send "data structures" over HTTP you can only send strings.

You could set those values as hidden form elements with a naming
convention that would enable your server side code to recognize
the elements in the request and create the appropriate server side
data structure. This is essentially what Chris has suggested.
robert

> -Original Message-
> From: Mu Mike [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 8:25 PM
> To: [EMAIL PROTECTED]
> Subject: RE: can anyone help me address this issue
>
>
> Sorry,maybe I didnt make my question clear
> my question is:
>
> the java script variable is supposed to be an array of such a
> strutcture(although java doesnt have a struture, I just use it here to
> describe my idea,maybe I should use a class instead) ,I d like to know how
> I can submit such a value?
>
>
> Structure[] javascriptvalue;
>
> Structure{
>  int colIndex
>  int newWidth
> }
>
>
> Thanks&Regards
>
>
>
> >From: "McCormack, Chris" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: can anyone help me address this issue
> >Date: Thu, 11 Mar 2004 12:24:43 -
> >
> >use onResize on the html element that is clicked to report its new value
> to a form variable. use an onChange for the form to auto submit itself. If
> you need to hide the submission of the form use an IFrame.
> >
> >messy eugh, javascript is the pits.
> >
> >Chris
> >
> >-Original Message-
> >From: Mu Mike [mailto:[EMAIL PROTECTED]
> >Sent: 11 March 2004 12:16
> >To: [EMAIL PROTECTED]
> >Subject: RE: can anyone help me address this issue
> >
> >
> >I really need to get some idea about this issue, any suggestions?
> >
> >Thanks&Regards
> >
> >
> > >From: "Mu Mike" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: can anyone help me address this issue
> > >Date: Thu, 11 Mar 2004 05:12:16 +
> > >
> > >I m using javascript "doing" dhtml, now  I have a table, every time
> > >a user changes the width of a specific column(by draging the border
> > >line), I will save the column index and the new width to variables
> > >in javascript.Now ,after doing many such changes, I need to submit
> > >those values saved in the vairables to the server side program by
> > >submiting a form, which has an action path designing what action
> > >should be called after it get the submitted value. Now, I m
> > >wondering how I should define such javasript variables and how I can
> > >submit these values by submiting a form? I m using struts, is there
> > >any possibility to implement this idea in struts?
> > >
> > >Thanks&Regards
> > >
> > >_
> > >ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£  http://www.hotmail.com
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >_
> >ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  http://messenger.msn.com/cn
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >***
> >This e-mail and its attachments are confidential
> >and are intended for the above named recipient
> >only. If this has come to you in error, please
> >notify the sender immediately and delete this
> >e-mail from your system.
> >You must take no action based on this, nor must
> >you copy or disclose it or any part of its contents
> >to any person or organisation.
> >Statements and opinions contained in this email may
> >not necessarily represent those of Littlewoods.
> >Please note that e-mail communications may be monitored.
> >The registered office of Littlewoods Limited and its
> >subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> >Reg

RE: help me about indexed properties

2004-03-11 Thread Mu Mike
sorry, the last mail doesnt display correctly, but when I tried to write a 
new one, I saw it displays correctly as the below

Thanks&Regards

From: "Mu Mike" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: help me about  indexed properties
Date: Fri, 12 Mar 2004 02:49:47 +0000
I have the below jsp file needs help



<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


 
  
 indexId="ctr">
   
   
  property='<%= "labelValue[" + ctr + "].label" %>' />
   

  
  Submit Changes
 


and I dont have the related bean files ,can anyone give me example 
bean files that can be used for this jsp file?

Thanks&Regards

_
与联机的朋友进行交流,请使用 MSN Messenger:  
http://messenger.msn.com/cn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


help me about indexed properties

2004-03-11 Thread Mu Mike
I have the below jsp file needs help



<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


 
  
 indexId="ctr">
   
   
  property='<%= "labelValue[" + ctr + "].label" %>' />
   

  
  Submit Changes
 


and I dont have the related bean files ,can anyone give me example bean 
files that can be used for this jsp file?

Thanks&Regards

_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

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


RE: can anyone help me address this issue

2004-03-11 Thread Robert Taylor
You can't send "data structures" over HTTP you can only send strings.

You could set those values as hidden form elements with a naming
convention that would enable your server side code to recognize
the elements in the request and create the appropriate server side
data structure. This is essentially what Chris has suggested.

robert

> -Original Message-
> From: Mu Mike [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 8:25 PM
> To: [EMAIL PROTECTED]
> Subject: RE: can anyone help me address this issue
>
>
> Sorry,maybe I didnt make my question clear
> my question is:
>
> the java script variable is supposed to be an array of such a
> strutcture(although java doesnt have a struture, I just use it here to
> describe my idea,maybe I should use a class instead) ,I d like to know how
> I can submit such a value?
>
>
> Structure[] javascriptvalue;
>
> Structure{
>  int colIndex
>  int newWidth
> }
>
>
> Thanks&Regards
>
>
>
> >From: "McCormack, Chris" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: can anyone help me address this issue
> >Date: Thu, 11 Mar 2004 12:24:43 -
> >
> >use onResize on the html element that is clicked to report its new value
> to a form variable. use an onChange for the form to auto submit itself. If
> you need to hide the submission of the form use an IFrame.
> >
> >messy eugh, javascript is the pits.
> >
> >Chris
> >
> >-Original Message-
> >From: Mu Mike [mailto:[EMAIL PROTECTED]
> >Sent: 11 March 2004 12:16
> >To: [EMAIL PROTECTED]
> >Subject: RE: can anyone help me address this issue
> >
> >
> >I really need to get some idea about this issue, any suggestions?
> >
> >Thanks&Regards
> >
> >
> > >From: "Mu Mike" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: can anyone help me address this issue
> > >Date: Thu, 11 Mar 2004 05:12:16 +
> > >
> > >I m using javascript "doing" dhtml, now  I have a table, every time
> > >a user changes the width of a specific column(by draging the border
> > >line), I will save the column index and the new width to variables
> > >in javascript.Now ,after doing many such changes, I need to submit
> > >those values saved in the vairables to the server side program by
> > >submiting a form, which has an action path designing what action
> > >should be called after it get the submitted value. Now, I m
> > >wondering how I should define such javasript variables and how I can
> > >submit these values by submiting a form? I m using struts, is there
> > >any possibility to implement this idea in struts?
> > >
> > >Thanks&Regards
> > >
> > >_
> > >享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >_
> >与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >***
> >This e-mail and its attachments are confidential
> >and are intended for the above named recipient
> >only. If this has come to you in error, please
> >notify the sender immediately and delete this
> >e-mail from your system.
> >You must take no action based on this, nor must
> >you copy or disclose it or any part of its contents
> >to any person or organisation.
> >Statements and opinions contained in this email may
> >not necessarily represent those of Littlewoods.
> >Please note that e-mail communications may be monitored.
> >The registered office of Littlewoods Limited and its
> >subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> >Registered number of Littlewoods Limited is 262152.
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> 享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
>
> -
> 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]



RE: can anyone help me address this issue

2004-03-11 Thread Mu Mike
Sorry,maybe I didnt make my question clear
my question is:
the java script variable is supposed to be an array of such a 
strutcture(although java doesnt have a struture, I just use it here to 
describe my idea,maybe I should use a class instead) ,I d like to know how 
I can submit such a value?

Structure[] javascriptvalue;

Structure{
int colIndex
int newWidth
}
Thanks&Regards



From: "McCormack, Chris" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: can anyone help me address this issue
Date: Thu, 11 Mar 2004 12:24:43 -
use onResize on the html element that is clicked to report its new value 
to a form variable. use an onChange for the form to auto submit itself. If 
you need to hide the submission of the form use an IFrame.
messy eugh, javascript is the pits.

Chris

-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 12:16
To: [EMAIL PROTECTED]
Subject: RE: can anyone help me address this issue
I really need to get some idea about this issue, any suggestions?

Thanks&Regards

>From: "Mu Mike" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: can anyone help me address this issue
>Date: Thu, 11 Mar 2004 05:12:16 +
>
>I m using javascript "doing" dhtml, now  I have a table, every time
>a user changes the width of a specific column(by draging the border
>line), I will save the column index and the new width to variables
>in javascript.Now ,after doing many such changes, I need to submit
>those values saved in the vairables to the server side program by
>submiting a form, which has an action path designing what action
>should be called after it get the submitted value. Now, I m
>wondering how I should define such javasript variables and how I can
>submit these values by submiting a form? I m using struts, is there
>any possibility to implement this idea in struts?
>
>Thanks&Regards
>
>_
>享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please
notify the sender immediately and delete this
e-mail from your system.
You must take no action based on this, nor must
you copy or disclose it or any part of its contents
to any person or organisation.
Statements and opinions contained in this email may
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


RE: help implementing modules...

2004-03-11 Thread Damm, Gary
Thanks for the feedback.  I removed these and still the same problem.

Also, I originally put them in on the guidance of the UserGuide.

Anything else look like a problem?

Thanks,
Gary

> -Original Message-
> From: Daniel [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 1:41 PM
> To: Struts Users Mailing List
> Subject: Re: help implementing modules...
> 
> ops ;-) and contextRelative too.
> 
> 
> - Original Message -
> From: "Liu, Anne I" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, March 11, 2004 5:08 PM
> Subject: RE: help implementing modules...
> 
> 
> > I don't know if this will help, but you have to prepend the module
name
> into
> > your URL.
> >
> > Thus, your link should look like
> >
> > 
> >
> > I've found the short section in the struts the most helpful when
dealing
> > with modules
> >
> >
>
http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_
mo
> du
> > les
> >
> > > -Original Message-
> > > From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> > > Sent: Thursday, March 11, 2004 1:56 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: help implementing modules...
> > >
> > > I've successfully used Struts for several applications and have
been
> > > very happy with it.  I am getting ready to use it for a larger
project
> > > and would like to use modules but I'm having some problems.
> > >
> > > It appears that when I attempt to switch from the default module
to a
> > > new module (module1) it never actually recognizes the new module.
> When
> > > I attempt to go to a page in the new module that references an
action
> > > that is defined in the new module action mappings I consistently
get
> the
> > > following error.  I have looked through the documentation and
browsed
> > > the list archive and still can not figure out what I'm doing
wrong.
> Any
> > > help appreciated.
> > >
> > > Also, if anyone knows a good book that documents modules well I'd
like
> > > to know (Struts In Action and Jakarta Struts have little
information
> on
> > > modules).
> > >
> > > The error:
> > > ...
> > > [2004/03/11 11:23:07] Cannot retrieve mapping for action
/DomainSearch
> > > javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> > > /DomainSearch
> > > at
> > > org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> > > at
> > > org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> > > at
> > >
>
org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> > > at _module1._home__jsp._jspService(_home__jsp.java:448)
> > > ...
> > >
> > > Here is my web.xml where I define the module:
> > >
> > > ...
> > > 
> > > config/module1
> > > /WEB-INF/struts-config-module1.xml
> > > 
> > > ...
> > >
> > > Here is my forward to the page in module1:
> > > ...
> > >  > >   path="/Module1HomeLink"
> > >   type="com.qualcomm.bds.struts.SampleAppSuccessAction"
> > >   unknown="false"
> > >   validate="false" >
> > >
> > >> > name="success"
> > > path="/module1/Home.jsp"
> > > contextRelative="true"
> > > redirect="true" />
> > >
> > > 
> > > ...
> > >
> > > Here is my link on the originating jsp (in default module):
> > > ...
> > >  > > key="label.module1"/>
> > > ...
> > >
> > > Here is the form in the new module that references the action:
> > > ...
> > > 
> > > ...
> > >
> > > Here is the action in the module1 config file:
> > > ...
> > >  > >   path="/DomainSearch"
> > >   name="SearchForm"
> > >   type="com.qualcomm.bds.struts.SampleAppSearchAction"
> > >   unknown="false"
> > >   validate="true"
> > >   input="/module1/Home.jsp" >
> > >
> > >> > name="success"
> > > path="/module1/List.jsp"
> > > contextRelative="true" />
> > >
> > >  > > key="errors.generic"
> > > type="java.lang.Exception"/>
> > >
> > > 
> > > ...
> > >
> > >
-
> > > 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]
> >
> >


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



Re: help implementing modules...

2004-03-11 Thread Daniel
ops ;-) and contextRelative too.


- Original Message - 
From: "Liu, Anne I" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, March 11, 2004 5:08 PM
Subject: RE: help implementing modules...


> I don't know if this will help, but you have to prepend the module name
into
> your URL.
>
> Thus, your link should look like
>
> 
>
> I've found the short section in the struts the most helpful when dealing
> with modules
>
>
http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_modu
> les
>
> > -Original Message-
> > From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> > Sent: Thursday, March 11, 2004 1:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: help implementing modules...
> >
> > I've successfully used Struts for several applications and have been
> > very happy with it.  I am getting ready to use it for a larger project
> > and would like to use modules but I'm having some problems.
> >
> > It appears that when I attempt to switch from the default module to a
> > new module (module1) it never actually recognizes the new module.  When
> > I attempt to go to a page in the new module that references an action
> > that is defined in the new module action mappings I consistently get the
> > following error.  I have looked through the documentation and browsed
> > the list archive and still can not figure out what I'm doing wrong.  Any
> > help appreciated.
> >
> > Also, if anyone knows a good book that documents modules well I'd like
> > to know (Struts In Action and Jakarta Struts have little information on
> > modules).
> >
> > The error:
> > ...
> > [2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch
> > javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> > /DomainSearch
> > at
> > org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> > at
> > org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> > at
> > org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> > at _module1._home__jsp._jspService(_home__jsp.java:448)
> > ...
> >
> > Here is my web.xml where I define the module:
> >
> > ...
> > 
> > config/module1
> > /WEB-INF/struts-config-module1.xml
> > 
> > ...
> >
> > Here is my forward to the page in module1:
> > ...
> >  >   path="/Module1HomeLink"
> >   type="com.qualcomm.bds.struts.SampleAppSuccessAction"
> >   unknown="false"
> >   validate="false" >
> >
> >> name="success"
> > path="/module1/Home.jsp"
> > contextRelative="true"
> > redirect="true" />
> >
> > 
> > ...
> >
> > Here is my link on the originating jsp (in default module):
> > ...
> >  > key="label.module1"/>
> > ...
> >
> > Here is the form in the new module that references the action:
> > ...
> > 
> > ...
> >
> > Here is the action in the module1 config file:
> > ...
> >  >   path="/DomainSearch"
> >   name="SearchForm"
> >   type="com.qualcomm.bds.struts.SampleAppSearchAction"
> >   unknown="false"
> >   validate="true"
> >   input="/module1/Home.jsp" >
> >
> >> name="success"
> > path="/module1/List.jsp"
> > contextRelative="true" />
> >
> >  > key="errors.generic"
> > type="java.lang.Exception"/>
> >
> > 
> > ...
> >
> > -
> > 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]
>
>


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



Re: help implementing modules...

2004-03-11 Thread Daniel
take out the redirect attribute.

Abraços
Daniel S.

- Original Message - 
From: "Liu, Anne I" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, March 11, 2004 5:08 PM
Subject: RE: help implementing modules...


> I don't know if this will help, but you have to prepend the module name
into
> your URL.
>
> Thus, your link should look like
>
> 
>
> I've found the short section in the struts the most helpful when dealing
> with modules
>
>
http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_modu
> les
>
> > -Original Message-
> > From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> > Sent: Thursday, March 11, 2004 1:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: help implementing modules...
> >
> > I've successfully used Struts for several applications and have been
> > very happy with it.  I am getting ready to use it for a larger project
> > and would like to use modules but I'm having some problems.
> >
> > It appears that when I attempt to switch from the default module to a
> > new module (module1) it never actually recognizes the new module.  When
> > I attempt to go to a page in the new module that references an action
> > that is defined in the new module action mappings I consistently get the
> > following error.  I have looked through the documentation and browsed
> > the list archive and still can not figure out what I'm doing wrong.  Any
> > help appreciated.
> >
> > Also, if anyone knows a good book that documents modules well I'd like
> > to know (Struts In Action and Jakarta Struts have little information on
> > modules).
> >
> > The error:
> > ...
> > [2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch
> > javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> > /DomainSearch
> > at
> > org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> > at
> > org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> > at
> > org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> > at _module1._home__jsp._jspService(_home__jsp.java:448)
> > ...
> >
> > Here is my web.xml where I define the module:
> >
> > ...
> > 
> > config/module1
> > /WEB-INF/struts-config-module1.xml
> > 
> > ...
> >
> > Here is my forward to the page in module1:
> > ...
> >  >   path="/Module1HomeLink"
> >   type="com.qualcomm.bds.struts.SampleAppSuccessAction"
> >   unknown="false"
> >   validate="false" >
> >
> >> name="success"
> > path="/module1/Home.jsp"
> > contextRelative="true"
> > redirect="true" />
> >
> > 
> > ...
> >
> > Here is my link on the originating jsp (in default module):
> > ...
> >  > key="label.module1"/>
> > ...
> >
> > Here is the form in the new module that references the action:
> > ...
> > 
> > ...
> >
> > Here is the action in the module1 config file:
> > ...
> >  >   path="/DomainSearch"
> >   name="SearchForm"
> >   type="com.qualcomm.bds.struts.SampleAppSearchAction"
> >   unknown="false"
> >   validate="true"
> >   input="/module1/Home.jsp" >
> >
> >> name="success"
> > path="/module1/List.jsp"
> > contextRelative="true" />
> >
> >  > key="errors.generic"
> > type="java.lang.Exception"/>
> >
> > 
> > ...
> >
> > -
> > 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]
>
>


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



RE: help implementing modules...

2004-03-11 Thread Liu, Anne I
I don't know if this will help, but you have to prepend the module name into
your URL.

Thus, your link should look like



I've found the short section in the struts the most helpful when dealing
with modules

http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_modu
les

> -Original Message-
> From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 1:56 PM
> To:   [EMAIL PROTECTED]
> Subject:  help implementing modules...
> 
> I've successfully used Struts for several applications and have been
> very happy with it.  I am getting ready to use it for a larger project
> and would like to use modules but I'm having some problems.
> 
> It appears that when I attempt to switch from the default module to a
> new module (module1) it never actually recognizes the new module.  When
> I attempt to go to a page in the new module that references an action
> that is defined in the new module action mappings I consistently get the
> following error.  I have looked through the documentation and browsed
> the list archive and still can not figure out what I'm doing wrong.  Any
> help appreciated.
> 
> Also, if anyone knows a good book that documents modules well I'd like
> to know (Struts In Action and Jakarta Struts have little information on
> modules).
> 
> The error:
> ...
> [2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch
> javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> /DomainSearch
> at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> at
> org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> at
> org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> at _module1._home__jsp._jspService(_home__jsp.java:448)
> ...
> 
> Here is my web.xml where I define the module:
> 
> ...
> 
>   config/module1
>   /WEB-INF/struts-config-module1.xml
> 
> ...
> 
> Here is my forward to the page in module1:
> ...
>path="/Module1HomeLink"
>   type="com.qualcomm.bds.struts.SampleAppSuccessAction"
>   unknown="false"
>   validate="false" >
>   
>  name="success" 
>   path="/module1/Home.jsp"
>   contextRelative="true"
>   redirect="true" />
> 
> 
> ...
> 
> Here is my link on the originating jsp (in default module):
> ...
>  key="label.module1"/>
> ...
> 
> Here is the form in the new module that references the action:
> ...
> 
> ...
> 
> Here is the action in the module1 config file:
> ...
>path="/DomainSearch"
>   name="SearchForm"
>   type="com.qualcomm.bds.struts.SampleAppSearchAction"
>   unknown="false"
>   validate="true"
>   input="/module1/Home.jsp" >
>   
>name="success"
> path="/module1/List.jsp"
> contextRelative="true" />
> 
>  key="errors.generic" 
>   type="java.lang.Exception"/>
> 
> 
> ...
> 
> -
> 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]



help implementing modules...

2004-03-11 Thread Damm, Gary
I've successfully used Struts for several applications and have been
very happy with it.  I am getting ready to use it for a larger project
and would like to use modules but I'm having some problems.

It appears that when I attempt to switch from the default module to a
new module (module1) it never actually recognizes the new module.  When
I attempt to go to a page in the new module that references an action
that is defined in the new module action mappings I consistently get the
following error.  I have looked through the documentation and browsed
the list archive and still can not figure out what I'm doing wrong.  Any
help appreciated.

Also, if anyone knows a good book that documents modules well I'd like
to know (Struts In Action and Jakarta Struts have little information on
modules).

The error:
...
[2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch
javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/DomainSearch
at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at
org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
at _module1._home__jsp._jspService(_home__jsp.java:448)
...

Here is my web.xml where I define the module:

...

config/module1
/WEB-INF/struts-config-module1.xml

...

Here is my forward to the page in module1:
...

  
  


...

Here is my link on the originating jsp (in default module):
...

...

Here is the form in the new module that references the action:
...

...

Here is the action in the module1 config file:
...

  
  




...

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



Please help :No Collection found

2004-03-11 Thread suneetha kurakula
Hello All,
 
I am Kurakula .I am new to this group .My Problem is 
I've three jsp pages create,view and edit.
I've one form bean UIForm with attributes
 
I am invoking create.jsp and saving data  UIForm and then forwarding it uiview.jsp
>From uiview.jsp I am trying to populate data to uiedit.jsp.Please observe I've submit 
>button by name Edit with which I am trying to call uiedit.jsp.
I am getting following error.
 
 
org.apache.jasper.JasperException: No collection found
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 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:256)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
 at java.lang.Thread.run(Thread.java:484)
 
Could any one please let me know what is error I am comitting?
 
Thanks in advance
Kurakula


-
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-11 Thread Susan Bradeen
"Lukas Latz" <[EMAIL PROTECTED]> wrote on 03/11/2004 11:12:26 AM:

> > Lukas, 
> > 
> > I am not familiar with your previous posts, but will this archive post 

> > help?
> > 
> > http://marc.theaimsgroup.com/?l=struts-user&m=106326387004081&w=2
> > 
> > Susan Bradeen
> 
> Susan, 
> 
> this post somewhat contradicts the info on the Struts website, where 
they
> state:
> 
> "Apache's Tomcat (version 3.1 or later required, version 3.3 or later
> recommended). "
>
> I'm not fundamentally opposed to upgrading to Tomcat 3.3, but I feel 
that if
> Tomcat < 3.3 does not work with Struts 1.1 at all, it should be 
mentioned on
> the Struts website.

I see your confusion. I don't use TC, but remembered a while back there 
was a lot of conversation about certain versions people had trouble with. 
Perhaps it does work, but maybe you have to jump through hoops to get it 
to do so. The archives might have more background on the specific issues 
with TC 3.2.x. If you wanted, you could submit a bugzilla request for site 
documentation clarification.

Good luck,
Susan 

> I also saw the jaxp 1.1 vs 1.0 issue on the struts website, but as the 
Java
> that Tomcat uses here is > 1.4 , thus the included jaxp 1.1 is 
presumably
> used.
> 
> Thanks,
> 
> Lukas
> 
> 
> -- 
> +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz 
+++
> 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
> 
> 
> -
> 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]



Re: WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-11 Thread Lukas Latz
> Lukas, 
> 
> I am not familiar with your previous posts, but will this archive post 
> help?
> 
> http://marc.theaimsgroup.com/?l=struts-user&m=106326387004081&w=2
> 
> Susan Bradeen

Susan, 

this post somewhat contradicts the info on the Struts website, where they
state:

"Apache's Tomcat (version 3.1 or later required, version 3.3 or later
recommended). "

I'm not fundamentally opposed to upgrading to Tomcat 3.3, but I feel that if
Tomcat < 3.3 does not work with Struts 1.1 at all, it should be mentioned on
the Struts website.
I also saw the jaxp 1.1 vs 1.0 issue on the struts website, but as the Java
that Tomcat uses here is > 1.4 , thus the included jaxp 1.1 is presumably
used.

Thanks,

Lukas


-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz


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



Re: WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-11 Thread Susan Bradeen
Lukas, 

I am not familiar with your previous posts, but will this archive post 
help?

http://marc.theaimsgroup.com/?l=struts-user&m=106326387004081&w=2

Susan Bradeen


"Lukas Latz" <[EMAIL PROTECTED]> wrote on 03/11/2004 10:22:44 AM:



> Is there a problem with using Tomcat 3.23 and Struts 1.1 ?
> Otherwise, the only possible explanation could be missing items in the
> web.xml or struts-config.xml
> This is what the app currently look like:
> 


>
> There must be a really simple reason for the failure, as there's really 
no
> application code my test app.
> any pointers much appreciated.
> 
> Lukas
> 
> -- 
> +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz 
+++
> 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
> 
> 
> -
> 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]



Re: WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-11 Thread Lukas Latz
I just found the struts-blank.war in the Struts 1.1 binary distribution and
deployed it to my Tomcat 2.32 .
I fails in the same way!


-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz


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



WAS: problems with - Help Please - ActionServlet fails on startup

2004-03-11 Thread Lukas Latz
To find out what's going on, I created an even simpler project:
All the struts 1.1 jars, tlds and dtds
A simple index.jsp with NO struts related tags or taglib directives.
An ActionServlet set to load on startup.

The same failure as reported under "problems with " happens,
that shows the failure is not related to the jsp file that contained the
 tag in my other project, but to the initial loading of the
ActionServlet.

I realized I hadn't run a struts 1.1 in this tomcat instance before, only
the struts 1.0 "logon" application from the manning/husted struts book.

Is there a problem with using Tomcat 3.23 and Struts 1.1 ?
Otherwise, the only possible explanation could be missing items in the
web.xml or struts-config.xml
This is what the app currently look like:

/index.jsp
/META-INF/
/META-INF/MANIFEST.MF
/WEB-INF/
/WEB-INF/struts-bean.tld
/WEB-INF/struts-html.tld
/WEB-INF/struts-logic.tld
/WEB-INF/struts-nested.tld
/WEB-INF/struts-template.tld
/WEB-INF/struts-tiles.tld
/WEB-INF/struts-config_1_0.dtd
/WEB-INF/struts-config_1_1.dtd
/WEB-INF/tiles-config.dtd
/WEB-INF/tiles-config_1_1.dtd
/WEB-INF/validation_1_1.dtd
/WEB-INF/validator-rules_1_1.dtd
/WEB-INF/web-app_2_2.dtd
/WEB-INF/web-app_2_3.dtd
/WEB-INF/web.xml
/WEB-INF/struts-config.xml
/WEB-INF/classes/
/WEB-INF/lib/
/WEB-INF/lib/commons-beanutils.jar
/WEB-INF/lib/commons-collections.jar
/WEB-INF/lib/commons-digester.jar
/WEB-INF/lib/commons-fileupload.jar
/WEB-INF/lib/commons-lang.jar
/WEB-INF/lib/commons-logging.jar
/WEB-INF/lib/commons-validator.jar
/WEB-INF/lib/jakarta-oro.jar
/WEB-INF/lib/struts-legacy.jar
/WEB-INF/lib/struts.jar


** web.xml **


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  
  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml

1
  


 action
 /do/*


  
  
index.jsp
  


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



** struts-config.xml *


http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>












There must be a really simple reason for the failure, as there's really no
application code my test app.
any pointers much appreciated.

Lukas

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz


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



RE: help me with using bean

2004-03-11 Thread shirishchandra.sakhare
Can you send the mail without the entrust cretificate?
I can not read the mail and hence help you :-((

> -Original Message-
> From: stu [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 3:04 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: help me with using bean
> 
>  << File: SMIME.txt >> 

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



Re: help me with using bean

2004-03-11 Thread stu
On Thu, 11 Mar 2004 01:30:38 +
"Mu Mike" <[EMAIL PROTECTED]> wrote:

> I have files like the below,I m  trying to submit a bean object to my 
> action class, yet when I pressed the "submit" on the jsp file,it threw
> an exception:java.lang.IllegalArgumentException: No bean specified
> 
> what is the correct way?
> Thanks&Regards
> 
> 
> myjsp.jsp
> 
> html:form action="/selectFont.do" >
> 
> 
>   
> 
> 
>   
> 
> 
> 
> 
> 

Don't you need the 'name' attribute in your html:text tags ie


   ^

-- 
Stuart Logie
Programmer

UNIVERSAL COMPUTER SERVICES (PTY) LTD
A member of South Africa's largest retail software vendor, the UCS Group

Tel : (011) 712 1371   Cell : 082 902 5632
Fax : (011) 339 3421
Internet : http://ucs.co.za

"I am the Unconquerable Spirit."
   -- Poet Unknown
   
Powered by Debian GNU/Linux - testing/unstable


pgp0.pgp
Description: PGP signature


RE: can anyone help me address this issue

2004-03-11 Thread McCormack, Chris
use onResize on the html element that is clicked to report its new value to a form 
variable. use an onChange for the form to auto submit itself. If you need to hide the 
submission of the form use an IFrame.

messy eugh, javascript is the pits.

Chris

-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 12:16
To: [EMAIL PROTECTED]
Subject: RE: can anyone help me address this issue


I really need to get some idea about this issue, any suggestions?

Thanks&Regards


>From: "Mu Mike" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: can anyone help me address this issue
>Date: Thu, 11 Mar 2004 05:12:16 +
>
>I m using javascript "doing" dhtml, now  I have a table, every time 
>a user changes the width of a specific column(by draging the border 
>line), I will save the column index and the new width to variables 
>in javascript.Now ,after doing many such changes, I need to submit 
>those values saved in the vairables to the server side program by 
>submiting a form, which has an action path designing what action 
>should be called after it get the submitted value. Now, I m 
>wondering how I should define such javasript variables and how I can 
>submit these values by submiting a form? I m using struts, is there 
>any possibility to implement this idea in struts?
>
>Thanks&Regards
>
>_
>享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  


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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



Re: can anyone help me address this issue

2004-03-11 Thread Niall Pemberton
Its not a struts issue - its a dhtml/javascript issue - maybe you should ask
the question on a dhtml/javascript list.

Niall

- Original Message - 
From: "Mu Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 11, 2004 12:16 PM
Subject: RE: can anyone help me address this issue


> I really need to get some idea about this issue, any suggestions?
>
> Thanks&Regards
>
>
> >From: "Mu Mike" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: can anyone help me address this issue
> >Date: Thu, 11 Mar 2004 05:12:16 +
> >
> >I m using javascript "doing" dhtml, now  I have a table, every time
> >a user changes the width of a specific column(by draging the border
> >line), I will save the column index and the new width to variables
> >in javascript.Now ,after doing many such changes, I need to submit
> >those values saved in the vairables to the server side program by
> >submiting a form, which has an action path designing what action
> >should be called after it get the submitted value. Now, I m
> >wondering how I should define such javasript variables and how I can
> >submit these values by submiting a form? I m using struts, is there
> >any possibility to implement this idea in struts?
> >
> >Thanks&Regards
> >
> >_
> >享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn
>
>
> -
> 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]



RE: can anyone help me address this issue

2004-03-11 Thread Mu Mike
I really need to get some idea about this issue, any suggestions?

Thanks&Regards


From: "Mu Mike" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: can anyone help me address this issue
Date: Thu, 11 Mar 2004 05:12:16 +
I m using javascript "doing" dhtml, now  I have a table, every time 
a user changes the width of a specific column(by draging the border 
line), I will save the column index and the new width to variables 
in javascript.Now ,after doing many such changes, I need to submit 
those values saved in the vairables to the server side program by 
submiting a form, which has an action path designing what action 
should be called after it get the submitted value. Now, I m 
wondering how I should define such javasript variables and how I can 
submit these values by submiting a form? I m using struts, is there 
any possibility to implement this idea in struts?

Thanks&Regards

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

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


AW: AW: help about struts

2004-03-11 Thread Andreas Solarik
Erol, I've never actually used resin - so I can't help you with that one.

.war files (in the perfect world) contain all code needed to deploy a web
application on an application server like tomcat. You can do this on tomcat
by copying the .war file into tomcats webapps directory and restarting
tomcat. After this, you should see a directory with the same name as the
.war file - containing all sources. Furthermore, the .war takes care of
modifying the configuration files for you :)

the download for struts is at http://jakarta.apache.org/site/binindex.cgi,
you need to find it in the list.

The example application is included in the struts distribution .zip file (if
you're a windows user) at /webapps/struts-example.war

The struts distribution also contains lots of documentation and some howto
information.

good luck, Andreas

-Ursprungliche Nachricht-
Von: EROL TEZCAN [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. Marz 2004 11:49
An: Struts Users Mailing List
Betreff: Re: AW: help about struts


Hi Andreas,

I looked this site and others but didnt analyze them detailed.

Can I work on Resin?

First you installed tomcat.
Secondly you put  .war file in the webapps directory of tomcat. (which war
file?)

If you have a free time, please tell me setup step by step

Thanks.

Erol


Andreas Solarik <[EMAIL PROTECTED]> wrote:Hi Erol,

I suppose you have already visited
http://jakarta.apache.org/struts/learning.html, so I'll tell you how I
started. First I installed tomcat, then I deployed the example application
(by putting the .war file in the webapps directory of tomcat). After
clicking around a little I started to look at how the struts-config.xml
glues together all the files related to a struts powered front-end. Finally,
I actually looked at and started modifying source code in my favourite java
IDE.

Ragards, Andreas

-Ursprungliche Nachricht-
Von: EROL TEZCAN [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. Marz 2004 11:11
An: [EMAIL PROTECTED]
Betreff: help about struts


Hi ,

I want to work with struts.

But i dont know where will I start first?

What I need for working with struts?

Where should I start first?

Can I work struts on Resin , or only Tomcat?

Which files needed to work struts.?

Please help me ?

Erol Tezcan




-
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.


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



-
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.


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



Re: AW: help about struts

2004-03-11 Thread EROL TEZCAN
Hi Andreas,
 
I looked this site and others but didnt analyze them detailed.
 
Can I work on Resin?
 
First you installed tomcat.
Secondly you put  .war file in the webapps directory of tomcat. (which war file?)
 
If you have a free time, please tell me setup step by step
 
Thanks.
 
Erol


Andreas Solarik <[EMAIL PROTECTED]> wrote:Hi Erol,

I suppose you have already visited
http://jakarta.apache.org/struts/learning.html, so I'll tell you how I
started. First I installed tomcat, then I deployed the example application
(by putting the .war file in the webapps directory of tomcat). After
clicking around a little I started to look at how the struts-config.xml
glues together all the files related to a struts powered front-end. Finally,
I actually looked at and started modifying source code in my favourite java
IDE.

Ragards, Andreas

-Ursprungliche Nachricht-
Von: EROL TEZCAN [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. Marz 2004 11:11
An: [EMAIL PROTECTED]
Betreff: help about struts


Hi ,

I want to work with struts.

But i dont know where will I start first?

What I need for working with struts?

Where should I start first?

Can I work struts on Resin , or only Tomcat?

Which files needed to work struts.?

Please help me ?

Erol Tezcan




-
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.


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



-
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: Newbie needs help: Validator not working with Struts/Velocity

2004-03-11 Thread Niall Pemberton
You say "No errors are appearing in either the catalina.out or localhost log
file" - I don't think validator logs anything to those places and saying
that makes me think "what are you expecting to happen when validation
fails".

The normal course of events when validation fails is struts saves an
ActionErrors object in the request under a certain key
(org.apache.struts.action.ERROR) and forwards to the "input" parameter
defined for your action.

If you were using jsps you would then probably use the  tag
which processes the stored ActionErrors and displays the error messages to
the user - I don't know velocity but presumably you could do something
similar.

Looking at your struts-config.xml, its your /Processing action which you are
expecting to validate - its input attribute is "/Payment.do" - this action
forwards to your velocity stuff "/payment.vm" - is there anything in
"/payment.vm" which displays the ActionErrors? To be honest your action
looks to be configured the wrong way round, I would have expected:



How about setting up a "validation errors page" in velocity and changing
your input parameter - that way if you get an validation error you should
see a different page. Something like...



Niall

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 10, 2004 5:54 PM
Subject: Newbie needs help: Validator not working with Struts/Velocity


I'm fairly new to Struts, and have been trying to get my simple
application to work - using Struts 1.1, Velocity 1.3.1, Velocity
Tools 1.1-rc1, and Tomcat 4.1.29. The application (such as it is)
works as far as presentation and workflow - but _isn't_ working is
the Validator framework. I've spent the last day mining the web for
help and haven't been able to progress at all...

The validator files _are_ being loaded - I see them in the log
files. And the rules/formset are being parsed - again, I see it in
the log. However, when the form is submitted on the first page
(payment.vm) and it goes to the second...no validation takes place.
No errors are appearing in either the catalina.out or localhost
log file. I have kicked up the log level to trace and still see
nothing wrong - other than the validation doesn't seem to happen.

Any help or suggestions would be GREATLY appreciated - I'm rather
stuck at the moment. I'm sure its just some silly configuration
or other error...

I'm including all the relevant files inline below.

Thank you very much

  Andy Akins

== web.xml


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

  CCPAY
  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2


  validate
  true

2
  
  
velocity

org.apache.velocity.tools.view.servlet.VelocityViewServlet

  org.apache.velocity.toolbox
  /WEB-INF/toolbox.xml


  org.apache.velocity.properties
  /WEB-INF/velocity.properties
   
   10
  
  
action
*.do
  
  
velocity
*.vm
  
  
index.html
  


= struts-config.xml

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

  

  

  
  


  
  
  

  


= validation.xml - I'm using the standard validate-rules.xml

http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>

  

  


  

  


= Toolbox.xml



  
 link
 org.apache.velocity.tools.struts.StrutsLinkTool
  
  
 slink
 org.apache.velocity.tools.struts.SecureLinkTool
  
  
 text
 org.apache.velocity.tools.struts.MessageTool
  
  
 errors
 org.apache.velocity.tools.struts.ErrorsTool
  
  
 messages
 org.apache.velocity.tools.struts.ActionMessagesTool
  
  
 form
 org.apache.velocity.tools.struts.FormTool
  
  
 tiles
 org.apache.velocity.tools.struts.TilesTool
  
  
 validator
 org.apache.velocity.tools.struts.ValidatorTool
  


= payment.vm

  
CCPAY



  
  
  #errorMarkup()

  

  Fee to be billed to your card
   $

  

  
  

  


= processing.vm


  
Processing Page.



  
  
 


  Processing ...
Thank you for your patience
$!paymentForm.amount
https://www.tennesseeanytime.org/tnanytime/apps/processing.gif";
alt="Showing Progress.">

  


= VM_global_library.vm
## Display all queued Struts errors
#macro (errorMarkup)
#if ($errors.exist() )

#foreach ($e in $errors.all )
$e
#end

#end
#end






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

AW: help about struts

2004-03-11 Thread Andreas Solarik
Hi Erol,

I suppose you have already visited
http://jakarta.apache.org/struts/learning.html, so I'll tell you how I
started. First I installed tomcat, then I deployed the example application
(by putting the .war file in the webapps directory of tomcat). After
clicking around a little I started to look at how the struts-config.xml
glues together all the files related to a struts powered front-end. Finally,
I actually looked at and started modifying source code in my favourite java
IDE.

Ragards, Andreas

-Ursprungliche Nachricht-
Von: EROL TEZCAN [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. Marz 2004 11:11
An: [EMAIL PROTECTED]
Betreff: help about struts


Hi ,

I want to work with struts.

But i dont know where will I start first?

What I need for working with struts?

Where should I start first?

Can I work struts on Resin , or only Tomcat?

Which files needed to work struts.?

Please help me ?

Erol Tezcan




-
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.


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



RE: help about struts

2004-03-11 Thread Leticia Golubov
This is where I started:

Read Struts In Action (Published by Manning) book.
http://www.manning.com/husted/index.html

Resources:
http://jakarta.apache.org/struts/
http://jakarta.apache.org/index.html


-Original Message-
From: EROL TEZCAN [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 10:11
To: [EMAIL PROTECTED]
Subject: help about struts


Hi ,

I want to work with struts.

But i dont know where will I start first?

What I need for working with struts?

Where should I start first?

Can I work struts on Resin , or only Tomcat?

Which files needed to work struts.?

Please help me ?

Erol Tezcan




-
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.


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



help about struts

2004-03-11 Thread EROL TEZCAN
Hi ,
 
I want to work with struts.
 
But i dont know where will I start first?
 
What I need for working with struts?

Where should I start first?

Can I work struts on Resin , or only Tomcat?

Which files needed to work struts.?

Please help me ?

Erol Tezcan




-
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: Newbie needs help: Validator not working with Struts/Velocity

2004-03-10 Thread Markus
> I'm fairly new to Struts, and have been trying to get my simple 
> application to work - using Struts 1.1, Velocity 1.3.1, Velocity 
> Tools 1.1-rc1, and Tomcat 4.1.29. The application (such as it is)
> works as far as presentation and workflow - but _isn't_ working is
> the Validator framework. I've spent the last day mining the web for
> help and haven't been able to progress at all...
> 
> The validator files _are_ being loaded - I see them in the log
> files. And the rules/formset are being parsed - again, I see it in
> the log. However, when the form is submitted on the first page
> (payment.vm) and it goes to the second...no validation takes place.
> No errors are appearing in either the catalina.out or localhost
> log file. I have kicked up the log level to trace and still see
> nothing wrong - other than the validation doesn't seem to happen.
> 
> Any help or suggestions would be GREATLY appreciated - I'm rather
> stuck at the moment. I'm sure its just some silly configuration
> or other error...
> 
> I'm including all the relevant files inline below. 
> 
> Thank you very much
> 
>   Andy Akins
>   
> == web.xml
> 
> 
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
>   CCPAY  
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   debug
>   2
> 
> 
>   detail
>   2
> 
> 
>   validate
>   true
> 
> 2
>   
>   
> velocity
>   

>
org.apache.velocity.tools.view.servlet.VelocityViewServlet
> 
>   org.apache.velocity.toolbox
>   /WEB-INF/toolbox.xml
> 
> 
>   org.apache.velocity.properties
>   /WEB-INF/velocity.properties
>
>10
>   
>   
> action
> *.do
>   
>   
> velocity
> *.vm
>   
>   
> index.html
>   
> 
> 
> = struts-config.xml
> 
>"-//Apache Software Foundation//DTD Struts Configuration
> 1.1//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
>   
>  type="org.apache.struts.validator.DynaValidatorForm">
>/>
> 
>   
>   
>type="org.apache.struts.actions.ForwardAction"
>   name="paymentForm"
>   validate="false"
>   parameter="/payment.vm"/>
>type="org.apache.struts.actions.ForwardAction"
Hi,
Are you sure that the action is right?
I can't belive!
Kind regarrds,
Markus



>   name="paymentForm"
>   input="/Payment.do"
>   validate="true"
>   parameter="/processing.vm"/>
>   
>   
>   
>value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
>   
> 
> 
> = validation.xml - I'm using the standard validate-rules.xml
> 
>"-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.0//EN"
>   "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>
> 
>   
> 
>depends="required,email">
> 
> 
>   
> 
>   
> 
> 
> = Toolbox.xml
> 
> 
> 
>   
>  link
>  org.apache.velocity.tools.struts.StrutsLinkTool
>   
>   
>  slink
>  org.apache.velocity.tools.struts.SecureLinkTool
>   
>   
>  text
>  org.apache.velocity.tools.struts.MessageTool
>   
>   
>  errors
>  org.apache.velocity.tools.struts.ErrorsTool
>   
>   
>  messages
>  org.apache.velocity.tools.struts.ActionMessagesTool
>   
>   
>  form
>  org.apache.velocity.tools.struts.FormTool
>   
>   
>  tiles
>  org.apache.velocity.tools.struts.TilesTool
>   
>   
>  validator
>  org.apache.velocity.tools.struts.ValidatorTool
>   
> 
> 
> = payment.vm
> 
>   
> CCPAY
> 
> 
>  href="/ccpay/pages/css/tccles.css">
>   
>   
>   #errorMarkup()
> 
>summary="Credit Card Information" width="100%">
>  
>   Fee to be billed to your card
>$
>  value="$!paymentForm.amount" >
>   
> 
>   
>   
> 
>   
> 
> 
> = processing.vm
> 
> 
>   
> Processing 

RE: help me with using bean

2004-03-10 Thread Mu Mike
ok, I have solved the problem,seems I should use  instead but 
not 
by the way,thank you all ,especially David

Thanks&Regards



From: "Mu Mike" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean
Date: Thu, 11 Mar 2004 04:33:16 +
well, I said I was new because I began struts only a week ago and i 
have succefully submitted those 'primary' type values to an action. 
About the forward, I m using tiles tag in struts, StartPage.jsp is 
the first page I go to.

the tiles definition is the below

tiledef.xml


 
   



MainLayout.jsp

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>


<%%>
<%%>


StartPage.jsp:
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>









From: "David Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: help me with using bean
Date: Wed, 10 Mar 2004 22:29:01 -0500

Mike,

You wrote are new to Struts so have you tried this without nesting 
a Bean
within a form?  I.E. by making an ActionForm which has "size" and
"fontName"
properties then copying them if you need to use them somewhere 
else?  Then
you could access the properties not as "bean.size" and 
"bean.fontName" but
simply as the properties "size" and "fontName"?  One thing is 
bothering me
though, you didn't show any forwards defined so how does your class
com.viador.rv.action.ApplyFormatAction do a return to get you to
"/mjsp.jsp"?  Are you doing some sort of redirect?

I haven't used DynaActionForms in a while but I think that your use 
of
"Form-Property" without extending from the class "DynaActionForm" 
is
giving
you the trouble.

Regards,
David
-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 9:36 PM
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean
David:

I did as you told and debugged the running process, the program 
certainlly
can run into the SelectFontForm class, but after stepping out of 
that
class
,it seems the program ended, the ApplyFormatAction code seems never 
been
called, what could be the cause of this?

Thanks&Regards

>From: "David Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: help me with using bean
>Date: Wed, 10 Mar 2004 21:24:54 -0500
>
>Mike,
>
>Why not change your:
>
> >public class SelectFontForm extends ActionForm{
> > public FontBean getBean() {
> > return bean;
> > }
>
>to:
>
> >public class SelectFontForm extends ActionForm{
> > public FontBean getBean() {
> >	// create a bean to give them IF the 'bean' is ever NULL!
> >	if ( bean == null )
> >bean = new FontBean();
> > return bean;
> > }
>
>Regards,
>David
>
>-Original Message-
>From: Mu Mike [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 10, 2004 9:16 PM
>To: [EMAIL PROTECTED]
>Subject: RE: help me with using bean
>
>
>David,
>Thank you, I m a newbie to struts, in  fact ,I dont know exactly 
what
kind
>of form should be there when I want to submit a bean, can you 
give me a
>more detailed description about how to submit a bean object? I 
think an
>example can better help me, since I really need to know something 
about
>this as soon as possible
>
>Thanks&Regards
>
>
> >From: "David Friedman" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
> >Subject: RE: help me with using bean
> >Date: Wed, 10 Mar 2004 20:50:18 -0500
> >
> >Mike,
> >
> >When you use form-property with a form-bean, don't you need to 
make
the
>main
> >Bean a DynaActionForm or a class you extended from 
DynaActionForm?
Where
>do
> >you initialize the form-property "bean".  For DynaActionForms, 
they
> >initialize to null, per "If you do not supply an initial 
attribute,
>numbers
> >will be initialized to 0 and objects to null" from the 
document:
>

http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_ac


>t
>
> >ion_form_classes
> >
> >Regards,
> >David
> >
> >-Original Message-
> >From: Mu M

can anyone help me address this issue

2004-03-10 Thread Mu Mike
I m using javascript "doing" dhtml, now  I have a table, every time a user 
changes the width of a specific column(by draging the border line), I will 
save the column index and the new width to variables in javascript.Now 
,after doing many such changes, I need to submit those values saved in the 
vairables to the server side program by submiting a form, which has an 
action path designing what action should be called after it get the 
submitted value. Now, I m wondering how I should define such javasript 
variables and how I can submit these values by submiting a form? I m using 
struts, is there any possibility to implement this idea in struts?

Thanks&Regards

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


RE: help me with using bean

2004-03-10 Thread Mu Mike
well, I said I was new because I began struts only a week ago and i have 
succefully submitted those 'primary' type values to an action. About the 
forward, I m using tiles tag in struts, StartPage.jsp is the first page I 
go to.

the tiles definition is the below

tiledef.xml


 
   



MainLayout.jsp

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>


<%%>
<%%>


StartPage.jsp:
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>









From: "David Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: help me with using bean
Date: Wed, 10 Mar 2004 22:29:01 -0500
Mike,

You wrote are new to Struts so have you tried this without nesting a Bean
within a form?  I.E. by making an ActionForm which has "size" and 
"fontName"
properties then copying them if you need to use them somewhere else?  Then
you could access the properties not as "bean.size" and "bean.fontName" but
simply as the properties "size" and "fontName"?  One thing is bothering me
though, you didn't show any forwards defined so how does your class
com.viador.rv.action.ApplyFormatAction do a return to get you to
"/mjsp.jsp"?  Are you doing some sort of redirect?
I haven't used DynaActionForms in a while but I think that your use of
"Form-Property" without extending from the class "DynaActionForm" is 
giving
you the trouble.

Regards,
David
-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 9:36 PM
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean
David:

I did as you told and debugged the running process, the program certainlly
can run into the SelectFontForm class, but after stepping out of that 
class
,it seems the program ended, the ApplyFormatAction code seems never been
called, what could be the cause of this?
Thanks&Regards

>From: "David Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: help me with using bean
>Date: Wed, 10 Mar 2004 21:24:54 -0500
>
>Mike,
>
>Why not change your:
>
> >public class SelectFontForm extends ActionForm{
> > public FontBean getBean() {
> > return bean;
> > }
>
>to:
>
> >public class SelectFontForm extends ActionForm{
> > public FontBean getBean() {
> >	// create a bean to give them IF the 'bean' is ever NULL!
> >	if ( bean == null )
> >bean = new FontBean();
> > return bean;
> > }
>
>Regards,
>David
>
>-Original Message-
>From: Mu Mike [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 10, 2004 9:16 PM
>To: [EMAIL PROTECTED]
>Subject: RE: help me with using bean
>
>
>David,
>Thank you, I m a newbie to struts, in  fact ,I dont know exactly what 
kind
>of form should be there when I want to submit a bean, can you give me a
>more detailed description about how to submit a bean object? I think an
>example can better help me, since I really need to know something about
>this as soon as possible
>
>Thanks&Regards
>
>
> >From: "David Friedman" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: help me with using bean
> >Date: Wed, 10 Mar 2004 20:50:18 -0500
> >
> >Mike,
> >
> >When you use form-property with a form-bean, don't you need to make 
the
>main
> >Bean a DynaActionForm or a class you extended from DynaActionForm?
Where
>do
> >you initialize the form-property "bean".  For DynaActionForms, they
> >initialize to null, per "If you do not supply an initial attribute,
>numbers
> >will be initialized to 0 and objects to null" from the document:
>
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_ac

>t
>
> >ion_form_classes
> >
> >Regards,
> >David
> >
> >-Original Message-
> >From: Mu Mike [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, March 10, 2004 8:31 PM
> >To: [EMAIL PROTECTED]
> >Subject: help me with using bean
> >
> >
> >I have files like the below,I m  trying to submit a bean object to my
> >action class, yet when I pressed the "submit" on the jsp file,it threw
an
> >exception:java.lang.IllegalArgume

RE: help me with using bean

2004-03-10 Thread David Friedman
Mike,

You wrote are new to Struts so have you tried this without nesting a Bean
within a form?  I.E. by making an ActionForm which has "size" and "fontName"
properties then copying them if you need to use them somewhere else?  Then
you could access the properties not as "bean.size" and "bean.fontName" but
simply as the properties "size" and "fontName"?  One thing is bothering me
though, you didn't show any forwards defined so how does your class
com.viador.rv.action.ApplyFormatAction do a return to get you to
"/mjsp.jsp"?  Are you doing some sort of redirect?

I haven't used DynaActionForms in a while but I think that your use of
"Form-Property" without extending from the class "DynaActionForm" is giving
you the trouble.

Regards,
David

-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 9:36 PM
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean


David:

I did as you told and debugged the running process, the program certainlly
can run into the SelectFontForm class, but after stepping out of that class
,it seems the program ended, the ApplyFormatAction code seems never been
called, what could be the cause of this?

Thanks&Regards

>From: "David Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: help me with using bean
>Date: Wed, 10 Mar 2004 21:24:54 -0500
>
>Mike,
>
>Why not change your:
>
> >public class SelectFontForm extends ActionForm{
> > public FontBean getBean() {
> > return bean;
> > }
>
>to:
>
> >public class SelectFontForm extends ActionForm{
> > public FontBean getBean() {
> > // create a bean to give them IF the 'bean' is ever NULL!
> > if ( bean == null )
> >bean = new FontBean();
> > return bean;
> > }
>
>Regards,
>David
>
>-Original Message-
>From: Mu Mike [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 10, 2004 9:16 PM
>To: [EMAIL PROTECTED]
>Subject: RE: help me with using bean
>
>
>David,
>Thank you, I m a newbie to struts, in  fact ,I dont know exactly what kind
>of form should be there when I want to submit a bean, can you give me a
>more detailed description about how to submit a bean object? I think an
>example can better help me, since I really need to know something about
>this as soon as possible
>
>Thanks&Regards
>
>
> >From: "David Friedman" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: help me with using bean
> >Date: Wed, 10 Mar 2004 20:50:18 -0500
> >
> >Mike,
> >
> >When you use form-property with a form-bean, don't you need to make the
>main
> >Bean a DynaActionForm or a class you extended from DynaActionForm?
Where
>do
> >you initialize the form-property "bean".  For DynaActionForms, they
> >initialize to null, per "If you do not supply an initial attribute,
>numbers
> >will be initialized to 0 and objects to null" from the document:
>
>http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_ac

>t
>
> >ion_form_classes
> >
> >Regards,
> >David
> >
> >-Original Message-
> >From: Mu Mike [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, March 10, 2004 8:31 PM
> >To: [EMAIL PROTECTED]
> >Subject: help me with using bean
> >
> >
> >I have files like the below,I m  trying to submit a bean object to my
> >action class, yet when I pressed the "submit" on the jsp file,it threw
an
> >exception:java.lang.IllegalArgumentException: No bean specified
> >
> >what is the correct way?
> >Thanks&Regards
> >
> >
> >myjsp.jsp
> >
> >html:form action="/selectFont.do" >
> > 
> > 
> >   
> > 
> > 
> >   
> > 
> > 
> > 
> >
> >
> >=
> >part of struts-config.xml
> >
> > 
> >  > type="com.viador.rv.form.SelectFontForm">
> >  >type="com.viador.rv.bean.FontBean"/>
> > 
> >  
> >
> > 
> >  > type="com.viador.rv.action.ApplyFormatAction"
> >

RE: help me with using bean

2004-03-10 Thread Mu Mike
David:
by the way, the setBean method in FontBean seems never been called, I think 
it should be called sometime during the running  process 


From: "Mu Mike" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean
Date: Thu, 11 Mar 2004 02:36:07 +
David:

I did as you told and debugged the running process, the program 
certainlly can run into the SelectFontForm class, but after stepping 
out of that class ,it seems the program ended, the ApplyFormatAction 
code seems never been called, what could be the cause of this?

Thanks&Regards

From: "David Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: help me with using bean
Date: Wed, 10 Mar 2004 21:24:54 -0500

Mike,

Why not change your:

>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
> return bean;
> }
to:

>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
>// create a bean to give them IF the 'bean' is ever NULL!
>if ( bean == null )
>bean = new FontBean();
> return bean;
> }
Regards,
David
-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 9:16 PM
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean
David,
Thank you, I m a newbie to struts, in  fact ,I dont know exactly 
what kind
of form should be there when I want to submit a bean, can you give 
me a
more detailed description about how to submit a bean object? I 
think an
example can better help me, since I really need to know something 
about
this as soon as possible

Thanks&Regards

>From: "David Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: help me with using bean
>Date: Wed, 10 Mar 2004 20:50:18 -0500
>
>Mike,
>
>When you use form-property with a form-bean, don't you need to 
make the
main
>Bean a DynaActionForm or a class you extended from 
DynaActionForm?
Where
do
>you initialize the form-property "bean".  For DynaActionForms, 
they
>initialize to null, per "If you do not supply an initial 
attribute,
numbers
>will be initialized to 0 and objects to null" from the document:

http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_ac


t

>ion_form_classes
>
>Regards,
>David
>
>-Original Message-
>From: Mu Mike [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 10, 2004 8:31 PM
>To: [EMAIL PROTECTED]
>Subject: help me with using bean
>
>
>I have files like the below,I m  trying to submit a bean object 
to my
>action class, yet when I pressed the "submit" on the jsp file,it 
threw
an
>exception:java.lang.IllegalArgumentException: No bean specified
>
>what is the correct way?
>Thanks&Regards
>
>
>myjsp.jsp
>
>html:form action="/selectFont.do" >
> 
> 
>   
> 
> 
>   
> 
> 
> 
>
>
>=
>part of struts-config.xml
>
> 
> 
> type="com.viador.rv.form.SelectFontForm">
> 
>type="com.viador.rv.bean.FontBean"/>
> 
>  
>
> 
> 
> type="com.viador.rv.action.ApplyFormatAction"
> name="SelectFontForm"
> scope="session">
> 
>
>
>===
>SelectFontForm.java
>
>import org.apache.struts.action.ActionForm;
>import com.viador.rv.bean.FontBean;
>
>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
> return bean;
> }
>
> public void setBean(FontBean bean) {
> this.bean = bean;
> }
>
> private FontBean bean;
>}
>
>==
>FontBean.java
>
>public class FontBean  {
> public int getSize() {
> return size;
> }
>
> public void setSize(int size) {
> this.size = size;
> }
>
> public String getFontName() {
> return fontName;
> }
>
> public void setFontName(String fontName) {
> this.fontName = fontName;
> }
>
> private int size;
> private String fontName;
>
>}
>
>_
>享用世界上最大的电子邮件系统― MSN Hotmail。  
http://www.hotmail.com
>

RE: help me with using bean

2004-03-10 Thread Mu Mike
David:

I did as you told and debugged the running process, the program certainlly 
can run into the SelectFontForm class, but after stepping out of that class 
,it seems the program ended, the ApplyFormatAction code seems never been 
called, what could be the cause of this?

Thanks&Regards

From: "David Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: help me with using bean
Date: Wed, 10 Mar 2004 21:24:54 -0500
Mike,

Why not change your:

>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
> return bean;
> }
to:

>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
>// create a bean to give them IF the 'bean' is ever NULL!
>if ( bean == null )
>bean = new FontBean();
> return bean;
> }
Regards,
David
-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 9:16 PM
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean
David,
Thank you, I m a newbie to struts, in  fact ,I dont know exactly what kind
of form should be there when I want to submit a bean, can you give me a
more detailed description about how to submit a bean object? I think an
example can better help me, since I really need to know something about
this as soon as possible
Thanks&Regards

>From: "David Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: help me with using bean
>Date: Wed, 10 Mar 2004 20:50:18 -0500
>
>Mike,
>
>When you use form-property with a form-bean, don't you need to make the
main
>Bean a DynaActionForm or a class you extended from DynaActionForm?  
Where
do
>you initialize the form-property "bean".  For DynaActionForms, they
>initialize to null, per "If you do not supply an initial attribute,
numbers
>will be initialized to 0 and objects to null" from the document:
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_ac

t

>ion_form_classes
>
>Regards,
>David
>
>-Original Message-
>From: Mu Mike [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 10, 2004 8:31 PM
>To: [EMAIL PROTECTED]
>Subject: help me with using bean
>
>
>I have files like the below,I m  trying to submit a bean object to my
>action class, yet when I pressed the "submit" on the jsp file,it threw 
an
>exception:java.lang.IllegalArgumentException: No bean specified
>
>what is the correct way?
>Thanks&Regards
>
>
>myjsp.jsp
>
>html:form action="/selectFont.do" >
> 
> 
>   
> 
> 
>   
> 
> 
> 
>
>
>=
>part of struts-config.xml
>
> 
>  type="com.viador.rv.form.SelectFontForm">
> type="com.viador.rv.bean.FontBean"/>
> 
>  
>
> 
>  type="com.viador.rv.action.ApplyFormatAction"
> name="SelectFontForm"
> scope="session">
> 
>
>
>===
>SelectFontForm.java
>
>import org.apache.struts.action.ActionForm;
>import com.viador.rv.bean.FontBean;
>
>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
> return bean;
> }
>
> public void setBean(FontBean bean) {
> this.bean = bean;
> }
>
> private FontBean bean;
>}
>
>==
>FontBean.java
>
>public class FontBean  {
> public int getSize() {
> return size;
> }
>
> public void setSize(int size) {
> this.size = size;
> }
>
> public String getFontName() {
> return fontName;
> }
>
> public void setFontName(String fontName) {
> this.fontName = fontName;
> }
>
> private int size;
> private String fontName;
>
>}
>
>_
>享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
>
>-
>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]
>

RE: help me with using bean

2004-03-10 Thread David Friedman
Mike,

Why not change your:

>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
> return bean;
> }

to:

>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
>   // create a bean to give them IF the 'bean' is ever NULL!
>   if ( bean == null )
>bean = new FontBean();
> return bean;
> }

Regards,
David

-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 9:16 PM
To: [EMAIL PROTECTED]
Subject: RE: help me with using bean


David,
Thank you, I m a newbie to struts, in  fact ,I dont know exactly what kind
of form should be there when I want to submit a bean, can you give me a
more detailed description about how to submit a bean object? I think an
example can better help me, since I really need to know something about
this as soon as possible

Thanks&Regards


>From: "David Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: help me with using bean
>Date: Wed, 10 Mar 2004 20:50:18 -0500
>
>Mike,
>
>When you use form-property with a form-bean, don't you need to make the
main
>Bean a DynaActionForm or a class you extended from DynaActionForm?  Where
do
>you initialize the form-property "bean".  For DynaActionForms, they
>initialize to null, per "If you do not supply an initial attribute,
numbers
>will be initialized to 0 and objects to null" from the document:
>http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_ac
t

>ion_form_classes
>
>Regards,
>David
>
>-Original Message-
>From: Mu Mike [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 10, 2004 8:31 PM
>To: [EMAIL PROTECTED]
>Subject: help me with using bean
>
>
>I have files like the below,I m  trying to submit a bean object to my
>action class, yet when I pressed the "submit" on the jsp file,it threw an
>exception:java.lang.IllegalArgumentException: No bean specified
>
>what is the correct way?
>Thanks&Regards
>
>
>myjsp.jsp
>
>html:form action="/selectFont.do" >
> 
> 
>   
> 
> 
>   
> 
> 
> 
>
>
>=
>part of struts-config.xml
>
> 
>  type="com.viador.rv.form.SelectFontForm">
> type="com.viador.rv.bean.FontBean"/>
> 
>  
>
> 
>  type="com.viador.rv.action.ApplyFormatAction"
> name="SelectFontForm"
> scope="session">
> 
>
>
>===
>SelectFontForm.java
>
>import org.apache.struts.action.ActionForm;
>import com.viador.rv.bean.FontBean;
>
>public class SelectFontForm extends ActionForm{
> public FontBean getBean() {
> return bean;
> }
>
> public void setBean(FontBean bean) {
> this.bean = bean;
> }
>
> private FontBean bean;
>}
>
>==
>FontBean.java
>
>public class FontBean  {
> public int getSize() {
> return size;
> }
>
> public void setSize(int size) {
> this.size = size;
> }
>
> public String getFontName() {
> return fontName;
> }
>
> public void setFontName(String fontName) {
> this.fontName = fontName;
> }
>
> private int size;
> private String fontName;
>
>}
>
>_
>享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
>
>-
>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]
>

_
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/


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



RE: help me with using bean

2004-03-10 Thread Mu Mike
David,
Thank you, I m a newbie to struts, in  fact ,I dont know exactly what kind 
of form should be there when I want to submit a bean, can you give me a 
more detailed description about how to submit a bean object? I think an 
example can better help me, since I really need to know something about 
this as soon as possible

Thanks&Regards


From: "David Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: help me with using bean
Date: Wed, 10 Mar 2004 20:50:18 -0500
Mike,

When you use form-property with a form-bean, don't you need to make the 
main
Bean a DynaActionForm or a class you extended from DynaActionForm?  Where 
do
you initialize the form-property "bean".  For DynaActionForms, they
initialize to null, per "If you do not supply an initial attribute, 
numbers
will be initialized to 0 and objects to null" from the document:
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_act

ion_form_classes

Regards,
David
-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 8:31 PM
To: [EMAIL PROTECTED]
Subject: help me with using bean
I have files like the below,I m  trying to submit a bean object to my
action class, yet when I pressed the "submit" on the jsp file,it threw an
exception:java.lang.IllegalArgumentException: No bean specified
what is the correct way?
Thanks&Regards
myjsp.jsp

html:form action="/selectFont.do" >


  


  




=
part of struts-config.xml




 



   
===
SelectFontForm.java
import org.apache.struts.action.ActionForm;
import com.viador.rv.bean.FontBean;
public class SelectFontForm extends ActionForm{
public FontBean getBean() {
return bean;
}
public void setBean(FontBean bean) {
this.bean = bean;
}
private FontBean bean;
}
==
FontBean.java
public class FontBean  {
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public String getFontName() {
return fontName;
}
public void setFontName(String fontName) {
this.fontName = fontName;
}
private int size;
private String fontName;
}

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
-
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]
_
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/  

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


RE: help me with using bean

2004-03-10 Thread David Friedman
Mike,

When you use form-property with a form-bean, don't you need to make the main
Bean a DynaActionForm or a class you extended from DynaActionForm?  Where do
you initialize the form-property "bean".  For DynaActionForms, they
initialize to null, per "If you do not supply an initial attribute, numbers
will be initialized to 0 and objects to null" from the document:
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_act
ion_form_classes

Regards,
David

-Original Message-
From: Mu Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 8:31 PM
To: [EMAIL PROTECTED]
Subject: help me with using bean


I have files like the below,I m  trying to submit a bean object to my
action class, yet when I pressed the "submit" on the jsp file,it threw an
exception:java.lang.IllegalArgumentException: No bean specified

what is the correct way?
Thanks&Regards


myjsp.jsp

html:form action="/selectFont.do" >


  


  





=
part of struts-config.xml





 




   

===
SelectFontForm.java

import org.apache.struts.action.ActionForm;
import com.viador.rv.bean.FontBean;

public class SelectFontForm extends ActionForm{
public FontBean getBean() {
return bean;
}

public void setBean(FontBean bean) {
this.bean = bean;
}

private FontBean bean;
}

==
FontBean.java

public class FontBean  {
public int getSize() {
return size;
}

public void setSize(int size) {
this.size = size;
}

public String getFontName() {
return fontName;
}

public void setFontName(String fontName) {
this.fontName = fontName;
}

private int size;
private String fontName;

}

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com


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



help me with using bean

2004-03-10 Thread Mu Mike
I have files like the below,I m  trying to submit a bean object to my 
action class, yet when I pressed the "submit" on the jsp file,it threw an 
exception:java.lang.IllegalArgumentException: No bean specified

what is the correct way?
Thanks&Regards
myjsp.jsp

html:form action="/selectFont.do" >
   
   
 
   
   
 
   
   
   

=
part of struts-config.xml
   
   
   
   

   
   
   
  
===
SelectFontForm.java
import org.apache.struts.action.ActionForm;
import com.viador.rv.bean.FontBean;
public class SelectFontForm extends ActionForm{
   public FontBean getBean() {
   return bean;
   }
   public void setBean(FontBean bean) {
   this.bean = bean;
   }
   private FontBean bean;
}
==
FontBean.java
public class FontBean  {
   public int getSize() {
   return size;
   }
   public void setSize(int size) {
   this.size = size;
   }
   public String getFontName() {
   return fontName;
   }
   public void setFontName(String fontName) {
   this.fontName = fontName;
   }
   private int size;
   private String fontName;
}

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


Newbie needs help: Validator not working with Struts/Velocity

2004-03-10 Thread andy
I'm fairly new to Struts, and have been trying to get my simple 
application to work - using Struts 1.1, Velocity 1.3.1, Velocity 
Tools 1.1-rc1, and Tomcat 4.1.29. The application (such as it is)
works as far as presentation and workflow - but _isn't_ working is
the Validator framework. I've spent the last day mining the web for
help and haven't been able to progress at all...

The validator files _are_ being loaded - I see them in the log
files. And the rules/formset are being parsed - again, I see it in
the log. However, when the form is submitted on the first page
(payment.vm) and it goes to the second...no validation takes place.
No errors are appearing in either the catalina.out or localhost
log file. I have kicked up the log level to trace and still see
nothing wrong - other than the validation doesn't seem to happen.

Any help or suggestions would be GREATLY appreciated - I'm rather
stuck at the moment. I'm sure its just some silly configuration
or other error...

I'm including all the relevant files inline below. 

Thank you very much

  Andy Akins
  
== web.xml


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

  CCPAY  
  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2


  validate
  true

2
  
  
velocity

org.apache.velocity.tools.view.servlet.VelocityViewServlet

  org.apache.velocity.toolbox
  /WEB-INF/toolbox.xml


  org.apache.velocity.properties
  /WEB-INF/velocity.properties
   
   10
  
  
action
*.do
  
  
velocity
*.vm
  
  
index.html
  


= struts-config.xml

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

  

  

  
  


  
  
  

  


= validation.xml - I'm using the standard validate-rules.xml

http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>

  

  


  

  


= Toolbox.xml



  
 link
 org.apache.velocity.tools.struts.StrutsLinkTool
  
  
 slink
 org.apache.velocity.tools.struts.SecureLinkTool
  
  
 text
 org.apache.velocity.tools.struts.MessageTool
  
  
 errors
 org.apache.velocity.tools.struts.ErrorsTool
  
  
 messages
 org.apache.velocity.tools.struts.ActionMessagesTool
  
  
 form
 org.apache.velocity.tools.struts.FormTool
  
  
 tiles
 org.apache.velocity.tools.struts.TilesTool
  
  
 validator
 org.apache.velocity.tools.struts.ValidatorTool
  


= payment.vm

  
CCPAY



  
  
#errorMarkup()

  
 
  Fee to be billed to your card
   $

  

  
  

  


= processing.vm


  
Processing Page.



  
  
  


  Processing ...
Thank you for your patience
$!paymentForm.amount
https://www.tennesseeanytime.org/tnanytime/apps/processing.gif"; 
alt="Showing Progress.">

  


= VM_global_library.vm
## Display all queued Struts errors
#macro (errorMarkup)
#if ($errors.exist() )

#foreach ($e in $errors.all )
$e
#end

#end
#end






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



Re: Regarding Error in Validator - Urgent Help

2004-03-10 Thread Geeta Ramani
Hi Ramachandran:

Here's a suggestion: look at line number 63 of the servlet (in your work directory)
generated by your first.jsp.  See what the code there is and that may give you an idea
of what's going wrong.. (seems like a null pointer somewhere, so try to see what may be
null in that line of code ..)

Regards,
Geeta

Ramachandran wrote:

>
>
> Root cause:
> java.lang.ExceptionInInitializerError
> at
> _0002ffirst_0002ejspfirst_jsp_0._jspService(_0002ffirst_0002ejspfirst_jsp_0.
> java:63)

>
> Caused by: java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(MessageResources
> .java:577)
> at org.apache.struts.taglib.html.HtmlTag.(HtmlTag.java:96)
> ... 16 more




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



Regarding Error in Validator - Urgent Help

2004-03-10 Thread Ramachandran
Hi Friends,

I am using the validator to perform the validations. I am facing the error
while perform such operations. Can anyone please help me regarding this one.

I am having FirstForm conatins phone and email. For that i am
performing the validation using validator.

Please suugest me..



This is the error
Location: /ram1.1/first.jsp
Internal Servlet Error:

javax.servlet.ServletException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
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:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:536)

Root cause:
java.lang.ExceptionInInitializerError
at
_0002ffirst_0002ejspfirst_jsp_0._jspService(_0002ffirst_0002ejspfirst_jsp_0.
java:63)
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$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
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:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:577)
at org.apache.struts.taglib.html.HtmlTag.(HtmlTag.java:96)
... 16 more



This is my FormBean

package com.summit;

import java.io.Serializable;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.validator.ValidatorForm;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;


public final class FirstForm extends ValidatorForm implements Serializable
{
private String sPhone = null;
private String sEmail = null;
public String getPhone() {return sPhone;}
public void setPhone(String sPhone) {this.sPhone = sPhone;}
public String getEmail() {return sEmail;}
public void setEmail(String sEmail) {this.sEmail = sEmail;}

public ActionErrors validate(
ActionMapping mapping,
HttpServletRequest request) {
return super.validate(mapping, request);
}
}

This is my Struts-Config File

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>



 















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



  1   2   3   4   5   6   7   8   9   10   >