Object mapping..

2003-10-07 Thread virupaksha
Dear All,

Can any one please tell me why we require object mapping with database in  model of 
MVC architecutre.
my doubt is, we can communicate with database by directly our bean..why we have to use 
 object mapping with OJB(Object Relational mapping) or whatever..i just want to know 
what is advantages by using object mapping over normal method..

waiting for ur valuable answers..

Regards  thanks ,

virupaksha

Re: error code 404

2003-10-07 Thread Peter Ondruska
I'm sorry I didn't pay attention. The error code Struts returns when action 
does not exist is not 404 (No Found) but it is 400 Bad Request. Now if I add 
appropriate error page for error code 400 everything works.

- Original Message -
From: Peter Ondruska [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 06, 2003 12:09 PM
Subject: error code 404
 On Struts 1.1 with Jetty 4.2.9 *.do is mapped to struts action servlet.
 Everything works fine except if requesting unknown action e.g.
 /thisActionDoesNotExistInStrutsConfig.do instead of web.xml defined
 error-page with code 404 I get container supplied code 404 general error
 page (as if no error page was defined in web.xml). Is this designed
 functionality in Struts or is it container (Jetty) bug?
_
FREE online games with MSN Messenger 6.0 - FREE download 
http://messenger.msn.cz

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


Re: Object mapping..

2003-10-07 Thread hgosper
Why object mapping? It is a design pattern that helps with separation of 
concerns in the database application.

Look up Data Access Object in google for more information.

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.



ssl question

2003-10-07 Thread Stephane Grenier
Hello all.

I can't seem to find the cause of this particular problem. Perhaps someone can point 
me in the correct direction.

On my local box I'm using sslext with the url being the ip of the box. I have no 
problems going in and out of ssl. The problem has only risen since I moved to the 
production box with a domain instead of an ip.

The first issue is that when I do a submit on an ssl form, the return url removes the 
www from the address and thus my ssl certificate says there is an error The name on 
the security certificate is invalid or does not match the name of the site. 

The second issue, if I leave the sslext:pageScheme secure=true / in the jsp, it 
seems to process forever (or until I get bored and stop the process). 

Any help would be appreciated.
Thank you,
Stephane

Re: ssl question

2003-10-07 Thread Stephane Grenier
As well, it appears that when sslext:pageScheme  is set to false, it acts
as any on the production box. Any suggestions are appreciated.

Thanks
Stephane

- Original Message -
From: Stephane Grenier [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 2:33 AM
Subject: ssl question


Hello all.

I can't seem to find the cause of this particular problem. Perhaps someone
can point me in the correct direction.

On my local box I'm using sslext with the url being the ip of the box. I
have no problems going in and out of ssl. The problem has only risen since I
moved to the production box with a domain instead of an ip.

The first issue is that when I do a submit on an ssl form, the return url
removes the www from the address and thus my ssl certificate says there is
an error The name on the security certificate is invalid or does not match
the name of the site.

The second issue, if I leave the sslext:pageScheme secure=true / in the
jsp, it seems to process forever (or until I get bored and stop the
process).

Any help would be appreciated.
Thank you,
Stephane


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



Performance constraints

2003-10-07 Thread Rohit_Arora
Hello All,
  Can some one help me and tell me abt 

-- the performance constraints that come due to the use of struts framework.
-- the constraints that come due to the use of actionservlet. 

-- How does the action servlet take care of multiple requests for the same web 
application ?
 Is it that 
  -- multiple of instances of the actionservlet come into existence 
  or 
  -- some kind of multithreading is done in the actionservlet code
 
-- How the webserver takes care of multiple requests ?

Thanks in advance,
 
Regards,
Rohit Arora


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



wrapping action invocations

2003-10-07 Thread Nathan Coast
Hi,

Apologies if this is a duplicate, I posted a few days ago but it doesn't seem to 
have made it to the list.

I'd like to introduce a layer between the action servlet and the action classes 
to perform generic processing - authorisation, error handling etc.

I have 2 solutions:

1) subclass the RequestProcessor with generic code in an overridden 
processActionPerform method.
2) provide an Action base class, generic code goes in a final implementation of 
the execute method which delegates to an abstract doExecute method.  Each 
subclass implements the doExecute method.

or is there some other way of achieving this?

Thanks
Nathan


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


RE: Performance constraints

2003-10-07 Thread Navjot Singh
-- the performance constraints that come due to the use of struts
framework.
-- the constraints that come due to the use of actionservlet.

I have hardly noticed nay perf loss on using struts. Naturally, every
framework has some overheads but you got to trade off with the maintence and
scalablity perspective and patternized arch.

-- How does the action servlet take care of multiple requests for
the same web application ?

There will be only 1 ActionServlet instance. Any request that's coming to
webserver will be forwarded to ActionServlet. ActionServlet tries to assign
one Action instance from the pool. If it's not there, the new Action
instance will be created and assigned to the request.

HTH
Navjot Singh


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



RE: Container-Managed Authentication login-config in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Navjot Singh
you may wish to look upon JAAS if you have so many diff roles and user per
roles.

Anyway, struts lets you specify role atrribute (that takes comma sep values,
i guess)
for each action. If you can extend RequestProcess class and modify the
processRoles() method so you can redirect to any page if the roles are not
valid for that action. etc etc..

Struts,using decalrative roles, tried to make things easier in term sof less
programming efforts and easiness to manage roles . Rest i can't see much
diff. Any opinions?

HTH
Navjot Singh

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 7:26 AM
To: Struts Users Mailing List
Subject: RE: Container-Managed Authentication login-config in web.xml
vs . Specifying Paths in the struts-config.xml


But, I do not want to use BASIC authentication.  I
have many different roles and hundreds of people per
role.  Users' name, role, etc. are stored in a
database.
--- Matt Raible [EMAIL PROTECTED] wrote:
 A JDBCRealm can use BASIC authentication - it
 doesn't require form-based.
 Here's an example app that might help you out:


http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample

 HTH,

 Matt

 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 06, 2003 4:45 PM
 To: [EMAIL PROTECTED]
 Subject: Container-Managed Authentication
 login-config in web.xml vs.
 Specifying Paths in the struts-config.xml


 I use the Tomcat.  I configured the Tomcat JDBCRealm
 so that I can use programmic security testing, such
 as
 isUserInRole(), in my program.

 Because Tomcat JDBCRealm is form based, I inserted
 the
 login-config and its sub-elements in my web.xml
 file
 (see below).  As we know, the form-login-page and
 form-error-page are required.

 My question is that the container-managed
 authentication does not seem to be consistent with
 what we usually do in struts; e.g. we state the
 logical name and path for each .jsp page in the
 struts-config.xml file.

 What is the Struts convention in dealing with user
 authentication?  Should we specify the paths for the
 logon page and error page in the struts.config.xml
 or
 we should use the form-login-page and
 form-error-page in the web.xml file?


==
 security-constraint
