Re: [ANNOUNCE] Visual tool for Struts

2001-09-17 Thread Rama Krishna



i get a Server not found error when i click 
download after filling u r form.

:-)

  - Original Message - 
  From: 
  John Yu 

  To: [EMAIL PROTECTED] 
  
  Sent: Sunday, September 16, 2001 9:42 
  PM
  Subject: [ANNOUNCE] Visual tool for 
  Struts
  We'd like to invite everyone in the Struts community to try out 
  Scioworks Camino, a visual tool for Struts. The free download can be found 
  at http://www.scioworks.com/scioworks_camino.htmlregards,
  -- John 
  Yu 
  Scioworks Technologies e: [EMAIL PROTECTED] 
  w: +(65) 873 5989w: http://www.scioworks.com m: 
  +(65) 9782 9610 


Re: Queryyy

2001-09-17 Thread Rama Krishna

seems like u have problem with u r config.xml file. did u place it in the
web-inf folder???


- Original Message -
From: sai srinivas [EMAIL PROTECTED]
To: StrutsUser [EMAIL PROTECTED]
Sent: Sunday, September 16, 2001 8:46 PM
Subject: FW: Queryyy




  -Original Message-
 From: sai srinivas [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 17, 2001 9:06 AM
 To: [EMAIL PROTECTED]
 Subject: Queryyy

 Hi,

  Sorry to bear with me. I''ve just started implementing Struts.I'm in the
 environment Websphere 3.5 + FixedPack 4.0, and included jaxp.jar,
 parser.jar in lib.

  This is the part of ActivityLog. CAnyone pl. decipher and guide me to
 implement the struts appln.


 ÝÌ»ªª»ÌÝ  IBM WebSphere   advanced 3.5.4 ptf40119.02
 -com.ibm.servlet.engine.webapp.ServletInstance   9aa2fd21 386 Default
 Server 7Uncaught service() exception thrown by servlet {0}: {1}
 %com.ibm.ejs.resources.seriousMessages   èïÆ$j       jsp11
 Zjavax.servlet.ServletException: Cannot retrieve ActionMappings under key
 org.apache.struts.action.MAPPINGS
 at javax.servlet.ServletException.init(ServletException.java:161)
 at
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
 mpl.java:392)
 at _logon_jsp_0._jspService(_logon_jsp_0.java:281)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.
 java:396)
 at
 org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:718)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:872)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManag
 er.java:626)
 at
 com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecy
 cleServlet.java:160)
 at
 com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServ
 let.java:287)
 at
 com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecyc
 leServlet.java:105)
 at
 com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:
 360)
 at
 com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletM
 anager.java:775)
 at
 com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMan
 ager.java:701)
 at
 com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch
 (WebAppRequestDispatcher.java:478)
 at
 com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppReque
 stDispatcher.java:234)
 at
 com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppReques
 tDispatcher.java:138)
 at
 com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoke
 r.java:77)
 at
 com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cached
 Invocation.java:67)
 at
 com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cachea
 bleInvocationContext.java:106)
 at
 com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRe
 questProcessor.java:160)
 at
 com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListen
 er.java:300)
 at
 com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(
 SQEventListenerImp.java:230)
 at
 com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEven
 tListenerImp.java:104)
 at
 com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(S
 QEventSource.java:212)
 at
 com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Select
 Runnable.notifyService(SQWrapperEventSource.java:353)
 at



 N.SaiSrinivas
 Phone:   (022) 7611090,7611105,760
 Ext:5006

 PersonalID: [EMAIL PROTECTED]






Re: Cannot find ActionMappings Error - second time I am posting -

2001-08-22 Thread Rama Krishna

perhaps your type might be a problem

type should refer to complete java class type including any packages

eg: mypackage.LogonFormmypackage.LogonAction

also check, if your struts-config.xml is in your web-inf folder.
i guess u don't need / before ur path name forward name=failure
path=failure.jsp /
it seems like u r trying to access jsp as ../jsp/logon/logon.jsp check your
forward too.


hope this helps,
rama.



