Bug in - Dynamic Javascript Dumping ?

2003-09-23 Thread R Balaji
Hi,
I am using validator for validating the user input in my application. I 
too defined lot of rules for the same for different pages in the 
validator-rules.xml.

I found the javascript for all the depends (rules), has been dumped in 
to all the pages, irrespective of , whether that rule is used in this 
page or not.

Assume i have 10 rules defined in my validator-rules.xml and i am using 
only 5 for this form, i expect that only 5 of them being dumped in to 
the page. But it is dumping all of the 10. Which make the page size 
bulky and increases the download time.

Does anybody face this kind of issue? .. help me

With Regards,
R Balaji


Struts Workflow Docu

2003-09-23 Thread Stephan Wiesner
Can anybody point me to a good documentation of the Struts Workflow 
extension? The official, so called tutorial, is a little bit short for 
my liking .-(

Stephan

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


How to override SimpleMenuItem & specify the values

2003-09-23 Thread R Balaji
Hi,

I wanted to add one more attribute to o.a.s.t.b.MenuItem - 
mouseOverIcon. In
this case, I'd extend SimpleMenuItem and add get/set for mouseOverIcon. 
This
class can be plugged in via classtype attribute of item element in
tiles-defs.xml. But how do I specify value for mouseOverIcon in item 
element
in xml file. Since the tiles configutation file has to conform with the DTD
this is not possible without extending the DTD. I'd also have to write some
digester code for this!. Is there any other better way or am I missing
something here ?

With Regards,
R Balaji


Adding supported types to DynaForms

2003-09-23 Thread Nick Heudecker
Hi,

I've read in the docs that DynaForms only support the folloing types:

# java.lang.BigDecimal
# java.lang.BigInteger
# boolean and java.lang.Boolean
# byte and java.lang.Byte
# char and java.lang.Character
# java.lang.Class
# double and java.lang.Double
# float and java.lang.Float
# int and java.lang.Integer
# long and java.lang.Long
# short and java.lang.Short
# java.lang.String
# java.sql.Date
# java.sql.Time
# java.sql.Timestamp

I would like to add my own type to this, basically a key/value pair
object like the LabelValueBean in the Struts source.  My question is:
What do I need to do to add an additional supported type to DynaForms?


-- 
Nick Heudecker
SystemMobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com

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



RE: Can I have 1 struts jar file for multiple servers/applications

2003-09-23 Thread Steve Raeburn
http://jakarta.apache.org/struts/userGuide/configuration.html#config_a
dd

For more explanation see:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.htm
l

Steve

> -Original Message-
> From: David Thielen [mailto:[EMAIL PROTECTED]
> Sent: September 23, 2003 9:08 PM
> To: Struts Users Mailing List
> Subject: Re: Can I have 1 struts jar file for multiple
> servers/applications
>
>
> ok - thanks.
>
> Is this because of static data in the jar files?
>
> Is this true of the commons*.jar files and jakarta-oro.jar
> too - or just
> struts.jar and struts-el.jar?
>
> Also, how about the JSTL jar files - do they need to be one
> for each web
> app?
>
> thanks - dave
>
>
> - Original Message -
> From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 23, 2003 9:46 PM
> Subject: Re: Can I have 1 struts jar file for multiple
> servers/applications
>
>
> > There should be one struts jar for each web app, if you
> have 10 web app
> > then that's 10 struts.jar.
> >
> > David Thielen wrote:
> >
> > >Hi;
> > >
> > >I thought I read something somewhere that said I need to
> have a seperate
> set of struts jar files for each application or server. But
> I can't find it
> now.
> > >
> > >I am using JRun and under a given server it has multiple
> applications
> with each application having it's own web.xml and
> struts-config.xml files.
> Can several of these applications share the same struts.jar
> or do I need to
> put a seperate struts.jar in each application's WEB-INF directory?
> > >
> > >thanks - dave
> > >
> > >
> >
> >
> >
> 
> -
> > 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: Can I have 1 struts jar file for multiple servers/applications

2003-09-23 Thread Kwok Peng Tuck
No, I think it has more to do with the way struts works. I'm a bit hazy 
on this on, so you might want to
search the archive for an answer. For the other libraries, I don't see 
why you can't deploy them with your
webapp. In fact I include jakarta-oro.jar with some of my webapps 
without problems(one for each).

David Thielen wrote:

ok - thanks.

Is this because of static data in the jar files?

Is this true of the commons*.jar files and jakarta-oro.jar too - or just
struts.jar and struts-el.jar?
Also, how about the JSTL jar files - do they need to be one for each web
app?
thanks - dave

- Original Message - 
From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 9:46 PM
Subject: Re: Can I have 1 struts jar file for multiple servers/applications

 

There should be one struts jar for each web app, if you have 10 web app
then that's 10 struts.jar.
David Thielen wrote:

   

Hi;

I thought I read something somewhere that said I need to have a seperate
 

set of struts jar files for each application or server. But I can't find it
now.
 

I am using JRun and under a given server it has multiple applications
 

with each application having it's own web.xml and struts-config.xml files.
Can several of these applications share the same struts.jar or do I need to
put a seperate struts.jar in each application's WEB-INF directory?
 

thanks - dave

 

-
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: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Jing Zhou

- Original Message - 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 6:44 PM
Subject: Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts
>
> >* On WebLogic 8.1 and OC4J 9.0.3, the filter is invoked when *.do
> >   action is received. When Struts forwards to (or includes) a target JSP
> >   page, the filter is invoked again (with wrapped http request and
> >   response in our case).
> >
> >
> Sigh ... there's actually two different issues here.
>
> * They should not be invoking the filters again (see above)
>
> * They should not be wrapping the request/response (most likely being
> done by their
>   implementations of RequestDispatcher)  See the last paragraph of
> Section 6.2.2
>   in the Servlet 2.3 spec.

My message was not clear. Only OC4J inserts a *filter* before it is invoking
my filter again (possibly in its RD implementation) in which my wrappers are
wrapped again. The OC4J wrapper class was mentioned below.

>
> >* In particular, OC4J wraps our http request and response wrappers
> >   using its own oracle.security.jazn.oc4j.JAZNServletRequest class
> >   when it is invoking the filter on the target JSP pages.
> >
> >
> It's possible you might be able to work around the wrapping bug by
> casting to HttpServletRequestWrapper and then walking up the wrapper
> chain by calling getRequest on it, then repeating until you get back to
> your own request wrapper class.
>

Yes. That's the way I found it by keeping unwrapping the wrappers.

> >I could not judge whose behavior is right or wrong. They are even
> >(2 to 2 here).
> >
> That makes not the slightest bit of difference if the behavior in
> question is actually defined in the spec.
>
> > From what I read in the Java Servlet Specification,
> >I couldn't find, for example, the servlet containers should invoke
> >the filter or not when using the request dispatcher to include and/or
> >forward to a target servlet. Is this an ambiguity here? or both ways
> >of implementation are allowed?
> >
> >
> For filters, see (for example) Section 6.2.1, where it says (** is
> around my emphasis added):
>
> When the container *receives an incoming request*
> it takes the first filter instance in the list and calls
> its doFilter method ...
>
> where one infers that "incoming request" means an incoming HTTP request,
> not a RequestDispatcher call.  This was made clearer in 2.4.

I am in favor of Tomcat/Resin's behaviors, or the default behaviors
in Servlet 2.4 for the following reasons:

- If a filter protects mapped resources from being directly accessed,
   Tomcat/Resin allows web applications to forward or include the
   mapped resources. This is consistent when applications forward to or
   include resources under the /WEB-INF directory.

- The above assumption is broken if the filter is invoked again. Many
   developers write their security filters without such knowledge. Their
   applications could break because their forwards will be denied
   in WebLogic and OC4J. Even they know, they have to find a way
   to skip the security checking. A double checking is not necessary.

- If the mapped resources need some transformation filters in place
   (The only reason I could see they need to invoke the filter again),
   one way applications could do is to use redirect/rewrite techniques
   to invoke the transformation filters (because of incoming http requests).

>From Servlet 2.3, there is another thing not clear to me:
Could a servlet container execute the filters in a chain in different
threads
for one incoming http request? I do not believe it should go this way,
but it looks to me this is possible and further complicates the filter
stories.
(The RD clearly requires the same thread to invoke target resources.)

>
> Craig
>

Jing
Netspread Carrier
http://www.netspread.com


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



Re: Can I have 1 struts jar file for multiple servers/applications

2003-09-23 Thread David Thielen
ok - thanks.

Is this because of static data in the jar files?

Is this true of the commons*.jar files and jakarta-oro.jar too - or just
struts.jar and struts-el.jar?

Also, how about the JSTL jar files - do they need to be one for each web
app?

thanks - dave


- Original Message - 
From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 9:46 PM
Subject: Re: Can I have 1 struts jar file for multiple servers/applications


> There should be one struts jar for each web app, if you have 10 web app
> then that's 10 struts.jar.
>
> David Thielen wrote:
>
> >Hi;
> >
> >I thought I read something somewhere that said I need to have a seperate
set of struts jar files for each application or server. But I can't find it
now.
> >
> >I am using JRun and under a given server it has multiple applications
with each application having it's own web.xml and struts-config.xml files.
Can several of these applications share the same struts.jar or do I need to
put a seperate struts.jar in each application's WEB-INF directory?
> >
> >thanks - dave
> >
> >
>
>
> -
> 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: SSLExt and Struts Workflow?

2003-09-23 Thread Steve Ditlinger
I'll admit to not having used Struts Workflow.  But I don't know of any
reason why sslext should not work, as long as actions are defined in a
struts config file like other struts apps.

 If Struts Workflow uses its own RequestProcessor, you would not be able to
use the sslext RequestProcessor (without creating your own custom
RequestProcessor).  However, that is OK.  You can use the sslext Plugin
without the sslext RequestProcessor.   Assuming the use of the sslext tags,
the sslext RequestProcessor is really only needed as a failsafe for
redirecting to the correct protocol if a URL is improperly hand-entered.

HTH,
Steve


- Original Message - 
From: "Mick Knutson" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 2:54 PM
Subject: SSLExt and Struts Workflow?


> Does SSLExt and Struts Workflow work together?
>
> ---
> Thanks
> Mick Knutson
> http://www.baselogic.com
> ---
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: Can I have 1 struts jar file for multiple servers/applications

2003-09-23 Thread Kwok Peng Tuck
There should be one struts jar for each web app, if you have 10 web app 
then that's 10 struts.jar.

David Thielen wrote:

Hi;

I thought I read something somewhere that said I need to have a seperate set of struts jar files for each application or server. But I can't find it now.

I am using JRun and under a given server it has multiple applications with each application having it's own web.xml and struts-config.xml files. Can several of these applications share the same struts.jar or do I need to put a seperate struts.jar in each application's WEB-INF directory?

thanks - dave
 



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


Can I have 1 struts jar file for multiple servers/applications

2003-09-23 Thread David Thielen
Hi;

I thought I read something somewhere that said I need to have a seperate set of struts 
jar files for each application or server. But I can't find it now.

I am using JRun and under a given server it has multiple applications with each 
application having it's own web.xml and struts-config.xml files. Can several of these 
applications share the same struts.jar or do I need to put a seperate struts.jar in 
each application's WEB-INF directory?

thanks - dave

RE: How to implement close button in Struts?

2003-09-23 Thread Rick Col
Thanks, guys. You are a lot of help.


--- "Chen, Gin" <[EMAIL PROTECTED]> wrote:
> Do it using Javascript instead.
> 
>   Close
> 
> 
> Server's cant send a message to the client to close
> a browser window.
> Another way is to send a response of that javascript
> or redirect to another
> window that has that in a javascript head.
> -Tim
> 
> -Original Message-
> From: Rick Col [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 23, 2003 4:57 PM
> To: [EMAIL PROTECTED]
> Subject: How to implement close button in Struts?
> 
> 
> Hi,
> 
> I have a "close" button on a page, once user clicks
> on this button, the window should disappear. How to
> do this in Struts?
> 
> regards 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Is there a nice ExceptionHandler mechanism in struts for Throwable?

2003-09-23 Thread Craig R. McClanahan
Alex Shneyderman wrote:

I have looked at ExceptionHnadlers and find them pretty nifty.
Is there a way to do similar thingy with Throwables?
I tried to set ExceptionHandler to catch (type attribute) 
Java.lang.Throwable but it does not work and I get the ugly
ServletException as my page to the user?
 

Although it would have been possible to design the existing mechanism to 
support Throwables, it's generally considered bad form to try to deal 
with them -- after all, it's things like OutOfMemoryError and the like, 
and it is not normally something a webapp can recover from.  Are there 
particular Throwables that are not Exceptions that you are interested in 
dealing with yourself?

Thanks,
Alex.
Craig



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


Is there a nice ExceptionHandler mechanism in struts for Throwable?

2003-09-23 Thread Alex Shneyderman

I have looked at ExceptionHnadlers and find them pretty nifty.
Is there a way to do similar thingy with Throwables?

I tried to set ExceptionHandler to catch (type attribute) 
Java.lang.Throwable but it does not work and I get the ugly
ServletException as my page to the user?

Thanks,
Alex.


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



Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Craig R. McClanahan
Jing Zhou wrote:

- Original Message - 
From: "Karr, David" <[EMAIL PROTECTED]>
 

Did you find a bug report describing this in the BEA Support database?
   

No. But I left a short description of the problem regarding to
the confused servlet path and path info in a mailing list.
Jing
 

I think you'd find BEA, like any other software development 
organization, is a lot more likely to respond to real bug reports rather 
than a description of a problem mentioned on a mailing list.  That's 
certainly been true for Struts users, who find the developers are much 
more responsive when they actually file the bug reports in the issue 
tracking system :-).

For Struts, by the way, thats

 http://nagoya.apache.org/bugzilla/

Craig



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


Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Craig R. McClanahan
Jing Zhou wrote:

Craig,

Thanks for your confirmation. It does appear to be a bug in WebLogic 8.1.
I programmed a filter to work around this problem and some other
issues in Oracle OC4J 9.0.3. It works fine. But I discovered the following
behavioral differences between different vendors:
The filter is mapped to *.do and related to-be-forwarded or
to-be-included JSP pages through two filter mapping elements
in web.xml. The settings are common for all vendors' server.
* On Tomcat 4.1.24 and Resin 2.1.10,  the filter is invoked when *.do
  action is received. When Struts forwards to (or includes) a target JSP
  page, the filter is skipped over.
 

That's the way it's supposed to be in Servlet 2.3, but the spec was not 
crystal clear here either.  In Servlet 2.4, an additional configuration 
setting was added to let you ask for filters to be applied on RD.include 
and RD.forward, and the language strengthened to indicate that the 
default (and theoretically backwards compatible) behavior is to *not* 
apply the filters on RD calls.

* On WebLogic 8.1 and OC4J 9.0.3, the filter is invoked when *.do
  action is received. When Struts forwards to (or includes) a target JSP
  page, the filter is invoked again (with wrapped http request and
  response in our case).
 

Sigh ... there's actually two different issues here.

* They should not be invoking the filters again (see above)

* They should not be wrapping the request/response (most likely being 
done by their
 implementations of RequestDispatcher)  See the last paragraph of 
Section 6.2.2
 in the Servlet 2.3 spec.

* In particular, OC4J wraps our http request and response wrappers
  using its own oracle.security.jazn.oc4j.JAZNServletRequest class
  when it is invoking the filter on the target JSP pages.
 

It's possible you might be able to work around the wrapping bug by 
casting to HttpServletRequestWrapper and then walking up the wrapper 
chain by calling getRequest on it, then repeating until you get back to 
your own request wrapper class.

I could not judge whose behavior is right or wrong. They are even
(2 to 2 here).
That makes not the slightest bit of difference if the behavior in 
question is actually defined in the spec.

From what I read in the Java Servlet Specification,
I couldn't find, for example, the servlet containers should invoke
the filter or not when using the request dispatcher to include and/or
forward to a target servlet. Is this an ambiguity here? or both ways
of implementation are allowed?
 

For filters, see (for example) Section 6.2.1, where it says (** is 
around my emphasis added):

   When the container *receives an incoming request*
   it takes the first filter instance in the list and calls
   its doFilter method ...
where one infers that "incoming request" means an incoming HTTP request, 
not a RequestDispatcher call.  This was made clearer in 2.4.

For wrapping, see Section 6.2.2, as mentioned above.

About OC4J wrapping our wrappers, it seems to me it violates the
Specification where it demands the same wrapper instances should
be used, correct?
 

Exactly.  But it's probably an issue in the RD implementation, separate 
from the question of whether they should be invoking the filter again.

It's kinda sad ... both of these companies have representatives on the 
JSR-154 expert group (Servlet 2.4), and should have seen the discussions 
related to these two issues.

Jing
 

Craig



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


Re: Using Form Bean & Java Bean....

2003-09-23 Thread Mick Knutson
I have a DynaActionForm that has several DTO's in an Array:







Works great.

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

- Original Message - 
From: "Rajanala, Srinivas" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 4:04 PM
Subject: Using Form Bean & Java Bean


>
> Hi,
>
> Can I use both Form Bean & Java Bean inside a html:form?
> I have ManageProfileBean(java bean) which has availRoles and
> ManageProfileForm(Form bean) which has securityRoles. I need to iterate
> through availRoles and display it as checkbox. When the user selects one
or
> more check boxes the data should get populated in the securityRoles of the
> form bean.
> I am trying to use the following code:
> 
>
>
> Security Roles
>
> type="com.qwest.omt.bean.ManageProfileBean.availRoles">
>   
>   
>   
>   
>   
> 
>
>
> In the following code, I am trying to use availDepts from the
> ManageProfileBean(Java Bean) and
> department from the ManageProfileForm(Form Bean).
>
>
> 
>   
> 
> 
>   
>  
>   
> 
>   
>   
>
>
>
> Is it a correct? I appreciate your suggesions.
>
> Thanks,
> Srini
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Using Form Bean & Java Bean....

2003-09-23 Thread Rajanala, Srinivas

Hi,

Can I use both Form Bean & Java Bean inside a html:form?
I have ManageProfileBean(java bean) which has availRoles and
ManageProfileForm(Form bean) which has securityRoles. I need to iterate
through availRoles and display it as checkbox. When the user selects one or
more check boxes the data should get populated in the securityRoles of the
form bean.
I am trying to use the following code:
 


Security Roles
   
   
  
  
  
  
  



In the following code, I am trying to use availDepts from the
ManageProfileBean(Java Bean) and
department from the ManageProfileForm(Form Bean). 



  


  
 
  

 
  
   


Is it a correct? I appreciate your suggesions.

Thanks,
Srini

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



Re: How to build an application that is organized as BC4JToyStore example from scratch ?

2003-09-23 Thread Steve Muench
I built the BC4J Toy Store demo application using the basic
features of the JDeveloper IDE 9.0.3 that I describe in
the whitepaper that accompanies the demo.

The whitepaper is not designed as a step by step tutorial,
but if you are unclear as to reproduce any of the best practices
that you find/see in the demo, please post a question in the
JDeveloper OTN discussion forum and we'll try to help.


__
Steve Muench - Developer, Product Mgr, Java/XML Evangelist, Author
Building a Web Store with Struts and BC4J (BC4J Toy Store Demo)
http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore
Simplify J2EE Development with the Oracle BC4J Framework
http://otn.oracle.com/products/jdev/htdocs/j2ee_bc4j.html
Dive into BC4J at http://radio.weblogs.com/0118231/
Building Oracle XML Apps, http://www.oreilly.com/catalog/orxmlapp

- Original Message - 
From: "EL AKARI Mehdi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 06:31
Subject: Re: How to build an application that is organized as BC4JToyStore example 
from scratch ?


| No it does not specify how to build such an application from scratch
| 
| 
| - Original Message -
| From: "Andrew Kuzmin" <[EMAIL PROTECTED]>
| To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
| Sent: Tuesday, September 23, 2003 10:17 AM
| Subject: Re: How to build an application that is organized as BC4JToyStore
| example from scratch ?
| 
| 
| > Maybe this:
| >
| http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/readme.html
| > ?
| >
| > --
| > Andrew Kuzmin
| > http://www.java201.com
| >
| > >- Original Message -
| > >From: "EL AKARI Mehdi" <[EMAIL PROTECTED]>
| > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
| > >Sent: Tuesday, September 23, 2003 1:07 PM
| > >Subject: How to build an application that is organized as BC4JToyStore
| > example from scratch ?
| > >
| >
| > >Hello,
| > >I'm trying to build an application that is organized as the example
| > BC4JToyStore, but i just can't!!
| > >Can anyone guide me to a tutorial, or a doc?
| > >Thank you
| > >Mehdi
| >
| >
| > -
| > 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: Data Source issue in tiles controller execute()

2003-09-23 Thread Barry Volpe
TYPO:

This:



should be (correct name of definition):




- Original Message - 
From: "Barry Volpe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:31 PM
Subject: Re: Data Source issue in tiles controller execute()


Found a solution!

Here is a simple example of HOW TO EXTEND THE TILESACTION which not only
allows tile definitions but just as important allows using the DataSource
functionalilty of the Struts action(the implement Controller would not allow
the Data Source functionalilty):

public final class LoadUserCategoriesAction extends TilesAction{
public ActionForward execute( ComponentContext tilesContext,
ActionMapping mapping,
ActionForm form,
HttpServletRequest
request,
HttpServletResponse
response) throws Exception
{

//This just sets up a datasource
Statement stmt = null;
ResultSet rs = null;
DataSource dataSource;
Connection conn=null;
try {
dataSource = getDataSource(request);
conn = dataSource.getConnection();
stmt = conn.createStatement();
//Example Query
rs = stmt.executeQuery("select * from users where email=\'"
+ userName + "'");
if ( rs.next() ) {
//get parameters
rs.getString("userid");
}
else {
throw new Exception("User " + userName + " not found!");
}
} catch (SQLException sqle) {
getServlet().log("Connection.process", sqle);
} finally {
//enclose this in a finally block to make
//sure the connection is closed
try {
conn.close();
} catch (SQLException sqle) {
getServlet().log("Connection.close", sqle);
}
}

//Here we have only a TEST but could put the database results into the
tilesContext

tilesContext.putAttribute("TEST" , "TEST THIS!");

return null;
}


}


Here is what goes in the struts-config:


   

Here is what goes in the tiles-def:




Here is what goes in the sampleview.jsp







Now make the call (insert) in any desired jsp page.  This insert can be used
in several jsp pages and the tile view will be displayed.




 NOTES:

I found that using controllerClass which would have been a bit easier to use
would not allow me to use the getDataSource(request) function even when I
extended the Action class (required for getDataSource).  I could not pass
the database results from the Action class to the Controller class.


Hope this helps anyone looking to use the tilesAction with database
connectivity!

Barry







- Original Message - 
From: "Barry Volpe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 10:35 AM
Subject: Data Source issue in tiles controller execute()


> Hi,
>
> In the following (SEE CODE BELOW) when I attempt to inititialize
>
> getDataSource(request) in the Tiles Controller execute method it
> causes a null in the fowarding JSP which looks for the string "TEST"
> initialized by this:
>
>  tilesContext.putAttribute("TEST" , "TEST");
>
> If I remove the getDataSource(request) then the "TEST" string
>  tilesContext.putAttribute("TEST" , "TEST");
> displays correctly in the fowarding jsp.
>
> It appears that the getDataSource(request); does not work
> in the tilesController execute but works in the action execute.
>
> Does anyone know why?
>
> In addition the problem I have is I want to query the database for data
> and put it in the tiles controller execute so I can pass it to the
fowarding
> JSP.
>
> So I could query the database in the Action execute() and pass the data to
> the
> tiles controller execute() and display in the fowarding jsp.
>
> I have tried declaring a:
> static private String mystring;  outside the Action execute() and the
tiles
> controller execute()
>
> but when I try to update the string in the Action execute() the string
> (mystring) does not show
> the new string value in the tiles controller execute() method.
>
>
> In summary either the database query is performed in the Action execute
and
> data fowarded in the Tiles Controller execute()
>
> or
>
> The database query is performed in the Tiles Controller execute() and the
> query results will already by available to be fowarded to the JSP.
>
>  BOTH DO NOT WORK!
>
>
> HERE IS THE CODE:
>
> public class LoadUserCategoriesController extends Action implements
> Controller{
>
> static private String myString = "string";
>
> public ActionForward execute( ComponentContext tilesContext,
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response) throws Exception
> {
> //Data source works here but require results to be in
> Controller execute
> myString = "newstring";
>
>
>
> }
> public void execute(ComponentContext tilesContext,
> HttpServletRequest 

Re: Data Source issue in tiles controller execute()

2003-09-23 Thread Barry Volpe
Found a solution!

Here is a simple example of HOW TO EXTEND THE TILESACTION which not only
allows tile definitions but just as important allows using the DataSource
functionalilty of the Struts action(the implement Controller would not allow
the Data Source functionalilty):

public final class LoadUserCategoriesAction extends TilesAction{
public ActionForward execute( ComponentContext tilesContext,
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) 
throws Exception
{

//This just sets up a datasource
Statement stmt = null;
ResultSet rs = null;
DataSource dataSource;
Connection conn=null; 
try {
dataSource = getDataSource(request);
conn = dataSource.getConnection(); 
stmt = conn.createStatement(); 
//Example Query
rs = stmt.executeQuery("select * from users where email=\'"
+ userName + "'");
if ( rs.next() ) { 
//get parameters
rs.getString("userid"); 
}
else {
throw new Exception("User " + userName + " not found!");
} 
} catch (SQLException sqle) {
getServlet().log("Connection.process", sqle);
} finally {
//enclose this in a finally block to make
//sure the connection is closed
try {
conn.close(); 
} catch (SQLException sqle) {
getServlet().log("Connection.close", sqle);
}
} 

//Here we have only a TEST but could put the database results into the tilesContext

tilesContext.putAttribute("TEST" , "TEST THIS!");

return null;
} 


}


Here is what goes in the struts-config:

  


Here is what goes in the tiles-def:




Here is what goes in the sampleview.jsp







Now make the call (insert) in any desired jsp page.  This insert can be used
in several jsp pages and the tile view will be displayed.




 NOTES:

I found that using controllerClass which would have been a bit easier to use
would not allow me to use the getDataSource(request) function even when I
extended the Action class (required for getDataSource).  I could not pass
the database results from the Action class to the Controller class.


Hope this helps anyone looking to use the tilesAction with database connectivity!

Barry







- Original Message - 
From: "Barry Volpe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 10:35 AM
Subject: Data Source issue in tiles controller execute()


> Hi,
> 
> In the following (SEE CODE BELOW) when I attempt to inititialize
> 
> getDataSource(request) in the Tiles Controller execute method it
> causes a null in the fowarding JSP which looks for the string "TEST"
> initialized by this:
> 
>  tilesContext.putAttribute("TEST" , "TEST");
> 
> If I remove the getDataSource(request) then the "TEST" string
>  tilesContext.putAttribute("TEST" , "TEST");
> displays correctly in the fowarding jsp.
> 
> It appears that the getDataSource(request); does not work
> in the tilesController execute but works in the action execute.
> 
> Does anyone know why?
> 
> In addition the problem I have is I want to query the database for data
> and put it in the tiles controller execute so I can pass it to the fowarding
> JSP.
> 
> So I could query the database in the Action execute() and pass the data to
> the
> tiles controller execute() and display in the fowarding jsp.
> 
> I have tried declaring a:
> static private String mystring;  outside the Action execute() and the tiles
> controller execute()
> 
> but when I try to update the string in the Action execute() the string
> (mystring) does not show
> the new string value in the tiles controller execute() method.
> 
> 
> In summary either the database query is performed in the Action execute and
> data fowarded in the Tiles Controller execute()
> 
> or
> 
> The database query is performed in the Tiles Controller execute() and the
> query results will already by available to be fowarded to the JSP.
> 
>  BOTH DO NOT WORK!
> 
> 
> HERE IS THE CODE:
> 
> public class LoadUserCategoriesController extends Action implements
> Controller{
> 
> static private String myString = "string";
> 
> public ActionForward execute( ComponentContext tilesContext,
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response) throws Exception
> {
> //Data source works here but require results to be in
> Controller execute
> myString = "newstring";
> 
> 
> 
> }
> public void execute(ComponentContext tilesContext,
> HttpServletRequest request,
> HttpServletResponse response,
> ServletContext servletContext)throws Exception{
> 
> Statement stmt = null;
> ResultSet rs = null;
>

RE: How to restore user selections when returning to a JSP?

2003-09-23 Thread Shane Mingins
Could you not have that page set to session scope so the set selected value
is retained?

There are tips on this page http://husted.com/struts/catalog.html regarding
workflows that may be of help.

Shane

> -Original Message-
> From: John Habbouche [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 24 September 2003 9:57 a.m.
> To: Struts Users Mailing List
> Subject: How to restore user selections when returning to a JSP?
> 
> I an using Struts 1.1 with JSTL to write some JSP pages. I have a page
> where
> the user upon selecting a company name from pull down menu displays a list
> of Company Users for that specific company.  The end user then has the
> option to perform actions on those users such as editing/deleting or
> creating a user.  Let's take the example of editing a user profile.
> 
>   1) When the list of users isdisplayed, the end user selects a user
> to edit
> by clicking on it.
>   2) The end user is then shown a new page which allows him/her to
> edit user
> information such as name address, etc...
>   3) Upon clicking on 'Save', the user is presented with a
> confirmation page
> informing him/her that the user has been saved.
>   4) After the user clicks OK, the end user is directed back to the
> list of
> Company users
> 
> I would like at that point to restore the company selection that the end
> user had initially made.  Short of storing that info in Session or pass it
> around on the Request (a pain if your process spans mutiple pages), is
> there
> anything within the struts framework that would allow me to do that?
> 
> Any help would be most appreciated.
> 
> 
> 
> -
> 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: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Jing Zhou

- Original Message - 
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 4:31 PM
Subject: RE: Servlet Path & Path Info on Weblogic 8.1 vs. Struts


> (If I were you, I wouldn't CC people on notes to this list (and many
> other lists).)
> 
> > -Original Message-
> > From: Jing Zhou [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, September 22, 2003 12:20 PM
> > To: Struts Users Mailing List
> > Cc: Craig R. McClanahan
> > Subject: Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts
> > 
> > Craig,
> > 
> > Thanks for your confirmation. It does appear to be a bug in 
> > WebLogic 8.1.
> > I programmed a filter to work around this problem and some other
> > issues in Oracle OC4J 9.0.3. It works fine. But I discovered 
> > the following
> > behavioral differences between different vendors:
> 
> Did you find a bug report describing this in the BEA Support database?

No. But I left a short description of the problem regarding to
the confused servlet path and path info in a mailing list.

Jing

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



How to restore user selections when returning to a JSP?

2003-09-23 Thread John Habbouche
I an using Struts 1.1 with JSTL to write some JSP pages. I have a page where
the user upon selecting a company name from pull down menu displays a list
of Company Users for that specific company.  The end user then has the
option to perform actions on those users such as editing/deleting or
creating a user.  Let's take the example of editing a user profile.

1) When the list of users isdisplayed, the end user selects a user to edit
by clicking on it.
2) The end user is then shown a new page which allows him/her to edit user
information such as name address, etc...
3) Upon clicking on 'Save', the user is presented with a confirmation page
informing him/her that the user has been saved.
4) After the user clicks OK, the end user is directed back to the list of
Company users

