Re: Dynamic Tree

2002-02-25 Thread Konstantina Stamopoulou

Hello,
I needed to do something similar and I found another tag lib that can be
used in combination with Struts. You can find more on this site---
http://www.kobrix.com .

Konstantina

- Original Message -
From: luvpdas [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, February 23, 2002 11:53 PM
Subject: Dynamic Tree


 Hi ,
 I am totally new to struts and I am looking for something that will
enable
 me to
 have a Selection Tree on the leftside, in a table and keyboard accessible.
When

 I click on a node on the tree I want it to expand automatically.  I need
to
 support
 Netscape 4.0+ and IE 4.0+.  Does anyone know if there is such support from
 Struts.

 Thanks


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




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




RE: Development Environment

2002-02-25 Thread Chris Birch

yep, it supports jsp's and has great support for XML, also dozens of other
languages as it's totally configurable and if you cant configure it, you can
write a plugin module to do what you want!  I've been planning to write some
modules to support struts development, just haven't had the time yet... :(

Chris.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 22 February 2002 19:24
To: Struts Users Mailing List
Subject: Re: Development Environment



does it have support for jsp's?

Dave





John M. Corro [EMAIL PROTECTED] on 02/21/2002 02:11:39 PM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Development Environment


Glad to see someone else using JEdit.  Thought I was the lone sole.

- Original Message -
From: Chris Birch [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 1:07 PM
Subject: RE: Development Environment


 Jedit and make on Solaris at work.
 Apple ProjectBuilder at home with Ant (great for C and Apple only Java,
OK
 ish for straight forward java).

 Best team IDE I've ever used is Visual Age for Java, drop the visual bits
 and its outstanding.  Can easily view class in their package hierarchy or
 class hierarchy, or a list of classes that reference your current class.
 Incremental compiler, excellent debugger, command lookup and
completion...
 the list goes on...

 Eclispe is open source and free (eclipse.org) and smells like Visual Age
for
 Java, even looks like it... so it must be...

 Regards,
 Chris.

 -Original Message-
 From: Dave Wellman [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2002 17:41
 To: [EMAIL PROTECTED]
 Subject: Development Environment


 Hello,

 Quick question, what is the preferred development environment that you
are
 all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


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


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





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








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


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




RE: Help on WebSphere installation

2002-02-25 Thread Patrick Logé

It was on the archive part of the JAXP download site 
But I saved it here

Http://www.plog.net/Struts-jaxp-1_0_1.zip

-Original Message-
From: Ben Liang [mailto:[EMAIL PROTECTED]]
Sent: vendredi 22 février 2002 18:41
To: Struts Users Mailing List
Subject: Re:Help on WebSphere installation


I am trying to install Struts under WS 3.5.4, but could not find a correct
version of xerces.jar to get it work. I downloaded
java_xml_pack-winter-01_01-dev which include JAXP 1.2, and put the
xerces.jar under WS /servlets. And I get this error from the log:

[02.02.22 11:26:24:062 CST] ecd486c1 WebGroup  A SRVE0092I: [Servlet
LOG]: database: Database load exception:
org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/raw-names
 at org.xml.sax.SAXException.init(SAXException.java:45)
 at
org.xml.sax.SAXNotRecognizedException.init(SAXNotRecognizedException.java:
38)
 at
org.apache.xerces.parsers.AbstractSAXParser.setFeature(AbstractSAXParser.jav
a:1289)
 at
org.xml.sax.helpers.XMLReaderAdapter.setupXMLReader(XMLReaderAdapter.java:20
4)
 at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:193)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at org.apache.struts.digester.Digester.parse(Digester.java:755)
 at
org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.java:2
51)

Then I try to put another version of xerces.jar that I've been using to
replace the one come from Sun, and I got another error:
[02.02.22 10:57:32:125 CST] ecf40f0d ServletInstan X Uncaught init()
exception thrown by servlet {0}: {1}
 action
 javax.servlet.ServletException:
org.apache.xerces.dom.NodeImpl: method
init(Lorg/apache/xerces/dom/DocumentImpl;)V not found

The doc said I need JAXP1.0.1, but I can't find from Sun's site anymore. Any
suggestion???

Ben


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


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




Re: Development Environment

2002-02-25 Thread Chuck Amadi

Jonathan James wrote:

Windows 2000, cygwin  vim

- Original Message -
From: Dave Wellman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 11:41 AM
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]

For additional commands, e-mail:

mailto:[EMAIL PROTECTED]





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

Hi i am using M$Win 98 , WordPad, Tomcat 3.3.a and Tomcat 4.0.2 
,Netbeans 3.1.1 IDE
On my Linux RH v7.1 Box ,Netbeans 3.1.1 IDE, Emacs (gedit),Tomcat-4.0.2



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




RE: ActionForm scoping problems?

2002-02-25 Thread Robert Nocera

This could be off-base, but I think you'll have better results if you
change the case of your form-bean variable name from BillingIDForm to
billingIDForm.  I think it may be using a static class BillingIDForm
and not creating an instance of the class.  Change all references on the
JSP page to billingIDForm and the form-bean name=billingIDForm ...

I know I had a similar problem a while back and it seemed that making
that change fixed it.

Robert Nocera
New England Open Solutions
www.neosllc.com
You supply the vision, we'll do the rest.
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 24, 2002 6:02 PM
To: Struts Users Mailing List
Subject: ActionForm scoping problems?


I have an action as such:
---
action
path=/enterBillingEdit
type=express.BillingIDActionForm
name=BillingIDForm
 Rest omitted to save space
---
and the form definition of:

form-bean name=BillingIDForm type=express.BillingIDForm scope
=request/

And I have an entry point JSP which invokes actions and such

I have a post
My BillingIDActionForm action simply loads data into the BillingIDForm
and
saves an attribute in it.

The BillingIDActionForm::perform() then
calls return (mapping.findForward(success));

Where success maps to:
forward name=success path=/BillIDForm.jsp/

The submit for BillIDForm.jsp is html:form action
=/handleBillingIDSubmit.do
where handleBillingIDSubmit maps to:
action
path=/handleBillingIDSubmit
type=express.BillingIDFormSubmitAction
name=BillingIDForm
scope=request
---

In the perform method for: BillingIDFormSubmitAction,
public ActionForward perform(ActionMapping mapping,  ActionForm
form,
etc..)
when I retrieve the variable form and cast it to: BillingIDForm, the
value
I set in the previous action is completely gone.   In this case, it's
back
to null which tells me that a new instance of the BillingIDForm was
created in-between my last action this action.  I thought the
whole
purpose of request scope was to retain the same instance of a form or
bean all the way thru from the entry request to the end of the
request
It does not appear to be the case...

Is there any other decent examples or explanations on when form
variables
descope themselves between requests?If I go and change all of my
scope attributes in the struts.config.xml to session, my application
works fine.Trouble is that I want it to work with request scope.
I
think I am definitely missing a key point here somewhere!

I'm sorry, but I'm just not getting it  :-)

thanks,
Theron















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


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




Re: i18n - Escape Codes....

2002-02-25 Thread Louis Leung

is your jsp pages encoded in the native encoding ?  or unicode encoding ?

Rustad, Aaron wrote:

 I am trying i18n my application by adding a Resources_ru.properties, and it
 seems to work. However, I can not get the Unicode characters to work
 correctly.


 I have looked at HP's example, and they use unicode escapes for their
 messagesis there an easy way to convert Strings to Unicode strings?

 Thanks for your help!
 Aaron.

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


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




Re: i18n and bean:write

2002-02-25 Thread Louis Leung

More on char encoding and i18n :

http://tagunov.newmail.ru/i18n/i18n.html

Rustad, Aaron wrote:

 I have a logon page that is internationalized and working correctly. I did
 this by changing the html header information to work with UTF-8 and I set
 the @ page contentType to work with utf-8 and I put in a html:html
 locale=true as well.

 Now my Russian characters are displayed as expected. However, when I logon,
 the resulting pages are not displaying the user name and password in the
 Russian Character set as I thought they would (looks more like garbage
 actually) even though I set up the pages to work with UTF-8.

 Any Ideas why this would be happening? When I submit the form and the user
 name and password are populated in the ActionForm, is Java confused about
 the encoding?

 Any help is greatly appreciated!
 Thanks!
 Aaron.

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


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




How to validate the xml witht the dtd in the action class

2002-02-25 Thread Yugandhar_Reddy

HI,

Can anyone tell me how to validate an XML with the DTD in the Action Class.

Can u quote a small example for this?
or suggest a doc which explains this ??

Thanks in advance,
YUg


***
This e-mail (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or  copying or
distribution or forwarding of any or all of the  contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipeint,please contact
the sender by e-mail and delete all copies; your co-operation in this regard
is appreciated.


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




Internationalized sites with struts

2002-02-25 Thread Juan Alvarado

Hello all:

I am in the process of developing a struts based web site that will need to
have an english and spanish version. Can anyone tell me which are the
features in struts that would allow me to accomplish this. Any sample code
would also be greatly appreciated.

Thanks in advance,

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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




Re: best practices for logging in

2002-02-25 Thread Andre Beskrowni

note that you can now combine the best aspects of versions 2  3 (2 involves 
just struts, 3 allows xml configuration) by using the declarative exception 
handling in the nightly build.  in your Action superclass, just throw an 
exception if the user fails the authentication test, and trap for the 
exception in the struts-config.

you could also do the same thing by returning a forward if the 
authentication failed, but i like the exception model better because if you 
misconfigure your app, at least you'll see the exception thrown, whereas 
misconfiguring a forward may not be as explicit.

the one plus here, is that all of your app's configuration is in the 
struts-config, which could save some headaches if you deploy the app on to 
several different servlet containers.

ab

2. Extend Struts' Action class to your own *abstract* class, which adds
the (unimplemented method) boolean requiresLogon(). All of your
actions should extend this abstract class, and implement their own
requiresLogon() method which simply returns true or false. Then, in
the base class's perform() method, you can call requiresLogon(), and if
true, then test for logged-inness. Lastly, you can call the derived
class's real perform method, which actually you'll have to rename to,
myPerform or something slightly different. This is a cleaner approach
than #1 but still a bit messy. I've used this approach for both
requiresLogon(), and requiresDatabase() (in which case I establish
and break down a connection, all in one place). My preference is now #3,
below.

3. Don't use Struts at all for your login check. Instead, use Servlet
Filters (requires a Servlet 2.3 container such as Tomcat 4.0). Implement
a filter (they're simple, really!) which checks for logged-inness, and
if false, then redirects to some login page. This has a clear advantage
in that it separates security checking from the code of your Actions. In
addition, it has a clear advantage in that it's declarative at the
configuration file (XML) level, rather than embedded in your code. By
that I mean, in the web.xml file, you specify which URL's (or which
patterns of URL's) the filter applies to, rather than embedding this in
your actual Java code. My favorite approach to this kind of thing.


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


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




RE: dynamic input fields

2002-02-25 Thread Press, Michael


 I could be mistaken, but isn't this basically what the recently added 
 Dynamic Action Form does?

What's the recently added Dynamic Action Form !?


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 24, 2002 1:12 PM
To: [EMAIL PROTECTED]
Subject: Re: dynamic input fields


 Michael == Michael Press Press writes:

Michael I just did this.  I based my solution on the Dynamic Properties
solution by
Michael Kevin Wang
Michael
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01374.html),
Michael but I needed to do it without modifying/extending Struts
itself.

Michael I created a BaseActionForm that my ActionForms extend.  The
Base class has a
Michael method that takes the HTTP request, and for each parameter in
the request
Michael that doesn't have a setter method in the form (determined via
reflection),
Michael it adds it to a hashtable.  It also provides methods to
retrieve the
Michael hashtable or one named dynamic property.