- Original Message -
From: Bhamidi Krishna [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 3:00 PM
Subject: RE: Cannot find ActionMappings Error - second time I am posting -


 My struts-config looks like :

 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration
   1.0//EN
   http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 struts-config
 form-beans
   form-bean name=logonForm
  type=LogonForm/
 /form-beans

 action-mappings
   action path=/logon
type=LogonAction
name=logonForm

   forward name=success path=/success.jsp /

   forward name=failure path=/failure.jsp /

 /action
 /action-mappings
 /struts-config




 From: Aparna Tula [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Cannot find ActionMappings Error - second time I am
posting -
 Date: Wed, 22 Aug 2001 17:50:13 -0400
 MIME-Version: 1.0
 Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP id
 MHotMailBD4D749500294004325940D02A290F7D0; Wed, 22 Aug 2001
14:52:21 -0700
 Received: (qmail 99660 invoked by uid 500); 22 Aug 2001 21:52:07 -
 Received: (qmail 99653 invoked from network); 22 Aug 2001 21:52:06 -
 Received: from unknown (HELO pastisr0100.synchronoss.net) (63.94.105.225)
 by h31.sny.collab.net with SMTP; 22 Aug 2001 21:52:06 -
 Received: from PASTI3CL5Z.synchronoss.net ([10.7.20.10]) by
 pastisr0100.synchronoss.net with Microsoft SMTPSVC(5.0.2195.1600); Wed,
22
 Aug 2001 17:50:14 -0400
 From struts-user-return-15794-bhamidik Wed, 22 Aug 2001 14:53:21 -0700
 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 Precedence: bulk
 list-help: mailto:[EMAIL PROTECTED]
 list-unsubscribe: mailto:[EMAIL PROTECTED]
 list-post: mailto:[EMAIL PROTECTED]
 Delivered-To: mailing list [EMAIL PROTECTED]
 X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
 content-class: urn:content-classes:message
 Message-ID:
 [EMAIL PROTECTED]
 X-MS-Has-Attach:
 X-MS-TNEF-Correlator:
 Thread-Topic: Cannot find ActionMappings Error - second time I am
posting -
 Thread-Index: AcErUv7JGjZbAgBwT+qkybzPNFe2fAAADaxw
 X-OriginalArrivalTime: 22 Aug 2001 21:50:14.0123 (UTC)
 FILETIME=[6C88B3B0:01C12B54]
 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
 
 I came across that error this morning(Cannot find ActionMappings or
 ActionFormBeans collection).
 
 My mistake was that my stuts-config.xml file had a syntax error for ex:
 
  actionpath=/order
 type=org.whatever.action.OrderAction
 name=orderForm
 scope=request
 validate=false
  forward name=abc property=abc.jsp(forgot the closing
 /)
  /action
 
 I changed the forward tag to
  forward name=abc property=abc.jsp/
 
 And it worked! If not exactly that, check if you are not making any
 syntax errors anyplace else in your struts-config.
 
 Hope this helps!
 
 - Aparna
 
 
 -Original Message-
 From: Bhamidi Krishna [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 22, 2001 5:39 PM
 To: [EMAIL PROTECTED]
 Subject: Cannot find ActionMappings Error - second time I am posting -
 
 
 Hi,
 
 this is the second time I am posting this message. When I try to run
 struts
 on Tomcat, I get the following error :
 
 Exception in: R( /examples + /jsp/logon/logon.jsp + null) -
 javax.servlet.ServletException: Cannot find ActionMappings or
 ActionFormBeans collection
 
 I tried all settings I could get hold of from the struts-user mail
 archive.
 
 In the absence of a definitive guide to Struts, can someone please
 enlighten
 me on how to overcome this error??
 
 thankyou,
 Krishna
 
 
 
 
 _
 Get your FREE download of MSN Explorer at
 http://explorer.msn.com/intl.asp


 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





Re: How to Create an ActionError with a text message

2001-08-22 Thread Rama Krishna

may be not. as far as i know. but you can have a work around having one
general key and some default value and pass in a replacement value in
ActionError constructor
so all u r classes can use the same key but replace the default value. this
way u can use html:errors/

hope this helps,
rama.


- Original Message -
From: Rajan Gupta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 3:12 PM
Subject: How to Create an ActionError with a text message


 ActionError normally takes a key to a property in ApplicationResources
 file. But I would like to report errors without putting all the errors in
 the properties file.

 I would like to continue to use the html:errors/ tag.

 Is there a way of reporting errors from an Action which can be reported by
 html:error/ without putting the message string in the resource?

 Thanks for your help,
 Rajan


 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.com/




Re: action as the welcome page

2001-08-15 Thread Rama Krishna

supposing for  http://xyz/abc i want to goto an action and display
someresults, the following works for me.

the following welcome-file-list is needed otherwise, it doesnot work. i get
a 404 error.


web.xml
welcome-file-listwelcome-fileindex.cm/welcome-file/welcome-file-list

config.xml
!-- Display Index Page --
actionpath=/index
  name=indexPage
  type=com.cm.action.IndexPageAction
forward name=success  path=/server.jsp/
/action

hope this helps.
ramakrishna.

- Original Message -
From: Gogineni, Pratima [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 15, 2001 11:58 AM
Subject: action as the welcome page


 Hi,

 I have seen some messages in the news groups which seem to indicate that
it
 may be possible to set an action as the welcome page, though a couple of
 people were having problems with it.

 I tried doing this - set my welcome page to login.do (also tried
/login.do).
 After authentication I get a 404 error that says ADM/login.do not found
(ADM
 is my context).

 The /login action has been defined in struts-config.xml and I can forward
to
 it through a jsp page.

 Im trying to find out if anyone else has been able to do this, if it is
 possible to do this at all, if I am doing something wrong ...

 Thanks
 Pratima

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 15, 2001 10:29 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: action mapping not working




 ...but when you finish going through the Action class (Question), you want
 to
 then go to the jsp, not the action again, which would give you an infinite
 loop!
 ;-)

 Dave





 Larry Maturo [EMAIL PROTECTED] on
08/15/2001
 01:23:32 PM

 Please respond to [EMAIL PROTECTED];
 Please
   respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: action mapping not working



 Hi Dave,

 You wrote:
 Presumably you call your action Question from somewhere, execute it, and
 when
 it's done, you forward to question.jsp, not to the Question action again!

 Actually, I need to go through the Action Class each time, to repopulate
 the jsp from the database, since it represents a question, and I want
 the answers to contain whatever the user last entered, and I stored in the
 database for them.  A breakpoint in my Action Class indeed shows it gets
 hit each time I press back or next.

 Again, thanks for the help.  I don't need to understand it as long as it
 works.  Ah yes, the enigma that is struts. :-)

 -- Larry



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 15, 2001 12:13 PM
 To: [EMAIL PROTECTED]
 Subject: RE: action mapping not working




 Larry,

 Presumably you call your action Question from somewhere, execute it, and
 when
 it's done, you forward to question.jsp, not to the Question action again!
 Hence
 the action has already executed, and you want to go to the jsp page.

 With the others, I guess you want to perform the action and then display
the
 jsp, so the forward here should be another action, and the forward for the
 ReviewInstructions action is then a jsp page.

 Cheers,

 Dave






 Larry Maturo [EMAIL PROTECTED] on
08/15/2001
 01:02:57 PM

 Please respond to [EMAIL PROTECTED]

 To:   David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com,
   [EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: action mapping not working



 Hi Dave

 You wrote
 If you want the action to be called, you should forward to the action, not
 the
 jsp eg

   forward name=showLog path=/ShowLog.do /

 Below is my new mapping:

 action path=/Question
 type=com.athensgroup.eval.action.QuestionAction
 name=QuestionForm
 scope=request
 input=/jsp/Question.jsp
 forward name=success path=/jsp/Question.jsp/
 forward name=instructions
path=/ReviewInstructions.do/
 forward name=summary path=/ReviewSummary.do/
 /action

 I don't understand why it works, but it does.  Thank you.  Any idea
 why sucess works even though it is different than the others?

 -- Larry

















Re: problem with submit

2001-08-15 Thread Rama Krishna



well, if this is the exact code u r using, u 
closed u r form tag before html:submit itself. 

html:form 
name="ReviewSummary"type="com.athensgroup.eval.actionforms.SummaryForm"action="/ReviewSummary.do"/

try removing the "/".

rama.

- Original Message - 
From: "Larry Maturo" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 15, 2001 3:21 
PM
Subject: problem with submit
 I have the following in a form in 
a jsp, and when I hit submit, it does not go back to the action class 
for some reason.  html:form name="ReviewSummary" 
type="com.athensgroup.eval.actionforms.SummaryForm" 
action="/ReviewSummary.do"/  html:submit 
property="SUBMITTED" value="YES"/ /html:form 
 The actual value is irrevalent, since in the action class I just 
test against null, as in:  
if(request.getParameter("SUBMITTED") != null) {  Why is the 
action class not getting called?  -- Larry Maturo 
 


Re: findForward and Errors

2001-08-14 Thread Rama Krishna

you need to save errors

before return and after errors.add

saveErrors(errors);

this should work.


- Original Message -
From: Shawn Sohl [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, August 14, 2001 10:51 AM
Subject: findForward and Errors


 In my Action class I catch errors if they occur.  What I want to know is
can
 I create an ActionErrors object within my Action class and add an error
to
 it like I do in a Form class.  Basically what I want to do is shown in the
 code below.  My .jsp page that failure points to has the
html:errors/
 tag within it but it isnt picking up the error.  I know I can create and
set
 an attribute within the response object and pass the error that way but I
 thought I could use something like I'm trying to do below.

  catch(Exception e)
 {
 ActionErrors errors = new ActionErrors();
 errors.add(error,new ActionError(e.getMessage());
 return mapping.findForward(failure);
 }

 Thanks





Re: findForward and Errors

2001-08-14 Thread Rama Krishna

oops! sorry.

this is correct

saveErrors(request,errors);

- Original Message -
From: Rama Krishna [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 14, 2001 11:05 AM
Subject: Re: findForward and Errors


 you need to save errors

 before return and after errors.add

 saveErrors(errors);

 this should work.


 - Original Message -
 From: Shawn Sohl [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, August 14, 2001 10:51 AM
 Subject: findForward and Errors


  In my Action class I catch errors if they occur.  What I want to know is
 can
  I create an ActionErrors object within my Action class and add an
error
 to
  it like I do in a Form class.  Basically what I want to do is shown in
the
  code below.  My .jsp page that failure points to has the
 html:errors/
  tag within it but it isnt picking up the error.  I know I can create and
 set
  an attribute within the response object and pass the error that way but
I
  thought I could use something like I'm trying to do below.
 
   catch(Exception e)
  {
  ActionErrors errors = new ActionErrors();
  errors.add(error,new ActionError(e.getMessage());
  return mapping.findForward(failure);
  }
 
  Thanks
 
 




Re: newbie question

2001-08-09 Thread Rama Krishna



try this.

!-- The Welcome File List -- 
welcome-file-list 
welcome-filelogin.do/welcome-file 
/welcome-file-list


rama.
 
- Original Message - 
From: "Debasish Ghosh" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 1:09 
PM
Subject: RE: newbie question
 Actually I have the extension 
mapping set up as well. The following is the web.xml file that I am 
using from WEB-INF :  ?xml version="1.0" 
encoding="ISO-8859-1"?  !DOCTYPE web-app  
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" 
 "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"  web-app  
   !-- Action Servlet Configuration -- 
 servlet  
servlet-nameaction/servlet-name  
servlet-classorg.apache.struts.action.ActionServlet/servlet-class 
 init-param  
param-nameapplication/param-name 
 
param-valueApplicationResources/param-value 
 /init-param  
init-param  
param-nameconfig/param-name  
param-value/WEB-INF/struts-config.xml/param-value 
 /init-param  
init-param  
param-namedebug/param-name 
 param-value2/param-value 
 /init-param  
init-param  
param-namedetail/param-name 
 param-value2/param-value 
 /init-param  
init-param  
param-namevalidate/param-name 
 
param-valuetrue/param-value  
/init-param  
load-on-startup1/load-on-startup  
/servlet!-- Action Servlet Mapping 
--  servlet-mapping  
servlet-nameaction/servlet-name  
url-pattern*.do/url-pattern  
/servlet-mapping!-- The Welcome 
File List --  welcome-file-list 
 welcome-filelogin.jsp/welcome-file 
 /welcome-file-list   !-- Struts Tag 
Library Descriptors --  taglib 
 
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri  
taglib-location/WEB-INF/struts-bean.tld/taglib-location 
 /taglib   taglib 
 
taglib-uri/WEB-INF/struts-html.tld/taglib-uri  
taglib-location/WEB-INF/struts-html.tld/taglib-location 
 /taglib   taglib 
 
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri  
taglib-location/WEB-INF/struts-logic.tld/taglib-location 
 /taglib  /web-app  --- 
Martin Cooper [EMAIL PROTECTED] wrote:  This is not related to the form. It 
looks like you  may not have extension  mapping set up 
for your application. My guess is  that if you type this in 
 your browser:   http://yourHost/pathToYourApp/login.do   you will also see a 404. That suggests that you 
need  to add something like  this:  
 !-- Action Servlet Mapping -- 
 servlet-mapping 
 
servlet-nameaction/servlet-name 
 
url-pattern*.do/url-pattern  
/servlet-mappingto your web.xml 
file. You might want to take a look  at the web.xml file in 
 the struts-example app to make sure you've got  everything else 
that you need.   --  Martin Cooper 
   At 12:07 PM 8/9/01, Debasish Ghosh wrote: 
 Hi -I tried these and still no luck 
... I am enclosing  the  code for the Form. 
   package com.anshin;
import javax.servlet.http.HttpServletRequest;  import 
org.apache.struts.action.ActionError;  import 
org.apache.struts.action.ActionErrors;  import 
org.apache.struts.action.ActionForm;  import 
org.apache.struts.action.ActionMapping;
public class LoginForm extends ActionForm  {  
 private String password = 
null;   private 
String username = null;
 public String 
getPassword()   
{  
 
System.out.println( "In  getPassword" );  
 
return (this.password);  
 }   
  public void 
setPassword(String password)  
 {  
 
this.password = password;  
 }   
  public String 
getUsername()   
{  
 
System.out.println( "In  getUsername" );  
 
return (this.username);  
 }   
  public void 
setUsername(String username)  
 {  
 
System.out.println( "In  setUsername" );  
 
this.username = username;  
 }   
  public void 
reset(ActionMapping mapping,  HttpServletRequest 
request)   
{  
 
System.out.println( "In reset" );  
 
this.password = null;  
 
this.username = null;  
 }   
  public ActionErrors 
validate(ActionMapping  mapping,  HttpServletRequest 
request)   
{  
 
System.out.println( "In validate"  );  
 
ActionErrors errors = new  ActionErrors();   
 
 if 
((username == null) ||  (username.length()   
1))  
 
{  
 
errors.add("username", new  
ActionError("error.username.required"));  
 
}  
 if 
((password == null) ||  (password.length()   
1))  
 
{  
 
errors.add("password", new  
ActionError("error.password.required"));  
 
}  
 
return errors;   
}}I am 
only getting the debug prints for "In  getUsername()" and "In 
getPassword()". Then the 404  error comes up. I have a print in 
the first line of  the action class, which is NOT getting 
printed.Cheers.  - 
Debasish  --- Rick Hightower [EMAIL PROTECTED] wrote: 
   On your form make sure you have   
html:form action="/login" 
focus="name"... 
  Then define the following forward in your
struts-config   forward name 
="login" path="/login.do" /...   
If this does not work, try including your 
form  codeso people can help you 
   better.   Rick 
HightowerDirector of Development
eBlox, Inc.   Check out our new 
website!www.eblox.com 
  Contact 

Re: Iterate with offset=parameter

2001-08-09 Thread Rama Krishna

probably, it should be like this,,

logic:iterate id=result name=search scope=session
indexId=resultsPrinted offset=%= fromRec% length=20

hope this helps,
rama.

- Original Message -
From: MacKellar, Kimberly [EMAIL PROTECTED]
To: Struts-User (E-mail) [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 12:43 PM
Subject: Iterate with offset=parameter


 I am trying to iterate over a Vector using the logic:iterate tag.
 Everything works fine until I try to set an offset.
 The offset for where I need to start iterating from is passed in as a
 parameter to the page and I retrieve it using
 bean:parameter id=fromRecord name=FROMRECORD value=0/

 when I try to use fromRecord in the iterate tag
 logic:iterate id=result name=search scope=session
 indexId=resultsPrinted offset=fromRecord length=20

 I get the following on the page
 javax.servlet.ServletException: java.lang.String

 This makes sense since fromRecord is of type String and offset is
expecting
 an int or Integer.

 So I then tried to make the offset a variable using
 % int fromRec = Integer.parseInt(fromRecord); %   and
 logic:iterate id=result name=search scope=session
 indexId=resultsPrinted offset=fromRec length=20

 This doesn't throw an error but doesn't set the correct offset and is
always
 starting from 0.

 How can I retrieve the parameter and use it in the iterator?

 Kimberly MacKellar
 Thomson Financial Publishing
 [EMAIL PROTECTED]





Re: New To Struts

2001-08-09 Thread Rama Krishna

WEB-INF/ is created when an application is deployed/created in the
app-server. any app-server which follows j2ee standard will create this.
the WEB-INF/ folder will be created under the appname folder. this app name
can point to any physical folder on your hard drive, although usually it is
a convention to create it inside the server folder.
i donot know much about weblogic but as far as i know, there will be an
examples/ folder under weblogic and under examples/ there will be an webapp
folder which will have WEB-INF folder.
so, u have to deploy u r war file or create a new application. this will
create a WEB-INF folder for you.
weblogic documentation should help you, to create/deploy an application.

regarding commons-*.jar, i don't know about it as the nightly build i use
doesnot have it.

hope this helps,
rama.


- Original Message -
From: Nitu Singh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 5:43 PM
Subject: Re: New To Struts


 Hi,
 I downloaded jakarta-struts-1.0.zip file and extracted the files in
 c:\jakarta-struts-1.0. But I think lib/commons-*.jar file is missing in my
 installation? Are those files important or can I do without them?
 The installation process still says I should copy the jars in WEB-INF
 directory. Where should I create this WEB-INF directory? (for reference: I
 am using weblogic5.1)

 Thanks and Regards,
 Nitu.
 - Original Message -
 From: Martin Cooper [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 09, 2001 4:39 PM
 Subject: Re: New To Struts


  Comments below.
 
  - Original Message -
  From: Nitu Singh [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Wednesday, August 08, 2001 6:37 PM
  Subject: Re: New To Struts
 
 
   Thanks a lot,
   And I did visit the home page for struts(and that's where the problem
   started).
   Let me explain u the doubts which I had going thru the page:
   1) All the downloads had 2-3 versions (for example, ANT, it had binary
   release, source realease and some RPM),
   which one I have to download, do I have to download all the 3?
   btw, if u can explain me the difference between source release and
 binary
   release, as I see them in almost all the downloads.
 
  The only download you need is the Struts binary distribution. If you
read
  something that stated that you needed more than this, please let us know
  where you saw that, so that we can fix it. You don't need to download
Ant
 at
  all unless you want to rebuild Struts, or the example apps that come
with
  it.
 
  The binary distribution contains everything you need, already compiled
and
  provided as one or more jar files, ready for you to include in your own
  application.See
  http://jakarta.apache.org/struts/installation.html#Installing for more
  information on using a binary distribution.
 
  The source distribution includes, ah, the source code and everything you
  would need to rebuild your own version of Struts. See
  http://jakarta.apache.org/struts/installation.html#Building if you want
to
  do that.
 
   2) Do I really have to download the Servlet API ?If yes, why? as
 weblogic
   supports servlets and why again to have one more servlet API?
 
  You need to have some Servlet API implementation available if you're
going
  to compile your own code that relies on those interfaces. If WebLogic
  includes that (as I would assume that it does, but I'm not familiar with
  it), then you don't need to download another one.
 
   3) In many installations it says, I need to put some *distribution
 files*
  or
   some *jar files*  in WEB-INF directory. I don't find any such
directory
   in weblogic5.1. So what to do?
 
  I suggest you follow the instructions for WebLogic 5.1. See
  http://jakarta.apache.org/struts/installation-wls.html for more
 information.
 
   These are only few of the things. The more I read, the more I get
  confused?
   If you could clear my above queries, I can go ahead and then may be I
 will
   come up more questions?
 
  The best suggestion I can come up with is to follow the links that are
  available to you, and search the mailing list archives. You are by no
 means
  the first person to travel the path you are on.
 
  --
  Martin Cooper
 
 
  
   Thanks a lot,
   Nitu.
   - Original Message -
   From: Martin Cooper [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Thursday, August 09, 2001 3:29 PM
   Subject: Re: New To Struts
  
  
You must not have visited the Struts home page, which should have
been
   your
*first* resort. :-)
   
http://jakarta.apache.org/struts/
   
There you will find:
   
* A link to the Struts User Guide
   
* A 'Resources' link, which will take you to a page listing several
tutorials and articles on Struts.
   
* An 'Installation' link, which will take you to a page detailing
  specific
installation instructions for over a dozen different containers,
  including
WebLogic 5.1.
   

Re: New To Struts

2001-08-08 Thread Rama Krishna

The following might help you.

ramakrishna.

*

Ted Husted has links tutorials, example webapps, and
code (custom tags, etc.).

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


A Walking Tour of Struts (at the bottom) walks you
through the Struts example webapp.
http://www.husted.com/about/struts/scaffolding.htm

If you want to stay pure MVC, then you can have your
home page go through the controller servlet.

Struts has a connection pool that you can use for
database connections.  You configure it in the
struts-config.xml file.

David

--- [EMAIL PROTECTED] wrote:
 Hi all,

 I just signed up and looking for some tutorials on
 struts.
 I installed it on Linux with Apache-Tomcat config.

 There is a sample application in there, however it
 would be maybe easier to
 go through some tutorials first.
 Any suggestions ?

 Also, I'm in the process of  doing a little web site
 for myself.
 It's basically only presentation of data for now. I
 have a little confusion
 there. As far as I understood the specifications,
 servlets ( controllers )
 are responsible for data extraction from the
 database and JSPs for
 presentation. So what should I set up as the index
 page , a JSP that
 forwards the request to servlet and servlet responds
 to JSP again or to use
 a servlet that sends data to JSP ?

 Also. is it a good technique to have the JSP ( beans
 ) extract data from
 database ?  In this case, how do I get to the
 connection parameters if I
 don't want to hardcode it and maybe use web.xml file
 to hold the connection
 parameters ?

 All responses are welcomed.

 Thank you.

 Jf



__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

- Original Message -
From: Nitu Singh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 08, 2001 5:18 PM
Subject: New To Struts


 Hi,
 I am new to struts and for past one week I am trying to find tutorials and
 materials regarding struts.
 The only thing I got is some tutorial in jspinsider.com.
 I understood the model of struts, but when putting it in to code, I am
 facing problem at very basic step.
 All I see in tutorials is they have explained how to use struts in tomcat
 server. But  I am using weblogic5.1 server.
 I have did all the settings as per directed for tomcat.
 I understand there must some different way of deploying struts in weblogic
 server.
 Can anyone please guide me through as what I should do to run my basic
 application?
 What all installations do I need and where should be they placed?

 I am really vexed up looking for these things on net. This mailing list is
 my LAST REOSRT.

 Thanks and Regards,
 Nitu.






Re: html:errors Presentation Questions

2001-08-07 Thread Rama Krishna


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 9:15 AM
Subject: html:errors Presentation Questions


 All,

 I have 2 questions:

 1.  When I use html:errors/, the following output is rendered:

   Last Name is required.  First Name is required.

   Is it possible to use the iteration tag to go through the list and
 provide a break between the items?

you can have a br in your resource file itself.
error.last.required=Last Name is requiredbr



 2.  Validation already occurs when my input  form first appears (and error
 messages appear without the user first submitting the form).  What is the
 easiest
   way to avoid validation until the user submits the  form?


you can use an if condition for the *action* value
eg: if(action.equals(create)) return null;


 Thanks,
 Brian



rama.



infinite loop

2001-08-04 Thread Rama Krishna



hi all,

In continuation to my post 
yesterday,

The following is my code. The flow is fine till 
Forwarding to Success and then instead of displaying, it starts again from the 
begining.

If i remove the if condition in validate method 
then it displays the form with errors which is fine. 

am i doing something wrong


thanks,
rama.

Mappings:

!-- FIP User Profile Page bean 
-- 
form-bean 
name="addUser" 
type="com.niku.cm.action.AddUser"/

!-- FIP User Profile Page 
-- action 
path="/adduser" 
name="addUser" 
validate="true" 
input="/adduser.jsp" 
type="com.niku.cm.action.AddUserAction"forward 
name="success" 
path="/adduser.cm"//action


adduser.jsp:


html:errors /

html:form action="/adduser?action=save" 
focus="fullname"table width="55%" border="0" 
cellspacing="1" tr td 
class="fieldname" width="16%"Full 
Name*/tdtd class="field" 
width="16%"html:text styleClass="noborder" property="fullname" 
//td/tr 
trtd class="fieldname" 
width="19%"Phone*/tdtd 
class="field" width="16%"html:text styleClass="noborder" 
property="phone"/ 
/td/tr trtd 
class="fieldname" 
width="19%"Email*/tdtd 
class="field" width="16%"html:text styleClass="noborder" 
property="email"/ 
/td/tr 
/table p align=centerhtml:submit 
/nbsp;nbsp;html:reset 
//p/html:form
AddUser.java 
(FormBean)


private String 
action="create";private 
Stringfullname=null;private 
Stringphone=null;private 
Stringemail="";privateStringresult="false";

public String getAction() 
{return (this.action); }
 public void setAction(String action) 
{ this.action = action; }

 public String getFullname() {return (this.fullname); 
}
 public void setFullname(String _fullname) 
{this.fullname = _fullname;} public String getPhone() {return 
(this.phone);} public void setPhone(String _phone) 
{this.phone=_phone;} public String 
getEmail() {return (this.email);} public void setEmail(String 
_email) {this.email=_email;}

public ActionErrors 
validate(ActionMapping 
mapping, 
HttpServletRequest request) { 
if((action.equals("create")) ||(action.equals("get"))) return 
null;
 ActionErrors errors = 
new ActionErrors(); if ((fullname 
== null) || (fullname.length()  
1)) 
errors.add("fullname", 
new 
ActionError("error.fullname.required")); 
if ((phone == null) || (phone.length()  
1)) 
errors.add("phone", 
new 
ActionError("error.phone.required")); 
if ((email == null) || (email.length()  
1)) 
errors.add("email", 
new 
ActionError("error.email.required")); 
return errors;

 
}AddUserAction.java (action 
class)

public final class AddUserAction extends Action 
{

 public ActionForward 
perform(ActionMapping mapping, ActionForm 
form, HttpServletRequest 
request, HttpServletResponse 
response)throws IOException, ServletException 
{

file://get 
the application resourcesMessageResources messages= 
getResources();file://get the 
sessionHttpSession session= 
request.getSession();file://get the 
actionString action = 
request.getParameter("action");System.out.println("AddUserAction 
: Action is "+action);file://if action is null set it to 
defaultif (action == null) 
action = "create"; if (servlet.getDebug() 
= 1) 
servlet.log("AddUserAction: Processing " + action +" 
action");file://if 
form is null then create new instanceif (form == null) 
{ if 
(servlet.getDebug() = 
1) 
servlet.log(" Creating new AddUserForm bean under key "+ 
mapping.getAttribute()); form = new 
AddUser(); if 
("request".equals(mapping.getScope())) 
request.setAttribute(mapping.getAttribute(), 
form); 
else 
session.setAttribute(mapping.getAttribute(), 
form);}

AddUser addform= (AddUser) 
form;if(action.equals("create")) 
{
/*
  
 do nothing
  
*/} 
// Forward control to the server page
 if 
(servlet.getDebug() = 
1) 
servlet.log(" Forwarding to success");return 
(mapping.findForward("success")); }
}


Re: infinite loop

2001-08-04 Thread Rama Krishna



:-(

i am sorry. you are right.

i had few reports with out html:form in them and 
when i give .cm in forward they work fine.

so i was thinking that it would be the same for 
forms also.

thanks much.

rama.

  - Original Message - 
  From: 
  Gregor Rayman 

  To: [EMAIL PROTECTED] 
  Sent: Saturday, August 04, 2001 11:59 
  AM
  Subject: Re: infinite loop
  
  What does forward 
  name="success" path="/adduser.cm"/ mean? Shouldn't 
  it be path="/adduser.jsp" ?
  
  --
  gR
  
  
- Original Message ----- 
    From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Saturday, August 04, 2001 8:55 
PM
Subject: infinite loop

hi all,

In continuation to my post 
yesterday,

The following is my code. The flow is fine 
till Forwarding to Success and then instead of displaying, it starts again 
from the begining.

If i remove the if condition in validate 
method then it displays the form with errors which is fine. 

am i doing something wrong


thanks,
rama.

Mappings:

!-- FIP User Profile Page bean 
-- 
form-bean 
name="addUser" 
type="com.niku.cm.action.AddUser"/

!-- FIP User Profile Page 
-- action 
path="/adduser" 
name="addUser" 
validate="true" 
input="/adduser.jsp" 
type="com.niku.cm.action.AddUserAction"forward 
name="success" 
path="/adduser.cm"//action


adduser.jsp:


html:errors /

html:form action="/adduser?action=save" 
focus="fullname"table width="55%" border="0" 
cellspacing="1" tr td 
class="fieldname" width="16%"Full 
Name*/tdtd class="field" 
width="16%"html:text styleClass="noborder" property="fullname" 
//td/tr 
trtd class="fieldname" 
width="19%"Phone*/tdtd 
class="field" width="16%"html:text styleClass="noborder" 
property="phone"/ 
/td/tr trtd 
class="fieldname" 
width="19%"Email*/tdtd 
class="field" width="16%"html:text styleClass="noborder" 
property="email"/ 
/td/tr 
/table p 
align=centerhtml:submit /nbsp;nbsp;html:reset 
//p/html:form
AddUser.java 
(FormBean)


private String 
action="create";private 
Stringfullname=null;private 
Stringphone=null;private 
Stringemail="";privateStringresult="false";

public String 
getAction() {return 
(this.action); }
 public void setAction(String 
action) { this.action = 
action; }

 public String getFullname() 
{return (this.fullname); }
 public void setFullname(String 
_fullname) {this.fullname = 
_fullname;} public 
String getPhone() {return (this.phone);} public void 
setPhone(String _phone) 
{this.phone=_phone;} public String 
getEmail() {return (this.email);} public void 
setEmail(String _email) {this.email=_email;}

public ActionErrors 
validate(ActionMapping 
mapping, 
HttpServletRequest request) { 
if((action.equals("create")) ||(action.equals("get"))) return 
null;
 ActionErrors errors 
= new ActionErrors(); if 
((fullname == null) || (fullname.length()  
1)) 
errors.add("fullname", 
new 
ActionError("error.fullname.required")); 
if ((phone == null) || (phone.length()  
1)) 
errors.add("phone", 
new 
ActionError("error.phone.required")); 
if ((email == null) || (email.length()  
1)) 
errors.add("email", 
new 
ActionError("error.email.required")); 
return errors;

 
}AddUserAction.java (action 
class)

public final class AddUserAction extends 
Action {

 public ActionForward 
perform(ActionMapping mapping, ActionForm 
form, HttpServletRequest 
request, HttpServletResponse 
response)throws IOException, ServletException 
{

file://get the application 
resourcesMessageResources messages= 
getResources();file://get the 
sessionHttpSession session= 
request.getSession();file://get 
the actionString action = 
request.getParameter("action");System.out.println("AddUserAction 
: Action is "+action);file://if action is null set it to 
defaultif (action == null) 
action = "create"; if (servlet.getDebug() 
= 1) 
servlet.log("AddUserAction: Processing " + action +" 
action");file://if form is null then create new 
instanceif 

Re: infinite loop

2001-08-04 Thread Rama Krishna

yes, martin. it works fine.

i have few .jsp pages without forms means they display reports and they work
fine with .cm mapping, so, i was thinking it would be the same for forms
also.

thanks much,
rama.


- Original Message -
From: Martin Cooper [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 04, 2001 12:07 PM
Subject: Re: infinite loop


 Are you using extension mapping, with the extension .cm? If so, then
your
 infinite loop is happening because you are forwarding from the action
right
 back to the same action, instead of to the JSP page. Change your forward
to
 reference the JSP instead of the action, like this:

  forward name=success  path=/adduser.jsp/

 and things should start working normally.

 --
 Martin Cooper


 - Original Message -
 From: Rama Krishna [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, August 04, 2001 11:55 AM
 Subject: infinite loop


 hi all,

 In continuation to my post yesterday,

 The following is my code. The flow is fine till Forwarding to Success
 and then instead of displaying, it starts again from the begining.

 If i remove the if condition in validate method then it displays the
 form with errors which is fine.

 am i doing something wrong


 thanks,
 rama.

 Mappings:

 !-- FIP User Profile Page bean --
   form-bean  name=addUser
  type=com.niku.cm.action.AddUser/

 !-- FIP User Profile Page --
 actionpath=/adduser
   name=addUser
   validate=true
   input=/adduser.jsp
   type=com.niku.cm.action.AddUserAction
  forward name=success  path=/adduser.cm/
  /action


 adduser.jsp:


 html:errors /

 html:form action=/adduser?action=save focus=fullname
 table width=55% border=0  cellspacing=1
 tr
   td class=fieldname width=16%Full Name*
   /td
   td class=field width=16%html:text styleClass=noborder
 property=fullname /
   /td/tr
   trtd class=fieldname width=19%Phone*
   /td
   td class=field width=16%html:text styleClass=noborder
 property=phone/
   /td/tr
   trtd class=fieldname width=19%Email*
   /td
   td class=field width=16%html:text styleClass=noborder
 property=email/
/td/tr
   /table
  p align=centerhtml:submit /nbsp;nbsp;html:reset //p
 /html:form

 AddUser.java (FormBean)


  private String  action  = create;
  private String fullname = null;
  private String phone  = null;
  private String email  = ;
  private String result  = false;



public String getAction() { return (this.action); }
public void setAction(String action) {  this.action = action;  }

   public String getFullname() {return (this.fullname); }
   public void setFullname(String _fullname) {this.fullname = _fullname;}

   public String getPhone() {return (this.phone);}
   public void setPhone(String _phone) {this.phone = _phone;}

   public String getEmail() {return (this.email); }
   public void setEmail(String _email) {this.email = _email;}

   public ActionErrors validate(ActionMapping mapping,
  HttpServletRequest request) {
  if((action.equals(create)) ||(action.equals(get))) return null;

  ActionErrors errors = new ActionErrors();
 if ((fullname == null) || (fullname.length()  1))
 errors.add(fullname,
new ActionError(error.fullname.required));
 if ((phone == null) || (phone.length()  1))
 errors.add(phone,
new ActionError(error.phone.required));
 if ((email == null) || (email.length()  1))
 errors.add(email,
new ActionError(error.email.required));
 return errors;

 }

  AddUserAction.java (action class)

 public final class AddUserAction extends Action {

 public ActionForward perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
   throws IOException, ServletException {


file://get file://get  the application resources
   MessageResources messages = getResources();

file://get file://get  the session
   HttpSession   session = request.getSession();

file://get file://get  the action
   String action = request.getParameter(action);
   System.out.println(AddUserAction : Action is +action);

file://if file://if  action is null set it to default
   if (action == null)
   action = create;
   if (servlet.getDebug() = 1)
   servlet.log(AddUserAction:  Processing  + action +
 action);

file://if file://if  form is null then create new instance
   if (form == null) {
   if (servlet.getDebug() = 1)
   servlet.log( Creating new AddUserForm bean under key +
 mapping.getAttribute());
   form = new AddUser();
   if (request.equals(mapping.getScope()))
   request.setAttribute(mapping.getAttribute(), form);
   else
   session.setAttribute(mapping.getAttribute(), form);
   }

   AddUser addform

infinite loop

2001-08-03 Thread Rama Krishna



hello all,


i posted a question regarding the Stackoverflow 
error. but i got no help.

thought i will explain my problem in more 
detail.


i have an adduser.jsp which is invoked thru a 
href in a normal html page.

this adduser.jsp displays a form.

there is formbean and actionclass for this 
adduser.jsp and the mapping is fine.

currently, after i am into this problem, the 
action class does nothing except mapping the form to AddUser and forwarding to 
adduser.jsp

when i invoke this jsp, i get the following 
error...

nulljava.lang.StackOverflowError	at 
allaire.jrun.servlet.ForwardRequest.getParameterNames(../servlet/ForwardRequest.java:206)	at 
allaire.jrun.servlet.ForwardRequest.getParameterNames(../servlet/ForwardRequest.java:206):
:
this runs for some 100 lines or so and 
then

at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:734)	at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2050)	at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1552)	at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at 
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)	at 
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionService.java:1082)	at 
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)	at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:89)	at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)	at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)	at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490):
:
this runs for another 100 lines or 
so.


i figured that the line in 
org.apache.struts.util.RequestUtils.java has the following 
line

 
multipart.setServlet(servlet); 
multipart.setMapping((ActionMapping) 
request.getAttribute(Action.MAPPING_KEY)); 
request.removeAttribute(Action.MAPPING_KEY);**//this is the 
line

i did a system.out for Action.MAPPING_KEY and it 
is having the correct mapping.

if i give a forward to another .jsp page, it 
works fine.

so i thought the error is in my .jsp and removed 
everything except for html and head tags. nope no 
use.

can anyone help me or point me to a 
hint.

thanks,
rama.







session problem...

2001-08-02 Thread Rama Krishna



hi all,

howto make struts not to create a session 
byitself. i want to create a session and then check if the session is not 
expired.

i don't want struts to create this.

defaultly, struts is storing the Locale and 
Formbean in session.

any ideas, or am i missing 
something???

thanks,
rama.


Re: Errors from within Action.perform()

2001-07-26 Thread Rama Krishna



this should work.

this is also there in struts example 
"SaveRegistrationAction"

errors.add("somestring", 
new ActionError("error.key"));}

if (!errors.empty()) 
{ saveErrors(request, 
errors); return (new 
ActionForward(mapping.getInput()));}

hope this helps


  - Original Message - 
  From: 
  Greg 
  Maletic 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 26, 2001 4:27 
  PM
  Subject: Errors from within 
  Action.perform()
  
  Struts 
  encourages two different ways to do form validation: inside the 
  ActionForm.validate() method (presumably for low-level field validation) and 
  in the Action.perform() method (presumably for higher-level business logic 
  validation). ActionForm.validate() lets me return an ActionError object 
  that displays error messages on the JSP. Is there a way for me to 
  leverage this same error architecture from within my Action.perform() 
  method?
  
  In other 
  words, how can I generate error messages 
  in my Action that will display on the JSP, in exactly the same way that errors 
  frommy ActionForm.validate() method can? Is it somehow possible togenerate an 
  ActionErrors object from inside an Action.perform() 
  method?
  
  Thanks.
  
  ==
  Greg Maletic
  Chief Technical Officer
  Zero G Software, Inc.
  514 Bryant Street
  San Francisco, CA 94107
  
  tel: +1.415.512.7771 x303
  fax: +1.415.723.7244
  mailto:[EMAIL PROTECTED]
  http://www.ZeroG.com
  
  The leading provider of multi-platform software 
  deployment solutions.
  
  ==
  


struts and WAP

2001-07-25 Thread Rama Krishna



hi all,

i am wondering if there are any thoughts/process 
going on to support WML taglibs in struts.

or is there anything already 
available.

thanks,
rama.


Re: action mapping difficulties

2001-07-24 Thread Rama Krishna

if you have a property with sFirstName then your getter methos should be
getSFirstName().
if this doesn't work try changing your sFirstName to something else in lower
case. eg: abc and getter will be getAbc();

hope this helps,
rama.



- Original Message -
From: Sorenson, Alexander [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:08 AM
Subject: action mapping difficulties


 I am getting a compilation error on my jsp, which seems to indicate a
 problem with the action mappings.  One jsp, the custLogin.jsp compiles
fine,
 whereas the custJoin.jsp throws this exception compiling
 javax.servlet.ServletException: No getter method for property
 sFirstName of bean org.apache.struts.taglib.html.BEAN .
 I do have all of the getters and setters in the customerJoinForm. The
action
 mappings for these two forms seem to be consistent.  The relevant code:

 custJoin.jsp:
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 ...
 html:form action=/custjoin.do
 ...
 First Name:
  td align=left
   html:text property=sFirstName size=16 maxlength=50//td
 ...
 /html:form

 custLogin.jsp:
 ...
 html:form action=/custlogin.do
 ...

 struts-config.xml:

 form-beans
   !-- Customer join form bean --
 form-bean  name=customerJoinForm
 type=com.bmp.action.CustomerJoinForm/

   !-- Customer login form bean --
 form-bean  name=customerLoginForm
 type=com.bmp.action.CustomerLoginForm/

 /form-beans

 global-forwards
 forward   name=custjoin  path=/custJoin.jsp/
 forward   name=custlogin path=/custLogin.jsp/
 /global-forwards

 action-mappings
   !-- Process a customer join --
 actionpath=/custjoin
type=com.bmp.action.CustomerJoinAction
name=customerJoinForm
scope=request
input=/custJoin.jsp
validate=true
 forward name=success path=/custAccount.jsp /
 forward name=failure path=/error.jsp /
 /action

   !-- Process a user logon --
 actionpath=/custlogin
type=com.bmp.action.CustomerLoginAction
name=customerLoginForm
scope=request
input=/custLogin.jsp
validate=true
 forward name=success path=/custAccount.jsp /
 forward name=failure path=/custLogin.jsp /
 /action

 /action-mappings

 Any ideas what's going on here?  I am using Tomcat3.2.2, Struts 1.0 and
 Apache1.3.20.

 Thanks,
 Alex




html:select

2001-07-20 Thread Rama Krishna



hi,

in my select list i want an item to be selected 
default. for this i did as: 


bean:define id="server" 
name="abc" property="server" /
 
bean:define id="myCollection" name="abc" property="records" 
/
 
html:select name="abc" property="xyz" value="server"
 
html:options collection="myCollection" property="value" /
 
/html:select


but this is not working. am i missing 
something??? but when i hardcode a value, it works fine.

thanks,
rama.





Re: html:select

2001-07-20 Thread Rama Krishna

yes, i do have setxyz, getxyz.


- Original Message -
From: Prashanth_Thm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 3:46 PM
Subject: RE: html:select


 I presume you will be having these in your Form class ;
 getxyz() and
 setxyz() for the property xyz

 call setxyz(defaultvalue) when you set the values in the Form class.
 Hope this helps !


  -Original Message-
  From: Rama Krishna [SMTP:[EMAIL PROTECTED]]
  Sent: Friday, July 20, 2001 3:42 PM
  To: [EMAIL PROTECTED]
  Subject: html:select
 
  hi,
 
  in my select list i want an item to be selected default. for this i did
  as:
 
 
  bean:define id=server name=abc property=server /
 
bean:define id=myCollection name=abc property=records /
 
html:select  name=abc property=xyz value=server
 
  html:options collection=myCollection property=value /
 
/html:select
 
 
  but this is not working. am i missing something??? but when i hardcode a
  value, it works fine.
 
  thanks,
  rama.
 
 
 




action forward

2001-07-17 Thread Rama Krishna



hi all,


i wanted a sendRedirect rather than a forward 
when i tried it thru ...-config.xml

this seems to be not working

forward name="..." path="..." redirect="true" 
/ 

however, if i create a new instance of 
actionforward in my action class like

new ActionForward("", true) it 
works.


am i missing something???

thanks,
rama.




quick question : form

2001-07-16 Thread Rama Krishna



hi all,

i have a form and when i submit it i perform some 
action and i forward it to the same form, but with a message "success". 
now

- i want to reset all the fields (set to default 
value)
- the url after submission is still 
xxx.yy?action="save", where as i want the action to be"create"


i tried calling reset method before forwarding, 
it clears all the fields but doesn't show message "success" and the url is still 
?action="save"


can anyone help me??

thanks,
rama.




Re: quick question : form

2001-07-16 Thread Rama Krishna



Thanks much Melissa. But, i want to know why it 
does like this, when i call the reset manually.

rama.

  - Original Message - 
  From: 
  Melissa 
  Rabin 
  To: [EMAIL PROTECTED] 
  Sent: Monday, July 16, 2001 11:19 
AM
  Subject: RE: quick question : form
  
  Hi 
  Rama. One quick  dirty way to solve your problem isto 
  add "success" as a string to the request object in the perform method of your 
  action class, and add a "forward-name="success" path=/originalJsp" 
  line in your struts-config file(which will return you to the page you 
  posted the initial request). Add some jsp code to check if the request 
  attribute is null, which it will be when you first load the page.After 
  the request is posted and your action class adds the string to the request (if 
  all goes well), it should finish up by returning you to your original jsp 
  where you will now see your "success" status message (e.g. %= 
  request.getAttribute("status")%
  
  I 
  hope this helps
  
  Melissa
  Web 
  Engineer
  
-Original Message-From: Rama Krishna 
[mailto:[EMAIL PROTECTED]]Sent: Monday, July 16, 2001 2:07 
PMTo: [EMAIL PROTECTED]Subject: quick 
question : form
hi all,

i have a form and when i submit it i perform 
some action and i forward it to the same form, but with a message "success". 
now

- i want to reset all the fields (set to 
default value)
- the url after submission is still 
xxx.yy?action="save", where as i want the action to be"create"


i tried calling reset method before 
forwarding, it clears all the fields but doesn't show message "success" and 
the url is still ?action="save"


can anyone help me??

thanks,
rama.




Re: Report to Recipient(s)

2001-07-16 Thread Rama Krishna

his firewall/gateway/mailserver is rejecting mails,cause, they are filtering
the content.



- Original Message -
From: Jeff Trent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 11:53 AM
Subject: Re: Report to Recipient(s)


 What is this message mean?


 - Original Message -
 From: Paladin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 2:46 PM
 Subject: Report to Recipient(s)


  Incident Information:-
 
  Originator:Jeff Trent [EMAIL PROTECTED]
  Recipients:[EMAIL PROTECTED]
  Subject:  Re: quick question : form
 
  Message from Jeff Trent [EMAIL PROTECTED] was quarantined
because
  it contained banned content.
 
 





Re: using html:link with javascript

2001-07-16 Thread Rama Krishna



you can use target="_blank" .



  - Original Message - 
  From: 
  Syd 
  Naveen 
  To: [EMAIL PROTECTED] 
  Sent: Monday, July 16, 2001 4:36 PM
  Subject: RE: using html:link with 
  javascript
  
  its opening it twice bcoz ur giving a page link and also 
  opening the page thro java script window.open method. syd 
  -Original Message- From: 
  Melissa Rabin [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, July 16, 2001 8:12 AM To: Struts-User Subject: using 
  html:link with javascript 
  Hello all. Simple question: is there a way to use 
  JavaScript in the html:link tag so that the url pops 
  open in a new window? At the moment, using 
  something like: html:link page="http://myLink..." > "window.open("http://myLink...") is 
  opening the page twice...once in the original window, 
  and once again in the new window. 
  Any suggestions? 
  Melissa Rabin Web Engineer 



action forward question

2001-07-13 Thread Rama Krishna



hi all,

how to refresh (create new instance of) the page 
that was forwarded from an action of another page??


it's like this

page A - some action - page B

page B - someaction - page A 
(forward-success)

i want page A to get created 
freshly.


any ideas???

thanks,
rama.


struts and Jrun 3.0

2001-07-11 Thread Rama Krishna



is there any problem with JRun 3.0 and struts. 
cause my development m/c has JRun 3.1 and everything worked fine. when i tried 
to put it on staging with JRun 3.0 

is it like JRun 3.0 doesn't work with struts or 
???


it gives me the 
following error:

javax.servlet.ServletException: 
nulljava.lang.AbstractMethodError	at 
allaire.jrun.jsp.JSPServlet.servletNeedsCreating(JSPServlet.java:312)	at 
allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:188)	at 
allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)	at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)	at 
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)	at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)	at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)	at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)	at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)	at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)	at 
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)	at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)	at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)	at 
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)	at 
allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)	at 
allaire.jrun.ThreadPool.run(ThreadPool.java:267)	at 
allaire.jrun.WorkerThread.run(WorkerThread.java:74)
thanks,
rama.