I would like at that point to restore the company selection that the end
user had initially made.  Short of storing that info in Session or pass it
around on the Request (a pain if your process spans mutiple pages), is there
anything within the struts framework that would allow me to do that?

Any help would be most appreciated.



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



SSLExt and Struts Workflow?

2003-09-23 Thread Mick Knutson
Does SSLExt and Struts Workflow work together?

---
Thanks
Mick Knutson
http://www.baselogic.com
---

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



Re: Page flow question

2003-09-23 Thread Bob Jensen

I can certainly pass PageOne's required fields to PageTwo add them
to PageTwo as hidden fields and then pass them back to PageOne.

But this means that PageTwo has to have knowledge about who called
it, later if I have PageThree call PageTwo I have to change PageTwo, to
be aware of PageThree's required fields.

I was hoping to avoid this.

Another possibility is to save PageOne's required fields in the session, and
get them there in PageOne's PreparePageOneAction, if they are not passed in.

This should avoid PageTwo about caring who called it as the ActionForward
could determine where to return to.

Does anyone know of any issue/concerns with this approach?

Bob







- Original Message - 
From: "Christian Bollmeyer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 12:31 PM
Subject: Re: Page flow question


> Am Dienstag, 23. September 2003 21:02 schrieb Bob Jensen:
>
> > I have the following page flow question.
> >
> > PageOne calls PageTwo.
> >
> > PageTwo does its thing and wants to return to PageOne.
> >
> > I would like PageOne to be in the same state it was in when it called
> > PageTwo.
> >
> > What is the best way(s) to accomplish this using Struts?
> >
> > Or is this outside of Struts scope?
> >
> > thanks,
> > Bob
>
> Did you already try to pass things in request scope?
>
> -- Chris
>
> -
> 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: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Karr, David
(If I were you, I wouldn't CC people on notes to this list (and many
other lists).)

