RE: ActionForm is not automatically popluated.

2004-01-14 Thread hgosper
Are you casting the ActionForm in to your own form in your save action?

like:

public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
throws Exception 
   {
MyForm myForm = (MyForm) form;
   }


Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.







"Richard Hightower" <[EMAIL PROTECTED]>
15/01/2004 03:14 PM
Please respond to "Struts Users Mailing List"

 
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
cc: 
Subject:RE: ActionForm is not automatically popluated.




-Original Message-



Hi,

I have a tomcat/struts/velocity application that uses a
fairly standard ActionForm bean to validate user input.
My problem is that none of the fields in the ActionForm
bean become populated when the user submits the form.

I can retrieve the values from the form in the pRequest
parameter to the ActionForm.validate() method. The name
of the get/setFoo() methods in the ActionForm bean
matches the names of the fields in the submitted form.

What could be the problem?

JDK version 1.4.2_02
Tomcat version 4.0.6
Struts version 1.1

--
Regards
André Risnes

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



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








RE: ActionForm is not automatically popluated.

2004-01-14 Thread Richard Hightower
I'd start by getting log4j and turning on full debug logging.

Study the logs of a working form.

Study the logs of the form that does not work.

Rick Hightower
Developer

Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm

Struts/J2EE consulting --
http://www.arc-mind.com/consulting.htm#StrutsMentoring

-Original Message-
From: Andre Risnes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 10:05 AM
To: Struts Users Mailing List
Subject: ActionForm is not automatically popluated.


Hi,

I have a tomcat/struts/velocity application that uses a
fairly standard ActionForm bean to validate user input.
My problem is that none of the fields in the ActionForm
bean become populated when the user submits the form.

I can retrieve the values from the form in the pRequest
parameter to the ActionForm.validate() method. The name
of the get/setFoo() methods in the ActionForm bean
matches the names of the fields in the submitted form.

What could be the problem?

JDK version 1.4.2_02
Tomcat version 4.0.6
Struts version 1.1

--
Regards
André Risnes

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



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



Is there any master list of deprecated methods, and custom tag attributes? RE: low priority question about html:form

2004-01-14 Thread Richard Hightower
Is there any master list of deprecated methods, and custom tag attributes?

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 10:48 AM
To: Struts Users Mailing List
Subject: RE: low priority question about html:form


Quick note that the name, scope, and type attributes of  are
deprecated as of 1.1 and, AFAIK, have been removed in the current codebase.
So,
if there is a compelling use for them, it would be a good idea to address it
through Bugzilla ASAP.

Quoting Glenn Wilson <[EMAIL PROTECTED]>:

> Richard,
>
> It seems to me that this would be useful for run-time decisions about
where
> to "send" the form data.  Perhaps if a low-level user and an admin should
see
> the same html form, but the ActionForm that handles the admin's work
should
> be different.  i.e.:
>
> 
> 
>   
> 
> 
>
> 
> 
>
>  />
> 
>
> I'm not sure if the html:form can take dynamic params like that (never
tried
> it!) Regardless of the syntax, it seems like you could share the same JSP,
> subclass the ActionForm, and save yourself from creating a ton of
duplicate
> code.  You'd probably still have to add an ActionForm mapping in
> struts-config for each form, but at least you'd have only one JSP and
Action
> class.  Perhaps changing the scope dynamically like this could potentially
> change the ActionForm stored in the session as well?  Did I miss
something?
>
> Regards,
> Glenn
>
> -Original Message-
> From: Richard Hightower [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:11 AM
> To: Struts Users Mailing List
> Subject: RE: low priority question about html:form
>
>
> Oppsss
>
> the code listig should read:
>
>  name="myform"/>
>
>
> -Original Message-
> From: Richard Hightower [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 10:08 AM
> To: Struts Users Mailing List
> Subject: low priority question about html:form
>
>
>
> I assert the following:
> "You could override the ActionForm associated with this  by
> using the scope and type attribute. The scope specifies where to look for
> the ActionForm, and the type specifies what type of ActionForm it is,
i.e.,
> the fully qualified Java classname. This technique is not used in practice
> very often, but it is good to know that it exists."
>
> Example,
>
> 
>
> I've thought of a few reasons why you want to do this, but they seemed
> fairly lame. Can someone give me a valid use case where you would need
this
> feature?
>
> QUESTION: Why not just specify the Form in the action mapping?
>
>
> The  tag renders an HTML form. The  is associated
> with an action mapping by the action attribute. The action attribute
> specifies the path of the action mapping.  Therefore, when the user
submits
> the form the action associated with the ActionMapping will be invoked (if
> the form is valid). It is interesting that this tag inspect the
> ActionMapping and finds the ActionForm associated with the ActionMapping.
> If the ActionForm is in scope, the property values of the ActionForm will
> be
> rendered as the values in the HTML form field of the .  In
fact
> if the ActionMapping has an error (e.g., points to in valid ActionForm),
> the
> page with the  will never display until you fix the
> ActionMapping.

--
Kris Schneider 
D.O.Tech   

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


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



RE: low priority question about html:form

2004-01-14 Thread Richard Hightower
Good to know I guess I don't need to worry about it.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 10:48 AM
To: Struts Users Mailing List
Subject: RE: low priority question about html:form


Quick note that the name, scope, and type attributes of  are
deprecated as of 1.1 and, AFAIK, have been removed in the current codebase.
So,
if there is a compelling use for them, it would be a good idea to address it
through Bugzilla ASAP.

Quoting Glenn Wilson <[EMAIL PROTECTED]>:

> Richard,
>
> It seems to me that this would be useful for run-time decisions about
where
> to "send" the form data.  Perhaps if a low-level user and an admin should
see
> the same html form, but the ActionForm that handles the admin's work
should
> be different.  i.e.:
>
> 
> 
>   
> 
> 
>
> 
> 
>
>  />
> 
>
> I'm not sure if the html:form can take dynamic params like that (never
tried
> it!) Regardless of the syntax, it seems like you could share the same JSP,
> subclass the ActionForm, and save yourself from creating a ton of
duplicate
> code.  You'd probably still have to add an ActionForm mapping in
> struts-config for each form, but at least you'd have only one JSP and
Action
> class.  Perhaps changing the scope dynamically like this could potentially
> change the ActionForm stored in the session as well?  Did I miss
something?
>
> Regards,
> Glenn
>
> -Original Message-
> From: Richard Hightower [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:11 AM
> To: Struts Users Mailing List
> Subject: RE: low priority question about html:form
>
>
> Oppsss
>
> the code listig should read:
>
>  name="myform"/>
>
>
> -Original Message-
> From: Richard Hightower [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 10:08 AM
> To: Struts Users Mailing List
> Subject: low priority question about html:form
>
>
>
> I assert the following:
> "You could override the ActionForm associated with this  by
> using the scope and type attribute. The scope specifies where to look for
> the ActionForm, and the type specifies what type of ActionForm it is,
i.e.,
> the fully qualified Java classname. This technique is not used in practice
> very often, but it is good to know that it exists."
>
> Example,
>
> 
>
> I've thought of a few reasons why you want to do this, but they seemed
> fairly lame. Can someone give me a valid use case where you would need
this
> feature?
>
> QUESTION: Why not just specify the Form in the action mapping?
>
>
> The  tag renders an HTML form. The  is associated
> with an action mapping by the action attribute. The action attribute
> specifies the path of the action mapping.  Therefore, when the user
submits
> the form the action associated with the ActionMapping will be invoked (if
> the form is valid). It is interesting that this tag inspect the
> ActionMapping and finds the ActionForm associated with the ActionMapping.
> If the ActionForm is in scope, the property values of the ActionForm will
> be
> rendered as the values in the HTML form field of the .  In
fact
> if the ActionMapping has an error (e.g., points to in valid ActionForm),
> the
> page with the  will never display until you fix the
> ActionMapping.

--
Kris Schneider 
D.O.Tech   

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


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



RE: Multiple config files under single application

2004-01-14 Thread Richard Hightower
You can pass the config init-parameter a comma delimited list of config
files. The config files will be treated as one logical file.

Or, you can pass multiple config/name-of-modules to have struts modules.
Modules are like little mini-struts apps (they used to be called
subapplications). Modules can have their own resource bundles, plug in,
custom config objects, etc. that are private to that module.



Rick Hightower
Developer

Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm

Struts/J2EE consulting --
http://www.arc-mind.com/consulting.htm#StrutsMentoring

-Original Message-
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 11:28 AM
To: [EMAIL PROTECTED]
Subject: Multiple config files under single application
Importance: High


Hi,
   Is there anyway I can define multiple config files under a single
application ? any suggestions/inputs  would be hightly appreciated.

Thanks in advance.

-Ram


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



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



RE: Tiles scope problem

2004-01-14 Thread Richard Hightower
Check your action forward and make sure you don't have redirect="true".

Rick Hightower
Developer

Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm

Struts/J2EE consulting --
http://www.arc-mind.com/consulting.htm#StrutsMentoring

-Original Message-
From: Yogi_Shridhare/[EMAIL PROTECTED]
[mailto:Yogi_Shridhare/[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 1:58 PM
To: [EMAIL PROTECTED]
Subject: Tiles scope problem


Hi group

I have a quick question for you. I really appreciate your time on this.

We are trying to migrate our existing static JSP project to using Tiles.

The question is this.

I have a Struts action class calling a forward to one of the JSPs. This JSP
does the Tiles insert for the body attribute. The "body" jsp iterates
through the collection and tries to retrieve the properties of the
collection. When I do this with Session scope, it works fine but with
request scope it fails.
Is there any way to make this work with "request" scope?

Thanks.

Following is the simple set up.

file bcbsriLayout.jsp

<%@ page language="java" %>
...



...



File: eligibility.jsp (This jsp gets called from Struts action)

<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%
  session.setAttribute("navCode","GN2.02.01");
%>


  
   // the main JSP
calling the logic:iterate




../eligibility.jsp


  ...
  Access member properties   // *Error member not defined


File:testTile.xml

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




  
  
  
  
  
  



  
  
  
  
  







The members collection gets populated by an Action class. If I change the
above scope to "session" and change my action class accordingly, this
works. But I would like to get it working with scope as request.

can you suggest a solution?

Thanks a lot.

Yogi
We are running into a following problem.





**
MAILSWEEPER

This e-mail and any files transmitted with are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.  If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution
or taking of any action in reliance on the information
contained in this e-mail is prohibited.  If you have received
this e-mail in error, please immediately notify your e-mail
administrator.

Blue Cross & Blue Shield of Rhode Island
in state: 401.751.1673
out of state: 1.800.343.5743
**


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


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



RE: Autofill form page

2004-01-14 Thread Richard Hightower
To populate an ActionForm with a domain object so that it can be displayed
on an input JSP with html:form, you first have to create an action that is
called before the form:





Notice that we mapped in the form that the userForm will display, also
notice that validation is off. This form will be created and passed to the
execute method of ReadUserAction before the userForm.jsp service method is
called. This gives the code an opportunity to populate the form and put it
into scope so that the userForm.jsp's html:form tag can display it.
Here is an example of the ReadUserAction's execute method:

public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
   throws Exception {

//Get the user id of
String id = request.getParameter("id");

//Obtain the default DAOFactory
DAOFactory factory = DAOFactory.getDefaultfactory();

//Obtain the DAO for users
UserDAO userDAO = factory.getUserDAO();

//Retrieve the user from the database
UserDTO user = userDAO.getUser(id);

//Cast the form to a UserForm
UserForm userForm = (UserForm)form;

//Copy over the properties from the DTO to the form.
BeanUtils.copyProperties(userForm,user);

  }
...


Notice that the action does not create a new UserForm. It did not need to
because the action mapping caused a form to be created. The code looks up
the user based on an ID that was passed as a request parameter. Then it uses
BeanUtils.copyProperties (org.apache.commons.beanutils.BeanUtils) to copy
the domain objects properties to the userForm. The userForm properties
should all be of type String (Strings are best for validation). The domain
objects properties can be any primitive type or wrapper objects (BeanUtils
will perform the type conversion automatically).



Rick Hightower
Developer

Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm
Struts/J2EE consulting --
http://www.arc-mind.com/consulting.htm#StrutsMentoring


-Original Message-
From: Peter Verhoye [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 3:48 PM
To: [EMAIL PROTECTED]
Subject: Autofill form page


Hi all,

I'm just starting with struts and stumbled upon a problem.

I have a page called page1. This page shows a list of records in a table
(the list is stored as a collection received from the Action).
Now, per record in the table, there is a link on which you can click and
should display then a new page were you have the details of that record.
Now, I can show a blank new form page but the problem is I want to show the
form with the data from the record already filled in (so checkboxes checked,
combo-boxes selected on the correct entry etc...)

Can someone point me in the correct direction? I have been unable to find a
good solutions for this.

Thank you very much for the help!!

BB
Peter


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



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



Design problem......

2004-01-14 Thread Prashanth.S
Hi all,
I am facing one critical design problemI have a page wherein user can add,delete 
and modify diffrent categories i.e it is like a hierarchial tree structure which can 
go upto any level i.e nth levelhow to obtain information???do i need to use 
database or is there are any other methods
Thanks
suman


-
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

RE: Multiple formfile uploads - howto?

2004-01-14 Thread Andrew Hill
There have been quite a few threads on this topic.
If you search the archives you should be able to find some tips on how to do
it.
http://marc.theaimsgroup.com/?l=struts-user&w=2&r=1&s=multiple+file+upload&q
=b

-Original Message-
From: Darren Hartford [mailto:[EMAIL PROTECTED]
Sent: Thursday, 15 January 2004 05:15
To: [EMAIL PROTECTED]
Subject: FW: Multiple formfile uploads - howto?


Hey all,
With a simple JSP page with just one  tag I can easily load
a file into a FormFile object into my Form (with normal getter and setter),
and then use an Action to work with the Form.

But, when trying to make this simple JSP page display 1-N
 tags to load up many files, the system breaks in
between the JSP page and the Form, never reaching the Action.  I have not
had success with FormFile[], HashMap, etc.

==JSP code==




filename
















==Form code==
public class UploadForm extends BaseForm {

/*HashMap doesn't work*/
protected java.util.HashMap mystuff = new HashMap();
public HashMap getMystuff() {
  return mystuff;
}
public void setMystuff(HashMap mystuff) {
  this.mystuff = mystuff;
}

/*FormFile[] doesn't work*/
protected FormFile[] mystuff;
public FormFilegetMystuff() {
  return mystuff;
}
public void setMystuff(FormFilemystuff) {
  this.mystuff = mystuff;
}


==ERROR==
argument type mismatch

Has anyone been successful in uploading an unknown number of files at once
through Struts, or is Struts unable to handle this?

TIA!
-D

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



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



RE: Struts Validator overriding cache-control?

2004-01-14 Thread Brown, James
Thanks.  I was confused by the fact that the behaviour is different if the page is 
submitted without error.  In the without-error scenario, the "re-post" as the result 
of the refresh does not contain the form values that would logically be contained in 
the "with-error" scenario.  Now, I just need to work myself out of the corner I am in 
- I need to prevent the refresh from redisplaying this data which I think is darn near 
imposibble.

  Cheers,
  James

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers. 


> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: 2004 January 14 21.57
> To: Struts Users Mailing List
> Subject: Re: Struts Validator overriding cache-control?
> 
> 
> The sequence you described is the expected behavior.
> Comments below.
> 
> --- "Brown, James" <[EMAIL PROTECTED]> wrote:
> > We have encountered a situation wherein it appears that the 
> server-side
> > validation provided by the struts-validator and that of
> > ValidatorForm.validate(...) appears to be overriding the 
> controller's nocache
> > value.
> > 
> > The scenario we have encountered is follows:
> >   1. user enters data on a page that is backed by a 
> subclass of ValidatorForm
> >   2. form is submitted but one of either server-side 
> validation for a required
> > field (set via the struts validator plugin) or the 
> ValidatorForm.validate(...)
> > method returns and ActionError.
> My guess is the form was submitted using METHOD=POST.
> >   3. the page is redisplayed with the appropriate error message(s).
> This page is the result of a submitted form.
> >   4. the user corrects the form and submits.
> >   5. the subsequent (success) page is displayed.
> >   6. the user selects the browser's back button and 
> receives the IE "Warning:
> > Page has Expired" warning/error.
> When the user selects the back button, he is trying to 
> redisplay the page shown
> in step 3, which can only be displayed by resubmitting the 
> form.  IE will not
> resubmit a form without informing the user, and therefore 
> shows this warning to
> tell the user.
> >   7. the user refreshes the page via the F5 key or the 
> refresh button, and the
> > page as displayed in step 3 is redisplayed.
> This is expected because the form that was submitted in step 
> 2 was resubmitted by
> IE to display the page requested by the user.
> > 
> > Our controller is set to not cache any pages via:
> >   
> > 
> >   
> > 
> > The ValidatorForm/ActionForm's scope is also set to 
> request, thus the page
> > should be displayed empty.
> > 
> > This situation only occurs if the form is submitted with 
> data that fails
> > server-side validation and the page is redisplayed.  In a 
> true "success" path,
> > the page is displayed as desired - empty.
> > 
> > Any ideas?
> 
> Your user tried to redisplay the result of an errant form, 
> and so WILL get the
> page with the error message.  If you want to display an empty 
> form, perhaps to
> allow the user to enter another set of data, you can provide 
> a link which the
> user can follow for a fresh form, or display the form in step 
> 5 along with your
> "success" message.
> 
> > 
> >   Cheers,
> >   James
> 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: Struts Validator overriding cache-control?

2004-01-14 Thread Hubert Rabago
The sequence you described is the expected behavior.
Comments below.

--- "Brown, James" <[EMAIL PROTECTED]> wrote:
> We have encountered a situation wherein it appears that the server-side
> validation provided by the struts-validator and that of
> ValidatorForm.validate(...) appears to be overriding the controller's nocache
> value.
> 
> The scenario we have encountered is follows:
>   1. user enters data on a page that is backed by a subclass of ValidatorForm
>   2. form is submitted but one of either server-side validation for a required
> field (set via the struts validator plugin) or the ValidatorForm.validate(...)
> method returns and ActionError.
My guess is the form was submitted using METHOD=POST.
>   3. the page is redisplayed with the appropriate error message(s).
This page is the result of a submitted form.
>   4. the user corrects the form and submits.
>   5. the subsequent (success) page is displayed.
>   6. the user selects the browser's back button and receives the IE "Warning:
> Page has Expired" warning/error.
When the user selects the back button, he is trying to redisplay the page shown
in step 3, which can only be displayed by resubmitting the form.  IE will not
resubmit a form without informing the user, and therefore shows this warning to
tell the user.
>   7. the user refreshes the page via the F5 key or the refresh button, and the
> page as displayed in step 3 is redisplayed.
This is expected because the form that was submitted in step 2 was resubmitted by
IE to display the page requested by the user.
> 
> Our controller is set to not cache any pages via:
>   
> 
>   
> 
> The ValidatorForm/ActionForm's scope is also set to request, thus the page
> should be displayed empty.
> 
> This situation only occurs if the form is submitted with data that fails
> server-side validation and the page is redisplayed.  In a true "success" path,
> the page is displayed as desired - empty.
> 
> Any ideas?

Your user tried to redisplay the result of an errant form, and so WILL get the
page with the error message.  If you want to display an empty form, perhaps to
allow the user to enter another set of data, you can provide a link which the
user can follow for a fresh form, or display the form in step 5 along with your
"success" message.

> 
>   Cheers,
>   James



__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



looking for RBAC implementation

2004-01-14 Thread lixin chu
hi,
is there a reference implemntation of RBAC (Role based
access control - http://csrc.nist.gov/rbac/ ) for
Struts ?

thanks
li xin

__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



report in struts

2004-01-14 Thread Hari_s
Hi all
is there any reporting tools (for creating report) that can embedded in struts project 
that free of charge.?


Struts Validator overriding cache-control?

2004-01-14 Thread Brown, James
We have encountered a situation wherein it appears that the server-side validation 
provided by the struts-validator and that of ValidatorForm.validate(...) appears to be 
overriding the controller's nocache value.

The scenario we have encountered is follows:
  1. user enters data on a page that is backed by a subclass of ValidatorForm
  2. form is submitted but one of either server-side validation for a required field 
(set via the struts validator plugin) or the ValidatorForm.validate(...) method 
returns and ActionError.
  3. the page is redisplayed with the appropriate error message(s).
  4. the user corrects the form and submits.
  5. the subsequent (success) page is displayed.
  6. the user selects the browser's back button and receives the IE "Warning: Page has 
Expired" warning/error.
  7. the user refreshes the page via the F5 key or the refresh button, and the page as 
displayed in step 3 is redisplayed.

Our controller is set to not cache any pages via:
  

  

The ValidatorForm/ActionForm's scope is also set to request, thus the page should be 
displayed empty.

This situation only occurs if the form is submitted with data that fails server-side 
validation and the page is redisplayed.  In a true "success" path, the page is 
displayed as desired - empty.

Any ideas?

  Cheers,
  James

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers. 

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



RE: Combining and

2004-01-14 Thread Gopalakrishnan, Jayesh
The value is what you define in the tiles config or calling page using the
tiles:put.


only exports an already defined tiles variable named "title" into a struts
variable with the same name.

Any/all values that you pass with  can be made available for
struts tags by doing 
 OR 
You could look up the documentation of these tags for detailed info.


-jayash



-Original Message-
From: Derek Colley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 3:53 PM
To: 'Struts Users Mailing List'
Cc: Gopalakrishnan, Jayesh
Subject: RE: Combining  and 


Thanks Jayash,

[just to be clear]

So in the /layout/classic.jsp, the "name" in the  
refers to a variable (title) created by  ?
And the value in this (title) variable is passed in from the calling page?

Rgds,
Derek


> -Original Message-
> From: Gopalakrishnan, Jayesh 
> [mailto:[EMAIL PROTECTED] 
> Sent: 14 January 2004 23:23
> To: Struts Users Mailing List
> Subject: RE: Combining  and 
> 
> 
> you could do something like this.
> 
>  
>  
> 
> with ur tiles config entry looking likeuse the key 
> instead of text.
> 
> 
> 
> -jayash
> 
> -Original Message-
> From: Derek Colley [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: Combining  and 
> 
> 
> Dear Struts-User,
> 
> In all the Struts-Tiles examples, I see the following piece 
> of code for
> Tiles, e.g. for my "/about.jsp" page:
> 
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> 
> 
> < this is
> not international!
>   
>   
>   
>   
> 
> 
> In my application, the page titles are kept in the 
> Application.properties
> file so that they can be translated.
> 
> How can I put the results of  key="my.page.title" /> into the
> above scenario?
> 
> Many thanks,
> Derek
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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

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



RE: handling form based authentication w/ remember-me cookie

2004-01-14 Thread Dhaliwal, Pritpal (HQP)
Why not a have cookie field in the database table..

You generate a random string, put that as a cookie on the client. Now when
you get that cookie back, check if one of your users have that value stored
as a cookie. That's the user.

Pretty simple and no exposing users ids or passwords.


Pritpal Dhaliwal

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 5:28 AM
To: Struts Users Mailing List
Subject: Re: handling form based authentication w/ remember-me cookie



On Jan 14, 2004, at 3:52 AM, Nadeem Bitar wrote:
>
> A note about storing passwords in cookies.
> Encode the password.
> Do not store the userid with the password in the cookie, store some id 
> associated with the user id. You can generate a one-way hash (MD5) of 
> the contents of the cookie with
> a "secret key" only known to the server. This way when you get the
> cookie back you can compare it to make sure it wasn't altered.
>
> Many open source java projects store passwords in cookies insecurely 
> so beware of that if you are going to use that as reference.

I'm guilty of this - do you have code samples (or articles) of how to 
MD5-ify a String and get it's "secret code?"  I've been struggling with 
this for quite some time - a full example (storing "some id" vs. 
userid) is even more desirable.

Thanks,

Matt


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



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



RE: Combining and

2004-01-14 Thread Derek Colley
Thanks Jayash,

[just to be clear]

So in the /layout/classic.jsp, the "name" in the  
refers to a variable (title) created by  ?
And the value in this (title) variable is passed in from the calling page?

Rgds,
Derek


> -Original Message-
> From: Gopalakrishnan, Jayesh 
> [mailto:[EMAIL PROTECTED] 
> Sent: 14 January 2004 23:23
> To: Struts Users Mailing List
> Subject: RE: Combining  and 
> 
> 
> you could do something like this.
> 
>  
>  
> 
> with ur tiles config entry looking likeuse the key 
> instead of text.
> 
> 
> 
> -jayash
> 
> -Original Message-
> From: Derek Colley [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: Combining  and 
> 
> 
> Dear Struts-User,
> 
> In all the Struts-Tiles examples, I see the following piece 
> of code for
> Tiles, e.g. for my "/about.jsp" page:
> 
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> 
> 
> < this is
> not international!
>   
>   
>   
>   
> 
> 
> In my application, the page titles are kept in the 
> Application.properties
> file so that they can be translated.
> 
> How can I put the results of  key="my.page.title" /> into the
> above scenario?
> 
> Many thanks,
> Derek
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



Question with beans and nested tag

2004-01-14 Thread Bret Kumler
I have a question for you guys.

I have a bean that has an ArrayList in it.

MyBean{
  private ArrayList theResults;
  
public void setData (ArrayList x){
this.theResults=x;
}
public ArrayList getData (){
return this.theResults;
}

In my action I set the bean to the request.
httpServletRequest.setAttribute("gotcha", fb);

In the JSP page I want to display the values in the array.

Is this the correct syntax?


   
  
  
  
   



Thanks



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



RE: Combining and

2004-01-14 Thread Gopalakrishnan, Jayesh
you could do something like this.

 
   

with ur tiles config entry looking likeuse the key instead of text.



-jayash

-Original Message-
From: Derek Colley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 3:03 PM
To: [EMAIL PROTECTED]
Subject: Combining  and 


Dear Struts-User,

In all the Struts-Tiles examples, I see the following piece of code for
Tiles, e.g. for my "/about.jsp" page:

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

< this is
not international!
  
  
  
  


In my application, the page titles are kept in the Application.properties
file so that they can be translated.

How can I put the results of  into the
above scenario?

Many thanks,
Derek



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

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



Re: Autofill form page

2004-01-14 Thread Hubert Rabago
You can also check out examples on using ActionForm objects.  That is what
they're for.  

--- Peter Verhoye <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I'm just starting with struts and stumbled upon a problem.
> 
> I have a page called page1. This page shows a list of records in a table
> (the list is stored as a collection received from the Action).
> Now, per record in the table, there is a link on which you can click and
> should display then a new page were you have the details of that record.
> Now, I can show a blank new form page but the problem is I want to show the
> form with the data from the record already filled in (so checkboxes checked,
> combo-boxes selected on the correct entry etc...)
> 
> Can someone point me in the correct direction? I have been unable to find a
> good solutions for this.
> 
> Thank you very much for the help!!
> 
> BB
> Peter
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



Combining and

2004-01-14 Thread Derek Colley
Dear Struts-User,

In all the Struts-Tiles examples, I see the following piece of code for
Tiles, e.g. for my "/about.jsp" page:

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

< this is
not international!
  
  
  
  


In my application, the page titles are kept in the Application.properties
file so that they can be translated.

How can I put the results of  into the
above scenario?

Many thanks,
Derek



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



RE: Autofill form page

2004-01-14 Thread Matthias Wessendorf
hi...

perhaps you need a link like this:
to "get" the desired "record":


details


(you are using the logic:iterate ?)
regards,






-Original Message-
From: Peter Verhoye [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 11:48 PM
To: [EMAIL PROTECTED]
Subject: Autofill form page


Hi all,

I'm just starting with struts and stumbled upon a problem.

I have a page called page1. This page shows a list of records in a table
(the list is stored as a collection received from the Action). Now, per
record in the table, there is a link on which you can click and should
display then a new page were you have the details of that record. Now, I
can show a blank new form page but the problem is I want to show the
form with the data from the record already filled in (so checkboxes
checked, combo-boxes selected on the correct entry etc...)

Can someone point me in the correct direction? I have been unable to
find a good solutions for this.

Thank you very much for the help!!

BB
Peter


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


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



RE: Autofill form page

2004-01-14 Thread Matthias Wessendorf
hi peter
on our "show details action"

store the object in the request
and forward to "details-form"
and then do




greetings


-Original Message-
From: Peter Verhoye [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 11:48 PM
To: [EMAIL PROTECTED]
Subject: Autofill form page


Hi all,

I'm just starting with struts and stumbled upon a problem.

I have a page called page1. This page shows a list of records in a table
(the list is stored as a collection received from the Action). Now, per
record in the table, there is a link on which you can click and should
display then a new page were you have the details of that record. Now, I
can show a blank new form page but the problem is I want to show the
form with the data from the record already filled in (so checkboxes
checked, combo-boxes selected on the correct entry etc...)

Can someone point me in the correct direction? I have been unable to
find a good solutions for this.

Thank you very much for the help!!

BB
Peter


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


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



Autofill form page

2004-01-14 Thread Peter Verhoye
Hi all,

I'm just starting with struts and stumbled upon a problem.

I have a page called page1. This page shows a list of records in a table
(the list is stored as a collection received from the Action).
Now, per record in the table, there is a link on which you can click and
should display then a new page were you have the details of that record.
Now, I can show a blank new form page but the problem is I want to show the
form with the data from the record already filled in (so checkboxes checked,
combo-boxes selected on the correct entry etc...)

Can someone point me in the correct direction? I have been unable to find a
good solutions for this.

Thank you very much for the help!!

BB
Peter


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



RE: BeanUtils.populate Invocation Error

2004-01-14 Thread Mathew, Manoj
i tried to pre populate my self like this..It worked

public void setBenefitDescription(int key, Object value) {
  int size = benefitDescriptions.size();
  if (size <= key) {
for (int i = size; i < key + 1; i++) {
  benefitDescriptions.add(value);
}
  }
  benefitDescriptions.set(key, value);
}


Thank-you,
Manoj Mathew
GIS 515-362-0539


-Original Message-
From: Nathan Ewing [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 11:59 AM
To: 'Struts Users Mailing List'
Subject: RE: BeanUtils.populate Invocation Error


I figured out what is happening.  When you hit submit on the form, the
Struts populate method calls getProperty(int index), but never bothers to
actually do a setPropertyList (Property[]) beforehand, so the bean tries to
return a non-existent item in the array.  After I noticed this I looked back
in the forum and found out this is a common problem/bug in struts.

Nathan

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 11:30 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error

I've never tried putting a bean in a bean and then referring to itself,  
does the java stuff that can sniff bean properties deal with that.

The refraction or reflection stuff that bean utils does.



On 14 Jan 2004, at 15:24, Nathan Ewing wrote:

> Yes, except for 2 minor differences, I'm using an array[] instead of an
> ArrayList, and their the same bean, with two different actions, sorta  
> like
> the following:
>
> public class PropertyEditAction extends Action {
>   //Load, Display, and save one Property
> }
> public class PropertyListAction extends Action {
>   //Load, Display, and Save list of beans all at once
> }
> public class Property extends ActionForm {
>
>   private String blahItem;
>   private Property[] propertyList;
>
>   public Property() {
>   blahItem = null;
>   propertyList = null;
>   }
>
>   public String getBlahItem(){return blahItem;}
>   public void setBlahItem(String tempItem){blahItem = tempItem;}
>
>   public Property getPropertyList(int i) {
>   return propertyList[i];
>   }
>
>   public void setPropertyList(Property[] properties) {
>   propertyList = properties;
>   }
>   
>   public void setPropertyList(int i, Property property) {
>   propertyList[i] = property;
>   }
> }
>
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:58 AM
> To: Struts Users Mailing List
> Subject: Re: BeanUtils.populate Invocation Error
>
> So have you something like this?
>
> public class PropertyEditForm extends ActionForm {
>   //bla bla
>   
> }
>
> public class PropertyListForm extends ActionForm {
>
>   private ArrayList propertyList;
>
>   public PropertyListForm() {
>   this.propertyList = new ArrayList();
>   }
>
>   public PropertyEditForm getProperty(int i) {
>   return (PropertyEditForm) propertyList.get(i);
>   }
>
>   public void setProperties(Object[] properties) {
>   ..
>   }
>   
>   public void setProperty(int i, PropertyEditForm property) {
>   propertyList.add(i, property);
>   }
>
>
> }
>
>
>
> On 14 Jan 2004, at 14:38, Nathan Ewing wrote:
>
>> Basically all I have is 1 form bean that includes 2 arrays of itself
>> in it.
>>
>> When the app runs it gets 2 lists of the different categories of
>> SoldProperty and makes a jsp form that allows you to change certain
>> details
>> of the beans all at once, and then if you click on one of the beans
>> you can
>> edit them individually.
>>
>> There are actually two actions, one is PropertyList, which only loads
>> and
>> manages those two arrays of beans, and then there is PropertyEdit,
>> which
>> works on an individual bean, and ignores the two lists.
>>
>> I hope this makes sense.
>>
>> The code I posted below is a shortcut I put in all my beans.  I
>> overrode
>> ActionForm and put a couple extra functions in.  One of them
>> automatically
>> resets all the variables in the bean for me without having to manually
>> write
>> a reset function for every bean to do the same thing.
>>
>> The other changes the way validate works.  Instead of 1 function that
>> does
>> all the validating, I write individual validateAttributeName()
>> functions and
>> the code below just calls all of them for me.  Of course none of the
>> validate code matters, cause I didn't call it here (which makes me
>> wonder
>> why I bothered to post it).
>>
>> Somehow I doubt you are stupid :)
>>
>> I hope I didn't make all this sounds more complicated than it is.  All
>> I
>> really wanna do is allow the users of my site to check a bunch of
>> checkboxes
>> all at once for multiple records instead of opening them all
>> individually.
>>

Re: Multiple config files under single application

2004-01-14 Thread Hubert Rabago
An alternative would be to just provide multiple struts config files without
using modules.  In some cases, that might be preferable.

http://www.mail-archive.com/[EMAIL PROTECTED]/msg90132.html

--- e-denton Java Programmer <[EMAIL PROTECTED]> wrote:
> Yep, they are called application modules. You define multiple struts-configs
> in the web.xml.
> 
> This will get you started:
> http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html?page=2
> 
> Will
> 
> - Original Message - 
> From: "Ramadoss Chinnakuzhandai" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 14, 2004 12:27 PM
> Subject: Multiple config files under single application
> 
> 
> Hi,
>Is there anyway I can define multiple config files under a single
> application ? any suggestions/inputs  would be hightly appreciated.
> 
> Thanks in advance.
> 
> -Ram
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



FW: Multiple formfile uploads - howto?

2004-01-14 Thread Darren Hartford
Hey all,
With a simple JSP page with just one  tag I can easily load a file 
into a FormFile object into my Form (with normal getter and setter), and then use an 
Action to work with the Form.

But, when trying to make this simple JSP page display 1-N  tags to 
load up many files, the system breaks in between the JSP page and the Form, never 
reaching the Action.  I have not had success with FormFile[], HashMap, etc. 

==JSP code==




filename
















==Form code==
public class UploadForm extends BaseForm {

/*HashMap doesn't work*/
protected java.util.HashMap mystuff = new HashMap();
public HashMap getMystuff() {
  return mystuff;
}
public void setMystuff(HashMap mystuff) {
  this.mystuff = mystuff;
}

/*FormFile[] doesn't work*/
protected FormFile[] mystuff;
public FormFilegetMystuff() {
  return mystuff;
}
public void setMystuff(FormFilemystuff) {
  this.mystuff = mystuff;
}


==ERROR==
argument type mismatch

Has anyone been successful in uploading an unknown number of files at once through 
Struts, or is Struts unable to handle this?

TIA!
-D 

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



Re: Multiple config files under single application

2004-01-14 Thread e-denton Java Programmer
Yep, they are called application modules. You define multiple struts-configs
in the web.xml.

This will get you started:
http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html?page=2

Will

- Original Message - 
From: "Ramadoss Chinnakuzhandai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 12:27 PM
Subject: Multiple config files under single application


Hi,
   Is there anyway I can define multiple config files under a single
application ? any suggestions/inputs  would be hightly appreciated.

Thanks in advance.

-Ram


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



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



Re: Question: How do I put iterated radio buttons in the same group?

2004-01-14 Thread Kris Schneider
Try:



Quoting Eric Hodges <[EMAIL PROTECTED]>:

> I'm using nested:iterate to display a list of items in a table.  Each row
> shows on element of the list like this:
> 
> 
>   
> 
>   
> 
>   
> 
> 
> 
> I'd like to have one column that shows radio buttons and I'd like all of
> those buttons to be in the same group so only one of them can be selected
> at
> a time.  To do this I need them to have the same "name" property in the
> resulting HTML.  The problem is that their names take the form
> "account[index].master", where "index" has a different value on each row.
> This puts each radio button in it's own group and allows all of them to be
> selected at the same time.
> 
> Any ideas about how to make this work?

-- 
Kris Schneider 
D.O.Tech   

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



Tiles scope problem

2004-01-14 Thread Yogi_Shridhare/BCBSRI
Hi group

I have a quick question for you. I really appreciate your time on this.

We are trying to migrate our existing static JSP project to using Tiles.

The question is this.

I have a Struts action class calling a forward to one of the JSPs. This JSP
does the Tiles insert for the body attribute. The "body" jsp iterates
through the collection and tries to retrieve the properties of the
collection. When I do this with Session scope, it works fine but with
request scope it fails.
Is there any way to make this work with "request" scope?

Thanks.

Following is the simple set up.

file bcbsriLayout.jsp

<%@ page language="java" %>
...



...



File: eligibility.jsp (This jsp gets called from Struts action)

<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%
  session.setAttribute("navCode","GN2.02.01");
%>


  
   // the main JSP
calling the logic:iterate




../eligibility.jsp


  ...
  Access member properties   // *Error member not defined


File:testTile.xml

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




  
  
  
  
  
  



  
  
  
  
  







The members collection gets populated by an Action class. If I change the
above scope to "session" and change my action class accordingly, this
works. But I would like to get it working with scope as request.

can you suggest a solution?

Thanks a lot.

Yogi
We are running into a following problem.





**
MAILSWEEPER

This e-mail and any files transmitted with are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.  If you are not the intended recipient, 
you are hereby notified that any disclosure, copying, distribution
or taking of any action in reliance on the information 
contained in this e-mail is prohibited.  If you have received 
this e-mail in error, please immediately notify your e-mail 
administrator. 

Blue Cross & Blue Shield of Rhode Island 
in state: 401.751.1673
out of state: 1.800.343.5743 
**


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



RE: Included port numbers in web links e.g. 8080

2004-01-14 Thread Dan Snider
no, we are not


> -Original Message-
> From: Gopalakrishnan, Jayesh [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 3:37 PM
> To: Struts Users Mailing List
> Subject: RE: Included port numbers in web links e.g. 8080
> 
> 
> Are you using SSLext taglib by any chance?
> 
> 
> -Original Message-
> From: Dan Snider [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 12:32 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Included port numbers in web links e.g. 8080
> 
> 
> > If mod jk to working and configured then requests over port 
> > 80 for .do 
> > will be forwarded to mod_jk.
> 
> Yes, that works.
> 
> > If you are getting links with 8080 in the urls then my guess 
> > is you're 
> > not requesting pages over port 80 but 8080.
> 
> Requests that cause a problem are initiated by redirects. For example:
> 
>  
> 
> > So the first question is, is mod_jk working? and how do you 
> know this?
> 
> I would assume it is functioning fine as all the defined 
> Location's forward
> to Tomcat appropriately. Am I missing something?
> 
> 
> For example, this is our site:
> 
> http://www.objectdomain.com/
> 
> when the above is entered, the index.jsp is encountered that 
> contains the
> redirect. This results in the following URL:
> 
> http://www.objectdomain.com:8080/welcome.do
> 
> Note, if you manually remove the port from the above URL and 
> resubmit the
> request, the port is not re-inserted until it encounters a link with a
> forward (most, but not all, of our links are currently simple 
> HTML links,
> not forwards).
> 
> Dan
> 
> 
> > -Original Message-
> > From: Mark Lowe [mailto:[EMAIL PROTECTED]
> > 
> > Okay.. "Struts " doesn't do this at all but the http server 
> catalina, 
> > conveniently bundled with tomcat  does .. (I think i've got the 
> > catalina thing right) .
> > 
> > If mod jk to working and configured then requests over port 
> > 80 for .do 
> > will be forwarded to mod_jk.
> > 
> > If you are getting links with 8080 in the urls then my guess 
> > is you're 
> > not requesting pages over port 80 but 8080.
> > 
> > So the first question is, is mod_jk working? and how do you 
> know this?
> > 
> > 
> > On 14 Jan 2004, at 20:03, Mark Lowe wrote:
> > 
> > > Okay..
> > >
> > > You better go over the problem again, when you request a 
> *.do over 
> > > port 80 the links render with :8080 or do i not understand?
> > >
> > > On 14 Jan 2004, at 19:57, Dan Snider wrote:
> > >
> > >> we are using mod_jk2
> > >>
> > >>
> > >>> -Original Message-
> > >>>
> > >>>
> > >>> On 14 Jan 2004, at 18:54, Dan Snider wrote:
> > >>>
> > > For situations like Tomcat running behind an Apache HTTPD
> > > server, this normally
> > > gets taken care of you automatically.
> > 
> >  We have Tomcat running behind an Apache HTTPD and we are
> > >>> getting the
> >  port as
> >  well. Is there perhaps something we are missing in the
> > >>> configuration?
> > >>>
> > >>> What connector are you using mod_jserv? mod_jk?
> > >>>
> > >>>
> > 
> > > If you've got a
> > > different situation,
> > > you'll need to figure out how to tell your servlet container
> > > to adjust the
> > > server port it reports -- there's nothing Struts can 
> do to help.
> > 
> >  If configuration is not the solution, any suggestions on 
> > how to go
> >  about
> >  changing the reported port?
> > 
> >  To my mind, it is not so much that we want the servlet 
> > container to
> >  report a
> >  different port (after all, it is using that port), we just
> > >>> want struts
> >  to
> >  use a different port (80) for links. That is, we want to
> > >>> ensure routing
> >  through the front door (i.e., Apache). Would using a 
> Filter be a
> >  possible
> >  solution?
> > >>>
> > >>> If apache and tomcat are running on the same machine then
> > >>> there should
> > >>> be no issue, it will be a matter of having request for 
> *.do, *.jsp
> > >>> being mapped to the connector module.
> > >>>
> > >>> Cheers Mark
> > >>>
> > 
> >  Thanks,
> > 
> >  Dan
> > 
> > 
> > > -Original Message-
> > >
> > > Quoting "Gabriel W." <[EMAIL PROTECTED]>:
> > >
> > >> Hi,
> > >>
> > >> I am relatively new to this list so I do not know if this
> > > topic was discussed
> > >> before (I checked the archive and it does not appear 
> that way).
> > >>
> > >> It seems that Struts includes the ServerPort in web links
> > > if not of the
> > >> values 80 or 443 (e.g. http://mydomain.com:8080). In some
> > > cases this is not
> > >> the welcomed behavior.
> > >> Specifically if the Struts server is listening on Port
> > >>> 8080 behind a
> > >> firewall. The firewall receives the request from the outside
> > >> internet on port 80 and routes it to the machine listening
> > > on Port 8080.
> > >>
> > >> The 

Multiple config files under single application

2004-01-14 Thread Ramadoss Chinnakuzhandai
Hi,
   Is there anyway I can define multiple config files under a single 
application ? any suggestions/inputs  would be hightly appreciated.

Thanks in advance.

-Ram


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



Question: How do I put iterated radio buttons in the same group?

2004-01-14 Thread Eric Hodges
I'm using nested:iterate to display a list of items in a table.  Each row
shows on element of the list like this:


  

  

  



I'd like to have one column that shows radio buttons and I'd like all of
those buttons to be in the same group so only one of them can be selected at
a time.  To do this I need them to have the same "name" property in the
resulting HTML.  The problem is that their names take the form
"account[index].master", where "index" has a different value on each row.
This puts each radio button in it's own group and allows all of them to be
selected at the same time.

Any ideas about how to make this work?


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



RE: Included port numbers in web links e.g. 8080

2004-01-14 Thread Gopalakrishnan, Jayesh
Are you using SSLext taglib by any chance?


-Original Message-
From: Dan Snider [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 12:32 PM
To: 'Struts Users Mailing List'
Subject: RE: Included port numbers in web links e.g. 8080


> If mod jk to working and configured then requests over port 
> 80 for .do 
> will be forwarded to mod_jk.

Yes, that works.

> If you are getting links with 8080 in the urls then my guess 
> is you're 
> not requesting pages over port 80 but 8080.

Requests that cause a problem are initiated by redirects. For example:

 

> So the first question is, is mod_jk working? and how do you know this?

I would assume it is functioning fine as all the defined Location's forward
to Tomcat appropriately. Am I missing something?


For example, this is our site:

http://www.objectdomain.com/

when the above is entered, the index.jsp is encountered that contains the
redirect. This results in the following URL:

http://www.objectdomain.com:8080/welcome.do

Note, if you manually remove the port from the above URL and resubmit the
request, the port is not re-inserted until it encounters a link with a
forward (most, but not all, of our links are currently simple HTML links,
not forwards).

Dan


> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> 
> Okay.. "Struts " doesn't do this at all but the http server catalina, 
> conveniently bundled with tomcat  does .. (I think i've got the 
> catalina thing right) .
> 
> If mod jk to working and configured then requests over port 
> 80 for .do 
> will be forwarded to mod_jk.
> 
> If you are getting links with 8080 in the urls then my guess 
> is you're 
> not requesting pages over port 80 but 8080.
> 
> So the first question is, is mod_jk working? and how do you know this?
> 
> 
> On 14 Jan 2004, at 20:03, Mark Lowe wrote:
> 
> > Okay..
> >
> > You better go over the problem again, when you request a *.do over 
> > port 80 the links render with :8080 or do i not understand?
> >
> > On 14 Jan 2004, at 19:57, Dan Snider wrote:
> >
> >> we are using mod_jk2
> >>
> >>
> >>> -Original Message-
> >>>
> >>>
> >>> On 14 Jan 2004, at 18:54, Dan Snider wrote:
> >>>
> > For situations like Tomcat running behind an Apache HTTPD
> > server, this normally
> > gets taken care of you automatically.
> 
>  We have Tomcat running behind an Apache HTTPD and we are
> >>> getting the
>  port as
>  well. Is there perhaps something we are missing in the
> >>> configuration?
> >>>
> >>> What connector are you using mod_jserv? mod_jk?
> >>>
> >>>
> 
> > If you've got a
> > different situation,
> > you'll need to figure out how to tell your servlet container
> > to adjust the
> > server port it reports -- there's nothing Struts can do to help.
> 
>  If configuration is not the solution, any suggestions on 
> how to go
>  about
>  changing the reported port?
> 
>  To my mind, it is not so much that we want the servlet 
> container to
>  report a
>  different port (after all, it is using that port), we just
> >>> want struts
>  to
>  use a different port (80) for links. That is, we want to
> >>> ensure routing
>  through the front door (i.e., Apache). Would using a Filter be a
>  possible
>  solution?
> >>>
> >>> If apache and tomcat are running on the same machine then
> >>> there should
> >>> be no issue, it will be a matter of having request for *.do, *.jsp
> >>> being mapped to the connector module.
> >>>
> >>> Cheers Mark
> >>>
> 
>  Thanks,
> 
>  Dan
> 
> 
> > -Original Message-
> >
> > Quoting "Gabriel W." <[EMAIL PROTECTED]>:
> >
> >> Hi,
> >>
> >> I am relatively new to this list so I do not know if this
> > topic was discussed
> >> before (I checked the archive and it does not appear that way).
> >>
> >> It seems that Struts includes the ServerPort in web links
> > if not of the
> >> values 80 or 443 (e.g. http://mydomain.com:8080). In some
> > cases this is not
> >> the welcomed behavior.
> >> Specifically if the Struts server is listening on Port
> >>> 8080 behind a
> >> firewall. The firewall receives the request from the outside
> >> internet on port 80 and routes it to the machine listening
> > on Port 8080.
> >>
> >> The Struts machine in this case does not know the
> > difference and so includes
> >> the Port 8080.
> >>
> >> I looked at the Struts source code I assume is behind the logic
> >> (org.apache.struts.taglib.html.BaseTag), and it
> >> does not appear as though there is a configuration flag to
> > turn this logic
> >> on/off.
> >>
> >> Are there any considerations for such an option in the
> > future so that a
> >> firewalled site won't have to show 8080.
> >>
> >> NOTE: This is a situation where the Struts server does not
> > hav

RE: Included port numbers in web links e.g. 8080

2004-01-14 Thread Dan Snider
> If mod jk to working and configured then requests over port 
> 80 for .do 
> will be forwarded to mod_jk.

Yes, that works.

> If you are getting links with 8080 in the urls then my guess 
> is you're 
> not requesting pages over port 80 but 8080.

Requests that cause a problem are initiated by redirects. For example:

 

> So the first question is, is mod_jk working? and how do you know this?

I would assume it is functioning fine as all the defined Location's forward
to Tomcat appropriately. Am I missing something?


For example, this is our site:

http://www.objectdomain.com/

when the above is entered, the index.jsp is encountered that contains the
redirect. This results in the following URL:

http://www.objectdomain.com:8080/welcome.do

Note, if you manually remove the port from the above URL and resubmit the
request, the port is not re-inserted until it encounters a link with a
forward (most, but not all, of our links are currently simple HTML links,
not forwards).

Dan


> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> 
> Okay.. "Struts " doesn't do this at all but the http server catalina, 
> conveniently bundled with tomcat  does .. (I think i've got the 
> catalina thing right) .
> 
> If mod jk to working and configured then requests over port 
> 80 for .do 
> will be forwarded to mod_jk.
> 
> If you are getting links with 8080 in the urls then my guess 
> is you're 
> not requesting pages over port 80 but 8080.
> 
> So the first question is, is mod_jk working? and how do you know this?
> 
> 
> On 14 Jan 2004, at 20:03, Mark Lowe wrote:
> 
> > Okay..
> >
> > You better go over the problem again, when you request a *.do over 
> > port 80 the links render with :8080 or do i not understand?
> >
> > On 14 Jan 2004, at 19:57, Dan Snider wrote:
> >
> >> we are using mod_jk2
> >>
> >>
> >>> -Original Message-
> >>>
> >>>
> >>> On 14 Jan 2004, at 18:54, Dan Snider wrote:
> >>>
> > For situations like Tomcat running behind an Apache HTTPD
> > server, this normally
> > gets taken care of you automatically.
> 
>  We have Tomcat running behind an Apache HTTPD and we are
> >>> getting the
>  port as
>  well. Is there perhaps something we are missing in the
> >>> configuration?
> >>>
> >>> What connector are you using mod_jserv? mod_jk?
> >>>
> >>>
> 
> > If you've got a
> > different situation,
> > you'll need to figure out how to tell your servlet container
> > to adjust the
> > server port it reports -- there's nothing Struts can do to help.
> 
>  If configuration is not the solution, any suggestions on 
> how to go
>  about
>  changing the reported port?
> 
>  To my mind, it is not so much that we want the servlet 
> container to
>  report a
>  different port (after all, it is using that port), we just
> >>> want struts
>  to
>  use a different port (80) for links. That is, we want to
> >>> ensure routing
>  through the front door (i.e., Apache). Would using a Filter be a
>  possible
>  solution?
> >>>
> >>> If apache and tomcat are running on the same machine then
> >>> there should
> >>> be no issue, it will be a matter of having request for *.do, *.jsp
> >>> being mapped to the connector module.
> >>>
> >>> Cheers Mark
> >>>
> 
>  Thanks,
> 
>  Dan
> 
> 
> > -Original Message-
> >
> > Quoting "Gabriel W." <[EMAIL PROTECTED]>:
> >
> >> Hi,
> >>
> >> I am relatively new to this list so I do not know if this
> > topic was discussed
> >> before (I checked the archive and it does not appear that way).
> >>
> >> It seems that Struts includes the ServerPort in web links
> > if not of the
> >> values 80 or 443 (e.g. http://mydomain.com:8080). In some
> > cases this is not
> >> the welcomed behavior.
> >> Specifically if the Struts server is listening on Port
> >>> 8080 behind a
> >> firewall. The firewall receives the request from the outside
> >> internet on port 80 and routes it to the machine listening
> > on Port 8080.
> >>
> >> The Struts machine in this case does not know the
> > difference and so includes
> >> the Port 8080.
> >>
> >> I looked at the Struts source code I assume is behind the logic
> >> (org.apache.struts.taglib.html.BaseTag), and it
> >> does not appear as though there is a configuration flag to
> > turn this logic
> >> on/off.
> >>
> >> Are there any considerations for such an option in the
> > future so that a
> >> firewalled site won't have to show 8080.
> >>
> >> NOTE: This is a situation where the Struts server does not
> > have permission to
> >> listen on Port 80.
> >>
> >> Regards,
> >> Gabe
> >>
> >
> > Struts is basing its decision on the port returned by calling
> > ServletRequest.getServerPort() -- in other words, if you've
> > go

Re: Included port numbers in web links e.g. 8080

2004-01-14 Thread Mark Lowe
Okay.. "Struts " doesn't do this at all but the http server catalina, 
conveniently bundled with tomcat  does .. (I think i've got the 
catalina thing right) .

If mod jk to working and configured then requests over port 80 for .do 
will be forwarded to mod_jk.

If you are getting links with 8080 in the urls then my guess is you're 
not requesting pages over port 80 but 8080.

So the first question is, is mod_jk working? and how do you know this?

On 14 Jan 2004, at 20:03, Mark Lowe wrote:

Okay..

You better go over the problem again, when you request a *.do over 
port 80 the links render with :8080 or do i not understand?

On 14 Jan 2004, at 19:57, Dan Snider wrote:

we are using mod_jk2


-Original Message-

On 14 Jan 2004, at 18:54, Dan Snider wrote:

For situations like Tomcat running behind an Apache HTTPD
server, this normally
gets taken care of you automatically.
We have Tomcat running behind an Apache HTTPD and we are
getting the
port as
well. Is there perhaps something we are missing in the
configuration?

What connector are you using mod_jserv? mod_jk?



If you've got a
different situation,
you'll need to figure out how to tell your servlet container
to adjust the
server port it reports -- there's nothing Struts can do to help.
If configuration is not the solution, any suggestions on how to go
about
changing the reported port?
To my mind, it is not so much that we want the servlet container to
report a
different port (after all, it is using that port), we just
want struts
to
use a different port (80) for links. That is, we want to
ensure routing
through the front door (i.e., Apache). Would using a Filter be a
possible
solution?
If apache and tomcat are running on the same machine then
there should
be no issue, it will be a matter of having request for *.do, *.jsp
being mapped to the connector module.
Cheers Mark

Thanks,

Dan


-Original Message-

Quoting "Gabriel W." <[EMAIL PROTECTED]>:

Hi,

I am relatively new to this list so I do not know if this
topic was discussed
before (I checked the archive and it does not appear that way).

It seems that Struts includes the ServerPort in web links
if not of the
values 80 or 443 (e.g. http://mydomain.com:8080). In some
cases this is not
the welcomed behavior.
Specifically if the Struts server is listening on Port
8080 behind a
firewall. The firewall receives the request from the outside
internet on port 80 and routes it to the machine listening
on Port 8080.
The Struts machine in this case does not know the
difference and so includes
the Port 8080.

I looked at the Struts source code I assume is behind the logic
(org.apache.struts.taglib.html.BaseTag), and it
does not appear as though there is a configuration flag to
turn this logic
on/off.

Are there any considerations for such an option in the
future so that a
firewalled site won't have to show 8080.

NOTE: This is a situation where the Struts server does not
have permission to
listen on Port 80.

Regards,
Gabe
Struts is basing its decision on the port returned by calling
ServletRequest.getServerPort() -- in other words, if you've
got a server or
proxy that receives requests on port 80 and internally
redirects them to some
other port, there's absolutely no way that Struts can know
what the right port
number is unless your servlet container can tell it.
For situations like Tomcat running behind an Apache HTTPD
server, this normally
gets taken care of you automatically.  If you've got a
different situation,
you'll need to figure out how to tell your servlet container
to adjust the
server port it reports -- there's nothing Struts can do to help.
Craig McClanahan

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


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


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


Re: Bean Tag question

2004-01-14 Thread Ben Anderson
they're in the struts-el.jar which you can find in the /contrib/struts-el 
directoy of a struts binary distro.  Just throw that jar into /WEB-INF/lib 
and put these tag directives in your jsp's and you should be all set:

<%@ taglib prefix="bean-el"  
uri="http://jakarta.apache.org/struts/tags-bean-el"; %>
<%@ taglib prefix="html-el"  
uri="http://jakarta.apache.org/struts/tags-html-el"; %>
<%@ taglib prefix="logic-el" 
uri="http://jakarta.apache.org/struts/tags-logic-el"; %>

-Ben

From: "Henrique VIECILI" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Bean Tag question
Date: Wed, 14 Jan 2004 17:32:55 -0300
Ok, i will try it!

but, where can i download the struts-el.tld files??

i have not found them in the struts web site!

Thanx

Henrique

- Original Message -
From: "Ben Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 3:25 PM
Subject: RE: Bean Tag question
> you can't have a tag as an attribute for another tag.  How bout this?
>
> 
>
>
> >From: "Henrique VIECILI" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Bean Tag question
> >Date: Wed, 14 Jan 2004 16:14:49 -0300
> >
> >Hi,
> >
> >I am trying to access a bean property inside the arg0 attribute of
> >bean:message
> >tag, is that possible using only the standard taglibs? How?
> >
> >I´ve tried this code bellow and it didn´t work:
> >
> >
> >property="myParam" />" />
> >
> >Henrique
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> There are now three new levels of MSN Hotmail Extra Storage!  Learn 
more.
> http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Find out everything you need to know about Las Vegas here for that getaway.  
http://special.msn.com/msnbc/vivalasvegas.armx

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


Re: Included port numbers in web links e.g. 8080

2004-01-14 Thread Mark Lowe
Okay..

You better go over the problem again, when you request a *.do over port 
80 the links render with :8080 or do i not understand?

On 14 Jan 2004, at 19:57, Dan Snider wrote:

we are using mod_jk2


-Original Message-

On 14 Jan 2004, at 18:54, Dan Snider wrote:

For situations like Tomcat running behind an Apache HTTPD
server, this normally
gets taken care of you automatically.
We have Tomcat running behind an Apache HTTPD and we are
getting the
port as
well. Is there perhaps something we are missing in the
configuration?

What connector are you using mod_jserv? mod_jk?



If you've got a
different situation,
you'll need to figure out how to tell your servlet container
to adjust the
server port it reports -- there's nothing Struts can do to help.
If configuration is not the solution, any suggestions on how to go
about
changing the reported port?
To my mind, it is not so much that we want the servlet container to
report a
different port (after all, it is using that port), we just
want struts
to
use a different port (80) for links. That is, we want to
ensure routing
through the front door (i.e., Apache). Would using a Filter be a
possible
solution?
If apache and tomcat are running on the same machine then
there should
be no issue, it will be a matter of having request for *.do, *.jsp
being mapped to the connector module.
Cheers Mark

Thanks,

Dan


-Original Message-

Quoting "Gabriel W." <[EMAIL PROTECTED]>:

Hi,

I am relatively new to this list so I do not know if this
topic was discussed
before (I checked the archive and it does not appear that way).

It seems that Struts includes the ServerPort in web links
if not of the
values 80 or 443 (e.g. http://mydomain.com:8080). In some
cases this is not
the welcomed behavior.
Specifically if the Struts server is listening on Port
8080 behind a
firewall. The firewall receives the request from the outside
internet on port 80 and routes it to the machine listening
on Port 8080.
The Struts machine in this case does not know the
difference and so includes
the Port 8080.

I looked at the Struts source code I assume is behind the logic
(org.apache.struts.taglib.html.BaseTag), and it
does not appear as though there is a configuration flag to
turn this logic
on/off.

Are there any considerations for such an option in the
future so that a
firewalled site won't have to show 8080.

NOTE: This is a situation where the Struts server does not
have permission to
listen on Port 80.

Regards,
Gabe
Struts is basing its decision on the port returned by calling
ServletRequest.getServerPort() -- in other words, if you've
got a server or
proxy that receives requests on port 80 and internally
redirects them to some
other port, there's absolutely no way that Struts can know
what the right port
number is unless your servlet container can tell it.
For situations like Tomcat running behind an Apache HTTPD
server, this normally
gets taken care of you automatically.  If you've got a
different situation,
you'll need to figure out how to tell your servlet container
to adjust the
server port it reports -- there's nothing Struts can do to help.
Craig McClanahan

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


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


RE: Included port numbers in web links e.g. 8080

2004-01-14 Thread Dan Snider
we are using mod_jk2


> -Original Message-
> 
> 
> On 14 Jan 2004, at 18:54, Dan Snider wrote:
> 
> >> For situations like Tomcat running behind an Apache HTTPD
> >> server, this normally
> >> gets taken care of you automatically.
> >
> > We have Tomcat running behind an Apache HTTPD and we are 
> getting the 
> > port as
> > well. Is there perhaps something we are missing in the 
> configuration?
> 
> What connector are you using mod_jserv? mod_jk?
> 
> 
> >
> >> If you've got a
> >> different situation,
> >> you'll need to figure out how to tell your servlet container
> >> to adjust the
> >> server port it reports -- there's nothing Struts can do to help.
> >
> > If configuration is not the solution, any suggestions on how to go 
> > about
> > changing the reported port?
> >
> > To my mind, it is not so much that we want the servlet container to 
> > report a
> > different port (after all, it is using that port), we just 
> want struts 
> > to
> > use a different port (80) for links. That is, we want to 
> ensure routing
> > through the front door (i.e., Apache). Would using a Filter be a 
> > possible
> > solution?
> 
> If apache and tomcat are running on the same machine then 
> there should 
> be no issue, it will be a matter of having request for *.do, *.jsp 
> being mapped to the connector module.
> 
> Cheers Mark
> 
> >
> > Thanks,
> >
> > Dan
> >
> >
> >> -Original Message-
> >>
> >> Quoting "Gabriel W." <[EMAIL PROTECTED]>:
> >>
> >>> Hi,
> >>>
> >>> I am relatively new to this list so I do not know if this
> >> topic was discussed
> >>> before (I checked the archive and it does not appear that way).
> >>>
> >>> It seems that Struts includes the ServerPort in web links
> >> if not of the
> >>> values 80 or 443 (e.g. http://mydomain.com:8080). In some
> >> cases this is not
> >>> the welcomed behavior.
> >>> Specifically if the Struts server is listening on Port 
> 8080 behind a
> >>> firewall. The firewall receives the request from the outside
> >>> internet on port 80 and routes it to the machine listening
> >> on Port 8080.
> >>>
> >>> The Struts machine in this case does not know the
> >> difference and so includes
> >>> the Port 8080.
> >>>
> >>> I looked at the Struts source code I assume is behind the logic
> >>> (org.apache.struts.taglib.html.BaseTag), and it
> >>> does not appear as though there is a configuration flag to
> >> turn this logic
> >>> on/off.
> >>>
> >>> Are there any considerations for such an option in the
> >> future so that a
> >>> firewalled site won't have to show 8080.
> >>>
> >>> NOTE: This is a situation where the Struts server does not
> >> have permission to
> >>> listen on Port 80.
> >>>
> >>> Regards,
> >>> Gabe
> >>>
> >>
> >> Struts is basing its decision on the port returned by calling
> >> ServletRequest.getServerPort() -- in other words, if you've
> >> got a server or
> >> proxy that receives requests on port 80 and internally
> >> redirects them to some
> >> other port, there's absolutely no way that Struts can know
> >> what the right port
> >> number is unless your servlet container can tell it.
> >>
> >> For situations like Tomcat running behind an Apache HTTPD
> >> server, this normally
> >> gets taken care of you automatically.  If you've got a
> >> different situation,
> >> you'll need to figure out how to tell your servlet container
> >> to adjust the
> >> server port it reports -- there's nothing Struts can do to help.
> >>
> >> Craig McClanahan
> > 

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



Re: Included port numbers in web links e.g. 8080

2004-01-14 Thread Mark Lowe
On 14 Jan 2004, at 18:54, Dan Snider wrote:

For situations like Tomcat running behind an Apache HTTPD
server, this normally
gets taken care of you automatically.
We have Tomcat running behind an Apache HTTPD and we are getting the 
port as
well. Is there perhaps something we are missing in the configuration?
What connector are you using mod_jserv? mod_jk?



If you've got a
different situation,
you'll need to figure out how to tell your servlet container
to adjust the
server port it reports -- there's nothing Struts can do to help.
If configuration is not the solution, any suggestions on how to go 
about
changing the reported port?

To my mind, it is not so much that we want the servlet container to 
report a
different port (after all, it is using that port), we just want struts 
to
use a different port (80) for links. That is, we want to ensure routing
through the front door (i.e., Apache). Would using a Filter be a 
possible
solution?
If apache and tomcat are running on the same machine then there should 
be no issue, it will be a matter of having request for *.do, *.jsp 
being mapped to the connector module.

Cheers Mark

Thanks,

Dan


-Original Message-

Quoting "Gabriel W." <[EMAIL PROTECTED]>:

Hi,

I am relatively new to this list so I do not know if this
topic was discussed
before (I checked the archive and it does not appear that way).

It seems that Struts includes the ServerPort in web links
if not of the
values 80 or 443 (e.g. http://mydomain.com:8080). In some
cases this is not
the welcomed behavior.
Specifically if the Struts server is listening on Port 8080 behind a
firewall. The firewall receives the request from the outside
internet on port 80 and routes it to the machine listening
on Port 8080.
The Struts machine in this case does not know the
difference and so includes
the Port 8080.

I looked at the Struts source code I assume is behind the logic
(org.apache.struts.taglib.html.BaseTag), and it
does not appear as though there is a configuration flag to
turn this logic
on/off.

Are there any considerations for such an option in the
future so that a
firewalled site won't have to show 8080.

NOTE: This is a situation where the Struts server does not
have permission to
listen on Port 80.

Regards,
Gabe
Struts is basing its decision on the port returned by calling
ServletRequest.getServerPort() -- in other words, if you've
got a server or
proxy that receives requests on port 80 and internally
redirects them to some
other port, there's absolutely no way that Struts can know
what the right port
number is unless your servlet container can tell it.
For situations like Tomcat running behind an Apache HTTPD
server, this normally
gets taken care of you automatically.  If you've got a
different situation,
you'll need to figure out how to tell your servlet container
to adjust the
server port it reports -- there's nothing Struts can do to help.
Craig McClanahan

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


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


Re: Bean Tag question

2004-01-14 Thread Henrique VIECILI
Ok, i will try it!

but, where can i download the struts-el.tld files??

i have not found them in the struts web site!

Thanx

Henrique

- Original Message -
From: "Ben Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 3:25 PM
Subject: RE: Bean Tag question


> you can't have a tag as an attribute for another tag.  How bout this?
>
> 
>
>
> >From: "Henrique VIECILI" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Bean Tag question
> >Date: Wed, 14 Jan 2004 16:14:49 -0300
> >
> >Hi,
> >
> >I am trying to access a bean property inside the arg0 attribute of
> >bean:message
> >tag, is that possible using only the standard taglibs? How?
> >
> >I´ve tried this code bellow and it didn´t work:
> >
> > >property="myParam" />" />
> >
> >Henrique
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> There are now three new levels of MSN Hotmail Extra Storage!  Learn more.
> http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: Included port numbers in web links e.g. 8080

2004-01-14 Thread Dan Snider
> For situations like Tomcat running behind an Apache HTTPD 
> server, this normally
> gets taken care of you automatically.

We have Tomcat running behind an Apache HTTPD and we are getting the port as
well. Is there perhaps something we are missing in the configuration? 

> If you've got a 
> different situation,
> you'll need to figure out how to tell your servlet container 
> to adjust the
> server port it reports -- there's nothing Struts can do to help.

If configuration is not the solution, any suggestions on how to go about
changing the reported port? 

To my mind, it is not so much that we want the servlet container to report a
different port (after all, it is using that port), we just want struts to
use a different port (80) for links. That is, we want to ensure routing
through the front door (i.e., Apache). Would using a Filter be a possible
solution?

Thanks,

Dan


> -Original Message-
> 
> Quoting "Gabriel W." <[EMAIL PROTECTED]>:
> 
> > Hi,
> > 
> > I am relatively new to this list so I do not know if this 
> topic was discussed
> > before (I checked the archive and it does not appear that way).
> > 
> > It seems that Struts includes the ServerPort in web links 
> if not of the
> > values 80 or 443 (e.g. http://mydomain.com:8080). In some 
> cases this is not
> > the welcomed behavior.
> > Specifically if the Struts server is listening on Port 8080 behind a
> > firewall. The firewall receives the request from the outside
> > internet on port 80 and routes it to the machine listening 
> on Port 8080.  
> > 
> > The Struts machine in this case does not know the 
> difference and so includes
> > the Port 8080.
> > 
> > I looked at the Struts source code I assume is behind the logic
> > (org.apache.struts.taglib.html.BaseTag), and it
> > does not appear as though there is a configuration flag to 
> turn this logic
> > on/off.
> > 
> > Are there any considerations for such an option in the 
> future so that a
> > firewalled site won't have to show 8080.
> > 
> > NOTE: This is a situation where the Struts server does not 
> have permission to
> > listen on Port 80.
> > 
> > Regards,
> > Gabe
> > 
> 
> Struts is basing its decision on the port returned by calling
> ServletRequest.getServerPort() -- in other words, if you've 
> got a server or
> proxy that receives requests on port 80 and internally 
> redirects them to some
> other port, there's absolutely no way that Struts can know 
> what the right port
> number is unless your servlet container can tell it.
> 
> For situations like Tomcat running behind an Apache HTTPD 
> server, this normally
> gets taken care of you automatically.  If you've got a 
> different situation,
> you'll need to figure out how to tell your servlet container 
> to adjust the
> server port it reports -- there's nothing Struts can do to help.
> 
> Craig McClanahan
> 

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



RE: Bean Tag question

2004-01-14 Thread Ben Anderson
you can't have a tag as an attribute for another tag.  How bout this?




From: "Henrique VIECILI" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Bean Tag question
Date: Wed, 14 Jan 2004 16:14:49 -0300
Hi,

I am trying to access a bean property inside the arg0 attribute of 
bean:message
tag, is that possible using only the standard taglibs? How?

I´ve tried this code bellow and it didn´t work:

" />
Henrique

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
There are now three new levels of MSN Hotmail Extra Storage!  Learn more. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1

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


Bean Tag question

2004-01-14 Thread Henrique VIECILI
Hi,

I am trying to access a bean property inside the arg0 attribute of bean:message
tag, is that possible using only the standard taglibs? How?

I´ve tried this code bellow and it didn´t work:

" />

Henrique


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



RE: BeanUtils.populate Invocation Error

2004-01-14 Thread Nathan Ewing
I figured out what is happening.  When you hit submit on the form, the
Struts populate method calls getProperty(int index), but never bothers to
actually do a setPropertyList (Property[]) beforehand, so the bean tries to
return a non-existent item in the array.  After I noticed this I looked back
in the forum and found out this is a common problem/bug in struts.

Nathan

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 11:30 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error

I've never tried putting a bean in a bean and then referring to itself,  
does the java stuff that can sniff bean properties deal with that.

The refraction or reflection stuff that bean utils does.



On 14 Jan 2004, at 15:24, Nathan Ewing wrote:

> Yes, except for 2 minor differences, I'm using an array[] instead of an
> ArrayList, and their the same bean, with two different actions, sorta  
> like
> the following:
>
> public class PropertyEditAction extends Action {
>   //Load, Display, and save one Property
> }
> public class PropertyListAction extends Action {
>   //Load, Display, and Save list of beans all at once
> }
> public class Property extends ActionForm {
>
>   private String blahItem;
>   private Property[] propertyList;
>
>   public Property() {
>   blahItem = null;
>   propertyList = null;
>   }
>
>   public String getBlahItem(){return blahItem;}
>   public void setBlahItem(String tempItem){blahItem = tempItem;}
>
>   public Property getPropertyList(int i) {
>   return propertyList[i];
>   }
>
>   public void setPropertyList(Property[] properties) {
>   propertyList = properties;
>   }
>   
>   public void setPropertyList(int i, Property property) {
>   propertyList[i] = property;
>   }
> }
>
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:58 AM
> To: Struts Users Mailing List
> Subject: Re: BeanUtils.populate Invocation Error
>
> So have you something like this?
>
> public class PropertyEditForm extends ActionForm {
>   //bla bla
>   
> }
>
> public class PropertyListForm extends ActionForm {
>
>   private ArrayList propertyList;
>
>   public PropertyListForm() {
>   this.propertyList = new ArrayList();
>   }
>
>   public PropertyEditForm getProperty(int i) {
>   return (PropertyEditForm) propertyList.get(i);
>   }
>
>   public void setProperties(Object[] properties) {
>   ..
>   }
>   
>   public void setProperty(int i, PropertyEditForm property) {
>   propertyList.add(i, property);
>   }
>
>
> }
>
>
>
> On 14 Jan 2004, at 14:38, Nathan Ewing wrote:
>
>> Basically all I have is 1 form bean that includes 2 arrays of itself
>> in it.
>>
>> When the app runs it gets 2 lists of the different categories of
>> SoldProperty and makes a jsp form that allows you to change certain
>> details
>> of the beans all at once, and then if you click on one of the beans
>> you can
>> edit them individually.
>>
>> There are actually two actions, one is PropertyList, which only loads
>> and
>> manages those two arrays of beans, and then there is PropertyEdit,
>> which
>> works on an individual bean, and ignores the two lists.
>>
>> I hope this makes sense.
>>
>> The code I posted below is a shortcut I put in all my beans.  I
>> overrode
>> ActionForm and put a couple extra functions in.  One of them
>> automatically
>> resets all the variables in the bean for me without having to manually
>> write
>> a reset function for every bean to do the same thing.
>>
>> The other changes the way validate works.  Instead of 1 function that
>> does
>> all the validating, I write individual validateAttributeName()
>> functions and
>> the code below just calls all of them for me.  Of course none of the
>> validate code matters, cause I didn't call it here (which makes me
>> wonder
>> why I bothered to post it).
>>
>> Somehow I doubt you are stupid :)
>>
>> I hope I didn't make all this sounds more complicated than it is.  All
>> I
>> really wanna do is allow the users of my site to check a bunch of
>> checkboxes
>> all at once for multiple records instead of opening them all
>> individually.
>>
>>  Thanks,
>>  Nathan
>>
>>
>>
>> -Original Message-
>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, January 14, 2004 9:17 AM
>> To: Struts Users Mailing List
>> Subject: Re: BeanUtils.populate Invocation Error
>>
>> Looks complicated what are you trying to do? Sorry I'm pretty stupid
>> and so i try and keep things simpler.
>>
>>
>> On 14 Jan 2004, at 13:55, Nathan Ewing wrote:
>>
>>> I posted much of the form bean code at the bottom.  Aside for the two
>>> arrays
>>> of SoldProperty, there are a bunch of getString and setString.  This
>>> is part
>>> 

Struts and iframes

2004-01-14 Thread Vinicius Carvalho
Hi there! In our project, at a certain point, we have a table with a form 
in a td, which target is a iframe, code looks like this:



Well, it works fine, almost! The action forwards to the viewModel.jsp, 
which is rendered in the main window. The problem is, when an error is 
captured by the validate() method of the BuildModelForm.java, it returns to 
the page with the forms, but now in the wrong window. So I end up with 2 
forms in my window. Is it possible to solve this? I don't know, maybe by 
changing the target attribute of the request(response??) when an error occurs.

And, BTW, In that jsp, I use this:



In my BuildModelForm, inside the validate model, I have something like this:
if(getDate().length() < 1 || getDate() == null){
errors.add("date",new ActionError("errors.date.required"));
}
and although I have configured the resources bundle, no message is 
displayed, when user lefts it blank (even though it is displayed in the 
wrong window). 

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


RE: low priority question about html:form

2004-01-14 Thread Kris Schneider
Quick note that the name, scope, and type attributes of  are
deprecated as of 1.1 and, AFAIK, have been removed in the current codebase. So,
if there is a compelling use for them, it would be a good idea to address it
through Bugzilla ASAP.

Quoting Glenn Wilson <[EMAIL PROTECTED]>:

> Richard,
> 
> It seems to me that this would be useful for run-time decisions about where
> to "send" the form data.  Perhaps if a low-level user and an admin should see
> the same html form, but the ActionForm that handles the admin's work should
> be different.  i.e.:
> 
> 
> 
>   
> 
> 
>
> 
> 
> 
>  />
> 
> 
> I'm not sure if the html:form can take dynamic params like that (never tried
> it!) Regardless of the syntax, it seems like you could share the same JSP,
> subclass the ActionForm, and save yourself from creating a ton of duplicate
> code.  You'd probably still have to add an ActionForm mapping in
> struts-config for each form, but at least you'd have only one JSP and Action
> class.  Perhaps changing the scope dynamically like this could potentially
> change the ActionForm stored in the session as well?  Did I miss something?
> 
> Regards,
> Glenn
> 
> -Original Message-
> From: Richard Hightower [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:11 AM
> To: Struts Users Mailing List
> Subject: RE: low priority question about html:form
> 
> 
> Oppsss
> 
> the code listig should read:
> 
>  name="myform"/>
> 
> 
> -Original Message-
> From: Richard Hightower [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 10:08 AM
> To: Struts Users Mailing List
> Subject: low priority question about html:form
> 
> 
> 
> I assert the following:
> "You could override the ActionForm associated with this  by
> using the scope and type attribute. The scope specifies where to look for
> the ActionForm, and the type specifies what type of ActionForm it is, i.e.,
> the fully qualified Java classname. This technique is not used in practice
> very often, but it is good to know that it exists."
> 
> Example,
> 
> 
> 
> I've thought of a few reasons why you want to do this, but they seemed
> fairly lame. Can someone give me a valid use case where you would need this
> feature?
> 
> QUESTION: Why not just specify the Form in the action mapping?
> 
> 
> The  tag renders an HTML form. The  is associated
> with an action mapping by the action attribute. The action attribute
> specifies the path of the action mapping.  Therefore, when the user submits
> the form the action associated with the ActionMapping will be invoked (if
> the form is valid). It is interesting that this tag inspect the
> ActionMapping and finds the ActionForm associated with the ActionMapping.
> If the ActionForm is in scope, the property values of the ActionForm will
> be
> rendered as the values in the HTML form field of the .  In fact
> if the ActionMapping has an error (e.g., points to in valid ActionForm),
> the
> page with the  will never display until you fix the
> ActionMapping.

-- 
Kris Schneider 
D.O.Tech   

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



Page Flow with ActionForms (Repost)

2004-01-14 Thread Matthew J. Vincent
Sorry all,

I posted this ealier with a typo so here it is again.

I have a url that gets invoked with the url
http://localhost/prototype/search.do .  I have a SearchAction class that
uses EJBs to pull data from a database to populate a pick list in my search
JSP page.  I use some simple JSTL code to populate the select box:


   


I use the following Struts tag to create the  tag



I have a SearchForm class that is a simple ActionForm.  When I submit the
form, I invoke my SearchResultsAction class, however this is where I need
help.  When an error occurs, how do I get back to my search.do page with my
select box (1) populated and (2) have the chosen option from the select box
selected?  Should I be using the Struts tag for a select box?  How do i
re-retrieve the values in the select box?  Am I making sense?

In my stuts-config.xml file I have:

  
 
 
 
  

Currently on an error, I am brought back to my search form with the errors
displayed, but the select box is not populated.

Help!

Thanks!

Matt



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



RE: low priority question about html:form

2004-01-14 Thread Glenn Wilson
Richard,

It seems to me that this would be useful for run-time decisions about where to "send" 
the form data.  Perhaps if a low-level user and an admin should see the same html 
form, but the ActionForm that handles the admin's work should be different.  i.e.:



  


   






I'm not sure if the html:form can take dynamic params like that (never tried it!) 
Regardless of the syntax, it seems like you could share the same JSP, subclass the 
ActionForm, and save yourself from creating a ton of duplicate code.  You'd probably 
still have to add an ActionForm mapping in struts-config for each form, but at least 
you'd have only one JSP and Action class.  Perhaps changing the scope dynamically like 
this could potentially change the ActionForm stored in the session as well?  Did I 
miss something?

Regards,
Glenn

-Original Message-
From: Richard Hightower [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 9:11 AM
To: Struts Users Mailing List
Subject: RE: low priority question about html:form


Oppsss

the code listig should read:




-Original Message-
From: Richard Hightower [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 10:08 AM
To: Struts Users Mailing List
Subject: low priority question about html:form



I assert the following:
"You could override the ActionForm associated with this  by
using the scope and type attribute. The scope specifies where to look for
the ActionForm, and the type specifies what type of ActionForm it is, i.e.,
the fully qualified Java classname. This technique is not used in practice
very often, but it is good to know that it exists."

Example,



I've thought of a few reasons why you want to do this, but they seemed
fairly lame. Can someone give me a valid use case where you would need this
feature?

QUESTION: Why not just specify the Form in the action mapping?


The  tag renders an HTML form. The  is associated
with an action mapping by the action attribute. The action attribute
specifies the path of the action mapping.  Therefore, when the user submits
the form the action associated with the ActionMapping will be invoked (if
the form is valid). It is interesting that this tag inspect the
ActionMapping and finds the ActionForm associated with the ActionMapping.
If the ActionForm is in scope, the property values of the ActionForm will be
rendered as the values in the HTML form field of the .  In fact
if the ActionMapping has an error (e.g., points to in valid ActionForm), the
page with the  will never display until you fix the
ActionMapping.


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


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


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



Re: best way to use multiple parameters with html:link tags

2004-01-14 Thread Kris Schneider
Because the "std" tags are, well, standard? ;-) Seriously, all things being
equal (and it's not always obvious when they are), I opt for JSTL because it's
now a standard and its expression language has been incorporated into the JSP
2.0 spec. A tag like  can't be replaced by JSTL because it can make
direct use of the framework ("action" and "forward" attributes), it's not just a
"utility" tag.

Quoting Nathan Maves <[EMAIL PROTECTED]>:

> Looks like this will work!  Is there any reason to use the std tags vs 
> the struts tags? (i.e. forEach vs iterate)
> 
> ~N
> On Jan 14, 2004, at 10:03 AM, Kris Schneider wrote:
> 
> > It's not too big a deal, just reuse a single map with JSTL:
> >
> > 
> > 
> >   
> >   
> >   
> >   ...
> > 
> >
> > Quoting Nathan Maves <[EMAIL PROTECTED]>:
> >
> >> I have a collection of objects that I am interating over in my jsp.  I
> >> would like to create links to another action with a few of the
> >> properties of the beans in the collection.  From the docs I see that
> >> you have to use a java.util.Map if you want to have multiple params on
> >> a html:link tag.  Is there no other way then creating a map for each
> >> iteration of my collection?
> >>
> >> Nathan
> >
> > -- 
> > Kris Schneider 
> > D.O.Tech   

-- 
Kris Schneider 
D.O.Tech   

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



RE: ActionForm is not automatically popluated.

2004-01-14 Thread Robert Nocera
Without seeing any of your code, one possibility is that the case of your
property names isn't properly matching your Form.  For instance, the
property "lastname" isn't going to match setLastName() in your form, but
"lastName" will.  

-Rob
www.neosllc.com


-Original Message-
From: Andre Risnes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 12:05 PM
To: Struts Users Mailing List
Subject: ActionForm is not automatically popluated.

Hi,

I have a tomcat/struts/velocity application that uses a
fairly standard ActionForm bean to validate user input.
My problem is that none of the fields in the ActionForm
bean become populated when the user submits the form. 

I can retrieve the values from the form in the pRequest
parameter to the ActionForm.validate() method. The name
of the get/setFoo() methods in the ActionForm bean
matches the names of the fields in the submitted form. 

What could be the problem?

JDK version 1.4.2_02
Tomcat version 4.0.6
Struts version 1.1

-- 
Regards 
André Risnes

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


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



Re: best way to use multiple parameters with html:link tags

2004-01-14 Thread Nathan Maves
Looks like this will work!  Is there any reason to use the std tags vs 
the struts tags? (i.e. forEach vs iterate)

~N
On Jan 14, 2004, at 10:03 AM, Kris Schneider wrote:
It's not too big a deal, just reuse a single map with JSTL:



  
  
  
  ...

Quoting Nathan Maves <[EMAIL PROTECTED]>:

I have a collection of objects that I am interating over in my jsp.  I
would like to create links to another action with a few of the
properties of the beans in the collection.  From the docs I see that
you have to use a java.util.Map if you want to have multiple params on
a html:link tag.  Is there no other way then creating a map for each
iteration of my collection?
Nathan
--
Kris Schneider 
D.O.Tech   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: low priority question about html:form

2004-01-14 Thread Richard Hightower
Oppsss

the code listig should read:




-Original Message-
From: Richard Hightower [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 10:08 AM
To: Struts Users Mailing List
Subject: low priority question about html:form



I assert the following:
"You could override the ActionForm associated with this  by
using the scope and type attribute. The scope specifies where to look for
the ActionForm, and the type specifies what type of ActionForm it is, i.e.,
the fully qualified Java classname. This technique is not used in practice
very often, but it is good to know that it exists."

Example,



I've thought of a few reasons why you want to do this, but they seemed
fairly lame. Can someone give me a valid use case where you would need this
feature?

QUESTION: Why not just specify the Form in the action mapping?


The  tag renders an HTML form. The  is associated
with an action mapping by the action attribute. The action attribute
specifies the path of the action mapping.  Therefore, when the user submits
the form the action associated with the ActionMapping will be invoked (if
the form is valid). It is interesting that this tag inspect the
ActionMapping and finds the ActionForm associated with the ActionMapping.
If the ActionForm is in scope, the property values of the ActionForm will be
rendered as the values in the HTML form field of the .  In fact
if the ActionMapping has an error (e.g., points to in valid ActionForm), the
page with the  will never display until you fix the
ActionMapping.


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


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



RE: How to remove forms from session

2004-01-14 Thread Brian Styles
Hi Jimmy,

thanks for the reply,

could you possibly explain some of this?

is the name of the attribute under which the form is stored returned by 
mapping.getAttribute()?

thanks,
Brian
From: Jimmy Emmanual <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: How to remove forms from session
Date: Wed, 14 Jan 2004 07:22:50 -0500
try this:

if (mapping.getAttribute() != null) {
  if( "request".equals(mapping.getScope()) )
request.removeAttribute(mapping.getAttribute());
  else
session.removeAttribute(mapping.getAttribute());
}
-Original Message-
From: Brian Styles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 7:19 AM
To: [EMAIL PROTECTED]
Subject: How to remove forms from session
Hi all,

sometimes I want to force remove form objects that are stored in session.
I was trying to do this by using the following code:
 HttpSession session = request.getSession(  );
 session.invalidate();
However, I've seen that this doesn't work and sometimes the object remains
in session - and the information is available on the jsp once I go back to
it.
So perhaps someone could tell me the correct way to remove form beans from
the session object.
thanks very much,
Brian
_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


low priority question about html:form

2004-01-14 Thread Richard Hightower

I assert the following:
"You could override the ActionForm associated with this  by
using the scope and type attribute. The scope specifies where to look for
the ActionForm, and the type specifies what type of ActionForm it is, i.e.,
the fully qualified Java classname. This technique is not used in practice
very often, but it is good to know that it exists."

Example,



I've thought of a few reasons why you want to do this, but they seemed
fairly lame. Can someone give me a valid use case where you would need this
feature?

QUESTION: Why not just specify the Form in the action mapping?


The  tag renders an HTML form. The  is associated
with an action mapping by the action attribute. The action attribute
specifies the path of the action mapping.  Therefore, when the user submits
the form the action associated with the ActionMapping will be invoked (if
the form is valid). It is interesting that this tag inspect the
ActionMapping and finds the ActionForm associated with the ActionMapping.
If the ActionForm is in scope, the property values of the ActionForm will be
rendered as the values in the HTML form field of the .  In fact
if the ActionMapping has an error (e.g., points to in valid ActionForm), the
page with the  will never display until you fix the
ActionMapping.


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



RE: Getting parameters from html:link

2004-01-14 Thread Robert Nocera
I think what you want is:
String type = request.getParameter("type");


-Original Message-
From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 12:01 PM
To: Struts Users Mailing List
Subject: Getting parameters from html:link

Hi!
I´ve been trying to get aditional parameters that came in a html:link that
with no success.

the link is this one



and "notBilled" was aded to the request like this:
public Map getNotBilled() {
  Map map = new HashMap();
  map.put("type", "NotBilled");
  return map;
}

the problem is that when I do a
request.getSession(true).getAttribute("type");
returns null always.

There´s anything i´m doing wrong? I´ve been reading the mailing lists, but
haven´t found something useful...

Best Regards,
Lucas


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


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



RE: Images as links in struts

2004-01-14 Thread Hooper, Brian
The Struts API is usually a good resource:
http://jakarta.apache.org/struts/userGuide/struts-html.html#img

If you define a property for the html:img tag, Struts needs the property
to be a map:

"The name of a property of the bean specified by the name attribute,
whose return value must be a java.util.Map containing the query
parameters to be added to the src URL. You must specify the name
attribute if you specify this attribute."

If you aren't trying to attach parameters to the SRC attribute, try:


-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 11:47 AM
To: Hooper, Brian; 'Struts Users Mailing List'
Subject: RE: Images as links in struts



Now, below is the code which I am using...


I have included set and get methods for property "custImage" in
"enquiryFormBean"."custImage" is declared as a "String" type in the form
bean.

I get the below erro while executing the jsp:
[14/01/04 22:07:30:484 GMT+05:30] 777a5f8a WebGroup  E SRVE0026E:
[Servlet Error]-[Object must be of type Map]:
javax.servlet.jsp.JspException: Object must be of type Map
at org.apache.struts.taglib.html.ImgTag.url(ImgTag.java:628)
at
org.apache.struts.taglib.html.ImgTag.doEndTag(ImgTag.java:410)
at
org.apache.jsp._ADS_5F_ELS_5F_CreateEnquiry._jspService(_ADS_5F_ELS_5F_C
reateEnquiry.java:796)
at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java
:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:344)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet
.java:598)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:6
96)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)


Please provide guidance

Regards
VasudevRaoGupta
-Original Message-
From: Hooper, Brian [mailto:[EMAIL PROTECTED] 
Sent: 14 January 2004 19:51
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Images as links in struts


At first glance you've got some quote problems, and I think you want an
img tag, not a input type=image tag.  Try this:



-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 9:15 AM
To: 'Struts Users Mailing List'
Subject: RE: Images as links in struts



This is how I have given...

ActionForm is not automatically popluated.

2004-01-14 Thread Andre Risnes
Hi,

I have a tomcat/struts/velocity application that uses a
fairly standard ActionForm bean to validate user input.
My problem is that none of the fields in the ActionForm
bean become populated when the user submits the form. 

I can retrieve the values from the form in the pRequest
parameter to the ActionForm.validate() method. The name
of the get/setFoo() methods in the ActionForm bean
matches the names of the fields in the submitted form. 

What could be the problem?

JDK version 1.4.2_02
Tomcat version 4.0.6
Struts version 1.1

-- 
Regards 
André Risnes

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



Re: best way to use multiple parameters with html:link tags

2004-01-14 Thread Kris Schneider
It's not too big a deal, just reuse a single map with JSTL:



  
  
  
  ...


Quoting Nathan Maves <[EMAIL PROTECTED]>:

> I have a collection of objects that I am interating over in my jsp.  I 
> would like to create links to another action with a few of the 
> properties of the beans in the collection.  From the docs I see that 
> you have to use a java.util.Map if you want to have multiple params on 
> a html:link tag.  Is there no other way then creating a map for each 
> iteration of my collection?
> 
> Nathan

-- 
Kris Schneider 
D.O.Tech   

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



Getting parameters from html:link

2004-01-14 Thread Lucas Gonzalez
Hi!
I´ve been trying to get aditional parameters that came in a html:link that
with no success.

the link is this one



and "notBilled" was aded to the request like this:
public Map getNotBilled() {
  Map map = new HashMap();
  map.put("type", "NotBilled");
  return map;
}

the problem is that when I do a
request.getSession(true).getAttribute("type");
returns null always.

There´s anything i´m doing wrong? I´ve been reading the mailing lists, but
haven´t found something useful...

Best Regards,
Lucas


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



best way to use multiple parameters with html:link tags

2004-01-14 Thread Nathan Maves
I have a collection of objects that I am interating over in my jsp.  I 
would like to create links to another action with a few of the 
properties of the beans in the collection.  From the docs I see that 
you have to use a java.util.Map if you want to have multiple params on 
a html:link tag.  Is there no other way then creating a map for each 
iteration of my collection?

Nathan

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


RE: Images as links in struts

2004-01-14 Thread vasudevrao gupta

Now, below is the code which I am using...


I have included set and get methods for property "custImage" in
"enquiryFormBean"."custImage" is declared as a "String" type in the form
bean.

I get the below erro while executing the jsp:
[14/01/04 22:07:30:484 GMT+05:30] 777a5f8a WebGroup  E SRVE0026E:
[Servlet Error]-[Object must be of type Map]:
javax.servlet.jsp.JspException: Object must be of type Map
at org.apache.struts.taglib.html.ImgTag.url(ImgTag.java:628)
at
org.apache.struts.taglib.html.ImgTag.doEndTag(ImgTag.java:410)
at
org.apache.jsp._ADS_5F_ELS_5F_CreateEnquiry._jspService(_ADS_5F_ELS_5F_C
reateEnquiry.java:796)
at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java
:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:344)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet
.java:598)
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:6
96)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)


Please provide guidance

Regards
VasudevRaoGupta
-Original Message-
From: Hooper, Brian [mailto:[EMAIL PROTECTED] 
Sent: 14 January 2004 19:51
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Images as links in struts


At first glance you've got some quote problems, and I think you want an
img tag, not a input type=image tag.  Try this:



-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 9:15 AM
To: 'Struts Users Mailing List'
Subject: RE: Images as links in struts



This is how I have given...

RE: BeanUtils.populate Invocation Error

2004-01-14 Thread Nathan Ewing
I can't imagine why it wouldn't work, there is never any recursion with the
beans, no bean in the array of beans ever refers to itself.

Nathan

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 11:30 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error

I've never tried putting a bean in a bean and then referring to itself,  
does the java stuff that can sniff bean properties deal with that.

The refraction or reflection stuff that bean utils does.



On 14 Jan 2004, at 15:24, Nathan Ewing wrote:

> Yes, except for 2 minor differences, I'm using an array[] instead of an
> ArrayList, and their the same bean, with two different actions, sorta  
> like
> the following:
>
> public class PropertyEditAction extends Action {
>   //Load, Display, and save one Property
> }
> public class PropertyListAction extends Action {
>   //Load, Display, and Save list of beans all at once
> }
> public class Property extends ActionForm {
>
>   private String blahItem;
>   private Property[] propertyList;
>
>   public Property() {
>   blahItem = null;
>   propertyList = null;
>   }
>
>   public String getBlahItem(){return blahItem;}
>   public void setBlahItem(String tempItem){blahItem = tempItem;}
>
>   public Property getPropertyList(int i) {
>   return propertyList[i];
>   }
>
>   public void setPropertyList(Property[] properties) {
>   propertyList = properties;
>   }
>   
>   public void setPropertyList(int i, Property property) {
>   propertyList[i] = property;
>   }
> }
>
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:58 AM
> To: Struts Users Mailing List
> Subject: Re: BeanUtils.populate Invocation Error
>
> So have you something like this?
>
> public class PropertyEditForm extends ActionForm {
>   //bla bla
>   
> }
>
> public class PropertyListForm extends ActionForm {
>
>   private ArrayList propertyList;
>
>   public PropertyListForm() {
>   this.propertyList = new ArrayList();
>   }
>
>   public PropertyEditForm getProperty(int i) {
>   return (PropertyEditForm) propertyList.get(i);
>   }
>
>   public void setProperties(Object[] properties) {
>   ..
>   }
>   
>   public void setProperty(int i, PropertyEditForm property) {
>   propertyList.add(i, property);
>   }
>
>
> }
>
>
>
> On 14 Jan 2004, at 14:38, Nathan Ewing wrote:
>
>> Basically all I have is 1 form bean that includes 2 arrays of itself
>> in it.
>>
>> When the app runs it gets 2 lists of the different categories of
>> SoldProperty and makes a jsp form that allows you to change certain
>> details
>> of the beans all at once, and then if you click on one of the beans
>> you can
>> edit them individually.
>>
>> There are actually two actions, one is PropertyList, which only loads
>> and
>> manages those two arrays of beans, and then there is PropertyEdit,
>> which
>> works on an individual bean, and ignores the two lists.
>>
>> I hope this makes sense.
>>
>> The code I posted below is a shortcut I put in all my beans.  I
>> overrode
>> ActionForm and put a couple extra functions in.  One of them
>> automatically
>> resets all the variables in the bean for me without having to manually
>> write
>> a reset function for every bean to do the same thing.
>>
>> The other changes the way validate works.  Instead of 1 function that
>> does
>> all the validating, I write individual validateAttributeName()
>> functions and
>> the code below just calls all of them for me.  Of course none of the
>> validate code matters, cause I didn't call it here (which makes me
>> wonder
>> why I bothered to post it).
>>
>> Somehow I doubt you are stupid :)
>>
>> I hope I didn't make all this sounds more complicated than it is.  All
>> I
>> really wanna do is allow the users of my site to check a bunch of
>> checkboxes
>> all at once for multiple records instead of opening them all
>> individually.
>>
>>  Thanks,
>>  Nathan
>>
>>
>>
>> -Original Message-
>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, January 14, 2004 9:17 AM
>> To: Struts Users Mailing List
>> Subject: Re: BeanUtils.populate Invocation Error
>>
>> Looks complicated what are you trying to do? Sorry I'm pretty stupid
>> and so i try and keep things simpler.
>>
>>
>> On 14 Jan 2004, at 13:55, Nathan Ewing wrote:
>>
>>> I posted much of the form bean code at the bottom.  Aside for the two
>>> arrays
>>> of SoldProperty, there are a bunch of getString and setString.  This
>>> is part
>>> of the bean SoldProperty (aka there are two arrays of SoldProperty in
>>> the
>>> SoldProperty bean).
>>>
>>> I altered the validate code and reset code so that it does the
>>> validating
>>> and resetting for me, as follows:
>>>

Re: BeanUtils.populate Invocation Error

2004-01-14 Thread Mark Lowe
I've never tried putting a bean in a bean and then referring to itself,  
does the java stuff that can sniff bean properties deal with that.

The refraction or reflection stuff that bean utils does.



On 14 Jan 2004, at 15:24, Nathan Ewing wrote:

Yes, except for 2 minor differences, I'm using an array[] instead of an
ArrayList, and their the same bean, with two different actions, sorta  
like
the following:

public class PropertyEditAction extends Action {
//Load, Display, and save one Property
}
public class PropertyListAction extends Action {
//Load, Display, and Save list of beans all at once
}
public class Property extends ActionForm {
private String blahItem;
private Property[] propertyList;
public Property() {
blahItem = null;
propertyList = null;
}
public String getBlahItem(){return blahItem;}
public void setBlahItem(String tempItem){blahItem = tempItem;}
public Property getPropertyList(int i) {
return propertyList[i];
}
public void setPropertyList(Property[] properties) {
propertyList = properties;
}

public void setPropertyList(int i, Property property) {
propertyList[i] = property;
}
}
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 9:58 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error
So have you something like this?

public class PropertyEditForm extends ActionForm {
//bla bla

}
public class PropertyListForm extends ActionForm {

	private ArrayList propertyList;

public PropertyListForm() {
this.propertyList = new ArrayList();
}
public PropertyEditForm getProperty(int i) {
return (PropertyEditForm) propertyList.get(i);
}
public void setProperties(Object[] properties) {
..
}

public void setProperty(int i, PropertyEditForm property) {
propertyList.add(i, property);
}
}



On 14 Jan 2004, at 14:38, Nathan Ewing wrote:

Basically all I have is 1 form bean that includes 2 arrays of itself
in it.
When the app runs it gets 2 lists of the different categories of
SoldProperty and makes a jsp form that allows you to change certain
details
of the beans all at once, and then if you click on one of the beans
you can
edit them individually.
There are actually two actions, one is PropertyList, which only loads
and
manages those two arrays of beans, and then there is PropertyEdit,
which
works on an individual bean, and ignores the two lists.
I hope this makes sense.

The code I posted below is a shortcut I put in all my beans.  I
overrode
ActionForm and put a couple extra functions in.  One of them
automatically
resets all the variables in the bean for me without having to manually
write
a reset function for every bean to do the same thing.
The other changes the way validate works.  Instead of 1 function that
does
all the validating, I write individual validateAttributeName()
functions and
the code below just calls all of them for me.  Of course none of the
validate code matters, cause I didn't call it here (which makes me
wonder
why I bothered to post it).
Somehow I doubt you are stupid :)

I hope I didn't make all this sounds more complicated than it is.  All
I
really wanna do is allow the users of my site to check a bunch of
checkboxes
all at once for multiple records instead of opening them all
individually.
Thanks,
Nathan


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 9:17 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error
Looks complicated what are you trying to do? Sorry I'm pretty stupid
and so i try and keep things simpler.
On 14 Jan 2004, at 13:55, Nathan Ewing wrote:

I posted much of the form bean code at the bottom.  Aside for the two
arrays
of SoldProperty, there are a bunch of getString and setString.  This
is part
of the bean SoldProperty (aka there are two arrays of SoldProperty in
the
SoldProperty bean).
I altered the validate code and reset code so that it does the
validating
and resetting for me, as follows:
If there is anything else you need please let me know.

Nathan

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request, String[] propertyList) {
//Reset errors
errors = new ActionErrors();


ClassManager manager = new ClassManager (this);
for (int a = 0; a < propertyList.length; a++){
try {
String methodName = "validate" +
propertyList[a];
manager.runNoA

RE: Validator JavaScript displaying? Mozilla bug?

2004-01-14 Thread Robert Nocera
Brad,

I am using Mozilla 0.7 and I saw what you described the first time I went to
your page.  I can't get it to repeat however.  Then I tried for kicks on
another machine and didn't see it at all.

On that other machine I am just getting validator set up on a project and I
tried it, and it looked fine each time in Mozilla.  I did notice that I put
the tags for the javascript outside the  tags but inside the 
tags,whereas your are in the middle of the page.

Maybe the first time it loads, since it hasn't loaded the entire page, it
gets confused and displays the javascript but on subsequent loads, it is
probably coming from cache and has the entire html and so renders it
correctly?  A little far-fetched maybe.

I would try moving your javascript tag outside of the  tags and see
what kind of result you get.

-Rob

Rob Nocera
www.neosllc.com


-Original Message-
From: Brad Plies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 10:32 AM
To: [EMAIL PROTECTED]
Subject: Validator JavaScript displaying? Mozilla bug?

Hi folks,

I am having a problem with Mozilla, Netscape, and FireBird browsers on 
pages that use
the validator JavaScript.  It seems that the browsers "choke" on all that
script and end up displaying the script instead of the page content (
even though the script is guarded by the HTML comments) about 80% of the 
time.

Please see:
http://www.bulliondirect.com/catalog/showProducts.do?category=1


When I have a garbled page, I look at the page source, and the source looks 
fine.
The page validates as HTML 4.01 Transitional compliant via:
http://validator.w3.org/file-upload.html
http://validator.w3.org/detailed.html

The only way I can get it to display correctly, is to keep hitting reload
until it renders correctly, but the page source is always the same by file 
comparison.
If you File->Save a garbled page, and load it from file, it renders
correctly.

IE does not have this problem, and I cannot find any evidence that any one
else
has ever experienced this either.  What makes our pages a special case?
I know all the affected browsers are related in some way, do they share 
some sort
of common bug (In Gecko I presume)?

Can anyone confirm they see what I see?  Anyone have a similar experience?

BugZilla (http://bugzilla.mozilla.org/) is rather difficult for me to use, 
so I
haven't been able to use it well enough to find reports of this.

Tested Browsers:
Mozilla 1.5 Gecko/20030916
FireBird 0.7 Gecko/20031007
Netscape 7.1 Gecko/20030624


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



RE: Images as links in struts

2004-01-14 Thread Hooper, Brian
At first glance you've got some quote problems, and I think you want an
img tag, not a input type=image tag.  Try this:



-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 9:15 AM
To: 'Struts Users Mailing List'
Subject: RE: Images as links in struts



This is how I have given...

Message error

2004-01-14 Thread Namasivayam, Sudhakar (Cognizant)
i did put the entry into init-param of web.xml and the This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com

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

Error Page Flow

2004-01-14 Thread Matthew J. Vincent
Hello all,

I have a url that gets invoked with the url
http://localhost/prototype/search.do .  I have a SearchAction class that
uses EJBs to pull data from a database to populate a pick list in my search
JSP page.  I use some simple JSTL code to populate the select box:


   


I use the following Struts tag to create the  tag



I have a SearchForm class that is a simple ActionForm.  When I submit the
form, I invoke my SearchResultsAction class, however this is where I need
help.  When an error occurs, how do I get back to my search.do page with my
select box (1) populated and (2) have the chosen option from the select box
selected?  Should I be using the Struts tag for a select box?  How do i
re-retrieve the values in the select box?  Am I making sense?

In my stuts-config.xml file I have:

  
 
 
 
  

Currently on an error, I am brought back to my search form with the errors
displayed, but the select box is not populated.

Help!

Thanks!

Matt





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



Validator JavaScript displaying? Mozilla bug?

2004-01-14 Thread Brad Plies
Hi folks,

I am having a problem with Mozilla, Netscape, and FireBird browsers on 
pages that use
the validator JavaScript.  It seems that the browsers "choke" on all that
script and end up displaying the script instead of the page content (
even though the script is guarded by the HTML comments) about 80% of the 
time.

Please see:
http://www.bulliondirect.com/catalog/showProducts.do?category=1
When I have a garbled page, I look at the page source, and the source looks 
fine.
The page validates as HTML 4.01 Transitional compliant via:
http://validator.w3.org/file-upload.html
http://validator.w3.org/detailed.html

The only way I can get it to display correctly, is to keep hitting reload
until it renders correctly, but the page source is always the same by file 
comparison.
If you File->Save a garbled page, and load it from file, it renders correctly.

IE does not have this problem, and I cannot find any evidence that any one else
has ever experienced this either.  What makes our pages a special case?
I know all the affected browsers are related in some way, do they share 
some sort
of common bug (In Gecko I presume)?

Can anyone confirm they see what I see?  Anyone have a similar experience?

BugZilla (http://bugzilla.mozilla.org/) is rather difficult for me to use, 
so I
haven't been able to use it well enough to find reports of this.

Tested Browsers:
Mozilla 1.5 Gecko/20030916
FireBird 0.7 Gecko/20031007
Netscape 7.1 Gecko/20030624


RE: BeanUtils.populate Invocation Error

2004-01-14 Thread Nathan Ewing
Yes, except for 2 minor differences, I'm using an array[] instead of an
ArrayList, and their the same bean, with two different actions, sorta like
the following:

public class PropertyEditAction extends Action {
//Load, Display, and save one Property
}
public class PropertyListAction extends Action {
//Load, Display, and Save list of beans all at once
}
public class Property extends ActionForm {

private String blahItem;
private Property[] propertyList;

public Property() {
blahItem = null;
propertyList = null;
}

public String getBlahItem(){return blahItem;}
public void setBlahItem(String tempItem){blahItem = tempItem;}

public Property getPropertyList(int i) {
return propertyList[i];
}

public void setPropertyList(Property[] properties) {
propertyList = properties;
}

public void setPropertyList(int i, Property property) {
propertyList[i] = property;
}
}


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 9:58 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error

So have you something like this?

public class PropertyEditForm extends ActionForm {
//bla bla

}

public class PropertyListForm extends ActionForm {

private ArrayList propertyList;

public PropertyListForm() {
this.propertyList = new ArrayList();
}

public PropertyEditForm getProperty(int i) {
return (PropertyEditForm) propertyList.get(i);
}

public void setProperties(Object[] properties) {
..
}

public void setProperty(int i, PropertyEditForm property) {
propertyList.add(i, property);
}


}



On 14 Jan 2004, at 14:38, Nathan Ewing wrote:

> Basically all I have is 1 form bean that includes 2 arrays of itself  
> in it.
>
> When the app runs it gets 2 lists of the different categories of
> SoldProperty and makes a jsp form that allows you to change certain  
> details
> of the beans all at once, and then if you click on one of the beans  
> you can
> edit them individually.
>
> There are actually two actions, one is PropertyList, which only loads  
> and
> manages those two arrays of beans, and then there is PropertyEdit,  
> which
> works on an individual bean, and ignores the two lists.
>
> I hope this makes sense.
>
> The code I posted below is a shortcut I put in all my beans.  I  
> overrode
> ActionForm and put a couple extra functions in.  One of them  
> automatically
> resets all the variables in the bean for me without having to manually  
> write
> a reset function for every bean to do the same thing.
>
> The other changes the way validate works.  Instead of 1 function that  
> does
> all the validating, I write individual validateAttributeName()  
> functions and
> the code below just calls all of them for me.  Of course none of the
> validate code matters, cause I didn't call it here (which makes me  
> wonder
> why I bothered to post it).
>
> Somehow I doubt you are stupid :)
>
> I hope I didn't make all this sounds more complicated than it is.  All  
> I
> really wanna do is allow the users of my site to check a bunch of  
> checkboxes
> all at once for multiple records instead of opening them all  
> individually.
>
>   Thanks,
>   Nathan
>
>
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 9:17 AM
> To: Struts Users Mailing List
> Subject: Re: BeanUtils.populate Invocation Error
>
> Looks complicated what are you trying to do? Sorry I'm pretty stupid
> and so i try and keep things simpler.
>
>
> On 14 Jan 2004, at 13:55, Nathan Ewing wrote:
>
>> I posted much of the form bean code at the bottom.  Aside for the two
>> arrays
>> of SoldProperty, there are a bunch of getString and setString.  This
>> is part
>> of the bean SoldProperty (aka there are two arrays of SoldProperty in
>> the
>> SoldProperty bean).
>>
>> I altered the validate code and reset code so that it does the
>> validating
>> and resetting for me, as follows:
>>
>> If there is anything else you need please let me know.
>>
>>  Nathan
>> 
>>
>>  public ActionErrors validate(ActionMapping mapping,
>> HttpServletRequest request, String[] propertyList) {
>>  //Reset errors
>>  errors = new ActionErrors();
>>  
>>  
>>  ClassManager manager = new ClassManager (this);
>>  for (int a = 0; a < propertyList.length; a++){
>>  try {
>>  String methodName = "validate" +
>> propertyList[a];
>>  manager.runNoArgMethod(methodName);
>>

AW: bean:write

2004-01-14 Thread Otto, Frank
Sorry, it was my mistake.

I have a function htmlEncode(), which encode a string. The first line in this function 
is to replace all "\n" through "". After this I replace all characters to html 
conform values (for example: "<" ==> "<") and so I overwrite the br-tag again. :-(

Thanks for your help!!!

Regards,

Frank

-Ursprüngliche Nachricht-
Von: Kris Schneider [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 14. Januar 2004 15:58
An: Struts Users Mailing List
Betreff: Re: bean:write


The "delims" attribute of  works just like the "delim" argument to
a StringTokenizer constructor. For example, if you do:

StringTokenizer st = new StringTokenizer("line1line2", "", true);

Then st.countTokens() will return 6, not 3. In other words, the "delims"
attribute should be thought of as a set of delimiter characters, not as a single
delimiter string.

Quoting Mark Lowe <[EMAIL PROTECTED]>:

> So you want to replace  for \n or similar.
> 
> 
> 
>   
> ...
> 
> This might work.
> 
> 
> On 14 Jan 2004, at 14:30, Otto, Frank wrote:
> 
> > Hello,
> >
> > I want to write a string like "line1line2".
> >
> > If I use , I will get 
> > line1
line2. > > If I use > filter="false"/>, I will get line1line2. > > > > But I want to write: > > > > line1 > > line2 > > > > How can I do this with struts? > > > > > > Regards, > > > > Frank -- Kris Schneider D.O.Tech - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: bean:write

2004-01-14 Thread Mark Lowe
sorry kris, i think i misunderstood the original question, but i get 
what you saying with the delim character needing to be a character not 
a string. I think our man wants

filter="false" anyhow ..

On 14 Jan 2004, at 14:57, Kris Schneider wrote:

The "delims" attribute of  works just like the "delim" 
argument to
a StringTokenizer constructor. For example, if you do:

StringTokenizer st = new StringTokenizer("line1line2", "", 
true);

Then st.countTokens() will return 6, not 3. In other words, the 
"delims"
attribute should be thought of as a set of delimiter characters, not 
as a single
delimiter string.

Quoting Mark Lowe <[EMAIL PROTECTED]>:

So you want to replace  for \n or similar.




...
This might work.

On 14 Jan 2004, at 14:30, Otto, Frank wrote:

Hello,

I want to write a string like "line1line2".

If I use , I will 
get
line1
line2. If I use filter="false"/>, I will get line1line2. But I want to write: line1 line2 How can I do this with struts? Regards, Frank -- Kris Schneider D.O.Tech - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: BeanUtils.populate Invocation Error

2004-01-14 Thread Mark Lowe
So have you something like this?

public class PropertyEditForm extends ActionForm {
//bla bla
}

public class PropertyListForm extends ActionForm {

	private ArrayList propertyList;

public PropertyListForm() {
this.propertyList = new ArrayList();
}
public PropertyEditForm getProperty(int i) {
return (PropertyEditForm) propertyList.get(i);
}
public void setProperties(Object[] properties) {
..
}

public void setProperty(int i, PropertyEditForm property) {
propertyList.add(i, property);
}
}



On 14 Jan 2004, at 14:38, Nathan Ewing wrote:

Basically all I have is 1 form bean that includes 2 arrays of itself  
in it.

When the app runs it gets 2 lists of the different categories of
SoldProperty and makes a jsp form that allows you to change certain  
details
of the beans all at once, and then if you click on one of the beans  
you can
edit them individually.

There are actually two actions, one is PropertyList, which only loads  
and
manages those two arrays of beans, and then there is PropertyEdit,  
which
works on an individual bean, and ignores the two lists.

I hope this makes sense.

The code I posted below is a shortcut I put in all my beans.  I  
overrode
ActionForm and put a couple extra functions in.  One of them  
automatically
resets all the variables in the bean for me without having to manually  
write
a reset function for every bean to do the same thing.

The other changes the way validate works.  Instead of 1 function that  
does
all the validating, I write individual validateAttributeName()  
functions and
the code below just calls all of them for me.  Of course none of the
validate code matters, cause I didn't call it here (which makes me  
wonder
why I bothered to post it).

Somehow I doubt you are stupid :)

I hope I didn't make all this sounds more complicated than it is.  All  
I
really wanna do is allow the users of my site to check a bunch of  
checkboxes
all at once for multiple records instead of opening them all  
individually.

Thanks,
Nathan


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 9:17 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error
Looks complicated what are you trying to do? Sorry I'm pretty stupid
and so i try and keep things simpler.
On 14 Jan 2004, at 13:55, Nathan Ewing wrote:

I posted much of the form bean code at the bottom.  Aside for the two
arrays
of SoldProperty, there are a bunch of getString and setString.  This
is part
of the bean SoldProperty (aka there are two arrays of SoldProperty in
the
SoldProperty bean).
I altered the validate code and reset code so that it does the
validating
and resetting for me, as follows:
If there is anything else you need please let me know.

Nathan

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request, String[] propertyList) {
//Reset errors
errors = new ActionErrors();


ClassManager manager = new ClassManager (this);
for (int a = 0; a < propertyList.length; a++){
try {
String methodName = "validate" +
propertyList[a];
manager.runNoArgMethod(methodName);

} catch (NoSuchMethodException e){
//Method Doesn't exist, Don't worry
about it
} catch (IllegalAccessException e){
} catch
(java.lang.reflect.InvocationTargetException e){}
}
return errors;

}
public void reset(ActionMapping mapping, HttpServletRequest request)
{
ClassManager manager = new ClassManager (this);
for (int a = 0; a < DataMembers.length; a++){
try {
String methodName = "set" + DataMembers[a];
Class[] argTypes = {String.class};
Object[] args = {null};
manager.runMethod(methodName, argTypes,
args);  

} catch (NoSuchMethodException e){
//Method Doesn't exist, Don't worry
about it
} catch (IllegalAccessException e){
} catch
(java.lang.reflect.InvocationTargetException e){}
}

}
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 1

Re: bean:write

2004-01-14 Thread Kris Schneider
The "delims" attribute of  works just like the "delim" argument to
a StringTokenizer constructor. For example, if you do:

StringTokenizer st = new StringTokenizer("line1line2", "", true);

Then st.countTokens() will return 6, not 3. In other words, the "delims"
attribute should be thought of as a set of delimiter characters, not as a single
delimiter string.

Quoting Mark Lowe <[EMAIL PROTECTED]>:

> So you want to replace  for \n or similar.
> 
> 
> 
>   
> ...
> 
> This might work.
> 
> 
> On 14 Jan 2004, at 14:30, Otto, Frank wrote:
> 
> > Hello,
> >
> > I want to write a string like "line1line2".
> >
> > If I use , I will get 
> > line1
line2. > > If I use > filter="false"/>, I will get line1line2. > > > > But I want to write: > > > > line1 > > line2 > > > > How can I do this with struts? > > > > > > Regards, > > > > Frank -- Kris Schneider D.O.Tech - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: BeanUtils.populate Invocation Error

2004-01-14 Thread Nathan Ewing
Basically all I have is 1 form bean that includes 2 arrays of itself in it.

When the app runs it gets 2 lists of the different categories of
SoldProperty and makes a jsp form that allows you to change certain details
of the beans all at once, and then if you click on one of the beans you can
edit them individually.

There are actually two actions, one is PropertyList, which only loads and
manages those two arrays of beans, and then there is PropertyEdit, which
works on an individual bean, and ignores the two lists.

I hope this makes sense.

The code I posted below is a shortcut I put in all my beans.  I overrode
ActionForm and put a couple extra functions in.  One of them automatically
resets all the variables in the bean for me without having to manually write
a reset function for every bean to do the same thing.

The other changes the way validate works.  Instead of 1 function that does
all the validating, I write individual validateAttributeName() functions and
the code below just calls all of them for me.  Of course none of the
validate code matters, cause I didn't call it here (which makes me wonder
why I bothered to post it).

Somehow I doubt you are stupid :)

I hope I didn't make all this sounds more complicated than it is.  All I
really wanna do is allow the users of my site to check a bunch of checkboxes
all at once for multiple records instead of opening them all individually.

Thanks,
Nathan



-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 9:17 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error

Looks complicated what are you trying to do? Sorry I'm pretty stupid  
and so i try and keep things simpler.


On 14 Jan 2004, at 13:55, Nathan Ewing wrote:

> I posted much of the form bean code at the bottom.  Aside for the two  
> arrays
> of SoldProperty, there are a bunch of getString and setString.  This  
> is part
> of the bean SoldProperty (aka there are two arrays of SoldProperty in  
> the
> SoldProperty bean).
>
> I altered the validate code and reset code so that it does the  
> validating
> and resetting for me, as follows:
>
> If there is anything else you need please let me know.
>
>   Nathan
> 
>
>   public ActionErrors validate(ActionMapping mapping,
> HttpServletRequest request, String[] propertyList) {
>   //Reset errors
>   errors = new ActionErrors();
>   
>   
>   ClassManager manager = new ClassManager (this);
>   for (int a = 0; a < propertyList.length; a++){
>   try {
>   String methodName = "validate" +
> propertyList[a];
>   manager.runNoArgMethod(methodName);
>   
>   } catch (NoSuchMethodException e){
>   //Method Doesn't exist, Don't worry
> about it
>   } catch (IllegalAccessException e){
>   } catch
> (java.lang.reflect.InvocationTargetException e){}
>
>   }
>   return errors;
>   
>   }
>
>   public void reset(ActionMapping mapping, HttpServletRequest request)
> {
>   ClassManager manager = new ClassManager (this);
>   for (int a = 0; a < DataMembers.length; a++){
>   try {
>   String methodName = "set" + DataMembers[a];
>   Class[] argTypes = {String.class};
>   Object[] args = {null};
>   manager.runMethod(methodName, argTypes,
> args);
>   
>   } catch (NoSuchMethodException e){
>   //Method Doesn't exist, Don't worry
> about it
>   } catch (IllegalAccessException e){
>   } catch
> (java.lang.reflect.InvocationTargetException e){}
>
>   }
>   
>   }
>
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 4:12 AM
> To: Struts Users Mailing List
> Subject: Re: BeanUtils.populate Invocation Error
>
> I had a similar problem yesterday with multiple selected select menus.
> What does your form bean look like and then your nested beans.
>
>
>
> On 14 Jan 2004, at 03:57, Nathan Ewing wrote:
>
>> I have a jsp page with a form on it using indexed properties.  I have
>> a bean
>> with an array of beans that I use to connect with the jsp page.  The
>> page
>> displays fine, but when I try to save it, I get the following error:
>>
>> javax.servlet.ServletException: BeanUtils.populate
>>  at
>> org.apache.struts.util.RequestUt

Re: bean:write

2004-01-14 Thread Mike Deegan
does it work with  instead of 
because I have things working exactly as you would have with ...


filter="false" does the trick for me - only difference is my line breaks are
 instead of 

not sure if that changes things for you

- Original Message - 
From: "Otto, Frank" <[EMAIL PROTECTED]>
To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 7:30 AM
Subject: bean:write


> Hello,
>
> I want to write a string like "line1line2".
>
> If I use , I will get
line1
line2. > If I use , I will get line1line2. > > But I want to write: > > line1 > line2 > > How can I do this with struts? > > > Regards, > > Frank > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: bean:write

2004-01-14 Thread Mark Lowe
So you want to replace  for \n or similar.




...
This might work.

On 14 Jan 2004, at 14:30, Otto, Frank wrote:

Hello,

I want to write a string like "line1line2".

If I use , I will get 
line1
line2. If I use , I will get line1line2. But I want to write: line1 line2 How can I do this with struts? Regards, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

AW: Struts Tiles Double Post Issue

2004-01-14 Thread Otto, Frank
I had a similar problem too. 

I was using background="#" in my table tag. The problem was with IE and Netscape.

-Ursprüngliche Nachricht-
Von: Guillermo Meyer [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 14. Januar 2004 15:33
An: 'Struts Users Mailing List'
Betreff: RE: Struts Tiles Double Post Issue


I had a similar problem (double submit to my action) but it was not a
tiles problem. It happened when I was using my application with Netscape
7.
The problem has a  tag problem, where I was using a background="
" attribute.

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Miércoles, 14 de Enero de 2004 10:10 a.m.
To: Struts Users Mailing List
Subject: Re: Struts Tiles Double Post Issue


Hi Justin,
I don't know of any bugs relating to double-posting in any browsers or 
struts etc, so I'd suggest that you have done something wrong in your 
javascript or your action mapping or your tiles definition.

On 01/13/2004 04:09 PM Smith Justin M wrote:
> I am running into a problem with Struts Tiles.  My action class is 
> being executed twice when I submit a page.
> 
> I have a simple page like this.
> 
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>  action="ViewOtherCustomerInformation">
>   
> 
> 
> It executes the action that I define in my struts config.
> 
> 
> 
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
> 
> 
> 
>   
> 
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 

> 
type="com.component.customer.admin.actions.ViewOtherCustomerInformationA
ction"
>   name="otherCustomerInformationActionForm"
>   scope="request">
> 
>  
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I am seeing the second execution happen when the   attribute="body" /> line gets called in the layout.jsp file.
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <%@ 
> taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib 
> uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib 
> uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> 
> 
>  
>   rel="stylesheet" type="text/css" href=" page='/en_US/includes/css/cssstyle.css'/>">
> 
> 
> 
> 
>   
>  vlink="#669966" alink="#669966" marginheight=0 marginwidth=0 
> topmargin=0 leftmargin=0>  
> 
> 
> 
> 
> 
> 
>  
> 
> 
>   
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Any ideas why this is happening?
> 
> Is this normal?
> 
> Here is my tiles def xml file...
> 
> 
>"-//Apache Software Foundation//DTD Tiles Configuration//EN"
>   "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
>   
> 
> 
>   
> 
> 
> 
>
>   
> 
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> Thanks...
> 
> Justin
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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



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

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



RE: Struts Tiles Double Post Issue

2004-01-14 Thread Guillermo Meyer
I had a similar problem (double submit to my action) but it was not a
tiles problem. It happened when I was using my application with Netscape
7.
The problem has a  tag problem, where I was using a background="
" attribute.

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Miércoles, 14 de Enero de 2004 10:10 a.m.
To: Struts Users Mailing List
Subject: Re: Struts Tiles Double Post Issue


Hi Justin,
I don't know of any bugs relating to double-posting in any browsers or 
struts etc, so I'd suggest that you have done something wrong in your 
javascript or your action mapping or your tiles definition.

On 01/13/2004 04:09 PM Smith Justin M wrote:
> I am running into a problem with Struts Tiles.  My action class is 
> being executed twice when I submit a page.
> 
> I have a simple page like this.
> 
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>  action="ViewOtherCustomerInformation">
>   
> 
> 
> It executes the action that I define in my struts config.
> 
> 
> 
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
> 
> 
> 
>   
> 
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 

> 
type="com.component.customer.admin.actions.ViewOtherCustomerInformationA
ction"
>   name="otherCustomerInformationActionForm"
>   scope="request">
> 
>  
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I am seeing the second execution happen when the   attribute="body" /> line gets called in the layout.jsp file.
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <%@ 
> taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib 
> uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib 
> uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> 
> 
>  
>   rel="stylesheet" type="text/css" href=" page='/en_US/includes/css/cssstyle.css'/>">
> 
> 
> 
> 
>   
>  vlink="#669966" alink="#669966" marginheight=0 marginwidth=0 
> topmargin=0 leftmargin=0>  
> 
> 
> 
> 
> 
> 
>  
> 
> 
>   
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Any ideas why this is happening?
> 
> Is this normal?
> 
> Here is my tiles def xml file...
> 
> 
>"-//Apache Software Foundation//DTD Tiles Configuration//EN"
>   "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
>   
> 
> 
>   
> 
> 
> 
>
>   
> 
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> Thanks...
> 
> Justin
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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



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



bean:write

2004-01-14 Thread Otto, Frank
Hello,
 
I want to write a string like "line1line2".
 
If I use , I will get 
line1
line2. If I use , I will get line1line2. But I want to write: line1 line2 How can I do this with struts? Regards, Frank

RE: Images as links in struts

2004-01-14 Thread vasudevrao gupta

This is how I have given...

Re: BeanUtils.populate Invocation Error

2004-01-14 Thread Mark Lowe
Looks complicated what are you trying to do? Sorry I'm pretty stupid  
and so i try and keep things simpler.

On 14 Jan 2004, at 13:55, Nathan Ewing wrote:

I posted much of the form bean code at the bottom.  Aside for the two  
arrays
of SoldProperty, there are a bunch of getString and setString.  This  
is part
of the bean SoldProperty (aka there are two arrays of SoldProperty in  
the
SoldProperty bean).

I altered the validate code and reset code so that it does the  
validating
and resetting for me, as follows:

If there is anything else you need please let me know.

Nathan

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request, String[] propertyList) {
//Reset errors
errors = new ActionErrors();


ClassManager manager = new ClassManager (this);
for (int a = 0; a < propertyList.length; a++){
try {
String methodName = "validate" +
propertyList[a];
manager.runNoArgMethod(methodName);

} catch (NoSuchMethodException e){
//Method Doesn't exist, Don't worry
about it
} catch (IllegalAccessException e){
} catch
(java.lang.reflect.InvocationTargetException e){}
}
return errors;

}
public void reset(ActionMapping mapping, HttpServletRequest request)
{
ClassManager manager = new ClassManager (this);
for (int a = 0; a < DataMembers.length; a++){
try {
String methodName = "set" + DataMembers[a];
Class[] argTypes = {String.class};
Object[] args = {null};
manager.runMethod(methodName, argTypes,
args);  

} catch (NoSuchMethodException e){
//Method Doesn't exist, Don't worry
about it
} catch (IllegalAccessException e){
} catch
(java.lang.reflect.InvocationTargetException e){}
}

}
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 4:12 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error
I had a similar problem yesterday with multiple selected select menus.
What does your form bean look like and then your nested beans.


On 14 Jan 2004, at 03:57, Nathan Ewing wrote:

I have a jsp page with a form on it using indexed properties.  I have
a bean
with an array of beans that I use to connect with the jsp page.  The
page
displays fine, but when I try to save it, I get the following error:
javax.servlet.ServletException: BeanUtils.populate
	at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
	at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProce 
s
sor.j
ava:821)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav 
a
:254)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java: 
1482)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.StandardWrapperValve.invokeServletService(Sta 
n
dardW
rapperValve.java:720)
	at
org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapp 
e
rValv
e.java:118)
	at
org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperVal 
v
e.jav
a:278)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa 
l
ve.ja
va:274)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java 
:
505)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa 
l
ve.ja
va:212)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java 
:
505)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja 
v
a:203
)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java 
:
505)
	at
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProces 
s
or.ja
va:157)
	at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

Root Cause

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j 
a
va:39
)
	at
sun.reflect.De

RE: Images as links in struts

2004-01-14 Thread Michael McGrady
Just do the normal thing?  Put an image tag in the body of a link tag.

http://jakarta.apache.org/struts/userGuide/struts-html.html#link

	"The content displayed for this hyperlink will be taken from the body of 
this tag."



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


RE: BeanUtils.populate Invocation Error

2004-01-14 Thread Nathan Ewing
I posted much of the form bean code at the bottom.  Aside for the two arrays
of SoldProperty, there are a bunch of getString and setString.  This is part
of the bean SoldProperty (aka there are two arrays of SoldProperty in the
SoldProperty bean).

I altered the validate code and reset code so that it does the validating
and resetting for me, as follows:

If there is anything else you need please let me know.

Nathan


public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request, String[] propertyList) {
//Reset errors
errors = new ActionErrors();


ClassManager manager = new ClassManager (this);
for (int a = 0; a < propertyList.length; a++){
try {
String methodName = "validate" +
propertyList[a];
manager.runNoArgMethod(methodName);

} catch (NoSuchMethodException e){
//Method Doesn't exist, Don't worry
about it
} catch (IllegalAccessException e){
} catch
(java.lang.reflect.InvocationTargetException e){}

}
return errors;

}

public void reset(ActionMapping mapping, HttpServletRequest request)
{
ClassManager manager = new ClassManager (this);
for (int a = 0; a < DataMembers.length; a++){
try {
String methodName = "set" + DataMembers[a];
Class[] argTypes = {String.class};
Object[] args = {null};
manager.runMethod(methodName, argTypes,
args);  

} catch (NoSuchMethodException e){
//Method Doesn't exist, Don't worry
about it
} catch (IllegalAccessException e){
} catch
(java.lang.reflect.InvocationTargetException e){}

}

}


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 4:12 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate Invocation Error

I had a similar problem yesterday with multiple selected select menus.  
What does your form bean look like and then your nested beans.



On 14 Jan 2004, at 03:57, Nathan Ewing wrote:

> I have a jsp page with a form on it using indexed properties.  I have  
> a bean
> with an array of beans that I use to connect with the jsp page.  The  
> page
> displays fine, but when I try to save it, I get the following error:
>
> javax.servlet.ServletException: BeanUtils.populate
>   at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
>   at
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProces 
> sor.j
> ava:821)
>   at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java 
> :254)
>   at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>   at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.catalina.core.StandardWrapperValve.invokeServletService(Stan 
> dardW
> rapperValve.java:720)
>   at
> org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrappe 
> rValv
> e.java:118)
>   at
> org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValv 
> e.jav
> a:278)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal 
> ve.ja
> va:274)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 505)
>   at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal 
> ve.ja
> va:212)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 505)
>   at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav 
> a:203
> )
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 505)
>   at
> com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcess 
> or.ja
> va:157)
>   at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
>
>
> Root Cause
>
> java.lang.reflect.InvocationTargetException
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMetho

AW: html tags in string

2004-01-14 Thread Otto, Frank
Thanks, 

it displayed  instead 
now, but no line feed occurs. -Ursprungliche Nachricht- Von: Mark Lowe [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 14. Januar 2004 14:26 An: Struts Users Mailing List Betreff: Re: html tags in string On 14 Jan 2004, at 13:22, Otto, Frank wrote: > Hello, > > I have a string with html tags. If I want to write the string with > , it will displayed for example as
and not > as line feed. > > Has anyone an idea? > > > Regards, > > Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: handling form based authentication w/ remember-me cookie

2004-01-14 Thread Matt Raible
On Jan 14, 2004, at 3:52 AM, Nadeem Bitar wrote:
A note about storing passwords in cookies.
Encode the password.
Do not store the userid with the password in the cookie, store some id
associated with the user id.
You can generate a one-way hash (MD5) of the contents of the cookie 
with
a "secret key" only known to the server. This way when you get the
cookie back you can compare it to make sure it wasn't altered.

Many open source java projects store passwords in cookies insecurely so
beware of that if you are going to use that as reference.
I'm guilty of this - do you have code samples (or articles) of how to 
MD5-ify a String and get it's "secret code?"  I've been struggling with 
this for quite some time - a full example (storing "some id" vs. 
userid) is even more desirable.

Thanks,

Matt

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


Re: html tags in string

2004-01-14 Thread Mark Lowe


or an interesting side effect of c:url







On 14 Jan 2004, at 13:22, Otto, Frank wrote:

Hello,

I have a string with html tags. If I want to write the string with 
, it will displayed for example  as 
and not as line feed. Has anyone an idea? Regards, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

html tags in string

2004-01-14 Thread Otto, Frank
Hello,
 
I have a string with html tags. If I want to write the string with , it 
will displayed for example  as 
and not as line feed. Has anyone an idea? Regards, Frank

Re: Hi Action Forward problem

2004-01-14 Thread Mark Lowe
If your trying to force the https scheme then i'd do this with your 
webserver, otherwise your app wont be very portable. If you do really 
need to do this then i'd keep the strings in a properties file, but i 
cant see why you'd have to.

I would be mightily vexed if i had to configure tomcat or another 
container to deal with https stuff just to develop on.

imo what you're trying is a hack and you'd be better finding another 
way..

Perhaps useful perhaps not

Cheers Mark

On 14 Jan 2004, at 11:55, [EMAIL PROTECTED] wrote:

try
new ActionForward("https://localhost:1443"+getContextPath()
+"xyz.jsp",true);
Regds
Anant Kumar
TCS




"N.N.S.S Ravi
Krishna" To: "'struts users'" 
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]cc:
l.com>   Subject: Hi Action 
Forward problem

