Using SSL Extension and Workflow Extension together

2004-03-22 Thread Scott Ryan
I would like to use the Workflow extension and the SSL/Non SSL extension
together.  Is this possible?  It looks like they replace the capability of
the request processor and that they are mutually exclusive.  Is there a way
to use both?  I am using tiles to support my application.  I am able to get
them working one at a time but need to combine them together for some
applications.

Thanks

Scott D. Ryan
Director, J2EE Architecture and Development
Soaring Eagle LLC.
9742 S. Whitecliff Place
Highlands Ranch, Co. 80129
(303) 263-3044
[EMAIL PROTECTED]
BEA Technical Director



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



How to generate the document ,converting the xml files to html files.

2004-01-19 Thread Ryan Zheng
Hi, all

I have build the struts source code successfully by maven. But I don't know how to
generate the document.

What's the differences between the xdocs directory and docs directory. Both 
xml style struts documents.


Thank you ! 



Ryan


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



Re: Cactus vs StrutsTestCase

2004-01-17 Thread Ryan Zheng
Hi, Ashikuzzaman!

I use StrutsTestCase to test my struts-based web tier action. Because 
StrutsTestCase
use mock object to mock the container. So you needn't start your container(tomcat or 
jboss)
to test your action class. It's a very fast way to test.
However, StrutsTestCase can not mock EJB call. So if your web application 
contains EJB
you should use cactus, which can start jboss automatically to test your code, or you 
use the MockEJB to mock your ejb call.



=== 2004-01-17 21:50:00  Original Message:===

>My new project is going to use Struts, Hibernate, XDoclets, Ant etc.
>together in a Debian O/S plus Oracle backend. For that project we found that
>there are two primary testing strategies used in server-side testing: mock
>object (MO) and in-container (IC). I got a look of what is what but would
>like to know which approach is generally used more?
>
>We also found two open source projects are popular for this testing - Apache
>Cactus and StrutsTestCase. Now which one should fit better for testing
>Struts applications? I mean pros and cons.
>
>Any comment or lights please?
>
>Regards,
>
>Muhammad Ashikuzzaman (Fahim)
>SCJP, SCWCD, IBM WebSphere and XML Developer
>Senior Software Engineer, SurroundApps Inc.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>.

= = = = = = = = = = = = = = = = = = = =

Thank you.


Ryan


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



Re: java virtual machine crashed

2004-01-17 Thread Ryan Zheng
Hi, Otto, Frank!

I had even faced this problem. I think maybe it'srobably because of jdk1.4.2. 
Laterly

I found that it's because of your package reference conflict. But it can work well 
under
jdk1.4.1.So  after that I use jdk 1.4.1.


=== 2004-01-16 15:27:00  Original Message:===

>Hello,
>
>I get some times following error and I don't know why. :-(
>
>Heap at VM Abort:
>Heap
> def new generation   total 3456K, used 3064K [0x4499, 0x44d5, 0x44e7)
>  eden space 3072K,  98 used [0x4499, 0x44c830a8, 0x44c9)
>  from space 384K,  11 used [0x44c9, 0x44c9b200, 0x44cf)
>  to   space 384K,   0 used [0x44cf, 0x44cf, 0x44d5)
> tenured generation   total 45712K, used 37834K [0x44e7, 0x47b14000, 0x4899)
>   the space 45712K,  82 used [0x44e7, 0x47362810, 0x47362a00, 0x47b14000)
> compacting perm gen  total 16896K, used 16751K [0x4899, 0x49a1, 0x4c99)
>   the space 16896K,  99 used [0x4899, 0x499ebe40, 0x499ec000, 0x49a1)
>
>Local Time = Fri Jan 16 14:54:50 2004
>Elapsed Time = 13685
>#
># HotSpot Virtual Machine Error : 11
># Error ID : 4F530E43505002EF
># Please report this error at
># http://java.sun.com/cgi-bin/bugreport.cgi 
><http://java.sun.com/cgi-bin/bugreport.cgi>
>#
># Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)
>#
>
>Has anyone an idea?
>
>
>Regards,
>
>Frank

= = = = = = = = = = = = = = = = = = = =

Thank you.


Ryan


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



Re: Checkbox and Map ActionForm

2003-11-26 Thread Ryan
The array generated from selecting multiple checkboxes with the same 
name is not being passed as a whole value into the action form.  Instead 
only the first value is being set as the value.  I was wondering how you 
would get the whole array into the action form.

Thanks
Ryan


Ricky wrote:
why not use JSTL 
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 12:31 AM
Subject: Checkbox and Map ActionForm


I have checkboxes on my form that have multiple options/group.
The name for each group of checkboxes is generated from the database, so
I decided to use a map on my action form to collect the checkbox values
since the names of the checkbox are not known.
However, when more than one option is selected within a group, BeanUtils
turns the array passed from the checkbox into the first value of the
array.

For example, if for box1 1,3,4 are selected, box1's value in the map is 1.

Is there a way to collect the values submitted by a checkbox group
without knowing the name of this group beforehand?
Thanks
Ryan


The html form:


1
2
3
4
5

a
b
c



The action form

public class FooForm extends ActionForm {

private final Map values = new HashMap();

public void setValue(String key, Object value){
values.put(key, value);
}
public Object getValue(String key){
return values.get(key);
}
}



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


Checkbox and Map ActionForm

2003-11-26 Thread Ryan
I have checkboxes on my form that have multiple options/group.
The name for each group of checkboxes is generated from the database, so 
I decided to use a map on my action form to collect the checkbox values 
since the names of the checkbox are not known.

However, when more than one option is selected within a group, BeanUtils
turns the array passed from the checkbox into the first value of the array.
For example, if for box1 1,3,4 are selected, box1's value in the map is 1.

Is there a way to collect the values submitted by a checkbox group 
without knowing the name of this group beforehand?

Thanks
Ryan


The html form:


1
2
3
4
5

a
b
c



The action form

public class FooForm extends ActionForm {

private final Map values = new HashMap();

public void setValue(String key, Object value){
values.put(key, value);
}
public Object getValue(String key){
return values.get(key);
}
}



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


Array of values

2003-10-09 Thread Ryan
I used  "Struts Tip #6 - Use an array to capture multiple parameters" 
http://www.jguru.com/faq/view.jsp?EID=915898 on my form to capture 
multiple parameters.

When I loop through these parameters and create an object for each row 
to add to an array list, the process gets expensive when there are many 
rows.