web-resource-collection

 web-resource-nameSalesInfo/web-resource-name
   url-pattern/SalesInfo/*/url-pattern
   http-methodGET/http-method
   http-methodPOST/http-method
/web-resource-collection
auth-constraint
   role-namemanager/role-name
/auth-constraint
user-data-constraint

 transport-guaranteeNONE/transport-guarantee
/user-data-constraint
 /security-constraint

 login-config
auth-methodFORM/auth-method
form-login-config


form-login-page/authentication/login.html/form-login-page


form-error-page/authentication/error.html/form-error-page
 /form-login-config

 /login-config

 security-role
role-namemanager/role-name
 /security-role




 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com


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


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



__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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




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



FW: retrieving values from multiple=true select box

2003-10-07 Thread Manav Gupta
No takers for this?

M

-Original Message-
From: Manav Gupta 
Sent: Monday, October 06, 2003 5:42 PM
To: 
Subject: retrieving values from multiple=true select box


Hi,

I'm sure this has been resolved by a thousand ppl before me, but I'm unable
to find an answer to it. I did google, but I'm at a loss I'm afraid.

So here goes: I need to retrieve all selected values from a HTML select
object, that has multiple=true set.

Here's my form bean snippet:
===
private final class TheFormBean {
 private String[] circuitTypeIDs;

  public  void setCircuitTypeIDs(String[] circuitTypeIDs)
  {
  this.circuitTypeIDs = circuitTypeIDs;
  }

  public  String[] getCircuitTypeIDs() {
   return this.circuitTypeIDs;
  }
}

  
The JSP:
===
html:select name=CircuitForm property=circuitTypeIDs multiple=true
size=3 
html:options collection=CircuitTypes property=ID
labelProperty=name/ 
/html:select


I do set the collection 'CircuitTypes' in the request in the action class
that forwards to the JSP above. 
The form-bea 'CircuitForm' has been declared in struts-config.xml (and I do
understand I don't need to mention the name of that form in the JSP).

However, when it retrieves only the *first* selected value in the select
box. What am I missing?

Deeply stressed,
M

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



html:submit

2003-10-07 Thread harm
Hi all,

How can I name a submit button. I need a name for it, because I want to 
access it from Javascript. I render the submit button as follows:

html:submit styleClass=button value=send! onclick=closing=false; 
document.correctionForm.action='/advertentieoverzicht/store_correction.do';
/

This renders:

input type=submit value=send! onclick=closing=false; 
document.correctionForm.action='/advertentieoverzicht/store_correction.do'; 
class=button

But i need:

input name=sendButton type=submit value=send! 
onclick=closing=false; 
document.correctionForm.action='/advertentieoverzicht/store_correction.do'; 
class=button

How can I achieve this?

Thank you very much,

Harm de Laat
Informatiefabriek
The Netherlands


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



[OT] deploying a war Problem on weblogic 6,1

2003-10-07 Thread tarun.matai
Hi All,
While deploying a war file on weblogic 6.1, I am getting 
java.lang.reflect.UndeclaredThrowableException error can any one help me solving this 
problem.
Regards
Tarun


DISCLAIMER:
This message contains privileged and confidential information and is intended only for 
the individual named.If you are not the intended recipient you should not 
disseminate,distribute,store,print, copy or deliver this message.Please notify the 
sender immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or 
error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or 
incomplete or contain viruses.The sender therefore does not accept liability for any 
errors or omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.

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



Re: workflow extension question

2003-10-07 Thread Matthias Bauer
Adam,

sorry that I obviously did not make myself clear enough. Look at the 
following definitions:

global-forwards:
workflowViolation_wiz1step1: violatedWizard1Step1
workflowViolation_wiz1step2: violatedWizard1Step2
displayWizard1Step1
primaryWorkflow: wiz1step1
newState: displayed
nextState: submitted
submitWizard1Step1
primaryWorkflow: wiz1step1
prevState: displayed
newState: submitted
forward=success:  displayWizard1Step2
displayWizard1Step2
secondaryWorkflow: wiz1step1
prevState: submitted
primaryWorkflow: wiz1step2
newState: displayed
nextState: submitted
submitWizard1Step2
primaryWorkflow: wiz1step2
prevState: displayed
newState: submitted
violatedWizard1Step1
type: ForwardNextStateViolationAction
forward=noNextStateViolation: displayWizard1Step1
violatedWizard1Step2
type: ForwardNextStateViolationAction
secondaryWorkflow: wiz1step1
endWorkflow: true
forward=noNextStateViolation: displayWizard1Step2
This is what can happen: If the user has just executed 
displayWizard1Step1 he can only execute submitWizard1Step1 without 
causing a workflow violation. If for instance he follows a link from the 
menu, the workflow wiz1step1 is executed, which causes the execution 
of action violatedWizard1Step1. Upon workflow violation of 
wiz1step1, this workflow is automatically cleaned up, so this action 
does not need to do any other cleanup work. The action class 
ForwardNextStateViolationAction forwards to the action the user has 
chosen from the menu after that.

Upon prevState violations, i. e. if the user executes 
submitWizard1Step1 without having executed displayWizard1Step1 
before, the action violatedWizard1Step1  causes a forward to 
displayWizard1Step1.

If a workflow violation of  wiz1step2 happens, the action 
violatedWizard1Step2 is executed, which also ends and cleans up the 
workflow wiz1step1. Except the mechansims are identical to workflow 
wiz1step1.

This should meet your requirements. Or am I still missing something?

Concerning your question whether this approach is better than the one to 
end all workflows: In many cases you do not want to end all workflows, 
but only these that belong to a certain process (in our example all 
workflows belonging to wizard1).

Please let me know, if there are still further questions.

--- Matthias



Adam Levine wrote:

Matthias:
  I think I understand your answer.  But, I'm not sure where things 
would go.  If I'm understanding your explanation:

process1:wkfl1 - process1:wkfl2 - (violation) process2:wkfl1 landing 
page(initializer action)

the p2:w1 landing page would be a ForwardNextStateViolationAction
  the FordwardNextStateViolationAction has forwards:
 forward noNextStateViolation : goes to display page for p2:w1
but, if there IS a next state violation, here's where I get confused:
  If a nextState violation was encountered it forwards to the path 
that caused this workflow violation 

Which would lead me back to the p2:w1 landing page ?   That confuses me.

Can you explain why this approach is better than just a i know i want 
to end all previous processes at this point, without having to link in 
with other violation actions ?   Or can they co-exist together nicely ?

Thanks for your help.

-- adam



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


Tools for Testing

2003-10-07 Thread Dirk Behrendt
Hello!
 
There are tools for automatic testing the Struts application?
 
Dirk


RE: [OT] deploying a war Problem on weblogic 6,1

2003-10-07 Thread Butt, Dudley
you need to set the permissions in the config.xml or weblogic.xml to enable the use of 
reflection...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 10:24 AM
Subject: [OT] deploying a war Problem on weblogic 6,1
Importance: High
Sensitivity: Confidential


Hi All,
While deploying a war file on weblogic 6.1, I am getting 
java.lang.reflect.UndeclaredThrowableException error can any one help me solving this
problem.
Regards
Tarun


DISCLAIMER:
This message contains privileged and confidential information and is intended only for 
the individual named.If you are not the intended recipient you
should not disseminate,distribute,store,print, copy or deliver this message.Please 
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot 
be guaranteed to be secure or error-free as information could be
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The 
sender therefore does not accept liability for any errors or
omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy
version.

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


NOTICE: 

This message contains privileged and confidential information intended 
only for the person or entity to which it is addressed. 
Any review, retransmission, dissemination, copy or other use of, or 
taking of any action in reliance upon this information by persons or 
entities other than the intended recipient, is prohibited. 

If you received this message in error, please notify the sender 
immediately by e-mail, facsimile or telephone and thereafter delete the 
material from any computer. 

The New Africa Capital Group, its subsidiaries or associates do not 
accept liability for any personal views expressed in this message.

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



RE: [OT] deploying a war Problem on weblogic 6,1

2003-10-07 Thread tarun.matai
Hi,
Can you please guide me how to set the permission to enable the use of 
reflection in config.xml or weblogic.xml

Regards,
Tarun Matai 



-Original Message-
From: Butt, Dudley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 3:00 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] deploying a war Problem on weblogic 6,1
Sensitivity: Confidential


you need to set the permissions in the config.xml or weblogic.xml to enable the use of 
reflection...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 10:24 AM
Subject: [OT] deploying a war Problem on weblogic 6,1
Importance: High
Sensitivity: Confidential


Hi All,
While deploying a war file on weblogic 6.1, I am getting 
java.lang.reflect.UndeclaredThrowableException error can any one help me solving this
problem.
Regards
Tarun


DISCLAIMER:
This message contains privileged and confidential information and is intended only for 
the individual named.If you are not the intended recipient you
should not disseminate,distribute,store,print, copy or deliver this message.Please 
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot 
be guaranteed to be secure or error-free as information could be
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The 
sender therefore does not accept liability for any errors or
omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy
version.

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


NOTICE: 

This message contains privileged and confidential information intended 
only for the person or entity to which it is addressed. 
Any review, retransmission, dissemination, copy or other use of, or 
taking of any action in reliance upon this information by persons or 
entities other than the intended recipient, is prohibited. 

If you received this message in error, please notify the sender 
immediately by e-mail, facsimile or telephone and thereafter delete the 
material from any computer. 

The New Africa Capital Group, its subsidiaries or associates do not 
accept liability for any personal views expressed in this message.

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



DISCLAIMER:
This message contains privileged and confidential information and is intended only for 
the individual named.If you are not the intended recipient you should not 
disseminate,distribute,store,print, copy or deliver this message.Please notify the 
sender immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or 
error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or 
incomplete or contain viruses.The sender therefore does not accept liability for any 
errors or omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.

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



Forwards with parameters

2003-10-07 Thread Jason Meredith

Chaps

I have a link with some parameters that a user selects to update a specific
record, something like this -

action/names?action=PageEditparamOne=101paramTwo=BOBparamThree=Joe

When a user updates the record, I want them to be able to go back to that
record with those parameters (this will have changed because the field
would have been updated)

To return a basic forward would be something like -

return mapping.findForward(success);

which would map to another action or possibly a JSP page.

How do get the mapping to forward to that url with those parameters
(remember that the params would be dynamic depending on the record
selected)

Regards

Jason




***
The e-mail and any attachments are confidential. They may contain
privileged information and are intended for the named addressee(s)
only. If you are not the intended recipient, please notify us
immediately and do not disclose, distribute, or retain this e-mail
or any part of it.

Unless expressly stated, opinions in this e-mail are those of the
individual sender and not of the FIMAT Group. We believe but do not
warrant that this e-mail and any attachments are virus free. 
You must therefore take full responsibility for virus checking. 
The FIMAT Group reserve the right to monitor e-mail communications
through its networks. 

Where this communication constitutes a financial promotion it is issued
and approved by Fimat International Banque S.A. (UK Branch) and is 
only intended for persons of a kind described in article 19(5) of the
Financial Services and Markets Act 2000 (Financial Promotion) Order
2001.  This information is not intended to be distributed to UK Private
Customers (as defined by the Financial Services Authority).

Fimat International Banque S.A. (UK Branch) whose registered branch
in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised
by the Commission Bancaire in France and by the UK Financial Services
Authority; regulated by the Financial Services Authority for the conduct of
UK Business and is entered in the Financial Services Authority's register
(Register Number 183415), access to which can be gained via the following
link: www.fsa.gov.uk/register/

Member and a SETS Participant of the London Stock Exchange (LSE).
Where this communication is confirming an on exchange transaction
(as defined by the LSE),the transaction is subject to the rules of the LSE.
Any information, opinions, estimates and forecasts contained in this 
document have been arrived at or obtained from public sources believed
to be reliable and in good faith which has not been independently 
verified and no warranty, express or implied, is made as to their accuracy,
completeness or correctness.  

This document is not an offer to sell or a solicitation to acquire or dispose
of an interest in financial instruments. 

If you have received this transmission in error, please telephone
+44 020 7676 8999 immediately so that we can arrange for its return.
***


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



Reusability of Popup Windows Exception

2003-10-07 Thread Frederic Dernbach
I'm trying to implement my first popup window. I'd like to implement a
search window for an entity (called signal in this case) that I can
reuse in different areas of my web application. This search window has
several criteria and one submit button in order to perform the database
lookup and propose a list of entities that the user can choose from the
one that interest him. 

Therefore, looking at the struts-layout popup example, I'm wondering if
I should use the struts-layout openpopup() and closepopup() primitives
since the popup window uses the caller's form.

I'm trying to have another approach (the begginer's one) by opening a
JSP that has it's own form and own struts action (modular approach).
Having a dedicated form for the search popup window, I do not tie the
caller's form to some search properties which objective is to specify
independent search criteria. Also I do not what to implement submit
actions of the search window (database lookup) within the callers submit
action class.

So, I implemented in the caller's JSP the following script :

script type=text/javascript
function openSearchSignalWindow()
{
searchWindow = window.open ('/search/searchSignal.jsp','Search Signal',
width=400, height=400); 
searchWindow.location.href = '/search/searchSignal.jsp';
if (searchWindow.opener == null) searchWindow.opener = self;
}
/script 

The script that opens '/search/searchSignal.jsp' (the search windows) is
being called within the caller's JSP with the following tag (Strtus
Layout tag equivalent to html:submit):
layout:submit  reqCode=searchSignal
onclick=openSearchSignalWindow() 
bean:message key=rubis.common.search /
/layout:submit

The 'searchSignal.jsp' JSP has a form (SearchSignalForm) different from
the caller's one. Extract from the searchSignal.jsp and
struts-config.xml files:

*** searchSignal.jsp (Struts-Layout tag equivalent to html:form) :
layout:formalign=center action=/SubmitSearchSignal.do
reqCode=search styleClass=FORM
width=80%
*** struts-config.xml
form-bean
name=searchSignalForm
type=com.rubis.web.system.form.SearchSignalForm/

action path=/SubmitSearchSignal
type=com.rubis.web.system.action.SubmitSearchSignalAction
scope=request
name=searchSignalForm
attribute=searchSignalForm
validate=false
forward name=search  path=/search/searchSignal.jsp /
/action

The action SubmitSearchSignal is supposed to perform the database
lookup.

Here is the problem. When I run this, the popup window does not show up
and I get an exception from Struts :

12:57:26,123 ERROR [RequestUtils] Error creating form bean of class
com.rubis.web.system.form.SearchSignalForm
java.lang.ClassCastException at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:837)
.../...

Does anybody has an idea what I'm doing wrong ?


Fred


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



Wizard with a Twist

2003-10-07 Thread Bob Lee
All,

I have requirements do develop a wizard like application where you can 
have multiple questions (up to 3) on a single page.

When there are multiple questions, the first appears, you select an 
answer, and the next one appears. If you change the answer to a 
previous question, all of the succeeding answers are reset and you have 
re-answer the questions.

What the next question is bears on the answers to the previous 
questions (or some other factors). I've deemed it okay to go back to 
the server each time.

There's also a requirement to do a bread crumb trail, but it will need 
to go back pages of questions (not one question at a time). Also, going 
forward, if questions have been answered and you don't alter the 
answers, you should be able to go forward page by page as well.

I'm trying to figure out the best way to break this down (i.e. how many 
JSPs, actions, and forms to use, what scope to use for the forms, 
etc.). Key factors for maintainability will be the naming schemes (so 
you can easily follow and manipulate the flow) and the ability to move 
questions around without impacting other questions too much or making 
changes in too many places. Any tips or suggestions?

Note: I started down a more generic route where I was going to build a 
tool to manage the flow, but there's so many weird requirements (things 
specific to certain questions, etc.) that I decided it would be easier 
to just start out simple for this iteration.

Thanks,
Bob
P.S. I also have an option to use Blue Martini. Anyone have experience 
with this? Would it help me solve this problem more easily than just 
coding it with Struts?

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


Using set-property attribute in action class

2003-10-07 Thread Nisith Dash
How can i access the propery of a bean which i have set in the struts config
file using set-property in my action class.

thanks,

DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery of the message to such person) and may contain legally privileged and 
confidential information belonging to Tata Consultancy Services. It must not be 
printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever 
manner) by any person other than the addressee. Unauthorized use, disclosure or 
copying is strictly prohibited and may constitute unlawful act and can possibly 
attract legal action, civil and/or criminal. The contents of this message need not 
necessarily reflect or endorse the views of Tata Consultancy Services on any subject 
matter. Any action taken or omitted to be taken based on this message is entirely at 
your risk and neither the originator of this message nor Tata Consultancy Services 
takes any responsibility or liability towards the same. Opinions, conclusions and any 
other information contained in this message that do not relate to the official 
business of Tata Consultancy Services shall be understood as neither given nor 
endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. 
If you have received this message in error, you should destroy this message and may 
please notify the sender by e-mail. Thank you.


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

DynaValidatorForm

2003-10-07 Thread Glenn Holmer
When you're using DynaValidatorForm and the page has two buttons
(e.g. Commit and Cancel), how do you not validate if the user
hits the Cancel button (which on my page, also submits, but the
action checks the value of the submit button)?
Do I have to write a Form subclass to do this?  Can you have a
hand-coded Form subclass and use the Validator rules as well?
--

Glenn Holmer  [EMAIL PROTECTED]
Programmer/Analyst   phone: 414.908.1809
Weyco Group, Inc.  fax: 414.908.1601
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[help] nest logic:iterate problem!!

2003-10-07 Thread
Dear:
How to processes nested iterate tag?

Im meeting a nest iterate problem.
Ex:
 logic:iterate id=list1 name=list type=java.util.ArrayList
tr
logic:iterate id=itemlist name=list1 property=item 
type=java.util.ArrayList
  td width=14% class=td_Bcontentdiv 
align=center/divbean:write name=itemlist1 property=date//td
/logic:iterate
/tr
/logic:iterate
Have anything to solve this problem?

Thanks a lot 
Xlen

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



Re: DynaValidatorForm

2003-10-07 Thread Adam Hardy
If your buttons have values set then you can test to see which button 
value was submitted. Even better though with struts you can use the 
built-in cancel button without needing to do that. html:cancel/ and 
then check action.isCancelled(request)

Adam

On 10/07/2003 01:49 PM Glenn Holmer wrote:
When you're using DynaValidatorForm and the page has two buttons
(e.g. Commit and Cancel), how do you not validate if the user
hits the Cancel button (which on my page, also submits, but the
action checks the value of the submit button)?
Do I have to write a Form subclass to do this?  Can you have a
hand-coded Form subclass and use the Validator rules as well?
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DynaValidatorForm

2003-10-07 Thread Glenn Holmer
Adam Hardy wrote:
If your buttons have values set then you can test to see which button 
value was submitted. Even better though with struts you can use the 
built-in cancel button without needing to do that. html:cancel/ and 
then check action.isCancelled(request)
But those would be done in the action class, right?  I'm wondering
if this can be done using a DynaValidatorForm -- the Validator is
tossing me back to the input page before the action is invoked.
When you're using DynaValidatorForm and the page has two buttons
(e.g. Commit and Cancel), how do you not validate if the user
hits the Cancel button (which on my page, also submits, but the
action checks the value of the submit button)?
Do I have to write a Form subclass to do this?  Can you have a
hand-coded Form subclass and use the Validator rules as well?
--

Glenn Holmer  [EMAIL PROTECTED]
Programmer/Analyst   phone: 414.908.1809
Weyco Group, Inc.  fax: 414.908.1601
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DynaValidatorForm

2003-10-07 Thread Frederic Dernbach
Glenn,

- Use a descendant of DispatchAction for your form's action,
- Have two separate methods in the action class for your two buttons
(one for 'commit' and one for 'cancel').
- In the struts-config.xml file, specify attribute 'validate' to 'false'
for your form's action.The form validation wont't happen automatically
this way.
- In the method for the 'commit' button, call explicitely 'validate' on
your form. But not in the method associated to the cancel button.

Hope this helps.


Le mar 07/10/2003  13:49, Glenn Holmer a crit :
 When you're using DynaValidatorForm and the page has two buttons
 (e.g. Commit and Cancel), how do you not validate if the user
 hits the Cancel button (which on my page, also submits, but the
 action checks the value of the submit button)?
 
 Do I have to write a Form subclass to do this?  Can you have a
 hand-coded Form subclass and use the Validator rules as well?
 
 -- 
 
 Glenn Holmer  [EMAIL PROTECTED]
 Programmer/Analyst   phone: 414.908.1809
 Weyco Group, Inc.  fax: 414.908.1601
 
 
 -
 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]



Creating a bean!!!!

2003-10-07 Thread Zakaria khabot
Hi,
I have created a formBean :
form-beans
form-bean name=bookForm type=books.Book/
/form-beans

But the class Book isn't known as an element of tke package books. and I received this 
exception :

javax.servlet.jsp.JspException: Exception creating bean of class books.Book: {1}

void org.apache.struts.taglib.html.FormTag.initFormBean()

FormTag.java:563

int org.apache.struts.taglib.html.FormTag.doStartTag()

FormTag.java:520

how to resolve this problem. thanks.



Re: [help] nest logic:iterate problem!!

2003-10-07 Thread Frederic Dernbach
You can look at the struts-layout library that solved this problem in
its layout:collection tag. Source code of the library is available at
http://struts.application-servers.com/ .

Fred

Le mar 07/10/2003  13:52,  a crit :
 Dear:
 How to processes nested iterate tag?
 
 Im meeting a nest iterate problem.
 Ex:
logic:iterate id=list1 name=list type=java.util.ArrayList
 tr
 logic:iterate id=itemlist name=list1 property=item 
 type=java.util.ArrayList
   td width=14% class=td_Bcontentdiv 
 align=center/divbean:write name=itemlist1 property=date//td
 /logic:iterate
 /tr
 /logic:iterate
 Have anything to solve this problem?
 
 Thanks a lot 
 Xlen
 
 -
 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: workflow extension question

2003-10-07 Thread Adam L
Matthias:

   Thank you for the clearer explanation.

   If I understand this now, if I change all my current workflow violation
forwards to be of type ForwardNextStateViolationAction (they are all
currently just plain actions with a forward, no type specified), then the
existing workflow will work as originally designed, keeping the flow in
process, with both prev and next violations triggering and performing as
appropriate to this workflow, but an external workflow (launched from
another menu option) will be allowed to start if the user so chooses,
without being forced back into their first workflow.

  and the moral of the story is:
 a truly modal workflow process should have violations defined as:

 action path=/wkfAddNewInfoViolation
forward=/content/displaySelectionScreen.jspa /

 while a workflow process that can be interrupted by other workflows
will have violations defined as:

 action path=/wkfAddNewInfoViolation
type=ForwardNextStateViolationAction
   forward name=noNextStateViolation
path=/content/displaySelectionScreen.jspa /
!-- external forward (external process selected) is implicit --
   /action


 I think that indeed solves my problem.   Now  I'm trying to see how I can
use this for cases where an authentication fails, for instance a user is
required to be logged in first:
set-property property=authClass
value=com.foo.workflow.authentication.LoggedInAuthentication /
   forward name=authenticationException path=/login.do /

  How would I chain them to the login (or whichever) process, and then bring
them back to the step they were trying to perform prior?   I'm currently
seeing this as having to declare several instances of the login process as
actions, some rigged to the main menu login, others rigged from each
workflow that requires this authentication.   This seems like a lot of
extraneous work, and also requires this new subflow to be defined for every
workflow where this authentication is utilized.  That, or wrap the process
in chain of Actions that pass a token along that somehow says when you're
done with this entire flow, come back to this location.   I'm going to have
to ponder on this.   Do you have any thoughts on how this could easily be
achieved using your framework?

  Thank you again for all your help and thought!

-- adam





- Original Message -
From: Matthias Bauer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 3:20 AM
Subject: Re: workflow extension question


 Adam,

 sorry that I obviously did not make myself clear enough. Look at the
 following definitions:

 global-forwards:
 workflowViolation_wiz1step1: violatedWizard1Step1
 workflowViolation_wiz1step2: violatedWizard1Step2

 displayWizard1Step1
 primaryWorkflow: wiz1step1
 newState: displayed
 nextState: submitted

 submitWizard1Step1
 primaryWorkflow: wiz1step1
 prevState: displayed
 newState: submitted
 forward=success:  displayWizard1Step2

 displayWizard1Step2
 secondaryWorkflow: wiz1step1
 prevState: submitted
 primaryWorkflow: wiz1step2
 newState: displayed
 nextState: submitted

 submitWizard1Step2
 primaryWorkflow: wiz1step2
 prevState: displayed
 newState: submitted

 violatedWizard1Step1
 type: ForwardNextStateViolationAction
 forward=noNextStateViolation: displayWizard1Step1

 violatedWizard1Step2
 type: ForwardNextStateViolationAction
 secondaryWorkflow: wiz1step1
 endWorkflow: true
 forward=noNextStateViolation: displayWizard1Step2

 This is what can happen: If the user has just executed
 displayWizard1Step1 he can only execute submitWizard1Step1 without
 causing a workflow violation. If for instance he follows a link from the
 menu, the workflow wiz1step1 is executed, which causes the execution
 of action violatedWizard1Step1. Upon workflow violation of
 wiz1step1, this workflow is automatically cleaned up, so this action
 does not need to do any other cleanup work. The action class
 ForwardNextStateViolationAction forwards to the action the user has
 chosen from the menu after that.

 Upon prevState violations, i. e. if the user executes
 submitWizard1Step1 without having executed displayWizard1Step1
 before, the action violatedWizard1Step1  causes a forward to
 displayWizard1Step1.

 If a workflow violation of  wiz1step2 happens, the action
 violatedWizard1Step2 is executed, which also ends and cleans up the
 workflow wiz1step1. Except the mechansims are identical to workflow
 wiz1step1.

 This should meet your requirements. Or am I still missing something?

 Concerning your question whether this approach is better than the one to
 end all workflows: In many cases you do not want to end all workflows,
 but only these that belong to a certain process (in our example all
 workflows belonging to wizard1).

 Please let me know, if there are still further questions.

 --- Matthias



 Adam Levine wrote:

  Matthias:
I think I understand your answer.  But, I'm not sure where things
  would go.  If I'm 

Re: Wizard with a Twist

2003-10-07 Thread Adam L
For what it's worth, check out the workflow extension,
http://www.livinglogic.de/Struts
   It takes a bit of tinkering with to fully understand and appreciate its
power (check the archives for a very recent dialog between myself and its
designer, Matthias Bauer).  It's very simple in concept and design, but it's
thus far been able to handle almost every need I have for workflow
management.

 To put it very simply, you end up coding each component of your process as
a puzzle piece.  You then end up stringing them together with appropriate
actions and forwards to create your workflow process.   Component re-use has
finally been realized for me in my workflows!

-- adam


- Original Message -
From: Bob Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 6:31 AM
Subject: Wizard with a Twist


 All,

 I have requirements do develop a wizard like application where you can
 have multiple questions (up to 3) on a single page.

 When there are multiple questions, the first appears, you select an
 answer, and the next one appears. If you change the answer to a
 previous question, all of the succeeding answers are reset and you have
 re-answer the questions.

 What the next question is bears on the answers to the previous
 questions (or some other factors). I've deemed it okay to go back to
 the server each time.

 There's also a requirement to do a bread crumb trail, but it will need
 to go back pages of questions (not one question at a time). Also, going
 forward, if questions have been answered and you don't alter the
 answers, you should be able to go forward page by page as well.

 I'm trying to figure out the best way to break this down (i.e. how many
 JSPs, actions, and forms to use, what scope to use for the forms,
 etc.). Key factors for maintainability will be the naming schemes (so
 you can easily follow and manipulate the flow) and the ability to move
 questions around without impacting other questions too much or making
 changes in too many places. Any tips or suggestions?

 Note: I started down a more generic route where I was going to build a
 tool to manage the flow, but there's so many weird requirements (things
 specific to certain questions, etc.) that I decided it would be easier
 to just start out simple for this iteration.

 Thanks,
 Bob

 P.S. I also have an option to use Blue Martini. Anyone have experience
 with this? Would it help me solve this problem more easily than just
 coding it with Struts?


 -
 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: Creating a bean!!!!

2003-10-07 Thread Adam L
First:you don't need to use excessive punctuation in your subject
titles.  More often than not it's bound to get your post ignored or pushed
aside.

Second:
  I don't understand from your message if you DO or DO NOT have a class
named Book that resides in the package books
   as in:
code
  package books;

  public class Book {}
/code

 And, if you do:

Does the Book class extend org.apache.struts.action.ActionForm ?

 Does it have a no parameter constructor?



- Original Message -
From: Zakaria khabot [EMAIL PROTECTED]
To: struts-user [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 7:22 AM
Subject: Creating a bean


Hi,
I have created a formBean :
form-beans
form-bean name=bookForm type=books.Book/
/form-beans

But the class Book isn't known as an element of tke package books. and I
received this exception :

javax.servlet.jsp.JspException: Exception creating bean of class books.Book:
{1}

void org.apache.struts.taglib.html.FormTag.initFormBean()

FormTag.java:563

int org.apache.struts.taglib.html.FormTag.doStartTag()

FormTag.java:520

how to resolve this problem. thanks.


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



RE: Tools for Testing

2003-10-07 Thread Nguyen, Hien
Take a look at StrutsTestCase for Junit at www.junit.org.

-Original Message-
From: Dirk Behrendt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 07, 2003 5:07 AM
To: [EMAIL PROTECTED]
Subject: Tools for Testing


Hello!
 
There are tools for automatic testing the Struts application?
 
Dirk

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



Re: CTRL-N should not work in different machine...

2003-10-07 Thread Prashanth.S
Hi,
Regarding my problem of invalidating application[giving some sort of session timeout 
error when the url of a running application is copy pasted into  different machine] i 
have one small idea.
Iam passing sessionid in url...so what i will do is get some property which is 
specific to each system and set that into session and before executing any jsp i will 
check this property with the property of the system...If thses 2 things match i will 
let application run else i will invaidate the applicationIs it correct???If this 
is good idea what is the good system property which is unique to each system???
waiting for reply
Thanks
Prashanth


Craig R. McClanahan [EMAIL PROTECTED] wrote:
Andrew Hill wrote:


I think that IE will keep all the session infomation in the new window, but
Netscape starts up a complete new session


Thats if your using cookies.

For IE, it also depends on the setting of your browse in a new process 
(or something like that) setting -- it's not an absolute one way or the 
other.

Craig



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


-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Menu inside Tab content

2003-10-07 Thread Nguyen, Hien
Hi,

I use tabLayout.jsp and on one of my tabs, I have a menu. (using Struts'
menu.jsp).  When my user clicks on the menu's link, I want to be able to
load that page into the tab's content.  Can someone please give some
guidedance as to how I should approach this?  

Thanks.
--Hien




xml objects for forms and persistence

2003-10-07 Thread MBrewer
I will be working on porting a company framework (and hopefully open source
it) from ASP/VB (yack!) to Java. The idea of the framework is quite simple.
It is a framework for buiding administration screens like update/search
edit user but it has some interesting features :

The Business objects a described in xml ie :

entity
nameuser/name
tableusr/table
attributes
namefirstname/name
label
EN
labelFirst Name/label
/EN
.
/attributes

attributegroups
attributegroup
nameLabel/name
attributes
attributefirstname/attribute
attributesurname/attribute
/attributes
/attributegroup
attributegroup
nameEdit/name
attributes
attributefirstname/attribute
attributesurname/attribute

/attributes
/attributegroup
etc..
/entity


The Business Object xml descriptor has enough information for display it as
well as updating it. AttributesGroups allow for list views and edit views
of the object.

Another component of the framework is the PageFlows that are made up of
Actions that use these Business Objects to get the info for these views
like Edit User. Most of the time you do not need to write code at all, we
have also written a editor for the Business Objects and the Pages Flows.


So at the end of the day the html of genernated by the framework from the
xml descriptor and the persistence is also done from there. So doing
administration screens are very quick. ie : days instead of weeks. The some
code can be used for web front ends as well as guis.

I was wondering it there is anything else out there like this or are there
ways on doing some intergration of this with Struta and Hibernate and
Cocoon?

At the end the benefits are amazing taking minutes rather than hours to get
stuff done
I really mean radically, to do a search/edit/delete etc.. for a object
takes minutes. And being frontend independent means that you can write web
as well as swing stuff.

Mike





The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.



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



Struts Token and Forxard

2003-10-07 Thread liste
Hi everyone,

I hope someone will help meÂ…

I decided to use the Struts token solution to manage double submits and back 
button problem. It almost seems to work ; indeed, all extra submissions bring 
me back to the JSP with a message, via my prepare action classÂ…

My problem is that when the treatment of the form is finished, the forward link 
at the end of the action class is not effective, my application stays on the 
JSP which had been submittedÂ…

What do I have wrong ? 

Thank you for any help, Frederic




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



set a relative path instead of absolute for a jsp file

2003-10-07 Thread David Thielen
Hi;

I have a situation where I need to have the jsp files with my html files. (I have just 
2 of them and they use the same templates as the 100+ html files and they are a simple 
part of the website.) My J2EE server is configured to look in both the server's web 
application directory and c:/Inetpub/wwwroot so that part works ok.

Here's the problem:
IIS looks at the http request header to determine which website to go to. When that is 
set (which it is 99% of the time), it goes to c:/Inetpub/wwwroot/windwardreports and 
gets the file and everything works fine.

But if there is no header info, then it goes to c:/Inetpub/wwwroot and now the jsp 
file is /windwardreports/demo.jsp instead of /demo.jsp. And now the J2EE server can't 
find it because struts is looking for /demo.jsp.

Is there a way in struts to tell it to look for a relative path? In other words, if I 
start with windwardreports/form.jsp, then go to windwardreports/demo.jsp?

thanks - dave

form object names, population and processing

2003-10-07 Thread Takis Diakoumis
hi

i'm using an ActionForm to populate a form and update (or add new) data. i
have a bean object with set/get methods which i add to my extended
ActionForm class with setMyObject and getMyObject. 

i use the above to populate my form which works fine. when using a tag in a
form say for a text field like below:

html:text property=myObject.myValue

the correct value is populated within the form and all seems ok. the
problem i'm having is the generated html is as follows:

input type=text name=myObject.myValue value=whatever/

this makes it difficult to reference the above field when using javascript
for focusing, client-side validation and so forth since
document.formName.myObject.myValue.focus() for example will not work. the
only way it would work is if the field name was just the myValue portion.
This of course can be achieved by defining a variable using 

bean:define id=myBean name=formName property=myObject/

then just referencing the myBean and whatever field within that object in
the html:text tag. 

however, where struts will populate the field using the above method and
making all your fields accessible using client-side bits like javascript,
it does not quite work when processing the form as the extended ActionForm
will not process the myValue named field as this does not exist directly
within the ActionForm. (i hope this is making sense). 

the alternative would be to define all your set/get for your object in the
ActionForm which as far as i can see violates some of the mvc you're trying
to achieve as the ActionForm becomes the model making it difficult to
reference ejb objects and so forth. again, you could replicate the accessor
methods in the ActionForm, but this too appears as a waste of time and
effort - rewriting an object completely.

basically is there any work-around to the above to achieve field names that
client-side code can work with easily whilst still having the ActionForm do
the population and processing work for you?

any suggestions would be greatly appreciated.

thanks

Takis

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



Re: ssl question

2003-10-07 Thread Max Cooper
The second problem is likely an infinite redirection loop:

Browser: I want http://server/page.jsp
Server: Go to https://server/page.jsp
Browser: I want https://server/page.jsp
Server: Go to http://server/page.jsp
Browser: I want http://server/page.jsp
Server: Go to https://server/page.jsp
... until the browser or server is shut down

You can verify this with a tool like curl or wget, which will allow you to
make a request and examine the response more closely than a browser allows.
You could even do it with telnet.

-Max

- Original Message - 
From: Stephane Grenier [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, October 06, 2003 11:40 PM
Subject: Re: ssl question


 As well, it appears that when sslext:pageScheme  is set to false, it
acts
 as any on the production box. Any suggestions are appreciated.

 Thanks
 Stephane

 - Original Message -
 From: Stephane Grenier [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Tuesday, October 07, 2003 2:33 AM
 Subject: ssl question


 Hello all.

 I can't seem to find the cause of this particular problem. Perhaps someone
 can point me in the correct direction.

 On my local box I'm using sslext with the url being the ip of the box. I
 have no problems going in and out of ssl. The problem has only risen since
I
 moved to the production box with a domain instead of an ip.

 The first issue is that when I do a submit on an ssl form, the return url
 removes the www from the address and thus my ssl certificate says there
is
 an error The name on the security certificate is invalid or does not
match
 the name of the site.

 The second issue, if I leave the sslext:pageScheme secure=true / in
the
 jsp, it seems to process forever (or until I get bored and stop the
 process).

 Any help would be appreciated.
 Thank you,
 Stephane


 -
 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 keep developing time as short a possible?

2003-10-07 Thread harm
Hi all,

I'm a J2EE developer. I have made a few projects using Struts. And I have 
to say I like the Struts framework very much. 
I'm using XDoclet to generate struts-config.xml (to speed up development).

The only thing I'm not happy about is the following:

1. I change something in my JSP.
2. Run Ant (create a war and ear).
3. Deploy the ear - file.
4. See the results in the browser. (JSP has to get compiled).

Unfortunatly these four steps take at least (in my case) 3 minutes for 
each run. 

Is there some way to check my JSP before compiling it? Or some other way 
to keep the time as short as possible?

Many thanks,

Harm de Laat
Informatiefabriek
The Netherlands




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



Re: how to keep developing time as short a possible?

2003-10-07 Thread Michael Nascimento Santos
Depeneding on your application server, you can deploy your application in
expanded mode, i.e., without any need to pack it into an ear. So, you are
able to change the file and test it immediately.

[]s
Michael Nascimento Santos
JSR-207 Expert Group Member
http://today.java.net/pub/au/80
Sun Certified Programmer for the Java 2 Platform
Sun Certified Programmer for the Java 2 Platform 1.4
Sun Certified Web Component Developer for J2EE
Moderador SouJava - www.soujava.org.br

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 11:15 AM
Subject: how to keep developing time as short a possible?


 Hi all,

 I'm a J2EE developer. I have made a few projects using Struts. And I have
 to say I like the Struts framework very much.
 I'm using XDoclet to generate struts-config.xml (to speed up development).

 The only thing I'm not happy about is the following:

 1. I change something in my JSP.
 2. Run Ant (create a war and ear).
 3. Deploy the ear - file.
 4. See the results in the browser. (JSP has to get compiled).

 Unfortunatly these four steps take at least (in my case) 3 minutes for
 each run.

 Is there some way to check my JSP before compiling it? Or some other way
 to keep the time as short as possible?

 Many thanks,

 Harm de Laat
 Informatiefabriek
 The Netherlands




 -
 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: DynaValidatorForm

2003-10-07 Thread Glenn Holmer
Frederic Dernbach wrote:
Glenn,

- Use a descendant of DispatchAction for your form's action,
- Have two separate methods in the action class for your two buttons
(one for 'commit' and one for 'cancel').
- In the struts-config.xml file, specify attribute 'validate' to 'false'
for your form's action.The form validation wont't happen automatically
this way.
- In the method for the 'commit' button, call explicitely 'validate' on
your form. But not in the method associated to the cancel button.
Thanks, I got that to work without resorting to a DispatchAction
like this:
if (confirm.equals(cancel)) {
  forward = complete;
} else {
  errors = dynaForm.validate(mapping, request);
  if (errors.size()  0) {
request.setAttribute(org.apache.struts.action.ERROR, errors);
forward = failure;
  }
}
Is that the right way to put the errors in play?

--

Glenn Holmer  [EMAIL PROTECTED]
Programmer/Analyst   phone: 414.908.1809
Weyco Group, Inc.  fax: 414.908.1601
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: set a relative path instead of absolute for a jsp file

2003-10-07 Thread Graham Leggett
David Thielen wrote:

Is there a way in struts to tell it to look for a relative path? In other words, if I start with windwardreports/form.jsp, then go to windwardreports/demo.jsp?
We had the same problem, and created this patch:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15921

I would be interested to know if it works for you.

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


Re: how to keep developing time as short a possible?

2003-10-07 Thread Max Cooper
IntelliJ IDEA is capable checking your JSPs at the end of a build. It
takes a long time, though, which I suspect means that it is compiling them
all to .java and then to .class files. I don't know if it is possible to use
these compiled versions or not, but it can be useful as a check. It does not
appear to be possible to compile one JSP at a time, but the editor is
constantly checking the JSP code for you in the background, so I am not sure
if a separate compile step would have any value. The editor will check for
imports, undeclared variables, taglib usage, etc. It even seems to
understand if you declare a variable with bean:define
id=myNewLocalVariable/, for instance. Good stuff.

I recommend setting up your build so that you can deploy an expanded
version of your app (ear or war) during development. We used to have a /web
directory that we both stored all our JSPs in and used as an output
directory for .class files (under WEB-INF/classes). We used to deploy the
app (a .war, but expanded) from that directory. That would allow you to edit
a JSP and just reload the page in the browser to see the changes.

But that limits some of the things you can do in a build (static templating,
trimming the fat from JSPs, etc.), and co-mingles source and build output
files to some extent (which complicates the 'clean' target). Now we have ant
copy our /web directory to the build output directory (specifically
'/build/web' for our project). Now we deploy the app from the build output
directory for development work (and build the packaged version from the
directory later in the build, if you run the 'dist' target). Ant is very
fast about copying (only copies changed files, and even seems to be darn
fast on a clean build), and as long as you separate out the target that
copies the files, you can run it individually when you change a JSP ('ant
copy-web' or something like that). Running the copy-web target on my project
takes about 2-4 seconds if you only changed a file or two.

-Max

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 7:15 AM
Subject: how to keep developing time as short a possible?


 Hi all,

 I'm a J2EE developer. I have made a few projects using Struts. And I have
 to say I like the Struts framework very much.
 I'm using XDoclet to generate struts-config.xml (to speed up development).

 The only thing I'm not happy about is the following:

 1. I change something in my JSP.
 2. Run Ant (create a war and ear).
 3. Deploy the ear - file.
 4. See the results in the browser. (JSP has to get compiled).

 Unfortunatly these four steps take at least (in my case) 3 minutes for
 each run.

 Is there some way to check my JSP before compiling it? Or some other way
 to keep the time as short as possible?

 Many thanks,

 Harm de Laat
 Informatiefabriek
 The Netherlands




 -
 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 keep developing time as short a possible?

2003-10-07 Thread Mike Kienenberger
[EMAIL PROTECTED] wrote:
 I'm a J2EE developer. I have made a few projects using Struts. And I have 
 to say I like the Struts framework very much. 
 I'm using XDoclet to generate struts-config.xml (to speed up development).
 
 The only thing I'm not happy about is the following:
 
 1. I change something in my JSP.
 2. Run Ant (create a war and ear).
 3. Deploy the ear - file.
 4. See the results in the browser. (JSP has to get compiled).
 
 Unfortunatly these four steps take at least (in my case) 3 minutes for 
 each run. 
 
 Is there some way to check my JSP before compiling it? Or some other way 
 to keep the time as short as possible?

I use Eclipse + Tomcat + the Sysdeo Eclipse Tomcat Launcher plugin and just 
run it directly in the IDE, effectively skipping steps 2 and 3.

http://www.sysdeo.com/eclipse/tomcatPlugin.html

I've since switched over from JSP to Velocity, but I don't remember even 
needing to restart the tomcat instance or having to recompile to change jsp 
code.  I know that I don't need to do anything for Velocity pages other than 
edit the vm file and reload the page in the browser.  Works as good as 
WebObjects in that respect :)


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



Form posting nulls

2003-10-07 Thread eric
A couple of our clients that are accessing our pages are posting nulls in their form 
submissions, these are struts pages.  
It is only happening with Internet Explorer 6.0 (not 5.5) and both clients are behind 
Cisco PIX firewalls.  

Has anyone encountered problems like this?
One client is using Squid web-proxy and the other is using Vericept for content 
reporting.  
I have setup squid here as a proxy with basic settings and it doesn't seem to be the 
problem, 
I am afraid it is a firewall-struts problem and donot know where to look for a 
solution.

The interesting thing is non-struts forms post data fine.  
Any help or suggestions would be appreciated.


Eric Waite



Re: DynaValidatorForm

2003-10-07 Thread Adam Hardy
Why get complicated? All you need is html:cancel/ and the validation 
will automatically not be executed. Even the javascript validation if 
you are using DynaValidatorForm.

Adam

On 10/07/2003 04:27 PM Glenn Holmer wrote:
Frederic Dernbach wrote:

Glenn,

- Use a descendant of DispatchAction for your form's action,
- Have two separate methods in the action class for your two buttons
(one for 'commit' and one for 'cancel').
- In the struts-config.xml file, specify attribute 'validate' to 'false'
for your form's action.The form validation wont't happen automatically
this way.
- In the method for the 'commit' button, call explicitely 'validate' on
your form. But not in the method associated to the cancel button.


Thanks, I got that to work without resorting to a DispatchAction
like this:
if (confirm.equals(cancel)) {
  forward = complete;
} else {
  errors = dynaForm.validate(mapping, request);
  if (errors.size()  0) {
request.setAttribute(org.apache.struts.action.ERROR, errors);
forward = failure;
  }
}
Is that the right way to put the errors in play?

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


Re: Wizard with a Twist

2003-10-07 Thread Bob Lee
Thanks, Adam, but the flow is not my main problem. Let me use a more 
detailed example:

The first page has one question:

QA

The user clicks on an answer and another question appears:

QA
QB
Again:

QA
QB
QC
The user goes back and changes the answer to the first question:

QA
QD
As you can see, it has a lot of potential for duplication. Do I model 
each of these views with a different JSP? It would make for a lot of 
simple JSPs, but the naming scheme and Struts config would quickly blow 
up. I could do one JSP, but after some time, this could easily evolve 
into one huge JSP for the entire flow (ick!).

There's also tracking the answers. i.e., it would be ideal to use the 
same form for each page, so the answer to QA always stays in sync.

Any tips?

Thanks,
Bob
Adam L wrote:

For what it's worth, check out the workflow extension,
http://www.livinglogic.de/Struts
  It takes a bit of tinkering with to fully understand and appreciate its
power (check the archives for a very recent dialog between myself and its
designer, Matthias Bauer).  It's very simple in concept and design, but it's
thus far been able to handle almost every need I have for workflow
management.
To put it very simply, you end up coding each component of your process as
a puzzle piece.  You then end up stringing them together with appropriate
actions and forwards to create your workflow process.   Component re-use has
finally been realized for me in my workflows!
-- adam

- Original Message -
From: Bob Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 6:31 AM
Subject: Wizard with a Twist
 

All,

I have requirements do develop a wizard like application where you can
have multiple questions (up to 3) on a single page.
When there are multiple questions, the first appears, you select an
answer, and the next one appears. If you change the answer to a
previous question, all of the succeeding answers are reset and you have
re-answer the questions.
What the next question is bears on the answers to the previous
questions (or some other factors). I've deemed it okay to go back to
the server each time.
There's also a requirement to do a bread crumb trail, but it will need
to go back pages of questions (not one question at a time). Also, going
forward, if questions have been answered and you don't alter the
answers, you should be able to go forward page by page as well.
I'm trying to figure out the best way to break this down (i.e. how many
JSPs, actions, and forms to use, what scope to use for the forms,
etc.). Key factors for maintainability will be the naming schemes (so
you can easily follow and manipulate the flow) and the ability to move
questions around without impacting other questions too much or making
changes in too many places. Any tips or suggestions?
Note: I started down a more generic route where I was going to build a
tool to manage the flow, but there's so many weird requirements (things
specific to certain questions, etc.) that I decided it would be easier
to just start out simple for this iteration.
Thanks,
Bob
P.S. I also have an option to use Blue Martini. Anyone have experience
with this? Would it help me solve this problem more easily than just
coding it with Struts?
-
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: Wizard with a Twist

2003-10-07 Thread Adam Levine
What about shell pages?   each page will then include the appropriate page 
fragement as determined by your business logic (they answered A to 
question 2, which means we need to include pageFrag3 for the next page).

  Combine that with a .properties file that may determine your combinations 
(question 1, answer B needs a subsequent page frag 4).  That route may end 
up being flexible enough so that once you get your base logic in place, you 
can go crazy with the questions, answers and related page fragments.

From: Bob Lee [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Wizard with a Twist
Date: Tue, 07 Oct 2003 10:10:45 -0500
Thanks, Adam, but the flow is not my main problem. Let me use a more 
detailed example:

The first page has one question:

QA

The user clicks on an answer and another question appears:

QA
QB
Again:

QA
QB
QC
The user goes back and changes the answer to the first question:

QA
QD
As you can see, it has a lot of potential for duplication. Do I model each 
of these views with a different JSP? It would make for a lot of simple JSPs, 
but the naming scheme and Struts config would quickly blow up. I could do 
one JSP, but after some time, this could easily evolve into one huge JSP for 
the entire flow (ick!).

There's also tracking the answers. i.e., it would be ideal to use the same 
form for each page, so the answer to QA always stays in sync.

Any tips?

Thanks,
Bob
Adam L wrote:

For what it's worth, check out the workflow extension,
http://www.livinglogic.de/Struts
  It takes a bit of tinkering with to fully understand and appreciate its
power (check the archives for a very recent dialog between myself and its
designer, Matthias Bauer).  It's very simple in concept and design, but 
it's
thus far been able to handle almost every need I have for workflow
management.

To put it very simply, you end up coding each component of your process as
a puzzle piece.  You then end up stringing them together with appropriate
actions and forwards to create your workflow process.   Component re-use 
has
finally been realized for me in my workflows!

-- adam

- Original Message -
From: Bob Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 6:31 AM
Subject: Wizard with a Twist



All,

I have requirements do develop a wizard like application where you can
have multiple questions (up to 3) on a single page.
When there are multiple questions, the first appears, you select an
answer, and the next one appears. If you change the answer to a
previous question, all of the succeeding answers are reset and you have
re-answer the questions.
What the next question is bears on the answers to the previous
questions (or some other factors). I've deemed it okay to go back to
the server each time.
There's also a requirement to do a bread crumb trail, but it will need
to go back pages of questions (not one question at a time). Also, going
forward, if questions have been answered and you don't alter the
answers, you should be able to go forward page by page as well.
I'm trying to figure out the best way to break this down (i.e. how many
JSPs, actions, and forms to use, what scope to use for the forms,
etc.). Key factors for maintainability will be the naming schemes (so
you can easily follow and manipulate the flow) and the ability to move
questions around without impacting other questions too much or making
changes in too many places. Any tips or suggestions?
Note: I started down a more generic route where I was going to build a
tool to manage the flow, but there's so many weird requirements (things
specific to certain questions, etc.) that I decided it would be easier
to just start out simple for this iteration.
Thanks,
Bob
P.S. I also have an option to use Blue Martini. Anyone have experience
with this? Would it help me solve this problem more easily than just
coding it with Struts?
-
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]
_
High-speed Internet access as low as $29.95/month (depending on the local 
service providers in your area). Click here.   https://broadband.msn.com

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


Re: DynaValidatorForm

2003-10-07 Thread Glenn Holmer
Adam Hardy wrote:
Why get complicated? All you need is html:cancel/ and the validation 
will automatically not be executed. Even the javascript validation if 
you are using DynaValidatorForm.
Now *that* is slick.  Thanks.

--

Glenn Holmer  [EMAIL PROTECTED]
Programmer/Analyst   phone: 414.908.1809
Weyco Group, Inc.  fax: 414.908.1601
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DynaValidatorForm

2003-10-07 Thread Frederic Dernbach
Instead of 
if (errors.size()  0) {
request.setAttribute(org.apache.struts.action.ERROR, errors);
forward = failure;
}

I would write :
if (! errors.isEmpty()) {
saveErrors(request, errors);
forward=failure;
}

Le mar 07/10/2003  16:27, Glenn Holmer a crit :
 Frederic Dernbach wrote:
  Glenn,
  
  - Use a descendant of DispatchAction for your form's action,
  - Have two separate methods in the action class for your two buttons
  (one for 'commit' and one for 'cancel').
  - In the struts-config.xml file, specify attribute 'validate' to 'false'
  for your form's action.The form validation wont't happen automatically
  this way.
  - In the method for the 'commit' button, call explicitely 'validate' on
  your form. But not in the method associated to the cancel button.
 
 Thanks, I got that to work without resorting to a DispatchAction
 like this:
 
  if (confirm.equals(cancel)) {
forward = complete;
  } else {
errors = dynaForm.validate(mapping, request);
if (errors.size()  0) {
  request.setAttribute(org.apache.struts.action.ERROR, errors);
  forward = failure;
}
  }
 
 Is that the right way to put the errors in play?
 
 -- 
 
 Glenn Holmer  [EMAIL PROTECTED]
 Programmer/Analyst   phone: 414.908.1809
 Weyco Group, Inc.  fax: 414.908.1601
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



AW: how to keep developing time as short a possible?

2003-10-07 Thread Slobodan Kasterovic
Hi !

I can confirm this opinion! With Ants JSPC this works very fine.


Slobodan Kasterovic

-- -Ursprüngliche Nachricht-
-- Von: Nicholson, Robb [mailto:[EMAIL PROTECTED]
-- Gesendet: Dienstag, 7. Oktober 2003 16:22
-- An: 'Struts Users Mailing List'
-- Betreff: RE: how to keep developing time as short a possible?
--
--
-- For our environment, we have an Ant task that deploys the
-- EAR file, so tasks
-- #2 and #3 below are combined for us. To go a step further,
-- you could set up
-- an Ant task to precompile the JSP's so the container
-- doesn't have to.
--
--
-- -Original Message-
-- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
-- Sent: Tuesday, October 07, 2003 10:16 AM
-- To: [EMAIL PROTECTED]
-- Subject: how to keep developing time as short a possible?
--
--
-- Hi all,
--
-- I'm a J2EE developer. I have made a few projects using
-- Struts. And I have
-- to say I like the Struts framework very much.
-- I'm using XDoclet to generate struts-config.xml (to speed
-- up development).
--
-- The only thing I'm not happy about is the following:
--
-- 1. I change something in my JSP.
-- 2. Run Ant (create a war and ear).
-- 3. Deploy the ear - file.
-- 4. See the results in the browser. (JSP has to get compiled).
--
-- Unfortunatly these four steps take at least (in my case) 3
-- minutes for
-- each run.
--
-- Is there some way to check my JSP before compiling it? Or
-- some other way
-- to keep the time as short as possible?
--
-- Many thanks,
--
-- Harm de Laat
-- Informatiefabriek
-- The Netherlands
--
--
--
--
-- 
-- -
-- 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: DynaValidatorForm

2003-10-07 Thread Frederic Dernbach
Adam,

You are right.

I just wrote something more generic.

Le mar 07/10/2003  17:00, Adam Hardy a crit :
 Why get complicated? All you need is html:cancel/ and the validation 
 will automatically not be executed. Even the javascript validation if 
 you are using DynaValidatorForm.
 
 Adam
 
 On 10/07/2003 04:27 PM Glenn Holmer wrote:
  Frederic Dernbach wrote:
  
  Glenn,
 
  - Use a descendant of DispatchAction for your form's action,
  - Have two separate methods in the action class for your two buttons
  (one for 'commit' and one for 'cancel').
  - In the struts-config.xml file, specify attribute 'validate' to 'false'
  for your form's action.The form validation wont't happen automatically
  this way.
  - In the method for the 'commit' button, call explicitely 'validate' on
  your form. But not in the method associated to the cancel button.
  
  
  Thanks, I got that to work without resorting to a DispatchAction
  like this:
  
  if (confirm.equals(cancel)) {
forward = complete;
  } else {
errors = dynaForm.validate(mapping, request);
if (errors.size()  0) {
  request.setAttribute(org.apache.struts.action.ERROR, errors);
  forward = failure;
}
  }
  
  Is that the right way to put the errors in play?
  
 
 -- 
 struts 1.1 + tomcat 5.0.12 + java 1.4.2
 Linux 2.4.20 RH9
 
 
 -
 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]



[Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Yann Cébron
Read for yourself and judge:

http://www.softwarereality.com/soapbox/softwarefashion.jsp




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



Re: ssl question

2003-10-07 Thread Stephane Grenier
Thank you, I'll try this.

Also would you happen to have any idea why when I change protocol to ssl in
the url it truncates the www from my domain name in the url ? I believe
this is related to the problem.

Thank you,
Stephane

- Original Message -
From: Max Cooper [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]; Stephane
Grenier [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 10:12 AM
Subject: Re: ssl question


 The second problem is likely an infinite redirection loop:

 Browser: I want http://server/page.jsp
 Server: Go to https://server/page.jsp
 Browser: I want https://server/page.jsp
 Server: Go to http://server/page.jsp
 Browser: I want http://server/page.jsp
 Server: Go to https://server/page.jsp
 ... until the browser or server is shut down

 You can verify this with a tool like curl or wget, which will allow you to
 make a request and examine the response more closely than a browser
allows.
 You could even do it with telnet.

 -Max

 - Original Message -
 From: Stephane Grenier [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Monday, October 06, 2003 11:40 PM
 Subject: Re: ssl question


  As well, it appears that when sslext:pageScheme  is set to false, it
 acts
  as any on the production box. Any suggestions are appreciated.
 
  Thanks
  Stephane
 
  - Original Message -
  From: Stephane Grenier [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Tuesday, October 07, 2003 2:33 AM
  Subject: ssl question
 
 
  Hello all.
 
  I can't seem to find the cause of this particular problem. Perhaps
someone
  can point me in the correct direction.
 
  On my local box I'm using sslext with the url being the ip of the box. I
  have no problems going in and out of ssl. The problem has only risen sin
ce
 I
  moved to the production box with a domain instead of an ip.
 
  The first issue is that when I do a submit on an ssl form, the return
url
  removes the www from the address and thus my ssl certificate says
there
 is
  an error The name on the security certificate is invalid or does not
 match
  the name of the site.
 
  The second issue, if I leave the sslext:pageScheme secure=true / in
 the
  jsp, it seems to process forever (or until I get bored and stop the
  process).
 
  Any help would be appreciated.
  Thank you,
  Stephane
 
 
  -
  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]



setting application context

2003-10-07 Thread Kannan
Hi all!
I have a lot of drop down menus in my web application.
I need to set them as collection objects in  servlet context.
that should load up when the application ( tomcat start..) load  up.
Then i can play with struts by iterating it..
Can any one help me , How to do this? How to write the loader class and 
set it up...?

thanks in advance.
Kannan.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Adam Hardy
If that's what she looks like with struts, what's she going to look like 
with java server faces?

On 10/07/2003 05:30 PM Yann Cbron wrote:
Read for yourself and judge:

http://www.softwarereality.com/soapbox/softwarefashion.jsp



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

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


Re: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread David Graham
The author comes to the surprising conclusion that any particular
technology isn't suited for every application!

There seems to be an increasing number of internet postings designed to
garner a lot of attention without actually saying anything worth reading. 
They generally attack some popular technology like Java, Struts, etc.
without having used it or making any valid points.

David

--- Yann Cébron [EMAIL PROTECTED] wrote:
 Read for yourself and judge:
 
 http://www.softwarereality.com/soapbox/softwarefashion.jsp
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Adam Levine
a bunch of postings, including the article, by a bunch of un/mis-informed 
evangelists (for all technologies mentioned).  it's like state fair day at 
/.
  can i get my 20mins back ?

-- adam



From: Yann Cébron [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Article] SoftwareFashion (includes paragraph about Struts)
Date: Tue, 7 Oct 2003 17:30:02 +0200
Read for yourself and judge:

http://www.softwarereality.com/soapbox/softwarefashion.jsp



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get MSN 8 Dial-up Internet Service FREE for one month.  Limited time offer-- 
sign up now!   http://join.msn.com/?page=dept/dialup

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


Re: Container-Managed Authentication login-config in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Craig R. McClanahan
Caroline Jen wrote:

But, I do not want to use BASIC authentication.  I
have many different roles and hundreds of people per
role.  Users' name, role, etc. are stored in a
database.
How authentication is performed (BASIC, form-based, DIGEST, or SSL 
client certificates) and how users are stored (database, directory 
server, local XML file, ...) are two separate questions.  For most 
servers , any combination is possible.  With Tomcat, for example, you 
can configure JDBCRealm to point at your user and role definitions in a 
database, and then use those users with any of the authentication 
methods.  For more information, see:

   http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html

The choice between BASIC and form-based authentication, then, can be 
based on user interface related concerns, rather than worrying about a 
database.

Craig

--- Matt Raible [EMAIL PROTECTED] wrote:
 

A JDBCRealm can use BASIC authentication - it
doesn't require form-based.
Here's an example app that might help you out:
   

http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
 

HTH,

Matt

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 4:45 PM
To: [EMAIL PROTECTED]
Subject: Container-Managed Authentication
login-config in web.xml vs.
Specifying Paths in the struts-config.xml
I use the Tomcat.  I configured the Tomcat JDBCRealm
so that I can use programmic security testing, such
as
isUserInRole(), in my program.
Because Tomcat JDBCRealm is form based, I inserted
the
login-config and its sub-elements in my web.xml
file
(see below).  As we know, the form-login-page and
form-error-page are required.
My question is that the container-managed
authentication does not seem to be consistent with
what we usually do in struts; e.g. we state the
logical name and path for each .jsp page in the
struts-config.xml file.  

What is the Struts convention in dealing with user
authentication?  Should we specify the paths for the
logon page and error page in the struts.config.xml
or
we should use the form-login-page and
form-error-page in the web.xml file?
   

==
 

security-constraint
  web-resource-collection

web-resource-nameSalesInfo/web-resource-name
 url-pattern/SalesInfo/*/url-pattern
 http-methodGET/http-method
 http-methodPOST/http-method
  /web-resource-collection
  auth-constraint
 role-namemanager/role-name  
  /auth-constraint
  user-data-constraint