Re: struts and Jrun 3.0

2001-07-11 Thread Rama Krishna




you are right. thanks. i did the way you said and 
that error is gone. now the problem is with setLocale(...) which is a known JRun 
problem. 

if i upgrade jrun does it retain the existing 
applications in the current version or should i recreate all 
those???




  - Original Message - 
  From: 
  Gogineni, Pratima 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, July 11, 2001 4:10 
  PM
  Subject: RE: struts and Jrun 3.0
  
  I 
  got this error a couple of times without any reason too. JRUN 3.0 has jsp 
  cacheing problems and shutting down the server, deleteing the cached jsp pages 
  and restarting solves this problems in most cases. Our sales rep said these 
  problems were fixed in 3.1.
  
  If 
  your webapp is called testApp it would have created a jsp directory under 
  WEB-INF/ just delete all these files and then start the server 
  again
  
-Original Message-From: Rama Krishna 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, July 11, 2001 
4:02 PMTo: [EMAIL PROTECTED]Subject: 
struts and Jrun 3.0
is there any problem with JRun 3.0 and 
struts. cause my development m/c has JRun 3.1 and everything worked fine. 
when i tried to put it on staging with JRun 3.0 

is it like JRun 3.0 doesn't work with struts 
or ???


it gives me the 
following error:

javax.servlet.ServletException: 
nulljava.lang.AbstractMethodErrorat 
allaire.jrun.jsp.JSPServlet.servletNeedsCreating(JSPServlet.java:312)at 
allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:188)at 
allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)at 
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)at 
allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)at 
allaire.jrun.ThreadPool.run(ThreadPool.java:267)at 
allaire.jrun.WorkerThread.run(WorkerThread.java:74)
thanks,
rama.


Re: struts and Jrun 3.0

2001-07-11 Thread Rama Krishna



it should do if i backup the properties files 
right??!!

  - Original Message - 
  From: 
  Gogineni, Pratima 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, July 11, 2001 4:33 
  PM
  Subject: RE: struts and Jrun 3.0
  
  It 
  retains but I guess its safer to backup ...
  
-Original Message-From: Rama Krishna [mailto:[EMAIL PROTECTED]]Sent: 
Wednesday, July 11, 2001 4:33 PMTo: [EMAIL PROTECTED]Subject: 
Re: struts and Jrun 3.0

you are right. thanks. i did the way you said 
and that error is gone. now the problem is with setLocale(...) which is a 
known JRun problem. 

if i upgrade jrun does it retain the existing 
applications in the current version or should i recreate all 
those???




  - Original Message - 
  From: 
  Gogineni, Pratima 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, July 11, 2001 4:10 
  PM
  Subject: RE: struts and Jrun 
