RE: BUG!!! FormFile

2003-12-18 Thread Ben Janes

HI Dan,

That would make sense, in my browsered enlightenment I never use IE, only Opera 
7.2..

Anyway, I wrote a work around in the PropertyUtils class and now it all works fine... 
Same thing I
had wit mime types, IE: image/pjpeg Opera image/jpeg : you tell me


Mvh
Benjamin A. Janes

BLUEWAVE SVERIGE

M. +46 (0)40-631 1068
F. +46 (0)40 -631 10 50
F. +46 (0)46-540 03 50
Drottninggatan 18,
S-211 49 Malmö,
Sweden


|-+--->
| |   Dan Payne   |
| ||
| |   |
| |   2003-12-17 17:14|
| |   Please respond to   |
| |   "Struts Users   |
| |   Mailing List"   |
| |   |
|-+--->
  
>--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
 |
  |   cc:  
  |
  |   Subject:  RE: BUG!!! FormFile
  |
  
>--|




I have the same problem but ONLY with Opera 7.2x

I'm using Struts 1.1 and with Opera 7.1 everything
worked fine. The formFile field could be left blank.
When I upgraded to 7.2 it began to throw a argument
type mismatch when the formFile field was left blank.
Could this be the source of your problem? Everything
still works fine with IE. Here's the stack trace:

javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(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:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

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

at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke

Are httpSessions thread safe?

2003-12-18 Thread Joe Hertz
Not sure how OT this question is.

My current plan (unless this is bad for some reason, but if so, Ted H
should change his example app :-) is to stash the hibernate Session for
a user into his httpSession, and reuse it on each request.

A Hibernate Session instance isn't threadsafe. I imagine if two really
quick http requests got generated out of the same browser, all hell
could break out.

I guess I want to know if mortals like me need to worry about this.

Does Struts (or the Servlet container FAIK) prevent this from occuring,
or do I need to ensure this doesn't happen? If so, how? With a token or
is there a better strategy?

TIA

-Joe



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



Re: Check-boxes and formbeans

2003-12-18 Thread Gurpreet Dhanoa
hi

Just declare a property field with the datatype as array like

String[] mycheckBox

It will automatically populate all of the checkbox selected into the array
property


Regards
Gary
- Original Message -
From: "vasudevrao gupta" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:30 AM
Subject: Check-boxes and formbeans


>
> Hi All,
> I have many checkboxes with the same name in my html form. I use struts
> framework. When i submit the form, will i be able to access the
> checkboxes as an array in the form bean? Or should i have a seperate
> field for each checkbox in the formbean?
>
> Regards
> Vasudevrao gupta
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: Check-boxes and formbeans

2003-12-18 Thread Andrew Hill
And it wont populate the unchecked ones... which means if each checkbox
doesnt have a unique value (ie: they all have value "true" or "on") you will
get an array containing n instances of "on" where n is equal to the number
of checked checkboxes of that name. Not very helpful.

Best bet is to give them individual values, or individual names, so you can
tell them apart when submitted.

ie: submission of the following:






will give you:
bob == String[] { "on","on","on","on" }

The idea is to use something like:






which will give you:
bob == String[] { "1","3","4","5" }

OR







bob1 == "on"
bob2 == null (assuming you reset it or its a request scoped form etc...)
bob3 == "on"
bob4 == "on"
bob5 == "on"

OR (maybe)

You could probably make use of indexed property names too (and init the
array of appropriate length in the reset method)







to get:

bob == String[] { "on",null,"on","on","on" }
Though I havent tried this variant, so I could be wrong, or the semantics
could be subtly different!

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
Sent: Thursday, 18 December 2003 15:58
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Check-boxes and formbeans


hi

Just declare a property field with the datatype as array like

String[] mycheckBox

It will automatically populate all of the checkbox selected into the array
property


Regards
Gary
- Original Message -
From: "vasudevrao gupta" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:30 AM
Subject: Check-boxes and formbeans


>
> Hi All,
> I have many checkboxes with the same name in my html form. I use struts
> framework. When i submit the form, will i be able to access the
> checkboxes as an array in the form bean? Or should i have a seperate
> field for each checkbox in the formbean?
>
> Regards
> Vasudevrao gupta
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
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: Are httpSessions thread safe?

2003-12-18 Thread Andrew Hill
The sessions essentially just a sort of Map. Access to it may be threadsafe,
but the stuff thats in it is another matter entirely. Multiple requests
associated with the same session will execute simultaneously.

If you have >1 threads playing with the same unsafe object (which you just
happened to pull out of the session) then of course you will need to
synchronise their access to it externally.

ie:

Garthop unsafeObject = (Garthop)session.getAttribute(THE_GARTHOP);
synchronized(unsafeObject)
{
  garthop.nargle();
}




-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Thursday, 18 December 2003 15:56
To: 'Struts Users Mailing List'
Subject: Are httpSessions thread safe?


Not sure how OT this question is.

My current plan (unless this is bad for some reason, but if so, Ted H
should change his example app :-) is to stash the hibernate Session for
a user into his httpSession, and reuse it on each request.

A Hibernate Session instance isn't threadsafe. I imagine if two really
quick http requests got generated out of the same browser, all hell
could break out.

I guess I want to know if mortals like me need to worry about this.

Does Struts (or the Servlet container FAIK) prevent this from occuring,
or do I need to ensure this doesn't happen? If so, how? With a token or
is there a better strategy?

TIA

-Joe



-
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: validation and DynaActionForm / concrete question

2003-12-18 Thread Marco Mistroni
Hi man,
Nice 2 find u on the list.
As u have noticed...i am getting along with struts and trying
To discover possibilities to do different kind of stuff that
Can save me from writing code :-)

Thanx 4 suggestion.
marco

-Original Message-
From: Yves Sy [mailto:[EMAIL PROTECTED] 
Sent: 18 December 2003 04:50
To: 'Struts Users Mailing List'
Subject: RE: validation and DynaActionForm / concrete question

Hi Marco!

I think using only one jsp wherein the number of form elements vary
according to what you are doing can be considered as "anti-pattern" and
is more of a JSP Model 1 design. The best way to make things work is to
use a separate JSP for each form so that you can properly associate a
separate ActionForm with each ActionMapping.

If you wish to continue with the single jsp solution and still wish to
use DynaValidatorForm, you can write your own Validator class and
declare it in the validator-rules.xml. That way you can control how it
will behave and validate the parameters...

-Yves a.k.a. the witness to your long debates with Chad regarding
morality and politcs :o)


-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 18, 2003 1:30 AM
To: 'Struts Users Mailing List'
Subject: RE: validation and DynaActionForm / concrete question

Hi Wendy,
Only a little problem.. I haven't written any class for my
DynaActionForm. Instead, I declare all the properties in the
struts-config.xml

Struts does all the rest

But, anyway, can u give more details on ur solution to my problem?

Regards
marco

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: 17 December 2003 17:06
To: Struts Users Mailing List
Subject: RE: validation and DynaActionForm / concrete question

> well i think the problem your having is because you're using 
> a dispatch action
> so the form is mapped to the action and its set to validate. You can 
> either separte yu dispatch actions into standard actions or 
> hack it by having a single action that calls your dispatch action much
like you 
> were suggesting doing with jsp.

What about LookupDispatchAction?  It uses a request parameter to figure
out which method to call.  I use it with hidden form fields and a bit of
JavaScript.

In Marco's case, overriding the validate method might work.  Only call
super.validate() if all of the parameters are present.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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


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




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


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



RE: Cannot find message resources under key org.apache.struts.act ion.MESSAGE

2003-12-18 Thread Derek Colley
Hello,

I have been trying to get Tomcat5 and Struts1.1 to play nice...

I have the following config in web.xml:
  
action
  
  org.apache.struts.action.ActionServlet
  

  application
  ApplicationResources


  config
  /WEB-INF/struts-config.xml

...
  

I have a file called
${basedir}/web/WEB-INF/classes/ApplicationResources.properties with the
following contents:
prompt.welcome=Welcome

There are no errors when I do "ant install"...

Yet, when I try calling  I get the
following error:

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

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:867)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:800)
org.apache.jsp.index_jsp._jspService(index_jsp.java:87)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
11)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Can anyone please shed some light on this?

Many thanks,
Derek


Re: Enhancement Request or Possible Alternative?

2003-12-18 Thread Vic Cekvenich
I have a commercial Struts product that includes an event that is 
generated when a new action is called.
I built it so that one can clean up any session stuff when going to 
another action for large projects.
We could work out something VERY reasonable.
.V

Hookom, Jacob wrote:
We are doing a lot of module switching or multistep workflows (which we
handle fine through session beans) but at the same time, users are allowed
to jump to different pages and we would like to capture a "leave" event when
they aren't within a set of mapping(s).
I'm wondering if anyone has solved this problem because it would also allow
for constraints on workflows at the action level (if you leave pages X,Y,Z
then fire Action 'CheckSession').

Jacob Hookom
Senior Programmer/Analyst
McKesson Medical-Surgical
Golden Valley, MN


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


Data transfer From Struts to JavaScript

2003-12-18 Thread Gede Indrawan
Hi All,

I have jsp code below try to implement dynamic dropdown list
I utilize javascript code Dynamic Option List from
http://www.mattkruse.com/javascript/

I want 4 line hard code below (from that jsp code)

  listB.addOptions("1","bpp2","7","bpp3","8");
  listB.addOptions("2","bdl1","4","bdl3","5");
  listB.setDefaultOption("1","7");
  listB.setDefaultOption("2","4");

to be replace with dynamic value extract from:

 

become something like below

  listB.addOptions(  location[1].locationId, machine[1].machineName,
machine[1].machineId, machine[2].machineName, machine[2].machineId, ...,
machine[N].machineName, machine[N].machineId );
  listB.addOptions(  location[2].locationId, machine[1].machineName,
machine[1].machineId, machine[2].machineName, machine[2].machineId, ...,
machine[N].machineName, machine[N].machineId );
  ...
  listB.addOptions(  location[M].locationId, machine[1].machineName,
machine[1].machineId, machine[2].machineName, machine[2].machineId, ...,
machine[N].machineName, machine[N].machineId );

  listB.setDefaultOption( location[1].locationId, machine[1].machineId );

  listB.setDefaultOption( location[2].locationId, machine[1].machineId );

  ...
  listB.setDefaultOption( location[M].locationId, machine[1].machineId );


THE PROBLEM is:
All properties I need, inside

 

But I don't know how to transfer Location property (locationId) --as Object
array at Collection locations-- and Machine properties (machineId,
machineName) --as Object array on each Location-- into dynamic code above to
replace 4 line hardcode above.

Anyone expert out there can help?
Really appreciate your help.

TIA
-GI.


JSP CODE :

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



 
  ">

  

  var listB = new
DynamicOptionList("machine.machineId","location.locationId");

  listB.addOptions("1","bpp2","7","bpp3","8");
  listB.addOptions("2","bdl1","4","bdl3","5");
  listB.setDefaultOption("1","7");
  listB.setDefaultOption("2","4");

  function init() {
   var theform = document.forms[0];
   listB.init(theform);
   fill(theform);
   }
  

 





 

   
  
  


   
  
   

 
  
  
   
listB.printOptions()
   
  
 

 








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



Question dynamic value for a logic:iterate

2003-12-18 Thread struts
How can i have a dynamic value ?

eg:



should be something like

">

but that is not working.

Any Idea ?

Thanks

Re: Question dynamic value for a logic:iterate

2003-12-18 Thread Nicolas De Loof
use this :



...

Nico


- Original Message - 
From: "struts" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 11:09 AM
Subject: Question dynamic value for a logic:iterate


How can i have a dynamic value ?

eg:



should be something like

">

but that is not working.

Any Idea ?

Thanks

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



Re: Question dynamic value for a logic:iterate

2003-12-18 Thread struts
Got the following error.

symbol  : method setValue (java.lang.Object)
location: class org.apache.struts.taglib.logic.EqualTag
  _jspx_th_logic_equal_1.setValue(foo);
^
1 error


Thx !


- Original Message - 
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 11:12 AM
Subject: Re: Question dynamic value for a logic:iterate


> use this :
>
> 
> 
> ...
>
> Nico
>
>
> - Original Message - 
> From: "struts" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 11:09 AM
> Subject: Question dynamic value for a logic:iterate
>
>
> How can i have a dynamic value ?
>
> eg:
>
> 
>
> should be something like
>
> ">
>
> but that is not working.
>
> Any Idea ?
>
> Thanks
>
> -
> 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: Enhancement Request or Possible Alternative?

2003-12-18 Thread shirishchandra.sakhare
Hi,
Did you have a look at the workflow extention for struts?I wil advice you to have 
alook at the demo application to see if this is what you are looking for.
http://www.livinglogic.de/Struts/demoApp.html

And also the site has some introductory material...And best of all it is Open Source 
as well...:-))

It has some similar concept.You can configure actions to make them part of a 
workflow.And then you can catch when the user leaves the workflow.And then there are 
various alternatives like you can force them to stay in a workflow or allow them to 
branch to another workflow.
It is highly configurable and does need any code change, just twicking the 
ActionMappings...


regards,
Shirish.



-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich
Sent: Thursday, December 18, 2003 10:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Enhancement Request or Possible Alternative?


I have a commercial Struts product that includes an event that is 
generated when a new action is called.
I built it so that one can clean up any session stuff when going to 
another action for large projects.
We could work out something VERY reasonable.
.V

Hookom, Jacob wrote:
> We are doing a lot of module switching or multistep workflows (which we
> handle fine through session beans) but at the same time, users are allowed
> to jump to different pages and we would like to capture a "leave" event when
> they aren't within a set of mapping(s).
> 
> I'm wondering if anyone has solved this problem because it would also allow
> for constraints on workflows at the action level (if you leave pages X,Y,Z
> then fire Action 'CheckSession').
> 
> 
> Jacob Hookom
> Senior Programmer/Analyst
> McKesson Medical-Surgical
> Golden Valley, MN



-
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 dynamic value for a logic:iterate

2003-12-18 Thread Nicolas De Loof
Oups, sory :





On a jsp1.2+ container you can use jstl and struts-el tags too.


Nico.

- Original Message - 
From: "struts" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 11:25 AM
Subject: Re: Question dynamic value for a logic:iterate


> Got the following error.
> 
> symbol  : method setValue (java.lang.Object)
> location: class org.apache.struts.taglib.logic.EqualTag
>   _jspx_th_logic_equal_1.setValue(foo);
> ^
> 1 error
> 
> 
> Thx !
> 
> 
> - Original Message - 
> From: "Nicolas De Loof" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 11:12 AM
> Subject: Re: Question dynamic value for a logic:iterate
> 
> 
> > use this :
> >
> > 
> > 
> > ...
> >
> > Nico
> >
> >
> > - Original Message - 
> > From: "struts" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, December 18, 2003 11:09 AM
> > Subject: Question dynamic value for a logic:iterate
> >
> >
> > How can i have a dynamic value ?
> >
> > eg:
> >
> > 
> >
> > should be something like
> >
> > ">
> >
> > but that is not working.
> >
> > Any Idea ?
> >
> > Thanks
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Cannot find message resources under key org.apache.struts.action.MESSAGE

2003-12-18 Thread Francesco Di Candia
Hi, i've in my strut-config.xml this line



instead of your


  application
  ApplicationResources


and it works fine.
Francesco


  - Original Message - 
  From: Derek Colley 
  To: '[EMAIL PROTECTED]' 
  Sent: Thursday, December 18, 2003 10:29 AM
  Subject: RE: Cannot find message resources under key org.apache.struts.action.MESSAGE


  Hello,

  I have been trying to get Tomcat5 and Struts1.1 to play nice...

  I have the following config in web.xml:

  action

org.apache.struts.action.ActionServlet

  
application
ApplicationResources
  
  
config
/WEB-INF/struts-config.xml
  
  ...


  I have a file called
  ${basedir}/web/WEB-INF/classes/ApplicationResources.properties with the
  following contents:
  prompt.welcome=Welcome

  There are no errors when I do "ant install"...

  Yet, when I try calling  I get the
  following error:

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

  org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
  mpl.java:867)

  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
  l.java:800)
  org.apache.jsp.index_jsp._jspService(index_jsp.java:87)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
  11)

  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

  Can anyone please shed some light on this?

  Many thanks,
  Derek


RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-18 Thread Robert Taylor
I bet your missing the JSTL taglib directive in your page.
Try adding 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %> 
and then your  actions will work.

> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 17, 2003 9:45 PM
> To: Struts Users Mailing List
> Subject: RE: How To Output the Value of a String That Is Passed From
> Another JSP?
> 
> 
> Thanks for your advice.  I did this in my view.jsp:
> 
> 
>  scope="session"/>
> 
> View/Send Messages
> 
> 
> 
> I was able to see the "View/Send Messages" button
> displayed.  And the  property="creator"/> also wrote out the value of the
> property "creator".
> 
> Now, the question is 
> 
> 1. why the  value="${articleForm.creator}" scope="session"/> did
> not put the value in the session scope?  
> 
> 2. What is wrong with the  tag?  
> 
> 3. What should I do if I want to put the value of
> "creator" in a session scope?
> 
> -C
> 
> 
> --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > Are you sure that  > value="${articleForm.creator}"
> > scope="session"/>
> > is placing the value in the intended scope?
> > 
> > Try doing this:
> > 
> > 
> >  > value="${articleForm.creator}"scope="session"/>
> > 
> > View/Send Messages
> > 
> > 
> > To make sure it is actually putting the value in
> > session scope.
> > 
> > If so, then on postForm.jsp try using scriplets to
> > make sure that
> > the value can be accessed. If it can, then do you
> > have all of your
> > tag library directives in your pages?
> > 
> > robert
> > 
> > > -Original Message-
> > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, December 17, 2003 8:40 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: How To Output the Value of a String
> > That Is Passed From
> > > Another JSP?
> > >
> > >
> > > "cr" is not a form and there is no action
> > involved.
> > > There are two JSPs; view.jsp and postForm.jsp and
> > each
> > > is with its own form (different forms).
> > >
> > > In my view.jsp, I am able to write out String
> > creator
> > > this way:
> > >  > property="creator"/>
> > > and I put the String creator in a session object:
> > >
> > >
> > > > > scope="session"/>
> > >View/Send Messages
> > >
> > >
> > > and in the postForm.jsp, I retrieve the String and
> > try
> > > to write it out in a text field:
> > >
> > >> > scope="session" type="java.lang.String"/>
> > >> > value="<%=author%>" size="82" maxlength="25"
> > > tabindex="1"/>
> > >
> > > I got this error message:
> > > ServletException in:/article/content/postForm.jsp]
> > > > Cannot find bean cr in scope session'
> > >
> > > -Caroline
> > > --- David Friedman <[EMAIL PROTECTED]> wrote:
> > > > Caroline,
> > > >
> > > > How do you save the form "cr" in session scope?
> > > > Does your action use 'scope="session"' or are
> > you
> > > > doing a
> > > > 'request.getSession().setAttribute("cr",cr);'
> > > > in the first action?
> > > >
> > > > Regards,
> > > > David
> > > >
> > > > -Original Message-
> > > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, December 17, 2003 8:25 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: How To Output the Value of a String
> > > > That Is Passed From
> > > > Another JSP?
> > > >
> > > >
> > > > Hi, my JSP#1 and JSP#2 use different forms.
> > > > However,
> > > > property name in JSP#1 is the same as that in
> > JSP#2.
> > > >
> > > > I tried to pass this Sring and write it out in a
> > > > text
> > > > field in JSP#2 and just could not get it right. 
> > I
> > > > got
> > > > this error
> > > > message:
> > > >
> > > > [ServletException
> > in:/article/content/postForm.jsp]
> > > > Cannot find bean cr in scope session'
> > > >
> > > > In my view.jsp, I put a String in a session
> > object:
> > > >
> > > >
> > > > > value="${articleForm.creator}"
> > > > scope="session"/>
> > > >View/Send Messages
> > > >
> > > >
> > > > And in postForm.jsp, I tried to retrieve that
> > String
> > > > and write it out in a text field this way:
> > > >
> > > >> > > scope="session" type="java.lang.String"/>
> > > >> > > value="<%=author%>" size="82" maxlength="25"
> > > > tabindex="1"/>
> > > >
> > > > -Caroline
> > > >
> > > > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > > > There are a couple (3) ways to do it.
> > > > >
> > > > > 1. Have both JSP#1 and 2 use the same form
> > then
> > > > have
> > > > > the action that
> > > > > processes JSP#1 simply
> > > > > forward to JSP#2 and Struts will auto-populate
> > the
> > > > > field.
> > > > >
> > > > > 2. Have the action that processes JSP#1
> > forward or
> > > > > redirect to
> > > > >JSP#2 whose form has the same property
> > name.
> > > > > Place the create property
> > > > >value in the query string and Struts will
> > > > > auto-populate the form
> > > > >in JSP#2.
> > > > >
> > > > > 3. Have the action that processes JSP#1 access
> > and
> 

html:select default value problem

2003-12-18 Thread Keith C. Klopfer
Hi,

I know this has been talked about before, and I'm pretty sure I understand the 
concept, but I don't know why this is not
working.  The default option for an html:select is not being displayed.  I have an 
ActionForm in request scope called
"BusinessForm" that is populated.  The "status" property has a value of "1" as 
verified by sticking in a bean:write, but
the select list shows the value="0" option as the default item when I load the page.  
I have twelve other html elements on
the page, and they all show the correct defaults, except for this html:select.  Am I 
not seeing something in the code
below...

thanks...keith

---







0 - INACTIVE
1 - ACTIVE


...



RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-18 Thread Robert Taylor
> Hi, thank you for your attention to my problem.  First
> all, I think that I am missing someting.  In order to
> use the  and  tags, I think
> that I have to import a taglib into my JSP and assign
> it with a prefix "c".  Which taglib should I import? 
> Right now, I have these:
> 
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
> <%@ taglib uri="/tags/tiles" prefix="tiles" %>
> <%@ taglib uri="/tags/request" prefix="req" %>

You are missing this one:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %> 

> 
> Second, 
> 
> 
>  scope="session"/>
> 
> View/Send Messages
> 
> <%-- The statement below has no problem to write on
> the value --%>
> 
That's because you were missing the JSTL taglib directive
above.


> 
> Third, the mapping to the next JSP is:
> 
>  roles="administrator,editor,contributor"
> path="/list/Message"
> forward=".message.Form"
> name="postForm"
> scope="session"
> validate="false"/>
> 
Why are you defining an action path at all.
Once you add the JSTL taglib directive the following
line places the value in the session. There is no
need to submit.




> Fourth, in the postForm.jsp, I try to retrieve the
> value of the String that is passed in a session object
> and print it out in a text field:
> 
>  type="java.lang.String"/>
>  size="82" maxlength="25" tabindex="1"/>
> 
You could use Struts-EL and do something like:


The Struts-EL taglib and jar file can be found in the /contrib directory
of the Struts distribution.


> Fifth, the error message is that "cr" cannot be found
> in the session scope.
> 
Once again, this is because the JSTL taglib directive is missing.


> -Caroline
> 
> --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > What exactly are you trying to accomplish? What's
> > the
> > high level view?
> > 
> > If you can explain your intent, maybe we can suggest
> > an easier
> > way to accomplish your goal.
> > 
> > Is articleForm associated with action mapping
> > "/list/Message"?
> > If so, then you could do something like:
> > 
> > 
> > 
> > View/Send Messages
> > 
> > 
> > This of course, assumes you have already populated
> > creator in
> > articleForm in some other action using the same
> > form.
> > 
> > 
> > The action with mapping "/list/Message", which
> > processes articleForm could
> > do something like:
> > 
> > MyForm articleForm = (MyForm) form;
> > String creator = articleForm.getCreator();
> > request.getSession().setAttribute("creator",
> > creator);
> > return mapping.findForward("success");
> > 
> > 
> > In JSP#2 you could do something like this:
> > 
> > 
> > robert
> > 
> > 
> > > -Original Message-
> > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, December 17, 2003 8:25 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: How To Output the Value of a String
> > That Is Passed From
> > > Another JSP?
> > >
> > >
> > > Hi, my JSP#1 and JSP#2 use different forms. 
> > However,
> > > property name in JSP#1 is the same as that in
> > JSP#2.
> > > I tried to pass this Sring and write it out in a
> > text
> > > field in JSP#2 and just could not get it right.  I
> > got
> > > this error
> > > message:
> > >
> > > [ServletException
> > in:/article/content/postForm.jsp]
> > > Cannot find bean cr in scope session'
> > >
> > > In my view.jsp, I put a String in a session
> > object:
> > >
> > >
> > > > > scope="session"/>
> > >View/Send Messages
> > >
> > >
> > > And in postForm.jsp, I tried to retrieve that
> > String
> > > and write it out in a text field this way:
> > >
> > >> > scope="session" type="java.lang.String"/>
> > >> > value="<%=author%>" size="82" maxlength="25"
> > > tabindex="1"/>
> > >
> > > -Caroline
> > >
> > > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > > There are a couple (3) ways to do it.
> > > >
> > > > 1. Have both JSP#1 and 2 use the same form then
> > have
> > > > the action that
> > > > processes JSP#1 simply
> > > > forward to JSP#2 and Struts will auto-populate
> > the
> > > > field.
> > > >
> > > > 2. Have the action that processes JSP#1 forward
> > or
> > > > redirect to
> > > >JSP#2 whose form has the same property name.
> > > > Place the create property
> > > >value in the query string and Struts will
> > > > auto-populate the form
> > > >in JSP#2.
> > > >
> > > > 3. Have the action that processes JSP#1 access
> > and
> > > > populate the form used
> > > >in JSP#2 with the property then forward to
> > JSP#2.
> > > >
> > > > robert
> > > >
> > > > > -Original Message-
> > > > > From: Caroline Jen
> > [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, December 16, 2003 8:33 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: How To Output the Value Of a Hidden
> > > > Field?
> > > > >
> > > > >
> > > > > My JSP #2 receives a hidden field passed from
> > JS

RE: Help needed in form beans

2003-12-18 Thread Robert Taylor
You may want to consider creating a separate object to hold these
values in the session and use your form beans for data input.
This way you can decide when to populate your form beans with
the data that you've captured in the session. 

To control when reset() affects my form properties I subclassed
the action form and subclassed ActionMapping to add an isReset()
setReset(boolean reset) methods so I can declaratively define
when reset is to be used by adding the following line in my struts-config
file:



robert

> -Original Message-
> From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 12:30 AM
> To: 'Struts Users Mailing List'
> Subject: Help needed in form beans
> 
> 
> 
> Hi All,
> 
> I have a same form bean for 5 JSP's(JSP1,JSP2,JSP3,JSP4,JSP5)
> 
> All the JSP's use the same form bean.I am keeping the form bean in the
> session scope.
> 
> When ever I use JSP1, JSP3, I want to see the blank screen even if there
> are some values in the formbean.
> But, in other JSP's, I want to see the screen with prepopulated values.
> I tried using reset() for this and I have set all the values in formbean
> to null.But reset is getting called 
> for all the action.I want reset to be called only for JSP1,JSP3.
> 
> Please provide any direction on this
> 
> Regards
> VasudevRaoGupta
> 
> 
> Confidentiality Notice 
> 
> The information contained in this electronic message and any 
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain 
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at 
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



RE: html:select default value problem

2003-12-18 Thread Robert Taylor
Try this:


 0 - INACTIVE
 1 - ACTIVE


The regular HTML  element doesn't "communicate" with 
Struts. You need to use 

robert

> -Original Message-
> From: Keith C. Klopfer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 6:12 AM
> To: [EMAIL PROTECTED]
> Subject: html:select default value problem
> 
> 
> Hi,
> 
> I know this has been talked about before, and I'm pretty sure I 
> understand the concept, but I don't know why this is not
> working.  The default option for an html:select is not being 
> displayed.  I have an ActionForm in request scope called
> "BusinessForm" that is populated.  The "status" property has a 
> value of "1" as verified by sticking in a bean:write, but
> the select list shows the value="0" option as the default item 
> when I load the page.  I have twelve other html elements on
> the page, and they all show the correct defaults, except for this 
> html:select.  Am I not seeing something in the code
> below...
> 
> thanks...keith
> 
> ---
> 
>  type="BusinessForm">
> 
> 
> 
> 
> 
> 0 - INACTIVE
> 1 - ACTIVE
> 
> 
> ...
> 
>  
> -
> 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: Connection Pooling

2003-12-18 Thread Edgar P Dollin
Drop connection pooling in struts and either go to Container pooling or use
a product like Poolman (on sourceforge).  Struts DataSource is no longer
supported.

Edgar

> -Original Message-
> From: hernux [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 18, 2003 1:39 AM
> To: [EMAIL PROTECTED]
> Subject: Connection Pooling
> 
> 
> Hi all,
> 
> I'm having problems with db pooling, in my sistem, there is a 
> process that creates lot's of subsystems, and it opens lots 
> of connections in the pool... I have to create 380 
> subsystems, but I can't create more than 4 at once.at 
> number 5, pool dies .. out of conexions it sais..
> 
> So, I got two cuestions... 
> 
> 1- what am I doing wrong?...
> 2- is it posible to clean the pool by code, avoiding to 
> restart tomcat every time pool dies?
> 
> I'm using struts dbpooling .. here's my config:
> 
> 
>  
>   value="org.postgresql.Driver" />  property="maxCount" value="256" />  property="minCount" value="20" />  property="user" value="xxx" />  property="password" value="xxx" />  property="url" value="jdbc:postgresql://xxx/xxx" /> 
> 
> Thanx...
> 
> 

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



RE: Generate Java class from xml?

2003-12-18 Thread Edgar P Dollin
Castor from exolab http://www.castor.org/ is an excellent xml parser.  There
is also an interesting project for xml -> beans
http://xml.apache.org/xmlbeans.

Edgar

> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 17, 2003 8:31 PM
> To: Struts Users Mailing List
> Subject: Re: Generate Java class from xml?
> 
> 
> Hmm, looks pretty good but it doesn't seem to do what I need. Thanks 
> though.
> 
> On 12/17/2003 11:54 PM Mark Lowe wrote:
> > Dont know about using digester but html parser is a handy library.
> > 
> > http://htmlparser.sourceforge.net/
> > 
> > Might help you do what you want.
> > 
> > On 17 Dec 2003, at 22:45, Adam Hardy wrote:
> > 
> >> Hi Christopher,
> >> just a quick question about Digester, perhaps you can save me the
> >> effort of reading up on it to find out myself, but will 
> Digester be  
> >> able to parse HTML?
> >>
> >> I am dealing with the Internet Explorer bookmarks export 
> file. I have
> >> already tried JAXB but JAXB chokes on it, saying that the 
> XML is not  
> >> well-formed.
> >>
> >> The bookmarks file has quite a few unpaired  and  elements,
> >> which is obviously bad XML.
> >>
> >> Thanks
> >> Adam
> >>
> >> On 12/17/2003 09:38 PM Christopher Milton wrote:
> >>
> >>> I use Digester which is used by Struts itself. 
> >>> http://jakarta.apache.org/commons/digester/
> >>> http://www.google.com/search?q=jakarta+digester
> >>> http://www.javaranch.com/newsletter/August2003/
> >>> TouringTheCommonsPart2.html
> >>> --- John Smart <[EMAIL PROTECTED]> wrote:
> >>>
>  There's also XMLBeans (http://xml.apache.org/xmlbeans/) , which,
>  unlike Castor, works with JDK 1.4...
> 
>  Martin Gainty wrote:
> 
> 
> > Castor (http://www.castor.org) which generate the java classes
> > with  marshall
> > and unmarshall methods, but it is not finished, doesn't 
> care to  
> > namespaces,
> > owns severals bugs ...
> >
> > The second one is Xml Spy 5.0, it generate classes from an xsd
> > file  which
> > wrap on the Dom Tree, but all facets are not implemented as  
> > enumeration ...
> > but I think that a better version will come soon. 
> Generates JAXP  
> > compliant
> > Java Beans
> > http://www.altova.com/features_java.html
> >
> > -Martin
> >
> > - Original Message - From: "Vicky"  
> > <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, December 17, 2003 2:01 PM
> > Subject: Generate Java class from xml?
> >
> >
> >
> >
> >> Does anyone have an idea of how i can generate .java file from
> >> xml  file?
> >>
> >
> > Tools like jakrata digester, JOX are there but both of them are
> > useful in
> > populating java beans from xml. My requirement is to generate 
> > .java  file
> 
> 
> > from .xml with getters and setters methods for xml
> > elements/attributes. I
> 
> 
> > also tried JAXB. But JAXB generates bunch of files and most of
> > them  are
> > interfaces, which is not going to work for me.
> >
> >
> >> For e.g. i have following xml file and i want to generate
> >> Address.java
> >>
> >
> > file with getters/setters. Any ideas?
> >
> >
> >> 
> >> 
> >>   
> >>   
> >> ..
> >> 
> >>
> >>
> >> Thanks,
> >> Vicky
> >>
> >>
> >>
> >> --
> >> 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.1 + tomcat 5.0.16 + java 1.4.2
> Linux 2.4.20 Debian
> 

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



RE: Are httpSessions thread safe?

2003-12-18 Thread Kris Schneider
If Hibernate sessions are not thread-safe by design, then stuffing one in a web
app session and wrapping it with your own synchronization doesn't seem like the
right approach. I've never actually used Hibernate, so I could be way off base,
but it sounds more like a job for a filter. The filter would initialize the
Hibernate session and store it as a request attribute before any other request
processing. It would then also tear down the Hibernate session at the end of the
request. Are Hibernate sessions expensive enough resources to warrant creating
only one per web app session? Another approach might be to set up Hibernate
sessions as thread-local variable...

Quoting Andrew Hill <[EMAIL PROTECTED]>:

> The sessions essentially just a sort of Map. Access to it may be
> threadsafe,
> but the stuff thats in it is another matter entirely. Multiple requests
> associated with the same session will execute simultaneously.
> 
> If you have >1 threads playing with the same unsafe object (which you just
> happened to pull out of the session) then of course you will need to
> synchronise their access to it externally.
> 
> ie:
> 
> Garthop unsafeObject = (Garthop)session.getAttribute(THE_GARTHOP);
> synchronized(unsafeObject)
> {
>   garthop.nargle();
> }
> 
> 
> 
> 
> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 18 December 2003 15:56
> To: 'Struts Users Mailing List'
> Subject: Are httpSessions thread safe?
> 
> 
> Not sure how OT this question is.
> 
> My current plan (unless this is bad for some reason, but if so, Ted H
> should change his example app :-) is to stash the hibernate Session for
> a user into his httpSession, and reuse it on each request.
> 
> A Hibernate Session instance isn't threadsafe. I imagine if two really
> quick http requests got generated out of the same browser, all hell
> could break out.
> 
> I guess I want to know if mortals like me need to worry about this.
> 
> Does Struts (or the Servlet container FAIK) prevent this from occuring,
> or do I need to ensure this doesn't happen? If so, how? With a token or
> is there a better strategy?
> 
> TIA
> 
> -Joe

-- 
Kris Schneider 
D.O.Tech   

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



RE: Error using Struts Validation on Weblogic 8.1 platform

2003-12-18 Thread rahul.chaudhary

Indeed it was the problem with the path of the DTD
Thanks
Rahul

-Original Message-
From: Milon Krejca [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 7:58 PM
To: Struts Users Mailing List
Subject: Re: Error using Struts Validation on Weblogic 8.1 platform


Seems like you do not have DTD configured localy and the server is
tryiing to access DTD from web server.  See beginning of  validation.xml
file and look for DTD definition...

Milon

[EMAIL PROTECTED] wrote:

>All,
>
>The validation doesn't seem to work.Checking the Server logs displays the following 
>stack trace.Any thoughts as to what needs to be done?
>
>Thanks
>Rahul
>
>17 Dec 2003 10:20:01,806 INFO  ValidatorPlugIn []: Loading validation rules file from 
>'/WEB-INF/validator-rules.xml'
>
>17 Dec 2003 10:20:19,031 ERROR ValidatorPlugIn []: jakarta.apache.org
>Throwable: java.net.UnknownHostException: jakarta.apache.org
>Stack Trace:
>java.net.UnknownHostException: jakarta.apache.org
>   at java.net.InetAddress.getAllByName0(InetAddress.java:1004)
>   at java.net.InetAddress.getAllByName0(InetAddress.java:969)
>   at java.net.InetAddress.getAllByName(InetAddress.java:963)
>   at weblogic.net.http.HttpClient.openServer(HttpClient.java:228)
>   at weblogic.net.http.HttpClient.openServer(HttpClient.java:292)
>   at weblogic.net.http.HttpClient.(HttpClient.java:128)
>   at 
> weblogic.net.http.HttpURLConnection.getHttpClient(HttpURLConnection.java:122)
>   at 
> weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:321)
>   at java.net.URL.openStream(URL.java:960)
>   at 
> weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:836)
>   at 
> weblogic.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:796)
>   at 
> weblogic.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:275)
>   at 
> weblogic.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:841)
>   at 
> weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
>   at 
> weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
>   at 
> weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
>   at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>   at 
> weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
>   at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
>   at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
>   at org.apache.commons.digester.Digester.parse(Digester.java:1562)
>   at 
> org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:256)
>   at 
> org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:224)
>   at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:167)
>   at 
> org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)
>   at 
> com.bea.wlw.netui.pageflow.DynamicSubappActionServlet.registerModule(DynamicSubappActionServlet.java:346)
>   at 
> com.bea.wlw.netui.pageflow.DynamicSubappActionServlet.ensureModuleRegistered(DynamicSubappActionServlet.java:520)
>   at 
> com.bea.wlw.netui.pageflow.DynamicSubappActionServlet.getModuleConfig(DynamicSubappActionServlet.java:455)
>   at 
> com.bea.wlw.netui.pageflow.DynamicSubappActionServlet.process(DynamicSubappActionServlet.java:389)
>   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
>   at 
> com.bea.wlw.netui.pageflow.scoping.ScopedServletUtils.strutsLookup(ScopedServletUtils.java:348)
>   at 
> com.bea.wlw.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1196)
>   at com.bea.wlw.netui.pageflow.FlowController.lookup(FlowController.java:1615)
>   at 
> com.bea.netuix.servlets.controls.content.PageflowContent.preRender(PageflowContent.java:343)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at 
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
>   at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
>   at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
>   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>   at 
> com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:313)
>   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>   at 
> weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDispatcherImpl.java:385)
>   at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
>   at weblogic.sec