transport-guaranteeNONE/transport-guarantee
  /user-data-constraint
/security-constraint

login-config
  auth-methodFORM/auth-method
  form-login-config
 

   

form-login-page/authentication/login.html/form-login-page
 

 

   

form-error-page/authentication/error.html/form-error-page
 

/form-login-config

/login-config

security-role
  role-namemanager/role-name
/security-role


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product
search
http://shopping.yahoo.com
   

-
 

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

-
 

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



__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



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


RE: setting application context

2003-10-07 Thread Steve Raeburn
If you have a Servlet 2.3 compatible container (e.g. Tomcat 4.x or later)
you can implement a ServletContextListener which will be notified when your
context is started and gives you access to the ServletContext.

  ...
  import javax.servlet.ServletContextEvent;
  import javax.servlet.ServletContextListener;

  public class StartUpListener implements ServletContextListener {

public void contextInitialized(ServletContextEvent evt) {
MyBean bean = new MyBean();
evt.getServletContext().setAttribute(MyKey, bean);
}

public void contextDestroyed(ServletContextEvent evt) {
// Whatever shutdown processing you need goes here.
}
  }

Listeners are configured in web.xml:
  listener
listener-classmyapp.StartUpListener/listener-class
  /listener


Another way that is Struts specific but also works with Servlet 2.2
containers is to implement a PlugIn.

  ...
  import org.apache.struts.action.ActionServlet;
  import org.apache.struts.action.PlugIn;
  import org.apache.struts.config.ModuleConfig;

  public class MyPlugIn implements PlugIn {

public void init(ActionServlet servlet, ModuleConfig config)
throws ServletException {
MyBean bean = new MyBean();
servlet.getServletContext().setAttribute(MyKey, bean);
}

public void destroy() {
// Whatever shutdown processing you need goes here.
}
  }