01/14/04
04:29 PM
Please
respond to
"Struts Users
Mailing List"




Hi All,
I am trying to redirect to a page using the following piece of code:
new ActionForward("https://localhost:1443"+getContextPath()+"xyz.jsp");

when this action takes place the browsers takes me to an error page 
saying
java.lang.illegalArguementException: https://localhost:1443/xyz/xyz.jsp
should start with "/" character.
please help me in resolving this

thanx a ton





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


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


Re: AW: .NET: We are just like Struts... only better.

2004-01-14 Thread Matt Raible
The two Java libraries that I know of are JSP Tag Libraries  - here are 
links to their demo sites:

http://displaytag.org

http://raibledesigns.com/struts-menu

Matt

On Jan 14, 2004, at 2:08 AM, Salgar, Mehmet wrote:

Hello everybody,

I am following this discussion for very long time, it is really 
interesting.

I am developing both Java and MS stuff. Mainly I am a Java developer 
but I have few .NET projects also in the mean time.

I have to say that with Struts, JSP is a much attractive tool (with 
Velocity it is very very interesting tool :)) ) but I have to say that 
with ASP.NET and web control MS has a nodge over Java at the moment.

But I am sure when Java Server Faces will be ready, everything will be 
same again.

PS. If you need real numbers I can say that at this moment Web 
Controls give % 30 less development times over the controls like 
TreeView, Menu Controls, fully functional Rich Text Editor as Web 
Control.