eg.

ArrayList rows = new ArrayList();

//rowParameter1, and rowParameter2 are arrays
//passed by the form
for (int i = 0; i:
}

Is there a way to avoid this new in the for loop?

Thanks
Ryan


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


Re: html error

2003-09-04 Thread Ryan
Worked, thanks again.

Ryan

Chen, Gin wrote:

There's a way to do this using html:messages instead of html:errors.
Convert your code to (untested so please check syntax if you get an error):



Optionally you can define a resource property in your ApplicationResources:
errors.header=
or
errors.prefix=
-Tim

-Original Message-
From: Ryan [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:34 PM
To: [EMAIL PROTECTED]
Subject: Re: html error
How would I check to see if that specific error existed?
I would like to write the message after a break  below the text box 
when the message is present, and have no break when it is not.

For example:
if (fieldSample${count}) then
 print error message
Ryan

Ryan wrote:

Thanks, that worked.

Ryan

Slattery, Tim - BLS wrote:


When I try and set the html error attribute property using a jsp 
expression nothing shows up.











Note: The variable count is just an integer that gets incremented 
each iteration of the loop.


An easy way out would be to use the html-el tags:



That said, I have no clue why your  tag won't work.

--
Tim Slattery
[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: html error

2003-09-04 Thread Ryan
How would I check to see if that specific error existed?
I would like to write the message after a break  below the text box 
when the message is present, and have no break when it is not.

For example:
if (fieldSample${count}) then
print error message
Ryan

Ryan wrote:
Thanks, that worked.

Ryan

Slattery, Tim - BLS wrote:

When I try and set the html error attribute property using a jsp 
expression nothing shows up.


 




 

Note: The variable count is just an integer that gets incremented 
each iteration of the loop.


An easy way out would be to use the html-el tags:



That said, I have no clue why your  tag won't work.

--
Tim Slattery
[EMAIL PROTECTED]


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


Re: html error

2003-09-03 Thread Ryan
Thanks, that worked.

Ryan

Slattery, Tim - BLS wrote:

When I try and set the html error attribute property using a jsp 
expression nothing shows up.
 


 

Note: The variable count is just an integer that gets 
incremented each iteration of the loop.


An easy way out would be to use the html-el tags:



That said, I have no clue why your  tag won't work.

--
Tim Slattery
[EMAIL PROTECTED]


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


html error

2003-09-03 Thread Ryan
When I try and set the html error attribute property using a jsp 
expression nothing shows up.



Note: The variable count is just an integer that gets incremented each 
iteration of the loop.

The property attribute that I want is fieldSample1 and when I hardcode it



the correct error message is displayed.

Thanks
Ryan


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


Re: Action Problem

2003-09-03 Thread Ryan
My mistake, It wasn't reaching PageTwoAction.

Ryan

Ryan wrote:

I have implemented a workflow application and am having problems when 
the last page in the workflow fails validation.  When it fails, the 
first page in the workflow is displayed.  Here are my action mappings.



 path="/setupSampleForm"
 type="framework.SetupSampleFormAction" name="sampleForm"
 scope="request"
 validate="false"
 input="/pages/sampleSubmissionForm.jsp">
 
 key="exception.database.error"
 type="framework.exceptions.DatastoreException"
 path="/pages/errors.jsp" />
 
  name="continue"
  path="/pages/sampleSubmissionForm.jsp" />


path="/sampleSubmitted"
type="framework.SampleSubmittedAction"
name="completedForm"
scope="request">
   
   name="continue"
   path="/pages/sampleSubmitted.jsp"
   redirect="false" />


path="/pageOneAction"
type="framework.PageOneAction"
name="sampleForm"
scope="request"
input="/do/setupSampleForm">

name="continue"
path="/pages/sampleSubmissionForm.jsp"
redirect="false" />


 path="/pageTwoAction"
 type="framework.PageTwoAction"
 name="sampleForm"
 scope="request"
 input="/do/pageOneAction">
 
 name="success"
 path="/do/sampleSubmitted"
 redirect="false" />


The action setupSampleForm puts the needed values into request scope in 
order to populate combo boxes.  It is the input value for pageOneAction 
and when validation fails for page one it is called in order to 
repopulate the request scope beans. This is ok.
When PageTwo fails validation, the action setupSampleForm gets called 
when I want PageOneAction to be called in order to repopulate the beans 
needed by PageTwo.  I set the input to pageOneAction for pageTwoAction 
but this problem still occurs.
Is this occuring because pageOneAction also has an Action for an input?

Thanks
Ryan


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


Action Problem

2003-09-03 Thread Ryan
I have implemented a workflow application and am having problems when 
the last page in the workflow fails validation.  When it fails, the 
first page in the workflow is displayed.  Here are my action mappings.



 path="/setupSampleForm"
 type="framework.SetupSampleFormAction" name="sampleForm"
 scope="request"
 validate="false"
 input="/pages/sampleSubmissionForm.jsp">
 
 key="exception.database.error"
 type="framework.exceptions.DatastoreException"
 path="/pages/errors.jsp" />
 
  name="continue"
  path="/pages/sampleSubmissionForm.jsp" />


path="/sampleSubmitted"
type="framework.SampleSubmittedAction"
name="completedForm"
scope="request">
   
   name="continue"
   path="/pages/sampleSubmitted.jsp"
   redirect="false" />


path="/pageOneAction"
type="framework.PageOneAction"
name="sampleForm"
scope="request"
input="/do/setupSampleForm">

name="continue"
path="/pages/sampleSubmissionForm.jsp"
redirect="false" />


 path="/pageTwoAction"
 type="framework.PageTwoAction"
 name="sampleForm"
 scope="request"
 input="/do/pageOneAction">
 
 name="success"
 path="/do/sampleSubmitted"
 redirect="false" />


The action setupSampleForm puts the needed values into request scope in 
order to populate combo boxes.  It is the input value for pageOneAction 
and when validation fails for page one it is called in order to 
repopulate the request scope beans. This is ok.
When PageTwo fails validation, the action setupSampleForm gets called 
when I want PageOneAction to be called in order to repopulate the beans 
needed by PageTwo.  I set the input to pageOneAction for pageTwoAction 
but this problem still occurs.
Is this occuring because pageOneAction also has an Action for an input?

Thanks
Ryan


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


Request variables and validation

2003-09-03 Thread Ryan
I am having trouble with request variables and validation.  Before a 
page is called, I prepopulate a combo box with values from a database. 
When validation (dynaforms validate) finds errors on the form the bean 
that prepopulated the combo box is not in the request scope anymore.

This was initially solved by placing the action that sets up the form as 
the input to the action that was called next. But, this fails when I 
move the setupAction to be part of the DispatchAction, which is involved 
with PageOne and PageTwo of my form, because then the input to the 
Action is the Action itself.  This results in constant calls to the same 
Action and no page being displayed.

Is there a way to acheive this or do I have to move my setup to a 
separate action?

Thanks
Ryan


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


javascript not working after validate

2003-08-28 Thread ryan
I have some javascript functions on my form that stop working when the 
validate method for the form returns ActionErrors.  Has anyone run into 
this problem before? This occurs in both IE and mozilla

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


PropertyMessageResourcesFactory ClassNotFoundException

2003-07-15 Thread Jim Ryan
I have a fresh installation of the following on Windows XP:

 

- Java 1.3.1_08 SDK

- Tomcat 3.2.3

- Struts 1.1

 

If I run Tomcat it starts fine, and all the examples work.

 

However, if I drop the Struts 1.1 "struts-blank.war" or "struts-example.war"
into the tomcat/webapps dir, I get the following exception when starting
Tomcat:

 

2003-07-15 16:44:40 - ContextManager: Adding context Ctx( /examples )
2003-07-15 16:44:40 - ContextManager: Adding context Ctx( /admin ) Starting
tomcat. Check logs/tomcat.log for error messages 2003-07-15 16:44:40 -
ContextManager: Adding context Ctx(  ) 2003-07-15 16:44:40 - ContextManager:
Adding context Ctx( /struts-example ) 2003-07-15 16:44:40 - ContextManager:
Adding context Ctx( /test ) [ERROR] MessageResourcesFactory -
-MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: 

ry>org.apache.struts.util.PropertyMessageReso

rcesFactory

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.ja

a:207)

at
org.apache.struts.util.MessageResourcesFactory.createFactory(Message

esourcesFactory.java:192)

at
org.apache.struts.util.MessageResources.getMessageResources(MessageR

sources.java:576)

at
org.apache.struts.util.RequestUtils.(RequestUtils.java:134)

at
org.apache.struts.util.MessageResourcesFactory.createFactory(Message

esourcesFactory.java:192)

at
org.apache.struts.util.MessageResources.getMessageResources(MessageR

sources.java:576)

at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.ja

a:1329)