A PlugIn is configured  at the end of your struts configuration file
(struts-config.xml) See the Struts example webapp for a demonstration of
plugins:

  ...
  plug-in className=myapp.MyPlugIn/


Finally, you could create a Servlet that runs automatically at start up and
set-up any ServletContext attributes in it's init() method.

My preference is to use a ServletContextListener if possible, or a PlugIn.

Steve


 -Original Message-
 From: Kannan [mailto:[EMAIL PROTECTED]
 Sent: October 7, 2003 8:35 AM
 To: Struts Users Mailing List
 Subject: setting application context


 Hi all!
 I have a lot of drop down menus in my web application.
 I need to set them as collection objects in  servlet context.
 that should load up when the application ( tomcat start..) load  up.
 Then i can play with struts by iterating it..

 Can any one help me , How to do this? How to write the loader class and
 set it up...?

 thanks in advance.
 Kannan.


 -
 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: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Craig R. McClanahan
Adam Levine wrote:

a bunch of postings, including the article, by a bunch of 
un/mis-informed evangelists (for all technologies mentioned).  it's 
like state fair day at /.
  can i get my 20mins back ?
This article actually was slashdotted last night.  The responses were 
... um ... not even up to the usual /. standard for entertainment value, 
though ... and that's really hard to do :-).

-- adam
Craig



From: Yann Cébron [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Article] SoftwareFashion (includes paragraph about Struts)
Date: Tue, 7 Oct 2003 17:30:02 +0200
Read for yourself and judge:

http://www.softwarereality.com/soapbox/softwarefashion.jsp



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get MSN 8 Dial-up Internet Service FREE for one month.  Limited time 
offer-- sign up now!   http://join.msn.com/?page=dept/dialup

-
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: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Mark Galbreath
Nothing really more than I've been saying for over a yearway too much
complexity in these frameworks!

too bad it's not Friday, though:

http://www.softwarereality.com/truestories/

Mark

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Yann Cébron
Sent: Tuesday, October 07, 2003 11:30 AM
To: [EMAIL PROTECTED]
Subject: [Article] SoftwareFashion (includes paragraph about Struts)


Read for yourself and judge:

http://www.softwarereality.com/soapbox/softwarefashion.jsp




-
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: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Steve Raeburn
'In fact, we'd particularly invite Struts advocates to respond to this
article by describing the benefits that they feel Struts provides over
vanilla JSP.'

Well if they don't get what Struts provides over vanilla JSP, then they
never will. Discussing what Struts provides compared to other MVC frameworks
might be useful, but the vanilla JSP topic is surely dead and buried by
now.

I guess it's a sign of success when people who obviously know nothing about
Struts start taking swipes at it :-)