And a question, do you know is there any library in Java producing the 
functionality of the View States.

Regards,

Mehmet Salgar

-Ursprüngliche Nachricht-
Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Gesendet am: Dienstag, 30. Dezember 2003 23:57
An: Struts Users Mailing List
Betreff: RE: .NET: We are just like Struts... only better.
Quoting "Hookom, Jacob" <[EMAIL PROTECTED]>:

As a follow up to your "by hand" comment, isn't Sun developing a new 
GUI
development tool to wizard-ize JSF?

Yes:  http://wwws.sun.com/software/products/jscreator/index.html

Even if it weren't a product coming from the company I work for :-), 
this one
would have me tempted ...

Many other companies are promising support for JavaServer Faces in the 
near term
as well.

Speaking of wizards, can JSF enforce flow in a wizard manner without
additional modifications like Struts?
Depends on what you mean by "enforce" -- Struts doesn't really do 
anything to
enforce flows.  However, both Struts and JavaServer Faces share the 
concept of
decoupling the actual name of the page to be displayed next from the 
business
logic that returns an outcome which the navigation decision is based 
on.  In
Struts you do this by using  declarations at the global or 
per-Action
level.  In JavaServer Faces, you do this by defining navigation rules 
based on
the page you're currently on, the action method that was called (i.e. 
which
submit button was pushed), and what the logical outcome value was 
returned by
the action method.