3.0
  
  I got this error a couple of times without any reason too. JRUN 3.0 
  has jsp cacheing problems and shutting down the server, deleteing the 
  cached jsp pages and restarting solves this problems in most cases. Our 
  sales rep said these problems were fixed in 3.1.
  
  If your webapp is called testApp it would have created a jsp 
  directory under WEB-INF/ just delete all these files and then start the 
  server again
  
-Original Message-From: Rama Krishna 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, July 11, 2001 
4:02 PMTo: [EMAIL PROTECTED]Subject: 
struts and Jrun 3.0
is there any problem with JRun 3.0 and 
struts. cause my development m/c has JRun 3.1 and everything worked 
fine. when i tried to put it on staging with JRun 3.0 

is it like JRun 3.0 doesn't work with 
struts or ???


it gives me the 
following error:

javax.servlet.ServletException: 
nulljava.lang.AbstractMethodErrorat 
allaire.jrun.jsp.JSPServlet.servletNeedsCreating(JSPServlet.java:312)at 
allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:188)at 
allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)at 
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)at 
allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)at 
allaire.jrun.ThreadPool.run(ThreadPool.java:267)at 
allaire.jrun.WorkerThread.run(WorkerThread.java:74)
thanks,
rama.


Re: struts and Jrun 3.0

2001-07-11 Thread Rama Krishna



ok. will keep in mind. thanks much.

  - Original Message - 
  From: 
  Matthew 
  O'Haire 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, July 11, 2001 4:36 
  PM
  Subject: RE: struts and Jrun 3.0
  
  Watch out with your custom tags TLD's moving from 
  JRun 3.0 to 3.1. It's only a minor issue, but in JRun 3.0 
  the tag properties declared in the TLD were not verified against the 
  implementing class (i.e. get/set methods). In 3.1 this is now done (as 
  it should), and you can get caught out if your TLD's are not up to 
  date!
  
-Original Message-From: Gogineni, Pratima 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, July 12, 2001 
09:10To: '[EMAIL PROTECTED]'Subject: RE: 
struts and Jrun 3.0
I 
got this error a couple of times without any reason too. JRUN 3.0 has jsp 
cacheing problems and shutting down the server, deleteing the cached jsp 
pages and restarting solves this problems in most cases. Our sales rep said 
these problems were fixed in 3.1.

If 
your webapp is called testApp it would have created a jsp directory under 
WEB-INF/ just delete all these files and then start the server 
again

  -Original Message-From: Rama Krishna 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, July 11, 2001 
  4:02 PMTo: [EMAIL PROTECTED]Subject: 
  struts and Jrun 3.0
  is there any problem with JRun 3.0 and 
  struts. cause my development m/c has JRun 3.1 and everything worked fine. 
  when i tried to put it on staging with JRun 3.0 
  
  is it like JRun 3.0 doesn't work with 
  struts or ???
  
  
  it gives me the 
  following error:
  
  javax.servlet.ServletException: 
  nulljava.lang.AbstractMethodErrorat 
  allaire.jrun.jsp.JSPServlet.servletNeedsCreating(JSPServlet.java:312)at 
  allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:188)at 
  allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
  allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
  allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
  org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)at 
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)at 
  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
  allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
  allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)at 
  allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)at 
  allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)at 
  allaire.jrun.ThreadPool.run(ThreadPool.java:267)at 
  allaire.jrun.WorkerThread.run(WorkerThread.java:74)
  thanks,
  rama.


Re: iterate: offset

2001-07-08 Thread Rama Krishna

yes niall, doing multiple iterations in parallel, one for
querystrings(hashmap) and the other for report generation. will try as you
said.

thanks much,
rama.

- Original Message -
From: Niall Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 2:46 PM
Subject: RE: iterate: offset


 Rama

 I tried what you wrote below and the jsp ,didnt compile.

 This did though, and worked :-)

   % int row=0; %
   logic:iterate ...
 logic:iterate ... length=1 offset='%= +row %'

% row++; %
 /logic:iterate
   /logic:iterate

 Also an alternative would be to use the indexId of the IterateTag which
 means you dont have to declare and increment your row variable.

   logic:iterate indexId=row ...

 logic:iterate ... length=1 offset='%= row.toString() %'
 /logic:iterate

   /logic:iterate

 Just out of interest - this looks like a solution to iterating through
 multiple collections in parallel - is that what your using it for?

 Niall


 -Original Message-
 From: Rama Krishna [mailto:[EMAIL PROTECTED]]
 Sent: 06 July 2001 18:46
 To: [EMAIL PROTECTED]
 Subject: iterate: offset


 hi all,

 i am trying to iterate with length and offset when length=1 all the time
 and offset gets incremented with each outer iteration.

 i am trying to do something like this

 % int row=0; %
 logic:iterate ...

 logic:iterate ... length=1 offset='%= \+row+\ %'


 % row++; %
 /logic:iterate
 /logic:iterate

 as offset takes an string i am enlosing the int in quotes. no errors, but
 the value remains the same.

 did any one try this.

 any help is greatly appreciated.

 thanks,
 rama.