Steve

 -Original Message-
 From: Adam Levine [mailto:[EMAIL PROTECTED]
 Sent: October 7, 2003 9:07 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


 a bunch of postings, including the article, by a bunch of un/mis-informed
 evangelists (for all technologies mentioned).  it's like state
 fair day at
 /.
can i get my 20mins back ?

 -- adam



 From: Yann Cébron [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [Article] SoftwareFashion (includes paragraph about Struts)
 Date: Tue, 7 Oct 2003 17:30:02 +0200

 Read for yourself and judge:

 http://www.softwarereality.com/soapbox/softwarefashion.jsp




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

 _
 Get MSN 8 Dial-up Internet Service FREE for one month.  Limited
 time offer--
 sign up now!   http://join.msn.com/?page=dept/dialup


 -
 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: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Craig R. McClanahan
Steve Raeburn wrote:

'In fact, we'd particularly invite Struts advocates to respond to this
article by describing the benefits that they feel Struts provides over
vanilla JSP.'
Well if they don't get what Struts provides over vanilla JSP, then they
never will. Discussing what Struts provides compared to other MVC frameworks
might be useful, but the vanilla JSP topic is surely dead and buried by
now.
I guess it's a sign of success when people who obviously know nothing about
Struts start taking swipes at it :-)
 

Over the years, Struts has been simultaneously knocked for being too 
simple and too hard, not enough functionality and way too 
complicated, ugly as sin and beautifully architected, ... 
considering that my original target was the 80% of users in the middle, 
I count the fact that we get criticisms from both ends as a success metric.

Steve

Craig

 

-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: October 7, 2003 9:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
a bunch of postings, including the article, by a bunch of un/mis-informed
evangelists (for all technologies mentioned).  it's like state
fair day at
/.
  can i get my 20mins back ?
-- adam



From: Yann Cébron [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Article] SoftwareFashion (includes paragraph about Struts)
Date: Tue, 7 Oct 2003 17:30:02 +0200
Read for yourself and judge:

http://www.softwarereality.com/soapbox/softwarefashion.jsp



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get MSN 8 Dial-up Internet Service FREE for one month.  Limited
time offer--
sign up now!   http://join.msn.com/?page=dept/dialup
-
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: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Gregory Seidman
On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
} 'In fact, we'd particularly invite Struts advocates to respond to this
} article by describing the benefits that they feel Struts provides over
} vanilla JSP.'
} 
} Well if they don't get what Struts provides over vanilla JSP, then they
} never will. Discussing what Struts provides compared to other MVC
} frameworks might be useful, but the vanilla JSP topic is surely dead
} and buried by now.

This is a lousy attitude. It's like the stereotype of a woman who says, If
you don't know what you did, I'm not going to tell you. If you can clearly
and succinctly respond to his challenge, do so. If not, perhaps you don't
understand Struts as well as you think.

Myself, I'm still evaluating Struts. I have a prototype of my project
written with vanilla JSP and a tiny custom taglib, and I'm trying to
decide whether to rewrite it with Struts or simply clean it up and extend
it. I can't, yet, see whether there is a net benefit to using Struts for my
small project.

[...]
} Steve
--Greg


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



Re: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Adam Levine
Hey, Steve ...
  Guess what?  You don't understand Struts.   (=


From: Gregory Seidman [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
Date: Tue, 7 Oct 2003 12:57:18 -0400
On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
} 'In fact, we'd particularly invite Struts advocates to respond to this
} article by describing the benefits that they feel Struts provides over
} vanilla JSP.'
}
} Well if they don't get what Struts provides over vanilla JSP, then they
} never will. Discussing what Struts provides compared to other MVC
} frameworks might be useful, but the vanilla JSP topic is surely dead
} and buried by now.
This is a lousy attitude. It's like the stereotype of a woman who says, If
you don't know what you did, I'm not going to tell you. If you can clearly
and succinctly respond to his challenge, do so. If not, perhaps you don't
understand Struts as well as you think.
Myself, I'm still evaluating Struts. I have a prototype of my project
written with vanilla JSP and a tiny custom taglib, and I'm trying to
decide whether to rewrite it with Struts or simply clean it up and extend
it. I can't, yet, see whether there is a net benefit to using Struts for my
small project.
[...]
} Steve
--Greg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
High-speed Internet access as low as $29.95/month (depending on the local 
service providers in your area). Click here.   https://broadband.msn.com

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


Re: form object names, population and processing

2003-10-07 Thread Takis Diakoumis
Thanks for the suggestion.

unfortunately the id attribute is not available in the struts form tag.

any other suggestions would be most appreciated.

Takis

It maybe possible for you to set the id of the html form element. 
Then you can use this in the JavaScript instead of the name.
I think the attribute styleId of text should set that (by the looks of the
description).

Hope this helps.
Emma.

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



maxlength validator implies required???

2003-10-07 Thread Max Kremer
Hi, 
I'm using the maxlength validator as follows in validator.xml 
field
property=description
depends=maxlength
arg0 key=prompt.description/
arg1 name=maxlength key=${var:maxlength} resource=false/
var
var-namemaxlength/var-name
var-value300/var-value
/var
/field 
But for some reason when the field is left blank the validator returns a message that 
the field is required even though I am NOT using the required validator. Does 
maxlength IMPLY required Has anybody else experienced this behaviour?
Regards,

Max Kremer


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



RE: maxlength validator implies required???

2003-10-07 Thread Fenderbosch, Eric
Take a look at the maxlength definition inside validator-rules.xml.

validator name=maxlength
classname=org.apache.struts.validator.FieldChecks
method=validateMaxLength
methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionErrors,
   javax.servlet.http.HttpServletRequest
depends=
msg=errors.maxlength

Does your depends specify required?

-Original Message-
From: Max Kremer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 13:13
To: [EMAIL PROTECTED]
Subject: maxlength validator implies required???


Hi, 
I'm using the maxlength validator as follows in validator.xml 
field
property=description
depends=maxlength
arg0 key=prompt.description/
arg1 name=maxlength key=${var:maxlength} resource=false/
var
var-namemaxlength/var-name
var-value300/var-value
/var
/field 
But for some reason when the field is left blank the validator returns a message that 
the field is required even though I am NOT using the required validator. Does 
maxlength IMPLY required Has anybody else experienced this behaviour?
Regards,

Max Kremer


-
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: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Keith Pemberton
This response was uncalled for... at least be more professional when
responding to people through the listserv.

- Original Message - 
From: Adam Levine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 12:04 PM
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


 Hey, Steve ...
Guess what?  You don't understand Struts.   (=




 From: Gregory Seidman [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
 Date: Tue, 7 Oct 2003 12:57:18 -0400

 On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
 } 'In fact, we'd particularly invite Struts advocates to respond to this
 } article by describing the benefits that they feel Struts provides over
 } vanilla JSP.'
 }
 } Well if they don't get what Struts provides over vanilla JSP, then
they
 } never will. Discussing what Struts provides compared to other MVC
 } frameworks might be useful, but the vanilla JSP topic is surely dead
 } and buried by now.

 This is a lousy attitude. It's like the stereotype of a woman who says,
If
 you don't know what you did, I'm not going to tell you. If you can
clearly
 and succinctly respond to his challenge, do so. If not, perhaps you don't
 understand Struts as well as you think.

 Myself, I'm still evaluating Struts. I have a prototype of my project
 written with vanilla JSP and a tiny custom taglib, and I'm trying to
 decide whether to rewrite it with Struts or simply clean it up and extend
 it. I can't, yet, see whether there is a net benefit to using Struts for
my
 small project.

 [...]
 } Steve
 --Greg


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

 _
 High-speed Internet access as low as $29.95/month (depending on the local
 service providers in your area). Click here.   https://broadband.msn.com


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





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



re[2]: maxlength validator implies required???

2003-10-07 Thread Max Kremer
Thats exactly what it was. The maxlength entry in my validator-rules.xml had a depends 
entry: 
depends=required 
I changed that and it now works the way I intended. Thanks for your help!!


  Take a look at the maxlength definition inside validator-rules.xml.

  validator name=maxlength
  classname=org.apache.struts.validator.FieldChecks
  method=validateMaxLength
  methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  org.apache.struts.action.ActionErrors,
  javax.servlet.http.HttpServletRequest
  depends=
  msg=errors.maxlength

  Does your depends specify required?

  -Original Message-
  From: Max Kremer [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 07, 2003 13:13
  To: [EMAIL PROTECTED]
  Subject: maxlength validator implies required???


  Hi, 
  I'm using the maxlength validator as follows in validator.xml 
  field
  property=description
  depends=maxlength
  arg0 key=prompt.description/
  arg1 name=maxlength key=${var:maxlength} resource=false/
  var
  var-namemaxlength/var-name
  var-value300/var-value
  /var
  /field 
  But for some reason when the field is left blank the validator returns a
  message that the field is required even though I am NOT using the
  required validator. Does maxlength IMPLY required Has anybody else
  experienced this behaviour?
  Regards,

  Max Kremer


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







Regards,

Max Kremer
Director of Technology
Datastay Corp.

office 416.398.1616
fax416.398.9510
mobile   416.801.6299


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



Re: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Adam Levine
apologies. it was a joke with good intentions, but apparently bad delivery.



From: Keith Pemberton [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
Date: Tue, 7 Oct 2003 12:28:14 -0500
This response was uncalled for... at least be more professional when
responding to people through the listserv.
- Original Message -
From: Adam Levine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 12:04 PM
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
 Hey, Steve ...
Guess what?  You don't understand Struts.   (=




 From: Gregory Seidman [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
 Date: Tue, 7 Oct 2003 12:57:18 -0400

 On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
 } 'In fact, we'd particularly invite Struts advocates to respond to this
 } article by describing the benefits that they feel Struts provides over
 } vanilla JSP.'
 }
 } Well if they don't get what Struts provides over vanilla JSP, then
they
 } never will. Discussing what Struts provides compared to other MVC
 } frameworks might be useful, but the vanilla JSP topic is surely dead
 } and buried by now.

 This is a lousy attitude. It's like the stereotype of a woman who says,
If
 you don't know what you did, I'm not going to tell you. If you can
clearly
 and succinctly respond to his challenge, do so. If not, perhaps you don't
 understand Struts as well as you think.

 Myself, I'm still evaluating Struts. I have a prototype of my project
 written with vanilla JSP and a tiny custom taglib, and I'm trying to
 decide whether to rewrite it with Struts or simply clean it up and extend
 it. I can't, yet, see whether there is a net benefit to using Struts for
my
 small project.

 [...]
 } Steve
 --Greg


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

 _
 High-speed Internet access as low as $29.95/month (depending on the local
 service providers in your area). Click here.   https://broadband.msn.com


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




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Instant message in style with MSN Messenger 6.0. Download it now FREE!  
http://msnmessenger-download.com

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


RE: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Steve Raeburn
Adam,
I assumed it was tongue-in-cheek ;-)

Greg,

I wasn't commenting on people who are trying to understand the MVC pattern
and Struts, but authors who claim to be experts in the field and who should
be *very* familiar with the Model1/Model2 debate and how Struts addresses
the problem. From that perspective, the discussion about *whether* to use an
MVC framework is old news. I think an article discussing the pros and cons
of the various approaches to MVC would have been more valuable. It was a
negative article that invited a negative response.

If you're still on that learning curve then I wouldn't expect you to
immediately understand the benefits of Struts and I'm sure you'll get plenty
of advice on this list.

Here's a few links that might help:
  http://www.fawcette.com/javapro/2002_06/online/servlets_06_11_02/
  http://java.sun.com/blueprints/patterns/MVC-detailed.html
  http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
  http://otn.oracle.com/oramag/webcolumns/2003/techarticles/mills_mvc.html


Steve


 -Original Message-
 From: Adam Levine [mailto:[EMAIL PROTECTED]
 Sent: October 7, 2003 10:35 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


 apologies. it was a joke with good intentions, but apparently bad
 delivery.



 From: Keith Pemberton [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
 Date: Tue, 7 Oct 2003 12:28:14 -0500

 This response was uncalled for... at least be more professional when
 responding to people through the listserv.

 - Original Message -
 From: Adam Levine [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 07, 2003 12:04 PM
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


   Hey, Steve ...
  Guess what?  You don't understand Struts.   (=
  
  
  
  
   From: Gregory Seidman [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Subject: Re: [Article] SoftwareFashion (includes paragraph
 about Struts)
   Date: Tue, 7 Oct 2003 12:57:18 -0400
  
   On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
   } 'In fact, we'd particularly invite Struts advocates to
 respond to this
   } article by describing the benefits that they feel Struts
 provides over
   } vanilla JSP.'
   }
   } Well if they don't get what Struts provides over vanilla JSP, then
 they
   } never will. Discussing what Struts provides compared to other MVC
   } frameworks might be useful, but the vanilla JSP topic is
 surely dead
   } and buried by now.
  
   This is a lousy attitude. It's like the stereotype of a woman who says,
 If
   you don't know what you did, I'm not going to tell you. If you can
 clearly
   and succinctly respond to his challenge, do so. If not,
 perhaps you don't
   understand Struts as well as you think.
  
   Myself, I'm still evaluating Struts. I have a prototype of my project
   written with vanilla JSP and a tiny custom taglib, and I'm trying to
   decide whether to rewrite it with Struts or simply clean it up
 and extend
   it. I can't, yet, see whether there is a net benefit to using
 Struts for
 my
   small project.
  
   [...]
   } Steve
   --Greg
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
   _
   High-speed Internet access as low as $29.95/month (depending
 on the local
   service providers in your area). Click here.
https://broadband.msn.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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

_
Instant message in style with MSN Messenger 6.0. Download it now FREE!
http://msnmessenger-download.com


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





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



ActionForm Design Question

2003-10-07 Thread Ian Joyce
Hello,

I am having trouble wrapping my mind around with how I should design an ActionForm 
giving the following situation.

My form looks like this:

Child 1  [Select of all possible parents]
Child 2  [Select of all possible parents]
Child 3  [Select of all possible parents]
...

Each child can have exactly one parent.
Each child has a distinct id number.
Each parent has a distinct id number.
The number of children will vary as will the number of parents.