Michael Then, my Action classes first call
form.setDynamicMethods(request), and then
Michael they can retrieve the parameters from the known getter methods
or from
Michael getDynamicProperty() or getDynamicProperties().

I could be mistaken, but isn't this basically what the recently added
Dynamic
Action Form does?

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


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




AW: Internationalized sites with struts

2002-02-25 Thread Oliver Reflé

If you want to display localized messages you have to create for each
language an
ApplicationRessources_de.properties
test=Das ist ein Test
ApplicationRessources.properties
test=This is a test


_de here is the locale

Then you can print you text with
bean:message key=test/

Struts then looks into the sesion if there is an Locale Object stored
with key Actions.LOCALE_KEY and takes the correct ressource bundle.

(manually you can get it with
request.getSession().getAttribute(Action.LOCALE_KEY)

Hope that helps

-Ursprüngliche Nachricht-
Von: Juan Alvarado [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 25. Februar 2002 16:07
An: Struts Users Mailing List
Betreff: Internationalized sites with struts


Hello all:

I am in the process of developing a struts based web site that will need to
have an english and spanish version. Can anyone tell me which are the
features in struts that would allow me to accomplish this. Any sample code
would also be greatly appreciated.

Thanks in advance,

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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


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




Form Bean problem

2002-02-25 Thread Tim Sawyer

Hello.

I'm calling a JSP page as the successful outcome of an action, and it's complaining 
that one of my get methods doesn't exist.  I can't work out what's going on, can 
someone give me a nudge in the right direction?

The page contains a form, for entering date of birth and marital status (for now, I'm 
still messing with a test project).  If I define no form bean for this action, I get 
an error saying it can't find the getter method.  If I define the form bean and leave 
the Validate() method checking for nulls, I get validation errors (correctly).  If I 
remove the validation code, then I get the getter method not found error again.
Surely I shouldn't have to define the form bean at all?  

Is there any reference to the flow of methods called between a call to a do and 
displaying a success JSP anywhere?

--Action Mapping--

actionpath=/callExtraPersonDetails
   
type=com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPreAction
   name=addExtraPersonDetailsForm
  scope=session
  input=/AddFindParty/FindPartyResults.jsp
  forward name=success path=/ExtraCustomerDetails.jsp/

ExtraCustomerDetails.JSP --

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html:html
head
titleUntitled Document/title
/head

body bgcolor=#FF text=#00
pPlease enter the following customer details: /p
html:errors/
html:form action=/saveExtraPersonDetails.do focus=maritalStatusID
  table width=39% border=0
tr
  td width=24%Date of Birth:/td
  td width=76%
html:text property=dob size=30/
  /td
  td width=24%Marital status:/td
  td width=76%
html:text property=maritalStatusID size=30/
  /td
/tr
tr
  td width=24%nbsp;/td
  td width=76%
html:submit
  bean:message key=button.submit/
/html:submit
html:reset
  bean:message key=button.reset/
/html:reset
  /td
/tr
  /table
/html:form
pnbsp; /p
/body
/html:html

-Form 
Bean--
public class AddExtraPersonDetailsForm extends AbstractActionForm
{
  private String dob = null;
  private String maritalStatusID = null;
  
  
  /** Creates a new instance of Class */
  public AddExtraPersonDetailsForm()
  {
  }
  
  
  /** Getter for property maritalStatusID.
   * @return Value of property maritalStatusID.
   */
  public java.lang.String getMaritalStatusID()
  {
return maritalStatusID;
  }
  
  /** Setter for property maritalStatusID.
   * @param maritalStatusID New value of property maritalStatusID.
   */
  public void setMaritalStatusID(java.lang.String maritalStatusID)
  {
this.maritalStatusID = maritalStatusID;
  }
  
  /** This method is called when the user submits the form.  It should validate the
   * data that has been entered for mandatory variables etc.
   */
  protected ActionErrors onValidate(ActionMapping mapping, HttpServletRequest request)
  {
ActionErrors lErrors = new ActionErrors();

//this.checkMandatory(lErrors, this.dob, dob, 
addFindPartyModule.errors.dobMissing);
//this.checkMandatory(lErrors, this.maritalStatusID, maritalStatusID, 
addFindPartyModule.errors.maritalStatusIDMissing);

return lErrors;
  }
  
  /** This method is called when the user pushes the Reset button on the form.
   * It should assign all of the fields on the form null.
   */
  protected void onReset(ActionMapping mapping, HttpServletRequest request)
  {
//this.dob = null;
//this.maritalStatusID = null;
  }
  
  /** Getter for property dob.
   * @return Value of property dob.
   */
  public java.lang.String getDob()
  {
return dob;
  }
  
  /** Setter for property dob.
   * @param dob New value of property dob.
   */
  public void setDob(java.lang.String dob)
  {
this.dob = dob;
  }

--Top of Error 
stack--

javax.servlet.jsp.JspException: No getter method for property dob of bean 
org.apache.struts.taglib.html.BEAN
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517)
at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
at /ExtraCustomerDetails.jsp._jspService(/ExtraCustomerDetails.jsp.java:70) 
(JSP page line 17)
at com.orionserver[Orion/1.5.2 (build 
10460)].http.OrionHttpJspPage.service(Unknown Source)


cheers,

Tim.






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




RE: i18n - Escape Codes....

2002-02-25 Thread Drew Sudell



 -Original Message-
 From: Rustad, Aaron [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 24, 2002 4:01 AM
 To: '[EMAIL PROTECTED]'
 Subject: i18n - Escape Codes
 
 
 I am trying i18n my application by adding a 
 Resources_ru.properties, and it
 seems to work. However, I can not get the Unicode characters to work
 correctly.
  
 
 I have looked at HP's example, and they use unicode escapes for their
 messagesis there an easy way to convert Strings to 
 Unicode strings?
 
http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html


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




Re: Form Bean problem

2002-02-25 Thread dderry

Do you have an Action Mapping for saveExtraPersonDetails.do? Does it use
also use addExtraPersonDetailsForm? Do you have a   form-beans
form-bean  name=addExtraPersonDetailsForm
type=package.addExtraPersonDetailsForm/./form-beans entry in
struts-config.xml?

It appears to me that the addExtraPersonDetailsForm is not being used since
the error msg states that org.apache.struts.taglib.html.BEAN has no getter
method for dob.



- Original Message -
From: Tim Sawyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 10:41 AM
Subject: Form Bean problem


 Hello.

 I'm calling a JSP page as the successful outcome of an action, and it's
complaining that one of my get methods doesn't exist.  I can't work out
what's going on, can someone give me a nudge in the right direction?

 The page contains a form, for entering date of birth and marital status
(for now, I'm still messing with a test project).  If I define no form bean
for this action, I get an error saying it can't find the getter method.  If
I define the form bean and leave the Validate() method checking for nulls, I
get validation errors (correctly).  If I remove the validation code, then I
get the getter method not found error again.Surely I shouldn't have to
define the form bean at all?

 Is there any reference to the flow of methods called between a call to a
do and displaying a success JSP anywhere?

 --Action Mapping--

 actionpath=/callExtraPersonDetails

type=com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPre
Action
name=addExtraPersonDetailsForm
   scope=session
   input=/AddFindParty/FindPartyResults.jsp
   forward name=success path=/ExtraCustomerDetails.jsp/

 ExtraCustomerDetails.JSP --

 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 html:html
 head
 titleUntitled Document/title
 /head

 body bgcolor=#FF text=#00
 pPlease enter the following customer details: /p
 html:errors/
 html:form action=/saveExtraPersonDetails.do focus=maritalStatusID
   table width=39% border=0
 tr
   td width=24%Date of Birth:/td
   td width=76%
 html:text property=dob size=30/
   /td
   td width=24%Marital status:/td
   td width=76%
 html:text property=maritalStatusID size=30/
   /td
 /tr
 tr
   td width=24%nbsp;/td
   td width=76%
 html:submit
   bean:message key=button.submit/
 /html:submit
 html:reset
   bean:message key=button.reset/
 /html:reset
   /td
 /tr
   /table
 /html:form
 pnbsp; /p
 /body
 /html:html

 -Form
Bean--
 public class AddExtraPersonDetailsForm extends AbstractActionForm
 {
   private String dob = null;
   private String maritalStatusID = null;


   /** Creates a new instance of Class */
   public AddExtraPersonDetailsForm()
   {
   }


   /** Getter for property maritalStatusID.
* @return Value of property maritalStatusID.
*/
   public java.lang.String getMaritalStatusID()
   {
 return maritalStatusID;
   }

   /** Setter for property maritalStatusID.
* @param maritalStatusID New value of property maritalStatusID.
*/
   public void setMaritalStatusID(java.lang.String maritalStatusID)
   {
 this.maritalStatusID = maritalStatusID;
   }

   /** This method is called when the user submits the form.  It should
validate the
* data that has been entered for mandatory variables etc.
*/
   protected ActionErrors onValidate(ActionMapping mapping,
HttpServletRequest request)
   {
 ActionErrors lErrors = new ActionErrors();

 //this.checkMandatory(lErrors, this.dob, dob,
addFindPartyModule.errors.dobMissing);
 //this.checkMandatory(lErrors, this.maritalStatusID,
maritalStatusID, addFindPartyModule.errors.maritalStatusIDMissing);

 return lErrors;
   }

   /** This method is called when the user pushes the Reset button on the
form.
* It should assign all of the fields on the form null.
*/
   protected void onReset(ActionMapping mapping, HttpServletRequest
request)
   {
 //this.dob = null;
 //this.maritalStatusID = null;
   }

   /** Getter for property dob.
* @return Value of property dob.
*/
   public java.lang.String getDob()
   {
 return dob;
   }

   /** Setter for property dob.
* @param dob New value of property dob.
*/
   public void setDob(java.lang.String dob)
   {
 this.dob = dob;
   }

 --Top of Error
stack--

 javax.servlet.jsp.JspException: No getter method for property dob of bean
org.apache.struts.taglib.html.BEAN
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517)
 at

Re: Form Bean problem

2002-02-25 Thread Tim Sawyer

Dderry [EMAIL PROTECTED] wrote :

 Do you have an Action Mapping for saveExtraPersonDetails.do? 

Yes:

actionpath=/saveExtraPersonDetails
   
type=com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPostAction
   name=addExtraPersonDetailsForm
  scope=session
  input=/ExtraCustomerDetails.jsp
  forward name=success path=addJointHirer.do/
/action

but it doesn't even display the page, so it doesn't get that far.

Does it use also use addExtraPersonDetailsForm? 

Yes, see above.

Do you have a   type=package.addExtraPersonDetailsForm/. 
entry in struts-config.xml?

Yes:

form-bean  name=addExtraPersonDetailsForm

type=com.pancredit.tkbespoke.tjs.strutstest.form.AddExtraPersonDetailsForm/

 It appears to me that the addExtraPersonDetailsForm is not being used since
 the error msg states that org.apache.struts.taglib.html.BEAN has no getter
 method for dob.

I thought that too, but if I put the error handling back in, it finds it.  That 
suggests to me that  it is using the right form bean.  But if it is, then why doesn't 
it work

What is org.apache.struts.taglib.html.BEAN actually referring to?

