Datasource causes a 503 / javax.servlet.UnavailableException

2004-04-01 Thread Slot
I've got the following datasource defined in my struts-config.xml to access
a mySQL db:

data-sources 
data-source 
set-property property=autoCommit value=true/ 
set-property property=driverClass value=org.gjt.mm.mysql.Driver/ 
set-property property=url value=jdbc:mysql://mysqldbhost:3306/test/ 
set-property property=user value=test/ 
set-property property=password value=test/ 
/data-source 
/data-sources 

Which causes this error:
503 Unavailable
javax.servlet.UnavailableException: Initializing application data source
org.apache.struts.action.DATA_SOURCE
at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j
ava:1091) 
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) 
at
org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServlet.j
ava:104) 
at javax.servlet.GenericServlet.init(GenericServlet.java:82) 
at com.caucho.server.http.Application.createServlet(Application.java:3111) 
at com.caucho.server.http.Application.loadServlet(Application.java:3062) 
at com.caucho.server.http.Application.initServlets(Application.java:1923) 
at com.caucho.server.http.Application.init(Application.java:1849) 
at
com.caucho.server.http.VirtualHost.startApplication(VirtualHost.java:1207) 
at com.caucho.server.http.VirtualHost.getInvocation(VirtualHost.java:1007) 
at
com.caucho.server.http.ServletServer.getInvocation(ServletServer.java:1247) 
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:243) 
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)

at com.caucho.server.TcpConnection.run(TcpConnection.java:139) 
at java.lang.Thread.run(Thread.java:534) 



Resin 2.1.11 (built Mon Sep 8 09:36:19 PDT 2003) 

But... harcoding in JSP does actually work: 
Connection oConnection =
DriverManager.getConnection(jdbc:mysql://mysqldbhost:3306/test, test,
test); 

I've played with the autoCommit, maxCount and minCount properties but it
doesn't help a bit. Same for mentioning port's and ip's. Why o' why doesn't
it work with Struts 1.1/Resin 2.1.11?



RE: feeding custom actionForm to a jsp page?

2004-04-01 Thread Takhar, Sandeep
one thought (I didn't follow the email exactly)...

use the same form names...

sandeep

-Original Message-
From: Max Kovalenkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 6:08 PM
To: [EMAIL PROTECTED]
Subject: feeding custom actionForm to a jsp page?


Hello,

I have a form for submitting data which can be optionally used to 
substitute new data instead of any other past entry by the same user. If 
you check a 'change' checkbox before pressing submit - brings you back 
to the same form, but now there's also a radio-button list of past 
entries, and you can choose one to write new data on top of. Original 
chain of events is:

prepop.java - submit.jsp - process.java - end.jsp

If a checkbox is checked, however, there is one more 'loop'(for 
populating list of past entries):

prepop.java - submit.jsp - prepop.java - submit.jsp - process.java 
- end.jsp


All I want is to be able to reproduce submitted values the second time 
around on submit.jsp, just like the validator does in case something's 
wrong. But it creates a new ActionForm when forwarded to for the second 
time and all the values are lost.. Is there a way to feed it my already 
populated actionForm?

This might be the clumsiest way to do this, but I'm relatively new to 
this and couldn't figure anything better by myself. Any tips are greatly 
appreciated.
Thanks.

Max


-
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: Unhandled Exception in the Validator?

2004-04-01 Thread Vijay.Nair
Can anyone please tell me where I can get the Struts 1.2 Jar file?

It does not seem to be up at the Jakarta Site?

Thanks,
VJ

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 01, 2004 6:02 PM
To: [EMAIL PROTECTED]
Subject: Unhandled Exception in the Validator?

I'm using a recently 1.2 nightly build, but I suspect this isn't a 1.2
issue 
necessarily. I think I'm pushing the infrastructure though.

Here's how:

I have a DynaValidatorActionForm which contains a List.

The List elements, in this case, happen to be instances of another
DynaBean, 
which inside of the populating Action, I instantiate, populate, and
add to 
the List.

So the page displays fine. And on it, say I enter eweew in a text box
entry 
corresponding to a form property that I have told the validator is 
depends=date (datePatternStrict MM/dd/).

The validator works (I get my message generated by the backend [no
popup], as 
the docs say it would be handled because I am using a
IndexedListProperty to 
get into the individual items.

BUT the following exception occurs from inside of the validator and I
didn't 
see anything in bugzilla. 

07:17:19,252  WARN GenericTypeValidator:222 - eweew

java.text.ParseException: Unparseable date: eweew

at java.text.DateFormat.parse(DateFormat.java:334)
at org.apache.commons.validator.GenericTypeValidator.formatDate
(GenericTypeValidator.java:213)
at org.apache.struts.validator.FieldChecks.validateDate
(FieldChecks.java:519)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:570)
at
org.apache.commons.validator.Field.validateForRule(Field.java:808)
at org.apache.commons.validator.Field.validate(Field.java:887)
at org.apache.commons.validator.Form.validate(Form.java:171)
at
org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.DynaValidatorActionForm.validate
(DynaValidatorActionForm.java:77)
at org.apache.struts.action.RequestProcessor.processValidate
(RequestProcessor.java:921)
at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:206)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1146)
at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:410)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at 

RE: Unhandled Exception in the Validator?

2004-04-01 Thread Takhar, Sandeep
I am curious, how do you create your dynabean and do you have a class for it that you 
have to create?

sandeep

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 7:32 AM
To: [EMAIL PROTECTED]
Subject: Unhandled Exception in the Validator?


I'm using a recently 1.2 nightly build, but I suspect this isn't a 1.2 issue 
necessarily. I think I'm pushing the infrastructure though.

Here's how:

I have a DynaValidatorActionForm which contains a List.

The List elements, in this case, happen to be instances of another DynaBean, 
which inside of the populating Action, I instantiate, populate, and add to 
the List.

So the page displays fine. And on it, say I enter eweew in a text box entry 
corresponding to a form property that I have told the validator is 
depends=date (datePatternStrict MM/dd/).

The validator works (I get my message generated by the backend [no popup], as 
the docs say it would be handled because I am using a IndexedListProperty to 
get into the individual items.

BUT the following exception occurs from inside of the validator and I didn't 
see anything in bugzilla. 

07:17:19,252  WARN GenericTypeValidator:222 - eweew

java.text.ParseException: Unparseable date: eweew

at java.text.DateFormat.parse(DateFormat.java:334)
at org.apache.commons.validator.GenericTypeValidator.formatDate
(GenericTypeValidator.java:213)
at org.apache.struts.validator.FieldChecks.validateDate
(FieldChecks.java:519)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:570)
at org.apache.commons.validator.Field.validateForRule(Field.java:808)
at org.apache.commons.validator.Field.validate(Field.java:887)
at org.apache.commons.validator.Form.validate(Form.java:171)
at org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.DynaValidatorActionForm.validate
(DynaValidatorActionForm.java:77)
at org.apache.struts.action.RequestProcessor.processValidate
(RequestProcessor.java:921)
at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:206)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1146)
at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:410)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeN
ext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeN
ext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke

Re: UrlValidator() takes options - but how?

2004-04-01 Thread Niall Pemberton
UrlValidator is not the class that is instantiated  by ValidatorAction
because it doesn't know anything about Struts resources - the Struts
FieldChecks.validateUrl() method calls commons GenericValidator which
instantiates the UrlValidator.

Rather than using the struts FieldChecks.validateUrl(), create you own
version which instantiates the url validator and picks up var values to
configure it. Something like:


field property=someUrl depends=myUrlValidator
  varvar-nameslashes/var-name
var-valuetrue/var-value
  /var
  varvar-namefragments/var-name
var-valuetrue/var-value
  /var
/field

   public static boolean validateUrl(Object bean,
ValidatorAction va, Field field,
ActionMessages errors,
HttpServletRequest request) {

String value = null;
if (isString(bean)) {
value = (String) bean;
} else {
value = ValidatorUtils.getValueAsString(bean,
field.getProperty());
}
int options = 0;

if (true.equals(field.getVarValue(slashes)))
 options += UrlValidator.ALLOW_2_SLASHES;

if (true.equals(field.getVarValue(fragments)))
 options += UrlValidator.ALLOW_2_SLASHES;

UrlValidator urlValidator = new UrlValidator(options);

if (!GenericValidator.isBlankOrNull(value) 
!urlValidator.isValid(value)) {
errors.add(field.getKey(), Resources.getActionMessage(request,
va, field));
return false;
} else {
return true;
}
}

- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 12:17 PM
Subject: UrlValidator() takes options - but how?



 In UrlValidator() in the validator package, one can set various options
 upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.

 However it appears from the code in
 ValidatorAction.getValidationClassInstance() that I can't actually set
 these at any point in the Validator framework so that they will be
 picked up when run under struts.

 I think I'm looking in the right place in the code.

 I was hoping that there would be some method for configuring this via
 validation.xml, but apparently not.

 Am I correct?

 Thanks
 Adam

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


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






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



RE: Unhandled Exception in the Validator?

2004-04-01 Thread Joe Hertz
I created a method in my Action subclass that implemented the goodies you'll 
find here.

http://www.javablogs.com/ViewEntry.jspa?id=128211

Boy This subject is coming up alot! :-)

 -Original Message-
 From: Takhar, Sandeep [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 01, 2004 7:53 AM
 To: Struts Users Mailing List
 Subject: RE: Unhandled Exception in the Validator?
 
 
 I am curious, how do you create your dynabean and do you have 
 a class for it that you have to create?
 
 sandeep
 



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



Re: Unhandled Exception in the Validator?

2004-04-01 Thread Niall Pemberton
Its just logging.

Its always done the date validation using SimpleDateFormat.parse() and using
the ParseException to return invalid - for some reason in 1.2 these are
now being logged - all you need to do is set your logging to ignore
warnings for commons validator.

Its not because you're pushing the infrastructure - looks like its going to
happen for any old date validation in 1.2 - raise a bugzilla if you're not
happy with just changing your logging configuration.

Niall

- Original Message - 
From: Joe Hertz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 1:31 PM
Subject: Unhandled Exception in the Validator?


 I'm using a recently 1.2 nightly build, but I suspect this isn't a 1.2
issue
 necessarily. I think I'm pushing the infrastructure though.

 Here's how:

 I have a DynaValidatorActionForm which contains a List.

 The List elements, in this case, happen to be instances of another
DynaBean,
 which inside of the populating Action, I instantiate, populate, and add
to
 the List.

 So the page displays fine. And on it, say I enter eweew in a text box
entry
 corresponding to a form property that I have told the validator is
 depends=date (datePatternStrict MM/dd/).

 The validator works (I get my message generated by the backend [no popup],
as
 the docs say it would be handled because I am using a IndexedListProperty
to
 get into the individual items.

 BUT the following exception occurs from inside of the validator and I
didn't
 see anything in bugzilla.

 07:17:19,252  WARN GenericTypeValidator:222 - eweew

 java.text.ParseException: Unparseable date: eweew

 at java.text.DateFormat.parse(DateFormat.java:334)
 at org.apache.commons.validator.GenericTypeValidator.formatDate
 (GenericTypeValidator.java:213)
 at org.apache.struts.validator.FieldChecks.validateDate
 (FieldChecks.java:519)
 at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
 org.apache.commons.validator.ValidatorAction.executeValidationMethod
 (ValidatorAction.java:570)
 at org.apache.commons.validator.Field.validateForRule(Field.java:808)
 at org.apache.commons.validator.Field.validate(Field.java:887)
 at org.apache.commons.validator.Form.validate(Form.java:171)
 at org.apache.commons.validator.Validator.validate(Validator.java:367)
 at org.apache.struts.validator.DynaValidatorActionForm.validate
 (DynaValidatorActionForm.java:77)
 at org.apache.struts.action.RequestProcessor.processValidate
 (RequestProcessor.java:921)
 at org.apache.struts.action.RequestProcessor.process
 (RequestProcessor.java:206)
 at org.apache.struts.action.ActionServlet.process
 (ActionServlet.java:1146)
 at org.apache.struts.action.ActionServlet.doPost
 (ActionServlet.java:410)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
 (ApplicationFilterChain.java:247)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter
 (ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke
 (StandardWrapperValve.java:260)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
 ext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke
 (StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke
 (ContainerBase.java:995)
 at org.apache.catalina.core.StandardContextValve.invoke
 (StandardContextValve.java:191)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
 ext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke
 (StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke
 (ContainerBase.java:995)
 at org.apache.catalina.core.StandardContext.invoke
 (StandardContext.java:2396)
 at org.apache.catalina.core.StandardHostValve.invoke
 (StandardHostValve.java:180)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
 ext(StandardPipeline.java:643)
 at org.apache.catalina.valves.ErrorDispatcherValve.invoke
 (ErrorDispatcherValve.java:170)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
 ext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke
 (ErrorReportValve.java:172)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
 ext(StandardPipeline.java:641)
 at org.apache.catalina.core.StandardPipeline.invoke
 (StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke
 (ContainerBase.java:995)
 at org.apache.catalina.core.StandardEngineValve.invoke
 (StandardEngineValve.java:174)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
 ext(StandardPipeline.java:643)
 at 

Re: Unhandled Exception in the Validator?

2004-04-01 Thread Niall Pemberton
http://www.apache.org/~martinc/struts/v1.2.0/

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 1:37 PM
Subject: RE: Unhandled Exception in the Validator?


Can anyone please tell me where I can get the Struts 1.2 Jar file?

It does not seem to be up at the Jakarta Site?

Thanks,
VJ

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 6:02 PM
To: [EMAIL PROTECTED]
Subject: Unhandled Exception in the Validator?

I'm using a recently 1.2 nightly build, but I suspect this isn't a 1.2
issue
necessarily. I think I'm pushing the infrastructure though.

Here's how:

I have a DynaValidatorActionForm which contains a List.

The List elements, in this case, happen to be instances of another
DynaBean,
which inside of the populating Action, I instantiate, populate, and
add to
the List.

So the page displays fine. And on it, say I enter eweew in a text box
entry
corresponding to a form property that I have told the validator is
depends=date (datePatternStrict MM/dd/).

The validator works (I get my message generated by the backend [no
popup], as
the docs say it would be handled because I am using a
IndexedListProperty to
get into the individual items.

BUT the following exception occurs from inside of the validator and I
didn't
see anything in bugzilla.

07:17:19,252  WARN GenericTypeValidator:222 - eweew

java.text.ParseException: Unparseable date: eweew

at java.text.DateFormat.parse(DateFormat.java:334)
at org.apache.commons.validator.GenericTypeValidator.formatDate
(GenericTypeValidator.java:213)
at org.apache.struts.validator.FieldChecks.validateDate
(FieldChecks.java:519)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:570)
at
org.apache.commons.validator.Field.validateForRule(Field.java:808)
at org.apache.commons.validator.Field.validate(Field.java:887)
at org.apache.commons.validator.Form.validate(Form.java:171)
at
org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.DynaValidatorActionForm.validate
(DynaValidatorActionForm.java:77)
at org.apache.struts.action.RequestProcessor.processValidate
(RequestProcessor.java:921)
at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:206)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1146)
at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:410)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeN
ext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service

.properties file

2004-04-01 Thread Ramil Mirhasanov
I am using Jbuilder9 Enterprise and trying to buid my 1.  example application with 
struts.

The problem is, I do not know which .properties file to create in 
order to be able to write: 

bean:message key=index.title/

javax.servlet.ServletException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
exception is given.

RE: .properties file

2004-04-01 Thread Brendan Richards
This is configured towards the bottom of the struts-config.xml file

For Example:
message-resources parameter=resources.application/

maps the default resources file:

resources/application.resources



-Original Message-
From: Ramil Mirhasanov [mailto:[EMAIL PROTECTED] 
Sent: 01 April 2004 15:31
To: [EMAIL PROTECTED]
Subject: .properties file

I am using Jbuilder9 Enterprise and trying to buid my 1.  example
application with struts.

The problem is, I do not know which .properties file to create in 
order to be able to write: 

bean:message key=index.title/

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
exception is given.

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



Re: Struts boooks: remommendations?

2004-04-01 Thread Jan Normann Nielsen
Rick Reumann wrote:

   I think Programming Jakarta Struts by 

   Chuck Cavaness is a bit better for a beginner.

I personally don't like this book. I think the Struts tag libraries are 
poorly documented (and differences for 1.0 which I'm using are not 
described) in this book and has few if no examples of usage. You are 
better off reading the online documentation. Just my 2.

Best regards,
Jan Nielsen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts boooks: remommendations?

2004-04-01 Thread Jan Normann Nielsen
Charles Jordan wrote:

Can you print the pdf?
 

I want to know this too. If I can't print the PDF of the Struts in 
action by Ted Husted and take it home for me to read, there is no point 
in buying the eBook even if it's cheaper.

Best regards,
Jan Nielsen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: checking tiles-defs.xml

2004-04-01 Thread Larry Meadors
It has a DTD. Any validating xml editor (like netbeans or jedit) will
detect issues when you try to save it.

Larry

 [EMAIL PROTECTED] 03/31/04 11:59 PM 
As my application grows, so does my
tiles-defs.xml file. Well, I must have mistyped
something because now when I go to run
an exception is thrown telling me there's
a syntax error in there somewhere. (Actually,
it says there is a missing /tiles-definitions.)
Reminds me of the old days when I was hacking
lex files that were several pages long and lex
would barf and output syntax error.
Anyway the file is 547 lines long and it would
be nice if I could just run it through some
well-formedness checker or validator. I checked
in google but didn't hook up with anything useful.
Any suggestions?

Dean Hoover


-
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: .properties file

2004-04-01 Thread Larry Meadors
ApplicationResources.properties, the defeult location is usually
WEB-INF/ApplicationResources.properties, but in your case it may be
configured to be elsewhere.

 [EMAIL PROTECTED] 04/01/04 7:30 AM 
I am using Jbuilder9 Enterprise and trying to buid my 1.  example
application with struts.

The problem is, I do not know which .properties file to create in 
order to be able to write: 

bean:message key=index.title/

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
exception is given.

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



Re: .properties file

2004-04-01 Thread Ramil Mirhasanov
I have chosen the problem like this, after surfing net  a little bit,
I added :

servlet
  servlet-nameaction/servlet-name
  servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name
   param-valuemypackage.ApplicationResources/param-value
 /init-param
  .../
/servlet
to web.xml

And created  mypackage.ApplicationResources.properties file.



- Original Message - 
From: Brendan Richards [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 5:42 PM
Subject: RE: .properties file


 This is configured towards the bottom of the struts-config.xml file
 
 For Example:
 message-resources parameter=resources.application/
 
 maps the default resources file:
 
 resources/application.resources
 
 
 
 -Original Message-
 From: Ramil Mirhasanov [mailto:[EMAIL PROTECTED] 
 Sent: 01 April 2004 15:31
 To: [EMAIL PROTECTED]
 Subject: .properties file
 
 I am using Jbuilder9 Enterprise and trying to buid my 1.  example
 application with struts.
 
 The problem is, I do not know which .properties file to create in 
 order to be able to write: 
 
 bean:message key=index.title/
 
 javax.servlet.ServletException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE
 exception is given.
 
 -
 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 boooks: remommendations?

2004-04-01 Thread Menke, John
imo Struts In Action seemed to contain more useful real world information
than other struts books i have purchased

-Original Message-
From: William T Hansley [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 10:02 AM
To: Struts Users Mailing List
Subject: Re: Struts boooks: remommendations?


I second this comment. The Cavaness It's not bad as a intermediate- to 
advanced-level book, but I tried to learn from this one first and found it
next to impossible. The examples are few and far between, and not 
explained from the basics up. They seem to assume some knowledge. And 
there's no examples or references for the tag libraries, and some of the 
tag concepts, especially when you're first learning, are 
next-to-impossible to glean from context.
My two favorites for learning Struts were Mastering Jakarta Struts by 
Goodwill (Wiley published), and Struts Kickstart by Turner and Bedell 
(Sams published). Between these two, I took off running and got my first 
app done.
Take care!
-Bill
Jan Normann Nielsen [EMAIL PROTECTED]
04/01/2004 09:48 AM
Please respond to Struts Users Mailing List
 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:Re: Struts boooks: remommendations?
Rick Reumann wrote:

I think Programming Jakarta Struts by 

Chuck Cavaness is a bit better for a beginner.

I personally don't like this book. I think the Struts tag libraries are 
poorly documented (and differences for 1.0 which I'm using are not 
described) in this book and has few if no examples of usage. You are 
better off reading the online documentation. Just my EUR2.
Best regards,
Jan Nielsen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: Question about logic:iterator, indexId and hidden fields

2004-04-01 Thread Karr, David
I think we're having trouble understanding what you're doing.  In
particular, you say that the nested:submit tag is evaluated before
the %=index% tag.  What do you mean by that?  Then, you are now
saying that after fixing your scriptlet expression reference, you say
that the nested:submit tag isn't replaced with an input tag.  Do
you mean that in the HTML output, you see nested:submit .. instead
of input ...?  If you're really seeing nested:submit ... in the
HTML output, then this would indicate that your taglib directive is
incorrect or not present.

 -Original Message-
 From: Eric Hodges [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 01, 2004 6:30 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Question about logic:iterator, indexId and hidden fields
 
 
 Thanks for the suggestion, but that doesn't work either.  The
 nested:submit tag isn't replaced with an input tag when I 
 use the syntax
 you suggest.  I've tried many variations on these syntaxes.  
 If the JSP
 expression get's parsed, the struts tags aren't understood.  
 If the struts
 tags are understood the JSP expression isn't parsed.
 
 Any other ideas?  Surely this is a common usage pattern.
 
 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 31, 2004 10:46 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Question about logic:iterator, indexId and hidden fields
 
 
 
 Eric Hodges [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I have a form with a list of elements on it.  Each element 
 has an Edit
  button associated with it.  When the user clicks the Edit 
 button for a
  specific element, I want to send back the value of indexId 
 in a hidden
 field
  on the form.  I can't figure out a clean way to do this.  The
 documentation
  says indexId will create a bean, but it really creates an 
 Integer (which
  isn't a JavaBean).  I've tried passing my indexId to a 
 Javascript function
  that sets the form's hidden field sort of like this:
 
  nested:submit propert=edit value=Edit
  onclick=setEditIndex(%=index%)/
 
  but the nested:submit tag is evaluated before the %=index% tag
 
 The problem is that you have illegal JSP syntax for the 
 'onclick' attribute.
 The attribute value must be a string literal or a scripting 
 expression. You
 cannot mix the two. Try this instead:
 
   onclick='%= setEditIndex( + index + ) %'
 
 --
 Martin Cooper
 
 
 
 
  Right now I've got some ugly JSP code that outputs the 
 submit element that
  calls the Javascript function that sets the hidden field.  
 There must be a
  simpler way.  Any ideas?
 
 
 
 
 -
 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: UrlValidator() takes options - but how?

2004-04-01 Thread Niall Pemberton
The problem with GenericValidator is that it has a single instance of
UrlValidator in a static variable, so you can't go changing its
configuration every time a url is validated in your webapp as it wouldn't be
thread safe. In fact if you want the option to configure it on a field by
field basis then you are going to need to create a new instance of the
UrlValidator each time - or have some clever mechanism that caches a
UrlValidator for each field -its a shame the ValidatorAction doesn't do
that.

Maybe modify FieldChecks.validateUrl() to check if any options/schemes have
been set (using var) - if they have then instantiate a new UrlValidator,
otherwise use the default GenericValidator.isUrl().

The other problem, which I usually forget is the javascript - if you allow
the server side to be configured then maybe the  javascript should also take
those options into account (although the date validation only works with the
datePatternStrict option in javascript unless its changed in 1.2).

Anyway my opinion is irrelevant as its the powers that be that you have to
convince to apply any patch you submit :-)

Niall


- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 3:24 PM
Subject: Re: UrlValidator() takes options - but how?


 Thanks for that Niall, you certainly know your stuff.

 I am thinking, if I change the UrlValidator in the source code, I could
 submit a patch to allow FieldChecks to set the var values from
 validation.xml.

 Currently, FieldChecks access UrlValidator via the GenericValidator:

 if (!GenericValidator.isBlankOrNull(value) 
  !GenericValidator.isUrl(value)) {

 Should I change this to:

   !GenericValidator.isUrl(value, allow2Slashes, noFragments,
 allowAllSchems)) {

 and edit GenericValidator accordingly, to pass the options in to
 UrlValidator.

 Is that a good idea?
 Adam


 On 04/01/2004 02:58 PM Niall Pemberton wrote:
  UrlValidator is not the class that is instantiated  by ValidatorAction
  because it doesn't know anything about Struts resources - the Struts
  FieldChecks.validateUrl() method calls commons GenericValidator which
  instantiates the UrlValidator.
 
  Rather than using the struts FieldChecks.validateUrl(), create you own
  version which instantiates the url validator and picks up var values
to
  configure it. Something like:
 
 
  field property=someUrl depends=myUrlValidator
varvar-nameslashes/var-name
  var-valuetrue/var-value
/var
varvar-namefragments/var-name
  var-valuetrue/var-value
/var
  /field
 
 public static boolean validateUrl(Object bean,
  ValidatorAction va, Field field,
  ActionMessages errors,
  HttpServletRequest request) {
 
  String value = null;
  if (isString(bean)) {
  value = (String) bean;
  } else {
  value = ValidatorUtils.getValueAsString(bean,
  field.getProperty());
  }
  int options = 0;
 
  if (true.equals(field.getVarValue(slashes)))
   options += UrlValidator.ALLOW_2_SLASHES;
 
  if (true.equals(field.getVarValue(fragments)))
   options += UrlValidator.ALLOW_2_SLASHES;
 
  UrlValidator urlValidator = new UrlValidator(options);
 
  if (!GenericValidator.isBlankOrNull(value) 
  !urlValidator.isValid(value)) {
  errors.add(field.getKey(),
Resources.getActionMessage(request,
  va, field));
  return false;
  } else {
  return true;
  }
  }
 
  - Original Message - 
  From: Adam Hardy [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, April 01, 2004 12:17 PM
  Subject: UrlValidator() takes options - but how?
 
 
 
 In UrlValidator() in the validator package, one can set various options
 upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
 
 However it appears from the code in
 ValidatorAction.getValidationClassInstance() that I can't actually set
 these at any point in the Validator framework so that they will be
 picked up when run under struts.
 
 I think I'm looking in the right place in the code.
 
 I was hoping that there would be some method for configuring this via
 validation.xml, but apparently not.
 
 Am I correct?
 
 Thanks
 Adam
 
 -- 
 struts 1.1 + tomcat 5.0.16 + java 1.4.2
 Linux 2.4.20 Debian
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -- 
 struts 1.2 + tomcat 5.0.19 + java 1.4.2
 Linux 2.4.20 Debian


 

Migrating from Struts to Portlets

2004-04-01 Thread Tambascio, Larry

Hi,

There's a rumbling in the not too distant future of my application, and it
involves a portal implementation.  This rumbling is approaching more quickly
than I fear Struts 2.0 (which I'm very excited about) is.  I am wondering if
anyone else has already dealt with this issue.

I'd like to be able to re-use my existing forms, actions, and JSP pages to
render the portlets as much as possible.  It seems like there should be a
fairly thin layer on top of struts that adapts the portlet environment to
struts (or vice-versa).  At kind of a low level, it seems that having a
portlet's processAction method delegate to a specific struts action should
be easy to do.  Capturing the actionForward from it in the request scope so
that the portlet's render method could simply include that page (forwards
apparently non-deterministic according to the spec) also seems relatively
trivial.  There would have to be an obvious refactoring of the JSP pages to
use the portlet tag's actionURL to generate action URLs for forms.

So, who has converted a Struts based app to a portlet presentation method??
What were you able to reuse?  What worked and what didn't??  What would you
do differently if you had to do it over again?  Obviously, I'd like to
minimize refactoring (perhaps building adapters) and maximize reuse.  :-)
And when Struts 2.0 DOES come out, hopefully I've done nothing to preclude
myself from returning to the fold, but that's kind of a low priority.  Could
a custom RequestProcessor that also implemented the Portlet interface do the
job??  I just honestly don't know, and am hoping to leverage some communal
experience.

Thanks,
-Larry

This email and its attachments are confidential under applicable law are 
intended for use of the senders addressee only, unless the sender expressly
agrees otherwise, or unless a separate written agreement exists between 
Iron Mountain and a recipient company governing communications between the 
parties and any data that may be so transmitted. Transmission of email over
the Internet is not a secure communications medium. If you are requesting or
have requested the transmittal of personal data, as defined in applicable
privacy laws, by means of email or in an attachment to email, you may wish
to select a more secure alternate means of transmittal that better supports
your obligations to protect such personal data. If the recipient of this 
message is not the recipient named above, and/or you have received this email
in error, you must take no action based on the information in this email.
You are hereby notified that any dissemination, misuse or copying or 
disclosure of this communication by a recipient who has received this message
in error is strictly prohibited. If this message is received in error please 
return this email to the sender and immediately highlight any error in 
transmittal. 
Thank You


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



iBatis caching not working

2004-04-01 Thread Andy Engle
Hi all,

I can't get iBatis caching to work for anything.  Worse yet, it seems
that I am doing what the error messages tell me to fix, but still
nothing.  The message I have been getting is:

org.jdom.JDOMException: Error on line 9: Attribute implementation
must be declared for element type cache-model.

But I have implementation specified, as follows:

  cache-model name=bir-cache implementation=LRU
flush-interval minutes=5/
flush-on-execute statement=insertBir/
flush-on-execute statement=updateBir/
flush-on-execute statement=deleteBir/
cache-property name=cache-size value=100 /
  /cache-model

Also, I have tried replacing LRU with
com.ibatis.db.sqlmap.cache.lru.LruCacheController, but I still get
the same problem.  Is there some other way I have to declare my
implementation?!

I have ibatis-db.jar and ibatis-sqlmap.jar in my /WEB-INF/lib
directory, but that hasn't seemed to matter.

What could I be doing wrong?  Thanks in advance for your help.


Andy


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



Re: .properties file

2004-04-01 Thread Mario St-Gelais
Ramil Mirhasanov wrote:

I have chosen the problem like this, after surfing net  a little bit,
I added :
servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valuemypackage.ApplicationResources/param-value
/init-param
 .../
/servlet
to web.xml
And created  mypackage.ApplicationResources.properties file.
 

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

I have the exact same problem.  In my web.xml, I use :
 servlet
   servlet-nameaction/servlet-name
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/config/struts-config.xml/param-value
   /init-param
   init-param
   param-nameapplication/param-name
   
param-valueca.ulaval.fsa.drdb.struts12.resources.ApplicationResources/param-value
   /init-param

And in struts-config.xml I got :

message-resources
   parameter=ca.ulaval.fsa.drdb.struts12.resources.ApplicationResources/
But still I get the same error messge.  The file exists in the above 
parameter definition.  I am puzzled!

--
_
Mario St-Gelais
www.gestionti.com
Good judgment comes from
experience- usually experience
which was the result of poor judgment
Bill Putnam


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


RE: Learning Struts

2004-04-01 Thread Amit Kumar Sharma
hai ashish,

there is nothing like knowing this or that, but struts mainly uses
servlet.

regards
Amit

-Original Message-
From: Ashi Sharma [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:55 AM
To: [EMAIL PROTECTED]
Subject: Learning Struts


Which are the core technologies (Servlet, XML etc.)
involved in the Struts Framework that a developer
should have knowledge of? Could you also please
mention the level of expertise required in each
technology?

Regards,
Ashi

=
That which does not kill you, only makes you stronger.

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/

-
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: Learning Struts

2004-04-01 Thread Jan Normann Nielsen
Ashi Sharma wrote:

Which are the core technologies (Servlet, XML etc.)
involved in the Struts Framework that a developer
should have knowledge of? Could you also please
mention the level of expertise required in each
technology?
 

I would say: Know how to code JavaBeans, a little XML, JSP pages and tag 
libraries. Then read the documentation and/or books. That's what I did.

Best regards,
Jan NIelsen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Migrating from Struts to Portlets

2004-04-01 Thread Tambascio, Larry

Robert,

That's interesting, and certainly worth noting.  I'll keep my eyes out for
that.  I agree it sounds kind of vendor specific, but...  How did your team
get around that?  Or are they still battling there?

I'm curious, how did your portlets invoke the Struts actions??  Did you
write a central (controller?) portlet, and have config files indicate which
action it should call??  Did you write a portlet for each actions??  Forgive
me for prying.  Can you describe the approach your team took?

Regards,
-Larry

-Original Message-
From: Robert Augustyn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 01, 2004 2:29 PM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: Migrating from Struts to Portlets


Larry,
We have concerted our app from Struts on Tomcat and
jboss to Struts on
Oracle Portal and jboss.
One problems which we run into was that some struts
jsp tags just would
not work.
I think this problem was Oracle Portal specific but I
do not know for
sure so this could be something to consider.
robert

-Original Message-
From: Tambascio, Larry
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 01, 2004 1:36 PM
To: '[EMAIL PROTECTED]'
Subject: Migrating from Struts to Portlets



Hi,

There's a rumbling in the not too distant future of my
application, and
it involves a portal implementation.  This rumbling is
approaching more
quickly than I fear Struts 2.0 (which I'm very excited
about) is.  I am
wondering if anyone else has already dealt with this
issue.

I'd like to be able to re-use my existing forms,
actions, and JSP pages
to render the portlets as much as possible.  It seems
like there should
be a fairly thin layer on top of struts that adapts
the portlet
environment to struts (or vice-versa).  At kind of a
low level, it seems
that having a portlet's processAction method delegate
to a specific
struts action should be easy to do.  Capturing the
actionForward from it
in the request scope so that the portlet's render
method could simply
include that page (forwards apparently
non-deterministic according to
the spec) also seems relatively trivial.  There would
have to be an
obvious refactoring of the JSP pages to use the
portlet tag's
actionURL to generate action URLs for forms.

So, who has converted a Struts based app to a portlet
presentation
method?? What were you able to reuse?  What worked and
what didn't??
What would you do differently if you had to do it over
again?
Obviously, I'd like to minimize refactoring (perhaps
building adapters)
and maximize reuse.  :-) And when Struts 2.0 DOES come
out, hopefully
I've done nothing to preclude myself from returning to
the fold, but
that's kind of a low priority.  Could a custom
RequestProcessor that
also implemented the Portlet interface do the job??  I
just honestly
don't know, and am hoping to leverage some communal
experience.

Thanks,
-Larry

This email and its attachments are confidential under
applicable law are

intended for use of the senders addressee only, unless
the sender
expressly agrees otherwise, or unless a separate
written agreement
exists between 
Iron Mountain and a recipient company governing
communications between
the 
parties and any data that may be so transmitted.
Transmission of email
over the Internet is not a secure communications
medium. If you are
requesting or have requested the transmittal of
personal data, as
defined in applicable privacy laws, by means of email
or in an
attachment to email, you may wish to select a more
secure alternate
means of transmittal that better supports your
obligations to protect
such personal data. If the recipient of this 
message is not the recipient named above, and/or you
have received this
email in error, you must take no action based on the
information in this
email. You are hereby notified that any dissemination,
misuse or copying
or 
disclosure of this communication by a recipient who
has received this
message in error is strictly prohibited. If this
message is received in
error please 
return this email to the sender and immediately
highlight any error in 
transmittal. 
Thank You


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



__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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

This email and its attachments are confidential under applicable law are 
intended for use of the senders addressee only, unless the sender expressly
agrees otherwise, or unless a separate written agreement exists between 
Iron Mountain and a recipient company governing communications between the 
parties and any data that may be so transmitted. Transmission of email over
the Internet is not a secure communications 

Re: Learning Struts

2004-04-01 Thread Nick Wesselman
The biggest problems I've had teaching people struts seem to involve a 
lack of understanding of the servlet API. Attributes and their scopes, 
request forwarding, etc. Also grasping the MVC separation of code is 
important. Ugh I wish Model 1 development were somehow impossible. I 
can't tell you how many headaches I've had dealing with apps developed 
using Model 1 or web developers who've always used it.

Nick

Ashi Sharma wrote:

Which are the core technologies (Servlet, XML etc.)
involved in the Struts Framework that a developer
should have knowledge of? Could you also please
mention the level of expertise required in each
technology?
Regards,
Ashi
=
That which does not kill you, only makes you stronger.
__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-
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: UrlValidator() takes options - but how?

2004-04-01 Thread Niall Pemberton
Adam,

I forwarded one of my replies by mistake to the developer list, but one of
the committers picked up on it so I thought I'd let you know if you'd like
to get into the dicussion over there

Niall


- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 3:24 PM
Subject: Re: UrlValidator() takes options - but how?


 Thanks for that Niall, you certainly know your stuff.

 I am thinking, if I change the UrlValidator in the source code, I could
 submit a patch to allow FieldChecks to set the var values from
 validation.xml.

 Currently, FieldChecks access UrlValidator via the GenericValidator:

 if (!GenericValidator.isBlankOrNull(value) 
  !GenericValidator.isUrl(value)) {

 Should I change this to:

   !GenericValidator.isUrl(value, allow2Slashes, noFragments,
 allowAllSchems)) {

 and edit GenericValidator accordingly, to pass the options in to
 UrlValidator.

 Is that a good idea?
 Adam


 On 04/01/2004 02:58 PM Niall Pemberton wrote:
  UrlValidator is not the class that is instantiated  by ValidatorAction
  because it doesn't know anything about Struts resources - the Struts
  FieldChecks.validateUrl() method calls commons GenericValidator which
  instantiates the UrlValidator.
 
  Rather than using the struts FieldChecks.validateUrl(), create you own
  version which instantiates the url validator and picks up var values
to
  configure it. Something like:
 
 
  field property=someUrl depends=myUrlValidator
varvar-nameslashes/var-name
  var-valuetrue/var-value
/var
varvar-namefragments/var-name
  var-valuetrue/var-value
/var
  /field
 
 public static boolean validateUrl(Object bean,
  ValidatorAction va, Field field,
  ActionMessages errors,
  HttpServletRequest request) {
 
  String value = null;
  if (isString(bean)) {
  value = (String) bean;
  } else {
  value = ValidatorUtils.getValueAsString(bean,
  field.getProperty());
  }
  int options = 0;
 
  if (true.equals(field.getVarValue(slashes)))
   options += UrlValidator.ALLOW_2_SLASHES;
 
  if (true.equals(field.getVarValue(fragments)))
   options += UrlValidator.ALLOW_2_SLASHES;
 
  UrlValidator urlValidator = new UrlValidator(options);
 
  if (!GenericValidator.isBlankOrNull(value) 
  !urlValidator.isValid(value)) {
  errors.add(field.getKey(),
Resources.getActionMessage(request,
  va, field));
  return false;
  } else {
  return true;
  }
  }
 
  - Original Message - 
  From: Adam Hardy [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, April 01, 2004 12:17 PM
  Subject: UrlValidator() takes options - but how?
 
 
 
 In UrlValidator() in the validator package, one can set various options
 upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
 
 However it appears from the code in
 ValidatorAction.getValidationClassInstance() that I can't actually set
 these at any point in the Validator framework so that they will be
 picked up when run under struts.
 
 I think I'm looking in the right place in the code.
 
 I was hoping that there would be some method for configuring this via
 validation.xml, but apparently not.
 
 Am I correct?
 
 Thanks
 Adam
 
 -- 
 struts 1.1 + tomcat 5.0.16 + java 1.4.2
 Linux 2.4.20 Debian
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -- 
 struts 1.2 + tomcat 5.0.19 + java 1.4.2
 Linux 2.4.20 Debian


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






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



RE: [OT] File explorer (tree view component) ...

2004-04-01 Thread Danilo Gurovich
You should probably use lazy evaluation. I've done this before using
Struts-layout with success.

Danilo Gurovich
Manager, Web Development
LowerMyBills.com
[EMAIL PROTECTED]
2401 Colorado Ave., 2nd Floor 
Santa Monica, CA 90404
(310) 998-6412

 


-Original Message-
From: Anand Stephen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 3:32 PM
To: 'Struts-User'
Subject: [OT] File explorer (tree view component) ...

Greetings,
Sorry for the off topic question.
Has any one used a tree view component, that has to process a very large
number of files ( 40,000) and browser is able to render this tree
quickly ( 1 sec)?
 
e.g. 
\---local
+---audio
+---colorswatches (as over 40,000) files 
 
+---kickers
|   +---gateway
|   +---home
|   \---thankyou
+---localbuttons
+---localgraphics
+---localnav
+---page_specific
|   +---advancedsearch
 
I have tried the nested tutorial from htttp://www.keyboardmonkey.com and

The tree component from
http://www.jenkov.dk/projects/treetag/treetag.jsp this component was
impressive.
I wanted to see if anyone else has run into this problem??
 
Any input would be greatly appreciated.
Thank you,
[sa]
 

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



Re: switching to struts-el

2004-04-01 Thread P. Hill
Dean A. Hoover wrote:
I have seen JSTL in Action on the
bookshelves. Is that a good book on the subject?
I found JSTL In Action to be a nice gentle introduction
and includes some very good applications of JSTL, but
the book is written for content providers and NOT for
Java developers.  So if you want to think about how to
work only with JSTL within your pages it is fine book.
If you want to know all the details and how to work more
with JSTL in various JSP, JavaBean and Struts configurations
you might also consider the JavaServer Pages book from O'Reilly.
Personally, I have both and wasn't planning on getting ride of
either.
Just my 2 cents.
-Paul


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


Re: Something after RequestProcessor adding extra / to URL? (was: URL validation)

2004-04-01 Thread Hubert Rabago
 So I'm pretty sure there is no / after example.com, but what I see in
 the browser is:
 
 http://www.example.com/?user=0123456
 
 Does anyone know where the extra '/' is coming from, or if it matters at
 all?

Now that I take a second look at it, I think it's possible that the browser
is the one adding the / after the http://www.example.com;.  Have you tried
this with different browsers and different versions?


--- Wendy Smoak [EMAIL PROTECTED] wrote:
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg96484.html
 
 In the Action, I have:
   log.info(redirecting to: +redirectURL);
   return new ActionForward( redirectURL, true );
 
 The logs say:
 15:53:45,640 - INFO edu.asu.vpia.struts.HarrisLoginAction - redirecting
 to: http://www.example.com?user=0123456
 15:53:45,640 - DEBUG org.apache.struts.action.RequestProcessor -
 processForwardConfig(ForwardConfig[name=null,path=http://www.example.com
 ?user=0123456,redirect=true,contextRelative=false])
 
 So I'm pretty sure there is no / after example.com, but what I see in
 the browser is:
 
 http://www.example.com/?user=0123456
 
 Does anyone know where the extra '/' is coming from, or if it matters at
 all?
 
 -- 
 Wendy Smoak
 Application Systems Analyst, Sr.
 ASU IA Information Resources Management 


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



validator integer required

2004-04-01 Thread Paul Barry
I have an ActionForm with an int property called id.  If I use the 
validator required validation, it always passes the validation, even 
if there is no request parameter called id.  Is this is correct 
behavior, or am I doing something wrong?

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


Re: [OT] UI Suggestion Request

2004-04-01 Thread Paul Barry
I have seen people create a link to a pop-up window next to the a text 
input box.  The pop-up window has a scrolling, possibly paged list of 
the descriptions you want the users to be able to select from.  Each 
description is a hyperlink and when the user clicks on one of the 
descriptions, the pop-window closes and uses javascript to update the 
input text field with the code corresponding to the link the user 
clicked on.

Avinash Gangadharan wrote:

Hello All,
   I have a field in a form which expects a predefined set of data existing
in the database. The dataset is of type code-description, where the user is
expected to select or enter a description and the form passes back a code
for it. This can be presented best in the form of a dropdown list. But my
problem is that this set of data is huge ( around 200 rows ) and the
descriptions for each code is also pretty long. What do you guys think could
be a good replacement of the drop down list to prevent any bad data entry. 
I want to force the users to do something like a search and select kind of
thing.

Thanks 
Avinash

-
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: Migrating from Struts to Portlets

2004-04-01 Thread Mete Kural
Hello Larry,

The open source eXo portal project has a Struts bridge to view Struts applications as 
JSR-168 portlets. I've never used it so am not familiar with it. You can check it out 
at http://www.exoplatform.org and join the mailing list to ask them questions.

Regards,
Mete

-- Original Message --
From: Tambascio, Larry [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
Date:  Thu, 1 Apr 2004 13:35:43 -0500 


Hi,

There's a rumbling in the not too distant future of my application, and it
involves a portal implementation.  This rumbling is approaching more quickly
than I fear Struts 2.0 (which I'm very excited about) is.  I am wondering if
anyone else has already dealt with this issue.

I'd like to be able to re-use my existing forms, actions, and JSP pages to
render the portlets as much as possible.  It seems like there should be a
fairly thin layer on top of struts that adapts the portlet environment to
struts (or vice-versa).  At kind of a low level, it seems that having a
portlet's processAction method delegate to a specific struts action should
be easy to do.  Capturing the actionForward from it in the request scope so
that the portlet's render method could simply include that page (forwards
apparently non-deterministic according to the spec) also seems relatively
trivial.  There would have to be an obvious refactoring of the JSP pages to
use the portlet tag's actionURL to generate action URLs for forms.

So, who has converted a Struts based app to a portlet presentation method??
What were you able to reuse?  What worked and what didn't??  What would you
do differently if you had to do it over again?  Obviously, I'd like to
minimize refactoring (perhaps building adapters) and maximize reuse.  :-)
And when Struts 2.0 DOES come out, hopefully I've done nothing to preclude
myself from returning to the fold, but that's kind of a low priority.  Could
a custom RequestProcessor that also implemented the Portlet interface do the
job??  I just honestly don't know, and am hoping to leverage some communal
experience.

Thanks,
-Larry

This email and its attachments are confidential under applicable law are 
intended for use of the senders addressee only, unless the sender expressly
agrees otherwise, or unless a separate written agreement exists between 
Iron Mountain and a recipient company governing communications between the 
parties and any data that may be so transmitted. Transmission of email over
the Internet is not a secure communications medium. If you are requesting or
have requested the transmittal of personal data, as defined in applicable
privacy laws, by means of email or in an attachment to email, you may wish
to select a more secure alternate means of transmittal that better supports
your obligations to protect such personal data. If the recipient of this 
message is not the recipient named above, and/or you have received this email
in error, you must take no action based on the information in this email.
You are hereby notified that any dissemination, misuse or copying or 
disclosure of this communication by a recipient who has received this message
in error is strictly prohibited. If this message is received in error please 
return this email to the sender and immediately highlight any error in 
transmittal. 
Thank You


-
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: Migrating from Struts to Portlets

2004-04-01 Thread Mete Kural
Hello again Larry,

Also the Liferay open source portal project just today announced that they passed the 
JSR-168 TCK tests, so there are now at least two open source portal projects that are 
completely JSR-168 compliant. Liferay has Struts integration in the portlet layer too. 
So I suggest you check out Liferay as well: http://www.liferay.com 
Then you can decide whether eXo or Liferay approach to make Struts apps portlet apps 
is best for you.

Regards,
Mete

-- Original Message --
From: Mete Kural [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date:  Thu,  1 Apr 2004 11:59:38 +0100

Hello Larry,

The open source eXo portal project has a Struts bridge to view Struts applications as 
JSR-168 portlets. I've never used it so am not familiar with it. You can check it out 
at http://www.exoplatform.org and join the mailing list to ask them questions.

Regards,
Mete

-- Original Message --
From: Tambascio, Larry [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
Date:  Thu, 1 Apr 2004 13:35:43 -0500 


Hi,

There's a rumbling in the not too distant future of my application, and it
involves a portal implementation.  This rumbling is approaching more quickly
than I fear Struts 2.0 (which I'm very excited about) is.  I am wondering if
anyone else has already dealt with this issue.

I'd like to be able to re-use my existing forms, actions, and JSP pages to
render the portlets as much as possible.  It seems like there should be a
fairly thin layer on top of struts that adapts the portlet environment to
struts (or vice-versa).  At kind of a low level, it seems that having a
portlet's processAction method delegate to a specific struts action should
be easy to do.  Capturing the actionForward from it in the request scope so
that the portlet's render method could simply include that page (forwards
apparently non-deterministic according to the spec) also seems relatively
trivial.  There would have to be an obvious refactoring of the JSP pages to
use the portlet tag's actionURL to generate action URLs for forms.

So, who has converted a Struts based app to a portlet presentation method??
What were you able to reuse?  What worked and what didn't??  What would you
do differently if you had to do it over again?  Obviously, I'd like to
minimize refactoring (perhaps building adapters) and maximize reuse.  :-)
And when Struts 2.0 DOES come out, hopefully I've done nothing to preclude
myself from returning to the fold, but that's kind of a low priority.  Could
a custom RequestProcessor that also implemented the Portlet interface do the
job??  I just honestly don't know, and am hoping to leverage some communal
experience.

Thanks,
-Larry

This email and its attachments are confidential under applicable law are 
intended for use of the senders addressee only, unless the sender expressly
agrees otherwise, or unless a separate written agreement exists between 
Iron Mountain and a recipient company governing communications between the 
parties and any data that may be so transmitted. Transmission of email over
the Internet is not a secure communications medium. If you are requesting or
have requested the transmittal of personal data, as defined in applicable
privacy laws, by means of email or in an attachment to email, you may wish
to select a more secure alternate means of transmittal that better supports
your obligations to protect such personal data. If the recipient of this 
message is not the recipient named above, and/or you have received this email
in error, you must take no action based on the information in this email.
You are hereby notified that any dissemination, misuse or copying or 
disclosure of this communication by a recipient who has received this message
in error is strictly prohibited. If this message is received in error please 
return this email to the sender and immediately highlight any error in 
transmittal. 
Thank You


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



Struts in Action: page:253

2004-04-01 Thread walkrustin
Ted Husted wrote on page 253 that we can use FindForwardAction in the 
following manner.

html:submit name=searchSearch/html:submit
html:submit name=newNew/html:submit

 actionpath=/userSearchFindForward
   name=userSearchForm
   type=org.apache.scaffold.FindForwardAction
   forward name=search path=/userSearch /
   forward name=new path=/newUserForward /
/action


When I run this code, I get an error because name attribute is not 
supported in the html:submit. I guess I am missing something here. 
Thanks for any insightful comment.

- walk rustin


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



Reading Form Data

2004-04-01 Thread Caroline Jen
Simply want to make sure that I am doing it correct.  

I am going to pick up what a user selects from a drop
down list created this way:

   ArrayList order = new ArrayList();
   order.add(new LabelValueBean(Descending,
DESC));
   order.add(new LabelValueBean(Ascending, ASC));
   saveResult(Tokens.MENU_ORDER,order,controls);

Do I code this way:

   String order = request.getParameter( order );



__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: .properties file

2004-04-01 Thread walkrustin
While debugging this problem it's easy to overlook the fact that 
struts-config.xml is loaded when the web server boots for the first 
time. I have come across many cases where the fix is put into 
struts-config.xml file but the server is not restarted; hence the old 
result shows up and the user believes that the solution didn't work. 
All I am saying is while testing do restart the web server.

- walk rustin.


--- In [EMAIL PROTECTED], Mario St-Gelais [EMAIL PROTECTED] 
wrote:
 Ramil Mirhasanov wrote:
 
 I have chosen the problem like this, after surfing net  a little 
bit,
 I added :
 
 servlet
   servlet-nameaction/servlet-name
   servlet-classorg.apache.struts.action.
ActionServlet/servlet-class
  init-param
param-nameapplication/param-name
param-valuemypackage.ApplicationResources/param-value
  /init-param
   .../
 /servlet
 to web.xml
 
 And created  mypackage.ApplicationResources.properties file.
   
 
 
 
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 
 I have the exact same problem.  In my web.xml, I use :
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.
ActionServlet/servlet-class
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/config/struts-config.xml/param-value
 /init-param
 init-param
 param-nameapplication/param-name
 
 param-valueca.ulaval.fsa.drdb.struts12.resources.
ApplicationResources/param-value
 /init-param
 
 And in struts-config.xml I got :
 
 message-resources
 parameter=ca.ulaval.fsa.drdb.struts12.resources.
ApplicationResources/
 
 But still I get the same error messge.  The file exists in the above 
 parameter definition.  I am puzzled!
 
 -- 
 _
 Mario St-Gelais
 www.gestionti.com
 Good judgment comes from
 experience- usually experience
 which was the result of poor judgment
 Bill Putnam
 
 
 
 
-
 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]



smart forwarding: page 253 html:sbumit name=abc - doesn't work

2004-04-01 Thread walkrustin
Ted wrote that FindForwardAction could be used in the following 
manner.

html:sbumit name=SAVESAVE/html:sbumit
html:sbumit name=DELETEDELETE/html:sbumit

action name=articleForm path=/do/article/submit
 type=org.apache.scaffold.FindForwardActoin

   forward name=save path=/do/article/save /
   forward name=delete path=/do/article/delete /

My question is:
html:submit tag doesn't have any attribute named name. Am I 
missing here something?

thanks.
- Walk rustin



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



Re: .properties file

2004-04-01 Thread Bryce Fischer
 And in struts-config.xml I got :
 
 message-resources
 parameter=ca.ulaval.fsa.drdb.struts12.resources.
ApplicationResources/
 
 But still I get the same error messge.  The file exists in the above 
 parameter definition.  I am puzzled!

Well, one thing that always gets me where you actually put the resource
file. For example, I specify this in my struts-config.xml:

message-resources parameter=resources.application/

so, in my web application directory I have the following:

web-app/WEB-INF/resources/application.properties.

Struts treats your parameter like its a package and class declaration 
(its relative to the WEB-INF). Think of it as a class
resources.application. if you had a class com.test, then it would be
located com/test.class

so in your case above, you'd have
web-app/WEB-INF/ca/ulaval/fsa/drdb/struts12/resources.properties

Don't know if this was your problem, but I figured I'd throw it out
there.

-- 
Bryce Fischer [EMAIL PROTECTED]


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



modules multiple resource file validator

2004-04-01 Thread p b
Hello,
with struts 1.1, seem every module should have at most one resource file if 
it want to work with validator. Is it true?
In other word, if I've 2 module each module must have its own .properties 
file and each file must contain errors.* resources (or any common resource 
definition)?

The DTD support multiple message-resources parameter=.../ tag.
In jsp I can get resource from different resource file with
bean:message key=my.resource.key bundle=messagesKey/myModuleName/
but I don't understand how do the same from with validator arg definition.
I've readed on this list something about properties inheritance
http://mail-archives.apache.org/eyebrowse/ReadMsg?listId=42msgNo=76694.
Does exists an official FAQ?
Thank you

_
Nuovo MSN Messenger con sfondi e giochi! http://messenger.msn.it/ Provalo 
subito!

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


Design Question

2004-04-01 Thread Erez Efrati
Hi, 
 
I am developing an EJB/Struts J2EE application. 
Up to now I have dealt with the design of the customer web application
side 
and I came to the admin area - the back office web application part. 
I should also point out that I am using the securityFilter filter for
authentication.
 
My question is what is recommended as for the admin web app? Should I
use only one single Web module that
Manages both customer and admin (back-office) tasks? And if so, how do I
enforce authentication rules in terms of URL structure? 
 
Or, should I have two separated Web modules (contexts) - one for the
Customer app, and the other for the Admin app?
 
I also saw something about Struts modules, is it related?
 
Thanks in advance,
 
- Erez
 


Re: Learning Struts

2004-04-01 Thread James Mitchell
On Thu, 1 Apr 2004, Nick Wesselman wrote:

 The biggest problems I've had teaching people struts seem to involve a
 lack of understanding of the servlet API. Attributes and their scopes,
 request forwarding, etc. Also grasping the MVC separation of code is
 important. Ugh I wish Model 1 development were somehow impossible. I
 can't tell you how many headaches I've had dealing with apps developed
 using Model 1 or web developers who've always used it.

Now now, don't give Model 1 too much of a hard time.  It has it's place.
Some people (like myself) might never know just how good you have it without
having gone the Model 1 route.



 Nick

 Ashi Sharma wrote:

 Which are the core technologies (Servlet, XML etc.)
 involved in the Struts Framework that a developer
 should have knowledge of? Could you also please
 mention the level of expertise required in each
 technology?
 
 Regards,
 Ashi
 
 =
 That which does not kill you, only makes you stronger.
 




-- 
James Mitchell
Software Developer / Open Source Evangelist
EdgeTech, Inc.




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



[OT] Re: Learning Struts

2004-04-01 Thread Michael McGrady
There is so much to know and so little that has to be known to get 
started.  The fact is that learning Struts and what you need to know is so 
different from what you need to know to care about Struts in the first 
place.  If you need to use Struts, you should know enough to do it.  Blah, 
blah, blah.  Know what I mean?

At 06:06 PM 4/1/2004, you wrote:
On Thu, 1 Apr 2004, Nick Wesselman wrote:

 The biggest problems I've had teaching people struts seem to involve a
 lack of understanding of the servlet API. Attributes and their scopes,
 request forwarding, etc. Also grasping the MVC separation of code is
 important. Ugh I wish Model 1 development were somehow impossible. I
 can't tell you how many headaches I've had dealing with apps developed
 using Model 1 or web developers who've always used it.
Now now, don't give Model 1 too much of a hard time.  It has it's place.
Some people (like myself) might never know just how good you have it without
having gone the Model 1 route.

 Nick

 Ashi Sharma wrote:

 Which are the core technologies (Servlet, XML etc.)
 involved in the Struts Framework that a developer
 should have knowledge of? Could you also please
 mention the level of expertise required in each
 technology?
 
 Regards,
 Ashi
 
 =
 That which does not kill you, only makes you stronger.
 


--
James Mitchell
Software Developer / Open Source Evangelist
EdgeTech, Inc.


-
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 boooks: remommendations?

2004-04-01 Thread Xuemin Guan
Yes, you can. Nowadays, printable is one of the
product's features. 
-- 
Xuemin Guan [EMAIL PROTECTED]


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



Re: Design Question

2004-04-01 Thread Bill Siggelkow
Erez, it depends a lot on the use cases.  If the admin integration to 
the customer app is all at the back-end (database) then I think you 
should try the separate web app approach.  The separate web app will 
most easily address the security issues.  If however, the admin app will 
be using substantial portions of the object model (classes) and 
presentation layer than you may want to consider having the admin 
functions be in the same web app.  I think using Struts modules can be 
useful here.  I would expand more but I am about to fall asleep.

Bill Siggelkow

Erez Efrati wrote:
Hi, 
 
I am developing an EJB/Struts J2EE application. 
Up to now I have dealt with the design of the customer web application
side 
and I came to the admin area - the back office web application part. 
I should also point out that I am using the securityFilter filter for
authentication.
 
My question is what is recommended as for the admin web app? Should I
use only one single Web module that
Manages both customer and admin (back-office) tasks? And if so, how do I
enforce authentication rules in terms of URL structure? 
 
Or, should I have two separated Web modules (contexts) - one for the
Customer app, and the other for the Admin app?
 
I also saw something about Struts modules, is it related?
 
Thanks in advance,
 
- Erez
 



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


Re: Something after RequestProcessor adding extra / to URL?

2004-04-01 Thread Craig McClanahan
Hubert Rabago wrote:

So I'm pretty sure there is no / after example.com, but what I see in
the browser is:
http://www.example.com/?user=0123456

Does anyone know where the extra '/' is coming from, or if it matters at
all?
   

Now that I take a second look at it, I think it's possible that the browser
is the one adding the / after the http://www.example.com;.  Have you tried
this with different browsers and different versions?
 

It is actually the server doing this, not the browser.

Both Apache's HTTPD server, and Tomcat, when you send them a URL like 
http://www.foo.com; will issue a redirect to http://www.foo.com/;.  In 
both cases, this ends up requesting the welcome file -- but the 
interesting thing is *why* this is done.  It's to ensure that relative 
URLs in the welcome file page are resolved correctly to resources in the 
same directory.

FWIW, I'm sure that http://www.example.com/?user=0123456; is a 
perfectly valid URL.  It just happens to have a zero-length path element.

Craig

	

--- Wendy Smoak [EMAIL PROTECTED] wrote:
 

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

In the Action, I have:
 log.info(redirecting to: +redirectURL);
 return new ActionForward( redirectURL, true );
The logs say:
15:53:45,640 - INFO edu.asu.vpia.struts.HarrisLoginAction - redirecting
to: http://www.example.com?user=0123456
15:53:45,640 - DEBUG org.apache.struts.action.RequestProcessor -
processForwardConfig(ForwardConfig[name=null,path=http://www.example.com
?user=0123456,redirect=true,contextRelative=false])
So I'm pretty sure there is no / after example.com, but what I see in
the browser is:
http://www.example.com/?user=0123456

Does anyone know where the extra '/' is coming from, or if it matters at
all?
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 
   



__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-
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: validator integer required

2004-04-01 Thread Adam Hardy
Actually most of the Validator and the DynaActionForm functionality is 
based on the assumption that you are using String for the type.

Using an int in your action form leaves the possibility open that 
someone will submit a non-int character, and then you will get an 
Exception message in tomcat that Validator can do nothing about.

Adam

On 04/02/2004 01:01 AM Paul Barry wrote:
validate is true.  I wrote my own greaterThan validation to make sure 
the property is greater than 0, which seems to work.  I haven't looked 
at how the validator works at all, but it seems that it checks the form 
bean, not the request parameters, to validate the values.  Is that the 
case?  If that is true, if I had a String property where I gave it some 
default value in my bean, like String property = default, when someone 
submits a form the validation would always pass because the property of 
the ActionForm is not null, regardless of whether or not the was a 
property request parameter.  This is example is stupid, because you 
would never have a default value on a require property, but the point is 
this may explain the behavior I am seeing with the int property.  The 
int in the form is not blank or null, because it is 0 (primitives can't 
be null), so therefore it passes the required validation.

The value we are talking about should match up to an oracle sequence 
generated int, so it always should be an int, which is why I made the 
ActionForm property an int.  I guess I could make it a String property 
in the ActionForm and just use the integer validation to make sure it 
is an int, even though the ActionForm property is a String?  Would that 
work?

Joe Hertz wrote:

Well, it's not the *expected* behavior.

First thing -- I'd make id a String. The validator parses String 
properties. Not having looked into the validator code myself, I 
suppose required *could* work for a non string property, but I sure 
wouldn't try it with a primative like int. Integer might have better 
results, but I'm speculating.
Just make id a String in the form and be done with it.

Aside from that, std questions about validator setup:

Is validate=true on your ActionMapping?

Are we talking about a ValidatorForm or a ValidatorActionForm? With 
the letter, you validate the Mapping name. with the former you 
validate the form name?

HTH,

Joe


-Original Message-
From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: Thursday, April 
01, 2004 5:38 PM
To: [EMAIL PROTECTED]
Subject: validator integer required

I have an ActionForm with an int property called id.  If I use the 
validator \required\ validation, it always passes the validation, 
even if there is no request parameter called id.  Is this is correct 
behavior, or am I doing something wrong?




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



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


RE: Struts boooks: remommendations?

2004-04-01 Thread Jesse Alexander (KXT)
Struts in Action printable?

Yes, you can print it without a problem. (I've done it too)
You just need a good color-printer for the nice cover page ;-)

hth
Alexander

-Original Message-
From: Jan Normann Nielsen [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 1. April 2004 16:50
To: Struts Users Mailing List
Subject: Re: Struts boooks: remommendations?


Charles Jordan wrote:

Can you print the pdf?
  

I want to know this too. If I can't print the PDF of the Struts in 
action by Ted Husted and take it home for me to read, there is no point 
in buying the eBook even if it's cheaper.

Best regards,
Jan Nielsen

-
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: TokenProcesor and synchronization

2004-04-01 Thread Jose Ramon Diaz

Hi,

  What do you mean? The action is synchronized with some attribute related
to one user, so the synchonization is for the same user, isn´t it?

 -Mensaje original-
 De: Takhar, Sandeep [mailto:[EMAIL PROTECTED]
 Enviado el: jueves, 01 de abril de 2004 14:29
 Para: Struts Users Mailing List
 Asunto: RE: TokenProcesor and synchronization
 
 
 I read this, but isn't the action used by many different 
 people and not just one?  Seems like the wrong approach, but 
 I may be missing something.
 
 sandeep
 
 -Original Message-
 From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 01, 2004 4:28 AM
 To: 'Struts Users Mailing List'
 Subject: TokenProcesor and synchronization
 
 
 
 Hello,
 
   I have an interesting problem. We need to avoid duplicate 
 form submission
 as the load in server may be heavy.
   I´ve read 
 http://www.javaworld.com/javatips/jw-javatip136_p.html
 
   and the API of TokenProcessor. 
   I think I know the way of achieving that the last HTTP POST 
 of the user
 (if he hits the sumbit button twice or more) returns the same 
 forward as the
 first submission and the rest of the posts doesn´t execute, as will be
 waiting synchronized.
 
   BUT, this can work when the Token in JSP that submits the form is
 reloaded, but ...
What happens with FRAMES? We have the submit button in one 
 frame and the
 target of the form in another frame. So the TOKEN isn´t reloaded after
 hitting the submit button.
 
Any idea about how to achieve the synchronization of the 
 submits if there
 are frames?
 
 Thanks a lot in advance!!!
 
   Jose R.
 
   
 
 
 -
 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]