Validate method in action form

2003-12-18 Thread vasudevrao gupta

I have a single action form bean for multiple JSP pages.
Validation of fields for JSP1 is different from validation of fields in
JSP2.
How should I write the validate() method in the form so that depending
on the 
action, appropriate validation of fields is done.

Regards
Vasudevraogupta


Confidentiality Notice 

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

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



Off-topic : Calendar Struts

2003-12-18 Thread Gonzalez Comesaña, Sergio Eduardo

I know that it's off topic,  but I've need find a calendar similar Outlook make it in 
Struts and i was looking in a web and I didn't find nothing similar. 
If somebody  know, have, make it someone  pls, send me an email  

Thanks 

sergio




Aquest missatge electrònic pot  contenir informació confidencial o privilegiada.
Si vostè no és el destinatari del  missatge, o l'ha rebut per error, si us plau
notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut.
Està completament  prohibida  qualsevol  còpia, ús o distribució no autoritzada
del contingut d'aquest missatge electrònic.

Este mensaje electrónico puede contener información confidencial o privilegiada.
Si usted  no es  el destinatario de este mensaje o lo ha recibido por error, por
favor notifíquelo al remitente y destruya el mensaje con todo su contenido.
Queda  expresamente  prohibida  cualquier  copia, utilización o  distribución no
autorizada del contenido de este mensaje electrónico.

This e-mail may contain confidential and/or privileged information.
If you  are  not the  intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any  unauthorized  copying,  disclosure  or distribution of the material in this
e-mail is strictly forbidden.


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



Using Iterate Tag !

2003-12-18 Thread Rama, Shreekanth (K.)
Hi All, 

I am new to struts world.
I have a problem in the iterate tag. Here's the code snippet..















My reset method & other methods in the createAbstractForm class are: 

public void reset(ActionMapping mapping, HttpServletRequest request)
{

reqdEquipmentList = new ArrayList();

this.rowCount = request.getParameter("rowCount");

int count = 0;
if (rowCount != null) {
count = Integer.parseInt(rowCount);

for (int i = 0; i < count; i++) {
reqdEquipmentList.add(new
RequiredEquipmentVO());
}
}

public void setRowCount(String string) {
this.rowCount = string;
}
public String getRowCount() {
if (this.reqdEquipmentList != null) {
return "" + reqdEquipmentList.size();
}
return rowCount;
   }

public ArrayList getReqdEquipmentList() {
return reqdEquipmentList;
}
public void setReqdEquipmentList(ArrayList reqdEquipmentList) {
this.reqdEquipmentList = reqdEquipmentList;
}


I am not able to get the values entered on the screen back in action
class
Any one, please help tell me what is wrong in the settings or code. 

Thanks & Regards
Shree


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



Re: Validate method in action form

2003-12-18 Thread Ted Husted
Another approach would be to create a base ActionForm with the 
properties, and then extend it for each validation instance.

You can also use the came ActionForm class in multiple form-bean 
elements, and then use the Struts Validator to give each form-bean it's 
own validation suite.

HTH, Ted.

vasudevrao gupta wrote:
I have a single action form bean for multiple JSP pages.
Validation of fields for JSP1 is different from validation of fields in
JSP2.
How should I write the validate() method in the form so that depending
on the 
action, appropriate validation of fields is done.

Regards
Vasudevraogupta
Confidentiality Notice 

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



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


Re: Off-topic : Calendar Struts

2003-12-18 Thread Martin Gainty
I assume you checked out
http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html
Saludos,
Martin
- Original Message - 
From: ; "Sergio Eduardo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 8:20 AM
Subject: Off-topic : Calendar Struts



I know that it's off topic,  but I've need find a calendar similar Outlook
make it in Struts and i was looking in a web and I didn't find nothing
similar.
If somebody  know, have, make it someone  pls, send me an email

Thanks

sergio





Aquest missatge electrònic pot  contenir informació confidencial o
privilegiada.
Si vostè no és el destinatari del  missatge, o l'ha rebut per error, si us
plau
notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut.
Està completament  prohibida  qualsevol  còpia, ús o distribució no
autoritzada
del contingut d'aquest missatge electrònic.


Este mensaje electrónico puede contener información confidencial o
privilegiada.
Si usted  no es  el destinatario de este mensaje o lo ha recibido por error,
por
favor notifíquelo al remitente y destruya el mensaje con todo su contenido.
Queda  expresamente  prohibida  cualquier  copia, utilización o
distribución no
autorizada del contenido de este mensaje electrónico.


This e-mail may contain confidential and/or privileged information.
If you  are  not the  intended recipient (or have received this e-mail in
error)
please notify the sender immediately and destroy this e-mail.
Any  unauthorized  copying,  disclosure  or distribution of the material in
this
e-mail is strictly forbidden.



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


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



how to not insert javascript into forms

2003-12-18 Thread konf
Hallo,
when I use 

Re: Generate Java class from xml?

2003-12-18 Thread John Ferguson Smart
Must be a new anti-spam filter on the mail server, I guess...

Adam Hardy wrote:

John,
this is off-topic, but why does your message header contain the word 
***SPAM** ?

On 12/17/2003 08:43 PM John Smart wrote:

There's also XMLBeans (http://xml.apache.org/xmlbeans/) , which, 
unlike Castor, works with JDK 1.4...

Martin Gainty wrote:

Castor (http://www.castor.org) which generate the java classes with 
marshall
and unmarshall methods, but it is not finished, doesn't care to 
namespaces,
owns severals bugs ...

The second one is Xml Spy 5.0, it generate classes from an xsd file 
which
wrap on the Dom Tree, but all facets are not implemented as 
enumeration ...
but I think that a better version will come soon. Generates JAXP 
compliant
Java Beans
http://www.altova.com/features_java.html

-Martin

- Original Message - From: "Vicky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 17, 2003 2:01 PM
Subject: Generate Java class from xml?
 

Does anyone have an idea of how i can generate .java file from xml 
file?
  


Tools like jakrata digester, JOX are there but both of them are 
useful in
populating java beans from xml. My requirement is to generate .java 
file
from .xml with getters and setters methods for xml 
elements/attributes. I
also tried JAXB. But JAXB generates bunch of files and most of them are
interfaces, which is not going to work for me.
 

For e.g. i have following xml file and i want to generate Address.java
  


file with getters/setters. Any ideas?
 



   
   
..

Thanks,
Vicky



--
John Ferguson Smart, PhD
Directeur de Projet
Département informatique Communicante 
AACOM
email : [EMAIL PROTECTED]

-
AACOM - L'Informatique communicante
120 rue du Marin Blanc - Z.I. des Paluds
13685 Aubagne Cedex
tel : 04.42.72.65.69 - fax : 04.42.72.65.68
Web : http://www.aacom.fr
-


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


Test tiles attribute presence

2003-12-18 Thread Franck
Hi,

In a tiles template I would like to test if a tiles attribute should be
inserted or not :

Example :


  


I would like to code something like



  



Something to remplace the non-existing tiles:notEmpty ?

Thanks


--
Franck Lefebure


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



Re: Tiles in Struts 1.1 - TilesRequestProcessor

2003-12-18 Thread Joe Germuska
The PlugIn takes the liberty of setting your 
RequestProcessor to the TilesRequestProcessor for 
you.

You only really need to worry about it if you 
choose to use a custom RequestProcessor of your 
own; in that case, you'd need to extend the 
TilesRequestProcessor if you want to use Tiles 
functionality -- the PlugIn class is not 
"self-contained".

Since the TilesRequestProcessor is totally 
compatible with non-tiles use, I wonder if we 
ought not just merge it in with the base 
RequestProcessor and eliminate the confusion?

There is an ongoing effort to break up the 
request processing cycle to make it more 
flexible, but until then, I wonder if this would 
be worth pursuing...?

joe

At 7:50 AM +0100 12/18/03, Jan Dirksen wrote:
Hi
i am using Tiles with the Plugin.tag in
the struts-config.xml
now i saw in the source, that TilesPlugin
<> the TilesRequestProcessor.
okay, however - but i saw in one config-file, that
i could add the TilesRequestProcessor in the config of
struts.
since now i only "used" the plugin in the config.

is it better to use the TilesRequestProcessor instead?

-in sources i didn´t found anything like deprecated in
the TilesPlugin.
Thanks Jan

__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
 "We want beef in dessert if we can get it there."
  -- Betty Hogan, Director of New Product 
Development, National Cattlemen's Beef Association

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


RE: Are httpSessions thread safe?

2003-12-18 Thread Joe Germuska
At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
The sessions essentially just a sort of Map. Access to it may be threadsafe,
but the stuff thats in it is another matter entirely. Multiple requests
associated with the same session will execute simultaneously.
There's nothing in the specs that guarantee threadsafe access to 
session attributes.

A pattern I've become quite fond of is to create a single object (we 
call it a "shell", analogous to an operating system shell) which 
encapsulates everything you want in session context for a given user; 
then put just this object into session scope, and use methods on it 
to do everything else.  This helps you apply synchronization where 
appropriate.  There's still a risk of a race condition involving the 
initial creation of the shell (assuming you do something like check 
the session to see if there's a value under the key you use for the 
shell) -- you can put that in a block synchronized on the session 
object:

MyAppShell shell = null;
synchronized (session)
{
  shell = (MyAppShell) session.getAttribute(SHELL_KEY);
  if (shell == null)
  {
shell = new MyAppShell ();
session.setAttribute(SHELL_KEY, shell);
  }
}
If the "shell" concept seems like high overhead to you, you can still 
synchronize accesses on the session object along those lines; you may 
just have more trouble keeping track of all the places it needs to 
happen.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
 "We want beef in dessert if we can get it there."
  -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association

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


Re: Weblogic 8.1 - Error in using tag library

2003-12-18 Thread aashra

I am sending this message so that if somebody else faces a similar problem they will 
have an answer to it instead of a hanging thread.

The project I am dealing with was purchased and I pulled that project from a version 
control system on to JBuilder. Since I wanted to use the "struts visualization" 
capacity of Jbuilder, I mentioned that to JBuilder that this is a Struts Project. And 
JBuilder overwrote all the tld files with its own version, which clashed with the 
struts.jar I had. Meanwhile I was deleting certain "attribute" elements from the 
struts-html.tld file to get rid of the errors for setter methods for those attributes. 
It did help me understand the issue though!

I hope that this message helps people who are facing similar issues.

Thank you.


The best thing to hit the internet in years - NetZero HiSpeed!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month -visit www.netzero.com to sign up today!

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



RE: [Tiles] tiles controller not processing tiles request

2003-12-18 Thread Craig Tataryn
Thanks David, I did end up figuring it out, thanks for the tip about the 
controller, I noticed in the plugin source that it would instantiate it if 
it was not already present.

I should add that when I posted my solution, I had the wrong class used on 
my action, it should read:

   
I think I originally said I used ActionForward, not ForwardAction.

Craig W. Tataryn





From: "Hibbs, David" <[EMAIL PROTECTED]>
To: 'Craig Tataryn' <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED]
Subject: RE: [Tiles] tiles controller not processing tiles request
Date: Fri, 12 Dec 2003 13:50:03 -0600

this was recently discussed.  see the archives:

http://marc.theaimsgroup.com/?l=struts-user&m=107106764606173&w=2

BTW, specifying the controller is redundant if you specify the tiles 
plugin.

--David