at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:464)

at javax.servlet.GenericServlet.init(GenericServlet.java:258)

at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317

 

at org.apache.tomcat.core.Handler.init(Handler.java:215)

at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)

at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadO

StartupInterceptor.java:130)

at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.jav

:491)

at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)

at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)

at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

 

[ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory
java.lang.ExceptionInInitializerError:
java.lan .NullPointerException

at
org.apache.struts.util.MessageResources.getMessageResources(MessageR

sources.java:577)

at
org.apache.struts.util.RequestUtils.(RequestUtils.java:134)

at
org.apache.struts.util.MessageResourcesFactory.createFactory(Message

esourcesFactory.java:192)

at
org.apache.struts.util.MessageResources.getMessageResources(MessageR

sources.java:576)

at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.ja

a:1329)

at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:464)

at javax.servlet.GenericServlet.init(GenericServlet.java:258)

at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317

 

at org.apache.tomcat.core.Handler.init(Handler.java:215)

at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)

at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadO

StartupInterceptor.java:130)

at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.jav

:491)

at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)

at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)

at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

 

cannot load servlet name: action: null

2003-07-15 16:44:41 - PoolTcpConnector: Starting HttpConnectionHandler on
8080 2003-07-15 16:44:41 - PoolTcpConnector: Starting Ajp12ConnectionHandler
on 8007

 

 

Unfortunately I am stuck with Java 1.3.1 and Tomcat 3.2.3, so I can't
upgrade these tools. 

 

The Struts 1.1 site and docs claim to be Tomcat 3.2.* compatible. Hmmm. I
have searched far and wide for a solution, and although I have found folks
who have posted the same problem, I have yet to find an answer.

 

Out of curiosity I tried the Struts 1.0.2 "struts-example.war" and it works
fine.

 

Also, I have tried upgrading Tomcat's jaxp to 1.2, and it had no effect.

 

I'm hoping someone on this list might be able to help.

 

Thanks!

 

 



Logging error message

2003-07-15 Thread Ryan Cuprak

 Does anyone know how to solve the exception trace below? Both commons
logging and log4j are in the lib directory. Is this a class loading problem?

 -Ryan


avax.servlet.ServletException
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:359)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
at java.lang.Thread.run(Thread.java:554)

root cause 
java.lang.ExceptionInInitializerError
at org.apache.struts.taglib.html.HtmlTag. (HtmlTag.java:94)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:68)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at

Adding id attributes to tags

2003-06-30 Thread Ryan Shillington

In order to test my application with HTTPUnit, I need
to be able to identify my links.  I can't figure out a
way to put an id inside of the link when using the
 tag.

I have a hard time believing that I'm the first to us
HTTPUnit with struts :-).  I've checked the archives
and couldn't come up with anything.  Anybody?

I'm using Struts 1.1

Thanks,

Ryan


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

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



Problem with html:message

2003-03-17 Thread Ryan Cuprak
 

Hello,

 While I have had no problems getting errors to display I am unable to
get messages displayed.

 

 In my jsp page I have the following:





<:write
name="message"/>







and in the action which loads this pages I have:

if ( !authenticate.authenticate(userID,password) ) {

if ( authenticate.isLocked() ) {

errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("login.locked"));

} else {

messages.add(ActionMessages.GLOBAL_MESSAGE,new
ActionMessage("login.failure"));

}

saveErrors(request,errors);

saveMessages(request,messages);

return ( new ActionForward(mapping.getInput()));

 

Does anyone know why the html:message tag isn't displaying the messages?
The only time it will display a bullet (without any text) is if there is
an error (huh?). Otherwise my message never gets displayed. Resources
are setup properly as I am able to retrieve the 'login.failure' text via
bean:message.I am using the RC1.1 candidate. Is this a bug?

 

 Thanks,

  Ryan

 

 

 



java.lang.IllegalArgumentException and the '/'

2003-03-11 Thread Ryan Cuprak