Tim.
 
 - Original Message -
 From: Tim Sawyer amp;lang=en[EMAIL PROTECTED]
 To: amp;lang=en[EMAIL PROTECTED]
 Sent: Monday, February 25, 2002 10:41 AM
 Subject: Form Bean problem
 
 
  Hello.
 
  I'm calling a JSP page as the successful outcome of an action, and it's
 complaining that one of my get methods doesn't exist.  I can't work out
 what's going on, can someone give me a nudge in the right direction?
 
  The page contains a form, for entering date of birth and marital status
 (for now, I'm still messing with a test project).  If I define no form bean
 for this action, I get an error saying it can't find the getter method.  If
 I define the form bean and leave the Validate() method checking for nulls, I
 get validation errors (correctly).  If I remove the validation code, then I
 get the getter method not found error again.Surely I shouldn't have to
 define the form bean at all?
 
  Is there any reference to the flow of methods called between a call to a
 do and displaying a success JSP anywhere?
 
  --Action Mapping--
 
  
 
 type=com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPre
 Action
 name=addExtraPersonDetailsForm
scope=session
input=/AddFindParty/FindPartyResults.jsp

 
  ExtraCustomerDetails.JSP --
 
  
  
  
  
  
  Untitled Document
  
 
  
  Please enter the following customer details: 
  
  

  
Date of Birth:

  

Marital status:

  

  
  
nbsp;

  

  
  

  

  

  
  nbsp; 
  
  
 
  -Form
 Bean--
  public class AddExtraPersonDetailsForm extends AbstractActionForm
  {
private String dob = null;
private String maritalStatusID = null;
 
 
/** Creates a new instance of Class */
public AddExtraPersonDetailsForm()
{
}
 
 
/** Getter for property maritalStatusID.
 * @return Value of property maritalStatusID.
 */
public java.lang.String getMaritalStatusID()
{
  return maritalStatusID;
}
 
/** Setter for property maritalStatusID.
 * @param maritalStatusID New value of property maritalStatusID.
 */
public void setMaritalStatusID(java.lang.String maritalStatusID)
{
  this.maritalStatusID = maritalStatusID;
}
 
/** This method is called when the user submits the form.  It should
 validate the
 * data that has been entered for mandatory variables etc.
 */
protected ActionErrors onValidate(ActionMapping mapping,
 HttpServletRequest request)
{
  ActionErrors lErrors = new ActionErrors();
 
  //this.checkMandatory(lErrors, this.dob, dob,
 addFindPartyModule.errors.dobMissing);
  //this.checkMandatory(lErrors, this.maritalStatusID,
 maritalStatusID, addFindPartyModule.errors.maritalStatusIDMissing);
 
  return lErrors;
}
 
/** This method is called when the user pushes the Reset button on the
 form.
 * It should assign all of the fields on the form null.
 */
protected void onReset(ActionMapping mapping, HttpServletRequest
 request)
{
  //this.dob = null;
  //this.maritalStatusID = null;
}
 
/** Getter for property dob.
 * @return Value of property dob.
 */
public java.lang.String getDob()
{
  return dob;
}
 
/** Setter for property dob.
 * @param dob New value of property dob.
 */
public void setDob(java.lang.String dob)
{
  this.dob = dob;
}
 
  --Top of Error

RE: i18n - Escape Codes....

2002-02-25 Thread Rustad, Aaron

I know of this site...unfortunatly, it seems to freeze half was down, is
there any other mirrors of this information (the tripod link doesn't work
either).

Thanks!
Aaron.