> -Original Message-
> From: Craig Tataryn [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 11:52 AM
> To: [EMAIL PROTECTED]
> Subject: [Tiles] tiles controller not processing tiles request
>
>
> Hey guys, I have the following in my struts-config.xml:
>
> 
>   
> 
>
>  processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
>
> 
>value="/WEB-INF/tiles-defs.xml"/>
>   
>   
> 
>
>
> My tiles-defs.xml file looks like this:
>
> 
>
>   
> 
> 
> 
> 
>   
>
>   
> 
>   
> 
>
> Now, when I goto http://localhost:8080/mywebapp/ the
> "welcome" forward is
> invoked which is supposed to forward to the
> "mainLayout.welcome" definition.
>   However Tomcat comes back with a "HTTP Status 404 -
> /aclpo/mainLayout.welcome - The requested resource
> (/mywebapp/mainLayout.welcome) is not available"
>
> Any ideas what might be happening?
>
> Thanks,
>
> Craig W. Tataryn
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/photos&pgmarket=en-ca&RU=ht
tp%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: BUG!!! FormFile

2003-12-18 Thread Dan Payne
Ben,

So is the bug in Opera or Struts? This problem is
extremely annoying. Also, do you mind posting your
work around?

Thanks,

Dan

-Original Message-
From: Ben Janes [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 1:19 AM
To: Struts Users Mailing List
Subject: RE: BUG!!! FormFile



HI Dan,

That would make sense, in my browsered enlightenment I
never use IE, only Opera 7.2..

Anyway, I wrote a work around in the PropertyUtils
class and now it all works fine... Same thing I
had wit mime types, IE: image/pjpeg Opera image/jpeg :
you tell me


Mvh
Benjamin A. Janes

BLUEWAVE SVERIGE

M. +46 (0)40-631 1068
F. +46 (0)40 -631 10 50
F. +46 (0)46-540 03 50
Drottninggatan 18,
S-211 49 Malmö,
Sweden


|-+--->
| |   Dan Payne   |
| ||
| |   |
| |   2003-12-17 17:14|
| |   Please respond to   |
| |   "Struts Users   |
| |   Mailing List"   |
| |   |
|-+--->
 
>--|
  |   
  
  
|
  |   To:   [EMAIL PROTECTED]
  
  
|
  |   cc: 
  
  
|
  |   Subject:  RE: BUG!!! FormFile   
  
  
|
 
>--|




I have the same problem but ONLY with Opera 7.2x

I'm using Struts 1.1 and with Opera 7.1 everything
worked fine. The formFile field could be left blank.
When I upgraded to 7.2 it began to throw a argument
type mismatch when the formFile field was left blank.
Could this be the source of your problem? Everything
still works fine with IE. Here's the stack trace:

javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(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:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

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

at
org.apache.cata

Possible to add or change Validatorrules at runtime?

2003-12-18 Thread Martin Grüneberg
Hi all,

I will write a application with fully dynamic htmlforms
which i can configure at runtime. For each of the fields 
of such a form I will define a type (String,Number...) and
Constraints like in the validator.xml (range etc.).

My question is, is it possible to add form and fielddefinitions 
to the validator at runtime?
 
greetings,
Martin
 



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



Re: Question about back button on forward.

2003-12-18 Thread Shrihas Shah
Hi Khalid:

Thanks for your reply. I just found out some info. If I want to 
force to send request upon the hitting back button I can put 
following lines in my jsp and it does force back the request to 
server.

<% response.setHeader("Expires","0");response.setHeader("Cache-
Control","no-cache");%>

Thanks for your input. I appreciate it.

Shrihas.

--- In [EMAIL PROTECTED], "Khalid K." <[EMAIL PROTECTED]> wrote:
> This is an age old questions. There are various javascript 'hacks' 
around. I 
> suggest google the following: "javascript back button" 
> 
> the problem is that when you click on "back button" no server 
request is made, 
> the catched page froom "history.back()" (i think that is the 
method) is 
> displayed.  So java can't help you on that.
> 
> Khalid
> 
> 
> > Hi All:
> > 
> >  
> > 
> > In IE when user hits back button then I want to forward user to 
my main
> > page. I want to do this in reset method of the form. How can I
> > 
> >  
> > 
> > 1)forward using request object to forward to main page.
> > 
> > 2)Or redirect to main page
> > 
> >  
> > 
> > Note: At this time I am not executing action class. So I cannot 
return
> > mapping. I am just in form. And I want to 
> > 
> > Forward to a specific page.
> > 
> >  
> > 
> > Any hints? Help??
> > 
> >  
> > 
> > Thanks.
> > 
> >  
> > 
> > Shrihas Shah
> > NYS Office for Technology
> > [EMAIL PROTECTED]
> > Phone (518) 408-2382
> > Fax (518) 473-3389
> > (US Postal Service Regular Mail Address)
> > State Capitol ESP, PO Box 2062
> > Albany, NY 12220-0062
> > (Parcel Post/Overnight and Interagency Mail Address)
> > Empire State Plaza
> > Swan St., Core 4, 1st Floor
> > Albany, NY 12223
> > 
> >  
> > 
> > 
> 
> 
> -- 
> Khalid K.
> 
> ---
--
> 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]



URGENT - Help defending Struts

2003-12-18 Thread russell . c . friedberg
All:

 

Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.

 

The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.

 

Thanks very much,

Russell

 

[EMAIL PROTECTED]

310-426-5587

 



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.


RE: URGENT - Help defending Struts

2003-12-18 Thread Long, Robert
www.travelocity.com (flight + hotel search section)

 -Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, December 18, 2003 9:49 AM
To: [EMAIL PROTECTED]
Subject:URGENT - Help defending Struts
Importance: High

All:

 

Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.

 

The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.

 

Thanks very much,

Russell

 

[EMAIL PROTECTED]

310-426-5587

 



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.


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



RE: URGENT - Help defending Struts

2003-12-18 Thread Ben Anderson
http://www.paychex.com/demos/s125/index.html
you can't directly access it, because it's a subsription service, but 
there's a flash tour of the site.


From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: URGENT - Help defending Struts
Date: Thu, 18 Dec 2003 09:48:35 -0600
All:



Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.


The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.


Thanks very much,

Russell



[EMAIL PROTECTED]

310-426-5587





This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information.  If you have 
received it in error, please notify the sender immediately and delete the 
original.  Any other use of the email by you is prohibited.
_
Enjoy the holiday season with great tips from MSN.  
http://special.msn.com/network/happyholidays.armx

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


Re: URGENT - Help defending Struts

2003-12-18 Thread ian_d_stewart

http://www.paymentech.com

Also, IBM uses Struts for the WebSphere Admin Console


HTH,
Ian



   
 
[EMAIL PROTECTED]  
   
enture.comTo: <[EMAIL PROTECTED]>  

  cc:  
 
12/18/2003 10:48 AM   Subject: URGENT - Help defending 
Struts   
Please respond to  
 
"Struts Users Mailing  
 
List"  
 
   
 
   
 




All:



Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.



The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.



Thanks very much,

Russell



[EMAIL PROTECTED]

310-426-5587





This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.





This transmission may contain information that is privileged, confidential and/or 
exempt from disclosure under applicable law. If you are not the intended recipient, 
you are hereby notified that any disclosure, copying, distribution, or use of the 
information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. 
If you received this transmission in error, please immediately contact the sender and 
destroy the material in its entirety, whether in electronic or hard copy format. Thank 
you.


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



Re: URGENT - Help defending Struts

2003-12-18 Thread Andrew Shirk
www.roomandboard.com
http://www.retrospecthome.com
At 09:48 AM 12/18/2003, you wrote:
All:



Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.


The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.


Thanks very much,

Russell



[EMAIL PROTECTED]

310-426-5587





This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information.  If you have 
received it in error, please notify the sender immediately and delete the 
original.  Any other use of the email by you is prohibited.


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


Re: URGENT - Help defending Struts

2003-12-18 Thread Andy Engle
[EMAIL PROTECTED] wrote:

> Our CIO is currently fighting the use of Struts by saying that it is
> not widely used in B2C sites.  Does anyone know of any sites,
> preferably commerce sites that are using Struts?  This would be
> extremely helpful.

It looks like www.verizonwireless.com has their entire user account
setup done with Struts.  I love it -- has a great look, lots of
information, charts, past billing info, the works.  On top of that,
it's all pretty quick and easy to use.


Andy


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



Re: URGENT - Help defending Struts

2003-12-18 Thread Brice Ruth
http://www.fiskars.com/

- our "buy online" functionality is launching later this evening, 
integrating with a 3rd-party fulfillment vendor. All aspects of the 
site, including the localization to French & German (with 12 more 
localizations to launch in Q1/Q2 of '04) are driven through Struts.

[EMAIL PROTECTED] wrote:

All:



Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.


The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.


Thanks very much,

Russell



[EMAIL PROTECTED]

310-426-5587





This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: URGENT - Help defending Struts

2003-12-18 Thread Fullam, Jonathan
www.verizonwireless.com

-Original Message-
From: Ben Anderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:53 AM
To: [EMAIL PROTECTED]
Subject: RE: URGENT - Help defending Struts


http://www.paychex.com/demos/s125/index.html
you can't directly access it, because it's a subsription service, but 
there's a flash tour of the site.


>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: URGENT - Help defending Struts
>Date: Thu, 18 Dec 2003 09:48:35 -0600
>
>All:
>
>
>
>Our CIO is currently fighting the use of Struts by saying that it is not
>widely used in B2C sites.  Does anyone know of any sites, preferably
>commerce sites that are using Struts?  This would be extremely helpful.
>
>
>
>The issue is that the CIO is looking for sites that may be similar to
>ours that are using Struts already.
>
>
>
>Thanks very much,
>
>Russell
>
>
>
>[EMAIL PROTECTED]
>
>310-426-5587
>
>
>
>
>
>This message is for the designated recipient only and may contain 
>privileged, proprietary, or otherwise private information.  If you have 
>received it in error, please notify the sender immediately and delete the 
>original.  Any other use of the email by you is prohibited.

_
Enjoy the holiday season with great tips from MSN.  
http://special.msn.com/network/happyholidays.armx


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


Re: URGENT - Help defending Struts

2003-12-18 Thread Max Cooper
http://www.fiskars.com/ is using Struts, too.

-Max

- Original Message - 
From: "Andy Engle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 7:58 AM
Subject: Re: URGENT - Help defending Struts


> [EMAIL PROTECTED] wrote:
> 
> > Our CIO is currently fighting the use of Struts by saying that it is
> > not widely used in B2C sites.  Does anyone know of any sites,
> > preferably commerce sites that are using Struts?  This would be
> > extremely helpful.
> 
> It looks like www.verizonwireless.com has their entire user account
> setup done with Struts.  I love it -- has a great look, lots of
> information, charts, past billing info, the works.  On top of that,
> it's all pretty quick and easy to use.
> 
> 
> Andy
> 
> 
> -
> 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: URGENT - Help defending Struts

2003-12-18 Thread Brice Ruth
I believe that major portions of the kraft.com and saralee.com consumer 
sites are also driven using J2EE/Struts, based on a training session I 
went to yesterday with the consulting group that is helping/developing 
their sites.

Brice Ruth wrote:

http://www.fiskars.com/

- our "buy online" functionality is launching later this evening, 
integrating with a 3rd-party fulfillment vendor. All aspects of the 
site, including the localization to French & German (with 12 more 
localizations to launch in Q1/Q2 of '04) are driven through Struts.

[EMAIL PROTECTED] wrote:

All:



Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.


The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.


Thanks very much,

Russell



[EMAIL PROTECTED]

310-426-5587





This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information.  If you 
have received it in error, please notify the sender immediately and 
delete the original.  Any other use of the email by you is prohibited.

 


--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Are httpSessions thread safe?

2003-12-18 Thread Max Cooper
Two threads can access and use the same object from the session at the same
time. Struts does not prevent this from occurring.

It is something to worry about unless you want to be woken up with bug
reports in the middle of the night. :-)

-Max

- Original Message - 
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, December 17, 2003 11:56 PM
Subject: Are httpSessions thread safe?


> Not sure how OT this question is.
>
> My current plan (unless this is bad for some reason, but if so, Ted H
> should change his example app :-) is to stash the hibernate Session for
> a user into his httpSession, and reuse it on each request.
>
> A Hibernate Session instance isn't threadsafe. I imagine if two really
> quick http requests got generated out of the same browser, all hell
> could break out.
>
> I guess I want to know if mortals like me need to worry about this.
>
> Does Struts (or the Servlet container FAIK) prevent this from occuring,
> or do I need to ensure this doesn't happen? If so, how? With a token or
> is there a better strategy?
>
> TIA
>
> -Joe
>
>
>
> -
> 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: URGENT - Help defending Struts

2003-12-18 Thread Chappell, Simon P
This question comes up periodically, so I started a list of Struts-powered sites.

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

I hope this helps.

I know that I wouldn't like to think about not using it on the Intranet application 
that I head up the development team for. It has greatly aided our productivity and has 
now come through it's second peak season with flying colours. We started with Struts 
1.0 and with a little help from Chuck Cavaness we were early adopters of 1.1. :-)

Simon

>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 18, 2003 9:49 AM
>To: [EMAIL PROTECTED]
>Subject: URGENT - Help defending Struts
>Importance: High
>
>
>All:
>
> 
>
>Our CIO is currently fighting the use of Struts by saying that 
>it is not
>widely used in B2C sites.  Does anyone know of any sites, preferably
>commerce sites that are using Struts?  This would be extremely helpful.
>
> 
>
>The issue is that the CIO is looking for sites that may be similar to
>ours that are using Struts already.
>
> 
>
>Thanks very much,
>
>Russell
>
> 
>
>[EMAIL PROTECTED]
>
>310-426-5587
>
> 
>
>
>
>This message is for the designated recipient only and may 
>contain privileged, proprietary, or otherwise private 
>information.  If you have received it in error, please notify 
>the sender immediately and delete the original.  Any other use 
>of the email by you is prohibited.
>

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



Re: URGENT - Help defending Struts

2003-12-18 Thread daniel
what frame work does he want to use then?
Im not a struts user yet, but from what i see the framework is not BtoC /
BtoB specific.
imo.
im guessing the cio hasnt even looked at struts to see if it would help
provide support to the project.
next my question is how big is the site? if its just a few pages. i would
guess jsp with beans would do it struts would most likely be over kill.
but if it has a larger group of features/functions struts would serently in
that development.

does that make a valid argument
with out knowing much about the project.


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:48 AM
Subject: URGENT - Help defending Struts


All:



Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.



The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.



Thanks very much,

Russell



[EMAIL PROTECTED]

310-426-5587





This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 12/15/2003


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



RE: Are httpSessions thread safe?

2003-12-18 Thread Kris Schneider
Synchronizing on the session object may cause you all sorts of grief...or it may
not. It all depends on your container. The spec makes no guarantees about the
identity of the object returned by methods like PageContext.getSession or
HttpServletRequest.getSession. For example, here's a test JSP:

<%@ page contentType="text/plain" %>
<%
out.println("session:" + session);
out.println("pageContext.getSession: " + pageContext.getSession());
out.println("request.getSession: " + request.getSession(false));
out.println("request.getSession: " + request.getSession(false));
%>

Here's the output from TC 4.1.24:

session:[EMAIL PROTECTED]
pageContext.getSession: [EMAIL PROTECTED]
request.getSession: [EMAIL PROTECTED]
request.getSession: [EMAIL PROTECTED]

And that's just within the same thread! I'm pretty sure TC 4.1.29 does return
the same instance, but just remember it's not guaranteed.

Quoting Joe Germuska <[EMAIL PROTECTED]>:

> At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> >The sessions essentially just a sort of Map. Access to it may be
> threadsafe,
> >but the stuff thats in it is another matter entirely. Multiple requests
> >associated with the same session will execute simultaneously.
> 
> There's nothing in the specs that guarantee threadsafe access to 
> session attributes.
> 
> A pattern I've become quite fond of is to create a single object (we 
> call it a "shell", analogous to an operating system shell) which 
> encapsulates everything you want in session context for a given user; 
> then put just this object into session scope, and use methods on it 
> to do everything else.  This helps you apply synchronization where 
> appropriate.  There's still a risk of a race condition involving the 
> initial creation of the shell (assuming you do something like check 
> the session to see if there's a value under the key you use for the 
> shell) -- you can put that in a block synchronized on the session 
> object:
> 
> MyAppShell shell = null;
> synchronized (session)
> {
>shell = (MyAppShell) session.getAttribute(SHELL_KEY);
>if (shell == null)
>{
>  shell = new MyAppShell ();
>  session.setAttribute(SHELL_KEY, shell);
>}
> }
> 
> If the "shell" concept seems like high overhead to you, you can still 
> synchronize accesses on the session object along those lines; you may 
> just have more trouble keeping track of all the places it needs to 
> happen.
> 
> Joe
> 
> -- 
> Joe Germuska
> [EMAIL PROTECTED]  
> http://blog.germuska.com
>   "We want beef in dessert if we can get it there."
>-- Betty Hogan, Director of New Product Development, National 
> Cattlemen's Beef Association

-- 
Kris Schneider 
D.O.Tech   

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



Re: URGENT - Help defending Struts

2003-12-18 Thread Joe Germuska
Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.
The CIO of a company as big as Accenture is going to decide whether 
Struts should be used or not based on whether or not anyone else is 
doing it?

That's pretty weak.  You'd think he'd at least have some trusted 
technology advisers that could help him decide based on the merits 
instead of just watching the crowds.  Isn't innovation a big buzzword 
for consulting companies like that?

My last project, a collaborative commerce project with a major lawn 
and garden equipment manufacturer, is built entirely upon Struts, and 
is already available for dealer registration; the public should be 
able to use the client's site to purchase tractors and accessories 
from local dealers in Q1 2004.  My company has also developed a 
number of applications in the home appliances industry for direct to 
consumer and manufacturer-collaborative appliance sales which were 
either built from the ground up with Struts, or are gradually being 
ported to Struts.

We also use Struts to run the primary consumer facing sites for 
companies in home furniture, office furniture, and personal 
healthcare products which don't currently have commerce components.

But hey, if he wants you to write your own web application frameworks 
from the ground up, and internally perform all the testing that a 
large user community has already done on the Struts codebase and 
train all your new employees on the internal way to do it instead of 
hiring people who might come in already experienced in a 
framework  well, that's one way to do it.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
 "We want beef in dessert if we can get it there."
  -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association

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


Re: Possible to add or change Validatorrules at runtime?

2003-12-18 Thread Oliver Thiel
Hi Martin,

I try achieve something comparable. But I did not use the
xml validation, cause as far as I know you have to reload 
the xml files - which means you have to change the web.xml 
timestamp so that the server is aware of the change and 
reloads . bla bla. 


Here you are two articles dealing with dynamic forms:

Torsten Wünsch:
Javamagazin 10.2003 - Mit Struts 1.1 dynamische Eingabefelder erstellen

Sharad Acharya:
Part I:
http://www.fawcette.com/javapro/2003_11/online/dynamic_sacharya_11_11_03/
Part II:
http://www.fawcette.com/javapro/2003_11/online/dynamic_sacharya_11_17_03/


Maybe this’ll help you!
Oliver



PS Both only have a week validation. So if you have a good idea how 
 to improve it, please let me know


> Hi all,
> 
> I will write a application with fully dynamic htmlforms
> which i can configure at runtime. For each of the fields 
> of such a form I will define a type (String,Number...) and
> Constraints like in the validator.xml (range etc.).
> 
> My question is, is it possible to add form and fielddefinitions 
> to the validator at runtime?
>  
> greetings,
> Martin
>  
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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



Re: URGENT - Help defending Struts

2003-12-18 Thread Steven J. Owens
On Thu, Dec 18, 2003 at 10:13:24AM -0600, Joe Germuska wrote:
> >Our CIO is currently fighting the use of Struts by saying that it is not
> >widely used in B2C sites.  Does anyone know of any sites, preferably
> >commerce sites that are using Struts?  This would be extremely helpful.
> 
> The CIO of a company as big as Accenture is going to decide whether 
> Struts should be used or not based on whether or not anyone else is 
> doing it?
> 
> That's pretty weak.  You'd think he'd at least have some trusted 
> technology advisers that could help him decide based on the merits 
> instead of just watching the crowds. 

 A big company like that is *exactly* where I would expect to see
that sort of behavior.  

> Isn't innovation a big buzzword for consulting companies like that?

 When you add in that they're a consulting company whose clients
are big companies, it even makes a sort of sense.  Big companies like
Accenture's clients are risk-aversive.

 My little bit for the Struts promulgation committee: While
working on a non-struts consulting project at Mellon AFCO in July,
across the hallway was a major Struts project.  I'm not sure what the
outside name was, Mellon AFCO's corporation's main customer business
is in offering financial services to the insurance industry.

-- 
Steven J. Owens
[EMAIL PROTECTED]

"I'm going to make broad, sweeping generalizations and strong,
 declarative statements, because otherwise I'll be here all night and
 this document will be four times longer and much less fun to read.
 Take it all with a grain of salt." - Me at http://darksleep.com


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



Re: Are httpSessions thread safe?

2003-12-18 Thread Max Cooper
Even though you got a few different objects with those calls, they all
represent the same conceptual "session" underneath. The concept of a session
would be worthless otherwise. In other words, if you stash a reference to
some object in the session, you will be able to get a reference to that same
object from any of the session objects returned by those calls (even though
the object representing the session itself may be different from call to
call).

-Max

- Original Message - 
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 8:11 AM
Subject: RE: Are httpSessions thread safe?


> Synchronizing on the session object may cause you all sorts of grief...or
it may
> not. It all depends on your container. The spec makes no guarantees about
the
> identity of the object returned by methods like PageContext.getSession or
> HttpServletRequest.getSession. For example, here's a test JSP:
>
> <%@ page contentType="text/plain" %>
> <%
> out.println("session:" + session);
> out.println("pageContext.getSession: " + pageContext.getSession());
> out.println("request.getSession: " + request.getSession(false));
> out.println("request.getSession: " + request.getSession(false));
> %>
>
> Here's the output from TC 4.1.24:
>
> session:
[EMAIL PROTECTED]
> pageContext.getSession:
[EMAIL PROTECTED]
> request.getSession:
[EMAIL PROTECTED]
> request.getSession:
[EMAIL PROTECTED]
>
> And that's just within the same thread! I'm pretty sure TC 4.1.29 does
return
> the same instance, but just remember it's not guaranteed.
>
> Quoting Joe Germuska <[EMAIL PROTECTED]>:
>
> > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > >The sessions essentially just a sort of Map. Access to it may be
> > threadsafe,
> > >but the stuff thats in it is another matter entirely. Multiple requests
> > >associated with the same session will execute simultaneously.
> >
> > There's nothing in the specs that guarantee threadsafe access to
> > session attributes.
> >
> > A pattern I've become quite fond of is to create a single object (we
> > call it a "shell", analogous to an operating system shell) which
> > encapsulates everything you want in session context for a given user;
> > then put just this object into session scope, and use methods on it
> > to do everything else.  This helps you apply synchronization where
> > appropriate.  There's still a risk of a race condition involving the
> > initial creation of the shell (assuming you do something like check
> > the session to see if there's a value under the key you use for the
> > shell) -- you can put that in a block synchronized on the session
> > object:
> >
> > MyAppShell shell = null;
> > synchronized (session)
> > {
> >shell = (MyAppShell) session.getAttribute(SHELL_KEY);
> >if (shell == null)
> >{
> >  shell = new MyAppShell ();
> >  session.setAttribute(SHELL_KEY, shell);
> >}
> > }
> >
> > If the "shell" concept seems like high overhead to you, you can still
> > synchronize accesses on the session object along those lines; you may
> > just have more trouble keeping track of all the places it needs to
> > happen.
> >
> > Joe
> >
> > -- 
> > Joe Germuska
> > [EMAIL PROTECTED]
> > http://blog.germuska.com
> >   "We want beef in dessert if we can get it there."
> >-- Betty Hogan, Director of New Product Development, National
> > Cattlemen's Beef Association
>
> -- 
> Kris Schneider 
> D.O.Tech   
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