> -Original Message-
> From: Jing Zhou [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 22, 2003 12:20 PM
> To: Struts Users Mailing List
> Cc: Craig R. McClanahan
> Subject: Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts
> 
> Craig,
> 
> Thanks for your confirmation. It does appear to be a bug in 
> WebLogic 8.1.
> I programmed a filter to work around this problem and some other
> issues in Oracle OC4J 9.0.3. It works fine. But I discovered 
> the following
> behavioral differences between different vendors:

Did you find a bug report describing this in the BEA Support database?

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



Re: how to replace

2003-09-23 Thread James Mitchell
Like this.



 





--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
770.822.3359
AIM:jmitchtx



- Original Message - 
From: "Dom" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 4:54 PM
Subject: how to replace  I want to use one of the attributes in ApplicationMessages.properties as
an
> attribute in a JSTL tag. How can I implement it in the jsp only ?
>
> Dom
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: How to implement close button in Struts?

2003-09-23 Thread Chen, Gin
Do it using Javascript instead.

Close


Server's cant send a message to the client to close a browser window.
Another way is to send a response of that javascript or redirect to another
window that has that in a javascript head.
-Tim

-Original Message-
From: Rick Col [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 4:57 PM
To: [EMAIL PROTECTED]
Subject: How to implement close button in Struts?


Hi,

I have a "close" button on a page, once user clicks
on this button, the window should disappear. How to
do this in Struts?

regards 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


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



RE: How to implement close button in Struts?

2003-09-23 Thread Nicholson, Robb
There might be a better way, but this is how I do it:





-Original Message-
From: Rick Col [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 4:57 PM
To: [EMAIL PROTECTED]
Subject: How to implement close button in Struts?


Hi,

I have a "close" button on a page, once user clicks
on this button, the window should disappear. How to
do this in Struts?

regards 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Re: Servlet Path & Path Info on Weblogic 8.1 vs. Struts

2003-09-23 Thread Jing Zhou
Craig,

Thanks for your confirmation. It does appear to be a bug in WebLogic 8.1.
I programmed a filter to work around this problem and some other
issues in Oracle OC4J 9.0.3. It works fine. But I discovered the following
behavioral differences between different vendors:

The filter is mapped to *.do and related to-be-forwarded or
to-be-included JSP pages through two filter mapping elements
in web.xml. The settings are common for all vendors' server.

* On Tomcat 4.1.24 and Resin 2.1.10,  the filter is invoked when *.do
   action is received. When Struts forwards to (or includes) a target JSP
   page, the filter is skipped over.

* On WebLogic 8.1 and OC4J 9.0.3, the filter is invoked when *.do
   action is received. When Struts forwards to (or includes) a target JSP
   page, the filter is invoked again (with wrapped http request and
   response in our case).

* In particular, OC4J wraps our http request and response wrappers
   using its own oracle.security.jazn.oc4j.JAZNServletRequest class
   when it is invoking the filter on the target JSP pages.

I could not judge whose behavior is right or wrong. They are even
(2 to 2 here). From what I read in the Java Servlet Specification,
I couldn't find, for example, the servlet containers should invoke
the filter or not when using the request dispatcher to include and/or
forward to a target servlet. Is this an ambiguity here? or both ways
of implementation are allowed?

About OC4J wrapping our wrappers, it seems to me it violates the
Specification where it demands the same wrapper instances should
be used, correct?

Jing

> >
> > But we need periods in the prefixes for modularization purposes. If
there
> > are
> > no *double standards* to interpret the servlet path and path info, and
if we
> > are sure it is a bug, we have to find a way to work around this Weblogic
> > specific bug/behavior.
>
> There are no double standards -- the behavior is either spec compliant or
> it is not.  This appears to be a bug in WebLogic that should be reported
> to them.
>
> Craig
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: How to implement close button in Struts?

2003-09-23 Thread Thomas Cornet
Something like this should work...


caption

Thomas

At 22:57 23/09/2003, you wrote:
Hi,

I have a "close" button on a page, once user clicks
on this button, the window should disappear. How to
do this in Struts?
regards

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: how to replace

2003-09-23 Thread Karr, David
You can use "" and specify a "var" attribute to put the
result into a scoped variable.  Note that part of the setup for the
"fmt" tag library is setting the
"javax.servlet.jsp.jstl.fmt.localizationContext" context parameter to
the "class name" of your properties file (normally just the base name).

> -Original Message-
> From: Dom [mailto:[EMAIL PROTECTED] 
> 
> I want to use one of the attributes in 
> ApplicationMessages.properties as an
> attribute in a JSTL tag. How can I implement it in the jsp only ?

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



How to implement close button in Struts?

2003-09-23 Thread Rick Col
Hi,

I have a "close" button on a page, once user clicks
on this button, the window should disappear. How to
do this in Struts?

regards 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: any replacement for include file dynamic

2003-09-23 Thread Sgarlata Matt
Hehe, unfortunately can't have it both ways ;)  You'll have to either use
static includes or start storing things in the request.

Matt
- Original Message - 
From: "Gandle, Panchasheel" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 4:49 PM
Subject: RE: any replacement for include file dynamic


> I don't want to loose the pageContext which happens with the dynamic
> includes.
>
>
> Thanks
> Panchasheel
>
>
> -Original Message-
> From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 4:17 PM
> To: Struts Users Mailing List
> Subject: Re: any replacement for include file dynamic
>
>
> Am Dienstag, 23. September 2003 21:48 schrieb Gandle, Panchasheel:
> > has anyone come across a replacement to
> > <[EMAIL PROTECTED] file="/abc/xyz.jsp"  %>
> >
> > where the file attr can be dynamic ?
>
> For dynamic includes, try the standard action first:
>
> 
>
> For extended functionality, such as not being limited
> to including content from 'same context | server'
> resources,  there's a JSTL action that allows for
> dynamically including content on a URL basis:
>
> 
>
> Note that you may also pass parameters in both cases.
>
> Finally, for if you're looking for a really advanced
> approach in this direction, check out the Tiles plugin
> (which can be run indepently of Struts as well, just to
> note).
>
> -- Chris
>
> > Thanks
> > Panchasheel
> >
> > -
> > 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: any replacement for include file dynamic

2003-09-23 Thread Gandle, Panchasheel
I don't want to loose the pageContext which happens with the dynamic
includes.


Thanks
Panchasheel


-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 4:17 PM
To: Struts Users Mailing List
Subject: Re: any replacement for include file dynamic


Am Dienstag, 23. September 2003 21:48 schrieb Gandle, Panchasheel:
> has anyone come across a replacement to
> <[EMAIL PROTECTED] file="/abc/xyz.jsp"  %>
>
> where the file attr can be dynamic ?

For dynamic includes, try the standard action first:

 

For extended functionality, such as not being limited
to including content from 'same context | server'
resources,  there's a JSTL action that allows for
dynamically including content on a URL basis:

 

Note that you may also pass parameters in both cases.

Finally, for if you're looking for a really advanced
approach in this direction, check out the Tiles plugin
(which can be run indepently of Struts as well, just to
note).

-- Chris

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



how to replace

2003-09-23 Thread Dom
I want to use one of the attributes in ApplicationMessages.properties as an
attribute in a JSTL tag. How can I implement it in the jsp only ?

Dom




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



Re: any replacement for include file dynamic

2003-09-23 Thread Christian Bollmeyer
Am Dienstag, 23. September 2003 21:48 schrieb Gandle, Panchasheel:
> has anyone come across a replacement to
> <[EMAIL PROTECTED] file="/abc/xyz.jsp"  %>
>
> where the file attr can be dynamic ?

For dynamic includes, try the standard action first:

 

For extended functionality, such as not being limited
to including content from 'same context | server'
resources,  there's a JSTL action that allows for
dynamically including content on a URL basis:

 

Note that you may also pass parameters in both cases.

Finally, for if you're looking for a really advanced
approach in this direction, check out the Tiles plugin
(which can be run indepently of Struts as well, just to
note).

-- Chris

> Thanks
> Panchasheel
>
> -
> 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: any replacement for include file dynamic

2003-09-23 Thread Sgarlata Matt
You would have to use  because <%@ include %> does the include
at compile-time.   does includes at runtime.

Matt
- Original Message - 
From: "Gandle, Panchasheel" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:48 PM
Subject: any replacement for include file dynamic


> has anyone come across a replacement to
> <[EMAIL PROTECTED] file="/abc/xyz.jsp"  %>
>
> where the file attr can be dynamic ?
>
>
> Thanks
> Panchasheel
>
> -
> 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: Page flow question

2003-09-23 Thread Thomas Cornet


Well, you can put in PageTwo hidden fields representing PageOne input 
values, to get them when you returns to PageOne. You can also store PageOne 
inputs in a session bean to get them later.

Thomas

At 21:02 23/09/2003, you wrote:
I have the following page flow question.

PageOne calls PageTwo.

PageTwo does its thing and wants to return to PageOne.

I would like PageOne to be in the same state it was in when it called PageTwo.

What is the best way(s) to accomplish this using Struts?

Or is this outside of Struts scope?

thanks,
Bob


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


any replacement for include file dynamic

2003-09-23 Thread Gandle, Panchasheel
has anyone come across a replacement to
<[EMAIL PROTECTED] file="/abc/xyz.jsp"  %>

where the file attr can be dynamic ?


Thanks
Panchasheel

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



Re: Page flow question

2003-09-23 Thread Christian Bollmeyer
Am Dienstag, 23. September 2003 21:02 schrieb Bob Jensen:

> I have the following page flow question.
>
> PageOne calls PageTwo.
>
> PageTwo does its thing and wants to return to PageOne.
>
> I would like PageOne to be in the same state it was in when it called
> PageTwo.
>
> What is the best way(s) to accomplish this using Struts?
>
> Or is this outside of Struts scope?
>
> thanks,
> Bob

Did you already try to pass things in request scope?

-- Chris 

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



Re: Connection Pooling + User Authentication

2003-09-23 Thread Christian Bollmeyer
Am Dienstag, 23. September 2003 19:41 schrieb Craig R. McClanahan:

Just for completeness, yet another approach. As I can't explain it 
better, I'll just cite the relevant passage from Hans Bergsten's 
ever-resourceful JSP book (the O'Reilly one with the wolf on the
front cover, 2nd edition, p. 475):

"A connection pool doesn't solve all problems, however. Because
all users are using the same Connection objects, you can't rely
on the database engine to limit access to protected data on a
per-user basis. Instead, you have to define data-access rules
in terms of roles (groups of users with the same access rights).
You can then use separate pools for different roles, each pool
creating Connection objects with a database account that
represents the role."

Considering the commons-dbcp implementation (in particular
the one that gets shipped with Tomcat 4.1.24), I may add
that not all Oracle driver versions run well in this environment,
with some of them issuing ORA- messages with very
low numbers recommending to consult Oracle developer
support, regards of 'thin' or OCI-based types. IIRC even
the ones that get shipped with Oracle 9i R2 or JDev 9.0.3
failed in this direction. If you experience the same problem,
try the latest 9i R2 drivers available from OTN. Note that
Oracle recently changed the driver architecture, so there
are the legacy 'classes12..zip |. jar' ones plus the 'new'
ones with a different naming scheme (was it ojdbc4.jar?)
designed for 1.4.x and later now. For details, you might
want to give the documentation that accompanies the
file a closer look. 

-- Chris

> Kapadia Mitesh-C23457 wrote:
> >Hello.
> >I would like to explore Connection Pooling as opposed to direct JDBC
> > calls to an Oracle V8.1.6 database in a STRUTS application.
> >The queries that are being executed have some kind of security built
> > into them such that they only return results based on the User Id (
> > a look up of the User Id is conducted in this query to determine
> > the level of security) My question: If I were to implement
> > Connection Pooling, is it possible to individually identiffy each
> > user in the connection pool when a connection is being used? If a
> > user is using a pool from the DB Connection Pool, can the user
> > still be individually identified by their User ID as opposed to the
> > User ID used to create the DB Connection Pool?
> >This would be a requirement since the user id would be used to
> > determine the level of security in the queries on the DB.
> >Any assistance you can provide would be most appreciated.
> >
> >Thanks in advance.
> >
> >Mitesh
>
> Some connection pools (not including commons-dbcp) do support the
> ability to pool connections that are registered to individual
> database usernames.  However, this is going to reduce the reusability
> of the connections -- the connection that user "foo" just put back
> into the pool cannot be used by user "bar".
>
> For Oracle in particular, I've had a lot of success doing things
> based on database roles, rather than usernames.  Then, in your DAO
> object you would acquire a generic connection (one that has a valid
> username/password, but no access to any tables) and then do a SET
> ROLE statement based on who the current user is.  Then, before you
> return the connection to the pool, you will want to reset the role
> again.  Using this approach maximizes the usefulness of any
> connection pool.
>
> Craig


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



Page flow question

2003-09-23 Thread Bob Jensen
I have the following page flow question.

PageOne calls PageTwo.

PageTwo does its thing and wants to return to PageOne.

I would like PageOne to be in the same state it was in when it called PageTwo.

What is the best way(s) to accomplish this using Struts?

Or is this outside of Struts scope?

thanks,
Bob





Re: getting the current thread inside an action

2003-09-23 Thread Kirk Wylie
Someone already suggested HttpSession.getId() if you want a 
session-unique name for the directory, but IMHO that creates a ton of 
directories, which just creates unnecessary FS waste.

What about creating a temporary directory and storing the name in an 
instance of ThreadLocal? That way you only have one directory per 
created thread, rather than one directory per created session, and you 
don't have to worry about concurrency OR get the actual thread.

Kirk Wylie
M7 Corporation
Menke, John wrote:

I have a servlet that writes it's output as PDF via the response and a
BufferedOutputStream.  This code need to use a temporary directory to 
create
the PDF via FO transform.  I don't want to just have one temp directory for
all users each user should get his own directory.  I was going to use
Thread.toString() for a unique identifier to name the directory.

 

-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 10:59 AM
To: Struts Users Mailing List
Subject: RE: getting the current thread inside an action
 > -Original Message-
 > From: Menke, John [mailto:[EMAIL PROTECTED]
 > Sent: Tuesday, September 23, 2003 9:49 AM
 > To: Struts (E-mail)
 > Subject: getting the current thread inside an action
 >
 >
 > Is there a way to get reference to the current thread from
 > within an Action?
Yes: Thread.currentThread().

The question I would ask is: Why? The servlet container should isolate you
from having to deal with individual threads. What are you trying to do?
-= J

-
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: issue with forwards

2003-09-23 Thread Mick Knutson
> I have an Alert action that has an array of Contacts. If there have not
been
> any Contacts set up in the db already, I want to forward the user to the
> addContact action, then when they add 1 Contact, forward them back to the
> Alert action.
>
> How can I do this?
>
> ---
> Thanks
> Mick Knutson
> http://www.baselogic.com

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



Re: Struggling with Struts: Forms, submits and links

2003-09-23 Thread Susan Bradeen
I don't remember what was discussed previously, but sounds like you just 
want a hyperlink ... can you make use of  in your table column 
for this? The Display Tag library easily allows you to do what you are 
describing. 

Susan Bradeen

On 09/23/2003 09:29:19 AM "Gregory F. March" wrote:

> Hi all...
> 
> I am having a recurring issue while developing my app using struts.  I 
know I
> h ave discussed it here before, and some workarounds were presented, but 
I
> want to reiterate the problem again because I can't believe others are 
not
> running into it as often as I am.
> 
> The problem is that I have forms that I need to have clickable text in 
them.
> 
> For example, I have a list of names, addresses, etc.  One per row.  I 
have a
> "new search" submit button and a "next" and "prev" button.  I am using a
> LookupDispatchAction to distinguish the three.  But, I also need to be 
able to
> click on the name to bring up the details for that row.  It can't be a 
button,
> it must be text.
> 
> The solution has been to do some form of jsp where I call the jsp 
"submit"
> method passing in some hodgepodge list of arguments to call my action 
with
> the appropriate parameter set.
> 
> This is such a kludge for what I find to be a very common webapp 
occurrence.
> 
> Am I missing something obvious?  Or is there just no way to do this in
> struts?  Any help on this would be greatly appreciated...
> 
> Thanks,
> 
> /greg
> 
> 
> 
> --
> Gregory F. March-=-http://www.gfm.net:81/~march-=- 
AIM:GfmNet
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



Re: How to use Hibernate with Struts and Tomcat?

2003-09-23 Thread Martin Naskovski
Matt Raible has provided an example of how to do just what you want-
it's called struts-resume. It's a small, but useful application, that
demonstrates all of the aspects you mentioned.

Martin
--


Tuesday, September 23, 2003, 7:46:15 AM, you wrote:

MAN> Hello,

MAN>  I need some help to use Hibernate with Tomcat and Struts. I need some working
MAN> examples to use it. I've found this examples, but I can't make work it:

MAN>   - Struts-hibernate
MAN>   - Listener to Tomcat
MAN>   - Plugin to struts-config.xml
MAN>   - Hibernate how to.

MAN>  I don't know if I've made something wrong or if the code is not correct.

MAN>  A lot of thanks,


MAN>   Marcial Atienzar

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


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



Re: Connection Pooling + User Authentication

2003-09-23 Thread Sgarlata Matt
- Original Message - 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 1:41 PM
Subject: Re: Connection Pooling + User Authentication


> For Oracle in particular, I've had a lot of success doing things based
> on database roles, rather than usernames.  Then, in your DAO object you
> would acquire a generic connection (one that has a valid
> username/password, but no access to any tables) and then do a SET ROLE
> statement based on who the current user is.  Then, before you return the
> connection to the pool, you will want to reset the role again.  Using
> this approach maximizes the usefulness of any connection pool.

We take a similar approach with Oracle, except our connections are
user-based instead of role-based.  We set up a PL/SQL package called GLOBAL
that has a SET_USERID procedure which sets the user id in the global
package.  Since each connection to the database receives its own "instance"
of the PL/SQL package, we can write SQL statements that depend on the
current user which is logged in.  (In Oracle, we are using Policy
Predicates.  I'm not sure the equivalent in other DBs).  This has been very
helpful in implementing row-level security.

> Craig

Matt

>
> -
> 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 + User Authentication

2003-09-23 Thread Craig R. McClanahan
Kapadia Mitesh-C23457 wrote:

Hello.
I would like to explore Connection Pooling as opposed to direct JDBC calls
to an Oracle V8.1.6 database in a STRUTS application.
The queries that are being executed have some kind of security built into
them such that they only return results based on the User Id ( a look up of
the User Id is conducted in this query to determine the level of security)
My question: If I were to implement Connection Pooling, is it possible to
individually identiffy each user in the connection pool when a connection is
being used? If a user is using a pool from the DB Connection Pool, can the
user still be individually identified by their User ID as opposed to the
User ID used to create the DB Connection Pool?
This would be a requirement since the user id would be used to determine the
level of security in the queries on the DB.
Any assistance you can provide would be most appreciated.
Thanks in advance.

Mitesh

 

Some connection pools (not including commons-dbcp) do support the 
ability to pool connections that are registered to individual database 
usernames.  However, this is going to reduce the reusability of the 
connections -- the connection that user "foo" just put back into the 
pool cannot be used by user "bar".

For Oracle in particular, I've had a lot of success doing things based 
on database roles, rather than usernames.  Then, in your DAO object you 
would acquire a generic connection (one that has a valid 
username/password, but no access to any tables) and then do a SET ROLE 
statement based on who the current user is.  Then, before you return the 
connection to the pool, you will want to reset the role again.  Using 
this approach maximizes the usefulness of any connection pool.

Craig



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


Data Source issue in tiles controller execute()

2003-09-23 Thread Barry Volpe
Hi,

In the following (SEE CODE BELOW) when I attempt to inititialize

getDataSource(request) in the Tiles Controller execute method it
causes a null in the fowarding JSP which looks for the string "TEST"
initialized by this:

 tilesContext.putAttribute("TEST" , "TEST");

If I remove the getDataSource(request) then the "TEST" string
 tilesContext.putAttribute("TEST" , "TEST");
displays correctly in the fowarding jsp.

It appears that the getDataSource(request); does not work
in the tilesController execute but works in the action execute.

Does anyone know why?

In addition the problem I have is I want to query the database for data
and put it in the tiles controller execute so I can pass it to the fowarding
JSP.

So I could query the database in the Action execute() and pass the data to
the
tiles controller execute() and display in the fowarding jsp.

I have tried declaring a:
static private String mystring;  outside the Action execute() and the tiles
controller execute()

but when I try to update the string in the Action execute() the string
(mystring) does not show
the new string value in the tiles controller execute() method.


In summary either the database query is performed in the Action execute and
data fowarded in the Tiles Controller execute()

or

The database query is performed in the Tiles Controller execute() and the
query results will already by available to be fowarded to the JSP.

 BOTH DO NOT WORK!


HERE IS THE CODE:

public class LoadUserCategoriesController extends Action implements
Controller{

static private String myString = "string";

public ActionForward execute( ComponentContext tilesContext,
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
{
//Data source works here but require results to be in
Controller execute
myString = "newstring";



}
public void execute(ComponentContext tilesContext,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)throws Exception{

Statement stmt = null;
ResultSet rs = null;
DataSource dataSource;
Connection conn=null;

try {
dataSource = getDataSource(request);
}.


//myString does not show "newString" here.

 tilesContext.putAttribute("TEST" , "TEST");   //only works
if I remove the dataSource = getDataSource(request) statement.




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



Re: Connection Pooling + User Authentication

2003-09-23 Thread Kirk Wylie
Kapadia Mitesh-C23457 wrote:

Hello.
I would like to explore Connection Pooling as opposed to direct JDBC calls
to an Oracle V8.1.6 database in a STRUTS application.
Just for further clarification, are you talking about using the Struts 
Data Sources or something external to Struts, like the Commons DBCP package?

The queries that are being executed have some kind of security built into
them such that they only return results based on the User Id ( a look up of
the User Id is conducted in this query to determine the level of security)
I'm understanding this to mean that what happens is that when a user of 
your application logs in, you then do some type of lookup (which may be 
one-to-one) to determine what user they should log into the database 
using, and then you have privileges set on the database user determining 
what that user is permitted to do. Is that correct?

My question: If I were to implement Connection Pooling, is it possible to
individually identiffy each user in the connection pool when a 
connection is
being used? If a user is using a pool from the DB Connection Pool, can the
user still be individually identified by their User ID as opposed to the
User ID used to create the DB Connection Pool?
Usually not, but there might be a way around it.

This would be a requirement since the user id would be used to determine 
the
level of security in the queries on the DB.
Any assistance you can provide would be most appreciated.
One way to do this is to use a package such as the Commons DBCP package 
(http://jakarta.apache.org/commons/dbcp/), which would then allow you to 
create one pool per user. In essence, you would have some properties 
which would specify everything but the user name for a connection 
(called, for example, myconn), and then you would just create a 
different connection pool instance at runtime based on the actual 
underlying user name (such as "myconn-kwylie" or "myconn-jsmith"). When 
you lookup a connection instance, then, you would look up the version 
which includes the user name.

This still has advantages over creating a connection per request, so 
it's still a worthwhile pattern to follow if your database requires this 
type of access.

Of course, if I'm not understanding the requirements, please let me know.

Kirk Wylie
M7 Corporation
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Poll] action mappings

2003-09-23 Thread atta-ur rehman
hi james,

could you please explain, for a struts newbie, what do you mean by


I'm using DispatchAction with 2 abstract base actions between my actions and
the dispatch action.  The first one has helper methods for functionality not
requiring authentication, and the second one (which extends the first) does
require authentication.


Thanks in advance!

ATTA
- Original Message - 
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 9:17 AM
Subject: Re: [Poll] action mappings


> #1 with a twist.
>
> I'm using DispatchAction with 2 abstract base actions between
> my actions and the dispatch action.  The first one has helper
> methods for functionality not requiring authentication, and
> the second one (which extends the first) does require authentication.
>
> By overriding the execute in the second one, it allows me
> additional base functionality (helper methods) and seamless
> session management in one place.
>
> I've attached a crude example of what I mean.
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 770.822.3359
> AIM:jmitchtx
>
>
>
> - Original Message - 
> From: "Mainguy, Mike" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 23, 2003 11:05 AM
> Subject: [Poll] action mappings
>
>
> > I have yet another opinion poll for struts-user...
> >
> > What are folks currently doing for action mappings in relation to CRUD
> > operations?
> > Are you:
> >
> > #1  creating a unique Action mapping for each atomic operation
> > (potentially mapped to the same action class)
> > /createUser.do ->>  UserAction.java
> > /readUser.do   ->>  UserAction.java
> > /updateUser.do ->>  UserAction.java
> > /deleteUser.do ->>  UserAction.java
> >
> >
> > #2  creating a unique Action mapping for each atmoic operation
> > with each action having a unique class
> > /createUser.do ->>  CreateUserAction.java
> > /readUser.do   ->>  ReadUserAction.java
> > /updateUser.do ->>  UpdateUserAction.java
> > /deleteUser.do ->>  DeleteUserAction.java
> >
> > #3  creating an aggregate action class with a unique action mapping with
> > multiple operations and using form/request variable to accomplish
CUD
> > /editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
> > ?OP=Delete)
> > /displayUser.do->> UserAction.java
> >
> >
> > #4  creating an aggregate action class with a unique action mapping with
> > multiple operations
> > /editUser.do   ->> EditUserAction.java
> > /displayUser.do->> DisplayUserAction.java
> >
> >
> > Some other way (or a combination) ...
> >
> >
> >
> > This message and its contents (to include attachments) are the property
of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> information contained herein is strictly prohibited. Unauthorized use of
> information contained herein may subject you to civil and criminal
> prosecution and penalties. If you are not the intended recipient, you
should
> delete this message immediately.
> >
> >
> >
> >
> > -
> > 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: [Poll] action mappings

2003-09-23 Thread Sgarlata Matt
#3 - almost all of my actions descend from DispatchAction
- Original Message - 
From: "Mainguy, Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 11:05 AM
Subject: [Poll] action mappings


> I have yet another opinion poll for struts-user...
>
> What are folks currently doing for action mappings in relation to CRUD
> operations?
> Are you:
>
> #1  creating a unique Action mapping for each atomic operation
> (potentially mapped to the same action class)
> /createUser.do ->>  UserAction.java
> /readUser.do   ->>  UserAction.java
> /updateUser.do ->>  UserAction.java
> /deleteUser.do ->>  UserAction.java
>
>
> #2  creating a unique Action mapping for each atmoic operation
> with each action having a unique class
> /createUser.do ->>  CreateUserAction.java
> /readUser.do   ->>  ReadUserAction.java
> /updateUser.do ->>  UpdateUserAction.java
> /deleteUser.do ->>  DeleteUserAction.java
>
> #3  creating an aggregate action class with a unique action mapping with
> multiple operations and using form/request variable to accomplish CUD
> /editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
> ?OP=Delete)
> /displayUser.do->> UserAction.java
>
>
> #4  creating an aggregate action class with a unique action mapping with
> multiple operations
> /editUser.do   ->> EditUserAction.java
> /displayUser.do->> DisplayUserAction.java
>
>
> Some other way (or a combination) ...
>
>
>
> This message and its contents (to include attachments) are the property of
Kmart Corporation (Kmart) and may contain confidential and proprietary
information. You are hereby notified that any disclosure, copying, or
distribution of this message, or the taking of any action based on
information contained herein is strictly prohibited. Unauthorized use of
information contained herein may subject you to civil and criminal
prosecution and penalties. If you are not the intended recipient, you should
delete this message immediately.
>
>
>
>
> -
> 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: [Poll] action mappings

2003-09-23 Thread Adam Hardy
#1

On 09/23/2003 05:05 PM Mainguy, Mike wrote:
I have yet another opinion poll for struts-user...

What are folks currently doing for action mappings in relation to CRUD
operations?  
Are you:

#1  creating a unique Action mapping for each atomic operation 
(potentially mapped to the same action class)
	/createUser.do ->>  UserAction.java
	/readUser.do   ->>  UserAction.java
	/updateUser.do ->>  UserAction.java
	/deleteUser.do ->>  UserAction.java
	

#2  creating a unique Action mapping for each atmoic operation 
with each action having a unique class
	/createUser.do ->>  CreateUserAction.java
	/readUser.do   ->>  ReadUserAction.java
	/updateUser.do ->>  UpdateUserAction.java
	/deleteUser.do ->>  DeleteUserAction.java

#3  creating an aggregate action class with a unique action mapping with 
multiple operations and using form/request variable to accomplish CUD
	/editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
?OP=Delete)
	/displayUser.do->> UserAction.java

#4  creating an aggregate action class with a unique action mapping with 
multiple operations
	/editUser.do   ->> EditUserAction.java   
	/displayUser.do->> DisplayUserAction.java

Some other way (or a combination) ...

  

This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately.



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

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


Re: [Poll] action mappings

2003-09-23 Thread James Mitchell
#1 with a twist.

I'm using DispatchAction with 2 abstract base actions between
my actions and the dispatch action.  The first one has helper
methods for functionality not requiring authentication, and
the second one (which extends the first) does require authentication.

By overriding the execute in the second one, it allows me
additional base functionality (helper methods) and seamless
session management in one place.

I've attached a crude example of what I mean.

--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
770.822.3359
AIM:jmitchtx



- Original Message - 
From: "Mainguy, Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 11:05 AM
Subject: [Poll] action mappings


> I have yet another opinion poll for struts-user...
>
> What are folks currently doing for action mappings in relation to CRUD
> operations?
> Are you:
>
> #1  creating a unique Action mapping for each atomic operation
> (potentially mapped to the same action class)
> /createUser.do ->>  UserAction.java
> /readUser.do   ->>  UserAction.java
> /updateUser.do ->>  UserAction.java
> /deleteUser.do ->>  UserAction.java
>
>
> #2  creating a unique Action mapping for each atmoic operation
> with each action having a unique class
> /createUser.do ->>  CreateUserAction.java
> /readUser.do   ->>  ReadUserAction.java
> /updateUser.do ->>  UpdateUserAction.java
> /deleteUser.do ->>  DeleteUserAction.java
>
> #3  creating an aggregate action class with a unique action mapping with
> multiple operations and using form/request variable to accomplish CUD
> /editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
> ?OP=Delete)
> /displayUser.do->> UserAction.java
>
>
> #4  creating an aggregate action class with a unique action mapping with
> multiple operations
> /editUser.do   ->> EditUserAction.java
> /displayUser.do->> DisplayUserAction.java
>
>
> Some other way (or a combination) ...
>
>
>
> This message and its contents (to include attachments) are the property of
Kmart Corporation (Kmart) and may contain confidential and proprietary
information. You are hereby notified that any disclosure, copying, or
distribution of this message, or the taking of any action based on
information contained herein is strictly prohibited. Unauthorized use of
information contained herein may subject you to civil and criminal
prosecution and penalties. If you are not the intended recipient, you should
delete this message immediately.
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

MRBA == ManagedResourceBaseAction
AMRBA == AuthenticatedManagedResourceBaseAction


This diagram may seem crude, but I hope you get the idea.
The formatting will most likely be screwed up.
All actions (except login) must extend AMRBA.


So, I have:

/createUser.do

DispatchAction   MRBAAMRBA  ManageUserAction
|
-execute()>|
   |--,
   |  |
   | isLoggedIn?
   |  |
   |<-'
   |
|<-- super.execute() --|
|  
|/createUser-->|
|  |
|  |<--getService()--->|
|  |   |
|  |   |
|  |   |--createUser()-> 
Business
|  | 
Service
|  |   |


*Note* - I do not pass return boolean or some other crappy way of dealing 
 with invalid state.  My application takes advantage of declarative 
 exception handline


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

Connection Pooling + User Authentication

2003-09-23 Thread Kapadia Mitesh-C23457
Hello.
I would like to explore Connection Pooling as opposed to direct JDBC calls
to an Oracle V8.1.6 database in a STRUTS application.
The queries that are being executed have some kind of security built into
them such that they only return results based on the User Id ( a look up of
the User Id is conducted in this query to determine the level of security)
My question: If I were to implement Connection Pooling, is it possible to
individually identiffy each user in the connection pool when a connection is
being used? If a user is using a pool from the DB Connection Pool, can the
user still be individually identified by their User ID as opposed to the
User ID used to create the DB Connection Pool?
This would be a requirement since the user id would be used to determine the
level of security in the queries on the DB.
Any assistance you can provide would be most appreciated.

Thanks in advance.

Mitesh


Re: .do as welcome-file

2003-09-23 Thread Christian Bollmeyer
It's a matter of personal preferences. Mine is to move
all .jsp etc. files to a directory underneath /WEB-INF
and make use of ForwardAction instead. I found this
to be the easiest approach to enforce the 'Action
First' rule, in particular when combined with Tiles.
Of course, my 'default' start page is an Action, too
(usually named main.do, start.do or the like).

-- Chris

- Original Message - 
From: "Ed Robbins" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 4:57 PM
Subject: Re: .do as welcome-file


> I like to do it with a filter.  I can accomplish several things with it, 
> tighter security, I prevent someone from calling any of my jsp's 
> directly and I can then have the welcome page be an action.
> 
> Ed
> 
> Mainguy, Mike wrote:
> 
> >This is actually the way I do it.
> >
> >-Original Message-
> >From: Menke, John [mailto:[EMAIL PROTECTED] 
> >Sent: Tuesday, September 23, 2003 9:58 AM
> >To: 'Struts Users Mailing List'
> >Subject: RE: .do as welcome-file
> >
> >
> >I guess it's all the same as long as it works.  You solution might be
> >simpler actually no web.xml configs for the servlet

-- CLIP!


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



Re: [struts-atlanta] [OT] Struts-Atlanta - (reminder) don't miss tonight's meeting.

2003-09-23 Thread James Mitchell
Wow, that (formatting) sure looks like crap after the yahoo relay.  It
looked real nice before I sent itHONEST!!!

Anyway, I forgot to mention that for those interested in drinks/discussions
before our meeting, a few of us will get together at Max & Ermas around
6:30.  If you don't know how to get there, let me know and I'll meet you at
Mirant around 6:15 and we can all drive over together.

All are welcome.  See you tonight!!



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
770.822.3359
AIM:jmitchtx



- Original Message - 
From: "James Mitchell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 11:06 AM
Subject: [struts-atlanta] [OT] Struts-Atlanta - (reminder) don't miss
tonight's meeting.


>
> The Next Meeting...
>   When: Tuesday, September 23, 2003 from 7PM to 9PM (THAT'S
> TONIGHT!)
>   Where:  Mirant
>   1155 Perimeter Center Parkway
>   (across from the Sandy Springs Marta station near Perimeter mall
>   Click here for directions
>   Presenter: Jason Chambers is an Advisory Developer at Delta
Technology
> where his responsibilities include delta.com and flysong.com. He has over
12
> years development experience working in the software, telecom and airline
> industries. In his spare time he maintains various small re- usable Java
> components released as open source. He is a Sun Certified Java Developer
and
> Web Component Developer for the Java 2 platform. He maintains a blog at
> http://jason.blog-city.com.
>   Topic: Getting started with Struts
>   Description: What do you need to get started with Struts? Well, you
> need a lot more than just Struts itself. This presentation will show you
> what components you need, where to get them from and how to get them
working
> together to build a basic yet productive development environment for your
> web applications. Best of all, it is all free!
>
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 770.822.3359
> AIM:jmitchtx
>
>
>
>
>  Yahoo! Groups Sponsor -~-->
> Upgrade to 128-Bit SSL Security!
> http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/nhFolB/TM
> -~->
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>


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



Writing to output in an Action??

2003-09-23 Thread Menke, John

I have never written directly to the response in an Action are there any
known issues related to doing this?  Currently I have an action that calls a
servlet that writes to the response to do this.  Can I do directly from my
Action?  (Write to the output??)  What would be considered best practice??

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



RE: getting the current thread inside an action

2003-09-23 Thread Fenderbosch, Eric
Would HttpSession.getId() be a better temporary unique id instead of the thread?

-Original Message-
From: Menke, John [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 11:14
To: 'Struts Users Mailing List'
Subject: RE: getting the current thread inside an action


I have a servlet that writes it's output as PDF via the response and a
BufferedOutputStream.  This code need to use a temporary directory to create
the PDF via FO transform.  I don't want to just have one temp directory for
all users each user should get his own directory.  I was going to use
Thread.toString() for a unique identifier to name the directory.

  

-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 10:59 AM
To: Struts Users Mailing List
Subject: RE: getting the current thread inside an action


> -Original Message-
> From: Menke, John [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 9:49 AM
> To: Struts (E-mail)
> Subject: getting the current thread inside an action
> 
> 
> Is there a way to get reference to the current thread from 
> within an Action?

Yes: Thread.currentThread().

The question I would ask is: Why? The servlet container should isolate you
from having to deal with individual threads. What are you trying to do?

-= J

-
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] Struts-Atlanta - (reminder) don't miss tonight's meeting.

2003-09-23 Thread James Mitchell

The Next Meeting...
  When: Tuesday, September 23, 2003 from 7PM to 9PM (THAT'S
TONIGHT!)
  Where:  Mirant
  1155 Perimeter Center Parkway
  (across from the Sandy Springs Marta station near Perimeter mall
  Click here for directions
  Presenter: Jason Chambers is an Advisory Developer at Delta Technology
where his responsibilities include delta.com and flysong.com. He has over 12
years development experience working in the software, telecom and airline
industries. In his spare time he maintains various small re- usable Java
components released as open source. He is a Sun Certified Java Developer and
Web Component Developer for the Java 2 platform. He maintains a blog at
http://jason.blog-city.com.
  Topic: Getting started with Struts
  Description: What do you need to get started with Struts? Well, you
need a lot more than just Struts itself. This presentation will show you
what components you need, where to get them from and how to get them working
together to build a basic yet productive development environment for your
web applications. Best of all, it is all free!



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
770.822.3359
AIM:jmitchtx




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



RE: getting the current thread inside an action

2003-09-23 Thread Menke, John
I have a servlet that writes it's output as PDF via the response and a
BufferedOutputStream.  This code need to use a temporary directory to create
the PDF via FO transform.  I don't want to just have one temp directory for
all users each user should get his own directory.  I was going to use
Thread.toString() for a unique identifier to name the directory.

  

-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 10:59 AM
To: Struts Users Mailing List
Subject: RE: getting the current thread inside an action


> -Original Message-
> From: Menke, John [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 9:49 AM
> To: Struts (E-mail)
> Subject: getting the current thread inside an action
> 
> 
> Is there a way to get reference to the current thread from 
> within an Action?

Yes: Thread.currentThread().

The question I would ask is: Why? The servlet container should isolate you
from having to deal with individual threads. What are you trying to do?

-= J

-
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: Conditional Validation

2003-09-23 Thread Fenderbosch, Eric
Makes a little sense. :)
So would my struts-config.xml look something like this?
  

  


  


  


  

  

  

  
  

  

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 10:12
To: 'Struts Users Mailing List'
Subject: RE: Conditional Validation


You can set this up as different forms that submit to the same action
(different action definitions if you like).
Now each of the forms will have their own validation in your validation.xml.

It's early and I haven't had my coffee so let me know if that makes sense.
-Tim

-Original Message-
From: Fenderbosch, Eric [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 9:28 AM
To: [EMAIL PROTECTED]
Subject: Conditional Validation


I've been given a page design that has 4 text boxes and 4 submit buttons. I
only need to validate the text box associated with the submit button that
was clicked. required and requiredIf don't seem to be what I'm looking for.
Right now, my action form's validate looks like this:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
String action = request.getParameter("method");
if (action.equals("queryByDate")) {
validateDate(errors);
} else if (action.equals("queryByPro")) {
validatePro(errors);
} else if (action.equals("queryByBol")) {
validateBol(errors);
} else if (action.equals("queryByAuth")) {
validateAuth(errors);
} else if (action.equals("queryByPart")) {
validatePart(errors);
} else {
errors.add("unknown query method", new
ActionError("query_method.unknown"));
}
return errors;
}

And each of the private validate* methods are similar to this:

private void validatePro(ActionErrors errors) {
if (!validator.match(PRO_VAL_REG_EXP, proNumber)) {
errors.add("proNumber", new ActionError("proNumber.format"));
}
}

But I'd like a more elegant solution. Especially, I'd like to be able to
specify the regular expression used to validate each field outside of the
class. In order to do that, I think I need to use DynaValidatorActionForm,
but I'm not sure how to setup the "only-validate-if-this-submit-clicked"
logic.

Any suggestions would be appreciated.

Thanks.

Eric

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



[Poll] action mappings

2003-09-23 Thread Mainguy, Mike
I have yet another opinion poll for struts-user...

What are folks currently doing for action mappings in relation to CRUD
operations?  
Are you:

#1  creating a unique Action mapping for each atomic operation 
(potentially mapped to the same action class)
/createUser.do ->>  UserAction.java
/readUser.do   ->>  UserAction.java
/updateUser.do ->>  UserAction.java
/deleteUser.do ->>  UserAction.java


#2  creating a unique Action mapping for each atmoic operation 
with each action having a unique class
/createUser.do ->>  CreateUserAction.java
/readUser.do   ->>  ReadUserAction.java
/updateUser.do ->>  UpdateUserAction.java
/deleteUser.do ->>  DeleteUserAction.java

#3  creating an aggregate action class with a unique action mapping with 
multiple operations and using form/request variable to accomplish CUD
/editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
?OP=Delete)
/displayUser.do->> UserAction.java


#4  creating an aggregate action class with a unique action mapping with 
multiple operations
/editUser.do   ->> EditUserAction.java   
/displayUser.do->> DisplayUserAction.java


Some other way (or a combination) ...

  

This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.




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



RE: getting the current thread inside an action

2003-09-23 Thread James Childers
> -Original Message-
> From: Menke, John [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 9:49 AM
> To: Struts (E-mail)
> Subject: getting the current thread inside an action
> 
> 
> Is there a way to get reference to the current thread from 
> within an Action?

Yes: Thread.currentThread().

The question I would ask is: Why? The servlet container should isolate you from having 
to deal with individual threads. What are you trying to do?

-= J

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



Re: .do as welcome-file

2003-09-23 Thread Ed Robbins
I like to do it with a filter.  I can accomplish several things with it, 
tighter security, I prevent someone from calling any of my jsp's 
directly and I can then have the welcome page be an action.

Ed

Mainguy, Mike wrote:

This is actually the way I do it.

-Original Message-
From: Menke, John [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 9:58 AM
To: 'Struts Users Mailing List'
Subject: RE: .do as welcome-file

I guess it's all the same as long as it works.  You solution might be
simpler actually no web.xml configs for the servlet
-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:52 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file
I usually just put s/th like this in my index.jsp



and that's it. Whats the possible advantage
of using a redirect or other solutions that
also require a physical file in the root dir?
-- Chris

- Original Message -
From: "Menke, John" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:28 PM
Subject: RE: .do as welcome-file
 

Here's a trick to get an action to execute as home page in your webapp 
without having to do the jsp redirect.

Put a file called webapp.launch in the root directory of your webapp

Then configure these settings in your web.xml


   redirector
   yourpackage.Redirector


   redirector
   *.launch

package yourpackage;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
/**
*  Redirector to start application on browse to root url
*
*/
public class Redirector extends HttpServlet {
   /**
*  Stub method
*/
   public void destroy() {
   }
   /**
*  Forward the user to start page of webapp
*
[EMAIL PROTECTED]  request
[EMAIL PROTECTED]  response
[EMAIL PROTECTED]  ServletException
[EMAIL PROTECTED]  IOException
*/
   public void doGet(HttpServletRequest request, HttpServletResponse
response)
 throws ServletException, IOException {
   response.sendRedirect("home.do");
   }

   /**
*  Description of the Method
*/
   public void init() throws ServletException {
   }
}
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:05 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file
I can confirm that this hack works for tomcat. Create the dummy file 
start/start.do and tomcat will be happy, and you will still get the 
actual struts mapping.

On 09/23/2003 02:06 PM Mainguy, Mike wrote:
   

I haven't tried it, but I've been told that, in tomcat, if you 
create a
 

file
   

with that exact name it will work properly.  Evidently you cannot
 

specify
 

a
   

servlet path as a welcome file.

-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 7:00 AM
To: [EMAIL PROTECTED]
Subject: .do as welcome-file
Does anyone has figured out how to do this?

 /start/start.do

I am not able to make it work.

TIA,

Adolfo.

_
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]
This message and its contents (to include attachments) are the 
property
 

of
 

Kmart Corporation (Kmart) and may contain confidential and proprietary 
information. You are hereby notified that any disclosure, copying, or 
distribution of this message, or the taking of any action based on 
information contained herein is strictly prohibited. Unauthorized use 
of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you
   

should
 

delete this message immediately.
   


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

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



-
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 message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may conta

Re: getting the current thread inside an action

2003-09-23 Thread Michael Thompson
Thread.currentThread();
   --m


Menke, John wrote:

Is there a way to get reference to the current thread from within an Action?

-
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: getting the current thread inside an action

2003-09-23 Thread Mainguy, Mike
Thread.currentThread()???


-Original Message-
From: Menke, John [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 10:49 AM
To: Struts (E-mail)
Subject: getting the current thread inside an action


Is there a way to get reference to the current thread from within an Action?

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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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



RE: getting the current thread inside an action

2003-09-23 Thread Fenderbosch, Eric
Thread currentThread = Thread.currentThread(); ???

-Original Message-
From: Menke, John [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 10:49
To: Struts (E-mail)
Subject: getting the current thread inside an action


Is there a way to get reference to the current thread from within an Action?

-
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: .do as welcome-file

2003-09-23 Thread Mainguy, Mike
This is actually the way I do it.

-Original Message-
From: Menke, John [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 9:58 AM
To: 'Struts Users Mailing List'
Subject: RE: .do as welcome-file


I guess it's all the same as long as it works.  You solution might be
simpler actually no web.xml configs for the servlet

-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:52 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file


I usually just put s/th like this in my index.jsp



and that's it. Whats the possible advantage
of using a redirect or other solutions that
also require a physical file in the root dir?

-- Chris

- Original Message -
From: "Menke, John" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:28 PM
Subject: RE: .do as welcome-file


> Here's a trick to get an action to execute as home page in your webapp 
> without having to do the jsp redirect.
>
> Put a file called webapp.launch in the root directory of your webapp
>
> Then configure these settings in your web.xml
>
>
> 
> redirector
> yourpackage.Redirector
> 
>
> 
> redirector
> *.launch
> 
>
> package yourpackage;
>
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> import java.io.*;
> import java.util.*;
>
>
> /**
>  *  Redirector to start application on browse to root url
>  *
>
>  */
> public class Redirector extends HttpServlet {
>
> /**
>  *  Stub method
>  */
> public void destroy() {
> }
>
>
> /**
>  *  Forward the user to start page of webapp
>  *
>  [EMAIL PROTECTED]  request
>  [EMAIL PROTECTED]  response
>  [EMAIL PROTECTED]  ServletException
>  [EMAIL PROTECTED]  IOException
>  */
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
>   throws ServletException, IOException {
> response.sendRedirect("home.do");
>
> }
>
>
> /**
>  *  Description of the Method
>  */
> public void init() throws ServletException {
> }
> }
>
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 9:05 AM
> To: Struts Users Mailing List
> Subject: Re: .do as welcome-file
>
>
> I can confirm that this hack works for tomcat. Create the dummy file 
> start/start.do and tomcat will be happy, and you will still get the 
> actual struts mapping.
>
> On 09/23/2003 02:06 PM Mainguy, Mike wrote:
> > I haven't tried it, but I've been told that, in tomcat, if you 
> > create a
> file
> > with that exact name it will work properly.  Evidently you cannot
specify
> a
> > servlet path as a welcome file.
> >
> > -Original Message-
> > From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 23, 2003 7:00 AM
> > To: [EMAIL PROTECTED]
> > Subject: .do as welcome-file
> >
> >
> > Does anyone has figured out how to do this?
> >
> >  /start/start.do
> > 
> >
> > I am not able to make it work.
> >
> > TIA,
> >
> > Adolfo.
> >
> > _
> > 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]
> >
> >
> > This message and its contents (to include attachments) are the 
> > property
of
> Kmart Corporation (Kmart) and may contain confidential and proprietary 
> information. You are hereby notified that any disclosure, copying, or 
> distribution of this message, or the taking of any action based on 
> information contained herein is strictly prohibited. Unauthorized use 
> of information contained herein may subject you to civil and criminal 
> prosecution and penalties. If you are not the intended recipient, you
should
> delete this message immediately.
> >
> >
> >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
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

getting the current thread inside an action

2003-09-23 Thread Menke, John
Is there a way to get reference to the current thread from within an Action?

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



How to use Hibernate with Struts and Tomcat?

2003-09-23 Thread Marcial Atienzar Navarro
Hello,

 I need some help to use Hibernate with Tomcat and Struts. I need some working
examples to use it. I've found this examples, but I can't make work it:

  - Struts-hibernate
  - Listener to Tomcat
  - Plugin to struts-config.xml
  - Hibernate how to.

 I don't know if I've made something wrong or if the code is not correct. 

 A lot of thanks,


  Marcial Atienzar

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



XDoclet Support for Struts DynaForms

2003-09-23 Thread Nick Heudecker
Hi,

I couldn't find a patch to XDoclet to support generating dynaform
configs in the struts-config.xml file, so I rolled my own.  

The download bundle has an example, a README, and a jar that *should*
be a drop-in replacement for the existing 1.2beta4 Apache module.  You
can find it here:
http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip

No code changes were made, just changes to the templates.  All of the
old functionality is preserved.

-- 
Nick Heudecker
SystemMobile, Inc.
Email: [EMAIL PROTECTED]
Phone: 734.604.9192
Web: http://www.systemmobile.com

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



Re: Log4J and Struts

2003-09-23 Thread Mahesh Joshi
Hi,

Unfortunately this does not work for Tomcat 4.1.24

When I put log4j-1.2.8 in the jak*/common/lib or jak*/shared/lib I dont get
the results desired.
In the former, tomcat doesnt startup and in the latter struts does not
initialize.

Looks like I am missing something in the relationship between
commons-logging and Log4J.

Thanks!

Mahesh

- Original Message - 
From: "Abhijeet Mahalkar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 22, 2003 2:39 AM
Subject: Re: Log4J and Struts


hi Mahesh,

No u have to keep ur log4j-1.2.8.jar into websphere\appserver\lib dir not
web-inf.
here it will not give any error.
I was working on the same kind of error an hr before but copy paste into
websphere\appserver\lib solved my problem...

regards
abhijeet

- Original Message - 
From: "Mahesh Joshi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 22, 2003 2:59 PM
Subject: Log4J and Struts


Hi,

I am moving my current web application to struts and I am facing a problem.

We use Log4J for our logging (Log4J version 1.2.8)

If I have the log4j-1.2.8.jar in my WEB-INF/lib directory, the Action
servlet does not initialize

Tomcat log file says:
javax.servlet.ServletException: Error instantiating servlet class
org.apache.struts.action.ActionServlet
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
2)
...
- Root Cause -
java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:532)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:432)
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:525)
 ... 28 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
 at java.lang.Class.getConstructor0(Class.java:1762)
 at java.lang.Class.getConstructor(Class.java:1002)
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:429)
 ... 29 more


If I remove the log4J.jar from WEB-INF/lib, the ActionServlet
initializes(but then my app. cant log).
I searched the archive and implemented the solution provided by Sgarlata
Matt
http://www.mail-archive.com/[EMAIL PROTECTED]/msg79448.html

Howeve, putting the commons-logging.properties in the WEB-INF/classes/
folder didnt help either.
(note that our log4J config file has been kept in the WEB-INF folder. Even
if I keep the commons-logging.properties in the WEB-INF folder, it doesnt
work).

Please help!

Mahesh


-
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: .do as welcome-file

2003-09-23 Thread Adam Hardy
for security's sake I don't have any JSPs outside of WEB-INF, so this is 
the only solution, unless I wanted to use a http-redirect, which I don't.

Adam

On 09/23/2003 03:58 PM Menke, John wrote:
I guess it's all the same as long as it works.  You solution might be
simpler actually no web.xml configs for the servlet
-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:52 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file
I usually just put s/th like this in my index.jsp



and that's it. Whats the possible advantage
of using a redirect or other solutions that
also require a physical file in the root dir?
-- Chris

- Original Message -
From: "Menke, John" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:28 PM
Subject: RE: .do as welcome-file


Here's a trick to get an action to execute as home page in your webapp
without having to
do the jsp redirect.
Put a file called webapp.launch in the root directory of your webapp

Then configure these settings in your web.xml


   redirector
   yourpackage.Redirector


   redirector
   *.launch

package yourpackage;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
/**
*  Redirector to start application on browse to root url
*
*/
public class Redirector extends HttpServlet {
   /**
*  Stub method
*/
   public void destroy() {
   }
   /**
*  Forward the user to start page of webapp
*
[EMAIL PROTECTED]  request
[EMAIL PROTECTED]  response
[EMAIL PROTECTED]  ServletException
[EMAIL PROTECTED]  IOException
*/
   public void doGet(HttpServletRequest request, HttpServletResponse
response)
 throws ServletException, IOException {
   response.sendRedirect("home.do");
   }

   /**
*  Description of the Method
*/
   public void init() throws ServletException {
   }
}
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:05 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file
I can confirm that this hack works for tomcat. Create the dummy file
start/start.do and tomcat will be happy, and you will still get the
actual struts mapping.
On 09/23/2003 02:06 PM Mainguy, Mike wrote:

I haven't tried it, but I've been told that, in tomcat, if you create a
file

with that exact name it will work properly.  Evidently you cannot
specify

a

servlet path as a welcome file.

-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 7:00 AM
To: [EMAIL PROTECTED]
Subject: .do as welcome-file
Does anyone has figured out how to do this?


/start/start.do

I am not able to make it work.

TIA,

Adolfo.

_
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]
This message and its contents (to include attachments) are the property
of

Kmart Corporation (Kmart) and may contain confidential and proprietary
information. You are hereby notified that any disclosure, copying, or
distribution of this message, or the taking of any action based on
information contained herein is strictly prohibited. Unauthorized use of
information contained herein may subject you to civil and criminal
prosecution and penalties. If you are not the intended recipient, you
should

delete this message immediately.



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

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



-
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 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: .do as welcome-file

2003-09-23 Thread Kevin Peters
We do this too.  Works like a charm.

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:05 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file


I can confirm that this hack works for tomcat. Create the dummy file 
start/start.do and tomcat will be happy, and you will still get the 
actual struts mapping.

On 09/23/2003 02:06 PM Mainguy, Mike wrote:
> I haven't tried it, but I've been told that, in tomcat, if you create a
file
> with that exact name it will work properly.  Evidently you cannot specify
a
> servlet path as a welcome file.
> 
> -Original Message-
> From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 23, 2003 7:00 AM
> To: [EMAIL PROTECTED]
> Subject: .do as welcome-file
> 
> 
> Does anyone has figured out how to do this?
> 
>   
>   /start/start.do
>   
> 
> I am not able to make it work.
> 
> TIA,
> 
> Adolfo.
> 
> _
> 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]
> 
> 
> This message and its contents (to include attachments) are the property of
Kmart Corporation (Kmart) and may contain confidential and proprietary
information. You are hereby notified that any disclosure, copying, or
distribution of this message, or the taking of any action based on
information contained herein is strictly prohibited. Unauthorized use of
information contained herein may subject you to civil and criminal
prosecution and penalties. If you are not the intended recipient, you should
delete this message immediately.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


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


*** 
This electronic mail transmission contains confidential and/or privileged 
information intended only for the person(s) named.  Any use, distribution, 
copying or disclosure by another person is strictly prohibited. 
*** 



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



issue with forwards

2003-09-23 Thread Mick Knutson
I have an Alert action that has an array of Contacts. If there have not been
any Contacts set up in the db already, I want to forward the user to the
addContact action, then when they add 1 Contact, forward them back to the
Alert action.

How can I do this?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

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



RE: Conditional Validation

2003-09-23 Thread Chen, Gin
You can set this up as different forms that submit to the same action
(different action definitions if you like).
Now each of the forms will have their own validation in your validation.xml.

It's early and I haven't had my coffee so let me know if that makes sense.
-Tim

-Original Message-
From: Fenderbosch, Eric [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 9:28 AM
To: [EMAIL PROTECTED]
Subject: Conditional Validation


I've been given a page design that has 4 text boxes and 4 submit buttons. I
only need to validate the text box associated with the submit button that
was clicked. required and requiredIf don't seem to be what I'm looking for.
Right now, my action form's validate looks like this:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
String action = request.getParameter("method");
if (action.equals("queryByDate")) {
validateDate(errors);
} else if (action.equals("queryByPro")) {
validatePro(errors);
} else if (action.equals("queryByBol")) {
validateBol(errors);
} else if (action.equals("queryByAuth")) {
validateAuth(errors);
} else if (action.equals("queryByPart")) {
validatePart(errors);
} else {
errors.add("unknown query method", new
ActionError("query_method.unknown"));
}
return errors;
}

And each of the private validate* methods are similar to this:

private void validatePro(ActionErrors errors) {
if (!validator.match(PRO_VAL_REG_EXP, proNumber)) {
errors.add("proNumber", new ActionError("proNumber.format"));
}
}

But I'd like a more elegant solution. Especially, I'd like to be able to
specify the regular expression used to validate each field outside of the
class. In order to do that, I think I need to use DynaValidatorActionForm,
but I'm not sure how to setup the "only-validate-if-this-submit-clicked"
logic.

Any suggestions would be appreciated.

Thanks.

Eric

-
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: .do as welcome-file

2003-09-23 Thread Menke, John
I guess it's all the same as long as it works.  You solution might be
simpler actually no web.xml configs for the servlet

-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:52 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file


I usually just put s/th like this in my index.jsp



and that's it. Whats the possible advantage
of using a redirect or other solutions that
also require a physical file in the root dir?

-- Chris

- Original Message -
From: "Menke, John" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:28 PM
Subject: RE: .do as welcome-file


> Here's a trick to get an action to execute as home page in your webapp
> without having to
> do the jsp redirect.
>
> Put a file called webapp.launch in the root directory of your webapp
>
> Then configure these settings in your web.xml
>
>
> 
> redirector
> yourpackage.Redirector
> 
>
> 
> redirector
> *.launch
> 
>
> package yourpackage;
>
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> import java.io.*;
> import java.util.*;
>
>
> /**
>  *  Redirector to start application on browse to root url
>  *
>
>  */
> public class Redirector extends HttpServlet {
>
> /**
>  *  Stub method
>  */
> public void destroy() {
> }
>
>
> /**
>  *  Forward the user to start page of webapp
>  *
>  [EMAIL PROTECTED]  request
>  [EMAIL PROTECTED]  response
>  [EMAIL PROTECTED]  ServletException
>  [EMAIL PROTECTED]  IOException
>  */
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
>   throws ServletException, IOException {
> response.sendRedirect("home.do");
>
> }
>
>
> /**
>  *  Description of the Method
>  */
> public void init() throws ServletException {
> }
> }
>
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 9:05 AM
> To: Struts Users Mailing List
> Subject: Re: .do as welcome-file
>
>
> I can confirm that this hack works for tomcat. Create the dummy file
> start/start.do and tomcat will be happy, and you will still get the
> actual struts mapping.
>
> On 09/23/2003 02:06 PM Mainguy, Mike wrote:
> > I haven't tried it, but I've been told that, in tomcat, if you create a
> file
> > with that exact name it will work properly.  Evidently you cannot
specify
> a
> > servlet path as a welcome file.
> >
> > -Original Message-
> > From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 23, 2003 7:00 AM
> > To: [EMAIL PROTECTED]
> > Subject: .do as welcome-file
> >
> >
> > Does anyone has figured out how to do this?
> >
> > 
> > /start/start.do
> > 
> >
> > I am not able to make it work.
> >
> > TIA,
> >
> > Adolfo.
> >
> > _
> > 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]
> >
> >
> > This message and its contents (to include attachments) are the property
of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> information contained herein is strictly prohibited. Unauthorized use of
> information contained herein may subject you to civil and criminal
> prosecution and penalties. If you are not the intended recipient, you
should
> delete this message immediately.
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
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: .do as welcome-file

2003-09-23 Thread Christian Bollmeyer
I usually just put s/th like this in my index.jsp



and that's it. Whats the possible advantage
of using a redirect or other solutions that
also require a physical file in the root dir?

-- Chris

- Original Message -
From: "Menke, John" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 3:28 PM
Subject: RE: .do as welcome-file


> Here's a trick to get an action to execute as home page in your webapp
> without having to
> do the jsp redirect.
>
> Put a file called webapp.launch in the root directory of your webapp
>
> Then configure these settings in your web.xml
>
>
> 
> redirector
> yourpackage.Redirector
> 
>
> 
> redirector
> *.launch
> 
>
> package yourpackage;
>
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> import java.io.*;
> import java.util.*;
>
>
> /**
>  *  Redirector to start application on browse to root url
>  *
>
>  */
> public class Redirector extends HttpServlet {
>
> /**
>  *  Stub method
>  */
> public void destroy() {
> }
>
>
> /**
>  *  Forward the user to start page of webapp
>  *
>  [EMAIL PROTECTED]  request
>  [EMAIL PROTECTED]  response
>  [EMAIL PROTECTED]  ServletException
>  [EMAIL PROTECTED]  IOException
>  */
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
>   throws ServletException, IOException {
> response.sendRedirect("home.do");
>
> }
>
>
> /**
>  *  Description of the Method
>  */
> public void init() throws ServletException {
> }
> }
>
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 9:05 AM
> To: Struts Users Mailing List
> Subject: Re: .do as welcome-file
>
>
> I can confirm that this hack works for tomcat. Create the dummy file
> start/start.do and tomcat will be happy, and you will still get the
> actual struts mapping.
>
> On 09/23/2003 02:06 PM Mainguy, Mike wrote:
> > I haven't tried it, but I've been told that, in tomcat, if you create a
> file
> > with that exact name it will work properly.  Evidently you cannot
specify
> a
> > servlet path as a welcome file.
> >
> > -Original Message-
> > From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 23, 2003 7:00 AM
> > To: [EMAIL PROTECTED]
> > Subject: .do as welcome-file
> >
> >
> > Does anyone has figured out how to do this?
> >
> > 
> > /start/start.do
> > 
> >
> > I am not able to make it work.
> >
> > TIA,
> >
> > Adolfo.
> >
> > _
> > 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]
> >
> >
> > This message and its contents (to include attachments) are the property
of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> information contained herein is strictly prohibited. Unauthorized use of
> information contained herein may subject you to civil and criminal
> prosecution and penalties. If you are not the intended recipient, you
should
> delete this message immediately.
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



[ANNOUNCE] Display Tag 1.0 beta 1 Released!

2003-09-23 Thread Matt Raible
The Display Tag Library has a new release! This release is pretty
stellar - checkout the full list of changes at
http://displaytag.sourceforge.net/changes-report.html#1.0-b1.

Matt



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



Re: Conditional Validation

2003-09-23 Thread Jeff Kyser
Seems like using a one line JavaScript to set a hidden field
based on the button that was clicked, and then using the
requiredif validation rules in conjunction with a  mask for
each of your fields (using regular expression) should work.,
-jeff

On Tuesday, September 23, 2003, at 08:28  AM, Fenderbosch, Eric wrote:

I've been given a page design that has 4 text boxes and 4 submit 
buttons. I only need to validate the text box associated with the 
submit button that was clicked. required and requiredIf don't seem to 
be what I'm looking for.  Right now, my action form's validate looks 
like this:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest 
request) {
ActionErrors errors = new ActionErrors();
String action = request.getParameter("method");
if (action.equals("queryByDate")) {
validateDate(errors);
} else if (action.equals("queryByPro")) {
validatePro(errors);
} else if (action.equals("queryByBol")) {
validateBol(errors);
} else if (action.equals("queryByAuth")) {
validateAuth(errors);
} else if (action.equals("queryByPart")) {
validatePart(errors);
} else {
errors.add("unknown query method", new 
ActionError("query_method.unknown"));
}
return errors;
}

And each of the private validate* methods are similar to this:

private void validatePro(ActionErrors errors) {
if (!validator.match(PRO_VAL_REG_EXP, proNumber)) {
errors.add("proNumber", new ActionError("proNumber.format"));
}
}
But I'd like a more elegant solution. Especially, I'd like to be able 
to specify the regular expression used to validate each field outside 
of the class. In order to do that, I think I need to use 
DynaValidatorActionForm, but I'm not sure how to setup the 
"only-validate-if-this-submit-clicked" logic.

Any suggestions would be appreciated.

Thanks.

Eric

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


Struggling with Struts: Forms, submits and links

2003-09-23 Thread Gregory F. March

Hi all...

I am having a recurring issue while developing my app using struts.  I know I
h ave discussed it here before, and some workarounds were presented, but I
want to reiterate the problem again because I can't believe others are not
running into it as often as I am.

The problem is that I have forms that I need to have clickable text in them.

For example, I have a list of names, addresses, etc.  One per row.  I have a
"new search" submit button and a "next" and "prev" button.  I am using a
LookupDispatchAction to distinguish the three.  But, I also need to be able to
click on the name to bring up the details for that row.  It can't be a button,
it must be text.

The solution has been to do some form of jsp where I call the jsp "submit" 
method passing in some hodgepodge list of arguments to call my action with 
the appropriate parameter set.

This is such a kludge for what I find to be a very common webapp occurrence.

Am I missing something obvious?  Or is there just no way to do this in 
struts?  Any help on this would be greatly appreciated...

Thanks,

/greg



--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet



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



Deactivate Struts Form Propertys from within the action class

2003-09-23 Thread reps.groups
Hello,

is it possible to deactivate formelements generated by  from
within the action servlet ?
or do i have to do that in the jsp code ?

Mit freundlichen Grüßen

Christian Reps, Dipl. Inf. (FH)
Web Applications


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



Conditional Validation

2003-09-23 Thread Fenderbosch, Eric
I've been given a page design that has 4 text boxes and 4 submit buttons. I only need 
to validate the text box associated with the submit button that was clicked. required 
and requiredIf don't seem to be what I'm looking for.  Right now, my action form's 
validate looks like this:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
String action = request.getParameter("method");
if (action.equals("queryByDate")) {
validateDate(errors);
} else if (action.equals("queryByPro")) {
validatePro(errors);
} else if (action.equals("queryByBol")) {
validateBol(errors);
} else if (action.equals("queryByAuth")) {
validateAuth(errors);
} else if (action.equals("queryByPart")) {
validatePart(errors);
} else {
errors.add("unknown query method", new ActionError("query_method.unknown"));
}
return errors;
}