Thanks much!

Craig

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


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


Re: Struts Tiles Double Post Issue

2004-01-14 Thread Adam Hardy
Hi Justin,
I don't know of any bugs relating to double-posting in any browsers or 
struts etc, so I'd suggest that you have done something wrong in your 
javascript or your action mapping or your tiles definition.

On 01/13/2004 04:09 PM Smith Justin M wrote:
I am running into a problem with Struts Tiles.  My action class is being executed twice when I submit a page.

I have a simple page like this. 

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



It executes the action that I define in my struts config.  


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



 



   






		name="otherCustomerInformationActionForm"
		scope="request">



	   











I am seeing the second execution happen when the   line gets called in the layout.jsp file. 

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





















	
		











		

		
	











 

Any ideas why this is happening?

Is this normal?

Here is my tiles def xml file...



  "-//Apache Software Foundation//DTD Tiles Configuration//EN"
  "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
  


		



   
  





   



   


Thanks...

Justin



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



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: setting Form values from JSP for an object

2004-01-14 Thread Phillip Chan
Hi,



I think you need do something like:

 


 

There is no need to declare the bean or name it in your text fields.

The ActionForm seems to be okay.

Hope that helps
Phillip Chan

-Original Message-
From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
Sent: 14 January 2004 12:44
To: 'Struts Users Mailing List'
Subject: RE: setting Form values from JSP for an object