RE: URGENT - Help defending Struts

2003-12-18 Thread russell . c . friedberg
Sorry about that - Joe caught a Freudian slip in my mail.  It is the
client CIO (I tend to slip that way and think of him as mine).
Accenture uses Struts all of the time (we use it in our base offering -
that is why we want to use it here).

Sorry for the confusion.

Thanks again to everyone,
Russell

[EMAIL PROTECTED]
310-426-5587

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 18, 2003 10:13 AM
To: Struts Users Mailing List
Subject: Re: URGENT - Help defending Struts
Importance: High

>Our CIO is currently fighting the use of Struts by saying that it is
not
>widely used in B2C sites.  Does anyone know of any sites, preferably
>commerce sites that are using Struts?  This would be extremely helpful.

The CIO of a company as big as Accenture is going to decide whether 
Struts should be used or not based on whether or not anyone else is 
doing it?

That's pretty weak.  You'd think he'd at least have some trusted 
technology advisers that could help him decide based on the merits 
instead of just watching the crowds.  Isn't innovation a big buzzword 
for consulting companies like that?

My last project, a collaborative commerce project with a major lawn 
and garden equipment manufacturer, is built entirely upon Struts, and 
is already available for dealer registration; the public should be 
able to use the client's site to purchase tractors and accessories 
from local dealers in Q1 2004.  My company has also developed a 
number of applications in the home appliances industry for direct to 
consumer and manufacturer-collaborative appliance sales which were 
either built from the ground up with Struts, or are gradually being 
ported to Struts.

We also use Struts to run the primary consumer facing sites for 
companies in home furniture, office furniture, and personal 
healthcare products which don't currently have commerce components.

But hey, if he wants you to write your own web application frameworks 
from the ground up, and internally perform all the testing that a 
large user community has already done on the Struts codebase and 
train all your new employees on the internal way to do it instead of 
hiring people who might come in already experienced in a 
framework  well, that's one way to do it.

Joe
-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "We want beef in dessert if we can get it there."
   -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association


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



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

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



Re: URGENT - Help defending Struts

2003-12-18 Thread Max Cooper
I am sure part of it is just that he doesn't want to choose something that
doesn't have a lot of mind/market share. How many people use something is a
decent (but not perfect) indicator of how likely it will be that support
will be available in the future, and that the skills acquired in learning
and using the tool will have value in the future.

Perhaps a good supporting argument for the CIO would be how many messages
have been posted in response to your question in such a short period of
time -- or how many messages are posted on this list per day. Struts is
about as active as any project that I know of, and has been for long time.
:-)

-Max

- Original Message - 
From: "Joe Germuska" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 8:13 AM
Subject: Re: URGENT - Help defending Struts


> >Our CIO is currently fighting the use of Struts by saying that it is not
> >widely used in B2C sites.  Does anyone know of any sites, preferably
> >commerce sites that are using Struts?  This would be extremely helpful.
>
> The CIO of a company as big as Accenture is going to decide whether
> Struts should be used or not based on whether or not anyone else is
> doing it?
>
> That's pretty weak.  You'd think he'd at least have some trusted
> technology advisers that could help him decide based on the merits
> instead of just watching the crowds.  Isn't innovation a big buzzword
> for consulting companies like that?
>
> My last project, a collaborative commerce project with a major lawn
> and garden equipment manufacturer, is built entirely upon Struts, and
> is already available for dealer registration; the public should be
> able to use the client's site to purchase tractors and accessories
> from local dealers in Q1 2004.  My company has also developed a
> number of applications in the home appliances industry for direct to
> consumer and manufacturer-collaborative appliance sales which were
> either built from the ground up with Struts, or are gradually being
> ported to Struts.
>
> We also use Struts to run the primary consumer facing sites for
> companies in home furniture, office furniture, and personal
> healthcare products which don't currently have commerce components.
>
> But hey, if he wants you to write your own web application frameworks
> from the ground up, and internally perform all the testing that a
> large user community has already done on the Struts codebase and
> train all your new employees on the internal way to do it instead of
> hiring people who might come in already experienced in a
> framework  well, that's one way to do it.
>
> Joe
> -- 
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
>   "We want beef in dessert if we can get it there."
>-- Betty Hogan, Director of New Product Development, National
> Cattlemen's Beef Association
>
>
> -
> 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: Are httpSessions thread safe?

2003-12-18 Thread Kris Schneider
The point is about synchronizing on the session object, in which case it makes
all the difference in the world that different instances are used to represent
the same conceptual session.

Quoting Max Cooper <[EMAIL PROTECTED]>:

> Even though you got a few different objects with those calls, they all
> represent the same conceptual "session" underneath. The concept of a
> session
> would be worthless otherwise. In other words, if you stash a reference to
> some object in the session, you will be able to get a reference to that
> same
> object from any of the session objects returned by those calls (even though
> the object representing the session itself may be different from call to
> call).
> 
> -Max
> 
> - Original Message - 
> From: "Kris Schneider" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 8:11 AM
> Subject: RE: Are httpSessions thread safe?
> 
> 
> > Synchronizing on the session object may cause you all sorts of grief...or
> it may
> > not. It all depends on your container. The spec makes no guarantees about
> the
> > identity of the object returned by methods like PageContext.getSession or
> > HttpServletRequest.getSession. For example, here's a test JSP:
> >
> > <%@ page contentType="text/plain" %>
> > <%
> > out.println("session:" + session);
> > out.println("pageContext.getSession: " + pageContext.getSession());
> > out.println("request.getSession: " + request.getSession(false));
> > out.println("request.getSession: " + request.getSession(false));
> > %>
> >
> > Here's the output from TC 4.1.24:
> >
> > session:
> [EMAIL PROTECTED]
> > pageContext.getSession:
> [EMAIL PROTECTED]
> > request.getSession:
> [EMAIL PROTECTED]
> > request.getSession:
> [EMAIL PROTECTED]
> >
> > And that's just within the same thread! I'm pretty sure TC 4.1.29 does
> return
> > the same instance, but just remember it's not guaranteed.
> >
> > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> >
> > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > >The sessions essentially just a sort of Map. Access to it may be
> > > threadsafe,
> > > >but the stuff thats in it is another matter entirely. Multiple
> requests
> > > >associated with the same session will execute simultaneously.
> > >
> > > There's nothing in the specs that guarantee threadsafe access to
> > > session attributes.
> > >
> > > A pattern I've become quite fond of is to create a single object (we
> > > call it a "shell", analogous to an operating system shell) which
> > > encapsulates everything you want in session context for a given user;
> > > then put just this object into session scope, and use methods on it
> > > to do everything else.  This helps you apply synchronization where
> > > appropriate.  There's still a risk of a race condition involving the
> > > initial creation of the shell (assuming you do something like check
> > > the session to see if there's a value under the key you use for the
> > > shell) -- you can put that in a block synchronized on the session
> > > object:
> > >
> > > MyAppShell shell = null;
> > > synchronized (session)
> > > {
> > >shell = (MyAppShell) session.getAttribute(SHELL_KEY);
> > >if (shell == null)
> > >{
> > >  shell = new MyAppShell ();
> > >  session.setAttribute(SHELL_KEY, shell);
> > >}
> > > }
> > >
> > > If the "shell" concept seems like high overhead to you, you can still
> > > synchronize accesses on the session object along those lines; you may
> > > just have more trouble keeping track of all the places it needs to
> > > happen.
> > >
> > > Joe
> > >
> > > -- 
> > > Joe Germuska
> > > [EMAIL PROTECTED]
> > > http://blog.germuska.com
> > >   "We want beef in dessert if we can get it there."
> > >-- Betty Hogan, Director of New Product Development, National
> > > Cattlemen's Beef Association
> >
> > -- 
> > Kris Schneider 
> > D.O.Tech   

-- 
Kris Schneider 
D.O.Tech   

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



RE: Are httpSessions thread safe?

2003-12-18 Thread Joe Hertz
Yuck. And may I say, "Yuck", again?

It's not the Session object per se, as much as it is the particular
attribute I want to store there.

It does strike me that the storage of a Hibernate Session in the
httpSession is a fairly common thing, so I doubt this bites people very
often. It does seem to have the potential to do so. 

In the "real world" why is this not too big of a deal? Or should it be
considered one?

I suppose that unless you've got time consuming requests, or the user
hits some button on the browser twice in rapid succession, it's probably
okay. A token could effectively prevent this type of condition I
suppose.

-J

> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 18, 2003 11:12 AM
> To: Struts Users Mailing List
> Subject: RE: Are httpSessions thread safe?
> 
> 
> Synchronizing on the session object may cause you all sorts 
> of grief...or it may not. It all depends on your container. 
> The spec makes no guarantees about the identity of the object 
> returned by methods like PageContext.getSession or 
> HttpServletRequest.getSession. For example, here's a test JSP:
> 
> <%@ page contentType="text/plain" %>
> <%
> out.println("session:" + session);
> out.println("pageContext.getSession: " + pageContext.getSession());
> out.println("request.getSession: " + request.getSession(false));
> out.println("request.getSession: " + request.getSession(false));
> %>
> 
> Here's the output from TC 4.1.24:
> 
> session:
> [EMAIL PROTECTED]
> pageContext.getSession: 
> [EMAIL PROTECTED]
> request.getSession: 
> [EMAIL PROTECTED]
> request.getSession: 
> [EMAIL PROTECTED]
> 
> And that's just within the same thread! I'm pretty sure TC 
> 4.1.29 does return the same instance, but just remember it's 
> not guaranteed.
> 
> Quoting Joe Germuska <[EMAIL PROTECTED]>:
> 
> > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > >The sessions essentially just a sort of Map. Access to it may be
> > threadsafe,
> > >but the stuff thats in it is another matter entirely. Multiple 
> > >requests associated with the same session will execute 
> > >simultaneously.
> > 
> > There's nothing in the specs that guarantee threadsafe access to
> > session attributes.
> > 
> > A pattern I've become quite fond of is to create a single object (we
> > call it a "shell", analogous to an operating system shell) which 
> > encapsulates everything you want in session context for a 
> given user; 
> > then put just this object into session scope, and use methods on it 
> > to do everything else.  This helps you apply synchronization where 
> > appropriate.  There's still a risk of a race condition 
> involving the 
> > initial creation of the shell (assuming you do something like check 
> > the session to see if there's a value under the key you use for the 
> > shell) -- you can put that in a block synchronized on the session 
> > object:
> > 
> > MyAppShell shell = null;
> > synchronized (session)
> > {
> >shell = (MyAppShell) session.getAttribute(SHELL_KEY);
> >if (shell == null)
> >{
> >  shell = new MyAppShell ();
> >  session.setAttribute(SHELL_KEY, shell);
> >}
> > }
> > 
> > If the "shell" concept seems like high overhead to you, you 
> can still
> > synchronize accesses on the session object along those 
> lines; you may 
> > just have more trouble keeping track of all the places it needs to 
> > happen.
> > 
> > Joe
> > 
> > -- 
> > Joe Germuska
> > [EMAIL PROTECTED]  
> > http://blog.germuska.com
> >   "We want beef in dessert if we can get it there."
> >-- Betty Hogan, Director of New Product Development, National
> > Cattlemen's Beef Association
> 
> -- 
> Kris Schneider 
> D.O.Tech   
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



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



Re: Are httpSessions thread safe?

2003-12-18 Thread Joe Germuska
At 8:22 AM -0800 12/18/03, Max Cooper wrote:
Even though you got a few different objects with those calls, they all
represent the same conceptual "session" underneath. The concept of a session
would be worthless otherwise. In other words, if you stash a reference to
some object in the session, you will be able to get a reference to that same
object from any of the session objects returned by those calls (even though
the object representing the session itself may be different from call to
call).
Sure, but Kris is right -- that doesn't mean that you are correctly 
synchronizing access to the session -- object locks are based on 
object identity, not the conceptual identity of something they 
contain.

Thanks to Kris for pointing that out -- I'd say that furthers the 
rationale for using your own objects to encapsulate the session 
"environment" in your application.

If you moved my code block into a PlugIn or other expert who was 
responsible for instantiating and retrieving the shells, then you 
could just synchronize the access methods on the expert.  You might 
still run into issues if you were running in a clustered environment 
-- I don't have much experience in that kind of deployment.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
 "We want beef in dessert if we can get it there."
  -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association

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


Re: URGENT - Help defending Struts

2003-12-18 Thread Andreas Steinwachs
Hello Russell,

you might want to have a look at

http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsWebLinks

I also found the following site:

http://www.isdcards.com

..but you'll probably find many more searching the Internet (for
example, if you search google for "powered by Struts").

HTH

Best regards,
Andy



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



RE: Are httpSessions thread safe?

2003-12-18 Thread Kris Schneider
Poked aroung on the Hibernate site for a few minutes and found these:

http://www.hibernate.org/42.html
http://www.hibernate.org/43.html

Quoting Joe Hertz <[EMAIL PROTECTED]>:

> Yuck. And may I say, "Yuck", again?
> 
> It's not the Session object per se, as much as it is the particular
> attribute I want to store there.
> 
> It does strike me that the storage of a Hibernate Session in the
> httpSession is a fairly common thing, so I doubt this bites people very
> often. It does seem to have the potential to do so. 
> 
> In the "real world" why is this not too big of a deal? Or should it be
> considered one?
> 
> I suppose that unless you've got time consuming requests, or the user
> hits some button on the browser twice in rapid succession, it's probably
> okay. A token could effectively prevent this type of condition I
> suppose.
> 
> -J
> 
> > -Original Message-
> > From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, December 18, 2003 11:12 AM
> > To: Struts Users Mailing List
> > Subject: RE: Are httpSessions thread safe?
> > 
> > 
> > Synchronizing on the session object may cause you all sorts 
> > of grief...or it may not. It all depends on your container. 
> > The spec makes no guarantees about the identity of the object 
> > returned by methods like PageContext.getSession or 
> > HttpServletRequest.getSession. For example, here's a test JSP:
> > 
> > <%@ page contentType="text/plain" %>
> > <%
> > out.println("session:" + session);
> > out.println("pageContext.getSession: " + pageContext.getSession());
> > out.println("request.getSession: " + request.getSession(false));
> > out.println("request.getSession: " + request.getSession(false));
> > %>
> > 
> > Here's the output from TC 4.1.24:
> > 
> > session:
> > [EMAIL PROTECTED]
> > pageContext.getSession: 
> > [EMAIL PROTECTED]
> > request.getSession: 
> > [EMAIL PROTECTED]
> > request.getSession: 
> > [EMAIL PROTECTED]
> > 
> > And that's just within the same thread! I'm pretty sure TC 
> > 4.1.29 does return the same instance, but just remember it's 
> > not guaranteed.
> > 
> > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> > 
> > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > >The sessions essentially just a sort of Map. Access to it may be
> > > threadsafe,
> > > >but the stuff thats in it is another matter entirely. Multiple 
> > > >requests associated with the same session will execute 
> > > >simultaneously.
> > > 
> > > There's nothing in the specs that guarantee threadsafe access to
> > > session attributes.
> > > 
> > > A pattern I've become quite fond of is to create a single object (we
> > > call it a "shell", analogous to an operating system shell) which 
> > > encapsulates everything you want in session context for a 
> > given user; 
> > > then put just this object into session scope, and use methods on it 
> > > to do everything else.  This helps you apply synchronization where 
> > > appropriate.  There's still a risk of a race condition 
> > involving the 
> > > initial creation of the shell (assuming you do something like check 
> > > the session to see if there's a value under the key you use for the 
> > > shell) -- you can put that in a block synchronized on the session 
> > > object:
> > > 
> > > MyAppShell shell = null;
> > > synchronized (session)
> > > {
> > >shell = (MyAppShell) session.getAttribute(SHELL_KEY);
> > >if (shell == null)
> > >{
> > >  shell = new MyAppShell ();
> > >  session.setAttribute(SHELL_KEY, shell);
> > >}
> > > }
> > > 
> > > If the "shell" concept seems like high overhead to you, you 
> > can still
> > > synchronize accesses on the session object along those 
> > lines; you may 
> > > just have more trouble keeping track of all the places it needs to 
> > > happen.
> > > 
> > > Joe
> > > 
> > > -- 
> > > Joe Germuska
> > > [EMAIL PROTECTED]  
> > > http://blog.germuska.com
> > >   "We want beef in dessert if we can get it there."
> > >-- Betty Hogan, Director of New Product Development, National
> > > Cattlemen's Beef Association
> > 
> > -- 
> > Kris Schneider 
> > D.O.Tech   

-- 
Kris Schneider 
D.O.Tech   

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



Re: URGENT - Help defending Struts

2003-12-18 Thread Mark Lowe
just smile a little bit in a "yeah right" manner. he's just challenging 
you or plain old bulshiting..
Sure struts isn't used in all b2c sites, but so what, is that a point ?

IMO If his team take to it then why not, its more a question of 
java/jsp or not that struts.

On 18 Dec 2003, at 16:03, Max Cooper wrote:

http://www.fiskars.com/ is using Struts, too.

-Max

- Original Message -
From: "Andy Engle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 7:58 AM
Subject: Re: URGENT - Help defending Struts

[EMAIL PROTECTED] wrote:

Our CIO is currently fighting the use of Struts by saying that it is
not widely used in B2C sites.  Does anyone know of any sites,
preferably commerce sites that are using Struts?  This would be
extremely helpful.
It looks like www.verizonwireless.com has their entire user account
setup done with Struts.  I love it -- has a great look, lots of
information, charts, past billing info, the works.  On top of that,
it's all pretty quick and easy to use.
Andy

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



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


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