And each of the private validate* methods are similar to this:

private void validatePro(ActionErrors errors) {
if (!validator.match(PRO_VAL_REG_EXP, proNumber)) {
errors.add("proNumber", new ActionError("proNumber.format"));
}
}

But I'd like a more elegant solution. Especially, I'd like to be able to specify the 
regular expression used to validate each field outside of the class. In order to do 
that, I think I need to use DynaValidatorActionForm, but I'm not sure how to setup the 
"only-validate-if-this-submit-clicked" logic.

Any suggestions would be appreciated.

Thanks.

Eric

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



RE: .do as welcome-file

2003-09-23 Thread Menke, John
Here's a trick to get an action to execute as home page in your webapp
without having to 
do the jsp redirect.

Put a file called webapp.launch in the root directory of your webapp

Then configure these settings in your web.xml



redirector
yourpackage.Redirector



redirector
*.launch


package yourpackage;

import javax.servlet.*;
import javax.servlet.http.*;

import java.io.*;
import java.util.*;


/**
 *  Redirector to start application on browse to root url
 *
 
 */
public class Redirector extends HttpServlet {

/**
 *  Stub method
 */
public void destroy() {
}


/**
 *  Forward the user to start page of webapp
 *
 [EMAIL PROTECTED]  request
 [EMAIL PROTECTED]  response
 [EMAIL PROTECTED]  ServletException
 [EMAIL PROTECTED]  IOException
 */
public void doGet(HttpServletRequest request, HttpServletResponse
response)
  throws ServletException, IOException {
response.sendRedirect("home.do");
  
}


/**
 *  Description of the Method
 */
public void init() throws ServletException {
}
}

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 9:05 AM
To: Struts Users Mailing List
Subject: Re: .do as welcome-file