Just curious as to how-to resolve the exception below-
java.lang.IllegalArgumentException: Path main.jsp does not start with a "/"?
What is the reference to 'slash' mean? I have tried adding a slash before
'main' (name attribute) in the global forwards but get the same error. This
almost seems as voodoo to me - I understand using the slash to root it at
the 'root' of the webapp but every permutation of slash, no slash, slash
here there and everywhere doesn't rid me of the exception. In my case, the
validator is trying to redisplay the 'main.jsp' page as data for several
fields is invalid.


 Thanks,
   Ryan

Struts config snippet:
   










Exception snippet:
java.lang.IllegalArgumentException: Path main.jsp does not start with a "/"
character
at 
org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Application
Context.java:572)
at 
org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(Appli
cationContextFacade.java:174)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
51)
at 
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ
estProcessor.java:1005)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j
ava:975) 


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



multi page forms and action mappings

2003-02-27 Thread Ryan Kennedy
I'm using Struts 1.1 with the Validator plugin on a form with multiple steps.
Is there a way in the action mapping to have the "input" attribute of the
"action" be based upon which step the request is coming from? If I specify
input="step1", then form validation failures on step2 go back to the step1
page.

I didn't see anything in the Validator documentation or in the list archives,
but I can't imagine this is a new problem.

Ryan Kennedy
Software Engineer
Jel, Inc.
tel. 916.447.5463 ext. 133
fax. 916.447.5465
web. www.jel.net

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



RE: Running example app on Websphere 4.0

2003-02-25 Thread Owens, Ryan
May not be related at all, but:

I'm not using Websphere (using Jboss with Tomcat) but I get that same error:
java.lang.ClassCastException: org.apache.commons.logging.impl.Log4jFactory 

whenever I recompile my classes but don't restart JBoss/Tomcat.

once I restart them everything works fine.
So maybe try restarting Websphere. 
Hope that helps.

  Ryan Owens

-Original Message-
From: Shkolnik, Mike [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 6:46 PM
To: 'Struts Users Mailing List'
Subject: RE: Running example app on Websphere 4.0


Yes, the struts.jar is only in that directory. The strange thing is that
when I'm running the example application, I'm not getting the
"NoClassDefFoundError", but I am getting a different one:

[2/25/03 15:37:27:247 PST] 33fc3e53 WebGroup  X Servlet Error-[action]:
Failed to load servlet: java.lang.ExceptionInInitializerError:
org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.Log4jFactory
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:549)
at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:337)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:375)
at
org.apache.struts.action.ActionServlet.(ActionServlet.java:376)
at java.lang.Class.newInstance0(Native Method)


And I'm not sure whether that is what causing the example application to
fail or if it's something else. But that's the only error that I can find.

Thank you.



-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:09 PM
To: Struts Users Mailing List
Subject: Re: Running example app on Websphere 4.0


So are you sure that it isn't in *any* other place?

"Shkolnik, Mike" wrote:

> Initially, I just had it in one place - where it's suppose to be in
> /WEB-INF/LIB/. But that didn't seem to work.
>
> Thanks.
>
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 2:56 PM
> To: Struts Users Mailing List
> Subject: Re: Running example app on Websphere 4.0
>
> Mike:
>
> I don't know anything about WebSphere, but thought you may like to know
> this:
> the time that I got a similar error "NoClassDefFoundError was in fact when
I
> had
> placed a jar in one place too many... not to be confused with the
> "ClassNotFoundError".  (I believe the error occurs when a class found in
the
> compilation path is not the same as the one found at run time. )  Since
you
> say
> below that you tried to put the struts.jar in lots of places, maybe this
is
> the
> problem..?  So try to remove the struts.jar from everywhere *except* one
> place,
> rebuild everything and then try again.
>
> Regards,
> Geeta
>
> "Shkolnik, Mike" wrote:
>
> > The link or file that you were trying to include is not there.
> >
> > Deploying example app directly to the WS 4.0 appserver does not seem to
> > work.
> >
> > When I try to deploy and run my own struts application (not the example)
I
> > get following error:
> >
> > [2/25/03 10:52:01:630 PST] 37191c7f WebGroup  X Servlet
> Error-[action]:
> > Failed to load servlet: java.lang.NoClassDefFoundError:
> > org/apache/struts/action/ActionServlet
> > at java.lang.Class.newInstance0(Native Method)
> > at java.lang.Class.newInstance(Class.java:254)
> > at java.beans.Beans.instantiate(Beans.java:213)
> > at java.beans.Beans.instantiate(Beans.java:57)
> > at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet
> >
> > I tried to put the struts.jar everywhere I could think of, but it still
> can
> > not find it.
> >
> > When I deploy example application, I'm not getting above error, however
> when
> > I try to invoke any action from a browser I get "File not found..."
error.
> >
> > Thanks.
> >
> > -Original Message-
> > From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 25, 2003 2:03 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Running example app on Websphere 4.0
> >
> > Assuming you're trying to get it up and running in WSAD 4.0 or 5.0, here
> is
> > a bug-report that contains instructions on getting the example running
in
> > WSAD 5.0.  I imagine it should be similar for 4.0
> >
> > If you're simply trying to deploy it directly to the WS 4.0 appserver,
you
> > should be able to deploy the WAR file just like a

RE: [OT] Which Object Relational mapping tool?

2003-02-05 Thread Ryan Cuprak
Neat tool which I was tinkering with recently was Jaxor:
 http://jaxor.sourceforge.net/
 Martin Fowler was touting it at a COOUG (www.cooug.org) meeting in November.

 I put together a brief tutorial after using it, new project so the documentation 
isn't complete:
 http://cuprak.net:8070/development/jaxor_tutorial.html

-Ryan
 

---Original Message---
From: "Raible, Matt" <[EMAIL PROTECTED]>
Sent: 02/05/03 10:16 AM
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: [OT] Which Object Relational mapping tool?

> 
> I've used Hibernate on my last two (small) projects.  It works great for
me,
and is super easy if you read the documentation.  On one project, I have
POJOs that are marked up with XDoclet and it creates ValidationForms and
Hibernate mappings using Ant tasks.  So I have one class to maintain. 
This
project was developed as a sample app, rather than a real-world app.  In
the
real world, I've done the same thing, but I had to split out my POJOs from
my Forms when I had indexed properties.

Matt