Re: Cannot find bean in scope null

2001-07-08 Thread Rama Krishna

thanks craig,
it was my mistake. i got it to work.

rama.

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 9:45 PM
Subject: Re: Cannot find bean in scope null




 On Wed, 27 Jun 2001, Rama Krishna wrote:

  i get the same error
 
  Cannot find bean org.apache.struts.taglib.html.BEAN in scope null
because of
  this line
 
  html:text property=Server /
 

 One common cause for this kind of error is if the above statement is *not*
 nested inside an html:form.  As the documentation indicates, that is the
 only legal use for html:text.  But it's impossible to know if this is
 the problem or not, unless you show us the entire page.

 As a side comment, the normal JavaBeans convention is that property names
 start with lower case letters, so you might want to change Server to
 server.  This will get translated into appropriate calls to the
 getServer() or setServer() method of your bean.

 Craig McClanahan


 
 
  - Original Message -
  From: David Winterfeldt [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, June 27, 2001 2:49 PM
  Subject: Re: Cannot find bean in scope null
 
 
   I'm not sure what it is just from the error.  If you
   could you post your JSP, I would look at it.
  
   David
  
   --- Bob Byron [EMAIL PROTECTED] wrote:
I am getting the following error when I try to
process
my user entry form.  Any ideas?  I would like a
general idea of what I should do when I get this
type
of error.
   
Included servlet error: 500
Location: /test/userentry.jsp
Error Location: /test/logon.jsp
Internal Servlet Error:
   
javax.servlet.ServletException: Cannot find bean
org.apache.struts.taglib.html.BEAN in scope null
   
Thank You,
Bob Byron
   
   
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
  
  
   __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo! Mail
   http://personal.mail.yahoo.com/
  
 





iterate: offset

2001-07-06 Thread Rama Krishna



hi all,

i am trying to iterate with length and offset 
when length="1" all the time and offset gets incremented with each outer 
iteration.

i am trying to do something like 
this

% int row=0; %
logic:iterate ...

logic:iterate ... length="1" offset='%= 
"\""+row+"\"" %'


% row++; %
/logic:iterate
/logic:iterate

as offset takes an string i am enlosing the int 
in quotes. no errors, but the value remains the same.

did any one try this.

any help is greatly appreciated.

thanks,
rama.


husted.com

2001-07-05 Thread Rama Krishna



is it down???



html:link problem

2001-07-05 Thread Rama Krishna



is this correct

html:link page="/target.cm" paramId="value" 
paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 (value of 
id)

i get null when i say

req.getParameter("value"); in my action 
class??

any help???

thanks,
rama







Re: html:link problem

2001-07-05 Thread Rama Krishna



yeah, i guess that's the way to do it. i wanted 
to know if there is a way to do it without using jsp.

thanks much,
rama.

  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 05, 2001 1:08 
  PM
  Subject: Re: html:link problem
  
  To the best of knowledge, you can't use the 
  bean:write tag that way. I believe it would be:
  
  html:link page="/target.cm" paramId="value" 
  paramName="%= myCollectionElement.getId() %"click 
  here/html:link
  
  
  Hope this helps...
  
- Original Message ----- 
    From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:09 
PM
Subject: html:link problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my action 
class??

any help???

thanks,
rama







Re: html:link problem

2001-07-05 Thread Rama Krishna



cause it assumes myCollectionElement as a normal 
java Object and says no method getId() in java.lang.Object




  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 05, 2001 1:36 
  PM
  Subject: Re: html:link problem
  
  What doesn't work with that???
  
- Original Message - 
From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:25 
PM
Subject: Re: html:link problem

no. this doesn't work. then i'll have to use 
jsp bean tag and do this.

is there anyother way???



  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:08 
  PM
  Subject: Re: html:link problem
  
  To the best of knowledge, you can't use the 
  bean:write tag that way. I believe it would be:
  
  html:link page="/target.cm" 
  paramId="value" paramName="%= myCollectionElement.getId() 
  %"click here/html:link
  
  
  Hope this helps...
  
- Original Message - 
    From: 
Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:09 
PM
Subject: html:link problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my action 
class??

any help???

thanks,
rama







Re: html:link problem

2001-07-05 Thread Rama Krishna



well, it works. 

thanks 

:))
rama

  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 05, 2001 1:44 
  PM
  Subject: Re: html:link problem
  
  Well, there are a few different ways to handle 
  this. One possible scenario is this:
  
  bean:define id="myId" 
  name="myCollectionElement" property="id"/
  html:link page="/target.cm" paramId="value" 
  paramName="%= myId %"click here/html:link
  
  
  
----- Original Message - 
From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:40 
PM
Subject: Re: html:link problem

cause it assumes myCollectionElement as a 
normal java Object and says no method getId() in 
java.lang.Object




  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:36 
  PM
  Subject: Re: html:link problem
  
  What doesn't work with that???
  
    - Original Message - 
From: 
Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:25 
PM
Subject: Re: html:link 
problem

no. this doesn't work. then i'll have to 
use jsp bean tag and do this.

is there anyother way???



  - Original Message - 
  From: 
  troy hart 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 
  1:08 PM
  Subject: Re: html:link 
  problem
  
  To the best of knowledge, you can't use 
  the bean:write tag that way. I believe it would 
  be:
  
  html:link page="/target.cm" 
  paramId="value" paramName="%= myCollectionElement.getId() 
  %"click here/html:link
  
  
  Hope this helps...
  
- Original Message - 
From: 
Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 
1:09 PM
Subject: html:link 
problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my 
action class??

any help???

thanks,
rama







multiple param's in query string

2001-07-05 Thread Rama Krishna



hi all,

i have multiple params in query string to go when 
clicked on a link.

i have gone through the user archive and found 
that we need to maintain a hashmap sought of thing.

as i have a link in each row, the values differ 
for each link, so i have a vector of hashmaps.

i am able to form the querystring but the problem 
is to iterate thru the vector as this hashmap vector is in another 
iteration.


it is like this


logic:iterate id="myCollectionElement" 
name="buildData" 
property="build" 
tr  logic:iterate 
id="queryCollection" name="buildData" property="query"  --- this will create 
problems   
 td
  
 html:link page="/xxx" 
name="queryCollection" target="new"click/html:link

 
  
/td
 
/logic:iterate
 
td

  
bean:write name="myCollectionElement" 
property="versionNo"/

 
/td
 
 /tr
/logic:iterate


i tried length and offset of iterate but couldn't 
make it work.

has anyone tried this???

thanks,
rama.


Re: html:link problem

2001-07-05 Thread Rama Krishna

Niall ,

does it work for multiple param's??? or if not how do i tackle multiple
params??

thanks,
rama.

- Original Message -
From: Niall Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 4:39 PM
Subject: RE: html:link problem


 Rama,

 Cant you use paramProperty?

 html:link page=/target.cm paramId=value
paramName=myCollectionElement
 paramProperty=idclick here/html:link


 Niall

 -Original Message-
 From: Rama Krishna [mailto:[EMAIL PROTECTED]]
 Sent: 05 July 2001 20:10
 To: [EMAIL PROTECTED]
 Subject: html:link problem


 is this correct

 html:link page=/target.cm paramId=value paramName=bean:write
 name='myCollectionElement' property='id'/click here/html:link

 where myCollectionElement is a  collection
 id is a property in the collection

 and i want  http:///target.cm?value=2 (value of id)

 i get null when i say

 req.getParameter(value); in my action class??

 any help???

 thanks,
 rama





Re: logic:equal simple question

2001-07-03 Thread Rama Krishna

what is we have an index of type int??? how do we refer to it???

means suppose i have % int index=0; %

how can i check this with logic:equal

thanks,
rama


- Original Message - 
From: Norman Timmler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 1:13 PM
Subject: AW: logic:equal simple question


 you can compare a property to an int value, but you have to quote it:
 
 logic:equal name=myForm property=MyProperty value=3
 
 
 -Ursprungliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag
 von gdelgado
 Gesendet: Dienstag, 3. Juli 2001 21:27
 An: [EMAIL PROTECTED]
 Betreff: logic:equal simple question
 
 
  can I use the tag logic:equal name=myForm property=MyProperty
 value=3
 
 in other words can i use an int ?
 
 how about a boolean?
 
 thanks in advance.
 
 Gus
 
 
 



Re: NotEqual or Present?

2001-07-02 Thread Rama Krishna



probably you should use match and notmatch 
tags


logic:notmatch name="myForm" 
property="searchParam" value=""
 show this if property 
"searchParam" is not equal to ""
/logic:notEqual

rama.

  - Original Message - 
  From: 
  Matt 
  Raible 
  To: Struts User 
  Sent: Monday, July 02, 2001 11:17 
AM
  Subject: NotEqual or Present?
  
  I am trying to check if the user entered a value for a 
  search criteria in a results page. My ActionForm sets a propertyto 
  "" if the user did not enter a value.
  
  So in the following code, I want to only show it if the 
  property does not equal "". But the following does not work, should 
  it?
  
  logic:notEqual name="myForm" property="searchParam" 
  value=""
   show this if property "searchParam" is 
  not equal to ""
  /logic:notEqual
  
  Thanks,
  
  Matt


Re: NotEqual or Present?

2001-07-02 Thread Rama Krishna



do you have the set method for property 
'searchParam' in your form bean???

or 

may be it needs a constant instead of a null 
value, but this is not true as it works fine for me.


  - Original Message - 
  From: 
  Matt 
  Raible 
  To: [EMAIL PROTECTED] 
  Sent: Monday, July 02, 2001 11:53 
AM
  Subject: Re: NotEqual or Present?
  
  If I do this, I get the following error - it 
  seems to go away when I put a value in value="put value or space 
  here"
  
  [02/Jul/2001 12:52:02:2] error: Exception: 
  SERVLET-execution_failed: Error in executing servlet resourceList: 
  java.lang.Exception: JSP Error: Setter method not provided for class 
  org.apache.struts.taglib.logic.NotMatchTag, property classException Stack 
  Trace:java.lang.Exception: JSP Error: Setter method not provided for class 
  org.apache.struts.taglib.logic.NotMatchTag, property 
  class at 
  com.netscape.jsp.JSPTree.genAttributeAssignments(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compileUserTag(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compile(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compileUserTag(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compile(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compileUserTag(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compile(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compileUserTag(Unknown 
  Source) at 
  com.netscape.jsp.JSPTree.compile(Unknown 
  Source) at 
  com.netscape.jsp.JSP.compile(Unknown 
  Source) at 
  com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown 
  Source) at 
  com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown 
  Source) at 
  com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown 
  Source) at 
  com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown 
  Source) at 
  com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown 
  Source) at 
  com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown 
  Source) at 
  com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown 
  Source) at 
  com.kivasoft.applogic.AppLogic.execute(Unknown 
  Source) at 
  com.kivasoft.applogic.AppLogic.execute(Unknown 
  Source) at 
  com.kivasoft.thread.ThreadBasic.run(Native 
  Method) at 
  java.lang.Thread.run(Thread.java:479)
  
- Original Message - 
From: 
Rama 
    Krishna 
To: [EMAIL PROTECTED] 

Sent: Monday, July 02, 2001 12:45 
PM
Subject: Re: NotEqual or Present?

probably you should use match and notmatch 
tags


logic:notmatch name="myForm" 
property="searchParam" value=""
 show this if property 
"searchParam" is not equal to ""
/logic:notEqual

rama.

  - Original Message - 
  From: 
  Matt 
  Raible 
  To: Struts User 
  Sent: Monday, July 02, 2001 11:17 
  AM
  Subject: NotEqual or Present?
  
  I am trying to check if the user entered a value for a 
  search criteria in a results page. My ActionForm sets a 
  propertyto "" if the user did not enter a value.
  
  So in the following code, I want to only show it if the 
  property does not equal "". But the following does not work, should 
  it?
  
  logic:notEqual name="myForm" property="searchParam" 
  value=""
   show this if property "searchParam" 
  is not equal to ""
  /logic:notEqual
  
  Thanks,
  
  Matt