I can confirm that this hack works for tomcat. Create the dummy file 
start/start.do and tomcat will be happy, and you will still get the 
actual struts mapping.

On 09/23/2003 02:06 PM Mainguy, Mike wrote:
> I haven't tried it, but I've been told that, in tomcat, if you create a
file
> with that exact name it will work properly.  Evidently you cannot specify
a
> servlet path as a welcome file.
> 
> -Original Message-
> From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 23, 2003 7:00 AM
> To: [EMAIL PROTECTED]
> Subject: .do as welcome-file
> 
> 
> Does anyone has figured out how to do this?
> 
>   
>   /start/start.do
>   
> 
> I am not able to make it work.
> 
> TIA,
> 
> Adolfo.
> 
> _
> 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]
> 
> 
> This message and its contents (to include attachments) are the property of
Kmart Corporation (Kmart) and may contain confidential and proprietary
information. You are hereby notified that any disclosure, copying, or
distribution of this message, or the taking of any action based on
information contained herein is strictly prohibited. Unauthorized use of
information contained herein may subject you to civil and criminal
prosecution and penalties. If you are not the intended recipient, you should
delete this message immediately.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


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

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



RE: problem with String[]

2003-09-23 Thread Nicholson, Robb
I think this is what you are asking:
http://www.husted.com/struts/tips/006.html

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2003 9:49 PM
To: Struts Users Mailing List
Subject: Re: problem with String[]