hi clair,

in my case i use 
nested:root (must address a bean with "name") OR nested:form

only in cases like i told you...
if a bean refereces to a nested
e.g.:
person --> address

nested:text is derived from html:text

for a situation of

   
...
it calls: address.setStreet();

cheers!



-Original Message-
From: Claire Wall [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 1:30 PM
To: Struts Users Mailing List
Subject: Re: setting Form values from JSP for an object


yeah i'm pretty familiar with nested tags having used them in situations
where I have objects nested within objects within my form e.g. to render
a tree structure. I thought it was a replacement for logic tags in these
sort of situations and have never considered using them elsewhere.

this works now thanks Matthias!

quick one though: what is the difference between nested & logic tags and
nested & html tags and in which situations would you choose to use
nested not the others?


cheers
claire :)


- Original Message -
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 11:46 AM
Subject: RE: setting Form values from JSP for an object


> Hi Claire
>
> have you tried the nested-tag?
>
> like this?
>
> 
> 
> name: 
> ref: 
> 
> 
> 
> your formBean (detailsForm) is associated action-path /nested
>
> greetings
>
> Matthias
>
>
>
> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 12:36 PM
> To: Struts Users Mailing List
> Subject: setting Form values from JSP for an object
>
>
> Hi,
>
> In have an ActionForm which contains an object called 'Details' like 
> so:
>
>
> public class DetailsForm extends ActionForm
> {
> private Details details = new Details();
>
> public void setDetails(Details details)
> {
> this.details = details;
> }
>
> public Details getDetails()
> {
> return details;
> }
> }
>
>  and the Details class contains two strings: name and reference, plus 
> the getters and setters.
>
>
> Now the problem i have is that in my JSP i can render these values 
> fine in text boxes. I want the user to be able to change the values, 
> submit the form and then save the changes. However, I cannot find the 
> way that will call the setters of the Details object. Is this possible