> -Original Message-
> From: Mark Chaimungkalanont [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 04, 2003 9:24 PM
> To: [EMAIL PROTECTED]
> Subject: [OT] Which Object Relational mapping tool?
> 
> 
> Howdy all,
> 
> This is not about struts really... But I figured it could be 
> relevant for
> some people. If you know a better forum for relatively 
> unbiased opinion,
> please  tell me & I'll take it there!
> 
> Just looking into O/R mappers and have looked at (Briefly):
> 
> Hibernate 2.0 beta 2
> Castor 0.9.4.2
> OJB 0.9.8
> 
> Does anyone know which is better for what? Which is the most 
> "robust" and
> mature development? Have any recommendations of any other 
> ones? Had some
> success/problems? Hibernate SOUNDS impressive and looks quite 
> professional
> but I haven't used any of them...
> 
> Again, sorry for spamming the struts mailing list and will take it
> elsewhere if it bothers people.
> 
> Cheers
> 
> MC
> 
> 
> -
> 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]

> 

Cell: (203)-376-8789
Office: (203)-786-5682
Home: (203)-407-8267
AIM: rcupr

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




Re: Search list

2002-12-16 Thread Ryan Olson
Try this

http://www.mail-archive.com/struts-user@jakarta.apache.org/

Ryan Olson


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




Re: Testing an action

2002-12-11 Thread Ryan Olson
Alireza,

I highly recommend StrutsTestCase, which makes use of JUnit and the Jakarta 
Cactus framework:

http://strutstestcase.sourceforge.net

- rdo


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Pluggable Validation Not Being called, any ideas?

2002-12-09 Thread Ryan Cornia
I'm using Struts 1.1B2, and have tried to create a pluggable validator
similar to the example on Davids site.

In my validation-rules.xml I have -
 

Then in my validation.xml, I have -


   
   
   secondProperty
confirmPassword



When I run the application, the validation function is never called! (I
put system.out.println in it, and they are not executed.) The function
is -
   public static boolean validateTwoFieldsEqual(java.lang.Object bean,
  
org.apache.commons.validator.ValidatorAction va,
   org.apache.commons.validator.Field
field,
   ActionErrors errors,
  
javax.servlet.http.HttpServletRequest request)
{   
System.out.println("In Here!");
String value = ValidatorUtil.getValueAsString(bean,
field.getProperty());
String sProperty2 = field.getVarValue("secondProperty");
String value2 = ValidatorUtil.getValueAsString(bean,
sProperty2);

if (!GenericValidator.isBlankOrNull(value)) {
try {
if (!value.equals(value2)) {
errors.add(field.getKey(),
StrutsValidatorUtil.getActionError(request, va,  field));

return false;
}
} catch (Exception e) {
errors.add(field.getKey(),
StrutsValidatorUtil.getActionError(request, va, field));
return false;
}
}

return true;
}

Any ideas how to get the validation function called? Do I need to
"register" it somewhere to get it to work?

Thanks,
Ryan


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




Confused about log4j error message

2002-12-06 Thread Ryan Olson
Hi,

My apologies if this is a FAQ, but I haven't turned up anything on Google and 
it looks like the mailing list archive search is broken (keeps saying "Text 
search is not available for this list").

I'm using Struts 1.1b and Tomcat 4.0.4. The first thing on stdout when I start 
up my struts application is

log4j:WARN No appenders could be found for logger 
(org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.

Now, I've read lots of documentation and book chapters on using log4j and I 
can't figure out what I'm doing wrong. I've got a commons-logging.properties 
file with the entry org.apache.commons.logging.Log= 
org.apache.commons.logging.impl.Log4JCategoryLog. I've got a log4j.properties 
file in WEB-INF/classes copied from the simple configuration in Chuck 
Cavaness' Struts book, which is supposed to direct everything to the console:

log4j.rootlogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

I have the log4j and commons-logging jars in my WEB-INF/lib directory.

What happens is that I get the warnings described above, and none of my log 
messages, created with log.error(), are visible. I'm 99% sure that my use of 
commons-logging is not the problem, since I do see log messages when I use 
the JDK 1.4 logging instead.

Any ideas? Thanks

Ryan Olson


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




RE: [slightly OT] Time zone strategies

2002-12-02 Thread Ryan Olson
Well, that's the approach I'd taken originally, but I found two problems with 
it:

1) I didn't like how that approach mixes the presentation layer into the 
business layer (ie, my data access objects shouldn't care what timezone the 
user is in)

2) I don't necessarily know ahead of time (ie, when fetching the data) what 
timezone the user is in

What I'm aiming for is a solution that does all the timezone manipulation on 
the presentation/view layer so that my business objects don't have to worry 
about it. At least, I think that's what would make the most sense...

Thanks

Ryan Olson

"Hajratwala, Nayan (N.)" <[EMAIL PROTECTED]> wrote:
> I didn't delve too much into the details of your current approach, but 
> couldn't you do this fairly easily using the Calendar class...


>   Date fromDb = ResultSet.getDate(...);
>   Calendar cal = Calendar.getInstance(user's TimeZone, optionally user's 
> Locale);
>   cal.setTime(fromDb);

>   Now you can manipulate/display the values in the user's timezone

