RE: Checkbox

2003-05-31 Thread Abhinav (Cognizant)
thanx.

I have to set the value of the checkbox in the JSP.
for this I write 

html:checkbox property='primKey value=val/
problem is that the value is dynamic, so I have to use something like value=%=val%
but this is scripting ...  :-(
use of bean:write fails to render the checkbox.

Do I have any other option.



-Original Message-
From: Carl Walker [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 4:42 PM
To: Struts Users Mailing List
Subject: Re: Checkbox


You should use a java.lang.String or java.lang.String[] property if you want
to have 'abc' submitted when checkbox 'chk' is checked.

If you want 'true' to be sent when 'chk' is checked, then change 'abc' to
'true'.

Take a look at this example for additional guidance

%-- FILE checkForm.jsp --%
%@ taglib prefix=html uri=/WEB-INF/struts-html.tld %

html:html
body
h1checkForm/h1
html:form action=/check.do

pDo you like soda?/p
html:checkbox property=likesSoda value=trueYes/html:checkboxbr

pIf you like soda (or were forced to drink one) what would you drink?/p

html:checkbox property=sodas value=cokeCoke/html:checkboxbr
html:checkbox property=sodas value=pepsiPepsi/html:checkboxbr
html:checkbox property=sodas value=7-up7-up/html:checkboxbr
html:submit value=Submit /

/html:form
/body
/html:html
%-- END FILE checkForm.jsp --%

%-- FILE check.jsp --%
%@ page import=java.util.* %
%@ taglib prefix=logic uri=/WEB-INF/struts-logic.tld %
%@ taglib prefix=bean uri=/WEB-INF/struts-bean.tld %

html
body
h1check/h1

bean:define id=likesSoda name=SodaForm property=likesSoda /
pLikes soda?: bean:write name=likesSoda //p

pPreferred sodas:/p
bean:define id=sodas name=SodaForm property=sodas /
logic:iterate id=soda name=sodas
  bean:write name=soda /br
/logic:iterate
/ul
/body
/html
%-- END FILE check.jsp --%

Put these in your struts-config.xml  (in the appropriate sections).
form-bean name=SodaForm
   type=org.apache.struts.action.DynaActionForm
  form-property name=likesSoda type=java.lang.Boolean
initial=false/
  form-property name=sodas type=java.lang.String[] /
/form-bean

action path=/checkForm forward=/checkForm.jsp /

action path=/check
name=SodaForm
scope=request
forward=/check.jsp /



FILE
Abhinav (Cognizant) wrote:

 This one is not getting into my head ..
 html:checkbox property=chk value=abc /
 and in the form bean
 boolean getChk(), void setChk(boolean)
 checkbox is checked and form is submitted.
 how do I retreieve the value abc

 Thanx.

   
   Name: InterScan_SafeStamp.txt
InterScan_SafeStamp.txtType: Plain Text (text/plain)
   Encoding: 7bit

Name: InterScan_Disclaimer.txt
InterScan_Disclaimer.txtType: Plain Text (text/plain)
Encoding: 7bit

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

** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

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

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

Bean and Scripting

2003-05-31 Thread Abhinav (Cognizant)



Can I use a bean or anythying that is 
defined/declared in a struts taglib 
for scripting.

say this kind of thing 
bean:define id="id" name="x" 
property="y"/
and then 
% String tmp = id; %
 



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm
** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

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

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

Re: [OT] slackers

2003-05-31 Thread Ian Hunter
At that exact moment, the Atlanta Struts user group was meeting, so we were
all having out listening to Chuck and expanding our minds.  Don't take that
expanding our minds too liberally, either.

- Original Message -
From: Mark Galbreath [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:43 PM
Subject: [OT] slackers


 It's 2045 EST and no one is online.   'nuf said.


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



syntax error

2003-05-31 Thread dream weaver
Hi, 

Could you tell me what the problem(error) is: 

If
(123.equals((String)request.getSession(true).getAttribute(dispsOfPO_action)))
int s11 = 1;


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: syntax error

2003-05-31 Thread Kamholz, Keith (corp-staff) USX
Use this:

if(request.getSession(true).getAttribute(dispsOfPO_action).equals(123))
int s11 = 1;

~ Keith

http://www.buffalo.edu/~kkamholz



-Original Message-
From: dream weaver [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 9:02 AM
To: [EMAIL PROTECTED]
Subject: syntax error


Hi, 

Could you tell me what the problem(error) is: 

If
(123.equals((String)request.getSession(true).getAttribute(dispsOfPO_actio
n)))
int s11 = 1;


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.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: mail list attachment problem

2003-05-31 Thread Erik Price


Vijay Pawar wrote:
Hi all,

I am pretty new to this mailing list. I  am trying to send a .doc
attachment. Although my email program is showing mail sent sucessfully :)
I do not see the attachment in the mail.
Please let me know weather .doc attachments are banned in this mailing list.
All attachments are banned.

Erik

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


Re: [OT] slackers

2003-05-31 Thread Erik Price


Josh Rayls wrote:
Don't forget Otter Creek, Rapscallion, and the Cambridge Brewing Company!
:)
Right, the list goes on and on.



Erik

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


Re: mail list attachment problem

2003-05-31 Thread Erik Price


Erik Price wrote:

All attachments are banned.


I thought.  But I was wrong.





Erik

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


Re: [OT] slackers

2003-05-31 Thread Denis Avdic
Catamount brewery, . (VT)

Josh Rayls wrote:

Don't forget Otter Creek, Rapscallion, and the Cambridge Brewing Company!
:)
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 8:46 AM
To: Struts Users Mailing List
Subject: Re: [OT] slackers


Mark Galbreath wrote:
 

Hey! Don't forget those slacker Aussies, drinking good beer while sending
that Fosters slime to Canada, which then forwards it down to the States.
   

I
 

thought they were our allies, but now I think it's a terrorist conspiracy
   

to
 

rob all Americans of their taste for good beer.  And forget about the
Canucks...they think Molson and Labatts is good beer.  UGH!  The only
   

thing
 

worse than Budweasel I can think of is Canadian beer.  Even Fosters is
better than that
   

Bah.

In New England we have Harpoon (brewed right here in Boston, I like the 
U.F.O. hefeweizen), Magic Hat (brewed right up in Vermont, I like the 
#9 ale), and BBC (brewed just over in South Deerfield MA, I like the 
Steel Rail Extra Pale).

And for imports there's always Tetley's and Guiness!



Erik

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


Using the Validator outside of Struts

2003-05-31 Thread Raible, Matt
I'm trying to use the Validator to validate that a user has entered their
information in a self-registration servlet.

However, I'm getting a NullPointerException at the following line when
running a test using Cactus:

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

Error:

[junit] java.lang.NullPointerException
[junit] at
javax.servlet.GenericServlet.getServletContext()Ljavax.servlet.ServletContex
t;(Ge
nericServlet.java:204)
[junit] at
com.comcast.cable.dmc.itd.cct.webapp.action.RegistrationServlet.execute(Ljav
ax.se
rvlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Reg
istrationServlet.java:12
2)

Full code:

ValidatorResources resources = new ValidatorResources();

InputStream rules =
 
getServletContext().getResourceAsStream(/WEB-INF/validator-rules.xml);

ValidatorResourcesInitializer.initialize(resources, rules);

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

ValidatorResourcesInitializer.initialize(resources, forms);

// Create a validator with the userForm
Validator validator = new Validator(resources, userFormEx);

// Tell the validator which bean to validate against.  
validator.addResource(Validator.BEAN_KEY, userForm);

// Validate the checkoutForm object and store the validation results
try {
// Execute the validation rules
ValidatorResults results = validator.validate();

if (log.isDebugEnabled()) {
log.debug(results.getResultValueMap());
}
} catch (ValidatorException ex) {
// Log the validation exception
log.warn(A validation exception occurred, ex);
}

Any help is appreciated.

Thanks,

Matt


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



Re: [OT] RE: test

2003-05-31 Thread Denis Avdic
Is it a laden swallow?

José Ventura wrote:

Well that depends. Would that be an european or an african swallow?

- Original Message - 
From: Mark Galbreath [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 4:30 PM
Subject: [OT] RE: test

 

Okay.  What's maximum velocity of a swallow?

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2003 2:04 PM

test



-
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: JSF and Struts Actions

2003-05-31 Thread Sundar Narasimhan
This is so cool.  I was hoping for this sort of thing.  This is getting 
close to grown up.  I wish I could see this stuff now.  Man!

Don't forget that JavaServer Faces has a two-level architecture -- user
interface components that are render-independent, and renderers that
construct a particular markup language.  HTML is only one possbile output
format, unlike Struts tags where (in JavaServer Faces terms) the rendering
markup is baked in to the UI component tags themselves.

Craig McClanahan

Hmm.. I don't see why this is cool yet. The last time I looked at JSF,
it appeared to be an attempt at re-invention of GUI concepts on the
server side. Will the sophistication of such controls eventually
approach what is available on a reasonable desktop PC today? And even
when it does, the fact that server based UI's are going to involve all
sorts of network/latency issues pre-dominate.. no?

It is clear that rich-client based approaches offer richer interaction
than web pages today, and embedding such controls in web pagesis
possible (using MSFT amongst others) today. Innovative approaches
exploiting java also currently exist (see nexaweb, thinlet etc). I saw
these latter as re-inventing X11 (since they are focussed on the
protocol that transmits bits between the server and client), and now
JSF is proposing to redo the same but at the Xt or Motif level (to use
a much-abused layer separation).

Personally speaking, I find more work at the back-end interesting but
I would like to know how it would impact the front end. The stuff we
(as programmers) have trouble with really is still in the front
end.. take a sampling of struts questions/traffic and I really wonder
what percentatge of the traffic has to do with layout, jsps, event,
security, controls (calendar/pagination etc.) .. all GUI/HTML/frontend
stuff. Will JSF make writing such front-ends easier.. and if so, how?



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



RE: DateUtilities for ActionForms?

2003-05-31 Thread Mark Galbreath
I wrote a simple conversion method and pass the Strings through - no hassle
at all. Given the String Jan 1, 2003:

Calendar date = getDate( string );

private Calendar getDate( String string ) {
  Calender cal = Calender.getInstance();
  String formatted_date = null;
  String[] months = {
Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec };
  StringTokenizer st = new StringTokenizer( string );
  String str = st.nextToken();

  for( int i; i  months.length; i++ ) {

if( str.equalsIgnoreCase( months[ i ] )) {
  month = i;
  break;
}
  }

  String temp = st.nextToken();
  StringTokenizer token = new StringTokenizer( temp, , );
  date = ( new Integer(( String ) token.nextElement() )).intValue();
  year = ( new Integer(( String ) st.nextElement() )).intValue();

  return( cal.set( year, month + 1, date ));
}


Easy, heh?  You could also use regular expressions if you are using JDK 1.4.

Mark

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 4:09 AM
To: [EMAIL PROTECTED]
Subject: DateUtilities for ActionForms?


Is there already a set of DateUtilities for ActionForms?
I am finding myself converting to and from Strings and also reformating my 
Dates to and from my DB.

I am using EntityBeans and ValueObjects with my ActionForms, so to keep the 
types in synch, it seems I have to do serious conversion all the time.
Thanks in advance for the help.

---
Thanks...
Mick Knutson
---

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



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



RE: Checkbox

2003-05-31 Thread Mark Galbreath
Right, but do not let purity stand in the way of practicality!  I simply
don't use the Struts tag when setting dynamic values:

input type=checkbox name='primKey value=bean:write name=myBean
property=val / /

which works fine.

Mark

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 8:55 AM
To: Struts Users Mailing List
Subject: RE: Checkbox


thanx.

I have to set the value of the checkbox in the JSP.
for this I write 

html:checkbox property='primKey value=val/
problem is that the value is dynamic, so I have to use something like
value=%=val% but this is scripting ...  :-( use of bean:write fails to
render the checkbox.

Do I have any other option.



-Original Message-
From: Carl Walker [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 4:42 PM
To: Struts Users Mailing List
Subject: Re: Checkbox


You should use a java.lang.String or java.lang.String[] property if you want
to have 'abc' submitted when checkbox 'chk' is checked.

If you want 'true' to be sent when 'chk' is checked, then change 'abc' to
'true'.

Take a look at this example for additional guidance

%-- FILE checkForm.jsp --%
%@ taglib prefix=html uri=/WEB-INF/struts-html.tld %

html:html
body
h1checkForm/h1
html:form action=/check.do

pDo you like soda?/p
html:checkbox property=likesSoda value=trueYes/html:checkboxbr

pIf you like soda (or were forced to drink one) what would you drink?/p

html:checkbox property=sodas value=cokeCoke/html:checkboxbr
html:checkbox property=sodas value=pepsiPepsi/html:checkboxbr
html:checkbox property=sodas value=7-up7-up/html:checkboxbr
html:submit value=Submit /

/html:form
/body
/html:html
%-- END FILE checkForm.jsp --%

%-- FILE check.jsp --%
%@ page import=java.util.* %
%@ taglib prefix=logic uri=/WEB-INF/struts-logic.tld % %@ taglib
prefix=bean uri=/WEB-INF/struts-bean.tld %

html
body
h1check/h1

bean:define id=likesSoda name=SodaForm property=likesSoda / pLikes
soda?: bean:write name=likesSoda //p

pPreferred sodas:/p
bean:define id=sodas name=SodaForm property=sodas / logic:iterate
id=soda name=sodas
  bean:write name=soda /br
/logic:iterate
/ul
/body
/html
%-- END FILE check.jsp --%

Put these in your struts-config.xml  (in the appropriate sections).
form-bean name=SodaForm
   type=org.apache.struts.action.DynaActionForm
  form-property name=likesSoda type=java.lang.Boolean
initial=false/
  form-property name=sodas type=java.lang.String[] /
/form-bean

action path=/checkForm forward=/checkForm.jsp /

action path=/check
name=SodaForm
scope=request
forward=/check.jsp /



FILE
Abhinav (Cognizant) wrote:

 This one is not getting into my head ..
 html:checkbox property=chk value=abc /
 and in the form bean
 boolean getChk(), void setChk(boolean)
 checkbox is checked and form is submitted.
 how do I retreieve the value abc

 Thanx.

   
   Name: InterScan_SafeStamp.txt
InterScan_SafeStamp.txtType: Plain Text (text/plain)
   Encoding: 7bit

Name: InterScan_Disclaimer.txt
InterScan_Disclaimer.txtType: Plain Text (text/plain)
Encoding: 7bit

   
 
 -
 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: syntax error

2003-05-31 Thread Mark Galbreath
1. if needs to be lowercase, unless you are using Visual Basic.

2. you need to wrap the whole request.get in parentheses before casting
to String.

Mark

-Original Message-
From: dream weaver [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 9:02 AM
To: [EMAIL PROTECTED]
Subject: syntax error


Hi, 

Could you tell me what the problem(error) is: 

If
(123.equals((String)request.getSession(true).getAttribute(dispsOfPO_actio
n)))
int s11 = 1;


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.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: Struts Performance - Any Benchmarks?

2003-05-31 Thread Kommana, Sridhar
 How Struts is better than Thinlets.Performance-wise which one is best?
 
 Thanks,
 Sridhar
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 28, 2003 4:59 AM
 To: Struts Users Mailing List
 Subject: Re: Struts Performance - Any Benchmarks?
 
 
 Craig R. McClanahan wrote:
 
The other evidence is that Struts gets many thousands of downloads every
single day ... and support for it is built in (or easily plugged in) to a
wide variety of popular application development tools ... SOMEBODY must
think it makes a pretty reasonable platform for building web applications.
:-)
 
 
 In other words, You don't get fired for choosing S-T-R-U-T-S.
 
 :
 
 -T.
 
 
 

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



RE: mail list attachment problem

2003-05-31 Thread Mark Galbreath
I'm attached.  Or is that touched

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 9:12 AM
To: Struts Users Mailing List
Subject: Re: mail list attachment problem




Erik Price wrote:

 All attachments are banned.


I thought.  But I was wrong.





Erik


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



[FRIDAY] RE: struts validator

2003-05-31 Thread Mark Galbreath
http://www.amazon.com/exec/obidos/ASIN/1568303416/inktomi-bkasin-20/002-6063
222-1216028

http://pandonia.canberra.edu.au/java/auugjava/paper.html

http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-polymorph.html

http://www.javaworld.com/javaworld/jw-03-2001/jw-0316-jdk.html

etc, etc

-Original Message-
From: Paul Curren [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 8:51 AM
To: Struts Users Mailing List
Subject: Re: struts validator


Where can I download magic from? I need some for a project, quickly!!!

Paul C

Mark Galbreath wrote:

That's because the Validator works by magic and you obviously have a 
hex in your machine.

(sometimes I kill myself)
Mark

-Original Message-
From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 2:49 AM
To: [EMAIL PROTECTED]
Subject: struts validator


struts validator (client side validation) example is not working in my 
pc,
even the struts example. but it is working with the other pcs in our
office.

i noticed that when i view the page source there is no javascript 
generated
unlike in the other pc. is there still i have to configure or what? im
using

struts rc1.1 and j2sdk 1.4.1_02 and tomcat 4.1.24 as the web server and
sometimes JBOSS 3.0.6
  



-
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: Weblogic 6.1 Compatibility Problems

2003-05-31 Thread Mark Galbreath
Have you installed Service Pack 3?  It fixes weirdness that was screwing up
my 1.0.1 app last summer.

Mark

-Original Message-
From: Yves Sy [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 2:54 AM
To: [EMAIL PROTECTED]
Subject: Weblogic 6.1 Compatibility Problems


Hi! I am currently involved in a project that uses Struts 1.1 (RC1) on
Weblogic 6.1. We noticed that there seems to be a problem with Struts'
bean:write tag when the property in the bean that we want to display is
NOT of type String.  The String properties display fine but properties of
other types such as int produce a Cannot find key
org.apache.struts.action.ACTION_MESSAGE error message or something similar
to that. We were able to confirm that our bean does indeed contain the int
value we want to display because it worked just fine when we used a
scriptlet to display it.

To elaborate:
bean:write name=myBean property=myProperty.name/ works fine
because name is a String... but...
bean:write name=myBean property=myProperty.id/ does not work since
id is of type int.

Anyone aware of this problem with Weblogic 6.1?


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



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



Re: Weblogic 6.1 Compatibility Problems

2003-05-31 Thread Melissa L Kelley
On Fri, 30 May 2003, Yves Sy wrote:

Pardon me for not looking at the source to confirm this, but my guess on
what your problem is that the bean tag will try to convert your bean
property to a String before rendering it. Try making your property an
Integer instead of an int and see if it renders correctly.

--Melissa

 Hi! I am currently involved in a project that uses Struts 1.1 (RC1) on
 Weblogic 6.1. We noticed that there seems to be a problem with Struts'
 bean:write tag when the property in the bean that we want to display is
 NOT of type String.  The String properties display fine but properties of
 other types such as int produce a Cannot find key
 org.apache.struts.action.ACTION_MESSAGE error message or something similar
 to that. We were able to confirm that our bean does indeed contain the int
 value we want to display because it worked just fine when we used a
 scriptlet to display it.

 To elaborate:
 bean:write name=myBean property=myProperty.name/ works fine
 because name is a String... but...
 bean:write name=myBean property=myProperty.id/ does not work since
 id is of type int.

 Anyone aware of this problem with Weblogic 6.1?



--
Melissa L Kelley
[EMAIL PROTECTED]
www.stuology.net
--


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



Re: Why do ActionForms allow non-string properties?

2003-05-31 Thread Vic Cekvenich
 we'd be down to a single XML to define the form, the input properties, 
and their validators. 
+1
.V

Ted Husted wrote:

Steve Raeburn wrote:
 *BUT* there should be a bloody big health warning on the ActionForm
 documentation that says only ever use Strings!
Whether or not to only use Strings only matters if you care about 
capturing non-string input in a non-string field. Craig always felt 
that this use-case is very important, and many people agree.

In practice, though, sometimes it doesn't matter. If they put AZ1234 
in a field, the BeanUtils can quietly convert that to either null or 
zero. If the field is required, then they can be required to put in a 
valid, non-zero entry into it. For some clients, this is acceptable. 
As a consequence, if you have perfectly good business interface that 
you can otherwise apply to a ActionForm -- there you go, one less 
JavaBean protocol to maintain (at client's expense).

Many people never even realize that there is any type of restriction 
here. A lot of application only use Strings to begin with. Or, the 
numbers are input through controls that put the numbers in for people. 
Or, the application requires clients to use JavaScript and a runtime 
Javascript keeps the focus on the field until they enter a valid number.

I'm using some non-string ActionForm properties in my current 
application, and it's working just fine. We have exactly two fields 
that need actual numbers, and they are even required fields. For extra 
credit, I may try and snag invalid input and see if I can pump it into 
a validation message (AZ1234 is not a valid number). (Which, IMHO, is 
more appropriate than repopulating a field with invalid input.)

In the occasional case where I need to accept string Input for a 
complex field, like a Date, I have a binary field declared on the 
business interface, and the use helpers on the ActionForm to convert 
the field back and forth.

But, with DynaBeans, this is becoming less and less of an issue, since 
it is very easy to just use DynaBeans as the missing HTTP data entry 
buffer and then pass the validated input off to a business bean.

Though, there is still a ton maintenance going on here. We have the 
properties defined in the HTML form, and the struts-config, and in the 
validator.xml, and then in some type of corresponding property in the 
business bean, not to mention the actual data store. So to add a 
field, we have to update five (or more) components.

The next step might be to try and combine the validator and DynaBeans 
definitions somehow, so that they can be maintained together. For many 
people, all the ActionForms do is validate input, which begs a single 
component.

Heck, I could even imagine a tag that could generate many forms for 
you. If we were already defining the field, the validation, and the 
message, why not toss the control into the soup. The tag could look up 
the form definition and render the fields in order, using the 
specified control type.

This wouldn't work for every case, but it might work for a great 
number of forms. So, then we'd be down to a single XML to define the 
form, the input properties, and their validators.

So, then if you were using Hibernate, for example, you could end up 
maintaining two XMLs (one for Struts and one for Hibernate), along 
with the business entities (that are the point of the excersice). With 
Dynamic Forms, most of the HTML pages would be self-maintaining =:0)

-Ted.

Steve Raeburn wrote:

OK, I definitely get the fact that you might need helper methods in 
addition
to your html input properties. I guess I've just gotten into the 
habit of
making ActionForms as simple as possible (actually I prefer 
DynaActionForms)
and doing any conversions or manipulation in the Action.

Given your example, I would use a DynaAction form to define the 
String input
properties and have a completely seperate EmployeeDTO bean which I would
populate in the Action. By having helper methods on the ActionForm 
you run
the risk of infecting it with business logic.

I haven't encountered a situation where it hasn't been possible to 
keep the
ActionForm extremely simple. But I accept there might be situations that
would warrant it.

*BUT* there should be a bloody big health warning on the ActionForm
documentation that says only ever use Strings!
Steve


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: May 29, 2003 11:55 PM
To: Struts Users Mailing List
Subject: RE: Why do ActionForms allow non-string properties?
Well firstly for dealing with nested forms, collections of nested
forms and
the like.
One also needs to remember that the ActionForm is an object that
represents
the state of the UI - and depending on what you are doing you may 
wish to
use it for storing information relating to ui state that doesnt
map directly
to a form control value, but is used in rendering the view. (ie: things
relating to complex 'widgets' you render)

You might also have properties that are 

Re: syntax error

2003-05-31 Thread Denis Avdic
Mark Galbreath wrote:

2. you need to wrap the whole request.get in parentheses before casting
to String.
Mark
 

Really?

Man, I was wondering why sometimes my casts failed... I ended up doing 
stuff like first storing the object needed to be cast as an Object, and 
then casting that Object.

Things you learn every day



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


RE: Why do ActionForms allow non-string properties?

2003-05-31 Thread Mark Galbreath
As one of the original whiners concerning the proliferation of config files,
you know I'm on board!

+2

~m

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 10:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Why do ActionForms allow non-string properties?


 we'd be down to a single XML to define the form, the input properties, 
and their validators. 
+1
.V


Ted Husted wrote:

 Steve Raeburn wrote:
  *BUT* there should be a bloody big health warning on the ActionForm 
  documentation that says only ever use Strings!

 Whether or not to only use Strings only matters if you care about
 capturing non-string input in a non-string field. Craig always felt 
 that this use-case is very important, and many people agree.

 In practice, though, sometimes it doesn't matter. If they put AZ1234
 in a field, the BeanUtils can quietly convert that to either null or 
 zero. If the field is required, then they can be required to put in a 
 valid, non-zero entry into it. For some clients, this is acceptable. 
 As a consequence, if you have perfectly good business interface that 
 you can otherwise apply to a ActionForm -- there you go, one less 
 JavaBean protocol to maintain (at client's expense).

 Many people never even realize that there is any type of restriction
 here. A lot of application only use Strings to begin with. Or, the 
 numbers are input through controls that put the numbers in for people. 
 Or, the application requires clients to use JavaScript and a runtime 
 Javascript keeps the focus on the field until they enter a valid number.

 I'm using some non-string ActionForm properties in my current
 application, and it's working just fine. We have exactly two fields 
 that need actual numbers, and they are even required fields. For extra 
 credit, I may try and snag invalid input and see if I can pump it into 
 a validation message (AZ1234 is not a valid number). (Which, IMHO, is 
 more appropriate than repopulating a field with invalid input.)

 In the occasional case where I need to accept string Input for a
 complex field, like a Date, I have a binary field declared on the 
 business interface, and the use helpers on the ActionForm to convert 
 the field back and forth.

 But, with DynaBeans, this is becoming less and less of an issue, since
 it is very easy to just use DynaBeans as the missing HTTP data entry 
 buffer and then pass the validated input off to a business bean.

 Though, there is still a ton maintenance going on here. We have the
 properties defined in the HTML form, and the struts-config, and in the 
 validator.xml, and then in some type of corresponding property in the 
 business bean, not to mention the actual data store. So to add a 
 field, we have to update five (or more) components.

 The next step might be to try and combine the validator and DynaBeans
 definitions somehow, so that they can be maintained together. For many 
 people, all the ActionForms do is validate input, which begs a single 
 component.

 Heck, I could even imagine a tag that could generate many forms for
 you. If we were already defining the field, the validation, and the 
 message, why not toss the control into the soup. The tag could look up 
 the form definition and render the fields in order, using the 
 specified control type.

 This wouldn't work for every case, but it might work for a great
 number of forms. So, then we'd be down to a single XML to define the 
 form, the input properties, and their validators.

 So, then if you were using Hibernate, for example, you could end up
 maintaining two XMLs (one for Struts and one for Hibernate), along 
 with the business entities (that are the point of the excersice). With 
 Dynamic Forms, most of the HTML pages would be self-maintaining =:0)

 -Ted.


 Steve Raeburn wrote:

 OK, I definitely get the fact that you might need helper methods in
 addition
 to your html input properties. I guess I've just gotten into the 
 habit of
 making ActionForms as simple as possible (actually I prefer 
 DynaActionForms)
 and doing any conversions or manipulation in the Action.

 Given your example, I would use a DynaAction form to define the
 String input
 properties and have a completely seperate EmployeeDTO bean which I would
 populate in the Action. By having helper methods on the ActionForm 
 you run
 the risk of infecting it with business logic.

 I haven't encountered a situation where it hasn't been possible to
 keep the
 ActionForm extremely simple. But I accept there might be situations that
 would warrant it.

 *BUT* there should be a bloody big health warning on the ActionForm 
 documentation that says only ever use Strings!

 Steve


 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]
 Sent: May 29, 2003 11:55 PM
 To: Struts Users Mailing List
 Subject: RE: Why do ActionForms allow non-string properties?


 Well firstly for dealing with nested forms, collections of nested 
 forms and the like.

 

RE: syntax error

2003-05-31 Thread Mark Galbreath
Hey man, happens to me all the time.  :-)

-Original Message-
From: Denis Avdic [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 10:20 AM
To: Struts Users Mailing List
Subject: Re: syntax error


Mark Galbreath wrote:

2. you need to wrap the whole request.get in parentheses before 
casting to String.

Mark
  

Really?

Man, I was wondering why sometimes my casts failed... I ended up doing 
stuff like first storing the object needed to be cast as an Object, and 
then casting that Object.

Things you learn every day




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



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



Re: [Struts Workflow] Who is using it?

2003-05-31 Thread Matthias Bauer
I know of about 30 people having me contacted directly for questions 
since May 15, when version 1.0.0 of the extension came out. All of them 
seemed to be very much willing to use the extension in their projects.

Before Version 1.0.0 there were about 400 downloads per month for about 
half a year (did not track it back further). Since Version 1.0.0 came 
out, the hits and downloads have roughly doubled.

And certainly me and my collegues use the extension in our projects... ;-)

--- Matthias

[EMAIL PROTECTED] wrote:

I have found Matthias Bauer's struts workflow extension and it looks like it
is right what I was looking for. I would like to know, who is actively using
it and whether you found it useful. Anybody willing to share his experience?
Thanks, Pete

 



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


RE: Why do ActionForms allow non-string properties?

2003-05-31 Thread Raible, Matt

 Though, there is still a ton maintenance going on here. We have the 
 properties defined in the HTML form, and the struts-config, and in the 
 validator.xml, and then in some type of corresponding property in the 
 business bean, not to mention the actual data store. So to add a 
 field, we have to update five (or more) components.


In my XDoclet-enabled apps, if I had a new property, I only have to add it
in two places - in my POJO and in my JSP.  validation.xml is generated, as
well as the ActionForm.  Using Erik Hatcher's StrutsGen Tool, you can also
generate a skeleton JSP from the generated ActionForm - but this is only
logical to do the first time.  I don't know if it'll ever be possible to
eliminate the editing of the JSP - unless we add an XML file or something in
the ActionForm that specifies field order, field type, etc.  Still, there's
so much custom stuff (label taglib, javascript pop-up calendars) that I put
into forms, I doubt this will ever be possible.

IMO, XDoclet is the best thing that's happened to Java Development since
Ant.

Matt




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



OT FRIDAY : slacking?

2003-05-31 Thread Vic Cekvenich
http://joecartoon.com/pages/newstuff/

OK, I will  start with Osman : if you don't cut out this non sense



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


RE: syntax error

2003-05-31 Thread dream weaver
Thanks Mark,

I changed as following, but I still get error message:
Syntax error on token s11, ., [ expected

String s4 =
(String)(request.getSession(true).getAttribute(dispsOfPO_action));

  if (123.equals(s4))
int s11 = 1;





--- Mark Galbreath [EMAIL PROTECTED] wrote:
 1. if needs to be lowercase, unless you are using
 Visual Basic.
 
 2. you need to wrap the whole request.get in
 parentheses before casting
 to String.
 
 Mark
 
 -Original Message-
 From: dream weaver
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 30, 2003 9:02 AM
 To: [EMAIL PROTECTED]
 Subject: syntax error
 
 
 Hi, 
 
 Could you tell me what the problem(error) is: 
 
 If

(123.equals((String)request.getSession(true).getAttribute(dispsOfPO_actio
 n)))
   int s11 = 1;
 
 
 __
 Do you Yahoo!?
 Yahoo! Calendar - Free online calendar with sync to
 Outlook(TM).
 http://calendar.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!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: syntax error

2003-05-31 Thread Kris Schneider
String s4 = (String)request.getSession(true).getAttribute(dispsOfPO_action);
if (123.equals(s4)) {
  int s11 = 1;
  ...
}

Quoting dream weaver [EMAIL PROTECTED]:

 Thanks Mark,
 
 I changed as following, but I still get error message:
 Syntax error on token s11, ., [ expected
 
 String s4 =
 (String)(request.getSession(true).getAttribute(dispsOfPO_action));
 
 if (123.equals(s4))
   int s11 = 1;
 
 
 
 
 
 --- Mark Galbreath [EMAIL PROTECTED] wrote:
  1. if needs to be lowercase, unless you are using
  Visual Basic.
  
  2. you need to wrap the whole request.get in
  parentheses before casting
  to String.
  
  Mark
  
  -Original Message-
  From: dream weaver
  [mailto:[EMAIL PROTECTED] 
  Sent: Friday, May 30, 2003 9:02 AM
  To: [EMAIL PROTECTED]
  Subject: syntax error
  
  
  Hi, 
  
  Could you tell me what the problem(error) is: 
  
  If
 
 (123.equals((String)request.getSession(true).getAttribute(dispsOfPO_actio
  n)))
  int s11 = 1;
  
  
  __
  Do you Yahoo!?
  Yahoo! Calendar - Free online calendar with sync to
  Outlook(TM).
  http://calendar.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!?
 Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
 http://calendar.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



request attribute null, WHY!?

2003-05-31 Thread Mike Whittaker

What possible reason could there be for a request parameter that is set in
the Action, then forwarded via mapping.getInputForward() to a jsp, to be
null in that jsp?
forward element is set to redirect=false.  A session attribute is
retrieved okay.

Thankyou.
--
Mike W


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



Bean and Scripting

2003-05-31 Thread Abhinav (Cognizant)
Can I use a bean or anythying  that is defined/declared in a struts tag
for scripting.

say this kind of thing 
bean:define id=id name=x property=y/
and then 
% String tmp = id; %


** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

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

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

RE: request attribute null, WHY!?

2003-05-31 Thread Mike Whittaker

What possible reason could there be for a request parameter that is set in
the Action, then forwarded via mapping.getInputForward() to a jsp, to be
null in that jsp?
forward element is set to redirect=false.  A session attribute is
retrieved okay.

Okay it works now...

BUT if I subclass RequestProcessor and set the request attribute in the
process method after I've called super.process, it is null in the forwarded
jsp. ???

Any clues?

--
Mike W


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



RE: Bean and Scripting

2003-05-31 Thread Gandle, Panchasheel
yes you can ...


Panchasheel


-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 10:51 AM
To: Struts Users Mailing List
Subject: Bean and Scripting


Can I use a bean or anythying  that is defined/declared in a struts tag
for scripting.

say this kind of thing 
bean:define id=id name=x property=y/
and then 
% String tmp = id; %



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



Nesting logic tags

2003-05-31 Thread Kamholz, Keith (corp-staff) USX
Hey,
I'm using a table to display a form, but there's one row that I want to
hide, depending on a previous user selection.
Right now, my code is:

table
tr
td
b
bean:message key=app.label.numberType/: 
/b
/td
td
html:hidden name=ansm property=numberType
write=true/
/td
/tr

logic:equal value=subformat name=ansm property=entryType
tr
td
b
bean:message
key=app.label.subType/: 
/b
/td
td
html:hidden name=ansm property=subType
write=true/
/td
/tr
/logic:equal

tr
td
b
bean:message key=app.label.typeDesc/: 
/b
/td
td
html:text name=ansm property=typeDesc size=50
maxlength=50/
/td
/tr

logic:notEqual value=group name=ansm property=entryType
tr
td
b
bean:message
key=app.label.typeFormat/: 
/b
/td
td
html:text name=ansm property=typeFormat
size=60 maxlength=60/
/td
/tr
tr
td
b
bean:message
key=app.label.tabulatedFormat/: 
/b
/td
td
html:text name=ansm
property=tabulatedFormat size=60 maxlength=60/
/td
tr
td
b
bean:message
key=app.label.lastUsed/: 
/b
/td
td
html:text name=ansm property=lastUsed
size=30 maxlength=30/
/td
/tr
/logic:notEqual

/table

Unfortunately, it doesn't like me nesting the logic tags in the table code.
I've never used the struts nested taglib, would this be an appropriate place
to use it?  If not, does anyone know of a workaround I could use?

Thanks in advance.


~ Keith

http://www.buffalo.edu/~kkamholz



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



Find global forwards in individual module

2003-05-31 Thread Zaili_Xu
Hi, guys

We are using multi modules in Struts. We find a prolem in finding the global forward 
specified in the default config. For example, our UserProfileThanksAction is configed 
in profile module and home is the name of a global forward specified in the default 
config, when we say 

return mapping.findForward(home);

in UserProfileThanksAction the mapping is not able to find home.

We are not using the switch action. Instead we are specifying modul prefix in config 
file. For example, 

What is the appropriate way to find global forwards in individual module ?

Thanks in advance for your response.

Zaili Xu

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



Re: Why do ActionForms allow non-string properties?

2003-05-31 Thread Ted Husted
We look forward to your patches =:0)

Get them in this morning, and I should be able to apply them tonight.

Andrew Hill wrote:
Well, I think it a bit restrictive to forbid non-string properties, but I
would say that the docs really ought to make it clear that the recommended
type for all those properties that directly relate to html controls should
be strings.

With that said, why does Struts even allow ActionForm properties to be
anything other than String or boolean? As this seems to cause a lot of
confusion would it not make sense to prevent other types? Or at least give
stronger, more visible guidance about how to define ActionForm properties?


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


RE: Nesting logic tags

2003-05-31 Thread Phillip Qin
If ansm is a member variable of your ActionForm, use

html:hidden property=ansm.entryType

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 10:53 AM
To: '[EMAIL PROTECTED]'
Subject: Nesting logic tags

Hey,
I'm using a table to display a form, but there's one row that I want to
hide, depending on a previous user selection.
Right now, my code is:

table
tr
td
b
bean:message key=app.label.numberType/: 
/b
/td
td
html:hidden name=ansm property=numberType
write=true/
/td
/tr

logic:equal value=subformat name=ansm property=entryType
tr
td
b
bean:message
key=app.label.subType/: 
/b
/td
td
html:hidden name=ansm property=subType
write=true/
/td
/tr
/logic:equal

tr
td
b
bean:message key=app.label.typeDesc/: 
/b
/td
td
html:text name=ansm property=typeDesc size=50
maxlength=50/
/td
/tr

logic:notEqual value=group name=ansm property=entryType
tr
td
b
bean:message
key=app.label.typeFormat/: 
/b
/td
td
html:text name=ansm property=typeFormat
size=60 maxlength=60/
/td
/tr
tr
td
b
bean:message
key=app.label.tabulatedFormat/: 
/b
/td
td
html:text name=ansm
property=tabulatedFormat size=60 maxlength=60/
/td
tr
td
b
bean:message
key=app.label.lastUsed/: 
/b
/td
td
html:text name=ansm property=lastUsed
size=30 maxlength=30/
/td
/tr
/logic:notEqual

/table

Unfortunately, it doesn't like me nesting the logic tags in the table code.
I've never used the struts nested taglib, would this be an appropriate place
to use it?  If not, does anyone know of a workaround I could use?

Thanks in advance.


~ Keith

http://www.buffalo.edu/~kkamholz



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


Re: Form validation over multiple pages - Solution Found - Weird

2003-05-31 Thread Brian McSweeney
Could anyone tell me if I am right in what I think the problem is here?

I use a web-filter for ssl. I use form-beans that have session scope
in a wizard, one of whose steps requires ssl.

However when the ssl step gets intercepted by the web filter,
the form-bean that should be in session scope seems to be
cleared/re-created.

Any ideas as to why?

Brian

- Original Message -
From: Brian McSweeney [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:04 AM
Subject: Re: Form validation over multiple pages - Solution Found - Weird


 Thanks for the help on this guys. It was good to know people had
 it working.

 I've got it to work now. The reason it wasn't working was that for
 all secure pages I use a ssl filter which takes any request mapped like
 /secure and sends it over ssl.

 For example, if I want to send the
 info for the first jsp I send it to:

 html:form action=/secure/validateStep1.jspa

 the weird thing is - the form object isn't staying in session scope if I
use
 the ssl filter and so the second page's validation was failing because the
 object wasn't in session scope anymore. However, once I removed the
 secure it works fine.

 Reading other threads, I think this might be to do with a redirect ( if
the
 filter is doing a re-direct, then a new http request might be getting
 created
 and thus a new form object gets created )

 Anyway, thanks for all the help, and if anyone knows how I could continue
 using the filter and keep the form object in session scope I'd really
 appreciate
 any ideas!

 Brian


 - Original Message -
 From: Paul Curren [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, May 29, 2003 6:00 PM
 Subject: Re: Form validation over multiple pages


  Hi there,
  I've been doing this exact thing the last couple of days and I have it
  working.
  My html:hidden tags looks like -
 
  html:hidden property=page value=1/
  i.e. only difference is I don't explicitly specify the form name.
 
  My form is a DynaValidatorForm and a bug which i've seen from rc1 right
  up to the May 26 nightly so far means that I need to explicity define
  the page property on the form e.g.
 
  form-property name=page type=java.lang.Integer /
 
  Hope this helps,
 
  Paul C
 
 
  Brian McSweeney wrote:
 
  With a little further investigation I see that the page value does not
  get set in the validationForm using html:hidden approach as outlined
  below. Ie, this doen't work:
  
  html:hidden name=validateForm property=page value=1 /
  
  When I print out the value of the page field in the action, it is still
 set
  to zero.
  
  How do you set the page property?
  
  Also, this seems to imply the validator is VERY shaky over multiple
  pages. For example, the properties on my second page are marked
  as required, and they don't get validated in the first action (this
seems
  to show that the page based validation is working), yet on the second
  page, the associated action tries to validate the page 1 properties!!!
  
  Arrrg!! What's going on! Has anyone got this to work?
  
  Brian
  
  
  - Original Message -
  From: Brian McSweeney [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Thursday, May 29, 2003 2:42 PM
  Subject: Form validation over multiple pages
  
  
  Hi all,
  
  I'm almost there with using the validator over several pages with a
 single
  form.
  However I'm getting a strange little error. The first page is
validating
  fine, and it
  doesn't seem to try to validate the info required on the second page -
  correct.
  However once I try to validate the second page, the javascript
validates
  correctly,
  but the server side validation returns an error saying the first page's
  required field
  needs validating.
  
  I think it might be because I'm not sure how to pass the page parameter
 to
  the action.
  I've tried using a html:hidden tag. Anyway, snippets from the jsps,
 struts
  config and
  validation.xml file are included below.
  
  If someone could help me out I'd be very grateful. Thanks very much,
  Brian.
  
  
  
  
  My first jsp named validatestep1.jsp looks like:
  
  html:javascript formName=validateForm page=1/
  
  html:form action=/secure/validateStep1.jspa onsubmit=return
  validateValidateForm(this); method=post
  html:hidden name=validateForm property=page value=1 /
  table
   trtdusername/td
tdhtml:text name=validateForm property=userName //td
   /tr
   tr
td colspan=2 align=center
 html:image border=0 page=/images/button_submit.gif/
/td
/tr
  /table
  /html:form
  
  My second jsp named validatestep2.jsp looks like
  
  html:javascript formName=validateForm page=2/
  html:form action=/secure/validateStep2.jspa onsubmit=return
  validateValidateForm(this); method=post
  html:hidden name=validateForm property=page value=2 /
  table
   tr
tdcredit card with no spaces or dashes/td
tdhtml:text 

RE: Nesting logic tags

2003-05-31 Thread Kamholz, Keith (corp-staff) USX
The issue isn't getting entryType into the form.  The issue is conditionally
displaying a couple rows in the table/form.  I already have the entryType in
a hidden input earlier in the form.
Input anybody?
I'd really appreciate it.

~ Keith

http://www.buffalo.edu/~kkamholz



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:09 AM
To: 'Struts Users Mailing List'
Subject: RE: Nesting logic tags


If ansm is a member variable of your ActionForm, use

html:hidden property=ansm.entryType

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 10:53 AM
To: '[EMAIL PROTECTED]'
Subject: Nesting logic tags

Hey,
I'm using a table to display a form, but there's one row that I want to
hide, depending on a previous user selection.
Right now, my code is:

table
tr
td
b
bean:message key=app.label.numberType/: 
/b
/td
td
html:hidden name=ansm property=numberType
write=true/
/td
/tr

logic:equal value=subformat name=ansm property=entryType
tr
td
b
bean:message
key=app.label.subType/: 
/b
/td
td
html:hidden name=ansm property=subType
write=true/
/td
/tr
/logic:equal

tr
td
b
bean:message key=app.label.typeDesc/: 
/b
/td
td
html:text name=ansm property=typeDesc size=50
maxlength=50/
/td
/tr

logic:notEqual value=group name=ansm property=entryType
tr
td
b
bean:message
key=app.label.typeFormat/: 
/b
/td
td
html:text name=ansm property=typeFormat
size=60 maxlength=60/
/td
/tr
tr
td
b
bean:message
key=app.label.tabulatedFormat/: 
/b
/td
td
html:text name=ansm
property=tabulatedFormat size=60 maxlength=60/
/td
tr
td
b
bean:message
key=app.label.lastUsed/: 
/b
/td
td
html:text name=ansm property=lastUsed
size=30 maxlength=30/
/td
/tr
/logic:notEqual

/table

Unfortunately, it doesn't like me nesting the logic tags in the table code.
I've never used the struts nested taglib, would this be an appropriate place
to use it?  If not, does anyone know of a workaround I could use?

Thanks in advance.


~ Keith

http://www.buffalo.edu/~kkamholz



-
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: Nesting logic tags

2003-05-31 Thread Phillip Qin
OK. Assume you use nested, your form is called ansm.

nested:form ..

table
tr
tdbbean:message key=app.label.numberType/: /b/td
tdnetsed:hidden property=numberType write=true//td
/tr

nested:equal value=subformat property=entryType
tr
tdbbean:message key=app.label.subType/:
/b/td
tdnested:hidden property=subType write=true/
/td
/tr
/nested:equal


/table
/nested:form

Correct me if I still didn't understand your question.

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:14 AM
To: 'Struts Users Mailing List'
Subject: RE: Nesting logic tags

The issue isn't getting entryType into the form.  The issue is conditionally
displaying a couple rows in the table/form.  I already have the entryType in
a hidden input earlier in the form.
Input anybody?
I'd really appreciate it.

~ Keith

http://www.buffalo.edu/~kkamholz



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:09 AM
To: 'Struts Users Mailing List'
Subject: RE: Nesting logic tags


If ansm is a member variable of your ActionForm, use

html:hidden property=ansm.entryType

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 10:53 AM
To: '[EMAIL PROTECTED]'
Subject: Nesting logic tags

Hey,
I'm using a table to display a form, but there's one row that I want to
hide, depending on a previous user selection.
Right now, my code is:

table
tr
td
b
bean:message key=app.label.numberType/: 
/b
/td
td
html:hidden name=ansm property=numberType
write=true/
/td
/tr

logic:equal value=subformat name=ansm property=entryType
tr
td
b
bean:message
key=app.label.subType/: 
/b
/td
td
html:hidden name=ansm property=subType
write=true/
/td
/tr
/logic:equal

tr
td
b
bean:message key=app.label.typeDesc/: 
/b
/td
td
html:text name=ansm property=typeDesc size=50
maxlength=50/
/td
/tr

logic:notEqual value=group name=ansm property=entryType
tr
td
b
bean:message
key=app.label.typeFormat/: 
/b
/td
td
html:text name=ansm property=typeFormat
size=60 maxlength=60/
/td
/tr
tr
td
b
bean:message
key=app.label.tabulatedFormat/: 
/b
/td
td
html:text name=ansm
property=tabulatedFormat size=60 maxlength=60/
/td
tr
td
b
bean:message
key=app.label.lastUsed/: 
/b
/td
td
html:text name=ansm property=lastUsed
size=30 maxlength=30/
/td
/tr
/logic:notEqual

/table

Unfortunately, it doesn't like me nesting the logic tags in the table code.
I've never used the struts nested taglib, would this be an appropriate place
to use it?  If not, does anyone know of a workaround I could use?

Thanks in advance.


~ Keith

http://www.buffalo.edu/~kkamholz



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


Login

2003-05-31 Thread Jonathan Holloway
Could somebody tell me what the best way to implement a login mechanism is into a 
Struts application.  

Is the use of a custom login tag at the top of every page recommended or is there a 
better way.  We already have the server side functionality present but want to know 
the best way to enforce this in the JSP's and Action classes.

Many thanks,
Jonathan Holloway.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

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



RE: Login

2003-05-31 Thread Phillip Qin
I prefer servlet filter. If not logged in, redirect user to the login page.

-Original Message-
From: Jonathan Holloway [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:30 AM
To: [EMAIL PROTECTED]
Subject: Login 

Could somebody tell me what the best way to implement a login mechanism is
into a Struts application.  

Is the use of a custom login tag at the top of every page recommended or is
there a better way.  We already have the server side functionality present
but want to know the best way to enforce this in the JSP's and Action
classes.

Many thanks,
Jonathan Holloway.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

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


Re: Login

2003-05-31 Thread Ian Hunter
Does anyone have example code for that handy?

- Original Message -
From: Phillip Qin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:36 AM
Subject: RE: Login


 I prefer servlet filter. If not logged in, redirect user to the login
page.

 -Original Message-
 From: Jonathan Holloway [mailto:[EMAIL PROTECTED]
 Sent: May 30, 2003 11:30 AM
 To: [EMAIL PROTECTED]
 Subject: Login

 Could somebody tell me what the best way to implement a login mechanism is
 into a Struts application.

 Is the use of a custom login tag at the top of every page recommended or
is
 there a better way.  We already have the server side functionality present
 but want to know the best way to enforce this in the JSP's and Action
 classes.

 Many thanks,
 Jonathan Holloway.


 Need a new email address that people can remember
 Check out the new EudoraMail at
 http://www.eudoramail.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: Login

2003-05-31 Thread Paul Curren
Would a subclassed RequestProcessor be a Struts level alternative to 
Servlet Filters?

(I have no clue, i'm just wondering)

Cheers,

Paul C

Phillip Qin wrote:

I prefer servlet filter. If not logged in, redirect user to the login page.

-Original Message-
From: Jonathan Holloway [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:30 AM
To: [EMAIL PROTECTED]
Subject: Login 

Could somebody tell me what the best way to implement a login mechanism is
into a Struts application.  

Is the use of a custom login tag at the top of every page recommended or is
there a better way.  We already have the server side functionality present
but want to know the best way to enforce this in the JSP's and Action
classes.
Many thanks,
Jonathan Holloway.
Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.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: Login

2003-05-31 Thread Paananen, Tero
 Does anyone have example code for that handy?

They sure as hell should, considering this topic's
covered on the list at about every week.

The mailing list archive is your friend...

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



[OT] Login

2003-05-31 Thread Phillip Qin
Be nice, TGIF.

-Original Message-
From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Login 

 Does anyone have example code for that handy?

They sure as hell should, considering this topic's
covered on the list at about every week.

The mailing list archive is your friend...

-TPP

-
This email may contain confidential and privileged material for the sole use
of the intended recipient(s). Any review, use, retention, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


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


RE: Login

2003-05-31 Thread Chen, Gin
Yes. For Tiles subclass the TilesRequestProcessor

-Original Message-
From: Paul Curren [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:41 AM
To: Struts Users Mailing List
Subject: Re: Login


Would a subclassed RequestProcessor be a Struts level alternative to 
Servlet Filters?

(I have no clue, i'm just wondering)

Cheers,

Paul C


Phillip Qin wrote:

I prefer servlet filter. If not logged in, redirect user to the login page.

-Original Message-
From: Jonathan Holloway [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:30 AM
To: [EMAIL PROTECTED]
Subject: Login 

Could somebody tell me what the best way to implement a login mechanism is
into a Struts application.  

Is the use of a custom login tag at the top of every page recommended or is
there a better way.  We already have the server side functionality present
but want to know the best way to enforce this in the JSP's and Action
classes.

Many thanks,
Jonathan Holloway.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.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: [OT] Login

2003-05-31 Thread Chen, Gin
Maybe he just found out he has to work this weekend.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:49 AM
To: 'Struts Users Mailing List'
Subject: [OT] Login 


Be nice, TGIF.

-Original Message-
From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Login 

 Does anyone have example code for that handy?

They sure as hell should, considering this topic's
covered on the list at about every week.

The mailing list archive is your friend...

-TPP

-
This email may contain confidential and privileged material for the sole use
of the intended recipient(s). Any review, use, retention, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


-
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: [OT] Login

2003-05-31 Thread Gandle, Panchasheel
For servlet filter though


login filter


import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;

public class LoginFilter implements Filter {

  private FilterConfig filterConfig;

  public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain) throws ServletException, IOException {
Login login = (Login)request.getSession().getAttribute(login);
if (login==null){
 
((HttpServletResponse)response).sendRedirect(/notAuthorized.jsp);
  return;
filterChain.doFilter(request, response);
  }
  public FilterConfig getFilterConfig() {
return filterConfig;
  }
  public void setFilterConfig(final FilterConfig filterConfig) {
  this.filterConfig=filterConfig;
  }

}

should have entry in web.xml for filter
  filter
filter-nameLoginFilter/filter-name
filter-classpackagename.GenericFilter/filter-class
  /filter
  filter-mapping
filter-nameLoginFilter/filter-name
url-pattern*.jsp/url-pattern
  /filter-mapping

Panchasheel


-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:50 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Login 


Maybe he just found out he has to work this weekend.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:49 AM
To: 'Struts Users Mailing List'
Subject: [OT] Login 


Be nice, TGIF.

-Original Message-
From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2003 11:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Login 

 Does anyone have example code for that handy?

They sure as hell should, considering this topic's
covered on the list at about every week.

The mailing list archive is your friend...

-TPP

-
This email may contain confidential and privileged material for the sole use
of the intended recipient(s). Any review, use, retention, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


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

2003-05-31 Thread Raible, Matt
I prefer form-based authentication - for an advanced example, see
http://static.raibledesigns.com/downloads - download security-example.
Documentation will be coming on this project soon in Professional JSP 2.0 by
Apress (formerly was going to be by Wrox).

HTH,

Matt

-Original Message-
From: Jonathan Holloway [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: Login 


Could somebody tell me what the best way to implement a login mechanism is
into a Struts application.  

Is the use of a custom login tag at the top of every page recommended or is
there a better way.  We already have the server side functionality present
but want to know the best way to enforce this in the JSP's and Action
classes.

Many thanks,
Jonathan Holloway.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.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: Why do ActionForms allow non-string properties?

2003-05-31 Thread Lynn Guy
Still, 
there's
so much custom stuff (label taglib, javascript pop-up
calendars) that I 
put
into forms, I doubt this will ever be possible.

It's called a code generator and its already been done
in other environments.  The trade-off is that you lose
some of the really fine control that is so attractive
to programmers.  

You have to believe before it can happen!  Most of
the programmers I know give up on the generators in
the belief they can program it faster.  They
probably can.  But then somebody has to test EVERY
LINE OF CODE.  At that point I passed them up.

Just some food for thought.

--- Raible, Matt [EMAIL PROTECTED]
wrote:
 
  Though, there is still a ton maintenance going on
 here. We have the 
  properties defined in the HTML form, and the
 struts-config, and in the 
  validator.xml, and then in some type of
 corresponding property in the 
  business bean, not to mention the actual data
 store. So to add a 
  field, we have to update five (or more)
 components.
 
 
 In my XDoclet-enabled apps, if I had a new property,
 I only have to add it
 in two places - in my POJO and in my JSP. 
 validation.xml is generated, as
 well as the ActionForm.  Using Erik Hatcher's
 StrutsGen Tool, you can also
 generate a skeleton JSP from the generated
 ActionForm - but this is only
 logical to do the first time.  I don't know if it'll
 ever be possible to
 eliminate the editing of the JSP - unless we add an
 XML file or something in
 the ActionForm that specifies field order, field
 type, etc.  Still, there's
 so much custom stuff (label taglib, javascript
 pop-up calendars) that I put
 into forms, I doubt this will ever be possible.
 
 IMO, XDoclet is the best thing that's happened to
 Java Development since
 Ant.
 
 Matt
 
 
 
 

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Bean and Scripting

2003-05-31 Thread Abhinav (Cognizant)
But somehow It gave me a compilation error..cannot resolve symbol 'id'
what may be wrong/..

Thnax

-Original Message-
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 8:23 PM
To: 'Struts Users Mailing List'
Subject: RE: Bean and Scripting


yes you can ...


Panchasheel


-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 10:51 AM
To: Struts Users Mailing List
Subject: Bean and Scripting


Can I use a bean or anythying  that is defined/declared in a struts tag
for scripting.

say this kind of thing 
bean:define id=id name=x property=y/
and then 
% String tmp = id; %



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


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

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

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

FW: Find global forwards in individual module

2003-05-31 Thread Zaili_Xu


Hi, guys

We are using multi modules in Struts. We find a prolem in finding the global forward 
specified in the default config. For example, our UserProfileThanksAction is configed 
in profile module and home is the name of a global forward specified in the default 
config, when we say 

return mapping.findForward(home);

in UserProfileThanksAction the mapping is not able to find home.

We are not using the switch action. Instead we are specifying modul prefix in config 
file. For example, 

What is the appropriate way to find global forwards in individual module ?

Thanks in advance for your response.

Zaili Xu

-
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: Nesting logic tags

2003-05-31 Thread Michael Ruppin
Struts logic tags work fine nested in HTML table
tags.  Something else must be wrong, perhaps with your
logic tag attributes.  The nested tag library is for
nested BEANS, not for nested tags.  Unless you have
Forms which contain Forms, or Forms with Collections
of Forms, you don't need the nested tab library.

HTH

m

--- Kamholz, Keith   (corp-staff) USX
[EMAIL PROTECTED] wrote:
 The issue isn't getting entryType into the form. 
 The issue is conditionally
 displaying a couple rows in the table/form.  I
 already have the entryType in
 a hidden input earlier in the form.
 Input anybody?
 I'd really appreciate it.
 
 ~ Keith
 
 http://www.buffalo.edu/~kkamholz
 
 
 
 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 11:09 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Nesting logic tags
 
 
 If ansm is a member variable of your ActionForm, use
 
 html:hidden property=ansm.entryType
 
 -Original Message-
 From: Kamholz, Keith (corp-staff) USX
 [mailto:[EMAIL PROTECTED] 
 Sent: May 30, 2003 10:53 AM
 To: '[EMAIL PROTECTED]'
 Subject: Nesting logic tags
 
 Hey,
 I'm using a table to display a form, but there's one
 row that I want to
 hide, depending on a previous user selection.
 Right now, my code is:
 
 table
   tr
   td
   b
   bean:message key=app.label.numberType/: 
   /b
   /td
   td
   html:hidden name=ansm property=numberType
 write=true/
   /td
   /tr
   
   logic:equal value=subformat name=ansm
 property=entryType
   tr
   td
   b
   bean:message
 key=app.label.subType/: 
   /b
   /td
   td
   html:hidden name=ansm property=subType
 write=true/
   /td
   /tr
   /logic:equal
   
   tr
   td
   b
   bean:message key=app.label.typeDesc/: 
   /b
   /td
   td
   html:text name=ansm property=typeDesc
 size=50
 maxlength=50/
   /td
   /tr
   
   logic:notEqual value=group name=ansm
 property=entryType
   tr
   td
   b
   bean:message
 key=app.label.typeFormat/: 
   /b
   /td
   td
   html:text name=ansm property=typeFormat
 size=60 maxlength=60/
   /td
   /tr
   tr
   td
   b
   bean:message
 key=app.label.tabulatedFormat/: 
   /b
   /td
   td
   html:text name=ansm
 property=tabulatedFormat size=60
 maxlength=60/
   /td
   tr
   td
   b
   bean:message
 key=app.label.lastUsed/: 
   /b
   /td
   td
   html:text name=ansm property=lastUsed
 size=30 maxlength=30/
   /td
   /tr
   /logic:notEqual
   
 /table
 
 Unfortunately, it doesn't like me nesting the logic
 tags in the table code.
 I've never used the struts nested taglib, would this
 be an appropriate place
 to use it?  If not, does anyone know of a workaround
 I could use?
 
 Thanks in advance.
 
 
 ~ Keith
 
 http://www.buffalo.edu/~kkamholz
 
 
 

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

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



time to do action

2003-05-31 Thread Mike Whittaker

In order to aid understanding what would be the simplest way to record the
time taken to carry out a request, and then make this available to a JSP?

To make this global I've been playing with RequestProcessor with little
success.

--
Mike W


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



RE: time to do action

2003-05-31 Thread Mike Jasnowski
What about a servlet request/response filter? You might not get as granular
as you want, but you could get that info relatively easily from their, and
in the response record the elapsed time.

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:30 PM
To: Struts List
Subject: time to do action



In order to aid understanding what would be the simplest way to record the
time taken to carry out a request, and then make this available to a JSP?

To make this global I've been playing with RequestProcessor with little
success.

--
Mike W


-
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: time to do action

2003-05-31 Thread Mike Jasnowski
.. from there

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:28 PM
To: Struts Users Mailing List
Subject: RE: time to do action


What about a servlet request/response filter? You might not get as granular
as you want, but you could get that info relatively easily from their, and
in the response record the elapsed time.

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:30 PM
To: Struts List
Subject: time to do action



In order to aid understanding what would be the simplest way to record the
time taken to carry out a request, and then make this available to a JSP?

To make this global I've been playing with RequestProcessor with little
success.

--
Mike W


-
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: time to do action

2003-05-31 Thread Erik Price


Mike Jasnowski wrote:
What about a servlet request/response filter? You might not get as granular
as you want, but you could get that info relatively easily from their, and
in the response record the elapsed time.
Filter == very easy way to do it.   In fact there is an already-written 
drop-in filter that times requests and logs them in the excellent article at

http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html

You could easily modify this code to store the results in a 
session-scoped bean and then read this data from a JSP later in the 
user's session.  You wouldn't be able to do it in a lesser scope because 
you record the time *after* the request is processed (after the 
chain.doFilter() method is called).

Erik

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


RE: Why do ActionForms allow non-string properties?

2003-05-31 Thread Brandon Goodin
:-D I had to chime in. I use complex objects in my forms so extensively
because it makes my life easier when it comes to communcating with my
business logic layer. It actually cuts down on the amount of manual
transalting I have to do from one layer to another. It also cuts down on the
amount of code I am writing.

I DON'T think we should make a huge statement about Strings only. Strings do
no handle all the situations that exists out there and often can be
inhibiting when working with nested objects. It's silly to create String
only beans to use in your forms and then communicate with the other layers
by providing conversions between your string beans (no pun intended) and
complex beans. YUCK!!! How about 10X more code and more code means more
potential errors.

I think that we should emphasis both scenarios. We should provide a
reccommended way for using forms with complex (nested) objects and using
basic flat String based (non-nested) forms.

Brandon Goodin

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 10:10 AM
To: Struts Users Mailing List
Subject: RE: Why do ActionForms allow non-string properties?


Still,
there's
so much custom stuff (label taglib, javascript pop-up
calendars) that I
put
into forms, I doubt this will ever be possible.

It's called a code generator and its already been done
in other environments.  The trade-off is that you lose
some of the really fine control that is so attractive
to programmers.

You have to believe before it can happen!  Most of
the programmers I know give up on the generators in
the belief they can program it faster.  They
probably can.  But then somebody has to test EVERY
LINE OF CODE.  At that point I passed them up.

Just some food for thought.

--- Raible, Matt [EMAIL PROTECTED]
wrote:

  Though, there is still a ton maintenance going on
 here. We have the
  properties defined in the HTML form, and the
 struts-config, and in the
  validator.xml, and then in some type of
 corresponding property in the
  business bean, not to mention the actual data
 store. So to add a
  field, we have to update five (or more)
 components.
 

 In my XDoclet-enabled apps, if I had a new property,
 I only have to add it
 in two places - in my POJO and in my JSP.
 validation.xml is generated, as
 well as the ActionForm.  Using Erik Hatcher's
 StrutsGen Tool, you can also
 generate a skeleton JSP from the generated
 ActionForm - but this is only
 logical to do the first time.  I don't know if it'll
 ever be possible to
 eliminate the editing of the JSP - unless we add an
 XML file or something in
 the ActionForm that specifies field order, field
 type, etc.  Still, there's
 so much custom stuff (label taglib, javascript
 pop-up calendars) that I put
 into forms, I doubt this will ever be possible.

 IMO, XDoclet is the best thing that's happened to
 Java Development since
 Ant.

 Matt





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



__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.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]



[Worflow] ClassCastException with TilesWorkflowRequestProcessor

2003-05-31 Thread Sean Radford
Any ideas why I should be getting the following:

2003-05-30 15:59:07,028 INFO  [org.jboss.deployment.MainDeployer]
Deployed package:
file:/usr/java/jboss/jboss-4.0.0alpha/server/itrust/deploy/itrustmanager-0.1.SNAPSHOT.ear
2003-05-30 15:59:25,152 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/template.jsp'.
2003-05-30 15:59:31,624 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-05-30 15:59:31,631 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
2003-05-30 15:59:31,648 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true
2003-05-30 15:59:31,697 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/htmlhead.jsp'.
2003-05-30 15:59:36,240 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-05-30 15:59:36,241 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-05-30 15:59:36,245 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/header.jsp'.
2003-05-30 15:59:42,043 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/menu.jsp'.
2003-05-30 15:59:44,781 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/actionerrors.jsp'.
2003-05-30 15:59:47,870 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/actionmessages.jsp'.
2003-05-30 15:59:51,878 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/welcome_content.jsp'.
2003-05-30 15:59:53,746 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/footer.jsp'.
2003-05-30 15:59:56,827 DEBUG [org.apache.struts.util.RequestUtils] Get
module name for path /identity/startCreateIdentity.do
2003-05-30 15:59:56,827 DEBUG [org.apache.struts.util.RequestUtils]
Module name found: default
2003-05-30 15:59:56,874 WARN  [org.jboss.jbossweb] WARNING: Exception
for /itrustmanager/identity/startCreateIdentity.do
javax.servlet.UnavailableException: Cannot initialize RequestProcessor
of class com.livinglogic.struts.workflow.TilesWorkflowRequestProcessor:
java.lang.ClassCastException
at
org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:857)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:497)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:773)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:937)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:790)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)


(If I use the com.livinglogic.struts.workflow.WorkflowRequestProcessor
all seems to work ok)

Regards,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



Forwarding problem (.... has been moved to ...)

2003-05-31 Thread Jose Andrés Pérez
Hi to all,

I´ve definded several actions in a struts config file. When I execute one of
them (i.e. action A) it takes the action class that performs the logic for
that action. It catches the right forward that is JSP. But the problem is
that it seems it does not catch the JSP, and appears on the screen of the
WAP emulator the following:

  http://./action_A.do has been moved to http://./another_action.do


Any ideas of what is happen?


Thanks in advance,
Jose


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



ANN: Site Launch

2003-05-31 Thread James Childers
I am proud to announce the successful launch of a major vacation packaging site whose 
presentation tier has been built entirely with Struts:

http://packaging.hotels.com/packaging/index.do

We have made extensive use of the Struts MVC framework, custom tags, and I18N 
components, with some custom modifications. It has proven itself to be a stable and 
robust platform, able to amply handle the needs of both our users and management.

I would like to applaud everyone who has worked on the Struts project; it has been 
shown yet again to be an excellent framework for a commerical web application.

James Childers
hotels.com Packaging Team

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



RE: [JSTL] Hashtable

2003-05-31 Thread Karr, David
Ask questions about the JSTL on the taglibs-user list.  You can also
read the JSTL specification for clear answers to these questions.

 -Original Message-
 From: Denis Avdic [mailto:[EMAIL PROTECTED]
 Sent: Thursday, May 29, 2003 8:02 AM
 To: Struts Users Mailing List
 Subject: [JSTL] Hashtable
 
 Hello group,
 
 Does anyone know how to retrieve particular elements of a hash table
 using JSTL?
 I've tried c:out value=${linkTable.get(flag)}   but that does not
 work.
 
 Any ideas?
 
 TIA,
 
 Denis
 
 
 -
 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: dynamic text boxes - with checkboxes?

2003-05-31 Thread Lynn Guy
Does this work with checkboxes or is there a problem
due to the checkbox not sending anything if not
checked?


--- Mark Galbreath [EMAIL PROTECTED] wrote:
 You can name the textboxes dynamically using the
 logic:iterate
 indexId=xxx attribute:
  
 logic:iterate name=myBean property=property
 index=index id=id
 html:text property=% out.println( index ) %
 value= /
 /logic:iterate
  
 In you Action class request.getParameterNames will
 return an array like
  
 names[ 0, 1, 2, ...]
  
 and you can access each field by the String name or
 element position.
  
 Mark
 
 -Original Message-
 From: Nagendra Kumar O V S
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 29, 2003 11:33 AM
 To: [EMAIL PROTECTED]
 Subject: RE: dynamic text boxes
 
 
 
 hello mark,
 but, i cant use html:text property=/ , becos i
 cant map them in the
 action form
 i want this property also be dynamic and also get
 the value in the action
 form, can be thro' request.getParameter...
 how can i override the struts behaviour of not
 checking the corresponding
 get/set method of the property while rendering the
 html:text. or is their
 anyway.
  
 TIA
  
 ---Original Message---
  
 From: Struts Users Mailing 
 mailto:[EMAIL PROTECTED] List
 Date: Thursday, May 29, 2003 08:52:09 PM
 To: 'Struts Users Mailing 
 mailto:[EMAIL PROTECTED] List';
 'Nagendra Kumar O V  mailto:[EMAIL PROTECTED] S'
 Subject: RE: dynamic text boxes
  
 Use logic:iterate to create the text boxes and
 request.getParamaterNames()
 in your Action.
 
 Mark
 
 -Original Message-
 From: Nagendra Kumar O V S
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 29, 2003 10:53 AM
 To: [EMAIL PROTECTED]
 Subject: dynamic text boxes
 
 
 
 
 hi,
 i need to display n number of textboxes on the jsp,
 the number which is
 known only at runtime.
 now how do i map those text boxes to the action
 form.
 i can't use a array , becos i need to retreive them
 with the unique id..
 
 any ideas.
 TIA
 -nagi
 Nagendra Kumar O V S
 Member Technical Staff
 Ikigo India Private Ltd.
 470-B, Road No. 36,
 Jubilee Hills,
 Hyderabad 500033
 Contact(O): 23544671
 Cell: 98482-41789
 
 
 
 http://www.incredimail.com/redir.asp?ad_id=309

http://www.incredimail.com/redir.asp?ad_id=309lang=9
 lang=9 IncrediMail
 -
 Email has finally evolved -
 http://www.incredimail.com/redir.asp?ad_id=309

http://www.incredimail.com/redir.asp?ad_id=309lang=9
 lang=9 Click Here 
 
 
 
 
   
 
 

http://www.incredimail.com/redir.asp?ad_id=309lang=9
   IncrediMail -
 Email has finally evolved -

http://www.incredimail.com/redir.asp?ad_id=309lang=9
 Click Here 
 
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [lists-strutsuser] Forwarding problem (.... has been moved to...)

2003-05-31 Thread Sean Radford
Have you got redirect=true set for the ActionForward?


On Fri, 2003-05-30 at 17:51, Jose Andrs Prez wrote:
 Hi to all,
 
 Ive definded several actions in a struts config file. When I execute one of
 them (i.e. action A) it takes the action class that performs the logic for
 that action. It catches the right forward that is JSP. But the problem is
 that it seems it does not catch the JSP, and appears on the screen of the
 WAP emulator the following:
 
   http://./action_A.do has been moved to http://./another_action.do
 
 
 Any ideas of what is happen?
 
 
 Thanks in advance,
 Jose
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



Application Service Providers and Struts

2003-05-31 Thread Charles Fineman
Here's is another what would you do in this situation? inquiry.

We're an ASP and I would really like to leverage Struts for the
controller (I don't intend on leveraging the view aspect). Our biggest
issue with leveraging Struts is that we need to be able to handle
customer-specific customizations at the presentation level and possibly
in terms of workflow as well.
I also want to be able to do a hot-deploy of new overrides for
customers without affecting other customers ability to interact with the
web-site. Let's seperate out the issue of about hot-deploying classes
(which, coincidentally, was recently covered in a recent thread here).
My initial thought was ok, so I will provide customer-specific action
mappings. The basic idea was to have a set of default action mappings
defined and then have customer-specific overrides for the non-default
stuff.
Currently we are not planning on leveraging modules. That would
certainly add a dimension of complexity on to this.
Here two ways to do this; both require modest modification of the Struts
framework (which I could do via overriding). I'd love feedback on these
or any other suggestions.
Solution 1: override the processMapping method in the RequestProcessor
to look for the customer ID in the session object (this is guarenteed to
be there anyway). I could maintain ActionMapping tables for each
customer and one for the default.
Solution 2: Have override ActionServlets that maintain their own
action mapping tables for specific customers. In other words, one
ActionServlet for each customer and one default ActionServlet (the
customer specific ones delegate to the default if it's not found). One
big issue with this is that ActionServlet is really meant to be a
Singleton so this would have to be resolved somehow (ugh!)
Any thoughts on this? If you were an ASP that needed to support this
kind of customization, what would you do? I really like the notion of
maintaining this in the controller level... it makes a lot of sense to
me at an abstract level but Struts, as it stands, does not seem well
suited to this particular application (of course I may be missing some
slick way to accomplish this which is, of course, why I am here :-)






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


RE: time to do action

2003-05-31 Thread Mike Whittaker

Mike Jasnowski wrote:
 What about a servlet request/response filter? You might not get
as granular
 as you want, but you could get that info relatively easily from
their, and
 in the response record the elapsed time.

Filter == very easy way to do it.   In fact there is an already-written
drop-in filter that times requests and logs them in the excellent
article at

http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html

You could easily modify this code to store the results in a
session-scoped bean and then read this data from a JSP later in the
user's session.  You wouldn't be able to do it in a lesser scope because
you record the time *after* the request is processed (after the
chain.doFilter() method is called).


Eh??

I should be able to do it all in Request scope.  I don't know how to do it
the Struts way, (in fact I don't how to very much at all the Struts way!).
But yes you can do it in a filter, I know how to do that.

chain.doFilter() operates on the same request!  However many you call.
Otherwise you'd have lost the request when it got to the Servlet.

I want the Struts way, I'm learning struts.

Thankyou

And whats with all these duplicate e-mails???

--
Mike W


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



RE: time to do action

2003-05-31 Thread Mike Jasnowski
The Struts way?  Well, isn't a request just a request whether it's passing
through the Struts framework or not?  If you're looking to measure at the
granularity within the framework itself then a filter may not give you that
granularity. But if you're looking for just simple HTTP request/response
time then a filter should suffice.

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 1:36 PM
To: Struts Users Mailing List
Subject: RE: time to do action



Mike Jasnowski wrote:
 What about a servlet request/response filter? You might not get
as granular
 as you want, but you could get that info relatively easily from
their, and
 in the response record the elapsed time.

Filter == very easy way to do it.   In fact there is an already-written
drop-in filter that times requests and logs them in the excellent
article at

http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html

You could easily modify this code to store the results in a
session-scoped bean and then read this data from a JSP later in the
user's session.  You wouldn't be able to do it in a lesser scope because
you record the time *after* the request is processed (after the
chain.doFilter() method is called).


Eh??

I should be able to do it all in Request scope.  I don't know how to do it
the Struts way, (in fact I don't how to very much at all the Struts way!).
But yes you can do it in a filter, I know how to do that.

chain.doFilter() operates on the same request!  However many you call.
Otherwise you'd have lost the request when it got to the Servlet.

I want the Struts way, I'm learning struts.

Thankyou

And whats with all these duplicate e-mails???

--
Mike W


-
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: Nesting logic tags

2003-05-31 Thread Kamholz, Keith (corp-staff) USX
Hm
I don't see what would be wrong then.  I'll repost my code.
Any ideas anybody?

table
tr
td
b
bean:message key=app.label.numberType/: 
/b
/td
td
html:hidden name=ansm property=numberType
write=true/
/td
/tr

logic:equal value=subformat name=ansm property=entryType
tr
td
b
bean:message
key=app.label.subType/: 
/b
/td
td
html:hidden name=ansm property=subType
write=true/
/td
/tr
/logic:equal

tr
td
b
bean:message key=app.label.typeDesc/: 
/b
/td
td
html:text name=ansm property=typeDesc size=50
maxlength=50/
/td
/tr

logic:notEqual value=group name=ansm property=entryType
tr
td
b
bean:message
key=app.label.typeFormat/: 
/b
/td
td
html:text name=ansm property=typeFormat
size=60 maxlength=60/
/td
/tr
tr
td
b
bean:message
key=app.label.tabulatedFormat/: 
/b
/td
td
html:text name=ansm
property=tabulatedFormat size=60 maxlength=60/
/td
tr
td
b
bean:message
key=app.label.lastUsed/: 
/b
/td
td
html:text name=ansm property=lastUsed
size=30 maxlength=30/
/td
/tr
/logic:notEqual

/table


~ Keith

http://www.buffalo.edu/~kkamholz



-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:24 PM
To: Struts Users Mailing List
Subject: RE: Nesting logic tags


Struts logic tags work fine nested in HTML table
tags.  Something else must be wrong, perhaps with your
logic tag attributes.  The nested tag library is for
nested BEANS, not for nested tags.  Unless you have
Forms which contain Forms, or Forms with Collections
of Forms, you don't need the nested tab library.

HTH

m

--- Kamholz, Keith   (corp-staff) USX
[EMAIL PROTECTED] wrote:
 The issue isn't getting entryType into the form. 
 The issue is conditionally
 displaying a couple rows in the table/form.  I
 already have the entryType in
 a hidden input earlier in the form.
 Input anybody?
 I'd really appreciate it.
 
 ~ Keith
 
 http://www.buffalo.edu/~kkamholz
 
 
 
 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 11:09 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Nesting logic tags
 
 
 If ansm is a member variable of your ActionForm, use
 
 html:hidden property=ansm.entryType
 
 -Original Message-
 From: Kamholz, Keith (corp-staff) USX
 [mailto:[EMAIL PROTECTED] 
 Sent: May 30, 2003 10:53 AM
 To: '[EMAIL PROTECTED]'
 Subject: Nesting logic tags
 
 Hey,
 I'm using a table to display a form, but there's one
 row that I want to
 hide, depending on a previous user selection.
 Right now, my code is:
 
 table
   tr
   td
   b
   bean:message key=app.label.numberType/: 
   /b
   /td
   td
   html:hidden name=ansm property=numberType
 write=true/
   /td
   /tr
   
   logic:equal value=subformat name=ansm
 property=entryType
   tr
   td
   b
   bean:message
 key=app.label.subType/: 
   /b
   /td
   td
   html:hidden name=ansm property=subType
 write=true/
   /td
   /tr
   /logic:equal
   
   tr
   td
   b
   bean:message key=app.label.typeDesc/: 
   /b
   /td
   td
   html:text name=ansm 

Re: time to do action

2003-05-31 Thread Erik Price


Mike Whittaker wrote:

Eh??

I should be able to do it all in Request scope.  I don't know how to do it
the Struts way, (in fact I don't how to very much at all the Struts way!).
But yes you can do it in a filter, I know how to do that.
chain.doFilter() operates on the same request!  However many you call.
Otherwise you'd have lost the request when it got to the Servlet.
As far as I understand it, the filter performs any code that appears 
before the call to chain.doFilter() first -- before the request is 
passed to the Action/servlet/JSP/whatever.  If you have any code *after* 
the call to chain.doFilter(), then it is too late and the 
Action/servlet/JSP/whatever has already been processed, so you cannot 
output the result using any of those mechanisms.  The only way that I 
can think of would be if you were to directly re-write the contents of 
the response, which would probably be kind of messy.

Maybe I'm wrong, but this is how I understand the way filters work.

I want the Struts way, I'm learning struts.
I didn't realize there was a Struts way.  Filters are filters, aren't they?

And whats with all these duplicate e-mails???
Don' stick me, that wuz on the roof!  No idea.



Erik

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


RE: Application Service Providers and Struts

2003-05-31 Thread James Childers

 Here's is another what would you do in this situation? inquiry.
 
 We're an ASP and I would really like to leverage Struts for the
 controller (I don't intend on leveraging the view aspect). Our biggest
 issue with leveraging Struts is that we need to be able to handle
 customer-specific customizations at the presentation level 
 and possibly in terms of workflow as well.

I hate to plug our site again so soon after making the announcement, but we had to do 
this very thing. Check out the following links:

http://packaging.hotels.com/packaging/?TSRC=1

http://packaging.hotels.com/packaging/?TSRC=2

(These work up to TSRC=5)

We use a modified versions of Tiles and several of the Struts HTML tags for this: 
instead of pulling various items (text, image locations, tiles, etc.) out of a 
resource bundle we pull them out of a DB. As you can see, this allows for a large 
degree of customization, with different stylesheets, images, buttons, and tiles use to 
build various elements within the page. By keeping true to the MVC paradigm, this has 
allowed us to deploy the web app with a substantially different look and feel for a 
given affiliate.

 My initial thought was ok, so I will provide customer-specific action
 mappings. The basic idea was to have a set of default action mappings
 defined and then have customer-specific overrides for the non-default
 stuff.

 Any thoughts on this? If you were an ASP that needed to support this
 kind of customization, what would you do? I really like the notion of
 maintaining this in the controller level... it makes a lot of sense to
 me at an abstract level but Struts, as it stands, does not seem well
 suited to this particular application (of course I may be missing some
 slick way to accomplish this which is, of course, why I am here :-)

It really depends upon how much customization you have to give to your clients. If 
they only want to do look-and-feel changes, then this will be relatively 
straightforward to implement. Customizing business flow, however, could be quite a 
challenge, especially given various dependencies that usually crop up.

I don't think it would be unreasonable -- again, depending on your exact requirements 
-- to set limits on what can and cannot be customized.

-= James

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



Re: ANN: Site Launch

2003-05-31 Thread Rob Leland
James Childers wrote:

I am proud to announce the successful launch of a major vacation packaging site whose presentation tier has been built entirely with Struts:

http://packaging.hotels.com/packaging/index.do

It looks good. I didn't see any where on the site that mentioned that 
software from the Apache
foundation was used, this has been discussed before see the thread:

This should help out:

http://marc.theaimsgroup.com/?l=struts-userm=103123221707143w=2

Also see
http://www.apache.org/LICENSE
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Nesting logic tags

2003-05-31 Thread Michael Ruppin
Well, I'm not an expert, but I can try.  First, the
obvious stuff I assume you know.  ansm must be a bean
you've exposed, right?  If so, then it must have a
getter method, getEntryType().  In order for the
contents within logic:equal to appear, this method
must return subformat [or group].  I *think* that
if the ansm bean were not exposed, or you didn't have
the getter, there'd be an error, so I guess that's not
it.  I would do a bean:write name=ansm
property=entryType\ prior to the logic tags, and
see what happens.

m

--- Kamholz, Keith   (corp-staff) USX
[EMAIL PROTECTED] wrote:
 Hm
 I don't see what would be wrong then.  I'll repost
 my code.
 Any ideas anybody?
 
 table
   tr
   td
   b
   bean:message key=app.label.numberType/: 
   /b
   /td
   td
   html:hidden name=ansm property=numberType
 write=true/
   /td
   /tr
   
   logic:equal value=subformat name=ansm
 property=entryType
   tr
   td
   b
   bean:message
 key=app.label.subType/: 
   /b
   /td
   td
   html:hidden name=ansm property=subType
 write=true/
   /td
   /tr
   /logic:equal
   
   tr
   td
   b
   bean:message key=app.label.typeDesc/: 
   /b
   /td
   td
   html:text name=ansm property=typeDesc
 size=50
 maxlength=50/
   /td
   /tr
   
   logic:notEqual value=group name=ansm
 property=entryType
   tr
   td
   b
   bean:message
 key=app.label.typeFormat/: 
   /b
   /td
   td
   html:text name=ansm property=typeFormat
 size=60 maxlength=60/
   /td
   /tr
   tr
   td
   b
   bean:message
 key=app.label.tabulatedFormat/: 
   /b
   /td
   td
   html:text name=ansm
 property=tabulatedFormat size=60
 maxlength=60/
   /td
   tr
   td
   b
   bean:message
 key=app.label.lastUsed/: 
   /b
   /td
   td
   html:text name=ansm property=lastUsed
 size=30 maxlength=30/
   /td
   /tr
   /logic:notEqual
   
 /table
 
 
 ~ Keith
 
 http://www.buffalo.edu/~kkamholz
 
 
 
 -Original Message-
 From: Michael Ruppin [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 12:24 PM
 To: Struts Users Mailing List
 Subject: RE: Nesting logic tags
 
 
 Struts logic tags work fine nested in HTML table
 tags.  Something else must be wrong, perhaps with
 your
 logic tag attributes.  The nested tag library is for
 nested BEANS, not for nested tags.  Unless you have
 Forms which contain Forms, or Forms with Collections
 of Forms, you don't need the nested tab library.
 
 HTH
 
 m
 
 --- Kamholz, Keith   (corp-staff) USX
 [EMAIL PROTECTED] wrote:
  The issue isn't getting entryType into the form. 
  The issue is conditionally
  displaying a couple rows in the table/form.  I
  already have the entryType in
  a hidden input earlier in the form.
  Input anybody?
  I'd really appreciate it.
  
  ~ Keith
  
  http://www.buffalo.edu/~kkamholz
  
  
  
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Friday, May 30, 2003 11:09 AM
  To: 'Struts Users Mailing List'
  Subject: RE: Nesting logic tags
  
  
  If ansm is a member variable of your ActionForm,
 use
  
  html:hidden property=ansm.entryType
  
  -Original Message-
  From: Kamholz, Keith (corp-staff) USX
  [mailto:[EMAIL PROTECTED] 
  Sent: May 30, 2003 10:53 AM
  To: '[EMAIL PROTECTED]'
  Subject: Nesting logic tags
  
  Hey,
  I'm using a table to display a form, but there's
 one
  row that I want to
  hide, depending on a previous user selection.
  Right now, my code is:
  
  table
  tr
  td
  b
  bean:message key=app.label.numberType/: 
  /b
  /td
  td
  html:hidden name=ansm property=numberType
  write=true/
  /td
  /tr
  
  logic:equal value=subformat name=ansm
  property=entryType
  tr
  

Re: zip of struts diagrams

2003-05-31 Thread Rob Leland
Vijay Pawar wrote:

Resending the same mail to the mail list.

This time the attachment is in .zip format. Hope it gets through to
everyone !
 

The Diagram doesn't make a distinction between control
flow and data flow, I would suggest breaking the Diagram into 2 parts:
Control flow and data flow.
At the very least use different type lines to represent data and control,
maybe dashed vs solid.
-Rob



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


Re: Populating Value Objects for the Business Tier

2003-05-31 Thread Jordan Reed
I've been playing #3 (Just included the value objects in the form) and run
into one of those things that probably makes people break into tears.

I have int types in the value object... And since they cannot be null, when
the form is prepopulated or repopulated they appear as 0 instead of being
blank or what the user entered.  Sad.

-jdr

On 5/28/03 9:53 PM, Andrew Hill [EMAIL PROTECTED] wrote:

 2  3 generally end in tears. They sound nice, but when you get down to the
 fiddly bits you will find it more problematic than you expect.
 
 As you mention, the action form is very much a view object. For a start
 everything in the actionForm will be strings, while your business object
 probably will not be. Secondly, while there is considerable overlap between
 your value object and your form, you will find (especially as your ui gets
 more complex) that the correlation is not 1 to 1 and that you are exerting a
 lot of effort to try and keep the two the same.
 
 Approach 3 is probably the worst - unless its for read only display - in
 that if the user enters a value that doesnt convert to your value objects
 property type you will want to redisplay the offending value string the same
 as the user typed it for them to correct it.
 
 Your best bet is to use approach 1. You may be interested to note that the
 BeanUtils class does have some methods that can make life simpler for you -
 copying property values and doing type conversions automatically (if I
 recall correctly).
 
 (Actually I generally copy the properties the 'hard' way, one by one in my
 action)
 
 -Original Message-
 From: Jordan Reed [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 29 May 2003 12:29
 To: Struts Users Mailing List
 Subject: Populating Value Objects for the Business Tier
 
 
 All,
 
 I'm on a team that's trying to decided on a best practice for passing on
 populating our value objects that get passed to our business layer.  We
 currently have three techniques we've though up and I'm wonderful if anyone
 has a strong opinion on which one may be the best and why.
 
 The basic problem is that the user enters information into a form.  The form
 is a presentation object, and should not be passed to the business layer.
 So it's information needs to be in a presentation-agnostic interface before
 being passed to the data layer.
 
 1) Have the action class copy information from the form to a value object.
 Have a view helper copy information from the value object into the form (for
 pre-population)
 
 2) Have the form implement a value-object-like interface.  The business
 layer accepts objects with these business interfaces.  This way it is
 possible to pass the form objects to the business layer without the business
 layer knowing that they are presentation objects.
 
 3) Have the form simply include value objects as properties.  Then use the
 nested taglibs to populate the value objects.  This way the Action can just
 pull the value object off directly and pass to the business layer.  A view
 helper can just set the value object on the form.
 
 
 -jdr


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



RE: time to do action

2003-05-31 Thread Mike Whittaker


Maybe I'm wrong, but this is how I understand the way filters work.

You are probably right, my brain hurts, it's Friday.


 I want the Struts way, I'm learning struts.

I didn't realize there was a Struts way.  Filters are filters, aren't they?


There must be a struts way to do it surely.
The RequestProcessor is a global controller for all Actions, its methods are
accessed in a sequence, some before the action some launching the action,
some after.  Surely this can be used to time the Action.

Anyone?

--
Mike W


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



RE: ANN: Site Launch

2003-05-31 Thread Gandle, Panchasheel
If people have already launched their site, I would request them to list
them in the mailing list.
So that we get an idea how far struts framework has reached, how popular and
powerful it is...
Please people do write in your site, if its already launched.

Panchasheel

-Original Message-
From: Rob Leland [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 1:46 PM
To: Struts Users Mailing List
Subject: Re: ANN: Site Launch


James Childers wrote:

I am proud to announce the successful launch of a major vacation packaging
site whose presentation tier has been built entirely with Struts:

http://packaging.hotels.com/packaging/index.do


It looks good. I didn't see any where on the site that mentioned that 
software from the Apache
foundation was used, this has been discussed before see the thread:

This should help out:

http://marc.theaimsgroup.com/?l=struts-userm=103123221707143w=2

Also see
http://www.apache.org/LICENSE


-
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: ANN: Site Launch

2003-05-31 Thread James Mitchell
It would help if you searched the archives, but for a topic like this it is
difficult to get accurate results.

I have a zip file with copies of e-mails that have come in over the
last year or two that relate to this topic.

If you want it, I can send it to you.  I already tried to send it to this
list, but the zip is too large (110 kb).



--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org



- Original Message -
From: Gandle, Panchasheel [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 2:10 PM
Subject: RE: ANN: Site Launch


 If people have already launched their site, I would request them to list
 them in the mailing list.
 So that we get an idea how far struts framework has reached, how popular
and
 powerful it is...
 Please people do write in your site, if its already launched.

 Panchasheel

 -Original Message-
 From: Rob Leland [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 1:46 PM
 To: Struts Users Mailing List
 Subject: Re: ANN: Site Launch


 James Childers wrote:

 I am proud to announce the successful launch of a major vacation
packaging
 site whose presentation tier has been built entirely with Struts:
 
 http://packaging.hotels.com/packaging/index.do
 

 It looks good. I didn't see any where on the site that mentioned that
 software from the Apache
 foundation was used, this has been discussed before see the thread:

 This should help out:

 http://marc.theaimsgroup.com/?l=struts-userm=103123221707143w=2

 Also see
 http://www.apache.org/LICENSE


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



NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
In a regular servlet, I'm trying to do the following:

InputStream forms =
 
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);

But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
ideas why this may be happening?

Thanks,

Matt


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



Re: NPE with getResourceAsStream

2003-05-31 Thread Michael Ruppin
What's getServletContext() returning?  null?

m

--- Raible, Matt [EMAIL PROTECTED]
wrote:
 In a regular servlet, I'm trying to do the
 following:
 
 InputStream forms =
  

getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
 
 But it's throwing a NPE, and validation.xml is in my
 WEB-INF folder.  Any
 ideas why this may be happening?
 
 Thanks,
 
 Matt
 
 

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: html:errors

2003-05-31 Thread Navjot Singh
basically, those 2 nulls are errors.header and errors.footer (am i right, 
guys?) attributes that should be in your application.resources file but 
struts is unable to find them.

HTH
-navjot singh

you wrote:




I have used the tag html:errors/ for displaying error messages,

It is displaying in the front end as null message null , why the message
is preceded and appended with null.

What could be the problem please advise.

Regards,
Jailani.S









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



Re: NPE with getResourceAsStream

2003-05-31 Thread Kris Schneider
Are you doing this in the constructor or an overridden init(ServletConfig) that
hasn't invoked super.init(config)?

Quoting Raible, Matt [EMAIL PROTECTED]:

 In a regular servlet, I'm trying to do the following:
 
 InputStream forms =
  
 getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
 
 But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
 ideas why this may be happening?
 
 Thanks,
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Objects in session scope, good or bad practice?

2003-05-31 Thread Torsten Römer
Hello,

I would like to hear your opinion about the following:

In my webapp, when a user clicks a link, a custom type object is created 
in an action, then control is forwarded to a jsp view that shows some 
data taken from that object and a form where the user can enter some 
information and then submit the form. In the action associated with the 
form I would like access the previously created object again.

As the form submission is a new request, I store the object as attribute 
in session scope in the first action to be able to access it in the 
second action. When the second action completes, I remove the attribute 
from the session.

Is it good or bad practice? I really would like to use request scope 
instead, but I don't find a way to do that. Normally hidden fields are 
used in that case, but they can only be Strings, right?

What I don't like so much about session scope is, that if a user chooses 
not to submit the form, the second action will not remove the attribute 
with the object, and it will hang around until the session expires or 
the user clicks the link again and submits the form.

I found some posts where similar topics where discussed, but I'm still 
not sure if it's the right way what I'm doing or not.

Thanks very much in advance!

Torsten



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


Re: Forwarding to Action

2003-05-31 Thread Alex Winston
After consulting the api, and browsing through the list archives again I
was able to discover that in order to instantiate a new instance of a
DynaActionForm to set within the request the following code is required,
which is listed below. Hopefully this will be helpful to someone in the
future with the same problem.  However, after successfully managing to
work my way through this problem, I have run into another problem.  It
appears that when I forward to an action after setting my new
DynaActionForm in the request, the next action overwrites the values,
with values that where passed to the initial request.  The log excerpt
below details the problem.  You will notice that serviceForm is set and
found, and notice that it says that it will be recycled. but immediately
after that it repopulates the bean properties, thus overriding the
values that i set.  Any thoughts, are am I trying to do something that
really isn't possible?

Thanks
Alex

// Initialize the DynaActionFormClass.
ModuleConfig mc =
(ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
FormBeanConfig fbc =
mc.findFormBeanConfig(serviceForm);
DynaActionFormClass dafc =
DynaActionFormClass.createDynaActionFormClass(fbc);

// Create a new instance of the serviceForm DynaActionForm.
DynaActionForm serviceForm = (DynaActionForm) dafc.newInstance();
serviceForm.set(id, (String) aspectForm.get(serviceId));

// Set the serviceForm in the HttpServletRequest.
request.setAttribute(serviceForm, serviceForm);


2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  - Processing a 'GET' for path
'/editService'
2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.util.RequestUtils  -  Looking for ActionForm bean
instance in scope 'request' under attribute key 'serviceForm'
2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.util.RequestUtils  -  Recycling existing
DynaActionForm instance of type 'serviceForm'
2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.util.RequestUtils  -  --
DynaActionForm[dynaClass=serviceForm,type=,description=,name=,id=1830746640-92]
2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  -  Storing ActionForm bean
instance in scope 'request' under attribute key 'serviceForm'
2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  -  Populating bean properties
from this request
2003-05-30 14:15:28,787 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  -  Looking for Action
instance for class
com.christianity.dashboard.struts.action.manager.EditService
2003-05-30 14:15:28,787 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  -   Returning existing Action
instance


On Thu, 2003-05-29 at 19:13, Michael Ruppin wrote:
 Request variables are not lost unless you set
 redirect=true in your [editService] mapping, or
 construct an ActionForward from scratch, setting
 redirect=true.
 
 --- Alex Winston [EMAIL PROTECTED] wrote:
  My apologizes for yet another thread on action
  chaining, but I am in a
  bit of a pickle, and the archives have been of
  little help.
  
  I have the following struts configuration, modified
  for brevity.
  
  form-bean name=serviceForm
  type=org.apache.struts.action.DynaActionForm
  form-property name=id type=java.lang.String/
  form-property name=name
  type=java.lang.String/
  form-property name=type
  type=java.lang.String/
  form-property name=description
  type=java.lang.String/
  /form-bean
  
  action path=/editService
  
 
 type=com.christianity.dashboard.struts.action.manager.EditService
  name=serviceForm
  scope=request
  validate=false
  forward name=view path=/jsp/editService.jsp/
  /action
  
  action path=/createAspect
  
 
 type=com.christianity.dashboard.struts.action.manager.CreateAspect
  name=aspectForm
  scope=request
  validate=false
  forward name=view path=/editService.do/
  /action
  
  
  The problem occurs when I forward from createAspect
  to editService after
  setting request variables. I am setting attributes
  of the serviceForm in
  the request within createAspects execute method, but
  unfortunately no
  values are set when editService checks the
  serviceForm DynaActionForm
  within its execute method.  Am I incorrect in
  assuming that this is
  possible, and if not what am I missing?  Are request
  variables lost when
  forwarding to another action?
  
  Thanks
  Alex
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
 http://calendar.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 

RE: time to do action

2003-05-31 Thread Mike Whittaker

There must be a struts way to do it surely.
The RequestProcessor is a global controller for all Actions, its
methods are
accessed in a sequence, some before the action some launching the action,
some after.  Surely this can be used to time the Action.

Anyone?

Okay a global way, using the RequestProcessor:

// add the time req'd to process action into request attribute
protected ActionForward processActionPerform(etc) throws etc {

long start = System.currentTimeMillis();
ActionForward fwd =
super.processActionPerform(req,res,action,form,mapping);
long end = System.currentTimeMillis();
String time = Double.toString(((double)(end-start))/1000);
req.setAttribute(time,time);
return fwd;
}

### HOWEVER! ### When you have a simple action mapping like this:

action path = /JSPPlease
name = myForm
forward = /WEB-INF/jsp/aJSP.jsp/

It does not work.
Doesn't the Controller operate in the same way here?

--
Mike W


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



RE: Objects in session scope, good or bad practice?

2003-05-31 Thread Mark Galbreath
I do this all the time - it's why the Servlet spec provides for
environmental variables (request, session, context).  Use it to your
advantage.  Unless you are hosting a very high-traffic site, any session
objects that hang around until expiration are not going to degrade
performance or cause a problem, especially on a high-end machine (like my
laptop :-) ).  You are wise, however, to be cognizant of providing a means
for dereferencing the objects when possible.  Craig does this in the
examples that come with the download.

Mark

-Original Message-
From: Torsten Römer [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 2:47 PM
To: [EMAIL PROTECTED]
Subject: Objects in session scope, good or bad practice?


Hello,

I would like to hear your opinion about the following:

In my webapp, when a user clicks a link, a custom type object is created 
in an action, then control is forwarded to a jsp view that shows some 
data taken from that object and a form where the user can enter some 
information and then submit the form. In the action associated with the 
form I would like access the previously created object again.

As the form submission is a new request, I store the object as attribute 
in session scope in the first action to be able to access it in the 
second action. When the second action completes, I remove the attribute 
from the session.

Is it good or bad practice? I really would like to use request scope 
instead, but I don't find a way to do that. Normally hidden fields are 
used in that case, but they can only be Strings, right?

What I don't like so much about session scope is, that if a user chooses 
not to submit the form, the second action will not remove the attribute 
with the object, and it will hang around until the session expires or 
the user clicks the link again and submits the form.

I found some posts where similar topics where discussed, but I'm still 
not sure if it's the right way what I'm doing or not.

Thanks very much in advance!

Torsten



-
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: Forwarding to Action

2003-05-31 Thread Mark Galbreath
Good job!  You are an example everyone should follow on this list.  Find a
solution, do not keep it to yourself.

Mark

-Original Message-
From: Alex Winston [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 2:42 PM
To: Struts Users Mailing List
Subject: Re: Forwarding to Action


After consulting the api, and browsing through the list archives again I was
able to discover that in order to instantiate a new instance of a
DynaActionForm to set within the request the following code is required,
which is listed below. Hopefully this will be helpful to someone in the
future with the same problem.  However, after successfully managing to work
my way through this problem, I have run into another problem.  It appears
that when I forward to an action after setting my new DynaActionForm in the
request, the next action overwrites the values, with values that where
passed to the initial request.  The log excerpt below details the problem.
You will notice that serviceForm is set and found, and notice that it says
that it will be recycled. but immediately after that it repopulates the bean
properties, thus overriding the values that i set.  Any thoughts, are am I
trying to do something that really isn't possible?

Thanks
Alex

// Initialize the DynaActionFormClass.
ModuleConfig mc =
(ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
FormBeanConfig fbc =
mc.findFormBeanConfig(serviceForm);
DynaActionFormClass dafc =
DynaActionFormClass.createDynaActionFormClass(fbc);

// Create a new instance of the serviceForm DynaActionForm. DynaActionForm
serviceForm = (DynaActionForm) dafc.newInstance(); serviceForm.set(id,
(String) aspectForm.get(serviceId));

// Set the serviceForm in the HttpServletRequest.
request.setAttribute(serviceForm, serviceForm);


2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  - Processing a 'GET' for path
'/editService' 2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.util.RequestUtils  -  Looking for ActionForm bean instance
in scope 'request' under attribute key 'serviceForm' 2003-05-30 14:15:28,786
[Thread-4] DEBUG org.apache.struts.util.RequestUtils  -  Recycling existing
DynaActionForm instance of type 'serviceForm' 2003-05-30 14:15:28,786
[Thread-4] DEBUG org.apache.struts.util.RequestUtils  -  --
DynaActionForm[dynaClass=serviceForm,type=,description=,name=,id=1830746640-
92]
2003-05-30 14:15:28,786 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  -  Storing ActionForm bean
instance in scope 'request' under attribute key 'serviceForm' 2003-05-30
14:15:28,786 [Thread-4] DEBUG org.apache.struts.action.RequestProcessor  -
Populating bean properties from this request 2003-05-30 14:15:28,787
[Thread-4] DEBUG org.apache.struts.action.RequestProcessor  -  Looking for
Action instance for class
com.christianity.dashboard.struts.action.manager.EditService
2003-05-30 14:15:28,787 [Thread-4] DEBUG
org.apache.struts.action.RequestProcessor  -   Returning existing Action
instance


On Thu, 2003-05-29 at 19:13, Michael Ruppin wrote:
 Request variables are not lost unless you set
 redirect=true in your [editService] mapping, or
 construct an ActionForward from scratch, setting redirect=true.
 
 --- Alex Winston [EMAIL PROTECTED] wrote:
  My apologizes for yet another thread on action
  chaining, but I am in a
  bit of a pickle, and the archives have been of
  little help.
  
  I have the following struts configuration, modified
  for brevity.
  
  form-bean name=serviceForm
  type=org.apache.struts.action.DynaActionForm
  form-property name=id type=java.lang.String/
  form-property name=name
  type=java.lang.String/
  form-property name=type
  type=java.lang.String/
  form-property name=description type=java.lang.String/
  /form-bean
  
  action path=/editService
  
 
 type=com.christianity.dashboard.struts.action.manager.EditService
  name=serviceForm
  scope=request
  validate=false
  forward name=view path=/jsp/editService.jsp/ /action
  
  action path=/createAspect
  
 
 type=com.christianity.dashboard.struts.action.manager.CreateAspect
  name=aspectForm
  scope=request
  validate=false
  forward name=view path=/editService.do/
  /action
  
  
  The problem occurs when I forward from createAspect
  to editService after
  setting request variables. I am setting attributes
  of the serviceForm in
  the request within createAspects execute method, but unfortunately 
  no values are set when editService checks the
  serviceForm DynaActionForm
  within its execute method.  Am I incorrect in
  assuming that this is
  possible, and if not what am I missing?  Are request
  variables lost when
  forwarding to another action?
  
  Thanks
  Alex
  
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
  

RE: NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
I'm doing this in an execute(request,response) method that both doGet() and
doPost() call.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:39 PM
To: Struts Users Mailing List
Subject: Re: NPE with getResourceAsStream


Are you doing this in the constructor or an overridden init(ServletConfig)
that
hasn't invoked super.init(config)?

Quoting Raible, Matt [EMAIL PROTECTED]:

 In a regular servlet, I'm trying to do the following:
 
 InputStream forms =
  
 getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
 
 But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
 ideas why this may be happening?
 
 Thanks,
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.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]



date validation

2003-05-31 Thread Chen, Gin
Is there a way to validate a date against today's date?

I can validate that a date is entered in a desired format but I'm not sure
how to validate that it is = to or  then today's date using just the
validation.xml.

Do I have to use a custom validator?
Thanks,
-Tim

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



Re: Populating Value Objects for the Business Tier

2003-05-31 Thread p
Plus you have security issues, it is simple to spoof the form 
submission and set properties other than the ones that correspond to 
form fields (that is, if there are any other properties on your value 
object).

I copy properties using BeanUtils where possible, and for cases where 
that doesn't work (there are many) I do it manually in the Action.

The cases where BeanUtils.copyProperties() doesn't work are when the 
business object has nested properties, or where the type of the 
property is not one of the native types. If anybody has a nice solution 
to these I'd like to hear it... I've been thinking about extending 
BeanUtils to understand my ObjectID class, java.util.Date, etc.



On Friday, May 30, 2003, at 02:04  PM, Jordan Reed wrote:

I've been playing #3 (Just included the value objects in the form) and 
run
into one of those things that probably makes people break into tears.

I have int types in the value object... And since they cannot be null, 
when
the form is prepopulated or repopulated they appear as 0 instead of 
being
blank or what the user entered.  Sad.

-jdr

On 5/28/03 9:53 PM, Andrew Hill [EMAIL PROTECTED] 
wrote:

2  3 generally end in tears. They sound nice, but when you get down 
to the
fiddly bits you will find it more problematic than you expect.

As you mention, the action form is very much a view object. For a 
start
everything in the actionForm will be strings, while your business 
object
probably will not be. Secondly, while there is considerable overlap 
between
your value object and your form, you will find (especially as your ui 
gets
more complex) that the correlation is not 1 to 1 and that you are 
exerting a
lot of effort to try and keep the two the same.

Approach 3 is probably the worst - unless its for read only display - 
in
that if the user enters a value that doesnt convert to your value 
objects
property type you will want to redisplay the offending value string 
the same
as the user typed it for them to correct it.

Your best bet is to use approach 1. You may be interested to note 
that the
BeanUtils class does have some methods that can make life simpler for 
you -
copying property values and doing type conversions automatically (if I
recall correctly).

(Actually I generally copy the properties the 'hard' way, one by one 
in my
action)

-Original Message-
From: Jordan Reed [mailto:[EMAIL PROTECTED]
Sent: Thursday, 29 May 2003 12:29
To: Struts Users Mailing List
Subject: Populating Value Objects for the Business Tier
All,

I'm on a team that's trying to decided on a best practice for passing 
on
populating our value objects that get passed to our business layer.  
We
currently have three techniques we've though up and I'm wonderful if 
anyone
has a strong opinion on which one may be the best and why.

The basic problem is that the user enters information into a form.  
The form
is a presentation object, and should not be passed to the business 
layer.
So it's information needs to be in a presentation-agnostic interface 
before
being passed to the data layer.

1) Have the action class copy information from the form to a value 
object.
Have a view helper copy information from the value object into the 
form (for
pre-population)

2) Have the form implement a value-object-like interface.  The 
business
layer accepts objects with these business interfaces.  This way it is
possible to pass the form objects to the business layer without the 
business
layer knowing that they are presentation objects.

3) Have the form simply include value objects as properties.  Then 
use the
nested taglibs to populate the value objects.  This way the Action 
can just
pull the value object off directly and pass to the business layer.  A 
view
helper can just set the value object on the form.

-jdr


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


Action Erros

2003-05-31 Thread José Moreira
Hello,

when i return the errors to my form i get a 'null' before and after each
error message for each erroneous filled field... what seem to be the
problem?


thank you,
good work
-- 
Jos Moreira [EMAIL PROTECTED]


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



RE: NPE with getResourceAsStream

2003-05-31 Thread Kris Schneider
Huh. Does that servlet, or one of its ancestors, override init(ServletConfig)
without invoking super.init(config)? Based on your code snippet, I'm assuming
the problem is getServletContext() returning null. If the resource passed to
getResourceAsStream can't be located, your forms variable will be null, but
the method won't throw an NPE.

Quoting Raible, Matt [EMAIL PROTECTED]:

 I'm doing this in an execute(request,response) method that both doGet() and
 doPost() call.
 
 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 12:39 PM
 To: Struts Users Mailing List
 Subject: Re: NPE with getResourceAsStream
 
 
 Are you doing this in the constructor or an overridden init(ServletConfig)
 that
 hasn't invoked super.init(config)?
 
 Quoting Raible, Matt [EMAIL PROTECTED]:
 
  In a regular servlet, I'm trying to do the following:
  
  InputStream forms =
   
  getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
  
  But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
  ideas why this may be happening?
  
  Thanks,
  
  Matt
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.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]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



RE: Action Erros or Eros (kinda kinky)

2003-05-31 Thread Brandon Goodin
Without seeing your code it is hard to say. But, my guess is that you aren't checking 
for an empty status before you display them. Check for empty and avoid the bean write 
if it is null.

Brandon Goodin

-Original Message-
From: Jos Moreira [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 1:07 PM
To: [EMAIL PROTECTED]
Subject: Action Erros


Hello,

when i return the errors to my form i get a 'null' before and after each
error message for each erroneous filled field... what seem to be the
problem?


thank you,
good work
-- 
Jos Moreira [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: NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
It turned out to be an issue with my Cactus TestCase.  See solution marked
-- below

protected void setUp() throws Exception {
super.setUp();
servlet = new RegistrationServlet();
servlet.init(config); -- Adding this fixed the problem.
}

Thanks for kicking my brain into gear.

Matt

-Original Message-
From: Raible, Matt 
Sent: Friday, May 30, 2003 12:55 PM
To: 'Struts Users Mailing List'
Subject: RE: NPE with getResourceAsStream


I'm doing this in an execute(request,response) method that both doGet() and
doPost() call.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:39 PM
To: Struts Users Mailing List
Subject: Re: NPE with getResourceAsStream


Are you doing this in the constructor or an overridden init(ServletConfig)
that
hasn't invoked super.init(config)?

Quoting Raible, Matt [EMAIL PROTECTED]:

 In a regular servlet, I'm trying to do the following:
 
 InputStream forms =
  
 getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
 
 But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
 ideas why this may be happening?
 
 Thanks,
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.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]



Action Errors [SOLVED]

2003-05-31 Thread José Moreira
the problem was errors header and footer



Hello,

when i return the errors to my form i get a 'null' before and after each
error message for each erroneous filled field... what seem to be the
problem?


thank you,
good work
-- 
Jos Moreira [EMAIL PROTECTED]


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



how can I find the Scaffold package?

2003-05-31 Thread Leon
Hi,

What is the download link of the Scaffold package?
Thanks.

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



RE: ANN: Site Launch

2003-05-31 Thread Chappell, Simon P
I am still maintaining a completely unofficial list on my site at:

http://simonpeter.com/techie/java/struts/sites.html

I'll try to get this site added soon.

Simon

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 1:25 PM
To: Struts Users Mailing List
Subject: Re: ANN: Site Launch


It would help if you searched the archives, but for a topic 
like this it is
difficult to get accurate results.

I have a zip file with copies of e-mails that have come in over the
last year or two that relate to this topic.

If you want it, I can send it to you.  I already tried to send 
it to this
list, but the zip is too large (110 kb).



--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org



- Original Message -
From: Gandle, Panchasheel [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 2:10 PM
Subject: RE: ANN: Site Launch


 If people have already launched their site, I would request 
them to list
 them in the mailing list.
 So that we get an idea how far struts framework has reached, 
how popular
and
 powerful it is...
 Please people do write in your site, if its already launched.

 Panchasheel

 -Original Message-
 From: Rob Leland [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 1:46 PM
 To: Struts Users Mailing List
 Subject: Re: ANN: Site Launch


 James Childers wrote:

 I am proud to announce the successful launch of a major vacation
packaging
 site whose presentation tier has been built entirely with Struts:
 
 http://packaging.hotels.com/packaging/index.do
 

 It looks good. I didn't see any where on the site that mentioned that
 software from the Apache
 foundation was used, this has been discussed before see the thread:

 This should help out:

 http://marc.theaimsgroup.com/?l=struts-userm=103123221707143w=2

 Also see
 http://www.apache.org/LICENSE


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

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


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



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



RE: Populating Value Objects for the Business Tier

2003-05-31 Thread Steve Raeburn
ActionForms should carry a Strings only health advisory ;-)

Steve

 -Original Message-
 From: Jordan Reed [mailto:[EMAIL PROTECTED]
 Sent: May 30, 2003 11:04 AM
 To: Struts Users Mailing List
 Subject: Re: Populating Value Objects for the Business Tier


 I've been playing #3 (Just included the value objects in the form) and run
 into one of those things that probably makes people break into tears.

 I have int types in the value object... And since they cannot be
 null, when
 the form is prepopulated or repopulated they appear as 0
 instead of being
 blank or what the user entered.  Sad.

 -jdr

 On 5/28/03 9:53 PM, Andrew Hill [EMAIL PROTECTED] wrote:

  2  3 generally end in tears. They sound nice, but when you get
 down to the
  fiddly bits you will find it more problematic than you expect.
 
  As you mention, the action form is very much a view object. For a start
  everything in the actionForm will be strings, while your business object
  probably will not be. Secondly, while there is considerable
 overlap between
  your value object and your form, you will find (especially as
 your ui gets
  more complex) that the correlation is not 1 to 1 and that you
 are exerting a
  lot of effort to try and keep the two the same.
 
  Approach 3 is probably the worst - unless its for read only display - in
  that if the user enters a value that doesnt convert to your
 value objects
  property type you will want to redisplay the offending value
 string the same
  as the user typed it for them to correct it.
 
  Your best bet is to use approach 1. You may be interested to
 note that the
  BeanUtils class does have some methods that can make life
 simpler for you -
  copying property values and doing type conversions automatically (if I
  recall correctly).
 
  (Actually I generally copy the properties the 'hard' way, one
 by one in my
  action)
 
  -Original Message-
  From: Jordan Reed [mailto:[EMAIL PROTECTED]
  Sent: Thursday, 29 May 2003 12:29
  To: Struts Users Mailing List
  Subject: Populating Value Objects for the Business Tier
 
 
  All,
 
  I'm on a team that's trying to decided on a best practice for passing on
  populating our value objects that get passed to our business layer.  We
  currently have three techniques we've though up and I'm
 wonderful if anyone
  has a strong opinion on which one may be the best and why.
 
  The basic problem is that the user enters information into a
 form.  The form
  is a presentation object, and should not be passed to the
 business layer.
  So it's information needs to be in a presentation-agnostic
 interface before
  being passed to the data layer.
 
  1) Have the action class copy information from the form to a
 value object.
  Have a view helper copy information from the value object into
 the form (for
  pre-population)
 
  2) Have the form implement a value-object-like interface.  The business
  layer accepts objects with these business interfaces.  This way it is
  possible to pass the form objects to the business layer without
 the business
  layer knowing that they are presentation objects.
 
  3) Have the form simply include value objects as properties.
 Then use the
  nested taglibs to populate the value objects.  This way the
 Action can just
  pull the value object off directly and pass to the business
 layer.  A view
  helper can just set the value object on the form.
 
 
  -jdr


 -
 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: NPE with getResourceAsStream

2003-05-31 Thread Kris Schneider
So who's testing the test code ;-)? Glad it's working...

Quoting Raible, Matt [EMAIL PROTECTED]:

 It turned out to be an issue with my Cactus TestCase.  See solution marked
 -- below
 
 protected void setUp() throws Exception {
 super.setUp();
 servlet = new RegistrationServlet();
 servlet.init(config); -- Adding this fixed the problem.
 }
 
 Thanks for kicking my brain into gear.
 
 Matt
 
 -Original Message-
 From: Raible, Matt 
 Sent: Friday, May 30, 2003 12:55 PM
 To: 'Struts Users Mailing List'
 Subject: RE: NPE with getResourceAsStream
 
 
 I'm doing this in an execute(request,response) method that both doGet() and
 doPost() call.
 
 -Original Message-
 From: Kris Schneider [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 30, 2003 12:39 PM
 To: Struts Users Mailing List
 Subject: Re: NPE with getResourceAsStream
 
 
 Are you doing this in the constructor or an overridden init(ServletConfig)
 that
 hasn't invoked super.init(config)?
 
 Quoting Raible, Matt [EMAIL PROTECTED]:
 
  In a regular servlet, I'm trying to do the following:
  
  InputStream forms =
   
  getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
  
  But it's throwing a NPE, and validation.xml is in my WEB-INF folder.  Any
  ideas why this may be happening?
  
  Thanks,
  
  Matt
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Re: how can I find the Scaffold package?

2003-05-31 Thread Denis Avdic
Leon wrote:

Hi,

What is the download link of the Scaffold package?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

How about you do a google search on that?  It took me exactly 1min 15 
secs to find a download of the Scaffold package.



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


  1   2   3   >