Hi, i really need to get this working. anyone experienced the same thing?

> Something to note, i have also  name="transactionVO" property="transactionId" /> in the
>  loop
>
>> In the dynaActionForm i have specified paidAmount as String[]. In jsp,
>> 
>> is used. The html:text is in an  loop.
>> Somehow the data doesn't want to move to the dynaactionform.
>>
>> What is the best way to do this?
>>
>> Thanks in advance
>> Amin
>>
>> -
>> 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: .do as welcome-file

2003-09-23 Thread Adam Hardy
I can confirm that this hack works for tomcat. Create the dummy file 
start/start.do and tomcat will be happy, and you will still get the 
actual struts mapping.

On 09/23/2003 02:06 PM Mainguy, Mike wrote:
I haven't tried it, but I've been told that, in tomcat, if you create a file
with that exact name it will work properly.  Evidently you cannot specify a
servlet path as a welcome file.
-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 7:00 AM
To: [EMAIL PROTECTED]
Subject: .do as welcome-file

Does anyone has figured out how to do this?


/start/start.do

I am not able to make it work.

TIA,

Adolfo.

_
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]
This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately.



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

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


RE: .do as welcome-file

2003-09-23 Thread Mainguy, Mike
I haven't tried it, but I've been told that, in tomcat, if you create a file
with that exact name it will work properly.  Evidently you cannot specify a
servlet path as a welcome file.