When the form is posted I need to be able to retrieve the child id and the 
associatated parent id.

Thanks for any advice...


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



using an attribute inside a tile

2003-10-07 Thread Sonam Belbase
Hi,

I have a layout contentFrameLayout.jsp:

html
head/head
body
tiles:useAttribute name=screenName scope=request/
tiles:insert attribute=header /
tiles:insert attribute=body /
tiles:insert attribute=footer /
/body
/html

In my tiles-def.xml, I assign values to these attributes:

definition name=content.default page=/jsp/layouts/contentFrameLayout.jsp
put name=screenName value=Introduction /
put name=header value=/jsp/common/header.jsp /
put name=body value=/jsp/common/introduction.jsp /
put name=footer value=/jsp/common/footer.jsp /
/definition

definition name=signin.default extends=content.default
put name=screenName value=Sign In /
put name=body value=/jsp/common/signin.jsp /
/definition

In struts-config, my action forwards to the  definition content.default on success.

I am trying to use the attribute screenName inside header.jsp
(which is a tile for contentFrameLayout.jsp) in the following manner:

TD WIDTH=300 BGCOLOR=#336699 CLASS=bodytextboldwhite
! -- value of screenName displayed here --
bean:write name=screenName /
/TD

I followed some guidelines in the following article:

http://www.developer.com/java/ent/article.php/10933_2192411_5

but the bean:write writes nothing to the screen (i.e the column comes up empty).
It looks like there might be a context problem since doing a bean:write in
the layout jsp works but not in the tile header.jsp. There are no error messages
at runtime.

Does anyone know how I can accomplish this? My main goal is to use the same
layout for every content page and have the option of dynamically displaying the 
screenName
each time the tile header.jsp is used.

Thanks,
SB


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



Dynamic form fields on ActionForm

2003-10-07 Thread Cornellious Mann
I am wondering what is the best approach to handle
dynamic form fields within an ActionForm.

I have a JSP page that will display quantity input
fields for a dynamic list of products. I don't know
how many products will be in the list until runtime.

How can I set up my ActionForm to handle the list in
input parameters?

Thanks for any help.

=
Best Regards,
Cornellious Mann

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: Container-Managed Authentication login-config in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Caroline Jen
People answer questions without reading my original
post.  Therefore, I must re-type my original question
again.

Before I posted my question, I had configured the
Tomcat JDBCRealm following the instructions at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
so that I can do security testing programmically, such
as isUserInRole(), in my program.

If I use form based authentication, I insert the
login-config and its sub-elements in my web.xml file
(see below).  As we know, the form-login-page and
form-error-page are required.

My question is that the container-managed
authentication (we provide login page and error page
in the web.xml) does not seem to be consistent with
what we usually do in struts; e.g. we state the
logical name and path for each .jsp page in the
struts-config.xml file.  

What is the Struts convention in dealing with user
authentication?  Should we specify the paths for the
logon page and error page in the struts.config.xml or
we should use the form-login-page and
form-error-page in the web.xml file?

Thanks.
--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 Caroline Jen wrote:
 
 But, I do not want to use BASIC authentication.  I
 have many different roles and hundreds of people
 per
 role.  Users' name, role, etc. are stored in a
 database.
 
 How authentication is performed (BASIC, form-based,
 DIGEST, or SSL 
 client certificates) and how users are stored
 (database, directory 
 server, local XML file, ...) are two separate
 questions.  For most 
 servers , any combination is possible.  With Tomcat,
 for example, you 
 can configure JDBCRealm to point at your user and
 role definitions in a 
 database, and then use those users with any of the
 authentication 
 methods.  For more information, see:
 


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
 
 The choice between BASIC and form-based
 authentication, then, can be 
 based on user interface related concerns, rather
 than worrying about a 
 database.
 
 Craig
 
 --- Matt Raible [EMAIL PROTECTED] wrote:
   
 
 A JDBCRealm can use BASIC authentication - it
 doesn't require form-based.
 Here's an example app that might help you out:
 
 
 
 

http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
   
 
 HTH,
 
 Matt
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 06, 2003 4:45 PM
 To: [EMAIL PROTECTED]
 Subject: Container-Managed Authentication
 login-config in web.xml vs.
 Specifying Paths in the struts-config.xml
 
 
 I use the Tomcat.  I configured the Tomcat
 JDBCRealm
 so that I can use programmic security testing,
 such
 as
 isUserInRole(), in my program.
 
 Because Tomcat JDBCRealm is form based, I inserted
 the
 login-config and its sub-elements in my web.xml
 file
 (see below).  As we know, the form-login-page
 and
 form-error-page are required.
 
 My question is that the container-managed
 authentication does not seem to be consistent with
 what we usually do in struts; e.g. we state the
 logical name and path for each .jsp page in the
 struts-config.xml file.  
 
 What is the Struts convention in dealing with user
 authentication?  Should we specify the paths for
 the
 logon page and error page in the struts.config.xml
 or
 we should use the form-login-page and
 form-error-page in the web.xml file?
 
 
 
 

==
   
 
 security-constraint
web-resource-collection
  
 web-resource-nameSalesInfo/web-resource-name
   url-pattern/SalesInfo/*/url-pattern
   http-methodGET/http-method
   http-methodPOST/http-method
/web-resource-collection
auth-constraint
   role-namemanager/role-name  
/auth-constraint
user-data-constraint
  
 transport-guaranteeNONE/transport-guarantee
/user-data-constraint
 /security-constraint
 
 login-config
auth-methodFORM/auth-method
form-login-config
   
 
 
 

form-login-page/authentication/login.html/form-login-page
   
 
   
 
 
 

form-error-page/authentication/error.html/form-error-page
   
 
 /form-login-config
 
 /login-config
 
 security-role
role-namemanager/role-name
 /security-role
 
 
 
 
 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com
 
 
 
 

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

-
   
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 
 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com
 

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

RE: Container-Managed Authentication login-config in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Matt Raible
Don't put anything in struts-config, in web.xml, put:

login-config
auth-methodFORM/auth-method
form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/login.jsp?error=true/form-error-page
/form-login-config
/login-config


You can use whatever code you like in login.jsp, here's mine as an example:

%@ include file=/common/taglibs.jsp%

tiles:insert definition=.login flush=true/

So you can see it uses Tiles - here's my .login definition:

!-- Login Page definition --
definition name=.login extends=baseLayout
put name=titleKey  value=login.title/
put name=headingKey value=login.heading/
put name=menu value=/menu.html/
put name=content value=/WEB-INF/pages/login.jsp/
/definition

Where /pages/login.jsp is:

%@ include file=/common/taglibs.jsp%

div id=loginTable
form method=post id=loginForm action=j_security_check
table width=100%
tr
td colspan=2
c:if test=${param.error != null}
div class=error 
style=margin-right: 0; margin-bottom: 3px; margin-top:
3px
html:img pageKey=icon.warning.img 
altKey=icon.warning styleClass=icon/
fmt:message key=errors.password.mismatch/
/div
/c:if
/td
/tr
tr
th
label for=j_username class=required
fmt:message key=label.username/*:
/label
/th
td
input type=text name=j_username id=j_username size=25
/
/td
/tr
tr
th
label for=j_password class=required
fmt:message key=label.password/*:
/label
/th
td
input type=password name=j_password id=j_password
size=20 /
/td
/tr
tr
td/td
td
input type=checkbox name=rememberMe id=rememberMe /
label for=rememberMefmt:message
key=login.rememberMe//a
!-- for Resin --
input type=hidden name=j_uri id=j_uri value= /
/td
/tr
tr
td/td
td
input type=submit name=login id=login value=Login /
input type=reset name=reset id=reset value=Reset 
onclick=document.getElementById('j_username').focus() /
/td
/tr
tr
td/td
tdbr /fmt:message key=login.signup//td
/tr
/table
/form
/div

HTH,

Matt


-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 2:11 PM
To: Struts Users Mailing List
Subject: Re: Container-Managed Authentication login-config in web.xml
vs . Specifying Paths in the struts-config.xml


People answer questions without reading my original
post.  Therefore, I must re-type my original question
again.

Before I posted my question, I had configured the
Tomcat JDBCRealm following the instructions at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
so that I can do security testing programmically, such
as isUserInRole(), in my program.

If I use form based authentication, I insert the
login-config and its sub-elements in my web.xml file
(see below).  As we know, the form-login-page and
form-error-page are required.

My question is that the container-managed
authentication (we provide login page and error page
in the web.xml) does not seem to be consistent with
what we usually do in struts; e.g. we state the
logical name and path for each .jsp page in the
struts-config.xml file.  

What is the Struts convention in dealing with user
authentication?  Should we specify the paths for the
logon page and error page in the struts.config.xml or
we should use the form-login-page and
form-error-page in the web.xml file?

Thanks.
--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 Caroline Jen wrote:
 
 But, I do not want to use BASIC authentication.  I
 have many different roles and hundreds of people
 per
 role.  Users' name, role, etc. are stored in a
 database.
 
 How authentication is performed (BASIC, form-based,
 DIGEST, or SSL 
 client certificates) and how users are stored
 (database, directory 
 server, local XML file, ...) are two separate
 questions.  For most 
 servers , any combination is possible.  With Tomcat,
 for example, you 
 can configure JDBCRealm to point at your user and
 role definitions in a 
 database, and then use those users with any of the
 authentication 
 methods.  For more information, see:
 


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
 
 The choice between BASIC and form-based
 authentication, then, can be 
 based on user interface related concerns, rather
 than worrying about a 
 database.
 
 Craig
 
 --- Matt Raible [EMAIL PROTECTED] wrote:
   
 
 A JDBCRealm can use BASIC authentication - it
 doesn't require form-based.
 Here's an example app that might help you out:
 
 
 
 


Re: Container-Managed Authentication login-config in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Andrew Shirk
Logical paths work fine for me in web.xml (using tomcat 4.1.x):

  login-config
 auth-methodFORM/auth-method
 form-login-config
form-login-page
   /do/login/edit
/form-login-page
form-error-page
   /do/login/fail
/form-error-page
 /form-login-config
  /login-config
Andrew

At 03:11 PM 10/7/2003, you wrote:
People answer questions without reading my original
post.  Therefore, I must re-type my original question
again.
Before I posted my question, I had configured the
Tomcat JDBCRealm following the instructions at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
so that I can do security testing programmically, such
as isUserInRole(), in my program.
If I use form based authentication, I insert the
login-config and its sub-elements in my web.xml file
(see below).  As we know, the form-login-page and
form-error-page are required.
My question is that the container-managed
authentication (we provide login page and error page
in the web.xml) does not seem to be consistent with
what we usually do in struts; e.g. we state the
logical name and path for each .jsp page in the
struts-config.xml file.
What is the Struts convention in dealing with user
authentication?  Should we specify the paths for the
logon page and error page in the struts.config.xml or
we should use the form-login-page and
form-error-page in the web.xml file?
Thanks.
--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 Caroline Jen wrote:

 But, I do not want to use BASIC authentication.  I
 have many different roles and hundreds of people
 per
 role.  Users' name, role, etc. are stored in a
 database.
 
 How authentication is performed (BASIC, form-based,
 DIGEST, or SSL
 client certificates) and how users are stored
 (database, directory
 server, local XML file, ...) are two separate
 questions.  For most
 servers , any combination is possible.  With Tomcat,
 for example, you
 can configure JDBCRealm to point at your user and
 role definitions in a
 database, and then use those users with any of the
 authentication
 methods.  For more information, see:



http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html

 The choice between BASIC and form-based
 authentication, then, can be
 based on user interface related concerns, rather
 than worrying about a
 database.

 Craig

 --- Matt Raible [EMAIL PROTECTED] wrote:
 
 
 A JDBCRealm can use BASIC authentication - it
 doesn't require form-based.
 Here's an example app that might help you out:
 
 
 
 

http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
 
 
 HTH,
 
 Matt
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 06, 2003 4:45 PM
 To: [EMAIL PROTECTED]
 Subject: Container-Managed Authentication
 login-config in web.xml vs.
 Specifying Paths in the struts-config.xml
 
 
 I use the Tomcat.  I configured the Tomcat
 JDBCRealm
 so that I can use programmic security testing,
 such
 as
 isUserInRole(), in my program.
 
 Because Tomcat JDBCRealm is form based, I inserted
 the
 login-config and its sub-elements in my web.xml
 file
 (see below).  As we know, the form-login-page
 and
 form-error-page are required.
 
 My question is that the container-managed
 authentication does not seem to be consistent with
 what we usually do in struts; e.g. we state the
 logical name and path for each .jsp page in the
 struts-config.xml file.
 
 What is the Struts convention in dealing with user
 authentication?  Should we specify the paths for
 the
 logon page and error page in the struts.config.xml
 or
 we should use the form-login-page and
 form-error-page in the web.xml file?
 
 
 
 

==
 
 
 security-constraint
web-resource-collection
 
 web-resource-nameSalesInfo/web-resource-name
   url-pattern/SalesInfo/*/url-pattern
   http-methodGET/http-method
   http-methodPOST/http-method
/web-resource-collection
auth-constraint
   role-namemanager/role-name
/auth-constraint
user-data-constraint
 
 transport-guaranteeNONE/transport-guarantee
/user-data-constraint
 /security-constraint
 
 login-config
auth-methodFORM/auth-method
form-login-config
 
 
 
 

form-login-page/authentication/login.html/form-login-page
 
 
 
 
 
 

form-error-page/authentication/error.html/form-error-page
 
 
 /form-login-config
 
 /login-config
 
 security-role
role-namemanager/role-name
 /security-role
 
 
 
 
 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com
 
 
 
 

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

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

Re: Container-Managed Authentication login-config in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Caroline Jen
Thanks a lot, Andrew.  I got the idea.
--- Andrew Shirk [EMAIL PROTECTED] wrote:
 Logical paths work fine for me in web.xml (using
 tomcat 4.1.x):
 
login-config
   auth-methodFORM/auth-method
   form-login-config
  form-login-page
 /do/login/edit
  /form-login-page
  form-error-page
 /do/login/fail
  /form-error-page
   /form-login-config
/login-config
 
 Andrew
 
 At 03:11 PM 10/7/2003, you wrote:
 People answer questions without reading my original
 post.  Therefore, I must re-type my original
 question
 again.
 
 Before I posted my question, I had configured the
 Tomcat JDBCRealm following the instructions at

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
 so that I can do security testing programmically,
 such
 as isUserInRole(), in my program.
 
 If I use form based authentication, I insert the
 login-config and its sub-elements in my web.xml
 file
 (see below).  As we know, the form-login-page and
 form-error-page are required.
 
 My question is that the container-managed
 authentication (we provide login page and error
 page
 in the web.xml) does not seem to be consistent with
 what we usually do in struts; e.g. we state the
 logical name and path for each .jsp page in the
 struts-config.xml file.
 
 What is the Struts convention in dealing with user
 authentication?  Should we specify the paths for
 the
 logon page and error page in the struts.config.xml
 or
 we should use the form-login-page and
 form-error-page in the web.xml file?
 
 Thanks.
 --- Craig R. McClanahan [EMAIL PROTECTED]
 wrote:
   Caroline Jen wrote:
  
   But, I do not want to use BASIC authentication.
  I
   have many different roles and hundreds of
 people
   per
   role.  Users' name, role, etc. are stored in a
   database.
   
   How authentication is performed (BASIC,
 form-based,
   DIGEST, or SSL
   client certificates) and how users are stored
   (database, directory
   server, local XML file, ...) are two separate
   questions.  For most
   servers , any combination is possible.  With
 Tomcat,
   for example, you
   can configure JDBCRealm to point at your user
 and
   role definitions in a
   database, and then use those users with any of
 the
   authentication
   methods.  For more information, see:
  
  
  

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
  
   The choice between BASIC and form-based
   authentication, then, can be
   based on user interface related concerns, rather
   than worrying about a
   database.
  
   Craig
  
   --- Matt Raible [EMAIL PROTECTED]
 wrote:
   
   
   A JDBCRealm can use BASIC authentication - it
   doesn't require form-based.
   Here's an example app that might help you out:
   
   
   
   
  
 