[OT] Numeric Overflow

2003-12-18 Thread Raj Yadav
Hi All,
I have a SQL query which give me sum from a Number column. The number is
huge. It is 44515445719.
I use rs.getInt(1) and it gives me Numeric Overflow Exception at Run
time.
I tried to use rs.getLong and rs.getDouble and they both give me compile
time error.

Can some one please help as to what can be used here.

Thanks,
-raj


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



Re: [OT] Numeric Overflow

2003-12-18 Thread ian_d_stewart

What is the compile time error you're seeing?


Ian



   

"Raj Yadav"

<[EMAIL PROTECTED]   To: <[EMAIL PROTECTED]>   
   
>cc:   

 Subject: [OT] Numeric Overflow

12/18/2003 

11:48 AM   

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Hi All,
I have a SQL query which give me sum from a Number column. The number is
huge. It is 44515445719.
I use rs.getInt(1) and it gives me Numeric Overflow Exception at Run
time.
I tried to use rs.getLong and rs.getDouble and they both give me compile
time error.

Can some one please help as to what can be used here.

Thanks,
-raj


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






This transmission may contain information that is privileged, confidential and/or 
exempt from disclosure under applicable law. If you are not the intended recipient, 
you are hereby notified that any disclosure, copying, distribution, or use of the 
information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. 
If you received this transmission in error, please immediately contact the sender and 
destroy the material in its entirety, whether in electronic or hard copy format. Thank 
you.


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



RE: [OT] Numeric Overflow

2003-12-18 Thread Raj Yadav
Found Double
Required int

-raj

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 18, 2003 10:56 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: [OT] Numeric Overflow



What is the compile time error you're seeing?


Ian



 

"Raj Yadav"

<[EMAIL PROTECTED]   To:
<[EMAIL PROTECTED]>  
>cc:

 Subject: [OT] Numeric
Overflow
12/18/2003

11:48 AM

Please respond

to "Struts

Users Mailing

List"

 

 





Hi All,
I have a SQL query which give me sum from a Number column. The number is
huge. It is 44515445719. I use rs.getInt(1) and it gives me Numeric
Overflow Exception at Run time. I tried to use rs.getLong and
rs.getDouble and they both give me compile time error.

Can some one please help as to what can be used here.

Thanks,
-raj


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






This transmission may contain information that is privileged,
confidential and/or exempt from disclosure under applicable law. If you
are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the information contained
herein (including any reliance thereon) is STRICTLY PROHIBITED. If you
received this transmission in error, please immediately contact the
sender and destroy the material in its entirety, whether in electronic
or hard copy format. 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: [OT] Numeric Overflow

2003-12-18 Thread Voinea, Marina
can you get a BigDecimal() ? 

-Original Message-
From: Raj Yadav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:49 AM
To: [EMAIL PROTECTED]
Subject: [OT] Numeric Overflow


Hi All,
I have a SQL query which give me sum from a Number column. The number is
huge. It is 44515445719.
I use rs.getInt(1) and it gives me Numeric Overflow Exception at Run
time.
I tried to use rs.getLong and rs.getDouble and they both give me compile
time error.

Can some one please help as to what can be used here.

Thanks,
-raj


-
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 test cases

2003-12-18 Thread Ovidiu EFTIMIE
Hi,
Has anyone used WSAD 5.0 with StrutsTestCase 2.0 ?
I've only succeded to make it work after several operation which don't inspire
me much confidence, or maybe is just me  taking  the hard way.
Is there anyone there who used this and can give me some hints?

Thanx,
Ovidiu

PS: For anyone interested here are the steps I took to make it work the way it
does

[1]. in setUp() add
setContextDirectory(new File("D:\\workspace\\strutsJunit\\jsp"));
setConfigFile("/WEB-INF/struts-config.xml");
[2.]Replace the  servletunit.ServletContextSimulator getRessource() method
content with
try {
   return this.getClass().getResource(path);
 } catch (Exception e) {
  return null;
 }
[3.]execute ant to build a new strutstest-2.0.0.jar (the new one has 42K)
[4.]replace in the /WEB-INF/lib/ strutstest-2.0.0.jar (38K) with the new one
[5.]In your /WEB-INF/classes/ create a directory called /WEB-INF/ and copy
struts-config.xml and web.xml there
Run your tests


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



Re: Are httpSessions thread safe?

2003-12-18 Thread David Erickson
Another question along the same vein.. each httpRequest that comes into say
Tomcat is given a seperate thread to operate under correct?
-David

- Original Message - 
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 1:09 AM
Subject: RE: Are httpSessions thread safe?


> The sessions essentially just a sort of Map. Access to it may be
threadsafe,
> but the stuff thats in it is another matter entirely. Multiple requests
> associated with the same session will execute simultaneously.
>
> If you have >1 threads playing with the same unsafe object (which you just
> happened to pull out of the session) then of course you will need to
> synchronise their access to it externally.
>
> ie:
>
> Garthop unsafeObject = (Garthop)session.getAttribute(THE_GARTHOP);
> synchronized(unsafeObject)
> {
>   garthop.nargle();
> }
>
>
>
>
> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 18 December 2003 15:56
> To: 'Struts Users Mailing List'
> Subject: Are httpSessions thread safe?
>
>
> Not sure how OT this question is.
>
> My current plan (unless this is bad for some reason, but if so, Ted H
> should change his example app :-) is to stash the hibernate Session for
> a user into his httpSession, and reuse it on each request.
>
> A Hibernate Session instance isn't threadsafe. I imagine if two really
> quick http requests got generated out of the same browser, all hell
> could break out.
>
> I guess I want to know if mortals like me need to worry about this.
>
> Does Struts (or the Servlet container FAIK) prevent this from occuring,
> or do I need to ensure this doesn't happen? If so, how? With a token or
> is there a better strategy?
>
> TIA
>
> -Joe
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



logic:iterate inside a logic:iterate ??

2003-12-18 Thread gentyjp

  Hi
 I'am a Struts newbie, sorry if it is a "classic" question.

 My question is about logic:iterate

 I have a vector of documents.
 In my application a document is a vector of LabelValueBean. I wish to 
write both the label and the value.

 I wish to write all my documents so I iterate through my vector of documents.
But after that how can I iterate through my vector of LabelValueBean ???
Basically here's what I want to do :

for_each_document
{
for_each_LabelValueBean_in_the_current_document
{
 write LabelValueBean.Label;
 write LabelValueBean.Value;
}
}
   thanks for you help

  Genty Jean-Paul

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


RE: Are httpSessions thread safe?

2003-12-18 Thread Joe Hertz
I saw these. I just had this grand idea of minimizing the Hibernate
connections by doing what Ted did in his example -- not actually
discarding a user's Hibernate Session until his httpSession expired.

I've never messed with ThreadLocals before but I suspect that the
attempt to put a ThreadLocal into a httpSession I suspect would be funny
to watch.



> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 18, 2003 11:45 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Are httpSessions thread safe?
> 
> 
> Poked aroung on the Hibernate site for a few minutes and found these:
> 
> http://www.hibernate.org/42.html http://www.hibernate.org/43.html
> 
> Quoting Joe Hertz <[EMAIL PROTECTED]>:
> 
> > Yuck. And may I say, "Yuck", again?
> > 
> > It's not the Session object per se, as much as it is the particular 
> > attribute I want to store there.
> > 
> > It does strike me that the storage of a Hibernate Session in the 
> > httpSession is a fairly common thing, so I doubt this bites people 
> > very often. It does seem to have the potential to do so.
> > 
> > In the "real world" why is this not too big of a deal? Or 
> should it be 
> > considered one?
> > 
> > I suppose that unless you've got time consuming requests, 
> or the user 
> > hits some button on the browser twice in rapid succession, it's 
> > probably okay. A token could effectively prevent this type of 
> > condition I suppose.
> > 
> > -J
> > 
> > > -Original Message-
> > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 18, 2003 11:12 AM
> > > To: Struts Users Mailing List
> > > Subject: RE: Are httpSessions thread safe?
> > > 
> > > 
> > > Synchronizing on the session object may cause you all sorts
> > > of grief...or it may not. It all depends on your container. 
> > > The spec makes no guarantees about the identity of the object 
> > > returned by methods like PageContext.getSession or 
> > > HttpServletRequest.getSession. For example, here's a test JSP:
> > > 
> > > <%@ page contentType="text/plain" %>
> > > <%
> > > out.println("session:" + session);
> > > out.println("pageContext.getSession: " + 
> pageContext.getSession());
> > > out.println("request.getSession: " + 
> request.getSession(false));
> > > out.println("request.getSession: " + 
> request.getSession(false));
> > > %>
> > > 
> > > Here's the output from TC 4.1.24:
> > > 
> > > session:
> > > [EMAIL PROTECTED]
> > > pageContext.getSession:
> > > [EMAIL PROTECTED]
> > > request.getSession: 
> > > [EMAIL PROTECTED]
> > > request.getSession: 
> > > [EMAIL PROTECTED]
> > > 
> > > And that's just within the same thread! I'm pretty sure TC
> > > 4.1.29 does return the same instance, but just remember it's 
> > > not guaranteed.
> > > 
> > > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> > > 
> > > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > > >The sessions essentially just a sort of Map. Access to 
> it may be
> > > > threadsafe,
> > > > >but the stuff thats in it is another matter entirely. Multiple
> > > > >requests associated with the same session will execute 
> > > > >simultaneously.
> > > > 
> > > > There's nothing in the specs that guarantee threadsafe 
> access to 
> > > > session attributes.
> > > > 
> > > > A pattern I've become quite fond of is to create a 
> single object 
> > > > (we call it a "shell", analogous to an operating system shell) 
> > > > which encapsulates everything you want in session context for a
> > > given user;
> > > > then put just this object into session scope, and use 
> methods on 
> > > > it
> > > > to do everything else.  This helps you apply 
> synchronization where 
> > > > appropriate.  There's still a risk of a race condition 
> > > involving the
> > > > initial creation of the shell (assuming you do something like 
> > > > check
> > > > the session to see if there's a value under the key you 
> use for the 
> > > > shell) -- you can put that in a block synchronized on 
> the session 
> > > > object:
> > > > 
> > > > MyAppShell shell = null;
> > > > synchronized (session)
> > > > {
> > > >shell = (MyAppShell) session.getAttribute(SHELL_KEY);
> > > >if (shell == null)
> > > >{
> > > >  shell = new MyAppShell ();
> > > >  session.setAttribute(SHELL_KEY, shell);
> > > >}
> > > > }
> > > > 
> > > > If the "shell" concept seems like high overhead to you, you
> > > can still
> > > > synchronize accesses on the session object along those
> > > lines; you may
> > > > just have more trouble keeping track of all the places 
> it needs to
> > > > happen.
> > > > 
> > > > Joe
> > > > 
> > > > -- 
> > > > Joe Germuska
> > > > [EMAIL PROTECTED]  
> > > > http://blog.germuska.com
> > > >   "We want beef in dessert if we can get it there."
> > > >-- Betty Hogan, Director of New Product Development, 
> National 
> > > > Cattlemen's Beef Association
> > >

Re: Are httpSessions thread safe?

2003-12-18 Thread Max Cooper
Agreed. I wasn't thinking that the question was to literally synchronize on
the session object itself. I see now that that may have been the original
intent. Synchronizing on the session object itself seems like a really
dangerous idea to me (invitation for deadlock, performance issues). And
Kris's test shows it probably wouldn't do what you expect it to anyway.

-Max

- Original Message - 
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 8:32 AM
Subject: Re: Are httpSessions thread safe?


> The point is about synchronizing on the session object, in which case it
makes
> all the difference in the world that different instances are used to
represent
> the same conceptual session.



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



Re: Are httpSessions thread safe?

2003-12-18 Thread David Erickson
That second one actually works great, 43.html.  Since each request is
running in its own thread it has the possiblity to create a new hibernate
session for every request, but it only creates it if you call the getSession
method on the filter.  And at the end of the request that session is
destroyed.
-David

- Original Message - 
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:20 AM
Subject: RE: Are httpSessions thread safe?