Re: Two Problems

2001-07-02 Thread Rama Krishna

do you have parser.jar in ant\lib???


regarding the applicationresources, i don't know what is your application
but try putting it in web-inf\classes
 or if your classes are in a .jar file then add this resources file to that
jar file.
bottom line is it should be somewhere, your appserver can access it.

hope this helps,
rama


- Original Message -
From: Jyothi Palvai [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 4:23 PM
Subject: Two Problems


Hi everyone,
I have two problems, which I am not able to fix. The parser.jar is in my
classpath, my library but when I try to run ant dist, I get the
following error and these classes are in parser.jar. I have checked my
classpath and library many times.

The second problem is the applicationResources is unavailable to the Jsp
file. I have checked the web.xml and the applicationResource path is
right but I am still unable to load it.

Thanks,
Jyothi




  [javadoc] Loading source files for package
org.apache.struts.taglib.template.u
til...
  [javadoc] Loading source files for package org.apache.struts.upload...
  [javadoc] Loading source files for package org.apache.struts.util...
  [javadoc] Constructing Javadoc information...
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\action\Act
ionServlet.java:91: Class org.xml.sax.AttributeList not found in import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\action\Act
ionServlet.java:92: Class org.xml.sax.SAXException not found in import.
  [javadoc] import org.xml.sax.SAXException;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\R
ule.java:66: Class org.xml.sax.AttributeList not found in import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S
etPropertiesRule.java:67: Class org.xml.sax.AttributeList not found in
import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S
etNextRule.java:67: Class org.xml.sax.AttributeList not found in import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S
etPropertyRule.java:67: Class org.xml.sax.AttributeList not found in
import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\C
allParamRule.java:67: Class org.xml.sax.AttributeList not found in
import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\C
allMethodRule.java:67: Class org.xml.sax.AttributeList not found in
import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:76: Class javax.xml.parsers.SAXParser not found in import.
  [javadoc] import javax.xml.parsers.SAXParser;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:77: Class javax.xml.parsers.SAXParserFactory not found in
import.
  [javadoc] import javax.xml.parsers.SAXParserFactory;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:79: Class org.xml.sax.AttributeList not found in import.
  [javadoc] import org.xml.sax.AttributeList;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:80: Class org.xml.sax.DocumentHandler not found in import.
  [javadoc] import org.xml.sax.DocumentHandler;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:81: Class org.xml.sax.EntityResolver not found in import.
  [javadoc] import org.xml.sax.EntityResolver;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:82: Class org.xml.sax.ErrorHandler not found in import.
  [javadoc] import org.xml.sax.ErrorHandler;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:83: Class org.xml.sax.HandlerBase not found in import.
  [javadoc] import org.xml.sax.HandlerBase;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:84: Class org.xml.sax.InputSource not found in import.
  [javadoc] import org.xml.sax.InputSource;
  [javadoc]^
  [javadoc]
C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D
igester.java:85: Class org.xml.sax.Locator not found in import.
  [javadoc] import org.xml.sax.Locator;
  [javadoc]^
  [javadoc]

Re: No ActionForm but want to put html objects inside the form and submit that form ??? is it possible ??

2001-07-01 Thread Rama Krishna



suhas,

i guess you need a html form when you use a 
html:text  if you don't want form then you can use normal html for 
input type text.

rama.

  - Original Message - 
  From: 
  suhas 
  To: [EMAIL PROTECTED] 
  
  Sent: Saturday, July 01, 2000 9:04 
  AM
  Subject: No ActionForm but want to put 
  html objects inside the form and submit that form ??? is it possible ??
  
  Hi 
  Another basic question in Struts -
  
  I have 1 text fields and 1 button on the form . I 
  do not want ActionForm . so my mapping in the struts-config.xml looks like 
  this -
  
   
  actionpath="/seeorders" 
  type="example.order.SeeOrderAction" 
  forward name="success" path="/seeorders.jsp" 
  / /action 
   
  
  In this case I want to show all the orders to the 
  user which matches the string that user enters into the status text field 
  below .
  ** but as I do not have the ActionForm 
  defined using name attribute of action tag , in that case I can not have 
  html:form tag in the jsp file ** 
  
  In this case how will I put html objects like 
  text field , button in the jsp ??? 
  
  
  In menu.jsp file - 
  html:form 
  action="/seeorders.do"
  
  bean:message key="order.status" 
  /html:text property="status" size="10" 
  / 
  // status textfield.
  
  html:submitbean:message 
  key="button.submit" 
  //html:submit/body/html:form/html:html
  
  Regards
  Suhas
  
  


Re: multiple form fields (I HATE CTRL-S )

2001-06-29 Thread Rama Krishna

yes niall, it's name of hindu god. but i am just a human ;-)

pual, did it help you???



- Original Message -
From: Niall Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 28, 2001 8:31 PM
Subject: RE: multiple form fields (I HATE CTRL-S )


 Paul,

 1) The reason you're getting null pointer error for the attribute
indexed
 is because Dave's tags initialise indexed to null - you have to set it
to
 true or false in your jsp.

   i.e.   html:text name=parameter property=value indexed=true/

 2) You seem to be setting up your data incorrectly in your jsp

 Typically an action of yours would run off, get some data and load it into
 your ActionForm which then forward to a jsp to display/edit.

 I'm not sure why you've got it in your jsp, but anyway what you've done
isnt
 right - its creating your vector BUT isntead of putting it in your
 actionForm, your storing it as a page scope parameter under the name
 ParameterList.

 Instead of this:

  pageContext.setAttribute(ParameterList, vin,
PageContext.PAGE_SCOPE);

 You should be doing something like:

  salesordercreateForm.setParameterList(vin);

 My suggestion too keep it simple, take that stuff out of your jsp and put
it
 in the constructor of your ActionForm - then you know its always going to
be
 present (dont have to worry about scope). Anyway as you have it at the
 moment youre always going to have any empty vector - so you wont see
 anything.

 i.e. something like

public class SalesOrderCreateForm extends ActionForm {

public SalesOrderCreateForm() {
  parameterList.add(0,new
 SapValidParameter(orderitemsin_itmnumber,00010));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_material,TEST));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_billdate,2101));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_plant,2000));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_targetqty,1000));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_shorttext,TEST));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_reqdate,2101));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_matlgroup,2000));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_purchdate,2101));
  parameterList.add(0,new
 SapValidParameter(orderitemsin_currency,USD));
}

etc. etc.

 3) Rama Krishna's (isnt he a Hindu God?) put up a reply for you about
Vector
 or Vectors (havent done that flavour myself), so if you can get that
working
 to display your data youre half way there.

 Niall


  -Original Message-
  From: Paul Beer [mailto:[EMAIL PROTECTED]]
  Sent: 29 June 2001 03:35
  To: Struts-User
  Subject: RE: multiple form fields (I HATE CTRL-S )
 
 
 
 
  OK here's my  bad code.  There are two problems Im try to resollve here
:
 
  1) i cant iterate through a vector (how do i give the html tag an
  enumerator
  ???)
  2) even though i rebuilt struts w/tags from husted.com i get a
  null pointer
  error for the attribute indexed
 
  i can get iterations to work with simple ine dimensional arrays,
  but what i
  really want to do is input a grid of data as a vector of vectors.  so
  basically what is below is only a broken half the implementation i
need...
  the other thing i need to know is how to set this data in the
formBean.
  does this method do it :
 
 public void setParameterList(Vector parameterList)
 {
this.parameterList = parameterList;
 }
 
  first here's the errors I am trying to get around :
 
  Attribute 'indexed' not found in tag library 'null' for the tag text.
 
 
  I also get no results form the vector iteration below.
 
 
 
  here's the JSP :
 
 
  html:form
 
{ java.util.Vector vin = new java.util.Vector();
  vin.add(0,new SapValidParameter(orderitemsin_itmnumber,00010));
  vin.add(0,new SapValidParameter(orderitemsin_material,TEST));
  vin.add(0,new
SapValidParameter(orderitemsin_billdate,2101));
  vin.add(0,new SapValidParameter(orderitemsin_plant,2000));
  vin.add(0,new SapValidParameter(orderitemsin_targetqty,1000));
  vin.add(0,new SapValidParameter(orderitemsin_shorttext,TEST));
  vin.add(0,new SapValidParameter(orderitemsin_reqdate,2101));
  vin.add(0,new SapValidParameter(orderitemsin_matlgroup,2000));
  vin.add(0,new
SapValidParameter(orderitemsin_purchdate,2101));
  vin.add(0,new SapValidParameter(orderitemsin_currency,USD));
  pageContext.setAttribute(ParameterList, vin,
  PageContext.PAGE_SCOPE);
 }
 
 
  %
 
 
  ol
logic:iterate id=parameter name=salesordercreateForm
  property=parameterList
 
  html:text name=parameter property=value /
 
/logic:iterate
  /ol
 
  /html:form
 
 
 
 
 
 
  /body
  /html:html
 
 
 
 
  here's the form code :
 
 /**
  * The parameter list
  */
 private Vector parameterList = new Vector();
 
 
 /**
  * Return 

Re: validation

2001-06-29 Thread Rama Krishna

perhaps, you first thought seems to be valid.




- Original Message -
From: Gogineni, Pratima [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 9:44 AM
Subject: RE: validation


 On second thoughts ...I guess if there is some validation common to all
the
 actions its probably better to place it in the actionform even if it means
 looking at information outside the view/form itself?

 -Original Message-
 From: Gogineni, Pratima
 Sent: Friday, June 29, 2001 9:41 AM
 To: '[EMAIL PROTECTED]'
 Subject: validation


 Hi,

 I have a design question about validation in struts. So far I had been
doing
 most of my validation in my action classes rather than in my actionform.

 I was just looking into moving some of the validation into the validate
 method of the action form and find that I have to access some information
in
 the servlet context to do this since the action form itself does not have
 all the information to do the complete validation.

 I was thinking that this has a couple of problems -
 1. performance since I have to access the same info again in the action
 classes.
 2. I feel it is messy because I am making my actionform which is just a
 piece/view of the whole picture access information that is outside the
view
 itself ...

 All of the above leads me to believe that most of the heavy duty
validation
 should happen in the action class. The actionform only does some minor
 validation like maybe checking for null (basically just using the
 information it knows).

 I which case should we not have a validate method in the action classes
too?

 Please let me know if I am missing something / got something wrong ...

 Thanks
 Pratima




problems with iteration

2001-06-29 Thread Rama Krishna




hi all,

this is my jsp code and i want to display this 
vector of vectors in text fields with each inner vector in a row and each 
element in innervector in a textfield

can anyone tell me how do i do 
this???

logic:iterate id="outer" name="myBean" 
property="records"
logic:iterate id="inner" 
name="outer" 
html:text name="inner" 
property="value"//logic:iterate/logic:iterate


thanx,
rama


Re: multiple form fields (I HATE CTRL-S )

2001-06-29 Thread Rama Krishna

i do have the same problem. i can get to display it with bean:write but
struck up when displaying in text fields.
can anyone help us???


- Original Message -
From: Paul Beer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 12:26 PM
Subject: RE: multiple form fields (I HATE CTRL-S )



 i got it all compiled.  i think it wasnt compiling just becasue there were
 older versions of some of the java files.. versionitis.

 anyway, Ive got a vector iteration working, but I am still struggling
 getting the vector values to display in the html tag.
 i get a Unable to Find Method error.  Is the property=value setting
 accessing the vector object getValue() method?  This is the part that
seems
 to be broken.

 thanks for any help you can give.

 -paul



 

  here is my code :

 SapValidParameter :

 String FieldName = new String();
 String FieldValue = new String();

   public SapValidParameter(String f, String v) { FieldName = f; FieldValue
=
 v; }

   public String getValue() {return FieldName; }
   public String getName()  {return FieldValue; }
   public String toString() {return FieldName; }

   }
 formbean:

  private Vector parameterList = new Vector();


 public SalesOrderCreateForm() {
  parameterList.add(0,new
 SapValidParameter(orderitemsin_itmnumber,00010));
  parameterList.add(1,new
 SapValidParameter(orderitemsin_material,TEST));
  parameterList.add(2,new
 SapValidParameter(orderitemsin_billdate,2101));
  parameterList.add(3,new
 SapValidParameter(orderitemsin_plant,2000));
  parameterList.add(4,new
 SapValidParameter(orderitemsin_targetqty,1000));
  parameterList.add(5,new
 SapValidParameter(orderitemsin_shorttext,TEST));
  parameterList.add(6,new
 SapValidParameter(orderitemsin_reqdate,2101));
  parameterList.add(7,new
 SapValidParameter(orderitemsin_matlgroup,2000));
  parameterList.add(8,new
 SapValidParameter(orderitemsin_purchdate,2101));
  parameterList.add(9,new
 SapValidParameter(orderitemsin_currency,USD));
}




/**
 * Return the list of parameters
 */