-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 7:00 AM
To: [EMAIL PROTECTED]
Subject: .do as welcome-file


Does anyone has figured out how to do this?


/start/start.do


I am not able to make it work.

TIA,

Adolfo.

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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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



Re: .do as welcome-file

2003-09-23 Thread Sgarlata Matt
Unfortunately, you cannot do that.  You must specify a physical file.  A
standard technique is to make your welcome file a .jsp that redirects the
user to your struts start page, in this case /start/start.do.  You can
probably find more info about this in the archives.

Matt
- Original Message - 
From: "Adolfo Miguelez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 6:59 AM
Subject: .do as welcome-file


> Does anyone has figured out how to do this?
>
> 
> /start/start.do
> 
>
> I am not able to make it work.
>
> TIA,
>
> Adolfo.
>
> _
> 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]
>


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



RE: J2EE Pattern implementing Classes in Struts

2003-09-23 Thread Mooss, Vasudevan
Hi,

In the book "Struts in Action", the mappings are something like this,

Service to Worker, Command [GoF], 
Command and Controller,Front Controller, 
Singleton, Service Locator   ->   ActionServlet, Action

Dispatcher, Navigator->   ActionMapping,
ActionServlet, Action, ActionForward

View Helper, Session Facade, Singleton,
Synchronizer Token ->   Action