http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
   
   
   HTH,
   
   Matt
   
   -Original Message-
   From: Caroline Jen
 [mailto:[EMAIL PROTECTED]
   Sent: Monday, October 06, 2003 4:45 PM
   To: [EMAIL PROTECTED]
   Subject: Container-Managed Authentication
   login-config in web.xml vs.
   Specifying Paths in the struts-config.xml
   
   
   I use the Tomcat.  I configured the Tomcat
   JDBCRealm
   so that I can use programmic security testing,
   such
   as
   isUserInRole(), in my program.
   
   Because Tomcat JDBCRealm is form based, I
 inserted
   the
   login-config and its sub-elements in my
 web.xml
   file
   (see below).  As we know, the
 form-login-page
   and
   form-error-page are required.
   
   My question is that the container-managed
   authentication does not seem to be consistent
 with
   what we usually do in struts; e.g. we state
 the
   logical name and path for each .jsp page in
 the
   struts-config.xml file.
   
   What is the Struts convention in dealing with
 user
   authentication?  Should we specify the paths
 for
   the
   logon page and error page in the
 struts.config.xml
   or
   we should use the form-login-page and
   form-error-page in the web.xml file?
   
   
   
   
  
 

==
   
   
   security-constraint
  web-resource-collection
   
  
 web-resource-nameSalesInfo/web-resource-name
 url-pattern/SalesInfo/*/url-pattern
 http-methodGET/http-method
 http-methodPOST/http-method
  /web-resource-collection
  auth-constraint
 role-namemanager/role-name
  /auth-constraint
  user-data-constraint
   
  
 transport-guaranteeNONE/transport-guarantee
  /user-data-constraint
   /security-constraint
   
   login-config
  auth-methodFORM/auth-method
  form-login-config
   
   
   
   
  
 

form-login-page/authentication/login.html/form-login-page
   
 
=== message truncated ===


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL 

Re: using an attribute inside a tile

2003-10-07 Thread Frank Maritato
I just recently posted a question about this very problem. Attributes 
defined in tiles definitions are available only in the tiles scope. 
Therefore, you must redefine the attribute into the request scope if you 
want it available to your sub tiles.

So, in contentFrameLayout.jsp you add the line:
bean:define id=screenName name=screenName toScope=request /
And it should work for you.

Sonam Belbase wrote:
Hi,

I have a layout contentFrameLayout.jsp:

html
head/head
body
tiles:useAttribute name=screenName scope=request/
tiles:insert attribute=header /
tiles:insert attribute=body /
tiles:insert attribute=footer /
/body
/html
In my tiles-def.xml, I assign values to these attributes:

definition name=content.default page=/jsp/layouts/contentFrameLayout.jsp
put name=screenName value=Introduction /
put name=header value=/jsp/common/header.jsp /
put name=body value=/jsp/common/introduction.jsp /
put name=footer value=/jsp/common/footer.jsp /
/definition
definition name=signin.default extends=content.default
put name=screenName value=Sign In /
put name=body value=/jsp/common/signin.jsp /
/definition
In struts-config, my action forwards to the  definition content.default on success.

I am trying to use the attribute screenName inside header.jsp
(which is a tile for contentFrameLayout.jsp) in the following manner:
TD WIDTH=300 BGCOLOR=#336699 CLASS=bodytextboldwhite
! -- value of screenName displayed here --
bean:write name=screenName /
/TD
I followed some guidelines in the following article:

http://www.developer.com/java/ent/article.php/10933_2192411_5

but the bean:write writes nothing to the screen (i.e the column comes up empty).
It looks like there might be a context problem since doing a bean:write in
the layout jsp works but not in the tile header.jsp. There are no error messages
at runtime.
Does anyone know how I can accomplish this? My main goal is to use the same
layout for every content page and have the option of dynamically displaying the 
screenName
each time the tile header.jsp is used.
Thanks,
SB
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Frank Maritato
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: using an attribute inside a tile

2003-10-07 Thread Trieu, Danny
Or you can use Tiles' tiles:useAttibute/ tags to redefine it to
You prefer scope

-Original Message-
From: Frank Maritato [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 07, 2003 1:54 PM
To: Struts Users Mailing List
Subject: Re: using an attribute inside a tile


I just recently posted a question about this very problem. Attributes 
defined in tiles definitions are available only in the tiles scope. 
Therefore, you must redefine the attribute into the request scope if you 
want it available to your sub tiles.

So, in contentFrameLayout.jsp you add the line:
bean:define id=screenName name=screenName toScope=request /

And it should work for you.

Sonam Belbase wrote:
 Hi,
 
 I have a layout contentFrameLayout.jsp:
 
 html
 head/head
 body
 tiles:useAttribute name=screenName scope=request/
 tiles:insert attribute=header /
 tiles:insert attribute=body /
 tiles:insert attribute=footer /
 /body
 /html
 
 In my tiles-def.xml, I assign values to these attributes:
 
 definition name=content.default
page=/jsp/layouts/contentFrameLayout.jsp
 put name=screenName value=Introduction /
 put name=header value=/jsp/common/header.jsp /
 put name=body value=/jsp/common/introduction.jsp /
 put name=footer value=/jsp/common/footer.jsp /
 /definition
 
 definition name=signin.default extends=content.default
 put name=screenName value=Sign In /
 put name=body value=/jsp/common/signin.jsp /
 /definition
 
 In struts-config, my action forwards to the  definition content.default
on success.
 
 I am trying to use the attribute screenName inside header.jsp
 (which is a tile for contentFrameLayout.jsp) in the following manner:
 
 TD WIDTH=300 BGCOLOR=#336699 CLASS=bodytextboldwhite
 ! -- value of screenName displayed here --
 bean:write name=screenName /
 /TD
 
 I followed some guidelines in the following article:
 
 http://www.developer.com/java/ent/article.php/10933_2192411_5
 
 but the bean:write writes nothing to the screen (i.e the column comes up
empty).
 It looks like there might be a context problem since doing a bean:write in
 the layout jsp works but not in the tile header.jsp. There are no error
messages
 at runtime.
 
 Does anyone know how I can accomplish this? My main goal is to use the
same
 layout for every content page and have the option of dynamically
displaying the screenName
 each time the tile header.jsp is used.
 
 Thanks,
 SB
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Frank Maritato


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


This message and any attachments are for the intended recipient(s) only and may 
contain privileged, confidential and/or proprietary information about Downey Savings 
or its customers, which Downey Savings does not intend to disclose to the public. If 
you received this message by mistake, please notify the sender by reply e-mail and 
delete the message and attachments.

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



No action instance for path /logoff could be created

2003-10-07 Thread Hari Om
I am working on a simple Logon Application.

I am able to Logon to my Logon application and when I click the Signout Link 
it gives me following errors wonder why:
-
HTTP Status 500 - No action instance for path /logoff could be created
-

I have defined Action Mappings for logoff in my struts.xml but still get 
this error. My struts.xml is:
-
struts-config
   form-beans
	form-bean name=LogonForm type=app.LogonForm /
   /form-beans

  global-forwards type=org.apache.struts.action.ActionForward
   forward name=logoff path=/logoff.do /
   forward name=logon path=/logon.do /
   forward name=welcome path=/welcome.do /
   /global-forwards
   action-mappings type=org.apache.struts.action.ActionMapping
	action path=/welcome type=org.apache.struts.actions.ForwardAction 
parameter=/pages/welcome.jsp /
   action path=/logon type=org.apache.struts.actions.ForwardAction 
parameter=/pages/logon.jsp /
   action path=/logonSubmit type=app.LogonAction name=LogonForm 
scope=request validate=true input=/pages/logon.jsp
   forward name=success path=/pages/welcome.jsp /
   /action
   action path=/logoff type=app.LogoffAction
   forward name=success path=/pages/welcome.jsp /
   /action
   /action-mappings
   message-resources parameter=resources/application.properties /
/struts-config
-

My second question is:
I try to submit the form without entering Username and password .BUT I 
do not receive any errors which I have defined in APPLICATION.PROPERTIES as:
-
error.username.required=LIUsername is required/LI
error.password.required=LIPassword is required/LI
-

Any help on this is appreciated!

THANKS for your great book!

_
Instant message with integrated webcam using MSN Messenger 6.0. Try it now 
FREE!  http://msnmessenger-download.com

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


Tiles backward forwarding - how to?

2003-10-07 Thread Tamer Salama
Hello Everyone:

First Struts project ...

- A search Form inside a tile (jsp) (search.jsp).
- The tile (search.jsp) is used in many of the pages (tile
definitions/layouts).
- The form submits to a single Action class (SearchAction).

How would I make that Action (SearchAction) recognizes the originating
definition that was displayed at the time that form was submitted (i.e.:
it could know something about the submitting form/tile, but how about
the tile definition that was rendered at that time).

What I originally wanted to do is present the user with a Reset button
that would reset the form by forwarding to an Action that clears any
session attributes related to the (old) form (doesn't of course
necessarily be the same submit Action). Then after being done with
clearing those attributes, (here comes the tricky part) forward the
control back to the originating page (originating tile definition).

I haven't still dug into validation, but, I believe the ideas that you
would give me would similarly be used in forwarding/returning control to
the input page (definition) to display the error messages (the input
in my case is dynamic).

What I'm currently doing is that I provided a link to an Action that
forward the control to a default tile definition. The definition is used
to display a default search page (but not the originating layout). And I
agree! It's not a good solution.

Kindest regards

Tamer



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



Pass/Preserve request parameters after actionForward

2003-10-07 Thread Lee, Yau-Pang
This might be a dumb question, but I couldn't find any documentation on
this.

I have a page that submit a form to my action servlet and depending on what
they submitted, I redirect them differently via ActionForward,( E.g. return
pMapping.findForward(success); ) at the end of the execute() function,
pretty basic stuff.  However, I want to pass/preserve all the form values
submitted to the my action servlet to the resulting JSP pages.  Is there a
setting somewhere to do this or I have to add codes (via URL writing)
manually?

Simon

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



Tiles Tabs Layout

2003-10-07 Thread pondugud
Hi there:

I am using tiles 'tabs layout' and having the following question.

Question: How to display the result page with same tab being active and
with out BREAKING other tab links?

Explanation: Let me explain the problem.

a). Lets say I clicked on 'Tab B' and it displayed a form asking for some
input from user.
b). On submit, request will be sent to 'TestAction' class and it returns
the result page (say result.jsp).
c). I want to display result.jsp having the active tab (Tab B) still
highlighted.

Please look into the code snippets below.

1). I have a jsp file called 'main.jsp' and it has the following code:

  %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles%
  tiles:insert definition=ltws.tabs.main flush=true /

  This file displays my web page with all tabs and content.

2). My tiles-defs.xml has the following code:

   definition name=ltws.tabs.main path=/layouts/tabsLayout.jsp 
put name=selectedIndex  value=0 /
put name=parameterName  value=selected /
putList name=tabList 
  item value=Tab A link=/content/a.jsp /
  item value=Tab B link=/content/b.jsp /
/putList
  /definition

  definition name=ltws.tabs.main.tabsResult extends=ltws.tabs.main 
  put name=selectedIndex  value=0 /
  put name=parameterName  value=selected /
  putList name=tabList 
item value=Tab A   link=/content/a.jsp /
item value=Tab B   link=/content/result.jsp /
/putList
  /definition

3). struts-config.xml code:
 action-mappings
   action
  path=/testTab
  type=com.company.ltws.action.TestTabAction
  scope=request
  name=testTabForm
  forward name=Success path=ltws.tabs.main.tabsResult/
  /action
/action-mappings

4). tabsLayout.jsp code snippet:

I am finding out which tab was highlighted using the following code.

int selectedIndex = 0;

String requestLastSelectedIndex = request.getParameter(parameterName);
String sessionLastSelectedIndex
= (String)session.getAttribute(parameterName);

if((requestLastSelectedIndex==null) 
   (sessionLastSelectedIndex==null))
{
  selectedIndex = 0;
}
else if(requestLastSelectedIndex==null)
{
  selectedIndex = Integer.parseInt(sessionLastSelectedIndex);
}
else
{
  selectedIndex = Integer.parseInt(requestLastSelectedIndex);
  session.setAttribute(parameterName, requestLastSelectedIndex);
}


When I put the mouse on the tabs they are pointing to
'http://localhost:/iltws/content/main.jsp?selected=X' (X=1,2,3...).

If I click on 'Tab B' and submit the form, it is displaying the result page
with the same tab (Tab B) active (no problem).

Now if I try to click on any other tab, it is pointing to
'http://localhost:/iltws/layouts/tabsLayout.jsp?selected=1' and the
following error occurs.

javax.servlet.jsp.JspException: Error - tag useAttribute : no tiles context
found.

If you look at the url, it is pointing to tabsLayout.jsp instead of
main.jsp.

I am sure, I am doing something wrong and I really appreciate if you can
help me with a better approach or solution.

I do not think I am doing it right in 'tiles-defs.xml' file.

Please let me know, if you need any more clarification.

Waiting for your replies...

Thanks  Regards,
Prasad.



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



Problem with dynamically generated anchors

2003-10-07 Thread Galabova, Hristina (HBO)
I have a jsp that uses the iterator tag to iterate over the elements of a
collection of beans that is placed in request scope by an Action class.
The jsp code looks something like this:

 logic:iterate id=promoItem name=%= ProjectConstants.PROJECT_BEAN %
property=promos scope=request type=com.hbo.cssaw.web.promo.PromoBean
a name=%=promoItem.getPromoKey()% /a
!-- relevant PromoBean data--
 /logic:iterate

In the above iteration I am also defining dynamically an anchor, to which I
want to scroll down to.
I do this as follows:

body onLoad=location.hash='%=request.getAttribute(anchor)%';

The Action class that forwards to the page sets an attribute with a name
anchor in request scope. The attribute's value is equal to one of the
anchors that are generated in the above iteration. 

Unfortunately, this does not work. I always get to the top of the page, and
not to the anchor.

However, if I set a static anchor at the bottom of the page (outside the
iterator), and follow the same process as above, I am able to get to the
bottom of the page.
It seems that the dynamically generated anchors are not visible at all to
the browser. Yes, I can see them when I view the source of the generated
page.

Does anyone know why this is happening and how to resolve it?


Thanks!


==
This e-mail is intended only for the use of the addressees.  Any copying,
forwarding, printing or other use of this e-mail by persons other than the
addressees is not authorized.  This e-mail may contain information that is
privileged, confidential and exempt from disclosure.  If you are not the
intended recipient, please notify us immediately by return e-mail (including
the original message in your reply) and then delete and discard all copies of
the e-mail.  Thank you.



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



Page flow dependence on html:error(s)/

2003-10-07 Thread Sasha Borodin
A common scenario I've encountered is that some check made in an action's
execute() method correlates to what needs to be displayed in the view.

But how can I control page flow (i.e. this section of page gets displayed,
this one doesn't) based on the accumulated ActionError's?

Right now, I check-for/add error once in the action's execute(), then use
html:error/ tag to display error (if any), then perform the same check
AGAIN via c:if to determine the page flow.

Just wondering if there's a good way to use the ActionErrors object for this
purpose.

Thanks for your help.

-Sasha


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



Cannot retrieve definition for form bean null

2003-10-07 Thread victor gusz
Hi,

I got the above error when I ran my struts app. I am
not
using a form for this action since I only need to
diaply it. And I am using Tiles framework for this. 

Appreciate any help.



__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Mark Galbreath
Yeah!  And I bet you didn't know that struts-user enforces a dress code,
too?!

Mark

Cut us some slack, Keith.

-Original Message-
From: Keith Pemberton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 1:28 PM
To: Struts Users Mailing List
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


This response was uncalled for... at least be more professional when
responding to people through the listserv.

- Original Message -
From: Adam Levine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 12:04 PM
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


 Hey, Steve ...
Guess what?  You don't understand Struts.   (=




 From: Gregory Seidman [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
 Date: Tue, 7 Oct 2003 12:57:18 -0400

 On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
 } 'In fact, we'd particularly invite Struts advocates to respond to this
 } article by describing the benefits that they feel Struts provides over
 } vanilla JSP.'
 }
 } Well if they don't get what Struts provides over vanilla JSP, then
they
 } never will. Discussing what Struts provides compared to other MVC
 } frameworks might be useful, but the vanilla JSP topic is surely dead
 } and buried by now.

 This is a lousy attitude. It's like the stereotype of a woman who says,
If
 you don't know what you did, I'm not going to tell you. If you can
clearly
 and succinctly respond to his challenge, do so. If not, perhaps you don't
 understand Struts as well as you think.

 Myself, I'm still evaluating Struts. I have a prototype of my project
 written with vanilla JSP and a tiny custom taglib, and I'm trying to
 decide whether to rewrite it with Struts or simply clean it up and extend
 it. I can't, yet, see whether there is a net benefit to using Struts for
my
 small project.

 [...]
 } Steve
 --Greg


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

 _
 High-speed Internet access as low as $29.95/month (depending on the local
 service providers in your area). Click here.   https://broadband.msn.com


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





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



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



RE: Pass/Preserve request parameters after actionForward

2003-10-07 Thread Tamer Salama
Hello Lee:

Disclaimer: I'm in my first struts project ;-)

The ActionForm is designed to carry the input parameters to your Action
class, and not beyond that.

So, you can create a value bean that would get populated from your
ActionForm bean. Then, you can pass that value bean by placing it in
request or session scopes.
Don't forget to set attribute redirect to false in your action
mappings (struts config file).

Regards,

Tamer


 -Original Message-
 From: Lee, Yau-Pang [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 07, 2003 5:41 PM
 To: 'Struts Users Mailing List'
 Subject: Pass/Preserve request parameters after actionForward
 
 
 This might be a dumb question, but I couldn't find any 
 documentation on this.
 
 I have a page that submit a form to my action servlet and 
 depending on what they submitted, I redirect them differently 
 via ActionForward,( E.g. return 
 pMapping.findForward(success); ) at the end of the 
 execute() function, pretty basic stuff.  However, I want to 
 pass/preserve all the form values submitted to the my action 
 servlet to the resulting JSP pages.  Is there a setting 
 somewhere to do this or I have to add codes (via URL writing) 
 manually?
 
 Simon
 
 -
 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: using an attribute inside a tile

2003-10-07 Thread Sonam Belbase
Frank,

I tried this and  the bean:write in header.jsp still does not write anything to the 
screen:

tiles-def.xml:
definition name=content.default page=/jsp/layouts/contentFrameLayout.jsp
 put name=header value=/jsp/common/header.jsp /
 put name=screenName value=Introduction  /
 /definition

contentFrameLayout.jsp:
tiles:useAttribute name=screenName /
bean:define id=label name=screenName toScope=request /
tiles:insert attribute=begin /

header.jsp:
bean:define name=label scope=request ignore=true/
bean:write name=label /

I also tried

header.jsp:
bean:define name=label scope=request ignore=true/
%=label%

but this results in the error: /ms/user/s/sonam/libra/aeui/0.2/src/ServletExec
Data/default/aeui/pagecompile/_jsp/_common/_beginContent_xjsp.java:43: Undefined 
variable: label

out.print( String.valueOf(  label  ) );

Don't know what I am doing wrong..

-Sonam

Frank Maritato wrote:

 I just recently posted a question about this very problem. Attributes
 defined in tiles definitions are available only in the tiles scope.
 Therefore, you must redefine the attribute into the request scope if you
 want it available to your sub tiles.

 So, in contentFrameLayout.jsp you add the line:
 bean:define id=screenName name=screenName toScope=request /

 And it should work for you.

 Sonam Belbase wrote:
  Hi,
 
  I have a layout contentFrameLayout.jsp:
 
  html
  head/head
  body
  tiles:useAttribute name=screenName scope=request/
  tiles:insert attribute=header /
  tiles:insert attribute=body /
  tiles:insert attribute=footer /
  /body
  /html
 
  In my tiles-def.xml, I assign values to these attributes:
 
  definition name=content.default page=/jsp/layouts/contentFrameLayout.jsp
  put name=screenName value=Introduction /
  put name=header value=/jsp/common/header.jsp /
  put name=body value=/jsp/common/introduction.jsp /
  put name=footer value=/jsp/common/footer.jsp /
  /definition
 
  definition name=signin.default extends=content.default
  put name=screenName value=Sign In /
  put name=body value=/jsp/common/signin.jsp /
  /definition
 
  In struts-config, my action forwards to the  definition content.default on 
  success.
 
  I am trying to use the attribute screenName inside header.jsp
  (which is a tile for contentFrameLayout.jsp) in the following manner:
 
  TD WIDTH=300 BGCOLOR=#336699 CLASS=bodytextboldwhite
  ! -- value of screenName displayed here --
  bean:write name=screenName /
  /TD
 
  I followed some guidelines in the following article:
 
  http://www.developer.com/java/ent/article.php/10933_2192411_5
 
  but the bean:write writes nothing to the screen (i.e the column comes up empty).
  It looks like there might be a context problem since doing a bean:write in
  the layout jsp works but not in the tile header.jsp. There are no error messages
  at runtime.
 
  Does anyone know how I can accomplish this? My main goal is to use the same
  layout for every content page and have the option of dynamically displaying the 
  screenName
  each time the tile header.jsp is used.
 
  Thanks,
  SB
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 --
 Frank Maritato

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

--
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive
confidentiality or privilege, and use is prohibited.



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



RE: Pass/Preserve request parameters after actionForward

2003-10-07 Thread Lee, Yau-Pang
Thks Tamer, that's what I thoughtno shortcut...oh well.

Simon

-Original Message-
From: Tamer Salama [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 6:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Pass/Preserve request parameters after actionForward


Hello Lee:

Disclaimer: I'm in my first struts project ;-)

The ActionForm is designed to carry the input parameters to your Action
class, and not beyond that.

So, you can create a value bean that would get populated from your
ActionForm bean. Then, you can pass that value bean by placing it in
request or session scopes.
Don't forget to set attribute redirect to false in your action
mappings (struts config file).

Regards,

Tamer


 -Original Message-
 From: Lee, Yau-Pang [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 07, 2003 5:41 PM
 To: 'Struts Users Mailing List'
 Subject: Pass/Preserve request parameters after actionForward
 
 
 This might be a dumb question, but I couldn't find any 
 documentation on this.
 
 I have a page that submit a form to my action servlet and 
 depending on what they submitted, I redirect them differently 
 via ActionForward,( E.g. return 
 pMapping.findForward(success); ) at the end of the 
 execute() function, pretty basic stuff.  However, I want to 
 pass/preserve all the form values submitted to the my action 
 servlet to the resulting JSP pages.  Is there a setting 
 somewhere to do this or I have to add codes (via URL writing) 
 manually?
 
 Simon
 
 -
 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: using an attribute inside a tile

2003-10-07 Thread Holman, Cal
Try

tiles:useAttribute id= screenName name= screenName scope=request/


Cal
www.calandva.com 

-Original Message-
From: Sonam Belbase [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 18:24
To: Struts Users Mailing List
Subject: Re: using an attribute inside a tile

Frank,

I tried this and  the bean:write in header.jsp still does not write anything to the 
screen:

tiles-def.xml:
definition name=content.default page=/jsp/layouts/contentFrameLayout.jsp
 put name=header value=/jsp/common/header.jsp /
 put name=screenName value=Introduction  /
 /definition

contentFrameLayout.jsp:
tiles:useAttribute name=screenName /
bean:define id=label name=screenName toScope=request /
tiles:insert attribute=begin /

header.jsp:
bean:define name=label scope=request ignore=true/
bean:write name=label /

I also tried

header.jsp:
bean:define name=label scope=request ignore=true/
%=label%

but this results in the error: /ms/user/s/sonam/libra/aeui/0.2/src/ServletExec
Data/default/aeui/pagecompile/_jsp/_common/_beginContent_xjsp.java:43: Undefined 
variable: label

out.print( String.valueOf(  label  ) );

Don't know what I am doing wrong..

-Sonam

Frank Maritato wrote:

 I just recently posted a question about this very problem. Attributes
 defined in tiles definitions are available only in the tiles scope.
 Therefore, you must redefine the attribute into the request scope if you
 want it available to your sub tiles.

 So, in contentFrameLayout.jsp you add the line:
 bean:define id=screenName name=screenName toScope=request /

 And it should work for you.

 Sonam Belbase wrote:
  Hi,
 
  I have a layout contentFrameLayout.jsp:
 
  html
  head/head
  body
  tiles:useAttribute name=screenName scope=request/
  tiles:insert attribute=header /
  tiles:insert attribute=body /
  tiles:insert attribute=footer /
  /body
  /html
 
  In my tiles-def.xml, I assign values to these attributes:
 
  definition name=content.default page=/jsp/layouts/contentFrameLayout.jsp
  put name=screenName value=Introduction /
  put name=header value=/jsp/common/header.jsp /
  put name=body value=/jsp/common/introduction.jsp /
  put name=footer value=/jsp/common/footer.jsp /
  /definition
 
  definition name=signin.default extends=content.default
  put name=screenName value=Sign In /
  put name=body value=/jsp/common/signin.jsp /
  /definition
 
  In struts-config, my action forwards to the  definition content.default on 
  success.
 
  I am trying to use the attribute screenName inside header.jsp
  (which is a tile for contentFrameLayout.jsp) in the following manner:
 
  TD WIDTH=300 BGCOLOR=#336699 CLASS=bodytextboldwhite
  ! -- value of screenName displayed here --
  bean:write name=screenName /
  /TD
 
  I followed some guidelines in the following article:
 
  http://www.developer.com/java/ent/article.php/10933_2192411_5
 
  but the bean:write writes nothing to the screen (i.e the column comes up empty).
  It looks like there might be a context problem since doing a bean:write in
  the layout jsp works but not in the tile header.jsp. There are no error messages
  at runtime.
 
  Does anyone know how I can accomplish this? My main goal is to use the same
  layout for every content page and have the option of dynamically displaying the 
  screenName
  each time the tile header.jsp is used.
 
  Thanks,
  SB
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 --
 Frank Maritato

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

--
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive
confidentiality or privilege, and use is prohibited.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



Re: Dynamic form fields on ActionForm

2003-10-07 Thread Adam Hardy
Hi Cornellious,
it depends whether you know beforehand what the full set of possible 
fields could be, or whether the fields themselves are not limited in 
name or type.

If the former, then it would be easy to make a form that defined them 
all, and to use logic tags to display the needed fields or not in JSP.

Adam

On 10/07/2003 09:48 PM Cornellious Mann wrote:
I am wondering what is the best approach to handle
dynamic form fields within an ActionForm.
I have a JSP page that will display quantity input
fields for a dynamic list of products. I don't know
how many products will be in the list until runtime.
How can I set up my ActionForm to handle the list in
input parameters?
Thanks for any help.

=
Best Regards,
Cornellious Mann
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Tiles Tag: Submit a Body Tile from Header Tile..

2003-10-07 Thread Ritvik
Hi There,

We are using tiles for our JSP layout and have following tile components
LeftNavigation.jsp, Header.jsp, body.jsp and footer.jsp. There are
series of buttons on LeftNavigation.jsp, which must submit\post any of
body.jsp HTML forms..

Any suggestions on how to submit a jsp from another i.e
LeftNavigation.jsp? Is Javascript is an option?

regards,
Ritvik



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



Re: HELP: strutsTestCase with ant now sending too much stacktrace!

2003-10-07 Thread Kirk Wylie
Those aren't stack traces, they're Digester output. It's notorious for 
its excess of logging. Did you modify any logging/log4j settings, either 
intentionally or inadvertantly?

Kirk Wylie

Mick Knutson wrote:

I went from having very little stack trace, to having several
hundred/thousand per test.
I am not sure what I did to turn it on, and can't seem to turn it off, and
am unable to test this at all!
Here is the start of 1 of the tests::

[junit] Running com.baselogic.yoursos.user.RegistrationActionsTest
[junit] [servletunit.struts.MockStrutsTestCase ] Entering setUp()
[junit] [servletunit.struts.MockStrutsTestCase ] Exiting setUp()
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
setInitParameter() : key = validating, value = false
[junit] [servletunit.struts.MockStrutsTestCase ] Exiting
setInitParameter()
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
setConfigFile() : pathName = C:/WEB-INF/struts-config.xml
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
setConfigFile() : moduleName = null, pathname =C:/WEB-INF/struts-config.xml
[junit] [servletunit.struts.MockStrutsTestCase ] Exiting 
setConfigFile()
[junit] [servletunit.struts.MockStrutsTestCase ] Exiting 
setConfigFile()
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
setRequestPathInfo() : pathInfo = /registrationView
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
setRequestPathInfo() : moduleName = , pathInfo = /registrationView
[junit] [servletunit.struts.Common ] Entering stripActionPath() : 
path =
/registrationView
[junit] [servletunit.struts.Common ] Exiting stripActionPath() -
returning path = /registrationView
[junit] [servletunit.struts.MockStrutsTestCase ] setRequestPathInfo() :
setting request attribute - name = javax.servlet.include.servlet_path, 
value
=
[junit] [servletunit.struts.MockStrutsTestCase ] Exiting
setRequestPathInfo()
[junit] [servletunit.struts.MockStrutsTestCase ] Exiting
setRequestPathInfo()
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
actionPerform()
[junit] [servletunit.struts.MockStrutsTestCase ] Entering
getActionServlet()
[junit] [servletunit.struts.MockStrutsTestCase ] getActionServlet() :
intializing actionServlet
[junit] [servletunit.ServletContextSimulator ] ActionServlet: init
[junit] [org.apache.struts.util.PropertyMessageResources ] 
Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
[junit] [org.apache.struts.util.PropertyMessageResources ] 
Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true
[junit] [org.apache.commons.digester.Digester ] register('-//Apache
Software Foundation//DTD Struts Configuration 1.0//EN',
'jar:file:/C:/Documents%20and%20Settings/Owner/My%20Documents/My%20Data/Proj 

ects/YourSos/lib/deploylib/war/jakarta-struts-1.1-lib/struts.jar!/org/apache 

/struts/resources/struts-config_1_0.dtd'
[junit] [org.apache.commons.digester.Digester ] register('-//Apache
Software Foundation//DTD Struts Configuration 1.1//EN',
'jar:file:/C:/Documents%20and%20Settings/Owner/My%20Documents/My%20Data/Proj 

ects/YourSos/lib/deploylib/war/jakarta-struts-1.1-lib/struts.jar!/org/apache 

/struts/resources/struts-config_1_1.dtd'
[junit] [org.apache.commons.digester.Digester ] register('-//Sun
Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:/C:/Documents%20and%20Settings/Owner/My%20Documents/My%20Data/Proj 

ects/YourSos/lib/deploylib/war/jakarta-struts-1.1-lib/struts.jar!/org/apache 

/struts/resources/web-app_2_2.dtd'
[junit] [org.apache.commons.digester.Digester ] register('-//Sun
Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/C:/Documents%20and%20Settings/Owner/My%20Documents/My%20Data/Proj 

ects/YourSos/lib/deploylib/war/jakarta-struts-1.1-lib/struts.jar!/org/apache 

/struts/resources/web-app_2_3.dtd'
[junit] [org.apache.struts.action.ActionServlet ] Scanning web.xml for
controller servlet mapping
[junit] [org.apache.commons.digester.Digester.sax ]
setDocumentLocator([EMAIL PROTECTED])
[junit] [org.apache.commons.digester.Digester.sax ] startDocument()
[junit] [org.apache.commons.digester.Digester.sax ]
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'http://java.sun.com/dtd/web-app_2_3.dtd')
[junit] [org.apache.commons.digester.Digester ]  Resolving to alternate
DTD
'jar:file:/C:/Documents%20and%20Settings/Owner/My%20Documents/My%20Data/Proj 

ects/YourSos/lib/deploylib/war/jakarta-struts-1.1-lib/struts.jar!/org/apache 

/struts/resources/web-app_2_3.dtd'
[junit] [org.apache.commons.digester.Digester.sax ]
startElement(,web-app,web-app)
[junit] [org.apache.commons.digester.Digester ]   Pushing body text ''
[junit] [org.apache.commons.digester.Digester ]   New match='web-app'
[junit] [org.apache.commons.digester.Digester ]   No rules found
matching 'web-app'.
[junit] 

Re: [Article] SoftwareFashion (includes paragraph about Struts)

2003-10-07 Thread Ted Husted
Mark Galbreath wrote:
 Yeah!  And I bet you didn't know that struts-user enforces a dress
 code, too?!
We do like to enforce a code, Mark. It's one of the things that, over 
the years, have made Struts so popular.

Again, please don't attack people this way. If you care to rebut 
something someone has said, that's fine. But simply tossing out a jive 
is not helpful and does nothing but waste everyone's time.

Many of your comments are helpful, please continue to post those. But, 
as a courtesy to me and the other long-time Committers, please let's put 
an end to the unhelpful one-liners.

-Ted.

Mark Galbreath wrote:
Yeah!  And I bet you didn't know that struts-user enforces a dress code,
too?!
Mark

Cut us some slack, Keith.

-Original Message-
From: Keith Pemberton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 1:28 PM
To: Struts Users Mailing List
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
This response was uncalled for... at least be more professional when
responding to people through the listserv.
- Original Message -
From: Adam Levine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 12:04 PM
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)


Hey, Steve ...
  Guess what?  You don't understand Struts.   (=


From: Gregory Seidman [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts)
Date: Tue, 7 Oct 2003 12:57:18 -0400
On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote:
} 'In fact, we'd particularly invite Struts advocates to respond to this
} article by describing the benefits that they feel Struts provides over
} vanilla JSP.'
}
} Well if they don't get what Struts provides over vanilla JSP, then
they

} never will. Discussing what Struts provides compared to other MVC
} frameworks might be useful, but the vanilla JSP topic is surely dead
} and buried by now.
This is a lousy attitude. It's like the stereotype of a woman who says,
If

you don't know what you did, I'm not going to tell you. If you can
clearly

and succinctly respond to his challenge, do so. If not, perhaps you don't
understand Struts as well as you think.
Myself, I'm still evaluating Struts. I have a prototype of my project
written with vanilla JSP and a tiny custom taglib, and I'm trying to
decide whether to rewrite it with Struts or simply clean it up and extend
it. I can't, yet, see whether there is a net benefit to using Struts for
my

small project.

[...]
} Steve
--Greg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
High-speed Internet access as low as $29.95/month (depending on the local
service providers in your area). Click here.   https://broadband.msn.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





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


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

--
Ted Husted,
  Junit in Action  - http://www.manning.com/massol/,
  Struts in Action - http://husted.com/struts/book.html,
  JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.
Get Ready, We're Moving Out!! - http://www.clark04.com



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


Re: Dynamic form fields on ActionForm

2003-10-07 Thread Mark Lowe
Indexed form property is what you want.. I'll avoid any clever 
explanations, grandiose meta language or to try and sell you a book.. 
And give you an example..

form-bean name=productForm
form-property name=product type=java.util.ArrayList /
..

action name=productForm path=/products scope=session...
...
DynaActionForm theForm = (DynaActionForm) form;

ArrayList productList = 

theForm.set(product,productList);

//and for some stange reason.. try without the following first

session.setAttribute(product,productList);

...

logic:iterate id=product name=productForm property=product
html:text name=product property=price /
...
DynaActionForm theForm = (DynaActionForm) form;
ArrayList productList = (ArrayList) theForm.get(product);
for(int i = 0;i  productList.size();i++) {
Product prod = (Product) productList.get(i);
System.out.println(  prod.getPrice()  );
}
...

This should help.. Cheers Mark

On Tuesday, October 7, 2003, at 08:48 PM, Cornellious Mann wrote:

I am wondering what is the best approach to handle
dynamic form fields within an ActionForm.
I have a JSP page that will display quantity input
fields for a dynamic list of products. I don't know
how many products will be in the list until runtime.
How can I set up my ActionForm to handle the list in
input parameters?
Thanks for any help.

=
Best Regards,
Cornellious Mann
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Cannot retrieve definition for form bean null

2003-10-07 Thread victor gusz
Is it absolutely necessary to use a form bean for
every 
action? I will only let user to click on a link and 
forward it to another page while sending a value.
Should I define a form bean for this? And how can I do
it?

regards, 


--- victor gusz [EMAIL PROTECTED] wrote:
 Hi,
 
 I got the above error when I ran my struts app. I am
 not
 using a form for this action since I only need to
 diaply it. And I am using Tiles framework for this. 
 
 Appreciate any help.
 
 
 
 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com
 

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


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



  1   2   >