Original Message-
From: Ryan Olson [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 2:23 PM
To: Struts Users Mailing List
Subject: [slightly OT] Time zone strategies


Hi all,

Although this problem isn't necessarily unique to struts, it's certainly 
something that many of you may have come across in building struts 
applications. I'm writing a CRUD-type app to manage news articles which will 
support users in various time zones. Individual articles have date/time 
stamps which are normalized to the server reference timezone as they are 
stored in the model layer. However, each user should see and modify the dates 
in his/her own timezone on the presentation layer, optionally specifying 
alternate timezones if desired.
[...]


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




Bypassing validation in ActionForm for certain LookupDispatchAction modes

2002-12-02 Thread Ryan Olson
Hi,

I have a LookupDispatchAction which performs add, update, and delete 
operations based on an incoming ActionForm. I have a validate() method in the 
ActionForm since I need to validate input for the update and add operations, 
but I want to bypass that method in the case of the delete action (ie I don't 
want the user to be stopped from deleting a record that they may have made 
changes to and doesn't presently contain valid data).

Based on the list archives it looks like the way to do this is to add a check 
to the validate() method, like this:

String dispatchParam = mapping.getParameter();
String dispatchActionMode = request.getParameter(dispatchParam);

Since I'm using LookupDispatchAction I want to compare the value of 
dispatchActionMode with the button label as defined in my 
ApplicationResources properties file ("button.label.delete") in this case. 
However, I haven't been able to figure out how to get at that value from 
within my ActionForm. (Actually, I'd rather look up the value in the Map 
returned by getKeyMethodMap() in the LookupDispatchAction, but it's neither 
public nor static.) 

I'm also open to other suggestions as to how to go about doing this.

Thanks

Ryan Olson


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




[slightly OT] Time zone strategies

2002-12-02 Thread Ryan Olson
Hi all,

Although this problem isn't necessarily unique to struts, it's certainly 
something that many of you may have come across in building struts 
applications. I'm writing a CRUD-type app to manage news articles which will 
support users in various time zones. Individual articles have date/time 
stamps which are normalized to the server reference timezone as they are 
stored in the model layer. However, each user should see and modify the dates 
in his/her own timezone on the presentation layer, optionally specifying 
alternate timezones if desired.

My current approach is the following (bear with me):

- business layer object ArticleBO contains a Date field populated from db with 
ResultSet.getDate()
- view layer ActionForm ArticleForm contains a Date object (internalDate) as 
well as String fields for date and time; internalDate is prepopulated from 
ArticleBO for view/edit actions
- Article JSP contains two text fields for date and time strings, which are 
not themselves prepopulated from the ArticleForm, but rather filled in as the 
page loads via JavaScripts which use internalDate.getTime() to create a 
localized JavaScript Date object and corresponding date/time strings for the 
form
- ArticleForm also contains a hidden field clientTimezoneOffset that is 
populated by JavaScript as (new Date()).getTimezoneOffset(), which is the 
client's GMT offset in minutes
- ArticleForm returns to my add/edit/whatever Action after validation, at 
which point the date/time strings are converted back to a Date object using a 
SimpleDateFormat. The SimpleDateFormat is set to the client's timezone using 
the offset information in the clientTimezoneOffset field. This is tricky 
because 
1. JavaScript-supplied values are the negative of what Java expects -- for 
example, California comes out as +8 (+7 DST) instead of -0800 (-0700 DST)
2. Since the offset value is adjusted for DST according to the local time on 
the client, the retrieval method must un-adjust it accordingly when setting 
the raw offset of the resulting TimeZone (which is DST-neutral)
- ArticleBO populated from ArticleForm now holds a Date object in the server's 
timezone

It took me awhile to figure that all out, and it seems to work well based on 
the testing I've done by setting the test lab machines' clocks/timezones 
every which way. It's an awfully convoluted process, though, and I don't like 
to rely on JavaScript. 

Has anyone else come up with a better solution? 

Thanks

Ryan Olson


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




LookupDispatchAction and unspecified method

2002-11-25 Thread Ryan Olson
Hi,

I recently started using Struts after having done it the hard way in several 
past applications. Great stuff.

I've searched the list archives on this but haven't really come up with a 
satisfactory answer. Basically I'm wondering about the functionality of the 
unspecified(...) method in LookupDispatchAction, as inherited from 
DispatchAction. The javadocs on this method indicate that it is what gets 
called in the event that there is no value for the request param that 
control's the action's behavior. Since I've got an  tag in my 
form, I was expecting the unspecified(...) method of the target 
LookupDispatchAction to get called when the cancel button gets pressed, but 
instead I'm getting an exception indicating that the request param is 
missing. I tried specifying the "parameter" attribute of the html:cancel tag, 
but that left me with a NullPointerException, and besides, that wouldn't seem 
like the proper solution since as the docs point out, using that attribute 
breaks the Action.isCancelled() method.

I've seen a couple people post the solution of overriding 
LookupDispatchAction.execute(), which makes sense, but it seems like there 
ought to be a cleaner solution (via the unspecified(...) method, I should 
think).

Am I going about this all wrong?

Thanks

Ryan Olson
www.financialcontent.com


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




Using Javascript submit(), how can I tell what did the submitin an action?

2002-11-14 Thread Ryan Cornia
I have a form with multiple drop downs that do a Javascript submit()
when they are changed. (This is so that they can change other drop
downs.) The problem is that once I get into the action, how can I tell
which drop down's "onchange" event caused the submit? I can't find any
request parameters that are set.

Any ideas?

Thanks,
Ryan


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: Logging change between Struts 1.1B1 and 1.1B2? - FIXED!

2002-11-12 Thread Ryan Cornia
Never mind. I missed the instructions about updating commons-logging to
1.0.1. Once I did that, everything seems OK.

Thanks,
Ryan


Ryan Cornia
IT Programmer Analyst / eSolutions Team Leader
Department of Community and Economic Development
State of Utah

>>> [EMAIL PROTECTED] 11/12/02 10:16AM >>>
I've tried it with log4j.jar and log4j.properties in war, but I get
the
same results. 

Any other ideas?

Thanks,
Ryan


>>> [EMAIL PROTECTED] 11/12/02 08:33AM >>>
2002. november 12. 16:23 dátummal Ryan Cornia ezt írtad:

> I took one application and updated it to Struts 1.1B2 and
re-deployed,
> and now all of the INFO messages for that application are displayed.
How
> do I removed them? B2 is apparently not using tomcats global log4j
> configuration

I keep the log4j.jar in WEB-INF/lib and log4j.properties in
WEB-INF/classes. I 
don't know wheter it makes any difference however. Is not there a 
log4j.properties on your classpath allready?

Hth,

Tib

--
To unsubscribe, e-mail:  
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:  
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: Logging change between Struts 1.1B1 and 1.1B2?

2002-11-12 Thread Ryan Cornia
I've tried it with log4j.jar and log4j.properties in war, but I get the
same results. 

Any other ideas?

Thanks,
Ryan


>>> [EMAIL PROTECTED] 11/12/02 08:33AM >>>
2002. november 12. 16:23 dátummal Ryan Cornia ezt írtad:

> I took one application and updated it to Struts 1.1B2 and
re-deployed,
> and now all of the INFO messages for that application are displayed.
How
> do I removed them? B2 is apparently not using tomcats global log4j
> configuration

I keep the log4j.jar in WEB-INF/lib and log4j.properties in
WEB-INF/classes. I 
don't know wheter it makes any difference however. Is not there a 
log4j.properties on your classpath allready?

Hth,

Tib

--
To unsubscribe, e-mail:  
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Logging change between Struts 1.1B1 and 1.1B2?

2002-11-12 Thread Ryan Cornia
I have an application that was originally written in Struts 1.1B1 and
runs in Tomcat4.1.12. In order to handle logging, I simply put the log4j
jar in tomcats common/lib directory, and the log4j properties file in
tomcats common/classes directory. This set the same logging properties
for all of my struts 1.1B1 applications, and was set to only log WARN or
above, not INFO messages.

I took one application and updated it to Struts 1.1B2 and re-deployed,
and now all of the INFO messages for that application are displayed. How
do I removed them? B2 is apparently not using tomcats global log4j
configuration

Thanks,
Ryan


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




RE: problem with client-side validation and ValidatorActionForm

2002-11-07 Thread Ryan Bell
Yes, that's true and it solves my problem.  Thanks for pointing that out.

On a side note, is there any advantage to referencing the action path when using 
validator versus using the form-bean and setting validate to false in the config file?

Ryan

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:Voytek.Jarnot@;MAXWELL.AF.MIL]
Sent: Thursday, November 07, 2002 5:23 AM
To: 'Struts Users Mailing List'
Subject: RE: problem with client-side validation and ValidatorActionForm


Regardless of whether it's referenced by form-bean name or action path,
wouldn't it only validate if you've got validate=true set in your  ?
Therefore allowing you to only validate on a specific action...

-----Original Message-
From: Ryan Bell [mailto:ryan@;messagecast.net]
Sent: Wednesday, November 06, 2002 3:33 PM
To: Struts Users Mailing List
Subject: RE: problem with client-side validation and ValidatorActionForm


I only want to validate when a specific action is performed (server-side) so
I'm extending the ValidatorActionForm for my form which is why I'm using the
action-mapping in the as the form name in my validation file as described in
the pdf of chapter twelve of Struts in action book:

To enable the Struts Validator for Struts 1.1, just follow the initial setup
instructions
in chapter 4 and extend your ActionForm from ValidatorForm and Validator-
ActionForm. The ValidatorForm will match the formset name with the form-bean
name. The ValidatorActionForm will match the formset name with the
actionmapping
path.


-Original Message-
From: Pete Gieser [mailto:pgieser@;tampabay.rr.com]
Sent: Wednesday, November 06, 2002 1:07 PM
To: 'Struts Users Mailing List'
Subject: RE: problem with client-side validation and ValidatorActionForm


I misread your configurations.  Upon further review, it looks like
you are putting the action instead of the form name in your validation
and jsp form name property.  i.e., you should have

> >   
> > 
> >   
> >   
> >   
> > 
> >   
> > 
> > 
> > The javascript output when I add  > formName="contactInfoForm"/> to my jsp starts out like this:
> > 

Pete


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




RE: problem with client-side validation and ValidatorActionForm

2002-11-06 Thread Ryan Bell
I only want to validate when a specific action is performed (server-side) so I'm 
extending the ValidatorActionForm for my form which is why I'm using the 
action-mapping in the as the form name in my validation file as described in the pdf 
of chapter twelve of Struts in action book:

To enable the Struts Validator for Struts 1.1, just follow the initial setup 
instructions
in chapter 4 and extend your ActionForm from ValidatorForm and Validator-
ActionForm. The ValidatorForm will match the formset name with the form-bean
name. The ValidatorActionForm will match the formset name with the actionmapping
path.


-Original Message-
From: Pete Gieser [mailto:pgieser@;tampabay.rr.com]
Sent: Wednesday, November 06, 2002 1:07 PM
To: 'Struts Users Mailing List'
Subject: RE: problem with client-side validation and ValidatorActionForm


I misread your configurations.  Upon further review, it looks like
you are putting the action instead of the form name in your validation
and jsp form name property.  i.e., you should have

> >   
> > 
> >   
> >   
> >   
> > 
> >   
> > 
> > 
> > The javascript output when I add  > formName="contactInfoForm"/> to my jsp starts out like this:
> > 

Pete


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: problem with client-side validation and ValidatorActionForm

2002-11-06 Thread Ryan Bell
If I pull the "/" out of the validation file and jsp then the server side validation 
stops working.  If I pull it out of the jsp only it doesn't build the javascript 
properly (doesn't match the validation.xml anymore).  Did you have to change your 
struts config file at all?

Ryan

-Original Message-
From: Pete Gieser [mailto:pgieser@;tampabay.rr.com]
Sent: Wednesday, November 06, 2002 12:45 PM
To: 'Struts Users Mailing List'
Subject: RE: problem with client-side validation and ValidatorActionForm


Is it necessary to have /validateContactInfo in validation.xml and your
jsp?
(I am doing client/server validation and leave out the "/" and it works
fine)

Pete

> -Original Message-
> From: Ryan Bell [mailto:ryan@;messagecast.net] 
> Sent: Wednesday, November 06, 2002 3:07 PM
> To: [EMAIL PROTECTED]
> Subject: problem with client-side validation and ValidatorActionForm
> 
> 
> Is there any way I can do both client and server side 
> validation using ValidatorActionForms without setting up two 
> 'forms' in my validation xml?
> I'm having a problem doing client-side validation because all 
> my action mappings start with '/' and it's causing the 
> generated javascript function to have a name like 
> 'validate/xxx' which, as far as I know is not valid syntax.  
> Here's an example of my setup:
> 
> struts-config.xml:
> ...
>type="config.admin.contactinfo.ValidateContactInfoAction" 
> name="contactInfoForm" scope="request" 
> input="tile.admin.contactInfo.editContactInfo">
> 
>   
> ...
> 
> validation.xml:
> ...
>   
> 
>   
>   
>   
> 
>   
> 
> 
> The javascript output when I add  formName="/validateContactInfo"/> to my jsp starts out like this:
> 
>  To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:struts-user-help@;jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




problem with client-side validation and ValidatorActionForm

2002-11-06 Thread Ryan Bell
Is there any way I can do both client and server side validation using 
ValidatorActionForms without setting up two 'forms' in my validation xml?
I'm having a problem doing client-side validation because all my action mappings start 
with '/' and it's causing the generated javascript function to have a name like 
'validate/xxx' which, as far as I know is not valid syntax.  Here's an example of my 
setup:

struts-config.xml:
...

  

...

validation.xml:
...
  

  
  
  

  


The javascript output when I add  to 
my jsp starts out like this:

jakarta.apache.org>
For additional commands, e-mail: 




Serialization question...

2002-10-28 Thread Ryan Cornia
In my web application, I have all of my forms declared as -
 
public final class  extends
org.apache.struts.validator.ValidatorForm implements Serializable { }
 
In my tomcat 4.1.12 logs, however, I keep getting errors -
 
"Cannot serialize session attribute "
 
Do I need to write a serialization function for each form? I assumed
this was taken care of in org.apache.struts.validator.ValidatorForm. 
 
Thanks,
Ryan
 



Re: Single sign on?

2002-10-23 Thread Ryan Cornia
There are a couple of things I recommend. 
 
First, any time the cookie is sent in a request/response, we send it
over SSL. That should, in theory, prevent network snooping to get the
cookie. SSL does add some overhead, but performance wise we have not had
any issues.
 
Secondly, you can put a "validated" time stamp in the cookie. So, when
the user is authenticated, or the authentication cookie is checked, this
time stamp is updated to current time. If you go to check the
authentication cookie and the time stamp is > 30 (or 10, 60, whatever)
minutes old, you force them to re-login. Effectively making the cookie
token only valid for 30 minutes. You could also put in requesters IP
address to make sure the cookie is only valid from the PC the session
was created on.
 
This was just a home grown solution for us, I appreciate any
feedback/comments.
Ryan
 
 
 


>>> [EMAIL PROTECTED] 10/22/02 08:44AM >>>
Ryan Cornia wrote:
> What I do is encrypt a domain level session cookie. Then, in all my
apps
> I can check for/decrypt the cookie to know if the user is logged in,
and
> who the user is. (I put username/email in the cookie, but you could
put
> whatever information you want.) I encrypt it so that its more secure
and
> can't be "faked".

How do you prevent "replay" attacks? Where someone simply steals the 
cookie and uses it another time.

A.


-- 
Adam Sherman
Software Developer
Teach and Travel Inc.
+1.613.241.3103



--
To unsubscribe, e-mail:  
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>





Re: Single sign on?

2002-10-22 Thread Ryan Cornia
What I do is encrypt a domain level session cookie. Then, in all my apps
I can check for/decrypt the cookie to know if the user is logged in, and
who the user is. (I put username/email in the cookie, but you could put
whatever information you want.) I encrypt it so that its more secure and
can't be "faked".
 
This has worked well for me, with about 5 web apps using the system. It
is also nice, because if you use a domain level cookie, you can do
single sign-on across servers.
 
Ryan
 


>>> [EMAIL PROTECTED] 10/22/02 03:35AM >>>
This is not *purely* a struts question...

I have multiple webapps, all using struts framework having their own
config files, etc. 
No issues so far.

Each webapp has got its own login scheme.
When a user logs in to one of the webapps, i want to automatically log
her into the other webapps so that i can give links from one webapp to
jsp pages of the other webapp directly.
( i am using 


Re: Error message - not sure of meaning or significance.

2002-10-11 Thread Ryan Cuprak

Ok,
  I pegged down the problem, the tile I was referencing was 
'loginBody.jsp' whereas the tiles:put used "LoginBody.jsp". Normally, I 
try to avoid mismatch in case (cause of linux/unix platforms except 
MacOS X). What's interesting, is that this did not crop up until I  
tried running my code on XP as opposed to MacOS X (which I had been) - 
weird (I did grab a new copy of the struts 1.1 beta... )
  I did wrap the tiles:put in a try catch - evidently however things are 
being done internally my try/catch never catches the servlet exception.
-Ryan
As for exception traces/system.outs - I use them all of the time 
although I have begun moving towards log4j. I can't wait for Apple to 
release the 1.4 so I have that built-in logging.

BTW: [OT] checkout: http://www.geocities.com/rcwoolley/


On Friday, October 11, 2002, at 09:33 AM, Ryan Cuprak wrote:

>
>
>  BTW: How do I get exception traces for servlet errors. I am trying to 
> track down a "servlet exception" in one of my tiles - all I get on the 
> page is a "servlet exception and the path to the tile (jsp page). 
> Looking through the logs in jboss I don't see any exception trace. I 
> am not sure if the above error is related.
>
> Thanks,
> -Ryan
>
>
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>


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




Error message - not sure of meaning or significance.

2002-10-11 Thread Ryan Cuprak

Hello,
Just curious if anyone knows what these errors are:
09:30:24,205 ERROR [STDERR] [INFO] PropertyMessageResources - 
-Initializing, config='org.apache.struts.taglib.html.LocalStrings', 
returnNull=true
09:30:24,205 ERROR [STDERR] [INFO] PropertyMessageResources - 
-Initializing, config='org.apache.struts.util.LocalStrings', 
returnNull=true
09:30:24,205 ERROR [STDERR] [INFO] PropertyMessageResources - 
-Initializing, config='org.apache.struts.taglib.bean.LocalStrings', 
returnNull=true
09:30:24,658 ERROR [STDERR] [INFO] PropertyMessageResources - 
-Initializing, config='org.apache.struts.taglib.html.LocalStrings', 
returnNull=true
09:30:24,658 ERROR [STDERR] [INFO] PropertyMessageResources - 
-Initializing, config='org.apache.struts.taglib.html.LocalStrings', 
returnNull=true

  BTW: How do I get exception traces for servlet errors. I am trying to 
track down a "servlet exception" in one of my tiles - all I get on the 
page is a "servlet exception and the path to the tile (jsp page). 
Looking through the logs in jboss I don't see any exception trace. I am 
not sure if the above error is related.

Thanks,
-Ryan


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




Re: Error message - not sure of meaning or significance.

2002-10-11 Thread Ryan Cuprak

Well, I have wrapped the offending page in a try catch with 
system.out.print but I still get the same darn exception and no output 
from my system.outs. So, back to digging... Those entries on standard 
error in the email are new though... (I think)

-Ryan

On Friday, October 11, 2002, at 09:40 AM, Galbreath, Mark wrote:

> Learn the mystical art of "System.out.println()."  :-(
>
> -Original Message-
> From: Ryan Cuprak [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 9:33 AM
>
>   BTW: How do I get exception traces for servlet errors. I am trying to
> track down a "servlet exception" in one of my tiles - all I get on the
> page is a "servlet exception and the path to the tile (jsp page).
> Looking through the logs in jboss I don't see any exception trace. I am
> not sure if the above error is related.
>
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>


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




Re: help, I'm desperate!!!!

2002-10-10 Thread Ryan Stephenson


Don't forget to change:
 
to