Transfer Objects, Value Object Assembler ->   ActionForm,
ActionErrors, ActionMessages

View Helper  ->   ActionForm,
ContextHelper, tag extensions

Composite View, Value Object Assembler   ->   Template taglib, Tiles
taglib

Decorator [GoF]  ->   ActionMapping

I feel this is a fair enough mapping...

Regards,

Vasu

In war: resolution. In defeat: defiance. In victory: magnanimity. In
peace: goodwill. - Sir Winston Leonard Spencer Churchill


-Original Message-
From: Kommineni, Sateesh (IndSys)
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 23 September, 2003 4:10 PM
To: Struts Users Mailing List
Subject: J2EE Pattern implementing Classes in Struts


Hi All,

  Can we identify a one to one mapping between the J2EE Patterns and the
classes which implement these patterns in Struts..

   I tried identifying the Patterns in the Presentation Tier . Let me
know your thoughts..

 
  Intercepting Filters---  Classes Specified using the Plug-in tag
in struts-config.xml
  Front Controller---  Action Servlet
  Context Object  ---  
  View Helper ---  All the tag lib classes that comes with
Struts
  Application Controller  ---  Request Processor and Action Classes as
Targets
  Dispatcher  ---  Action Forward
  Composite View  ---  This won't be provided as such in the
Framework, will be used in App
  Dispatcher View --- 
   One of them will be used depending on the
context . If the Business
processing needs to be done in View Helpers use Dispatcher View
other wise use Service to Worker
  Service to Worker   ---

Thanks in Advance
Sateesh


-
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]More Design Patterns. Real world example application

2003-09-23 Thread Mohd Amin Mohd Din
As the subject says, many discussion on design patterns have occurred.
However I need a good example to implement in my project. An application
using struts + hibernate would be a plus. Hopefully the example also
does some big joining at the database, and a few master detail forms.
(seems like a requirement for a mid-scale project ;-) ).
 
The current way, which I'm implement is using
 
   
Action -> managerBD -> DAO
 
The DAO uses ServiceLocator to get database connection. I know its quite
lame and doesn't have clean separation because we don't have an
interface for each DAO but we have a parent class BaseDAO which all DAOs
subclass from. Hopefully, with the example, the next project will be
better designed
 
Thanks
Amin


Re: Can't uncheck multibox

2003-09-23 Thread Natalie D Rassmann
Hi Hari,

To solve it, I set the length of the array containing the checkboxes to 0 in
the form's reset method.  I do have the form in the session, and this will
only work if you have the form in the session.

Here is my reset() code:

 //reset the action item indicator checkboxes
 String[] newAiList = new String[0];
 this.dynaValues.put("actionItemIndicator", newAiList);

This fixed my problem.  I hope it helps you.

Natalie

hari_s wrote:

> Hi Natalie I also work with html:multibox and  have similar  problem
> with you + problem to get the value from html:multibox, how did you
> solve it?
> Thank you, for your answer Natalie...
>
> -Original Message-
> From: Natalie D Rassmann [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 22, 2003 9:57 PM
> To: Struts Users Mailing List
> Subject: Can't uncheck multibox
>
> Can anyone help???  I have the following multibox in a
> dyanValidatorForm:
>
>  property="defectsList" indexId="i">
>
>
>
> 
>
> I am having trouble unchecking the checkboxes.  Everytime I uncheck a
> checkbox, hit submit, when the screen comes back the checkbox is still
> checked.  When I extract, the form data from this property, the form
> still indicates that the checkbox is checked even though I unchecked it
> in the form
>
> How do I uncheck a box once it has been unchecked by the user???
>
> Thanks in advance,
>
> Natalie
>
> -
> 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: J2EE Pattern implementing Classes in Struts

2003-09-23 Thread Adolfo Miguelez
As far as I remember, there is a explanation in one of the apendix of Struts 
in Action book concerning mapping among Strus classes and patterns that 
implements.

Adolfo.


From: "Kommineni, Sateesh (IndSys)" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: J2EE Pattern implementing Classes in Struts
Date: Tue, 23 Sep 2003 16:09:44 +0530
Hi All,

  Can we identify a one to one mapping between the J2EE Patterns and the 
classes which implement these patterns in Struts..

   I tried identifying the Patterns in the Presentation Tier . Let me know 
your thoughts..

  Intercepting Filters---  Classes Specified using the Plug-in tag in 
struts-config.xml
  Front Controller---  Action Servlet
  Context Object  ---
  View Helper ---  All the tag lib classes that comes with 
Struts
  Application Controller  ---  Request Processor and Action Classes as 
Targets
  Dispatcher  ---  Action Forward
  Composite View  ---  This won't be provided as such in the 
Framework, will be used in App
  Dispatcher View ---
   One of them will be used depending on the 
context . If the Business 	 processing needs to be done in View Helpers 
use Dispatcher View 		 other wise use Service to Worker
  Service to Worker	  ---

Thanks in Advance
Sateesh
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


.do as welcome-file

2003-09-23 Thread Adolfo Miguelez
Does anyone has figured out how to do this?


/start/start.do

I am not able to make it work.

TIA,

Adolfo.

_
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: multiple input pages, one form definition, one Action - How?

2003-09-23 Thread Robert Taylor
Why not define a different action mapping for each. They can
all use the same action and form but by defining a different
action mapping for each, you can define the appropriate input
attribute value for each.

I had to solve a similar problem where it was not practical to
define an action mapping for each use of the form. The form
was basically
a login component which was included on various pages. Because it
could be included on any page and the page could be accessible without
necessarily going through Struts (direct call to the .jsp), then it
wasn't practical ( or possible) to define an action mapping for each
use of the component.

I ended up modifying RequestProcessor.processValidate() where if no
input was defined for the mapping I would look for a value in the
request which would tell me where to forward incase validation failed.

In the form I used a hidden field, 'bookmark', which told me where to
go if the login was successful and where to go if there was a validation
failure.

So I ended up with a single action mapping for processing the form.
The mapping had nothing defined for the input nor did it have any action
forward definitions.

HTH,

robert

> -Original Message-
> From: Richard Tomlinson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 6:04 AM
> To: [EMAIL PROTECTED]
> Subject: multiple input pages, one form definition, one Action - How?
> 
> 
> Having browsed the archives and various docs I cant seem to see a 
> solution to my problem.
> 
> I have a number of pages, all with different html/style but 
> containing the same input fields (Two fields and a submit).  I 
> want to use one form and all pages post to the same action.  My 
> problem is that the validation framework requires the 'input' 
> attribute specified to send control back to the input form.   How 
> do I specify this such that it sends control back to the one of 
> N... pages that submitted the request?
> 
> This is a many pages, one form to one Action problem that, on the 
> surface, is not directly supported as there's a one to one 
> mapping in the config of action against input.As a guess 
> there's probably a kludge way of creating an intermediate Action 
> but what's the best way to achieve this?
> 
> If I've described this correctly has the design problem been 
> addressed for 1.2?
> 
> Thanks
> Richard.
> 
> -
> 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]



J2EE Pattern implementing Classes in Struts

2003-09-23 Thread Kommineni, Sateesh (IndSys)
Hi All,
 
  Can we identify a one to one mapping between the J2EE Patterns and the classes which 
implement these patterns in Struts..

   I tried identifying the Patterns in the Presentation Tier . Let me know your 
thoughts.. 

  
  Intercepting Filters---  Classes Specified using the Plug-in tag in 
struts-config.xml 
  Front Controller---  Action Servlet 
  Context Object  ---   
  View Helper ---  All the tag lib classes that comes with Struts
  Application Controller  ---  Request Processor and Action Classes as Targets
  Dispatcher  ---  Action Forward
  Composite View  ---  This won't be provided as such in the Framework, will 
be used in App
  Dispatcher View ---  
   One of them will be used depending on the context . If 
the Business   processing needs to be done in View 
Helpers use Dispatcher View other wise 
use Service to Worker
  Service to Worker   ---

Thanks in Advance
Sateesh


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



Re: How to build an application that is organized as BC4JToyStore example from scratch ?

2003-09-23 Thread EL AKARI Mehdi
No it does not specify how to build such an application from scratch


- Original Message -
From: "Andrew Kuzmin" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 10:17 AM
Subject: Re: How to build an application that is organized as BC4JToyStore
example from scratch ?


> Maybe this:
>
http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/readme.html
> ?
>
> --
> Andrew Kuzmin
> http://www.java201.com
>
> >- Original Message -
> >From: "EL AKARI Mehdi" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Tuesday, September 23, 2003 1:07 PM
> >Subject: How to build an application that is organized as BC4JToyStore
> example from scratch ?
> >
>
> >Hello,
> >I'm trying to build an application that is organized as the example
> BC4JToyStore, but i just can't!!
> >Can anyone guide me to a tutorial, or a doc?
> >Thank you
> >Mehdi
>
>
> -
> 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: IDE for Struts Examples

2003-09-23 Thread Mohd Amin Mohd Din
Wuhooo! Oracle10g
-Original Message-
From: Duncan Mills [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 5:09 PM
To: Martin Gainty; Struts Users Mailing List
Subject: Re: IDE for Struts Examples

Martin for General JDeveloper 10g issues you'd be better continuing this
on
the OTN forum (http://www.oracle.com/forums/forum.jsp?forum=83) as
little is
relevant to this list. We can pick up there where we leave off..

> Also find that under 10g Projects and Web Tier disappear from the
> File/New/General Menu..
Set the Filter By: to "All Technologies"

> The majority of examples in OTN for Struts are geared towards 9 and I
am
> having great difficulty creating these projects in 10g..
> Is there updated doc for 10g for Struts?
10g is a preview release, existing samples etc relate to the current
production release, but will be updated when the time comes.

Regards

Duncan Mills


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



  1   2   >