> I saw these. I just had this grand idea of minimizing the Hibernate
> connections by doing what Ted did in his example -- not actually
> discarding a user's Hibernate Session until his httpSession expired.
>
> I've never messed with ThreadLocals before but I suspect that the
> attempt to put a ThreadLocal into a httpSession I suspect would be funny
> to watch.
>
>
>
> > -Original Message-
> > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 18, 2003 11:45 AM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: RE: Are httpSessions thread safe?
> >
> >
> > Poked aroung on the Hibernate site for a few minutes and found these:
> >
> > http://www.hibernate.org/42.html http://www.hibernate.org/43.html
> >
> > Quoting Joe Hertz <[EMAIL PROTECTED]>:
> >
> > > Yuck. And may I say, "Yuck", again?
> > >
> > > It's not the Session object per se, as much as it is the particular
> > > attribute I want to store there.
> > >
> > > It does strike me that the storage of a Hibernate Session in the
> > > httpSession is a fairly common thing, so I doubt this bites people
> > > very often. It does seem to have the potential to do so.
> > >
> > > In the "real world" why is this not too big of a deal? Or
> > should it be
> > > considered one?
> > >
> > > I suppose that unless you've got time consuming requests,
> > or the user
> > > hits some button on the browser twice in rapid succession, it's
> > > probably okay. A token could effectively prevent this type of
> > > condition I suppose.
> > >
> > > -J
> > >
> > > > -Original Message-
> > > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, December 18, 2003 11:12 AM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Are httpSessions thread safe?
> > > >
> > > >
> > > > Synchronizing on the session object may cause you all sorts
> > > > of grief...or it may not. It all depends on your container.
> > > > The spec makes no guarantees about the identity of the object
> > > > returned by methods like PageContext.getSession or
> > > > HttpServletRequest.getSession. For example, here's a test JSP:
> > > >
> > > > <%@ page contentType="text/plain" %>
> > > > <%
> > > > out.println("session:" + session);
> > > > out.println("pageContext.getSession: " +
> > pageContext.getSession());
> > > > out.println("request.getSession: " +
> > request.getSession(false));
> > > > out.println("request.getSession: " +
> > request.getSession(false));
> > > > %>
> > > >
> > > > Here's the output from TC 4.1.24:
> > > >
> > > > session:
> > > > [EMAIL PROTECTED]
> > > > pageContext.getSession:
> > > > [EMAIL PROTECTED]
> > > > request.getSession:
> > > > [EMAIL PROTECTED]
> > > > request.getSession:
> > > > [EMAIL PROTECTED]
> > > >
> > > > And that's just within the same thread! I'm pretty sure TC
> > > > 4.1.29 does return the same instance, but just remember it's
> > > > not guaranteed.
> > > >
> > > > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> > > >
> > > > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > > > >The sessions essentially just a sort of Map. Access to
> > it may be
> > > > > threadsafe,
> > > > > >but the stuff thats in it is another matter entirely. Multiple
> > > > > >requests associated with the same session will execute
> > > > > >simultaneously.
> > > > >
> > > > > There's nothing in the specs that guarantee threadsafe
> > access to
> > > > > session attributes.
> > > > >
> > > > > A pattern I've become quite fond of is to create a
> > single object
> > > > > (we call it a "shell", analogous to an operating system shell)
> > > > > which encapsulates everything you want in session context for a
> > > > given user;
> > > > > then put just this object into session scope, and use
> > methods on
> > > > > it
> > > > > to do everything else.  This helps you apply
> > synchronization where
> > > > > appropriate.  There's still a risk of a race condition
> > > > involving the
> > > > > initial creation of the shell (assuming you do something like
> > > > > check
> > > > > the session to see if there's a value under the key you
> > use for the
> > > > > shell) -- you can put that in a block synchronized on
> > the session
> > > > > object:
> > > > >
> > > > > MyAppShell shell = null;
> > > > > synchronized (session)
> > > > > {
> > > > >shell = (MyAppShell) session.getAttribute(SHELL_KEY);
> > > > >if (shell == null)
> > > > >{
> > > > >  shell = new 

Re: Are httpSessions thread safe?

2003-12-18 Thread Adolfo Miguelez
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=149353








From: "David Erickson" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: Re: Are httpSessions thread safe?
Date: Thu, 18 Dec 2003 10:26:56 -0700

That second one actually works great, 43.html.  Since each request is
running in its own thread it has the possiblity to create a new hibernate
session for every request, but it only creates it if you call the 
getSession
method on the filter.  And at the end of the request that session is
destroyed.
-David

- Original Message -
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:20 AM
Subject: RE: Are httpSessions thread safe?
> I saw these. I just had this grand idea of minimizing the Hibernate
> connections by doing what Ted did in his example -- not actually
> discarding a user's Hibernate Session until his httpSession expired.
>
> I've never messed with ThreadLocals before but I suspect that the
> attempt to put a ThreadLocal into a httpSession I suspect would be funny
> to watch.
>
>
>
> > -Original Message-
> > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 18, 2003 11:45 AM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: RE: Are httpSessions thread safe?
> >
> >
> > Poked aroung on the Hibernate site for a few minutes and found these:
> >
> > http://www.hibernate.org/42.html http://www.hibernate.org/43.html
> >
> > Quoting Joe Hertz <[EMAIL PROTECTED]>:
> >
> > > Yuck. And may I say, "Yuck", again?
> > >
> > > It's not the Session object per se, as much as it is the particular
> > > attribute I want to store there.
> > >
> > > It does strike me that the storage of a Hibernate Session in the
> > > httpSession is a fairly common thing, so I doubt this bites people
> > > very often. It does seem to have the potential to do so.
> > >
> > > In the "real world" why is this not too big of a deal? Or
> > should it be
> > > considered one?
> > >
> > > I suppose that unless you've got time consuming requests,
> > or the user
> > > hits some button on the browser twice in rapid succession, it's
> > > probably okay. A token could effectively prevent this type of
> > > condition I suppose.
> > >
> > > -J
> > >
> > > > -Original Message-
> > > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, December 18, 2003 11:12 AM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Are httpSessions thread safe?
> > > >
> > > >
> > > > Synchronizing on the session object may cause you all sorts
> > > > of grief...or it may not. It all depends on your container.
> > > > The spec makes no guarantees about the identity of the object
> > > > returned by methods like PageContext.getSession or
> > > > HttpServletRequest.getSession. For example, here's a test JSP:
> > > >
> > > > <%@ page contentType="text/plain" %>
> > > > <%
> > > > out.println("session:" + session);
> > > > out.println("pageContext.getSession: " +
> > pageContext.getSession());
> > > > out.println("request.getSession: " +
> > request.getSession(false));
> > > > out.println("request.getSession: " +
> > request.getSession(false));
> > > > %>
> > > >
> > > > Here's the output from TC 4.1.24:
> > > >
> > > > session:
> > > > [EMAIL PROTECTED]
> > > > pageContext.getSession:
> > > > [EMAIL PROTECTED]
> > > > request.getSession:
> > > > [EMAIL PROTECTED]
> > > > request.getSession:
> > > > [EMAIL PROTECTED]
> > > >
> > > > And that's just within the same thread! I'm pretty sure TC
> > > > 4.1.29 does return the same instance, but just remember it's
> > > > not guaranteed.
> > > >
> > > > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> > > >
> > > > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > > > >The sessions essentially just a sort of Map. Access to
> > it may be
> > > > > threadsafe,
> > > > > >but the stuff thats in it is another matter entirely. Multiple
> > > > > >requests associated with the same session will execute
> > > > > >simultaneously.
> > > > >
> > > > > There's nothing in the specs that guarantee threadsafe
> > access to
> > > > > session attributes.
> > > > >
> > > > > A pattern I've become quite fond of is to create a
> > single object
> > > > > (we call it a "shell", analogous to an operating system shell)
> > > > > which encapsulates everything you want in session context for a
> > > > given user;
> > > > > then put just this object into session scope, and use
> > methods on
> > > > > it
> > > > > to do everything else.  This helps you apply
> > synchronization where
> > > > > appropriate.  There's still a risk of a race condition
> > > > involving the
> > > > > initial creation of the shell (assuming you do something like
> > > > > check
> > > > > the session to see if there's a value under the key you
> > use for the
>

RE: logic:iterate inside a logic:iterate ??

2003-12-18 Thread Robert Taylor







You should probably use JSTL for this.









> -Original Message-
> From: gentyjp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 12:16 PM
> To: [EMAIL PROTECTED]
> Subject: logic:iterate inside a logic:iterate ??
> 
> 
>   
>Hi
> 
>   I'am a Struts newbie, sorry if it is a "classic" question.
> 
>   My question is about logic:iterate
> 
>   I have a vector of documents.
>   In my application a document is a vector of LabelValueBean. I wish to 
> write both the label and the value.
> 
>   I wish to write all my documents so I iterate through my vector 
> of documents.
> But after that how can I iterate through my vector of LabelValueBean ???
> 
> Basically here's what I want to do :
> 
> for_each_document
> {
>  for_each_LabelValueBean_in_the_current_document
>  {
>   write LabelValueBean.Label;
>   write LabelValueBean.Value;
>  }
> }
> 
> thanks for you help
> 
> 
>Genty Jean-Paul
> 
> 
> -
> 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: Are httpSessions thread safe?

2003-12-18 Thread Joe Hertz
I guess creating Hibernate Sessions and Destroying them on every request
isn't as bad as I imagine it is?

I figured creating the session when the user showed up, destroying it
when his httpSession expired, and reconnecting/disconnecting on each
request was strictly better.

I guess doing this isn't quite worth the effort? No one else seems to
mind :)

-Joe

> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 18, 2003 12:27 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Are httpSessions thread safe?
> 
> 
> That second one actually works great, 43.html.  Since each 
> request is running in its own thread it has the possiblity to 
> create a new hibernate session for every request, but it only 
> creates it if you call the getSession method on the filter.  
> And at the end of the request that session is destroyed. -David
> 
> - Original Message - 
> From: "Joe Hertz" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 10:20 AM
> Subject: RE: Are httpSessions thread safe?
> 
> 
> > I saw these. I just had this grand idea of minimizing the Hibernate 
> > connections by doing what Ted did in his example -- not actually 
> > discarding a user's Hibernate Session until his httpSession expired.
> >
> > I've never messed with ThreadLocals before but I suspect that the 
> > attempt to put a ThreadLocal into a httpSession I suspect would be 
> > funny to watch.
> >
> >
> >
> > > -Original Message-
> > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 18, 2003 11:45 AM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: RE: Are httpSessions thread safe?
> > >
> > >
> > > Poked aroung on the Hibernate site for a few minutes and found 
> > > these:
> > >
> > > http://www.hibernate.org/42.html http://www.hibernate.org/43.html
> > >
> > > Quoting Joe Hertz <[EMAIL PROTECTED]>:
> > >
> > > > Yuck. And may I say, "Yuck", again?
> > > >
> > > > It's not the Session object per se, as much as it is the 
> > > > particular attribute I want to store there.
> > > >
> > > > It does strike me that the storage of a Hibernate 
> Session in the 
> > > > httpSession is a fairly common thing, so I doubt this 
> bites people 
> > > > very often. It does seem to have the potential to do so.
> > > >
> > > > In the "real world" why is this not too big of a deal? Or
> > > should it be
> > > > considered one?
> > > >
> > > > I suppose that unless you've got time consuming requests,
> > > or the user
> > > > hits some button on the browser twice in rapid succession, it's 
> > > > probably okay. A token could effectively prevent this type of 
> > > > condition I suppose.
> > > >
> > > > -J
> > > >
> > > > > -Original Message-
> > > > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, December 18, 2003 11:12 AM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: Are httpSessions thread safe?
> > > > >
> > > > >
> > > > > Synchronizing on the session object may cause you all 
> sorts of 
> > > > > grief...or it may not. It all depends on your container. The 
> > > > > spec makes no guarantees about the identity of the object 
> > > > > returned by methods like PageContext.getSession or 
> > > > > HttpServletRequest.getSession. For example, here's a test JSP:
> > > > >
> > > > > <%@ page contentType="text/plain" %>
> > > > > <%
> > > > > out.println("session:" + session);
> > > > > out.println("pageContext.getSession: " +
> > > pageContext.getSession());
> > > > > out.println("request.getSession: " +
> > > request.getSession(false));
> > > > > out.println("request.getSession: " +
> > > request.getSession(false));
> > > > > %>
> > > > >
> > > > > Here's the output from TC 4.1.24:
> > > > >
> > > > > session: 
> > > > > [EMAIL PROTECTED]
> > > > > pageContext.getSession: 
> > > > > [EMAIL PROTECTED]
> > > > > request.getSession: 
> > > > > [EMAIL PROTECTED]
> > > > > request.getSession: 
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > > And that's just within the same thread! I'm pretty sure TC 
> > > > > 4.1.29 does return the same instance, but just 
> remember it's not 
> > > > > guaranteed.
> > > > >
> > > > > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> > > > >
> > > > > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > > > > >The sessions essentially just a sort of Map. Access to
> > > it may be
> > > > > > threadsafe,
> > > > > > >but the stuff thats in it is another matter entirely. 
> > > > > > >Multiple requests associated with the same session will 
> > > > > > >execute simultaneously.
> > > > > >
> > > > > > There's nothing in the specs that guarantee threadsafe
> > > access to
> > > > > > session attributes.
> > > > > >
> > > > > > A pattern I've become quite fond of is to create a
> > > single object
> > > > > > (we call it a "shell", analogous to an operating 
> system 

RE: [OT] Numeric Overflow

2003-12-18 Thread ian_d_stewart

Makes sense.

I'm guessing you have something like:

int num = rs.getDouble(1);

>From your earlier e-mail, it looks like num is actually a long (i.e., it is
a whole number that will not fit into Java's 32-bit int).  Try this
instead:

long num = rs.getLong(1);


HTH,
Ian



   

"Raj Yadav"

<[EMAIL PROTECTED]   To: "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]>
>cc:   

 Subject: RE: [OT] Numeric Overflow

12/18/2003 

11:58 AM   

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Found Double
Required int

-raj

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:56 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: [OT] Numeric Overflow



What is the compile time error you're seeing?


Ian





"Raj Yadav"

<[EMAIL PROTECTED]   To:
<[EMAIL PROTECTED]>
>cc:

 Subject: [OT] Numeric
Overflow
12/18/2003

11:48 AM

Please respond

to "Struts

Users Mailing

List"









Hi All,
I have a SQL query which give me sum from a Number column. The number is
huge. It is 44515445719. I use rs.getInt(1) and it gives me Numeric
Overflow Exception at Run time. I tried to use rs.getLong and
rs.getDouble and they both give me compile time error.

Can some one please help as to what can be used here.

Thanks,
-raj


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






This transmission may contain information that is privileged,
confidential and/or exempt from disclosure under applicable law. If you
are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the information contained
herein (including any reliance thereon) is STRICTLY PROHIBITED. If you
received this transmission in error, please immediately contact the
sender and destroy the material in its entirety, whether in electronic
or hard copy format. 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]






This transmission may contain information that is privileged, confidential and/or 
exempt from disclosure under applicable law. If you are not the intended recipient, 
you are hereby notified that any disclosure, copying, distribution, or use of the 
information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. 
If you received this transmission in error, please immediately contact the sender and 
destroy the material in its entirety, whether in electronic or hard copy format. Thank 
you.


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



Re: Are httpSessions thread safe?

2003-12-18 Thread Max Cooper
Most (all?) containers pool the request-handler threads, so it won't be
creating hibernate sessions for each request. It would still be thread safe,
since a single thread won't be used to process two requests simultaneously.
This sounds like a good approach to me -- safe and likely to perform just
fine.

-Max

- Original Message - 
From: "David Erickson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 9:26 AM
Subject: Re: Are httpSessions thread safe?


> That second one actually works great, 43.html.  Since each request is
> running in its own thread it has the possiblity to create a new hibernate
> session for every request, but it only creates it if you call the
getSession
> method on the filter.  And at the end of the request that session is
> destroyed.
> -David
>
> - Original Message - 
> From: "Joe Hertz" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 10:20 AM
> Subject: RE: Are httpSessions thread safe?
>
>
> > I saw these. I just had this grand idea of minimizing the Hibernate
> > connections by doing what Ted did in his example -- not actually
> > discarding a user's Hibernate Session until his httpSession expired.
> >
> > I've never messed with ThreadLocals before but I suspect that the
> > attempt to put a ThreadLocal into a httpSession I suspect would be funny
> > to watch.
> >
> >
> >
> > > -Original Message-
> > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 18, 2003 11:45 AM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: RE: Are httpSessions thread safe?
> > >
> > >
> > > Poked aroung on the Hibernate site for a few minutes and found these:
> > >
> > > http://www.hibernate.org/42.html http://www.hibernate.org/43.html
> > >
> > > Quoting Joe Hertz <[EMAIL PROTECTED]>:
> > >
> > > > Yuck. And may I say, "Yuck", again?
> > > >
> > > > It's not the Session object per se, as much as it is the particular
> > > > attribute I want to store there.
> > > >
> > > > It does strike me that the storage of a Hibernate Session in the
> > > > httpSession is a fairly common thing, so I doubt this bites people
> > > > very often. It does seem to have the potential to do so.
> > > >
> > > > In the "real world" why is this not too big of a deal? Or
> > > should it be
> > > > considered one?
> > > >
> > > > I suppose that unless you've got time consuming requests,
> > > or the user
> > > > hits some button on the browser twice in rapid succession, it's
> > > > probably okay. A token could effectively prevent this type of
> > > > condition I suppose.
> > > >
> > > > -J
> > > >
> > > > > -Original Message-
> > > > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, December 18, 2003 11:12 AM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: Are httpSessions thread safe?
> > > > >
> > > > >
> > > > > Synchronizing on the session object may cause you all sorts
> > > > > of grief...or it may not. It all depends on your container.
> > > > > The spec makes no guarantees about the identity of the object
> > > > > returned by methods like PageContext.getSession or
> > > > > HttpServletRequest.getSession. For example, here's a test JSP:
> > > > >
> > > > > <%@ page contentType="text/plain" %>
> > > > > <%
> > > > > out.println("session:" + session);
> > > > > out.println("pageContext.getSession: " +
> > > pageContext.getSession());
> > > > > out.println("request.getSession: " +
> > > request.getSession(false));
> > > > > out.println("request.getSession: " +
> > > request.getSession(false));
> > > > > %>
> > > > >
> > > > > Here's the output from TC 4.1.24:
> > > > >
> > > > > session:
> > > > > [EMAIL PROTECTED]
> > > > > pageContext.getSession:
> > > > > [EMAIL PROTECTED]
> > > > > request.getSession:
> > > > > [EMAIL PROTECTED]
> > > > > request.getSession:
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > > And that's just within the same thread! I'm pretty sure TC
> > > > > 4.1.29 does return the same instance, but just remember it's
> > > > > not guaranteed.
> > > > >
> > > > > Quoting Joe Germuska <[EMAIL PROTECTED]>:
> > > > >
> > > > > > At 4:09 PM +0800 12/18/03, Andrew Hill wrote:
> > > > > > >The sessions essentially just a sort of Map. Access to
> > > it may be
> > > > > > threadsafe,
> > > > > > >but the stuff thats in it is another matter entirely. Multiple
> > > > > > >requests associated with the same session will execute
> > > > > > >simultaneously.
> > > > > >
> > > > > > There's nothing in the specs that guarantee threadsafe
> > > access to
> > > > > > session attributes.
> > > > > >
> > > > > > A pattern I've become quite fond of is to create a
> > > single object
> > > > > > (we call it a "shell", analogous to an operating system shell)
> > > > > > which encapsulates everything you want in session context for a
> > > >

Re: Are httpSessions thread safe?

2003-12-18 Thread David Erickson
Well what that plugin does is IF you request a session from it, it binds a
Hibernate Session to your current executing thread.  thus if you are using
actions, anywhere in that action and in the resulting jsp the same session
is used if you requested it again.  And on requests for images or whatever
since its never requested it doesn't get created.  If you are using a
connection pool like DBCP or something it shouldnt be a problem at all.

-David

- Original Message - 
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 10:41 AM
Subject: RE: Are httpSessions thread safe?


> I guess creating Hibernate Sessions and Destroying them on every request
> isn't as bad as I imagine it is?
>
> I figured creating the session when the user showed up, destroying it
> when his httpSession expired, and reconnecting/disconnecting on each
> request was strictly better.
>
> I guess doing this isn't quite worth the effort? No one else seems to
> mind :)
>
> -Joe
>
> > -Original Message-
> > From: David Erickson [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 18, 2003 12:27 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Are httpSessions thread safe?
> >
> >
> > That second one actually works great, 43.html.  Since each
> > request is running in its own thread it has the possiblity to
> > create a new hibernate session for every request, but it only
> > creates it if you call the getSession method on the filter.
> > And at the end of the request that session is destroyed. -David
> >
> > - Original Message - 
> > From: "Joe Hertz" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Thursday, December 18, 2003 10:20 AM
> > Subject: RE: Are httpSessions thread safe?
> >
> >
> > > I saw these. I just had this grand idea of minimizing the Hibernate
> > > connections by doing what Ted did in his example -- not actually
> > > discarding a user's Hibernate Session until his httpSession expired.
> > >
> > > I've never messed with ThreadLocals before but I suspect that the
> > > attempt to put a ThreadLocal into a httpSession I suspect would be
> > > funny to watch.
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, December 18, 2003 11:45 AM
> > > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > > Subject: RE: Are httpSessions thread safe?
> > > >
> > > >
> > > > Poked aroung on the Hibernate site for a few minutes and found
> > > > these:
> > > >
> > > > http://www.hibernate.org/42.html http://www.hibernate.org/43.html
> > > >
> > > > Quoting Joe Hertz <[EMAIL PROTECTED]>:
> > > >
> > > > > Yuck. And may I say, "Yuck", again?
> > > > >
> > > > > It's not the Session object per se, as much as it is the
> > > > > particular attribute I want to store there.
> > > > >
> > > > > It does strike me that the storage of a Hibernate
> > Session in the
> > > > > httpSession is a fairly common thing, so I doubt this
> > bites people
> > > > > very often. It does seem to have the potential to do so.
> > > > >
> > > > > In the "real world" why is this not too big of a deal? Or
> > > > should it be
> > > > > considered one?
> > > > >
> > > > > I suppose that unless you've got time consuming requests,
> > > > or the user
> > > > > hits some button on the browser twice in rapid succession, it's
> > > > > probably okay. A token could effectively prevent this type of
> > > > > condition I suppose.
> > > > >
> > > > > -J
> > > > >
> > > > > > -Original Message-
> > > > > > From: Kris Schneider [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Thursday, December 18, 2003 11:12 AM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: RE: Are httpSessions thread safe?
> > > > > >
> > > > > >
> > > > > > Synchronizing on the session object may cause you all
> > sorts of
> > > > > > grief...or it may not. It all depends on your container. The
> > > > > > spec makes no guarantees about the identity of the object
> > > > > > returned by methods like PageContext.getSession or
> > > > > > HttpServletRequest.getSession. For example, here's a test JSP:
> > > > > >
> > > > > > <%@ page contentType="text/plain" %>
> > > > > > <%
> > > > > > out.println("session:" + session);
> > > > > > out.println("pageContext.getSession: " +
> > > > pageContext.getSession());
> > > > > > out.println("request.getSession: " +
> > > > request.getSession(false));
> > > > > > out.println("request.getSession: " +
> > > > request.getSession(false));
> > > > > > %>
> > > > > >
> > > > > > Here's the output from TC 4.1.24:
> > > > > >
> > > > > > session:
> > > > > > [EMAIL PROTECTED]
> > > > > > pageContext.getSession:
> > > > > > [EMAIL PROTECTED]
> > > > > > request.getSession:
> > > > > > [EMAIL PROTECTED]
> > > > > > request.getSession:
> > > > > > [EMAIL PROTECTED]
> > > > > >
> > > > > > And that's

RE: URGENT - Help defending Struts

2003-12-18 Thread Greg Ludington
TiVO Central Online (the service by which people log in and schedule
programs and other operations on their TiVOs through the web) runs on
Struts.

https://www3.tivo.com/tivo-com/tco/index.do 

Of course, you have to have a TiVO with Home Media Option to log in and
do anything meaningful on the Struts portion of the site.  (The article
content is from an ASP-based CMS.)

-Greg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 18, 2003 7:49 AM
To: [EMAIL PROTECTED]
Subject: URGENT - Help defending Struts


All:

 

Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.

 

The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.

 

Thanks very much,

Russell

 

[EMAIL PROTECTED]

310-426-5587

 



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited.



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



Is there a way to set variable using Struts?

2003-12-18 Thread Clark Kent
I have the following scriptlet code :

if(tableCounter == 1){

 tableCounter = 2;

} else {

tableCounter = 1;

}

How do I achieve the above code using Struts tags (without using JSTL)?

Thanks,

CK



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

No Action

2003-12-18 Thread Mauricio T. Ferraz
Help, please!!!

My application dont execute the action anymore, I don´t know what happened
The method validate() of the ActionForm is executted return null rigth, but
it don´t go to the Action. Any Action im my application work anymore! And I
dont get ANY message error on server and ANY log.

Anybody can help me?

[]´s
Mauricio


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



No Action

2003-12-18 Thread Mauricio T. Ferraz
I got the HTTP 500


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



RE: URGENT - Help defending Struts

2003-12-18 Thread Paananen, Tero
The UK National Lottery at http://www.national-lottery.co.uk/
runs on Struts.

Let me assure you that Struts works JUST fine
on B2C sites. That site has gone to hell and
back during the testing period, including
thorough security audits and performance testing
to make sure the performance requirements were
met. Let's just say that the volume of hits
is expected to be rather large.

Your CIO is smoking crack.

-TPP

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


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



RE: Enhancement Request or Possible Alternative?

2003-12-18 Thread Hookom, Jacob
Vic,

I did notice that there is pattern matching now available on the CVS head,
but I was wondering if your solution was done with Struts as is, or if you
had to make modifications to the Struts Config DTD and/or RequestProcessor?

The solution of using a workflow to enforce pathways is not desired since we
want to leave that flexibility in most cases and have the business layer
resolved with changes of context (finishing/creating).

-Jake

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Thursday, December 18, 2003 4:30 AM
To: [EMAIL PROTECTED]
Subject: RE: Enhancement Request or Possible Alternative?

Hi,
Did you have a look at the workflow extention for struts?I wil advice you to
have alook at the demo application to see if this is what you are looking
for.
http://www.livinglogic.de/Struts/demoApp.html

And also the site has some introductory material...And best of all it is
Open Source as well...:-))

It has some similar concept.You can configure actions to make them part of a
workflow.And then you can catch when the user leaves the workflow.And then
there are various alternatives like you can force them to stay in a workflow
or allow them to branch to another workflow.
It is highly configurable and does need any code change, just twicking the
ActionMappings...


regards,
Shirish.



-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich
Sent: Thursday, December 18, 2003 10:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Enhancement Request or Possible Alternative?


I have a commercial Struts product that includes an event that is 
generated when a new action is called.
I built it so that one can clean up any session stuff when going to 
another action for large projects.
We could work out something VERY reasonable.
.V

Hookom, Jacob wrote:
> We are doing a lot of module switching or multistep workflows (which we
> handle fine through session beans) but at the same time, users are allowed
> to jump to different pages and we would like to capture a "leave" event
when
> they aren't within a set of mapping(s).
> 
> I'm wondering if anyone has solved this problem because it would also
allow
> for constraints on workflows at the action level (if you leave pages X,Y,Z
> then fire Action 'CheckSession').
> 
> 
> Jacob Hookom
> Senior Programmer/Analyst
> McKesson Medical-Surgical
> Golden Valley, MN



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


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

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



RE: Is there a way to set variable using Struts?

2003-12-18 Thread Syed, Nazeer
I have not seen the if-else in Struts Tag.


tableCounter = 2;



tableCounter = 1;



Thanks
Nazeer


-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 18, 2003 1:17 PM
To: usergroup
Subject: Is there a way to set variable using Struts?

I have the following scriptlet code :

if(tableCounter == 1){

 tableCounter = 2;

} else {

tableCounter = 1;

}

How do I achieve the above code using Struts tags (without using JSTL)?

Thanks,

CK



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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



Re: DOTs, wild cards, and action mapping

2003-12-18 Thread Thomas E Enebo
David Friedman wrote:
Thomas,

(Probably a) Dumb question 

From the "${area.name}" it looks like you're using Velocity Templates.  I
thought Velocity couldn't mix with JSP's like that (My impression from ch 17
of 'Struts in Action'.  How are you mixing the two?  (Or is there a Velocity
update which allows it?)
  I should have noted that I am using tomcat 5.0 also.  I am not using 
Velocity, but merely JSP EL.  So no mixing.   In debugging, the EL is 
returning the right thing.  Struts is stripping the last .something 
assuming it is an extension.

  I guess barring any other comment I will just add a bogus extension to
make sure I have no more conflicts.
-Tom



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


Re: logic:iterate inside a logic:iterate ??

2003-12-18 Thread Jan Vervecken
try something similar to this

(of course all the Java code to construct the lists should be in (or called by) a 
Struts Action class, so focus on the use of the logic:iterate tag)

--8
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%!
public class Person
{
String fName = null;
LinkedList fEmailList = new LinkedList();
public String getName() { return fName; }
public LinkedList getEmailList() { return fEmailList; }
}
%>
<%
LinkedList vPersonList = new LinkedList();
Person vPerson = new Person();
vPerson.fName = "Jan Vervecken";
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPersonList.add(vPerson);
vPerson = new Person();
vPerson.fName = "Genty Jean-Paul";
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPersonList.add(vPerson);
request.setAttribute("personList", vPersonList);
%>




loop


loop


















--8<--

success
-Jan

*** REPLY SEPARATOR  ***

On 12/18/2003 at 6:16 PM gentyjp wrote:

>Hi
>
>  I'am a Struts newbie, sorry if it is a "classic" question.
>
>  My question is about logic:iterate
>
>  I have a vector of documents.
>  In my application a document is a vector of LabelValueBean. I wish to
>write both the label and the value.
>
>  I wish to write all my documents so I iterate through my vector of
>documents.
>But after that how can I iterate through my vector of LabelValueBean ???
>
>Basically here's what I want to do :
>
>for_each_document
>{
> for_each_LabelValueBean_in_the_current_document
> {
>  write LabelValueBean.Label;
>  write LabelValueBean.Value;
> }
>}
>
>thanks for you help
>
>
>   Genty Jean-Paul
>
>
>-
>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]



Runtime Generation of DynaValidatorActionForms

2003-12-18 Thread Hookom, Jacob
Runtime Generation of DynaValidatorActionForms, is it possible?  We have
forms defined in the DB and I want to generate a DynaActionForm that would
use Validator.

I checked the main struts books we have at the office and couldn't find any
reference to something like this, I'm sure others have done it, care to
share? :-)

Thanks!

Jacob Hookom
Senior Programmer/Analyst
McKesson Medical-Surgical
Golden Valley, MN



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



Re: Enhancement Request or Possible Alternative?

2003-12-18 Thread Vic Cekvenich
Hookom, Jacob wrote:
Vic,

I did notice that there is pattern matching now available on the CVS head,
but I was wondering if your solution was done with Struts as is, or if you
had to make modifications to the Struts Config DTD and/or RequestProcessor?
The solution of using a workflow to enforce pathways is not desired since we
want to leave that flexibility in most cases and have the business layer
resolved with changes of context (finishing/creating).
-Jake




It's based on extending Struts Action class.
It does not enforce anything, it just calls a method (onNewAction) that 
gets called on old action when you call a new action.

So if no code there for a certain action, it does nothing.

.V



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


RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-18 Thread Caroline Jen
Thank you for your time and support.  It is the JSTL
taglib directive I missed in my page.  Now, everything
works as expected.
--- Robert Taylor <[EMAIL PROTECTED]> wrote:
> I bet your missing the JSTL taglib directive in your
> page.
> Try adding 
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> prefix="c" %> 
> and then your  actions will work.
> 
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 17, 2003 9:45 PM
> > To: Struts Users Mailing List
> > Subject: RE: How To Output the Value of a String
> That Is Passed From
> > Another JSP?
> > 
> > 
> > Thanks for your advice.  I did this in my
> view.jsp:
> > 
> > 
> >  > scope="session"/>
> > 
> > View/Send Messages
> > 
> >  property="creator"/>
> > 
> > I was able to see the "View/Send Messages" button
> > displayed.  And the  > property="creator"/> also wrote out the value of
> the
> > property "creator".
> > 
> > Now, the question is 
> > 
> > 1. why the  > value="${articleForm.creator}" scope="session"/>
> did
> > not put the value in the session scope?  
> > 
> > 2. What is wrong with the  tag?  
> > 
> > 3. What should I do if I want to put the value of
> > "creator" in a session scope?
> > 
> > -C
> > 
> > 
> > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > Are you sure that  > > value="${articleForm.creator}"
> > > scope="session"/>
> > > is placing the value in the intended scope?
> > > 
> > > Try doing this:
> > > 
> > > 
> > >  > > value="${articleForm.creator}"scope="session"/>
> > > 
> > > View/Send Messages
> > > 
> > > 
> > > To make sure it is actually putting the value in
> > > session scope.
> > > 
> > > If so, then on postForm.jsp try using scriplets
> to
> > > make sure that
> > > the value can be accessed. If it can, then do
> you
> > > have all of your
> > > tag library directives in your pages?
> > > 
> > > robert
> > > 
> > > > -Original Message-
> > > > From: Caroline Jen
> [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, December 17, 2003 8:40 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: How To Output the Value of a
> String
> > > That Is Passed From
> > > > Another JSP?
> > > >
> > > >
> > > > "cr" is not a form and there is no action
> > > involved.
> > > > There are two JSPs; view.jsp and postForm.jsp
> and
> > > each
> > > > is with its own form (different forms).
> > > >
> > > > In my view.jsp, I am able to write out String
> > > creator
> > > > this way:
> > > >  > > property="creator"/>
> > > > and I put the String creator in a session
> object:
> > > >
> > > >
> > > > value="${articleForm.creator}"
> > > > scope="session"/>
> > > >View/Send
> Messages
> > > >
> > > >
> > > > and in the postForm.jsp, I retrieve the String
> and
> > > try
> > > > to write it out in a text field:
> > > >
> > > >> > > scope="session" type="java.lang.String"/>
> > > >> > > value="<%=author%>" size="82" maxlength="25"
> > > > tabindex="1"/>
> > > >
> > > > I got this error message:
> > > > ServletException
> in:/article/content/postForm.jsp]
> > > > > Cannot find bean cr in scope session'
> > > >
> > > > -Caroline
> > > > --- David Friedman <[EMAIL PROTECTED]>
> wrote:
> > > > > Caroline,
> > > > >
> > > > > How do you save the form "cr" in session
> scope?
> > > > > Does your action use 'scope="session"' or
> are
> > > you
> > > > > doing a
> > > > >
> 'request.getSession().setAttribute("cr",cr);'
> > > > > in the first action?
> > > > >
> > > > > Regards,
> > > > > David
> > > > >
> > > > > -Original Message-
> > > > > From: Caroline Jen
> [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wednesday, December 17, 2003 8:25 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: How To Output the Value of a
> String
> > > > > That Is Passed From
> > > > > Another JSP?
> > > > >
> > > > >
> > > > > Hi, my JSP#1 and JSP#2 use different forms.
> > > > > However,
> > > > > property name in JSP#1 is the same as that
> in
> > > JSP#2.
> > > > >
> > > > > I tried to pass this Sring and write it out
> in a
> > > > > text
> > > > > field in JSP#2 and just could not get it
> right. 
> > > I
> > > > > got
> > > > > this error
> > > > > message:
> > > > >
> > > > > [ServletException
> > > in:/article/content/postForm.jsp]
> > > > > Cannot find bean cr in scope session'
> > > > >
> > > > > In my view.jsp, I put a String in a session
> > > object:
> > > > >
> > > > >
> > > > > > > value="${articleForm.creator}"
> > > > > scope="session"/>
> > > > >View/Send
> Messages
> > > > >
> > > > >
> > > > > And in postForm.jsp, I tried to retrieve
> that
> > > String
> > > > > and write it out in a text field this way:
> > > > >
> > > > >> > > > scope="session" type="java.lang.String"/>
> > > > >> > > > value="<%=author%>" size="82" maxlength="25"
> > > > > tabindex="1"/>
> > > > >
> > > > > -Caroline
> > > > >
> > > > > --- Robert Taylor <[EMAIL PROTECTED]>
> wrote:
> 
=== message truncated ===



Re: Is there a way to set variable using Struts?

2003-12-18 Thread Janusz Dziadon
I think that this way is not good. First step (if=1)  woks fine, but after
that it always will have value equal 2 so not equal 1 then second step will
always be executed and finally counter will have value 1.

I would prefer defining another bean on start, something like this



tableCounter = 2;



tableCounter = 1;


- Original Message -
From: "Syed, Nazeer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 7:45 PM
Subject: RE: Is there a way to set variable using Struts?


I have not seen the if-else in Struts Tag.


tableCounter = 2;



tableCounter = 1;



Thanks
Nazeer


-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 1:17 PM
To: usergroup
Subject: Is there a way to set variable using Struts?

I have the following scriptlet code :

if(tableCounter == 1){

 tableCounter = 2;

} else {

tableCounter = 1;

}

How do I achieve the above code using Struts tags (without using JSTL)?

Thanks,

CK



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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



Nie wahaj sie! >>> http://link.interia.pl/f17b1






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



action local forward to a tile

2003-12-18 Thread Ebersole, Steven
hey all, i'm running into an issue I just cannot seem to figure out.  It
deals with trying to define an action local forward whose path is a tile.  I
searched the mailing list and found all sorts of questions and comments on
this, but none of the solutions helped with my problem.

I am using struts version 1.1.0.  In web.xml I have defined the servlet
section using the standard org.apache.struts.action.ActionServlet class:


contoller
 
org.apache.struts.action.ActionServlet

config
/WEB-INF/struts-config.xml


convertNull
true


validating
true

2



In struts config, I have both defined the tiles plugin:








as well as the tiles request processor (supposedly optional, i know, but
just to be sure):




However, with this setup, if i try to setup a forward to a tile i keep
getting invalid path errors:



...

I have verified about a hundred times that ".home.revenue" really is a valid
tile name within my tile def:






Can anybody please point out where I am going wrong?  Thanks a bunch in
advance...

Steve

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



Disable INFO Log messages in struts

2003-12-18 Thread Gerald_Beattie
I have set DEBUG to Zero in the action init parms.

I am still getting too many INFO messages from struts

INFO util.PropertyMessageResources  - Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

I am using a commons-logging.properties file which points to a 
log4j.properties file.
I can set the debugging for my log4j log but the org.apache.struts. log INFO messages 
keep appearing.

Can someone make it stop...

thanks

RE: Disable INFO Log messages in struts

2003-12-18 Thread Ebersole, Steven
The debug action init param has no effect.  Struts totally does logging through 
commons logging, which you've said you've set up to use log4j.

So in your log4j config file, add a logger for org.apache.struts and set it to an 
appropriate level.  You may also have to set additivity appropriately depending on how 
your root logger is defined.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 3:01 PM
To: [EMAIL PROTECTED]
Subject: Disable INFO Log messages in struts


I have set DEBUG to Zero in the action init parms.

I am still getting too many INFO messages from struts

INFO util.PropertyMessageResources  - Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

I am using a commons-logging.properties file which points to a 
log4j.properties file.
I can set the debugging for my log4j log but the org.apache.struts. log INFO messages 
keep appearing.

Can someone make it stop...

thanks

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



RE: Disable INFO Log messages in struts

2003-12-18 Thread Dalmia, Swati
In Log4J properties file you can add this lines

#
#
# Print only messages of level WARN or above in the package struts
#
#
#log4j.logger.org.apache.struts.action.RequestProcessor=WARN
#log4j.logger.org.apache.struts.util.PropertyMessageResources=ERROR

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 2:01 PM
To: [EMAIL PROTECTED]
Subject: Disable INFO Log messages in struts


I have set DEBUG to Zero in the action init parms.

I am still getting too many INFO messages from struts

INFO util.PropertyMessageResources  - Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

I am using a commons-logging.properties file which points to a 
log4j.properties file.
I can set the debugging for my log4j log but the org.apache.struts. log INFO messages 
keep appearing.

Can someone make it stop...

thanks

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



ClassCastException coming from DynaValidatorForm.validate()

2003-12-18 Thread Janice
Hello all,

I did have validation, etc, working in another application, but now I'm
starting a new application and I'm getting an error that I can't explain.

When I submit my form, I call:
ActionErrors errors = form.validate(mapping, request);

which spits up this error:
** error stuff starts here **
java.lang.ClassCastException: java.lang.String

org.apache.struts.action.ActionErrors
org.apache.struts.validator.DynaValidatorForm.validate(org.apache.struts.act
ion.ActionMapping, javax.servlet.http.HttpServletRequest)

DynaValidatorForm.java:141

org.apache.struts.action.ActionForward
ca.bc.gov.srm.bart.actions.AnnouncementActions.submitForm(org.apache.struts.
action.ActionMapping, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

AnnouncementActions.java:137

java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object,
java.lang.Object[])

native code
** error stuff ends here, well, there's lots more of that, but you probably
don't need to see the whole thing... **

All of my .jars and .tlds and .dtds are from the 1.1 release of Struts.  I
am using jDeveloper, but I was with the other application as well.

I think my validation.xml and validator-rules.xml are being read, since if I
put a typo in either one, the typo gets caught.

This is my form definition:

   
   
   
   
   
   
   


I can remove everything from my validation.xml file that pertains to this
form (its the first one), and the error still happens, so I don't think its
got anything to do with my code in there.

I would really, really appreciate some insight into this problem!
Janice

ps: Seasons' Greetings!


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



RE: URGENT - Help defending Struts

2003-12-18 Thread Dalmia, Swati
First Bank is  B2C . they are using  
https://www.efirstbank.com/ibank1/logonload.do 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 8:49 AM
To: [EMAIL PROTECTED]
Subject: URGENT - Help defending Struts
Importance: High


All:

 

Our CIO is currently fighting the use of Struts by saying that it is not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.

 

The issue is that the CIO is looking for sites that may be similar to
ours that are using Struts already.

 

Thanks very much,

Russell

 

[EMAIL PROTECTED]

310-426-5587

 



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

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



  1   2   >