> and how is it done? I have tried the following ways in my JSP:
>
> Firstly, defined a bean and then used this bean definition to render 
> my text boxes:
>
> 
>
>  
> 
>
> 
>
>
> Secondly, didnt define the bean using  but instead did
> this:
>
>  style="width:150px"/>  property="details.reference" style="width:150px"/>
>
> 
>
> This didnt work either, I'm assuming because only the setters are 
> being called, and not get().set() like I want..
>
>
> Is there any way to call the setters for a class within my 
> ActionForm?? Any help would be appreciated.
>
>
> Claire :)
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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


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



This message has been scanned for viruses by MailControl - www.mailcontrol.com

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



Re: Blank page after form validation

2004-01-14 Thread Matt Raible
Most likely your "input" attribute is invalid - this usually results in 
a blank page in my experience.

HTH,

Matt

On Jan 13, 2004, at 10:56 PM, VENKATESH GANGAL wrote:

Hi All,

We have been facing a very strange problem with form validation

We have a JSP which is an input to an action and there is an 
associated form bean to validate the form.

Here is the configuaration file
struts-config.xml:





  



 

  
validation.xml :




   
   
   




MessageResources.properties
form.error.productRef = Please enter Product Reference
FormBean Validation method :

 public ActionErrors validate(ActionMapping mapping,HttpServletRequest 
request)
   {
	   //ActionErrors errors = super.validate(mapping, request);
	   ActionErrors errors = new ActionErrors();
		if ((productRef == null) || (productRef.trim().length()< 1)){
		errors.add ("productRef",new 
ActionError("form.error.productRef"));
		}
	
	   return errors ;
   }

Here is the JSP



	

 

  
   
  
		 
		
   
			
		

When I submit this form without entering anything in the textfield, it 
is taking me to a blank page.

Can anyone let me know why this is happening? It is not going to the 
action at all and is returning with errors to the JSP.I am not able to 
reach the page from where I submitted the data along with errors.The 
error was added to ActionErrors object.

We are using oc4j(Oracle Apps) standalone application.We are using 
struts 1.1

Thanks in advance for your help.

Cheers...
Venkatesh





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


RE: setting Form values from JSP for an object

2004-01-14 Thread Matthias Wessendorf
hi clair,

in my case i use 
nested:root (must address a bean with "name") OR nested:form

only in cases like i told you...
if a bean refereces to a nested
e.g.:
person --> address

nested:text is derived from html:text

for a situation of

   
...
it calls: address.setStreet();

cheers!



-Original Message-
From: Claire Wall [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 1:30 PM
To: Struts Users Mailing List
Subject: Re: setting Form values from JSP for an object


yeah i'm pretty familiar with nested tags having used them in situations
where I have objects nested within objects within my form e.g. to render
a tree structure. I thought it was a replacement for logic tags in these
sort of situations and have never considered using them elsewhere.

this works now thanks Matthias!

quick one though: what is the difference between nested & logic tags and
nested & html tags and in which situations would you choose to use
nested not the others?


cheers
claire :)


- Original Message -
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 11:46 AM
Subject: RE: setting Form values from JSP for an object


> Hi Claire
>
> have you tried the nested-tag?
>
> like this?
>
> 
> 
> name: 
> ref: 
> 
> 
> 
> your formBean (detailsForm) is associated action-path /nested
>
> greetings
>
> Matthias
>
>
>
> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 12:36 PM
> To: Struts Users Mailing List
> Subject: setting Form values from JSP for an object
>
>
> Hi,
>
> In have an ActionForm which contains an object called 'Details' like 
> so:
>
>
> public class DetailsForm extends ActionForm
> {
> private Details details = new Details();
>
> public void setDetails(Details details)
> {
> this.details = details;
> }
>
> public Details getDetails()
> {
> return details;
> }
> }
>
>  and the Details class contains two strings: name and reference, plus 
> the getters and setters.
>
>
> Now the problem i have is that in my JSP i can render these values 
> fine in text boxes. I want the user to be able to change the values, 
> submit the form and then save the changes. However, I cannot find the 
> way that will call the setters of the Details object. Is this possible

> and how is it done? I have tried the following ways in my JSP:
>
> Firstly, defined a bean and then used this bean definition to render 
> my text boxes:
>
> 
>
>  
> 
>
> 
>
>
> Secondly, didnt define the bean using  but instead did
> this:
>
>  style="width:150px"/>  property="details.reference" style="width:150px"/>
>
> 
>
> This didnt work either, I'm assuming because only the setters are 
> being called, and not get().set() like I want..
>
>
> Is there any way to call the setters for a class within my 
> ActionForm?? Any help would be appreciated.
>
>
> Claire :)
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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


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



Re: setting Form values from JSP for an object

2004-01-14 Thread Claire Wall
yeah i'm pretty familiar with nested tags having used them in situations
where I have objects nested within objects within my form e.g. to render a
tree structure. I thought it was a replacement for logic tags in these sort
of situations and have never considered using them elsewhere.

this works now thanks Matthias!

quick one though: what is the difference between nested & logic tags and
nested & html tags and in which situations would you choose to use nested
not the others?


cheers
claire :)


- Original Message -
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 11:46 AM
Subject: RE: setting Form values from JSP for an object


> Hi Claire
>
> have you tried the nested-tag?
>
> like this?
>
> 
> 
> name: 
> ref: 
> 
> 
> 
> your formBean (detailsForm) is associated action-path /nested
>
> greetings
>
> Matthias
>
>
>
> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 12:36 PM
> To: Struts Users Mailing List
> Subject: setting Form values from JSP for an object
>
>
> Hi,
>
> In have an ActionForm which contains an object called 'Details' like so:
>
>
> public class DetailsForm extends ActionForm
> {
> private Details details = new Details();
>
> public void setDetails(Details details)
> {
> this.details = details;
> }
>
> public Details getDetails()
> {
> return details;
> }
> }
>
>  and the Details class contains two strings: name and reference, plus
> the getters and setters.
>
>
> Now the problem i have is that in my JSP i can render these values fine
> in text boxes. I want the user to be able to change the values, submit
> the form and then save the changes. However, I cannot find the way that
> will call the setters of the Details object. Is this possible and how is
> it done? I have tried the following ways in my JSP:
>
> Firstly, defined a bean and then used this bean definition to render my
> text boxes:
>
> 
>
> 
> 
>
> 
>
>
> Secondly, didnt define the bean using  but instead did
> this:
>
>  style="width:150px"/>  property="details.reference" style="width:150px"/>
>
> 
>
> This didnt work either, I'm assuming because only the setters are being
> called, and not get().set() like I want..
>
>
> Is there any way to call the setters for a class within my ActionForm??
> Any help would be appreciated.
>
>
> Claire :)
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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



RE: How to remove forms from session

2004-01-14 Thread Jimmy Emmanual
try this:

if (mapping.getAttribute() != null) {
  if( "request".equals(mapping.getScope()) )
request.removeAttribute(mapping.getAttribute());
  else
session.removeAttribute(mapping.getAttribute());
}

-Original Message-
From: Brian Styles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 7:19 AM
To: [EMAIL PROTECTED]
Subject: How to remove forms from session


Hi all,

sometimes I want to force remove form objects that are stored in session.
I was trying to do this by using the following code:

 HttpSession session = request.getSession(  );
 session.invalidate();

However, I've seen that this doesn't work and sometimes the object remains 
in session - and the information is available on the jsp once I go back to 
it.

So perhaps someone could tell me the correct way to remove form beans from 
the session object.
thanks very much,
Brian

_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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

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



Re: java script + session Attribute

2004-01-14 Thread Anant_Kumar

java code is compiled before the javascript is executed. Therefore your
code should work fine.
Regds
Anant Kumar
TCS Noida-2
POSL(TIGER)
extn - 1040




   
  
"Namasivayam,  
  
Sudhakar   To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>  
(Cognizant)"   cc: 
  
<[EMAIL PROTECTED]Subject: java script + session 
Attribute  
izant.com> 
  
   
  
01/14/04 04:31 PM  
  
Please respond to  
  
"Struts Users  
  
Mailing List"  
  
   
  
   
  




Hi all,
 I would wat to do client side validation based on a
session attribute on a page. Should i put this value in a hidden value and
access it or can i put it directly into the java scipt code ex.
   for(var i= 0; i< <%= session.getAttribute("Length") %>; i++)
{...
}

 is this possible?

thanks
sudhakar
(See attached file: InterScan_Disclaimer.txt)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

How to remove forms from session

2004-01-14 Thread Brian Styles
Hi all,

sometimes I want to force remove form objects that are stored in session.
I was trying to do this by using the following code:
HttpSession session = request.getSession(  );
session.invalidate();
However, I've seen that this doesn't work and sometimes the object remains 
in session - and the information is available on the jsp once I go back to 
it.

So perhaps someone could tell me the correct way to remove form beans from 
the session object.
thanks very much,
Brian

_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


RE: Images as links in struts

2004-01-14 Thread Ben Anderson
http://jakarta.apache.org/struts/userGuide/struts-html.html#img


From: "vasudevrao gupta" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: Images as links in struts
Date: Wed, 14 Jan 2004 17:34:35 +0530


Hi All,

Can anyone help me about how to put images as links using struts tags???

Regards
VasudevRaoGupta
Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or 
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
There are now three new levels of MSN Hotmail Extra Storage!  Learn more. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1

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


Images as links in struts

2004-01-14 Thread vasudevrao gupta


Hi All,

Can anyone help me about how to put images as links using struts tags???

Regards
VasudevRaoGupta


Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



  1   2   >