public Vector getParameterList()
{
   return(this.parameterList);
}

   public String getParameters()
{
   return(this.parameterList.toString());
}

/**
 * Set the list of parameters
 *
 * @param parameterList The new list
 */
public void setParameterList(Vector parameterList)
{
   this.parameterList = parameterList;
}

/**
 * Get a particular parameter from the parameterList, based on index
 *
 * @param   index The index of the parameter to retrieve
 */
public SapValidParameter getParameter(int index)
{
   return (SapValidParameter)parameterList.elementAt(index);

}



 JSP:

   logic:iterate id=parameter name=salesordercreateForm
 property=parameterList
 html:text name=parameter property=value indexed=true /
 /logic:iterate



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 29, 2001 10:06 AM
 To: [EMAIL PROTECTED]
 Subject: RE: multiple form fields (I HATE CTRL-S )




 Hi Paul.  Just got in (tied up this am).

 Agree with everything that Niall said.  Just wanted to confirm that you
 don't
 get an error when you actually BUILD Struts?  ie you get the error when
you
 try
 and use the tag, and check that you have copied the struts-html.tld into
 your
 directory too?

 Let me know if you still have probs.

 Dave

 PS  Don't worry about asking the qu's - can all be quite confusing to
start
 with!!





 Niall Pemberton [EMAIL PROTECTED]
on
 06/28/2001 11:31:28 PM

 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED],
   [EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: multiple form fields (I HATE CTRL-S )



 Paul,

 1) The reason you're getting null pointer error for the attribute
indexed
 is because Dave's tags initialise indexed to null - you have to set it
to
 true or false in your jsp.

   i.e.   html:text name=parameter property=value indexed=true/

 2) You seem to be setting up your data incorrectly in your jsp

 Typically an action of yours would run off, get some data and load it into
 your ActionForm which then forward to a jsp to display/edit.

 I'm not sure why you've got it in your jsp, but anyway what you've done
isnt
 right - its creating your vector BUT isntead of putting it in your
 actionForm, your storing it as a page scope parameter under the name
 ParameterList.

 Instead of this:

  pageContext.setAttribute(ParameterList, vin,
PageContext.PAGE_SCOPE);

 You should be doing something like:

  salesordercreateForm.setParameterList(vin);

 My suggestion too keep it simple, take that stuff out of your jsp and put
it
 in the constructor of your ActionForm - then you know its always going to
be
 

Re: directly invoke action class

2001-06-28 Thread Rama Krishna



sorry all,

i got it.

thanx.

  - Original Message - 
  From: 
  Rama 
  Krishna 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, June 28, 2001 11:16 
  AM
  Subject: directly invoke action 
  class
  
  hi all,
  
  i want to directly invoke the action class with 
  out submitting a form. to do this i directed by browser to *.do where 
  *maps to action class. the action class then should load the form class 
  with some data and forward to a success page. the success page then uses the 
  bean:write and writes the property from the form.
  
  but i get an error 500 internal server error in 
  browser and 
  
  my jrun log says "No input form, but validation 
  returned errors".
  
  however i have given validate=false in my 
  action mapping.
  
  any thoughts??
  
  thanx,
  rama


iterate vector of vectors

2001-06-28 Thread Rama Krishna



hi,

can anyone tell me how to iterate a vector of 
vectors??

thanx,
rama.


Re: iterate vector of vectors

2001-06-28 Thread Rama Krishna

cool thanx. it works.



- Original Message - 
From: John Raley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 28, 2001 12:00 PM
Subject: Re: iterate vector of vectors


 logic:iterate name='vectorVector' id='simpleVector'
logic:iterate name='simpleVector'
...
/logic:iterate
 /logic:iterate
 
 Rama Krishna wrote:
 
  hi,
 
 
 
  can anyone tell me how to iterate a vector of vectors??
 
 
 
  thanx,
 
  rama.
 
 
 
 
 



variable column width in iteration

2001-06-28 Thread Rama Krishna



 hi all,

i want to setvariable column width in the 
table while doing iteration, the problem is i am doing iteration for 
vector of vectors.



logic:iterate id="myCollectionElement" 
name="indexPage" 
property="records" tr 
logic:iterate id="collectionElement" 
name="myCollectionElement" td width="24%"div align="center"font size="2" 
face="Verdana, Arial, Helvetica, sans-serif" 
color="#99" 
bean:write name="collectionElement" 
/
/font/div/td/logic:iterate/tr


thanx.
rama


No Bean found under attribute key

2001-06-27 Thread Rama Krishna



Hi all,

I am new to struts and i created a simple jsp and 
all along with proper modifications to struts-config.xml and when i try to run 
my jsp i get the above exception.


Can anyone tell me what could be the 
cause???


here is my code 

.jsp

logic:equal name="indexPage" 
property="action" scope="request" 
value="Display" html:text 
property="server" size="16" 
maxlength="16"/ 
/logic:equal


.xml

action 
path="/indexPage" 
type="com.niku.cm.IndexPageAction" forward 
name="success" path="/index.jsp"/ 
forward name="failure" path="/nodata.jsp"/ 
/action


thanks,
rama


working with reports

2001-06-27 Thread Rama Krishna



hi,

i want to display records from database in a 
tabular format in index.jsp itself without any form submission.

can anyone tell me how to do this.


thanx.
rama.


Re: working with reports

2001-06-27 Thread Rama Krishna

thanks david,

in this case as i will not have any actionform, should i have the getter
method inside the actionclass or is there another  way.
if possible can you give me some snippets like the one you've given.

thanx,
rama.


- Original Message -
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 2:33 PM
Subject: Re: working with reports


 You can either have a collection of collections or
 have a collection of an object that represents a row
 like this example.

 logic:iterate id=searchResults
 name=com.forbes.cms.botw.search
tr bgcolor=#ff
   td nowrapbean:write name=searchResults
 property=name//td
   tdbean:write name=searchResults
 property=description//td
/tr
 /logic:iterate


 David

 --- Rama Krishna [EMAIL PROTECTED] wrote:
  hi,
 
  i want to display records from database in a tabular
  format in index.jsp itself without any form
  submission.
 
  can anyone tell me how to do this.
 
 
  thanx.
  rama.
 


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/




Re: Cannot find bean in scope null

2001-06-27 Thread Rama Krishna

i get the same error

Cannot find bean org.apache.struts.taglib.html.BEAN in scope null because of
this line

html:text property=Server /



- Original Message -
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 2:49 PM
Subject: Re: Cannot find bean in scope null


 I'm not sure what it is just from the error.  If you
 could you post your JSP, I would look at it.

 David

 --- Bob Byron [EMAIL PROTECTED] wrote:
  I am getting the following error when I try to
  process
  my user entry form.  Any ideas?  I would like a
  general idea of what I should do when I get this
  type
  of error.
 
  Included servlet error: 500
  Location: /test/userentry.jsp
  Error Location: /test/logon.jsp
  Internal Servlet Error:
 
  javax.servlet.ServletException: Cannot find bean
  org.apache.struts.taglib.html.BEAN in scope null
 
  Thank You,
  Bob Byron
 
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/




Re: working with reports

2001-06-27 Thread Rama Krishna

thanx david, i guess i should do so.
one more question, do you have any idea why No bean found under attribute
key

thanks,

- Original Message -
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 3:08 PM
Subject: Re: working with reports


 My example was reusing my ActionForm just to hold my
 search results for each row and then putting the
 ActionForm in a Collection.  Since you don't have a
 corresponding ActionForm I would make a simple bean to
 hold the search data with the appropriate
 getters/setters and use that instead of the
 ActionForm.

 David

 --- Rama Krishna [EMAIL PROTECTED] wrote:
  thanks david,
 
  in this case as i will not have any actionform,
  should i have the getter
  method inside the actionclass or is there another
  way.
  if possible can you give me some snippets like the
  one you've given.
 
  thanx,
  rama.
 
 
  - Original Message -
  From: David Winterfeldt [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, June 27, 2001 2:33 PM
  Subject: Re: working with reports
 
 
   You can either have a collection of collections or
   have a collection of an object that represents a
  row
   like this example.
  
   logic:iterate id=searchResults
   name=com.forbes.cms.botw.search
  tr bgcolor=#ff
 td nowrapbean:write name=searchResults
   property=name//td
 tdbean:write name=searchResults
   property=description//td
  /tr
   /logic:iterate
  
  
   David
  
   --- Rama Krishna [EMAIL PROTECTED] wrote:
hi,
   
i want to display records from database in a
  tabular
format in index.jsp itself without any form
submission.
   
can anyone tell me how to do this.
   
   
thanx.
rama.
   
  
  
   __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo! Mail
   http://personal.mail.yahoo.com/
  


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/




Re: working with reports

2001-06-27 Thread Rama Krishna

Ryan,

your idea seems to be good. fairly simple than struts. but i have so many
pages like that and driver and database connections inside jsp doesn't seem
to be a good idea.

thanks though,

rama.

- Original Message -
From: Ryan Cornia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 2:50 PM
Subject: Re: working with reports


I also would take a look at the DBTags library in the Jakarta project. This
works very well for displaying data from a db, and is less complex than
struts. If your not processing forms, it may be the best way to go...

Ryan


 [EMAIL PROTECTED] 06/27/01 03:33PM 
You can either have a collection of collections or
have a collection of an object that represents a row
like this example.

logic:iterate id=searchResults
name=com.forbes.cms.botw.search
   tr bgcolor=#ff
  td nowrapbean:write name=searchResults
property=name//td
  tdbean:write name=searchResults
property=description//td
   /tr
/logic:iterate


David

--- Rama Krishna [EMAIL PROTECTED] wrote:
 hi,

 i want to display records from database in a tabular
 format in index.jsp itself without any form
 submission.

 can anyone tell me how to do this.


 thanx.
 rama.



__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/





Re: No Bean found under attribute key

2001-06-27 Thread Rama Krishna

thanx much martin,
html:form action=indexPage
html:text name=indexPage  property=Server /
/html:form
is it possible to have this one line instead of logic:equal, because it is
my index page and i want to get some data from the actionclass without any
form submission.

and when i changed my jsp like above i am getting new error

No getter method for property Server of bean indexPage but i have
getServer(),setServer() inside my IndexPage class.

rama.


- Original Message -
From: Martin Cooper [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 5:24 PM
Subject: Re: No Bean found under attribute key


 In your logic:equal tag, you are using 'name' and 'property'. In your
 html:text tag, you are using only 'property'. The second case will work
 only if this code is inside an html:form tag and the form bean has a
 property with that name.

 --
 Martin Cooper


 - Original Message -
 From: Rama Krishna [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 27, 2001 12:06 PM
 Subject: No Bean found under attribute key


 Hi all,

 I am new to struts and i created a simple jsp and all along with proper
 modifications to struts-config.xml and when i try to run my jsp i get
 the above exception.


 Can anyone tell me what could be the cause???


 here is my code

 .jsp

 logic:equal name=indexPage property=action scope=request
 value=Display
 html:text property=server size=16 maxlength=16/
   /logic:equal


 .xml

 actionpath=/indexPage
type=com.niku.cm.IndexPageAction
   forward name=success path=/index.jsp/
   forward name=failure path=/nodata.jsp/
 /action


 thanks,
 rama