-Original Message-
From: Drew Sudell [mailto:[EMAIL PROTECTED]]
Sent: February 25, 2002 8:54 AM
To: Struts Users Mailing List
Subject: RE: i18n - Escape Codes




 -Original Message-
 From: Rustad, Aaron [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 24, 2002 4:01 AM
 To: '[EMAIL PROTECTED]'
 Subject: i18n - Escape Codes
 
 
 I am trying i18n my application by adding a 
 Resources_ru.properties, and it
 seems to work. However, I can not get the Unicode characters to work
 correctly.
  
 
 I have looked at HP's example, and they use unicode escapes for their
 messagesis there an easy way to convert Strings to 
 Unicode strings?
 
http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html


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

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




Anybody compiled the dynamic property code?

2002-02-25 Thread Press, Michael

I'm trying to test Kevin Wang's dynamic property code, but it won't compile
with Struts 1.0, 1.0.1 or 1.0.2.  Has anybody else gotten this code to
compile with a particular Struts version?  Or fixed it to compile?
 
For reference, I got the code here (via husted.com's resources page) -
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01374.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01374.html 
 
Thanks
Michael

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




RE: i18n - Escape Codes....

2002-02-25 Thread Drew Sudell



 -Original Message-
 From: Rustad, Aaron [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 25, 2002 11:16 AM
 To: 'Struts Users Mailing List'
 Subject: RE: i18n - Escape Codes
 
 
 I know of this site...unfortunatly, it seems to freeze half 
 was down, is
 there any other mirrors of this information (the tripod link 
 doesn't work
 either).


Actually, If you've installed the docs for your JDK, it's
in there as well.  The link I sent was just to Sun's browsable
copy of the docs.

If not, the quick usage is

 native2ascii [options] [inputfile [outputfile]]

if input file is omitted, stdin is the default.  If output file is omitted
stdout is the default.  The options are
  -reverse - reverse the sense of the conversion (ie convert from Ascii and 
 escapes to the native encoding)
  -encoding encoding_name - defaults to system property file.encoding

Some encodings you might be interested in (the simple ones _ a few Russian)
are:

ASCII
ISO8859_1
ISO8859_5 
UFT8 
KOI8_R

 -Original Message-
 From: Drew Sudell [mailto:[EMAIL PROTECTED]]
 Sent: February 25, 2002 8:54 AM
 To: Struts Users Mailing List
 Subject: RE: i18n - Escape Codes
 
 
 
 
  -Original Message-
  From: Rustad, Aaron [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, February 24, 2002 4:01 AM
  To: '[EMAIL PROTECTED]'
  Subject: i18n - Escape Codes
  
  
  I am trying i18n my application by adding a 
  Resources_ru.properties, and it
  seems to work. However, I can not get the Unicode characters to work
  correctly.
   
  
  I have looked at HP's example, and they use unicode escapes 
 for their
  messagesis there an easy way to convert Strings to 
  Unicode strings?
  
 http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




Re: Form Bean problem

2002-02-25 Thread dderry

Sorry Tim,

I've only been learning this stuff for a couple of weeks myself. I don't
know what org.apache.struts.taglib.html.BEAN is referring to here. I was
just responding to what was obvious to me.

maybe one of the gurus will step in. the list seems pretty quiet today
though.

Good luck,
Dave D


- Original Message -
From: Tim Sawyer [EMAIL PROTECTED]


 Dderry [EMAIL PROTECTED] wrote :

  Do you have an Action Mapping for saveExtraPersonDetails.do?

 Yes:

 actionpath=/saveExtraPersonDetails

type=com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPos
tAction
name=addExtraPersonDetailsForm
   scope=session
   input=/ExtraCustomerDetails.jsp
   forward name=success path=addJointHirer.do/
 /action

 but it doesn't even display the page, so it doesn't get that far.

 Does it use also use addExtraPersonDetailsForm?

 Yes, see above.

 Do you have a   type=package.addExtraPersonDetailsForm/.
 entry in struts-config.xml?

 Yes:

 form-bean  name=addExtraPersonDetailsForm

type=com.pancredit.tkbespoke.tjs.strutstest.form.AddExtraPersonDetailsForm
/

  It appears to me that the addExtraPersonDetailsForm is not being used
since
  the error msg states that org.apache.struts.taglib.html.BEAN has no
getter
  method for dob.

 I thought that too, but if I put the error handling back in, it finds it.
That suggests to me that  it is using the right form bean.  But if it is,
then why doesn't it work

 What is org.apache.struts.taglib.html.BEAN actually referring to?

 Tim.
 



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




help with logic:iterate

2002-02-25 Thread Sriram Nookala

I have the following snippet of code in my jsp:

logic:iterate id=columnName name=ParticipantImportWizardForm
 property=columnNameList

table border=1 width=80%
tr
td width=50%h3 align=centerColumn Name/h3
/td
td width=50%h3 align=centerType/h3
/td
/tr
tr
td width=50%html:text property=columnName //td
td width=50%
pnbsp;/p
/td
/tr


I get the error No getter method for property columnName of bean 
org.apache.struts.taglib.html.BEAN.

columnNameList is a collection of Strings. I can't figure out what I have to set the 
name and property attributes of html:text in this case.



RE: best practices for logging in

2002-02-25 Thread Bill Page

I use a variant on 2.  I have my own action, but I don't use an
unimplemented method (which I wouldn't do in this case anyway, would
implement it with a default, probably not requiring login , that would
depend on the project).  Instead I use the parameter in the config to do
this (my config parameters are set up to allow multiple values using a
key1=value1;key2=value2 syntax).  My action class also forward using a
global forward named needslogin (orsomething like that).That way you can
simply change the config file if you want to tighten or loosen the login
requirements.  Obviously some actions will require a login because of
database access, but those that don't can come and go as your customer
wants.

 -Original Message-
 From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 24, 2002 11:20 AM
 To: Edward Q. Bridges
 Cc: Struts Users Mailing List
 Subject: Re: best practices for logging in
 
 
 You want to set a session-level boolean value (actually Boolean, not
 boolean, since you can only store proper objects in the 
 session scope),
 indicating whether the user has logged in. 
 
 Here are three ways to build a framework with Struts to check for
 logged-inness. I've used all three in succession, and my preference
 nowadays is the last method.
 
 1. At the start of each of your Action's perform() methods, have a
 common block of code to check for logged-inness, and redirect 
 to a login
 page as appropriate. Primary disadvantage is that you have to remember
 to cut and paste this code into all your actions which 
 require a login.
 
 2. Extend Struts' Action class to your own *abstract* class, 
 which adds
 the (unimplemented method) boolean requiresLogon(). All of your
 actions should extend this abstract class, and implement their own
 requiresLogon() method which simply returns true or false. Then, in
 the base class's perform() method, you can call 
 requiresLogon(), and if
 true, then test for logged-inness. Lastly, you can call the derived
 class's real perform method, which actually you'll have to 
 rename to,
 myPerform or something slightly different. This is a 
 cleaner approach
 than #1 but still a bit messy. I've used this approach for both
 requiresLogon(), and requiresDatabase() (in which case I establish
 and break down a connection, all in one place). My preference 
 is now #3,
 below.
 
 3. Don't use Struts at all for your login check. Instead, use Servlet
 Filters (requires a Servlet 2.3 container such as Tomcat 
 4.0). Implement
 a filter (they're simple, really!) which checks for logged-inness, and
 if false, then redirects to some login page. This has a clear 
 advantage
 in that it separates security checking from the code of your 
 Actions. In
 addition, it has a clear advantage in that it's declarative at the
 configuration file (XML) level, rather than embedded in your code. By
 that I mean, in the web.xml file, you specify which URL's (or which
 patterns of URL's) the filter applies to, rather than 
 embedding this in
 your actual Java code. My favorite approach to this kind of thing.
 
 Some other notes:
 
 1. If the login check fails, you can do your user a favor by 
 saving the
 URL they requested into a session variable. Then, in your logon code,
 upon successful login, you can redirect the user back to the URL they
 originally requested. A nice convenience.
 
 2. logged-inness is a perfectly legitimate and grammatically correct
 expression.
 
 Bryan
 
 
 On Sun, 2002-02-24 at 08:46, Edward Q. Bridges wrote:
 
 what is the general accepted practice for handling 
 logins and securing 
 access with struts?
 
 from a review of the archive, it seems that way *not* to 
 do it is to use a 
 isLoggedIn flag that gets passed from page to page.  
 and, that the 
 canonical approach is to utilize Action.perform(...) to 
 determine whether 
 or not the person has logged in.
 
 so, how exactly is the Action class determining whether 
 or not the user is 
 logged in?  does it set a session-level boolean 
 variable and check that 
 on every invocation of the perform method?
 
 has anyone encountered special cases where they've had to 
 come up with some 
 unique way of handling logins?
 
 many thanks!
 --e--
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 

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




Re: help with logic:iterate

2002-02-25 Thread keithBacon

Hi Sri, 
try 
html:text name=columnName /
instead of
property=columnName

struts will then call the toString() method of your columnName objects.

Often your columnName object would have a method like getName()
and you would specify 
html:text name=columnName property=name /
I hope that's right!
Keith.



--- Sriram Nookala [EMAIL PROTECTED] wrote:
 I have the following snippet of code in my jsp:
 
 logic:iterate id=columnName name=ParticipantImportWizardForm
  property=columnNameList
 
 table border=1 width=80%
 tr
 td width=50%h3 align=centerColumn Name/h3
 /td
 td width=50%h3 align=centerType/h3
 /td
 /tr
 tr
 td width=50%html:text property=columnName //td
 td width=50%
 pnbsp;/p
 /td
 /tr
 
 
 I get the error No getter method for property columnName of bean
 org.apache.struts.taglib.html.BEAN.
 
 columnNameList is a collection of Strings. I can't figure out what I have to
 set the name and property attributes of html:text in this case.
 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




RE: Implement HTTP and HTTPS in a safe, flexible, and easily maintainable manner

2002-02-25 Thread Steve Earl

Michael,

I had the same problem today. You'll need to change the RequestUtils source
so that
instead of building a map directly from the params you need to get an enum
of the 
parameters and iterate through that, building up a map as you go along.
Rebuild the 
jar and it works fine.

hope this helps
steve

__ 
Steve Earl

InfoGain Limited, 23-25 Marlow Road, Maidenhead, Berkshire SL6 7AA, UK
email: [EMAIL PROTECTED]
Tel: +44 (0)1628 580 600 
Fax: +44 (0)1628 580 610
Mobile: +44 (0)779 026 3645

Disclaimer:  Neither this e-mail nor any attachment places any legal or
contractual obligations on InfoGain Limited. Any reproduction, disclosure or
dissemination beyond the intended addressees is strictly prohibited save for
the legitimate business purposes of InfoGain Limited and its clients or
partners.
__ 


-Original Message-
From: Michael Mok [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 3:25 AM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner 


Steve

I tried to compile your  SecureRequestUtils code using servlet 2.1 and the
compiler says that aRequest.getParameterMap() does not exist.

Is your servletUtil based on Servlet 2.3?

Regards

Michael Mok

/**
 * Creates query String from request body parameters
 */
public static String getRequestParameters( HttpServletRequest
aRequest ){
Map m = aRequest.getParameterMap();
return createQueryStringFromMap(m, ).toString();
}

-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Monday, 25 February 2002 9:30
To: 'Niall Pemberton'; struts-user; struts-dev
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner



Hey, thanks for the publicity.

We've created a Struts extension based on this article.  Find it at
http://struts.ditlinger.com.

Try it out, let us know what you think.

Steve

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:24 PM
To: struts-user; struts-dev
Subject: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner


This gives an example of how to integrate SSL into a Web App, using Struts
as an example.


http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html


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


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

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




RE: Implement HTTP and HTTPS in a safe, flexible, and easily main tainable manner

2002-02-25 Thread Steve Earl

Steve,

Have been using your implementation of ssl today and am pretty impressed.

I have got one question though.

One of the jsp's I've got is made up of several frames within a frameset -
so
no body tag. Putting your ssl tag set to secure within the frameset
didn't seem
to make the page use ssl. On a redisplay of the page, forwarded from an
action
which had parameter=secure then the page was encrypted so an easy
workaround would
be to view the jsp through an action.

I wondered if you were aware of thisor have I got it totally wrong!!

regards
steve

__ 
Steve Earl

InfoGain Limited, 23-25 Marlow Road, Maidenhead, Berkshire SL6 7AA, UK
email: [EMAIL PROTECTED]
Tel: +44 (0)1628 580 600 
Fax: +44 (0)1628 580 610
Mobile: +44 (0)779 026 3645

Disclaimer:  Neither this e-mail nor any attachment places any legal or
contractual obligations on InfoGain Limited. Any reproduction, disclosure or
dissemination beyond the intended addressees is strictly prohibited save for
the legitimate business purposes of InfoGain Limited and its clients or
partners.
__ 


-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 7:36 PM
To: 'Niall Pemberton'; struts-user; struts-dev
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
main tainable manner 



Hey, thanks for the publicity.

We've created a Struts extension based on this article.  Find it at
http://struts.ditlinger.com.

Try it out, let us know what you think.

Steve

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:24 PM
To: struts-user; struts-dev
Subject: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner 


This gives an example of how to integrate SSL into a Web App, using Struts
as an example.


http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html


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

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




Re: help with logic:iterate

2002-02-25 Thread Sriram Nookala

html:text name=columnName /
doesn't work since property is a required attribute.
- Original Message -
From: keithBacon [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]; Sriram
Nookala [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 12:19 PM
Subject: Re: help with logic:iterate


 Hi Sri,
 try
 html:text name=columnName /
 instead of
 property=columnName

 struts will then call the toString() method of your columnName objects.

 Often your columnName object would have a method like getName()
 and you would specify
 html:text name=columnName property=name /
 I hope that's right!
 Keith.



 --- Sriram Nookala [EMAIL PROTECTED] wrote:
  I have the following snippet of code in my jsp:
 
  logic:iterate id=columnName name=ParticipantImportWizardForm
   property=columnNameList
 
  table border=1 width=80%
  tr
  td width=50%h3 align=centerColumn Name/h3
  /td
  td width=50%h3 align=centerType/h3
  /td
  /tr
  tr
  td width=50%html:text property=columnName //td
  td width=50%
  pnbsp;/p
  /td
  /tr
  
 
  I get the error No getter method for property columnName of bean
  org.apache.struts.taglib.html.BEAN.
 
  columnNameList is a collection of Strings. I can't figure out what I
have to
  set the name and property attributes of html:text in this case.
 


 =
 ~~
 Search the archive:-
 http://www.mail-archive.com/struts-user%40jakarta.apache.org/
 ~~
 Keith Bacon - Looking for struts work - South-East UK.
 phone UK 07960 011275

 __
 Do You Yahoo!?
 Yahoo! Sports - Coverage of the 2002 Olympic Games
 http://sports.yahoo.com





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




Re: How to use html:radio?

2002-02-25 Thread dhay


Hi Larry,

problem is that you are creating a bunch of radio buttons all with the same
name throughout the page, due to iterate loop.

You need indexed naming so struts can autopopulate the relevant fields.

Cheers,

Dave





Maturo, Larry [EMAIL PROTECTED] on 02/22/2002 04:46:44 PM

Please respond to Struts Users Mailing List
   [EMAIL PROTECTED]

To:'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:How to use html:radio?


I am trying to create a table of radio buttons.  Each row looks
something like:

Required Exempt Done   Gate
   O   O  * Repository Link

where the O represents an unchecked radio button
and the * represents a check one.  I have an ArrayList
of beans.  Each bean has a status string field and a gate
string field, where status is always one of REQUIRED,
EXEMPT, or DONE.  My table displays properly, and I can
change which radio button is selected.  However, when I
make a change to one of the radio buttons and submit my
form, the list I get back is identical to the
one I sent in.  Below is what's in my jsp:

table border=
  tr
td colspan=3bbigcenterStatus/center/big/b/td
td/td
/tr
  tr
td align=center width=80bRequired/b/td
td align=center width=80bExempt/b/td
td align=center width=80bDone/b/td
td align=center width=150bbigGate/big/b/td
  /tr
logic:iterate id=ppg name=%= Constants.PROJECT_PROCESS_GATE_LIST
% scope=session

type=com.athensgroup.model.ProjectProcessGate
  tr
td
  center
html:radio name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.REQUIRED.getMnemonic() % indexed=true /
  /center
/td
td
  center
   html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.EXEMPT.getMnemonic() % indexed=true /
  /center
/td
td
  center
html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.DONE.getMnemonic() % indexed=true /
  /center
/td
td
 center
   bean:write name=ppg property=%= ProjectForm.GATE % /
 /center
   /td
  /tr
  /logic:iterate
  /table

In my action class I have
request.getSession
().setAttribute(Constants.PROJECT_PROCESS_GATE_LIST,ppgLis
t);

After I submit my form I get the list back, in my action, with:
ppgList = (ArrayList)
request.getSession().getAttribute(Constants.PROJECT_PROCESS_GATE_LIST);

Why is this list identical to when it was sent in?

-- Larry Maturo
   [EMAIL PROTECTED]

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








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




RE: Implement HTTP and HTTPS in a safe, flexible, and easily maintainable manner

2002-02-25 Thread Ditlinger, Steve



Yes, it is.  Can you upgrade?  If not, you should be able to write your own
utility that takes a Request and creates a HashMap instance containing any
parameters found on it.

Steve

-Original Message-
From: Michael Mok [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 24, 2002 7:25 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner 


Steve

I tried to compile your  SecureRequestUtils code using servlet 2.1 and the
compiler says that aRequest.getParameterMap() does not exist.

Is your servletUtil based on Servlet 2.3?

Regards

Michael Mok

/**
 * Creates query String from request body parameters
 */
public static String getRequestParameters( HttpServletRequest
aRequest ){
Map m = aRequest.getParameterMap();
return createQueryStringFromMap(m, ).toString();
}

-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Monday, 25 February 2002 9:30
To: 'Niall Pemberton'; struts-user; struts-dev
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner



Hey, thanks for the publicity.

We've created a Struts extension based on this article.  Find it at
http://struts.ditlinger.com.

Try it out, let us know what you think.

Steve

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:24 PM
To: struts-user; struts-dev
Subject: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner


This gives an example of how to integrate SSL into a Web App, using Struts
as an example.


http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html


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


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




logic.equal tag

2002-02-25 Thread Dua, Amit

Is there a way of comparing two session variables using struts  logic tag.
Or 
we can only compare variables with constants

Amit

-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 1:27 PM
To: '[EMAIL PROTECTED]'; 'Struts Users Mailing List'
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
main tainable manner 




Yes, it is.  Can you upgrade?  If not, you should be able to write your own
utility that takes a Request and creates a HashMap instance containing any
parameters found on it.

Steve

-Original Message-
From: Michael Mok [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 24, 2002 7:25 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner 


Steve

I tried to compile your  SecureRequestUtils code using servlet 2.1 and the
compiler says that aRequest.getParameterMap() does not exist.

Is your servletUtil based on Servlet 2.3?

Regards

Michael Mok

/**
 * Creates query String from request body parameters
 */
public static String getRequestParameters( HttpServletRequest
aRequest ){
Map m = aRequest.getParameterMap();
return createQueryStringFromMap(m, ).toString();
}

-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Monday, 25 February 2002 9:30
To: 'Niall Pemberton'; struts-user; struts-dev
Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner



Hey, thanks for the publicity.

We've created a Struts extension based on this article.  Find it at
http://struts.ditlinger.com.

Try it out, let us know what you think.

Steve

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:24 PM
To: struts-user; struts-dev
Subject: Implement HTTP and HTTPS in a safe, flexible, and easily
maintainable manner


This gives an example of how to integrate SSL into a Web App, using Struts
as an example.


http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html


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


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

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




Re: logic.equal tag

2002-02-25 Thread Martin Fekete

try something like this ...


bean:define id=newId name=yourSessionBean
property=yourSessionBeanProperty /
logic:equal name=beanToCompare property=propertyOfBeanToCompare
value=%= newId %



Feky
- Original Message -
From: Dua, Amit [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 7:34 PM
Subject: logic.equal tag


 Is there a way of comparing two session variables using struts  logic tag.
 Or
 we can only compare variables with constants

 Amit

 -Original Message-
 From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 25, 2002 1:27 PM
 To: '[EMAIL PROTECTED]'; 'Struts Users Mailing List'
 Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
 main tainable manner




 Yes, it is.  Can you upgrade?  If not, you should be able to write your
own
 utility that takes a Request and creates a HashMap instance containing any
 parameters found on it.

 Steve

 -Original Message-
 From: Michael Mok [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 24, 2002 7:25 PM
 To: 'Struts Users Mailing List'
 Cc: [EMAIL PROTECTED]
 Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
 maintainable manner


 Steve

 I tried to compile your  SecureRequestUtils code using servlet 2.1 and the
 compiler says that aRequest.getParameterMap() does not exist.

 Is your servletUtil based on Servlet 2.3?

 Regards

 Michael Mok

 /**
  * Creates query String from request body parameters
  */
 public static String getRequestParameters( HttpServletRequest
 aRequest ){
 Map m = aRequest.getParameterMap();
 return createQueryStringFromMap(m, ).toString();
 }

 -Original Message-
 From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 25 February 2002 9:30
 To: 'Niall Pemberton'; struts-user; struts-dev
 Subject: RE: Implement HTTP and HTTPS in a safe, flexible, and easily
 maintainable manner



 Hey, thanks for the publicity.

 We've created a Struts extension based on this article.  Find it at
 http://struts.ditlinger.com.

 Try it out, let us know what you think.

 Steve

 -Original Message-
 From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 21, 2002 12:24 PM
 To: struts-user; struts-dev
 Subject: Implement HTTP and HTTPS in a safe, flexible, and easily
 maintainable manner


 This gives an example of how to integrate SSL into a Web App, using Struts
 as an example.


 http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html


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


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

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





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




Websphere cache error when reloading an expired JSP page

2002-02-25 Thread Murali Srinivasan

In one of our responses we set the No-Cache and Pragma headers so
that the resulting JSP page is not cached. While on the subsequent page
if the user hits the back button, the browser correctly responds with
the Web page expired in IE 5.5 and Data missing in Netscape 4.6.
However, if the user chooses to reload the document at this point we get
the Websphere message:
Error 500: Websphere servlet cache was unable to find
CacheProxyRequest in the request proxy chain.  Has anyone run in to
this and found out what causes this and a resolution. Any information
would be appreciated!


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




RE: How to use html:radio? Take two

2002-02-25 Thread Maturo, Larry

Well, I got no reply the first time I posted this,
but then that was on a Friday, so here goes again.

I am trying to create a table of radio buttons.  Each row looks
something like:

Required Exempt Done   Gate
   O   O  * Repository Link

where the O represents an unchecked radio button
and the * represents a check one.  I have an ArrayList
of beans.  Each bean has a status string field and a gate 
string field, where status is always one of REQUIRED, 
EXEMPT, or DONE.  My table displays properly, and I can
change which radio button is selected.  However, when I 
make a change to one of the radio buttons and submit my
form, the list I get back is identical to the
one I sent in.  Below is what's in my jsp:

table border=
  tr
td colspan=3bbigcenterStatus/center/big/b/td
td/td
/tr
  tr
td align=center width=80bRequired/b/td
td align=center width=80bExempt/b/td
td align=center width=80bDone/b/td
td align=center width=150bbigGate/big/b/td
  /tr
logic:iterate id=ppg name=%= Constants.PROJECT_PROCESS_GATE_LIST
% scope=session 

type=com.athensgroup.model.ProjectProcessGate
  tr
td
  center
html:radio name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.REQUIRED.getMnemonic() % indexed=true /
  /center
/td
td
  center
   html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.EXEMPT.getMnemonic() % indexed=true /
  /center
/td
td
  center
html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.DONE.getMnemonic() % indexed=true /
  /center
/td
td
 center
   bean:write name=ppg property=%= ProjectForm.GATE % /
 /center
   /td
  /tr
  /logic:iterate
  /table

In my action class I have
request.getSession().setAttribute(Constants.PROJECT_PROCESS_GATE_LIST,ppgLis
t);

After I submit my form I get the list back, in my action, with:
ppgList = (ArrayList)
request.getSession().getAttribute(Constants.PROJECT_PROCESS_GATE_LIST);

Why is this list identical to when it was sent in?

-- Larry Maturo
   [EMAIL PROTECTED]


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




RE: Accessing database defined in struts-config

2002-02-25 Thread Javier Campoamor

Some days ago, Antony made a question and now I'm having the same problem,
can some one explain to me if there is a way to access to the datasource
configured in the struts-config file from a class that doesn't extend an
action?

Thanks in advance

Javier



 -Mensaje original-
 De: Antony Stace [mailto:[EMAIL PROTECTED]]
 Enviado el: miercoles 30 de enero de 2002 5:36
 Para: [EMAIL PROTECTED]
 Asunto: Accessing database defined in struts-config


 Hi

 I have an initialisation servlet which is run when my web app start up.

 public class WebAppInit extends HttpServlet
 {
 public void init()
 {

 }

 }

 All it does is to set some application wide beans.  I need to be able to
 access the database I have defined in  my struts-config.xml file
 in this initalisation servlet.  I
 can access this database from my Action classes via

 public final class Logon extends Action
 {

 public ActionForward perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
throws IOException, ServletException
 {
 DataSource dataSource = servlet.findDataSource(testDataBase);

 }
 }


 since this class extents Action but do not know how to access
 this database
 via the WebAppInit class.  How can I access the database from the
 WebAppInit class.



 --


 Cheers

 Tony
 -


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


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



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




RE: How to use html:radio?

2002-02-25 Thread Maturo, Larry

Hi Dave,

I actually do have indexed set to true:

html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=ProcessStatus.EXEMPT.getMnemonic() % indexed=true /

-- Larry



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 12:04 PM
To: Struts Users Mailing List
Subject: Re: How to use html:radio?



Hi Larry,

problem is that you are creating a bunch of radio buttons all with the same
name throughout the page, due to iterate loop.

You need indexed naming so struts can autopopulate the relevant fields.

Cheers,

Dave





Maturo, Larry [EMAIL PROTECTED] on 02/22/2002 04:46:44 PM

Please respond to Struts Users Mailing List
   [EMAIL PROTECTED]

To:'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:How to use html:radio?


I am trying to create a table of radio buttons.  Each row looks
something like:

Required Exempt Done   Gate
   O   O  * Repository Link

where the O represents an unchecked radio button
and the * represents a check one.  I have an ArrayList
of beans.  Each bean has a status string field and a gate
string field, where status is always one of REQUIRED,
EXEMPT, or DONE.  My table displays properly, and I can
change which radio button is selected.  However, when I
make a change to one of the radio buttons and submit my
form, the list I get back is identical to the
one I sent in.  Below is what's in my jsp:

table border=
  tr
td colspan=3bbigcenterStatus/center/big/b/td
td/td
/tr
  tr
td align=center width=80bRequired/b/td
td align=center width=80bExempt/b/td
td align=center width=80bDone/b/td
td align=center width=150bbigGate/big/b/td
  /tr
logic:iterate id=ppg name=%= Constants.PROJECT_PROCESS_GATE_LIST
% scope=session

type=com.athensgroup.model.ProjectProcessGate
  tr
td
  center
html:radio name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.REQUIRED.getMnemonic() % indexed=true /
  /center
/td
td
  center
   html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.EXEMPT.getMnemonic() % indexed=true /
  /center
/td
td
  center
html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.DONE.getMnemonic() % indexed=true /
  /center
/td
td
 center
   bean:write name=ppg property=%= ProjectForm.GATE % /
 /center
   /td
  /tr
  /logic:iterate
  /table

In my action class I have
request.getSession
().setAttribute(Constants.PROJECT_PROCESS_GATE_LIST,ppgLis
t);

After I submit my form I get the list back, in my action, with:
ppgList = (ArrayList)
request.getSession().getAttribute(Constants.PROJECT_PROCESS_GATE_LIST);

Why is this list identical to when it was sent in?

-- Larry Maturo
   [EMAIL PROTECTED]

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








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


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




How-- html::form whose action is whatever action caused its display?

2002-02-25 Thread Jeff

What's the best/proper way to create a HTML:form whose action property is
set to whatever action caused the jsp template containing it to be displayed
in the first place?

For example, suppose a form submission to /admin_action.do triggers an
action class (say, AdminAction) which determines that the user needs to
log in before doing whatever it was that his original form submission was
supposed to achieve. As luck would have it, the form bean just submitted was
a subclass of the login form bean (in fact, ALL of the application's form
beans are subclasses of the login form bean so they'll be capable of doing
double-duty as a login form bean while preserving the state of the remaining
formvars during a login sidetrip should the need arise). Anyway, the action
class returns mapping.findForward(login), which is mapped to
/templates/login.jsp. No sweat.

Here's where things get sticky. The action class above (AdminAction) is
not the only one that might plausibly return mapping.findForward(login).
Actually, every single action class (including AdminAction above) is a
subclass of the abstract LoggedInUserAction class, which verifies that the
user is logged in (and/or tries to log them in, if a username and password
happens to have been submitted) before calling its own
performLoggedInAction() abstract class, and returns
mapping.findForward(login) if the user needs to log in.

In other words, form submissions to /admin_item.do, /admin_preview.do,
/admin_something_else.do, and numerous other URLs map to Action classes that
are subclasses of LoggedInUserAction, any of which might plausibly result in
the return of mapping.findForward(login) if LoggedInUserAction realizes
that the user hasn't logged in.

The challenge is making sure that when login.jsp gets displayed because
/admin_preview.do fell through to login.jsp, the submitted login form gets
sent to /admin_preview.do. If login.jsp gets displayed because
/admin_item.do fell through to login.jsp, the submitted login form should
get sent to /admin_item.do. I know I -could- create a separate login form
for every possible action, but I'm pretty sure that there's GOT to be a
better way to do it. Like maybe a scripting variable whose value is whatever
URL resulted in the display of the current page?

Suggestions?



sample struts.xml excerpt:

form-beans type=org.apache.struts.action.ActionFormBean
!-- all three form beans are subclasses of LoginFormBean --
 form-bean name=createForm type=pkg.CreateFormBean
 form-bean name=previewForm type=pkg.PreviewFormBean
 form-bean name=updateForm type=pkg.UpdateFormBean
/form-beans

global-forwards type=org.apache.struts.action.ActionForward
 forward name=peon path=/not_allowed.jsp
 !-- when the login mapping is called, it needs to use whatever bean --
 !-- was associated with the original action in the action-mappings
below --
 forward name=login path=/login.jsp
/global-forwards

action-mappings type=org.apache.struts.action.ActionMapping
 action path=/create type=pkg.CreateAction name=createForm
  forward name=create path=/create.jsp
 /action
 action path=/preview type=pkg.PreviewAction name=previewForm
  forward name=preview path=/preview.jsp
 /action
 action path=/update type=pkg.UpdateAction name=updateForm
  forward name=update path=/update.jsp
 /action
/action/mappings

sample login.jsp excerpt:

html:form action=/create.do
!-- assuming this jsp was displayed as a result of a form submission
to /create.do. If the form submission resulting in this page's display
were to /update.do, the action needs to be /update.do, and so on.
Perhaps something like... --
%--
html:form
action=%=URL_from_which_the_display_of_this_page_was_launched%
--%
/html:form



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




Re: How-- html::form whose action is whatever action caused itsdisplay?

2002-02-25 Thread Eddie Bush

I believe the typical solution to this is an attribute set in either request
or session scope.  Your login action could then check to see if the
attribute exists, and forward to it if it does (and remove it, if it is in
the session).

Of course, your action knows it's own mapping, so it would set the attribute
before redirecting to login.

You'll probably need a hidden field in your login form if you choose to use
a request attribute - so you can keep the path across requests.

Of course, there is likely a better way - if someone knows one please chip
in =)

Hope that helps,

Eddie
- Original Message -
From: Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 1:30 PM
Subject: How-- html::form whose action is whatever action caused its
display?


 What's the best/proper way to create a HTML:form whose action property
is
 set to whatever action caused the jsp template containing it to be
displayed
 in the first place?

 For example, suppose a form submission to /admin_action.do triggers an
 action class (say, AdminAction) which determines that the user needs to
 log in before doing whatever it was that his original form submission was
 supposed to achieve. As luck would have it, the form bean just submitted
was
 a subclass of the login form bean (in fact, ALL of the application's form
 beans are subclasses of the login form bean so they'll be capable of doing
 double-duty as a login form bean while preserving the state of the
remaining
 formvars during a login sidetrip should the need arise). Anyway, the
action
 class returns mapping.findForward(login), which is mapped to
 /templates/login.jsp. No sweat.

 Here's where things get sticky. The action class above (AdminAction) is
 not the only one that might plausibly return mapping.findForward(login).
 Actually, every single action class (including AdminAction above) is a
 subclass of the abstract LoggedInUserAction class, which verifies that the
 user is logged in (and/or tries to log them in, if a username and password
 happens to have been submitted) before calling its own
 performLoggedInAction() abstract class, and returns
 mapping.findForward(login) if the user needs to log in.

 In other words, form submissions to /admin_item.do, /admin_preview.do,
 /admin_something_else.do, and numerous other URLs map to Action classes
that
 are subclasses of LoggedInUserAction, any of which might plausibly result
in
 the return of mapping.findForward(login) if LoggedInUserAction realizes
 that the user hasn't logged in.

 The challenge is making sure that when login.jsp gets displayed because
 /admin_preview.do fell through to login.jsp, the submitted login form gets
 sent to /admin_preview.do. If login.jsp gets displayed because
 /admin_item.do fell through to login.jsp, the submitted login form should
 get sent to /admin_item.do. I know I -could- create a separate login form
 for every possible action, but I'm pretty sure that there's GOT to be a
 better way to do it. Like maybe a scripting variable whose value is
whatever
 URL resulted in the display of the current page?

 Suggestions?



 sample struts.xml excerpt:

 form-beans type=org.apache.struts.action.ActionFormBean
 !-- all three form beans are subclasses of LoginFormBean --
  form-bean name=createForm type=pkg.CreateFormBean
  form-bean name=previewForm type=pkg.PreviewFormBean
  form-bean name=updateForm type=pkg.UpdateFormBean
 /form-beans

 global-forwards type=org.apache.struts.action.ActionForward
  forward name=peon path=/not_allowed.jsp
  !-- when the login mapping is called, it needs to use whatever
bean --
  !-- was associated with the original action in the action-mappings
 below --
  forward name=login path=/login.jsp
 /global-forwards

 action-mappings type=org.apache.struts.action.ActionMapping
  action path=/create type=pkg.CreateAction name=createForm
   forward name=create path=/create.jsp
  /action
  action path=/preview type=pkg.PreviewAction name=previewForm
   forward name=preview path=/preview.jsp
  /action
  action path=/update type=pkg.UpdateAction name=updateForm
   forward name=update path=/update.jsp
  /action
 /action/mappings

 sample login.jsp excerpt:

 html:form action=/create.do
 !-- assuming this jsp was displayed as a result of a form submission
 to /create.do. If the form submission resulting in this page's display
 were to /update.do, the action needs to be /update.do, and so on.
 Perhaps something like... --
 %--
 html:form
 action=%=URL_from_which_the_display_of_this_page_was_launched%
 --%
 /html:form



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



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




RE: How to use html:radio?

2002-02-25 Thread dhay


Larry,

Are the other indexed fields working okay?  What scope is your bean in?

Cheers,

Dave





Maturo, Larry [EMAIL PROTECTED] on 02/25/2002 01:57:16 PM

Please respond to Struts Users Mailing List
   [EMAIL PROTECTED]

To:'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:RE: How to use html:radio?


Hi Dave,

I actually do have indexed set to true:

html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=ProcessStatus.EXEMPT.getMnemonic() % indexed=true /

-- Larry



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 12:04 PM
To: Struts Users Mailing List
Subject: Re: How to use html:radio?



Hi Larry,

problem is that you are creating a bunch of radio buttons all with the same
name throughout the page, due to iterate loop.

You need indexed naming so struts can autopopulate the relevant fields.

Cheers,

Dave





Maturo, Larry [EMAIL PROTECTED] on 02/22/2002 04:46:44 PM

Please respond to Struts Users Mailing List
   [EMAIL PROTECTED]

To:'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:How to use html:radio?


I am trying to create a table of radio buttons.  Each row looks
something like:

Required Exempt Done   Gate
   O   O  * Repository Link

where the O represents an unchecked radio button
and the * represents a check one.  I have an ArrayList
of beans.  Each bean has a status string field and a gate
string field, where status is always one of REQUIRED,
EXEMPT, or DONE.  My table displays properly, and I can
change which radio button is selected.  However, when I
make a change to one of the radio buttons and submit my
form, the list I get back is identical to the
one I sent in.  Below is what's in my jsp:

table border=
  tr
td colspan=3bbigcenterStatus/center/big/b/td
td/td
/tr
  tr
td align=center width=80bRequired/b/td
td align=center width=80bExempt/b/td
td align=center width=80bDone/b/td
td align=center width=150bbigGate/big/b/td
  /tr
logic:iterate id=ppg name=%= Constants.PROJECT_PROCESS_GATE_LIST
% scope=session

type=com.athensgroup.model.ProjectProcessGate
  tr
td
  center
html:radio name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.REQUIRED.getMnemonic() % indexed=true /
  /center
/td
td
  center
   html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.EXEMPT.getMnemonic() % indexed=true /
  /center
/td
td
  center
html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.DONE.getMnemonic() % indexed=true /
  /center
/td
td
 center
   bean:write name=ppg property=%= ProjectForm.GATE % /
 /center
   /td
  /tr
  /logic:iterate
  /table

In my action class I have
request.getSession
().setAttribute(Constants.PROJECT_PROCESS_GATE_LIST,ppgLis
t);

After I submit my form I get the list back, in my action, with:
ppgList = (ArrayList)
request.getSession().getAttribute(Constants.PROJECT_PROCESS_GATE_LIST);

Why is this list identical to when it was sent in?

-- Larry Maturo
   [EMAIL PROTECTED]

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








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


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








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




RE: i18n - Escape Codes....

2002-02-25 Thread Rustad, Aaron

Thanks for everyone's help. I have it working now to display the Russian
Characters using UTF-8, but when I submit the form, the next page will not
convert the parameters correctly. I have read the Anton Tagunov
documentation on getting this to work, but it does not seem to work for me.

This is what I have done so far:

_ru.properties used native2ascii using UTF-8 encoding.
*.jsp used native2ascii using UTF-8 encoding
*.jsp added % request.setCharacterEncoding(
response.getCharacterEncoding() ); ...set it before any request calls
*.jsp added all the page declarations that he uses

BTW, I am using Tomcat 4.0.2.

Am I missing anything?

Thanks again!
Aaron.


-Original Message-
From: Drew Sudell [mailto:[EMAIL PROTECTED]]
Sent: February 25, 2002 9:22 AM
To: Struts Users Mailing List
Subject: RE: i18n - Escape Codes




 -Original Message-
 From: Rustad, Aaron [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 25, 2002 11:16 AM
 To: 'Struts Users Mailing List'
 Subject: RE: i18n - Escape Codes
 
 
 I know of this site...unfortunatly, it seems to freeze half 
 was down, is
 there any other mirrors of this information (the tripod link 
 doesn't work
 either).


Actually, If you've installed the docs for your JDK, it's
in there as well.  The link I sent was just to Sun's browsable
copy of the docs.

If not, the quick usage is

 native2ascii [options] [inputfile [outputfile]]

if input file is omitted, stdin is the default.  If output file is omitted
stdout is the default.  The options are
  -reverse - reverse the sense of the conversion (ie convert from Ascii and 
 escapes to the native encoding)
  -encoding encoding_name - defaults to system property file.encoding

Some encodings you might be interested in (the simple ones _ a few Russian)
are:

ASCII
ISO8859_1
ISO8859_5 
UFT8 
KOI8_R

 -Original Message-
 From: Drew Sudell [mailto:[EMAIL PROTECTED]]
 Sent: February 25, 2002 8:54 AM
 To: Struts Users Mailing List
 Subject: RE: i18n - Escape Codes
 
 
 
 
  -Original Message-
  From: Rustad, Aaron [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, February 24, 2002 4:01 AM
  To: '[EMAIL PROTECTED]'
  Subject: i18n - Escape Codes
  
  
  I am trying i18n my application by adding a 
  Resources_ru.properties, and it
  seems to work. However, I can not get the Unicode characters to work
  correctly.
   
  
  I have looked at HP's example, and they use unicode escapes 
 for their
  messagesis there an easy way to convert Strings to 
  Unicode strings?
  
 http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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

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




Re: Development Environment

2002-02-25 Thread dIon Gillard

Dave Wellman wrote:

Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?

Several:

Linux + NetBeans
Linux + Eclipse
Windows + VAJ
Windows + NetBeans/Forte
Windows + WebSphere Studio AD (Eclipse 1.0)
Windows + Eclipse 2.0 builds

-- 
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers





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




Re: Form Bean problem

2002-02-25 Thread Sarah Farrell

The error sounds like it is referring to the taglib struts-bean.tld, whether or
not it is a legitimate error, I'm not sure.

Try taking out the line
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
from your jsp and change the button tags back to regular HTML where
html:submit
  bean:message key=button.submit/
/html:submit
would become
input type=submit value=Submit
and 
html:reset
  bean:message key=button.reset/
/html:reset
would become
input type=reset value=Reset

And then tell us if you get the same error message, or a different one.

??



At 11:30 AM 2/25/2002 -0500, you wrote:
Sorry Tim,

I've only been learning this stuff for a couple of weeks myself. I don't
know what org.apache.struts.taglib.html.BEAN is referring to here. I was
just responding to what was obvious to me.

maybe one of the gurus will step in. the list seems pretty quiet today
though.

Good luck,
Dave D


- Original Message -
From: Tim Sawyer [EMAIL PROTECTED]


 Dderry [EMAIL PROTECTED] wrote :

  Do you have an Action Mapping for saveExtraPersonDetails.do?

 Yes:

 actionpath=/saveExtraPersonDetails

type=com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPos
tAction
name=addExtraPersonDetailsForm
   scope=session
   input=/ExtraCustomerDetails.jsp
   forward name=success path=addJointHirer.do/
 /action

 but it doesn't even display the page, so it doesn't get that far.

 Does it use also use addExtraPersonDetailsForm?

 Yes, see above.

 Do you have a   type=package.addExtraPersonDetailsForm/.
 entry in struts-config.xml?

 Yes:

 form-bean  name=addExtraPersonDetailsForm

type=com.pancredit.tkbespoke.tjs.strutstest.form.AddExtraPersonDetailsForm
/

  It appears to me that the addExtraPersonDetailsForm is not being used
since
  the error msg states that org.apache.struts.taglib.html.BEAN has no
getter
  method for dob.

 I thought that too, but if I put the error handling back in, it finds it.
That suggests to me that  it is using the right form bean.  But if it is,
then why doesn't it work

 What is org.apache.struts.taglib.html.BEAN actually referring to?

 Tim.
 



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


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




Re: Request scope question again...

2002-02-25 Thread theron . kousek


Hi Dave:

I am very sorry again to keep asking questions about this. I think I am
finally starting to understand...   But please pardon my ignorance.

If you have the following scenario where all is defined as request scope:

1.   The user hits the submit button on FORM A and FORM A's  action
forwards to FORM B (which has input fields and another submit button).
2.   The User hits FORM B's submit button which throws back a report (in
html)

Are we looking at 2 different requests in the above scenario (request 1
ending when FORM B comes upand request 2 ending when the report data
comes back?). If we are looking at 2 different requests, that could
explain the problem I am having.

Is the submit action per-se (which calls another action when the submit
button is hit) the end-all of each request?

thanks,
Theron



   
  
dderry 
  
[EMAIL PROTECTED]To: Struts Users Mailing List 
[EMAIL PROTECTED]  
rg  cc:   
  
 Subject: Re: Request scope question 
again...
02/24/02   
  
07:41 PM   
  
Please 
  
respond to 
  
Struts Users   
  
Mailing List   
  
   
  
   
  



Yes. As I understand it, as long as the Action classes are performing
forwards rather than redirects it will all be handled on the server side in
the same request. It is only when a response is returned to the browser
that
the request will be ended. On the other hand, if a redirect is performed,
that is done by sending a response to the browser which somehow tells tells
the browser to request a different page. I don't know how this works
exactly, could be a header, but I really don't know.

The thing to keep in mind though is that a 'request' consists of the
browser
requesting a resource from the server, and the server responding back to
the
browser. Whatever happens on the server, no matter how many resources or
Actions process that request, it is all the same request until the response
is returned to the browser.

Glad to be able to help.

Dave D
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 3:57 PM
Subject: Re: Request scope question again...



 Hi Dave:

 thanks so much.   This is helping.   I think I know the answer to this
 question but can you verify this with me:

 - Based on what you said:
  Request scope changes when the browser makes a request of the server.

 Does this mean that invoking an http request to bring up a JSP page or
 HTML page will start a brand new request?.   And if the entry point JSP
 page (say http://localhost:8080/test/login.jsp) calls actions (that can
 forward to other jsp pages) that call other actions (that can forward
to
 other jsp pages) that call other actions (that can forward to other jsp
 pages) and so forth, that all of those actions (regardless of how many
JSP
 pages were brought up in those actions ActionForward mappings) are all
a
 part of the same request (which could have been something like
 http://localhost:8080/test/login.jsp)

 thanks so much,
 Theron





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




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




RE: Request scope question again...

2002-02-25 Thread Jakkampudi, ChandraseKhar

Yes and no. In the scenario you outlined, there are two requests. TThe
original request ends when the response comes back to the browser not when
you press submit. Throughout all of your action, the request is still the
same.
A new request is started when you hit submit again on form B.

Hope that helps.

-JC

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 3:56 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: Request scope question again...



Hi Dave:

I am very sorry again to keep asking questions about this. I think I am
finally starting to understand...   But please pardon my ignorance.

If you have the following scenario where all is defined as request scope:

1.   The user hits the submit button on FORM A and FORM A's  action
forwards to FORM B (which has input fields and another submit button).
2.   The User hits FORM B's submit button which throws back a report (in
html)

Are we looking at 2 different requests in the above scenario (request 1
ending when FORM B comes upand request 2 ending when the report data
comes back?). If we are looking at 2 different requests, that could
explain the problem I am having.

Is the submit action per-se (which calls another action when the submit
button is hit) the end-all of each request?

thanks,
Theron



 

dderry

[EMAIL PROTECTED]To: Struts Users Mailing List
[EMAIL PROTECTED]  
rg  cc:

 Subject: Re: Request scope
question again...
02/24/02

07:41 PM

Please

respond to

Struts Users

Mailing List

 

 




Yes. As I understand it, as long as the Action classes are performing
forwards rather than redirects it will all be handled on the server side in
the same request. It is only when a response is returned to the browser
that
the request will be ended. On the other hand, if a redirect is performed,
that is done by sending a response to the browser which somehow tells tells
the browser to request a different page. I don't know how this works
exactly, could be a header, but I really don't know.

The thing to keep in mind though is that a 'request' consists of the
browser
requesting a resource from the server, and the server responding back to
the
browser. Whatever happens on the server, no matter how many resources or
Actions process that request, it is all the same request until the response
is returned to the browser.

Glad to be able to help.

Dave D
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 3:57 PM
Subject: Re: Request scope question again...



 Hi Dave:

 thanks so much.   This is helping.   I think I know the answer to this
 question but can you verify this with me:

 - Based on what you said:
  Request scope changes when the browser makes a request of the server.

 Does this mean that invoking an http request to bring up a JSP page or
 HTML page will start a brand new request?.   And if the entry point JSP
 page (say http://localhost:8080/test/login.jsp) calls actions (that can
 forward to other jsp pages) that call other actions (that can forward
to
 other jsp pages) that call other actions (that can forward to other jsp
 pages) and so forth, that all of those actions (regardless of how many
JSP
 pages were brought up in those actions ActionForward mappings) are all
a
 part of the same request (which could have been something like
 http://localhost:8080/test/login.jsp)

 thanks so much,
 Theron





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




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

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




Navigation (save first)

2002-02-25 Thread @Basebeans.com

Subject: Navigation (save first)
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
Let's say a user enters some data on a form.
And then click on a menu to go to some other from.

I want to ... interrupt this and ask Do you want to save? If yes, than 
call save method on a formBean, and then go to the new page (unless 
validation).
What is a good way?

tia, Vic
(thanks in advance)


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




RE: Navigation (save first)

2002-02-25 Thread Robert

Almost sounds like you would want to capture this using JavaScript and
depending on if the user says 'yes' to the save, then submit the form,
otherwise go on to their menu-page.

The flip side might be to have all requests go to one action, which can
then determine if the form data has changed, send a response back to the
client saying 'save or no save', etc. 

Might be easier at the client and less trips to the server.

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] 
Sent: Monday, February 25, 2002 4:25 PM
To: [EMAIL PROTECTED]
Subject: Navigation (save first)

Subject: Navigation (save first)
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
Let's say a user enters some data on a form.
And then click on a menu to go to some other from.

I want to ... interrupt this and ask Do you want to save? If yes, than

call save method on a formBean, and then go to the new page (unless 
validation).
What is a good way?

tia, Vic
(thanks in advance)


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



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




Re: Struts Validator help

2002-02-25 Thread David Winterfeldt

It is keyed on the property, not the message resource
key.  So it would be the same as the property for you
html:text tag.

html:errors property=email /

This would represent getEmail/setEmail.

David

--- [EMAIL PROTECTED] wrote:
 Hi,
 
 I'm new to Struts and Struts Validator.  I have been
 able to setup struts and the validator package to
 work properly on my machine.  I'm having trouble
 however with getting and displaying the error
 message properly.  I can display them at the top of
 the page using html:errors/ tag but I would like
 to be able to place the errors individually at
 different places in the page.  I tried  
 html:errors
 property=registrationForm.email.displayname / but
 this doesn't seem to be working.  The line in the
 resource file is:
 registrationForm.email.displayname=E-mail.  I
 think the key is not in the collection of errors. 
 Is there a way to see what keys are available in
 that collection.   I do not have specific
 error.propname=... entry in the resource file.  Is
 that needed?
 
 Thank you.
 
 Bill
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




Re: help with logic:iterate

2002-02-25 Thread Arron Bates

You're basically using the markup of the nested tags. If you have the 
nightly build change your iterate tag to...

nested:iterate property=columnNameList

...and your text tag to
nested:text property=columnName /

...and of course don't forget to close the iterate tag with the /nested:iterate


If you're not on the nightly build, you can get the download from here...
http://www.keyboardmonkey.com/struts

It simply makes quick work of iterating and nesting beans as you are here.


Arron.


Sriram Nookala wrote:

I have the following snippet of code in my jsp:

logic:iterate id=columnName name=ParticipantImportWizardForm
 property=columnNameList

table border=1 width=80%
tr
td width=50%h3 align=centerColumn Name/h3
/td
td width=50%h3 align=centerType/h3
/td
/tr
tr
td width=50%html:text property=columnName //td
td width=50%
pnbsp;/p
/td
/tr


I get the error No getter method for property columnName of bean 
org.apache.struts.taglib.html.BEAN.

columnNameList is a collection of Strings. I can't figure out what I have to set the 
name and property attributes of html:text in this case.




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




Next 'production' release

2002-02-25 Thread Eddie Bush

Hello - just curious if you all had an ETA for the next 'production' release of 
Struts.  I like several of the features being discussed here, but we don't really want 
our projects to rely upon a 'Nightly Build'.

Thanks so much =)

Eddie



MORE help with logic:iterate

2002-02-25 Thread Saeid Zoonematkermani

Hello all;

I am sorry to bring this up again but I have looked at the docs and the 
archives and I think I am following the instruction found in these but I 
still can't get the iterate tag to work correctly. So I wanted to post this 
question and see if I understand the methodology and hopefully figure out 
what is wrong. I using struts-1.0.2.

Let's say that I want to display a list of students. From the link (Display 
Students) on page 1, I go to DisplayStudentsAction which goes to the 
database and gets the list of students. I have a StudentBean with 2 
properties; name and id. The action gets the result set from the database, 
populates one bean at a time and adds them to a vector. At the end, I have 
a vector of StudentBeans. I put the vector in a session attribute called 
student_list and forward to page 2.

On page 2, I try to use the iterate tag to display a table of students and 
I have tried all variations of id, name, and property I can think of and 
some kind of error always shows up. Snippet of the JSP:

table
   tr
 tdNAME/td
 tdID/td
   /tr
   logic:iterate id=student name=student_list scope=session
   tr
 td
   bean:write name=student property=name filter=true/
 /td
 td
   bean:write name=student property=id filter=true/
 /td
   /tr
   /logic:iterate
/table


Some of the things I have done which were unsuccessful:
- Added
jsp:useBean id=student scope=page type=packageName.StudentBean/
or
jsp:useBean id=student scope=session type=packageName.StudentBean/
to the top of the JSP and still no use...

The error I am getting most of the time is:
javax.servlet.ServletException: bean student not found within scope

Any help would be appreciated. I have read in the emails that nested tags 
might be the way to go but I need to stay with an officially released 
version of struts.

Thanks in advance,

- Saeid





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




Logging in beans

2002-02-25 Thread Charlie Toohey

I would like to log some information in the Tomcat log file from my beans. 
But I don't want to use the ActionServlet log method, as passing an 
ActionServlet object as a parameter to a bean would violate the bean 
philosophy that beans should be completely independent of a web application 
framework, such as Struts, for reusability. How could I just pass in the 
Stream to the Tomcat log file to a bean so that it can log to the Stream and 
maintain its web app framework independence ?

Thanks,
Charlie

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




RE: How to use html:radio? Take two

2002-02-25 Thread SUPRIYA MISRA

did you reset the button to null on action form?


From: Maturo, Larry [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: How to use html:radio?  Take two
Date: Mon, 25 Feb 2002 11:06:22 -0600

Well, I got no reply the first time I posted this,
but then that was on a Friday, so here goes again.

I am trying to create a table of radio buttons.  Each row looks
something like:

Required Exempt Done   Gate
O   O  * Repository Link

where the O represents an unchecked radio button
and the * represents a check one.  I have an ArrayList
of beans.  Each bean has a status string field and a gate
string field, where status is always one of REQUIRED,
EXEMPT, or DONE.  My table displays properly, and I can
change which radio button is selected.  However, when I
make a change to one of the radio buttons and submit my
form, the list I get back is identical to the
one I sent in.  Below is what's in my jsp:

table border=
   tr
 td colspan=3bbigcenterStatus/center/big/b/td
 td/td
 /tr
   tr
 td align=center width=80bRequired/b/td
 td align=center width=80bExempt/b/td
 td align=center width=80bDone/b/td
 td align=center width=150bbigGate/big/b/td
   /tr
 logic:iterate id=ppg name=%= Constants.PROJECT_PROCESS_GATE_LIST
% scope=session

type=com.athensgroup.model.ProjectProcessGate
   tr
 td
   center
 html:radio name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.REQUIRED.getMnemonic() % indexed=true /
   /center
 /td
 td
   center
html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.EXEMPT.getMnemonic() % indexed=true /
   /center
 /td
 td
   center
 html:radio  name=ppg property=%= ProjectForm.STATUS %
value=%=
ProcessStatus.DONE.getMnemonic() % indexed=true /
   /center
 /td
 td
  center
bean:write name=ppg property=%= ProjectForm.GATE % /
  /center
/td
   /tr
   /logic:iterate
   /table

In my action class I have
request.getSession().setAttribute(Constants.PROJECT_PROCESS_GATE_LIST,ppgLis
t);

After I submit my form I get the list back, in my action, with:
ppgList = (ArrayList)
request.getSession().getAttribute(Constants.PROJECT_PROCESS_GATE_LIST);

Why is this list identical to when it was sent in?

-- Larry Maturo
[EMAIL PROTECTED]


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





_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




RE: Logging in beans

2002-02-25 Thread Phase Web and Multimedia

log4j would work well. Schedule away a day or so to become familiar with it
and download the 1.2b3 version. This will insure that you are prepared for
the future changes in log4j and will keep you from programming with
deprecated code.

http://jakarta.apache.org/log4j/

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Charlie Toohey [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 7:28 PM
To: [EMAIL PROTECTED]
Subject: Logging in beans


I would like to log some information in the Tomcat log file from my beans.
But I don't want to use the ActionServlet log method, as passing an
ActionServlet object as a parameter to a bean would violate the bean
philosophy that beans should be completely independent of a web application
framework, such as Struts, for reusability. How could I just pass in the
Stream to the Tomcat log file to a bean so that it can log to the Stream and
maintain its web app framework independence ?

Thanks,
Charlie

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



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




Re: MORE help with logic:iterate

2002-02-25 Thread Arron Bates

In the nightly build, the nested tags will make easy work of this for 
you, simply swapping the tag header name a little to the following...
nested:iterate property=myStudentListProperty
nested:write property=name /
/nested:iterate

(no, you don't have to mess around with the id's and all that. Quite easy)

To get it working on your 1.02 build gor here and get the 1.0 jar...
http://www.keyboardmonkey.com/struts

And it will be waiting for you in the next release of Struts when you 
upgrade (or you can just keep using the separate jar :)
The above link also has a tutorial if you get a little stuck about any 
of it.

Arron.

Saeid Zoonematkermani wrote:

 Hello all;

 I am sorry to bring this up again but I have looked at the docs and 
 the archives and I think I am following the instruction found in these 
 but I still can't get the iterate tag to work correctly. So I wanted 
 to post this question and see if I understand the methodology and 
 hopefully figure out what is wrong. I using struts-1.0.2.

 Let's say that I want to display a list of students. From the link 
 (Display Students) on page 1, I go to DisplayStudentsAction which goes 
 to the database and gets the list of students. I have a StudentBean 
 with 2 properties; name and id. The action gets the result set from 
 the database, populates one bean at a time and adds them to a vector. 
 At the end, I have a vector of StudentBeans. I put the vector in a 
 session attribute called student_list and forward to page 2.

 On page 2, I try to use the iterate tag to display a table of students 
 and I have tried all variations of id, name, and property I can think 
 of and some kind of error always shows up. Snippet of the JSP:

 table
 tr
 tdNAME/td
 tdID/td
 /tr
 logic:iterate id=student name=student_list scope=session
 tr
 td
 bean:write name=student property=name filter=true/
 /td
 td
 bean:write name=student property=id filter=true/
 /td
 /tr
 /logic:iterate
 /table


 Some of the things I have done which were unsuccessful:
 - Added
 jsp:useBean id=student scope=page type=packageName.StudentBean/
 or
 jsp:useBean id=student scope=session 
 type=packageName.StudentBean/
 to the top of the JSP and still no use...

 The error I am getting most of the time is:
 javax.servlet.ServletException: bean student not found within scope

 Any help would be appreciated. I have read in the emails that nested 
 tags might be the way to go but I need to stay with an officially 
 released version of struts.

 Thanks in advance,

 - Saeid





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





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




Re: help with logic:iterate

2002-02-25 Thread Sriram Nookala

The following worked for me:

nested:iterate property=columnNameList
 tr
td
  nested:text property=this/ /
/td


However if I have another String collection called columnTypeList which has
the same length as the columnNameList and which also I'd like to populate
and display with text boxes, how would I implement that. I'd put my question
as how would I loop thru another collection along with the collection
mentioned in the nested:iterate tag?
- Original Message -
From: Arron Bates [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 5:59 PM
Subject: Re: help with logic:iterate


 You're basically using the markup of the nested tags. If you have the
 nightly build change your iterate tag to...

 nested:iterate property=columnNameList

 ...and your text tag to
 nested:text property=columnName /

 ...and of course don't forget to close the iterate tag with the
/nested:iterate


 If you're not on the nightly build, you can get the download from here...
 http://www.keyboardmonkey.com/struts

 It simply makes quick work of iterating and nesting beans as you are here.


 Arron.


 Sriram Nookala wrote:

 I have the following snippet of code in my jsp:
 
 logic:iterate id=columnName name=ParticipantImportWizardForm
  property=columnNameList
 
 table border=1 width=80%
 tr
 td width=50%h3 align=centerColumn Name/h3
 /td
 td width=50%h3 align=centerType/h3
 /td
 /tr
 tr
 td width=50%html:text property=columnName //td
 td width=50%
 pnbsp;/p
 /td
 /tr
 
 
 I get the error No getter method for property columnName of bean
org.apache.struts.taglib.html.BEAN.
 
 columnNameList is a collection of Strings. I can't figure out what I have
to set the name and property attributes of html:text in this case.
 



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




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




Re: help with logic:iterate

2002-02-25 Thread Arron Bates

If you model it the other way (ie: a collections of objects that 
individual properties for each column. eg: ResultSet style) it will be 
much easier. Then you can point the iterate tag's property at the 
collection, and then use the nested text tags to show each of the 
properties within each bean.

Makes like _much_ easier to manage.

Arron.

Sriram Nookala wrote:

The following worked for me:

nested:iterate property=columnNameList
 tr
td
  nested:text property=this/ /
/td


However if I have another String collection called columnTypeList which has
the same length as the columnNameList and which also I'd like to populate
and display with text boxes, how would I implement that. I'd put my question
as how would I loop thru another collection along with the collection
mentioned in the nested:iterate tag?
- Original Message -
From: Arron Bates [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 5:59 PM
Subject: Re: help with logic:iterate


You're basically using the markup of the nested tags. If you have the
nightly build change your iterate tag to...

nested:iterate property=columnNameList

...and your text tag to
nested:text property=columnName /

...and of course don't forget to close the iterate tag with the

/nested:iterate


If you're not on the nightly build, you can get the download from here...
http://www.keyboardmonkey.com/struts

It simply makes quick work of iterating and nesting beans as you are here.


Arron.


Sriram Nookala wrote:

I have the following snippet of code in my jsp:

logic:iterate id=columnName name=ParticipantImportWizardForm
property=columnNameList

table border=1 width=80%
   tr
   td width=50%h3 align=centerColumn Name/h3
   /td
   td width=50%h3 align=centerType/h3
   /td
   /tr
   tr
   td width=50%html:text property=columnName //td
   td width=50%
   pnbsp;/p
   /td
   /tr


I get the error No getter method for property columnName of bean

org.apache.struts.taglib.html.BEAN.

columnNameList is a collection of Strings. I can't figure out what I have

to set the name and property attributes of html:text in this case.



--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]

For additional commands, e-mail:

mailto:[EMAIL PROTECTED]




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





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




RE: help with logic:iterate

2002-02-25 Thread klaus . bucka-lassen

Hi

Maybe I completely lost the context, but as far as I can see, you haven't 
wrapped the html:text within a html:form tag, right? If you just want to 
output text to the HTML page you're generating use bean:write 
name=columnName instead.

Using html:text for user-input within an iterator is a completely different 
story which includes indexed properties and scriptlets.

Regards,
Klaus Bucka-Lassen
aragost, Switzerland


-Original Message-
From: struts-user-digest-help
[mailto:[EMAIL PROTECTED]]
Sent: Montag, 25. Februar 2002 17:32
To: struts-user
Cc: srinookala
Subject: help with logic:iterate


I have the following snippet of code in my jsp:

logic:iterate id=columnName name=ParticipantImportWizardForm
 property=columnNameList

table border=1 width=80%
tr
td width=50%h3 align=centerColumn Name/h3
/td
td width=50%h3 align=centerType/h3
/td
/tr
tr
td width=50%html:text property=columnName //td
td width=50%
pnbsp;/p
/td
/tr


I get the error No getter method for property columnName of bean 
org.apache.struts.taglib.html.BEAN.

columnNameList is a collection of Strings. I can't figure out what I have to 
set the name and property attributes of html:text in this case.


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




logic tag: checking presense of key or value in a map?

2002-02-25 Thread Torgeir Veimo

Is there a simple way of checking wether a map contains a given key or 
value?

I tried something like

logic:equal name=child property=properties.key value=keyname
/logic:equal

but I'm not shure if what I'm trying to do is supported. (The child 
bean has a method Map getProperties().)

-- 
-Torgeir


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