Re: [Tokens][2] Where can I find more information....

2002-09-10 Thread Michael Delamere

I think I will do just that.  Mind you, then I´ll redirect everyone to my
page :-P.

Regards,

Michael


- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 4:29 AM
Subject: RE: [Tokens][2] Where can I find more information


 As Mozilla is open source, perhaps you could create an extended version of
 it that supports your requirements and force your users to use that?
 ;-)

 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 09, 2002 22:22
 To: Struts Users Mailing List
 Subject: Re: [Tokens][2] Where can I find more information


 Unfortunately, there isn't always a non-JavaScript solution ;-)  What do
 you do with requirements that can only be implemented with JavaScript?

 Regards :-)

 Eddie

 Michael Delamere wrote:

 I don´t quite agree (sorry) because I want to solve the problem without
 javascript.  I hate javascript and always try to do without it :-)
 
 Regards,
 
 Michael
 



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


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



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




AW: Struts vs Jade

2002-09-10 Thread Juraj Lenharcik

Hi,

in my opinion Jade is really something for webdesigners. I think struts has
a handicap on the view development. There should be a more intensive
cooperation to include the struts taglibt into products like Dreamweaver.
There is a smart support yet, but it doesn't work really. I think the
handling on the view layer has to be improved. I work since 1 year with
struts, but the view layer brings always some problems with. For the view
layer are the features supported by Jade (if really) better.

But I would hear a meaning by someone, who has done something with Jade. I
don't know anyone. 


Juraj




-Ursprüngliche Nachricht-
Von: Miguel Angel Mulero Martinez
[mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 10. September 2002 10:45
An: Lista de correo Struts
Betreff: Struts vs Jade


I have seen in the Jade homepage, a comparative between Struts and Salmon:

http://www.salmonllc.com/website/Jsp/vanity/JadeWhitePaper.jsp?nav=5NavBarI
d=JadeWhitePaper

I've seen the videos of Salmon/Jade and it is interesting, but I think it is
more focused to visual development.

What do you think of Jade?


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

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




RE: I am not able to call a method in the Action Class

2002-09-10 Thread Andrew Hill

Hi Sriram,

What error message are you getting?

You say you are calling the method from the onChange event, so I presume in
the onChange you submit the form ,and then in a method of your action try to
call this other method that doesnt work, OR is this method the one that is
supposed to be invoked on submit (ie: one of your dispatch action 'execute'
methods). In this case you need to ensure that the method parameter (the
actual name of this parameter is defined in your struts-config.xml) is set
correctly to the name of the method you are trying to call (by appending it
to the action url or having it in a hidden form field), and that the
signature of your method is the same as that of the execute method.

-Andrew

-Original Message-
From: Sriram R [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 16:42
To: [EMAIL PROTECTED]
Subject: I am not able to call a method in the Action Class


Hi,

I am not able to call a specific method in the Action class which extends
DispatchAction

I am geeting this problem only if i try to call the action class method
using onChnage event of a dropdown.
Even if i try invoking the the correct method the form values are not
getting passed on to the action class.

Any pointers as to how to do it.

Regards
Sriram R


Regards
Sriram






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


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




Re: Tiles without struts

2002-09-10 Thread Cedric Dumoulin


  Hi,

  You can use Tiles without Struts. If you want also the definition 
capability, you need to initialize the Tiles factory. This can be done 
by using the TilesServlet (as you do). In this case, Tiles factory 
config is specified in web.xml. You don't need the TilesPlugin because 
you don't use Struts.

  Tiles don't support direct forward to a definition name. Definition 
names are logical names. You need to map URLs to definition names. This 
can be done in the servlet associated to the mapping mechanism. Map an 
extension to your servlet, and in the process() method of the servlet, 
do the following:
// Catch the definition name
  String definitionName = ???;
// Get the definition (add appropriate catch)
  ComponentDefinition definition 
= DefinitionsUtil.getDefinition(definitionName, request, 
getServletContext());
// Create new Tiles context, initialized with the definition
  ComponentContext context = new ComponentContext( 
definition.getAttributes() );
// Save context where the tiles will find it
  ComponentContext.setContext( tileContext, request);
 // Include the tiles
  String uri = definition.getPath();
  RequestDispatcher rd = getServletContext().getRequestDispatcher(uri);
  rd.include(request, response);
 
Check the TilesRequestProcessor class to know how it is done with Struts.
  If you have an interesting forward method that can be added to 
TilesServlet and you agree to share it, let us know ...

Hope this help,

   Cedric

Carter, Zach N wrote:

I have a large existing application that uses a common page layout and would
like to use struts tiles.  I do not want to use struts actions and such
because there is already a controller in the application, we would like to
just use the Tiles template mechanism.

From what I've read it seems that we should be able to have the current
forwards, which are mapped in web.xml using url-mappings.  The current pages
were mapped using the extension view.  I am using the latest struts binary
build and tomcat 4.0.  Documentation alludes that you can map urls onto
tiles-defs with the latest release.  At the bottom is the request url I
tried and there was no output given in the console, just and error in the
browser The specified HTTP method is not allowed for the requested resource
(HTTP method GET is not supported by this URL).  Hopefully someone with
more experience in Tiles could point me in the right direction; all I want
is to move our current view url mappings from web.xml into
tiles-definitions.xml and have tiles assemble the pages using a standard
presentation layout.  Thank you for any help you provide.


!-- web.xml --
  servlet-nameaction/servlet-name
servlet-classorg.apache.struts.tiles.TilesServlet/servlet-class 
init-param
  param-namedefinitions-config/param-name
  param-value/WEB-INF/tiles-definitions.xml/param-value
/init-param  
init-param
  param-namedefinitions-debug/param-name
  param-value2/param-value
/init-param  
init-param
  param-namedefinitions-parser-details/param-name
  param-value2/param-value
/init-param  
init-param
  param-namedefinitions-parser-validate/param-name
  param-valuetrue/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param  
load-on-startup2/load-on-startup
  /servlet

  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.view/url-pattern
  /servlet-mapping
  
!-- struts-config.xml --
  struts-config
plug-in className=org.apache.struts.tiles.TilesPlugin 
  set-property property=definitions-config
value=/WEB-INF/tiles-definitions.xml /
  set-property property=definitions-debug  value=2 /
  set-property property=definitions-parser-details  value=2 /
  set-property property=definitions-parser-validate value=true /
/plug-in  
  /struts-config

!-- tiles-definitions.xml --
  tiles-definitions
definition name=mainLayout path=/layout.jsp 
put name=title value=Login /
put name=body  value=/Login.jsp /
/definition
definition name=Login extends=mainLayout 
put name=title value=Login /
put name=body  value=/Login.jsp /
/definition
definition name=LoginConfirm extends=mainLayout 
put name=title value=Main /
put name=body  value=/LoginConfirm.jsp /
/definition
  /tiles-definitions


!-- output from tomcat upon requesting http://localhost/app/Login.view --
Start Tiles initialization
Try to load Tiles factory
factory loaded : {Login={name=Login, path=/layout.jsp, role=null,
controller=null, 

WYSIWYG for Struts?

2002-09-10 Thread Dan Walker

What page design tools are you using with Struts (Frontpage, etc.)?  Does any 
product really handle Struts custom tags well?

Thanks.
-Dan

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




AW: WYSIWYG for Struts?

2002-09-10 Thread Juraj Lenharcik

Dreamweaver provides a support

-Ursprüngliche Nachricht-
Von: Dan Walker [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 10. September 2002 14:32
An: [EMAIL PROTECTED]
Betreff: WYSIWYG for Struts?


What page design tools are you using with Struts (Frontpage, etc.)?  Does
any 
product really handle Struts custom tags well?

Thanks.
-Dan

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

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




Re: AW: WYSIWYG for Struts?

2002-09-10 Thread Cliff Rowley

The only problem I've found with front end support is that although they
can cater for tags - they don't deal with template systems too well.

On Tue, 2002-09-10 at 13:40, Juraj Lenharcik wrote:
 Dreamweaver provides a support
 
 -Ursprüngliche Nachricht-
 Von: Dan Walker [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 10. September 2002 14:32
 An: [EMAIL PROTECTED]
 Betreff: WYSIWYG for Struts?
 
 
 What page design tools are you using with Struts (Frontpage, etc.)?  Does
 any 
 product really handle Struts custom tags well?
 
 Thanks.
 -Dan
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
-- 

Regards

---
 Cliff Rowley| [EMAIL PROTECTED]
 Software Engineer   |   www.doctype.co.uk
 +44 (0) 1206 514263 | www.cliffrowley.com
---


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




Re: WYSIWYG for Struts?

2002-09-10 Thread James Holmes

Struts Console is avery useful tool for managing the
Struts config file:

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Dan Walker [EMAIL PROTECTED] wrote:
 What page design tools are you using with Struts
 (Frontpage, etc.)?  Does any 
 product really handle Struts custom tags well?
 
 Thanks.
 -Dan
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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




Text area question

2002-09-10 Thread Thigpen, David

I've been doing a little Struts evangelization internally here (but no
development yet :-(  )  and I got posed the following question, to which I
have no answer: 

Do you know off-hand if struts provides a way to display dynamic data in a
multi-line textarea?  If so, can you point me in the right direction so I
can see an example?

Thanks

DT


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




Re: [OT] MySQL vs PostgreSQL and SAP DB (was RE: Struts and LargeResultSet)

2002-09-10 Thread Eddie Bush

Peter A. J. Pilgrim wrote:

 Robert J. Sanford, Jr. wrote:

 For my money, or the lack thereof :), I would much rather use 
 PostgreSQL or
 SAP DB than MySQL for both feature AND, believe it or not, performance
 reasons. One of the developers on the SourceForge project did a very 
 nice
 comparison of how SF would run on both MySQL and PostgreSQL and he 
 was very
 surprised at the results. You can read about it at:
 http://www.phpbuilder.com/columns/tim2705.php3. Of course, he was 
 using
 PHP instead of Struts :)

 The article appears to be lauding MySQL features albeit 1999 on
 some speed issues. I definitely miss the subselect SQL syntax which
 is definitely useful with Oracle and Sybase.

 MySQL 4.0 Beta is out and wait for it. Full Text Match capabilities.
 Is this the end of Lucene or eSearch ? No. I like the bit about
 not returning the whole table of data if the query matches more
 than half the number of rows in the database table. 

... I personally think a DBMS should give you what you ask for :-)  I've 
seen enough times when I actually *did* need to pull back that much 
data, that it would really tick me off if my DBMS made such a judgement 
call for me.  That seems quite arrogant to me ... It should be the 
developer's job to determine what comes back; not the DBMS's job.

 As for LargeResultSets I don't think Sybase has rowset limit
 optimisation. Oracle I know a ROWID reverse keyword or is it
 ROWINDEX I cant remember.

PostgreSQL has this functionality too -- and it's ACID-compliant.

 For my own personal work I chose PostgreSQL for several features that
 MySQL - nested queries, views, triggers and stored procedures being the
 biggies. Transactions weren't available with MySQL at the time I made my
 decision but, even with their current level of support for 
 transactions, I
 cannot conceive of doing without the other features, views and stored
 procedures especially.

 And that is why I don't understand Sun's push for MySQL. Are there any
 enterprise level projects (heck, even department level projects) that 
 you
 don't want to use views and stored procedures with?

 Sun's push for MySQL. Where did you read about this ?

 Here's the full story:
 http://news.com.com/2008-1082-947510.html

 rjsjr

 Well ISP / Java WebHoster only support MySQL, so I got no choice. 

You should (generally) be able to get them to provide you with 
PostgreSQL too.  I'd be shocked if it wasn't already installed.  SapDB 
is quite hot nowadays too, from my understanding.  Go with a DBMS that 
passes the ACID test ... unless you honestly think you don't need all 
that stuff.  (I've heard many folks say they don't need an 
ACID-compliant DBMS; I've never understood the statement.  For certain 
confined applications you may not, but overall I think it is [or should 
be] a requirement)

Regards,

Eddie



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




Re: Text area question

2002-09-10 Thread David Graham

Yep, and it's easy.  You use the html:textarea tag.

http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#textarea

Dave


From: Thigpen, David [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts-User (E-mail) [EMAIL PROTECTED]
Subject: Text area question
Date: Tue, 10 Sep 2002 07:43:22 -0600

I've been doing a little Struts evangelization internally here (but no
development yet :-(  )  and I got posed the following question, to which I
have no answer:

Do you know off-hand if struts provides a way to display dynamic data in a
multi-line textarea?  If so, can you point me in the right direction so I
can see an example?

Thanks

DT


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




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: accessing large/multiple files on hard drive

2002-09-10 Thread Eddie Bush

I started to suggest something similar myself.  I know some people find 
it easier to optimize such things.  One nice thing:  You could relocate 
it to a different *server* entirely, if that need arose... and have it 
seperate; dedicated to serving the media.

Regards,

Eddie

[EMAIL PROTECTED] wrote:

This has got to be a candidate for the worst, messiest solution ever...

Worse comes to worse, you could have two applications... one that holds
and serves up the mp3 files and the other that does all the other
work...

I'm sure there is a hole a mile wide in this idea...




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




RE: Runtime Exception: Cannot find message resources under key (S trut s 1.1 B2 with WebLogic 6.1 SP2)

2002-09-10 Thread John Yu


Sounds like the sub-app context was not setup correctly.

I suppose you got the error in the JSP. Did you front the JSP with a 
sub-app Action? If not, the JSP won't have the sub-app context and 
everything to do with sub-app won't work.


At 05:25 am 10-09-2002, you wrote:
I solved my own problem here.  What I had to was move the declaration of the
messages-resources from the Struts Config sub-application file (i.e.
Struts-Config-Login.xml) to the default Struts Config file (i.e.
Struts-Config.xml).  Since I was planning on making every module a
sub-application, I originally had a blank Struts-config.xml file with just
the following:

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
   http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

struts-config

/struts-config




To fix my problem, my Struts-Config.xml now looks like the following:

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
   http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

struts-config

   message-resources key=LOGIN_MESSAGES_KEY
  parameter=com.erac.training.LoginMessages
  null=true/


/struts-config

-Original Message-
From: Hohlen, John
Sent: Wednesday, September 04, 2002 9:52 AM
To: Struts-Help (E-mail)
Subject: Runtime Exception: Cannot find message resources under key
(Strut s 1.1 B2 with WebLogic 6.1 SP2)


I'm migrating my web application from Struts 1.0 to Struts 1.1 (B2).  I'm
trying to take advantage of the mutiple sub-applications functionality in
1.1.  I've created a separate a Struts config file for each sub-application.
I've also created a separate message resource files for each sub
application.  I'm currently getting a runtime exception due to the message
resource file not being found under the specified key.  I'm using  WebLogic
6.1 (SP 2).  I've placed the message resource file under the
classes\com\abc\training directory. Does anyone have any ideas on what my
problem might be?  Thanks, JOHN

  web.xml (sniplet) -
   init-param
 param-nameconfig/login/param-name
 param-value/WEB-INF/struts-config-login.xml/param-value
   /init-param
   init-param
 param-nameconfig/training/param-name
 param-value/WEB-INF/struts-config-training.xml/param-value
   /init-param

  Struts-Config-Login.xml (sniplet) -

   message-resources key=LOGIN_MESSAGES_KEY
  parameter=com.abc.training.LoginMessages
  null=false/

- Runtime Exception --
javax.servlet.ServletException: Cannot find message resources under key
LOGIN_MESSAGES_KEY
 at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:256)
 at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
14)
 at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:417)
 at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
sor.java:390)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
 at
com.erac.fleetsystems.strutsx.FleetSystemsServlet.process(FleetSystemsServle
t.java:178)
 at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
 at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
 at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

-- 
John Yu   Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - Don't develop Struts Apps without it!
Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.


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




RE: accessing large/multiple files on hard drive

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


DropDown-Selects

2002-09-10 Thread Fabian Sommer

Hello folks!

I got a problem that´s perhaps noch struts-specific:

If I create a struts-html-select within a form with a size of 1, I
expect to get a dropdown-list. Self-html describes this as the
standard-behaviour. But when I have a look at my jsp I find a normal
select-field with the size 1 and when I use the scroll-elements to its
right, I just can scroll through my options, showing only one while I
was hoping that there appears a dropdown-list when I click on the
scroll-elements?
Is this normal behaviour?
And if so, how to create dropdown-lists within struts-forms?
Thanks, Fabian Sommer



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




Question about multiple Validation XML files?

2002-09-10 Thread Declan O'Shanahan (CAPE)

Hi there,

I am slowly trying to migrate my application to use the Struts Validation
framework. As part of this validation I need to be able to create separate
validation XML files. I have seen that there is an existing bug against the
commons-validator package
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10584 that prevents
multiple validation xml files being used. I was wondering if anybody knows
when this problem will be fixed or if anybody else has come up with a way to
get around it (other than lumping everything in to a single XML file). Your
help would be appreciated.

Regards,

Declan.



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




RE: Question about multiple Validation XML files?

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


RE: DropDown-Selects

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


RE: DropDown-Selects

2002-09-10 Thread Irwin, Chris

You'll have to specify something like this:

 html:select property=categories size=1
  html:options collection=Categories_Collection property=value 
labelProperty=label/
  /html:select

Is what you're doing?  I see a pulldown list with more than one value displayed at 
once.


  -Original Message-
 From: [EMAIL PROTECTED]@AFG   On Behalf Of Fabian Sommer [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 10:12 AM
 To:   [EMAIL PROTECTED]
 Subject:  DropDown-Selects
 
 Hello folks!
 
 I got a problem that´s perhaps noch struts-specific:
 
 If I create a struts-html-select within a form with a size of 1, I
 expect to get a dropdown-list. Self-html describes this as the
 standard-behaviour. But when I have a look at my jsp I find a normal
 select-field with the size 1 and when I use the scroll-elements to its
 right, I just can scroll through my options, showing only one while I
 was hoping that there appears a dropdown-list when I click on the
 scroll-elements?
 Is this normal behaviour?
 And if so, how to create dropdown-lists within struts-forms?
 Thanks, Fabian Sommer
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



RE: DropDown-Selects

2002-09-10 Thread Fabian Sommer

Sorry, please ignore my message from a minute ago:
Found another mistyped attribute in my select-definition that caused my
browsers not to render correctly my jsp...
(when entered in html:select 'multiple=false' the html-code-result
displays 'multiple=multiple' - is this the expected behaviour?)


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 4:12 PM
 To: [EMAIL PROTECTED]
 Subject: DropDown-Selects
 
 Hello folks!
 
 I got a problem that´s perhaps noch struts-specific:
 
 If I create a struts-html-select within a form with a size of 1, I
 expect to get a dropdown-list. Self-html describes this as the
 standard-behaviour. But when I have a look at my jsp I find a normal
 select-field with the size 1 and when I use the scroll-elements to its
 right, I just can scroll through my options, showing only one while I
 was hoping that there appears a dropdown-list when I click on the
 scroll-elements?
 Is this normal behaviour?
 And if so, how to create dropdown-lists within struts-forms?
 Thanks, Fabian Sommer
 
 
 
 --
 To unsubscribe, e-mail:   mailto:struts-user-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:struts-user-
 [EMAIL PROTECTED]


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




Security and Struts

2002-09-10 Thread Darren Hill

Hey all,

I'm looking for a job document and example about best practices in
implementing security in struts.
I've got the general idea about placing all my JSP's under WEB-INF, but a
doc/example might really solidify it for me.  Thanks in advance.

Darren.

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




jndi as a data source

2002-09-10 Thread Vincent Stoessel

Hello All,
I'm cuurently searching but can't seem to find a page with an example
jndi example for struts. I have to build a quick demo app for the suits. :)
Any pointers or clue bricks will be appreciated.
Thanks in advance.


-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Tokens][2] Where can I find more information....

2002-09-10 Thread Eddie Bush

LOL!  That's ... that's ... LOL :-)  Thanks for the good laugh ;-)

Andrew Hill wrote:

As Mozilla is open source, perhaps you could create an extended version of
it that supports your requirements and force your users to use that?
;-)




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




Re: [OT] RE: Struts and Large ResultSet

2002-09-10 Thread Ashish Kulkarni

Hi Dave,
this querry only works for first 30 fields, but what
if i want to get data from 31 to 60, then either i
have to have the key for 31 record, or else i will
have to run the querry twice, first to get the first
30 and then the next 30 after setting the key..
i have nottired getting the next 30 records, but this
querry work on as400 i have tried it before
Ashish
--- David Graham [EMAIL PROTECTED] wrote:
 The databases all have their own version of this
 feature :-( so in SQL 
 Server it's:
 
 select top 10 from table
 
 which makes the most sense to me.  But, in DB2 you
 use a fetch first 
 clause like this:
 
 select * from table
 fetch first 30 rows only
 
 Here's where I found the info

http://nscpcw.physics.upenn.edu/db2_docs/db2s0/fet1st.htm#HDRFET1ST
 
 I tried it out on a db2 7.2 database on win2k so
 hopefully it works on 
 AS400.
 
 Dave
 
 From: Ashish Kulkarni [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Subject: Re: [OT] RE: Struts and Large ResultSet
 Date: Mon, 9 Sep 2002 16:02:00 -0700 (PDT)
 
 Hi,
 I am developing an web interface to existing AS400
 system, so there is no way i can go to MYSQL or
 suggest to change database, i have to live with
 AS400
 and DB2 and try to find a way out
 thanx for suggestion
 
 --- Peter A. J. Pilgrim
 [EMAIL PROTECTED] wrote:
   Ashish Kulkarni wrote:
Hi,
But is there a way to write some thing, which
 is
database independent, so u can change the
 database
without any code modification,
what i am trying it using CachedRowSet, i load
 the
resultset into a cachedrowset and then display
 it
   page
by page,
now only think i have to figure is, how can i
 load
only few records in this rowset, like if i
 have 1
million records, just load say 1000 records,
   iterate
through them, if u reach end of cache load
 another
1000, and so,
since a user will never go through a process
 of
   seeing
million records at a time, may be 1000 the
 max...
most user will use some thing like Go To to
   point at
a specific record in database,
I hope this thing works out well
Ashish
  
  
   Then you need something like MYSQL which has
 special
   reserved word to help you limit the size of the
   results.
  
   SELECT LAST_NAME, FIRST_NAME, DEPT FROM
   COMPANY_EMPLOYEES
   ORDER BY LAST_NAME
   GROUP BY DEPT
   LIMIT offset, number-of-rows
  
   The LIMIT word get you a finite rowset
 limitation
   efficiently on the Database server side. Without
   this
   you may have to read the entire data set out of
 the
   database. Say you only interested in rows 30 to
 40
   then you discard 30 rows already as in normal
 JDBC
   programming and then kill off the query and
 result
   after reading row 439.  Suppose the database
 table
   has 1 rows, then the database server may in
   efficient
   allocate the time and memory for 1000 rows to
 read
   by the client. But you stopped on row 40, what
   a waste with 960 unused records!
  
   So in a nutshell go with MYSQL
  
   SELECT CASH_IN, CASH_OUT, INVOICE, CUSTOMER
 FROM BOOK_BALANCE
 LIMIT 30, 10
  
   a la google.com
  
   Or I think Oracle my have ROWINDEX attribute.
  
   ROWINDEX = 30 and ROWINDEX  40.
  
   Sybase and Postgres I dunno.
  
   --
   Peter Pilgrim +-\ +-+++++
   Java Technologist | | | |||||
 'n'
   Shine
  |  O  | | ||  --+| ---+
/\| ._  / | | \  \ ||
   /  \   | | \ \ | |+--  || ---+ A
 new
   day
  /_  _\  Up| | | | | |||||
 is
   coming
||+-+ +-+ +-+++++
   home page=http://www.xenonsoft.demon.co.uk/;
 /
  
  
   --
   To unsubscribe, e-mail:
  
 mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
 
 
 =
 A$HI$H
 
 __
 Do You Yahoo!?
 Yahoo! Finance - Get real-time stock quotes
 http://finance.yahoo.com
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 

_
 Join the world’s largest e-mail service with MSN
 Hotmail. 
 http://www.hotmail.com
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


=
A$HI$H

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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




NullPointerException while extending DynaValidatorForm

2002-09-10 Thread Jan Fetyko

Hi all,

I have a problem setting values of a form in my action.
The form extends the org.apache.struts.validator.DynaValidatorForm. 
The struts-config.xml defines all the properties of the form except 2, 
that are defined in the actual Java source of the form.

This is the error I'm getting :

java.lang.NullPointerException
at 
org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:551)


In struts config I have :

form-bean name=CustomerForm type=com.forms.CustomerForm
form-property name=cid type=java.lang.String/
/form-bean

The action is trying to set the property of the form :

form = new CustomerForm();
CustomerForm cf = (CustomerForm) form;
cf.set(cid, customer.getCid()); // THIS iS WHERE IT ERRORS OUT.



Any ideas what I'm doing wrong ?

Jf


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




Re: How to user logic:iterate[MORON]

2002-09-10 Thread Ted Husted

Without the taglib statement, the tag is completely ignored, as if it 
wasn't there. The JSP service assumes it's a HTML tag, and the browsers 
silently swallow anything they don't understand. C'est la vive.

-T.

Michael Lee wrote:

 I would like to thank everyone on this email list that helped out. Every
 little bit helped including the property attribute on iterate and that
 logic:present is very handy.
 The main problem though was a complete brain fart on my part.
 I am moron, hear me roar.
 I forgot to include the tag lib import for logic. The thing I dont
 understand is how it even go to the bean:write tag inside the iterate and
 failed there?
 Oh well, if you ever get an error message like I did, don't run around like
 a chickend with your head chopped off, just include this line at the top of
 the jsp...
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 
 AAA, I hate stupid mistakes that waste everyone's time!!!
 Mike
 :(
 
 
 - Original Message -
 From: John Yu [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Monday, September 09, 2002 10:20 PM
 Subject: Re: How to user logic:iterate
 
 
 
Option 1:

In Action,

   request.setAttribute(myUsers, users); // no need to call getUsers()

In JSP,

   logic:present name=myUsers
 logic:iterate id=aUser name=myUsers property=users
scope=request
 tr
   tdbean:write name=aUser property=userID//td
   tdbean:write name=aUser property=userType//td
   tdbean:write name=aUser property=fName//td
   tdbean:write name=aUser property=mName//td
   tdbean:write name=aUser property=lName//td
   tdbean:write name=aUser property=accoundDisabled//td
   tdbean:write name=aUser property=email//td
 /tr
 /logic:iterate
   /logic:present

Option 2:

Use your existing code, but get rid of the user. part from the property
of the bean:write tags.

At 04:55 am 10-09-2002, you wrote:

Im having a helluva time getting logic:iterate to work..
I have a Users object that contains an array list of
User objects.
you call Users.getUsers() and it returns an arrayList
I stick that in the request object in the perform() method using
request.setAttribute(users, users.getUsers());
In the JSP the code I have is;

 % ArrayList users = (ArrayList) request.getAttribute(users);
   if(users != null)
   {%
logic:iterate name=users id=aUser scope=request
tr
  tdbean:write name=aUser property=user.userID//td
  tdbean:write name=aUser property=user.userType//td
  tdbean:write name=aUser property=user.fName//td
  tdbean:write name=aUser property=user.mName//td
  tdbean:write name=aUser property=user.lName//td
  tdbean:write name=aUser

 property=user.accoundDisabled//td
 
  tdbean:write name=aUser property=user.email//td
/tr
/logic:iterate
%}%

The error I'm getting is;

Sep 9, 2002 4:52:00 PM EDT Error HTTP
[WebAppServletContext(4398493,recei
ptsplus,/receiptsplus)] Root cause of ServletException
javax.servlet.jsp.JspException: Cannot find bean aUser in scope null
at

 org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
 
at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)
at
jsp_servlet.__advanced_user_search._jspService(__advanced_user_search
.java:1541)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)

what am I doing wrong?
help!
thanks,
Mike

--
John Yu   Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - Don't develop Struts Apps without it!
Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.


--
To unsubscribe, e-mail:

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

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


-- 
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:
http://husted.com/struts/book.html


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




Re: Security and Struts

2002-09-10 Thread Michael Lee

They have a good login example in the example war in the struts/webapps dir.
That's the way I've done it in the past. The way I'm currently doing it is
to use container managed security. This means NOT using struts for
authorization/authentication (for J2EE security). Since your using JSP your
probably gonna do form base authentication so just post your form to
action=j_security_check and make sure your form username and password
fields are j_username and j_password appropriately. Check your container
documentation for how to hook this into its security model.
I'm currently actually having a problem with this in that I need for the
user information to be stored in the session at login. I may just put a tag
at the top of every page but that seems to get rid of the 'niceties' of
using J2EE security. I want to set the locale based upon the loaded user
object. Problem is, it goes right to the requested jsp page after login
without loading the user and his preferences. Not sure how I'm going to
handle this but in the mean time, that is how I handle security.
Mike


- Original Message -
From: Darren Hill [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 10:24 AM
Subject: Security and Struts


 Hey all,

 I'm looking for a job document and example about best practices in
 implementing security in struts.
 I've got the general idea about placing all my JSP's under WEB-INF, but a
 doc/example might really solidify it for me.  Thanks in advance.

 Darren.

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


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




Recognizing Cancel Button over Submit Button

2002-09-10 Thread Cohan, Sean

I am sure this a newbie question, but how can I determine that the cancel
button (html:cancel) was clicked instead of the submit button (html:submit)
using an html:form.  They both end up in the same method of my
DispatchAction?  Thanks.

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




Re: [OT] RE: Struts and Large ResultSet

2002-09-10 Thread David Graham

Here's how you would grab the next set of values:
select id, field1, fieldn
from table
where id  cur_value
order by id
fetch first 30 rows only

You would put a number in for cur_value like 30 to get the second set of 30 
records.  If you don't want to run that query each time, just query the 
whole table and put the primary keys into a List object in the user's 
session.  When the user wants the next set of values you query the table 
using an appropriate subset of the primary keys you stored in the session.

These are your 2 best bets.
Dave

Hi Dave,
this querry only works for first 30 fields, but what
if i want to get data from 31 to 60, then either i
have to have the key for 31 record, or else i will
have to run the querry twice, first to get the first
30 and then the next 30 after setting the key..
i have nottired getting the next 30 records, but this
querry work on as400 i have tried it before
Ashish
--- David Graham [EMAIL PROTECTED] wrote:
  The databases all have their own version of this
  feature :-( so in SQL
  Server it's:
 
  select top 10 from table
 
  which makes the most sense to me.  But, in DB2 you
  use a fetch first
  clause like this:
 
  select * from table
  fetch first 30 rows only
 
  Here's where I found the info
 
http://nscpcw.physics.upenn.edu/db2_docs/db2s0/fet1st.htm#HDRFET1ST
 
  I tried it out on a db2 7.2 database on win2k so
  hopefully it works on
  AS400.
 
  Dave
 
  From: Ashish Kulkarni [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List
  [EMAIL PROTECTED]
  To: Struts Users Mailing List
  [EMAIL PROTECTED]
  Subject: Re: [OT] RE: Struts and Large ResultSet
  Date: Mon, 9 Sep 2002 16:02:00 -0700 (PDT)
  
  Hi,
  I am developing an web interface to existing AS400
  system, so there is no way i can go to MYSQL or
  suggest to change database, i have to live with
  AS400
  and DB2 and try to find a way out
  thanx for suggestion
  
  --- Peter A. J. Pilgrim
  [EMAIL PROTECTED] wrote:
Ashish Kulkarni wrote:
 Hi,
 But is there a way to write some thing, which
  is
 database independent, so u can change the
  database
 without any code modification,
 what i am trying it using CachedRowSet, i load
  the
 resultset into a cachedrowset and then display
  it
page
 by page,
 now only think i have to figure is, how can i
  load
 only few records in this rowset, like if i
  have 1
 million records, just load say 1000 records,
iterate
 through them, if u reach end of cache load
  another
 1000, and so,
 since a user will never go through a process
  of
seeing
 million records at a time, may be 1000 the
  max...
 most user will use some thing like Go To to
point at
 a specific record in database,
 I hope this thing works out well
 Ashish
   
   
Then you need something like MYSQL which has
  special
reserved word to help you limit the size of the
results.
   
SELECT LAST_NAME, FIRST_NAME, DEPT FROM
COMPANY_EMPLOYEES
ORDER BY LAST_NAME
GROUP BY DEPT
LIMIT offset, number-of-rows
   
The LIMIT word get you a finite rowset
  limitation
efficiently on the Database server side. Without
this
you may have to read the entire data set out of
  the
database. Say you only interested in rows 30 to
  40
then you discard 30 rows already as in normal
  JDBC
programming and then kill off the query and
  result
after reading row 439.  Suppose the database
  table
has 1 rows, then the database server may in
efficient
allocate the time and memory for 1000 rows to
  read
by the client. But you stopped on row 40, what
a waste with 960 unused records!
   
So in a nutshell go with MYSQL
   
SELECT CASH_IN, CASH_OUT, INVOICE, CUSTOMER
  FROM BOOK_BALANCE
LIMIT 30, 10
   
a la google.com
   
Or I think Oracle my have ROWINDEX attribute.
   
ROWINDEX = 30 and ROWINDEX  40.
   
Sybase and Postgres I dunno.
   
--
Peter Pilgrim +-\ +-+++++
Java Technologist | | | |||||
  'n'
Shine
   |  O  | | ||  --+| ---+
 /\| ._  / | | \  \ ||
/  \   | | \ \ | |+--  || ---+ A
  new
day
   /_  _\  Up| | | | | |||||
  is
coming
 ||+-+ +-+ +-+++++
home page=http://www.xenonsoft.demon.co.uk/;
  /
   
   
--
To unsubscribe, e-mail:
   
  mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
   
  
  
  =
  A$HI$H
  
  __
  Do You Yahoo!?
  Yahoo! Finance - Get real-time stock quotes
  http://finance.yahoo.com
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
 
 
_
  Join 

Re: [OT] RE: Struts and Large ResultSet

2002-09-10 Thread Ashish Kulkarni

Hi Dave,
thanx for the solution, but i guess first one is okay,
for me, since if i keep the primary keys in list and
store it in user session, then it may be a problem if
some one else, deletes a record from database. since
the same database will be used by may user, i dont
want to check for each record while loading from
database,
Ashish
--- David Graham [EMAIL PROTECTED] wrote:
 Here's how you would grab the next set of values:
 select id, field1, fieldn
 from table
 where id  cur_value
 order by id
 fetch first 30 rows only
 
 You would put a number in for cur_value like 30 to
 get the second set of 30 
 records.  If you don't want to run that query each
 time, just query the 
 whole table and put the primary keys into a List
 object in the user's 
 session.  When the user wants the next set of values
 you query the table 
 using an appropriate subset of the primary keys you
 stored in the session.
 
 These are your 2 best bets.
 Dave
 
 Hi Dave,
 this querry only works for first 30 fields, but
 what
 if i want to get data from 31 to 60, then either i
 have to have the key for 31 record, or else i will
 have to run the querry twice, first to get the
 first
 30 and then the next 30 after setting the key..
 i have nottired getting the next 30 records, but
 this
 querry work on as400 i have tried it before
 Ashish
 --- David Graham [EMAIL PROTECTED] wrote:
   The databases all have their own version of this
   feature :-( so in SQL
   Server it's:
  
   select top 10 from table
  
   which makes the most sense to me.  But, in DB2
 you
   use a fetch first
   clause like this:
  
   select * from table
   fetch first 30 rows only
  
   Here's where I found the info
  

http://nscpcw.physics.upenn.edu/db2_docs/db2s0/fet1st.htm#HDRFET1ST
  
   I tried it out on a db2 7.2 database on win2k so
   hopefully it works on
   AS400.
  
   Dave
  
   From: Ashish Kulkarni
 [EMAIL PROTECTED]
   Reply-To: Struts Users Mailing List
   [EMAIL PROTECTED]
   To: Struts Users Mailing List
   [EMAIL PROTECTED]
   Subject: Re: [OT] RE: Struts and Large
 ResultSet
   Date: Mon, 9 Sep 2002 16:02:00 -0700 (PDT)
   
   Hi,
   I am developing an web interface to existing
 AS400
   system, so there is no way i can go to MYSQL or
   suggest to change database, i have to live with
   AS400
   and DB2 and try to find a way out
   thanx for suggestion
   
   --- Peter A. J. Pilgrim
   [EMAIL PROTECTED] wrote:
 Ashish Kulkarni wrote:
  Hi,
  But is there a way to write some thing,
 which
   is
  database independent, so u can change the
   database
  without any code modification,
  what i am trying it using CachedRowSet, i
 load
   the
  resultset into a cachedrowset and then
 display
   it
 page
  by page,
  now only think i have to figure is, how
 can i
   load
  only few records in this rowset, like if i
   have 1
  million records, just load say 1000
 records,
 iterate
  through them, if u reach end of cache load
   another
  1000, and so,
  since a user will never go through a
 process
   of
 seeing
  million records at a time, may be 1000 the
   max...
  most user will use some thing like Go To
 to
 point at
  a specific record in database,
  I hope this thing works out well
  Ashish


 Then you need something like MYSQL which has
   special
 reserved word to help you limit the size of
 the
 results.

 SELECT LAST_NAME, FIRST_NAME, DEPT FROM
 COMPANY_EMPLOYEES
 ORDER BY LAST_NAME
 GROUP BY DEPT
 LIMIT offset, number-of-rows

 The LIMIT word get you a finite rowset
   limitation
 efficiently on the Database server side.
 Without
 this
 you may have to read the entire data set out
 of
   the
 database. Say you only interested in rows 30
 to
   40
 then you discard 30 rows already as in
 normal
   JDBC
 programming and then kill off the query and
   result
 after reading row 439.  Suppose the database
   table
 has 1 rows, then the database server may
 in
 efficient
 allocate the time and memory for 1000 rows
 to
   read
 by the client. But you stopped on row 40,
 what
 a waste with 960 unused records!

 So in a nutshell go with MYSQL

 SELECT CASH_IN, CASH_OUT, INVOICE, CUSTOMER
   FROM BOOK_BALANCE
   LIMIT 30, 10

 a la google.com

 Or I think Oracle my have ROWINDEX
 attribute.

 ROWINDEX = 30 and ROWINDEX  40.

 Sybase and Postgres I dunno.

 --
 Peter Pilgrim +-\
 +-+++++
 Java Technologist | | | ||||   
 |
   'n'
 Shine
|  O  | | ||  --+|
 ---+
  /\| ._  / | | \  \ |   
 |
 /  \   | | \ \ | |+--  ||
 ---+ A
   new
 day
/_  _\  Up| | | | | ||||   
 |
   is
 coming
  ||+-+ +-+
 

No Action Instance - Deploying on WAS 4.0.2

2002-09-10 Thread Shashikiran M

Hi All,

The ear file created was successfully deployed on WAS 4.0.2 and also the
Struts-Config.xml file was loaded.

But, when trying to invoke one of the Action class it says No Action
Instance.

Please Help.

--Shashi.

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




Re: [BOOK] Mastering Jakarta Struts review?

2002-09-10 Thread Bryan Hilterbrand

Did you keep a list of errata?  It would be helpful to us newbies if
the errata list was posted to this mailing list.

Bryan

P.S. Thanks for the review!

- Original Message -
From: Galbreath, Mark [EMAIL PROTECTED]
To: 'Martin Cooper' [EMAIL PROTECTED]
Cc: Struts (E-mail) [EMAIL PROTECTED]
Sent: Monday, September 09, 2002 12:23 PM
Subject: RE: [BOOK] Mastering Jakarta Struts review?


heh-heh...I actually got half-way through on Saturday (in spite of bad
hangover) but my wife confronted me with a 'honeydo' list Sunday morning as
we had her folks over for Grandparents Day (and to watch Sampras v. Agassi).

I am not just reading it, but going through all the prerequisites and each
of the examples to make sure they work.  The early bad news is that there
are a number of mistakes and omissions that will confuse new Java
server-side developers that experienced programmers will simply ignore; the
good news is that it is very readable and the sections on the client-side
(esp. custom tags) was pretty well done (not surprising since he already
wrote a book on them - which he shamelessly plugs). Also, the Tomcat 4.x
install/config was, with minor exceptions, straightforward (I haven't used
Tomcat since 3.2, so I could be considered a novice).  I want to give you
guys the best review possible (and I'll copy it to Amazon.com).

I'll do my best to complete it and post the results sometime this week.

Mark

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 2:01 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Mastering Jakarta Struts review?


Waiting to read that review... ;-)

--
Martin Cooper


 -Original Message-
 From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 05, 2002 1:00 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Mastering Jakarta Struts review?


 I posted some comments about it this morning - see archive.  I've read
 Chuck's draft and I plan to read James' this weekend and will
 let you know
 what I think Monday.  I know nothing about Ted's book, though I've
 preordered both his and Chuck's.

 Mark

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 05, 2002 3:39 PM
 To: [EMAIL PROTECTED]
 Subject: Mastering Jakarta Struts review?


 As this book is now available from amazon , can anyone
 provide a review?
 Will it fit with Chucks and Ted's on the same shelf?  Should I wait?


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

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



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




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




Re: Recognizing Cancel Button over Submit Button

2002-09-10 Thread Ashish Kulkarni

u can use LookupDispatchAction to find out which
button has been clicked
see struts1.1-b2 documentation where they haev an
example 
--- Cohan, Sean [EMAIL PROTECTED] wrote:
 I am sure this a newbie question, but how can I
 determine that the cancel
 button (html:cancel) was clicked instead of the
 submit button (html:submit)
 using an html:form.  They both end up in the same
 method of my
 DispatchAction?  Thanks.
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


=
A$HI$H

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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




RE: jndi as a data source

2002-09-10 Thread Galbreath, Mark

JNDI operates through your container environment, not Struts.  You can get
that information from your app server's docs (specifically) or from
java.sun.com (generally). What, specifically do you need to know?

Mark

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:26 AM
To: Struts Users
Subject: jndi as a data source


Hello All,
I'm cuurently searching but can't seem to find a page with an example
jndi example for struts. I have to build a quick demo app for the suits. :)
Any pointers or clue bricks will be appreciated.
Thanks in advance.


-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com

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




RE: Improving performance by splitting JSP?

2002-09-10 Thread JEWeaver


I had to go back and look at the test code we used, but yes - looks like we
did try a non-body tag.  It did a hashtable lookup for whatever key values
was passed in as a parameter.  I remember we found that we could only
recreate the performance discrepancy with tags that did some kind of memory
lookup; just adding loops around arithmetic statements are writing output
were tried, but did not exhibit the symptoms.

Jim Weaver
Software Developer - ThoughtWorks


   

  Martin Cooper  

  martin.cooper@tumbTo:   'Struts Users Mailing 
List' [EMAIL PROTECTED]  
  leweed.comcc:   

 Subject:  RE: Improving performance 
by splitting JSP? 
  09/09/2002 05:24 PM  

  Please respond to

  Struts Users

  Mailing List

   

   







 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 09, 2002 2:51 PM
 To: Struts Users Mailing List
 Subject: RE: Improving performance by splitting JSP?



 Yup, we looked at overall size of the JSP as well, and the
 association with
 performance was definitely number of bm/bw tags within a
 single JSP rather
 than overall JSP size.  We even tried editing the generated
 servlet code
 and adding big unused methods to see if the problem had to do with
 generated servlet file size.  That would kind've made sense, but was a
 negative.  I believe we also tried a tag that just did a
 sysout rather than
 any kind of memory lookup (hashtable or properties file) and
 found that
 this performance quirk in the sun vm did not appear in that case.

When you wrote your own tags (the message/write equivalents, I mean), did
you happen to play with body versus non-body tags? When I was wrestling
with
the too many tags problem a while ago, I ended up writing my own versions
of some of the Struts tags so that they were non-body tags, because they
caused noticeably less code to be generated. I didn't measure performance
differences, but I wouldn't be surprised to see a noticeable improvement
there too.

--
Martin Cooper



 We could never pin down a why, it seemed that the sun 1.3 vm
 just ran like
 a snail with a lot of bm or bw tags in a single page, so we
 stopped doing
 that ;-).  Same number of tags split up into multiple JSPs,
 or a few tags
 called the same number of times via a loop - OK performance.

 It is very true also that splitting them up into smaller
 bites makes them
 more readable and maintainable, so it was a good solution all
 around.  It's
 just that you are always nervous when you fix a problem and
 don't know the
 why of it ;-).

 Jimbo



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




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







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




RE: Security and Struts

2002-09-10 Thread Hemanth Setty

You could try using Filters. I am not sure if it will fit your needs but,
using a servlet filter will
eliminate the need to extend dispatch action just for audit trails.
-hemanth

-Original Message-
From: alex hun [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:53 AM
To: Struts Users Mailing List
Subject: Re: Security and Struts


Any recommendation to implementing audit trial under the struts frame work?
I was hoping to pushed the audit trail as backend as possible, if possible
invisible at the Action layer.  Did look into do it under either the a class
extending from Dispatch action and have the other class extending it.
However
another colleague of my was proposing to try out the forwardactionmap.
Any good practices/design that i can adopt?


Michael Lee wrote:

 They have a good login example in the example war in the struts/webapps
dir.
 That's the way I've done it in the past. The way I'm currently doing it is
 to use container managed security. This means NOT using struts for
 authorization/authentication (for J2EE security). Since your using JSP
your
 probably gonna do form base authentication so just post your form to
 action=j_security_check and make sure your form username and password
 fields are j_username and j_password appropriately. Check your container
 documentation for how to hook this into its security model.
 I'm currently actually having a problem with this in that I need for the
 user information to be stored in the session at login. I may just put a
tag
 at the top of every page but that seems to get rid of the 'niceties' of
 using J2EE security. I want to set the locale based upon the loaded user
 object. Problem is, it goes right to the requested jsp page after login
 without loading the user and his preferences. Not sure how I'm going to
 handle this but in the mean time, that is how I handle security.
 Mike

 - Original Message -
 From: Darren Hill [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 10:24 AM
 Subject: Security and Struts

  Hey all,
 
  I'm looking for a job document and example about best practices in
  implementing security in struts.
  I've got the general idea about placing all my JSP's under WEB-INF, but
a
  doc/example might really solidify it for me.  Thanks in advance.
 
  Darren.
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 

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


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


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




Using global forwards to tile definitions?

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


[OT] Load-Testing

2002-09-10 Thread Eddie Bush

I know different solutions have been presented for this ... and I keep 
all messages from the list ... but I can't seem to find any of them 
right now :-(

Could someone rehash for me on what's available for load-testing?  The 
MS tool springs to mind as somthing I should examine, but I can't find 
the danged thing.

Thanks!

Eddie



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




alternating row colors in the iterate tag.

2002-09-10 Thread Nani Jon


Hi all:

Is there a way to alternate row background colors within an logic:iterate  tag? 
I was able to do it using java scriplet. The problem is the value of the varaible 
rowColor shows up on the JSP. Here is a snippet of the code in the JSP page:

html

..

% 
 String rowColor = #ff;
 String prevColor = #ff; 
 String nextColor = #cc; 
%

 ...

...

logic:iterate id=instance name=main property=mainInfo.titleCollection  
type=com.acs.backend.dao.MusicDAO   
tr bgcolor=%=rowColor%

td../td
 /tr  
   
  % if (rowColor == prevColor) { %
  %=rowColor = nextColor%
  % } else { %
  %=rowColor=prevColor%
  % } %
   
  /logic:iterate
  

 



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


Re: [OT] Load-Testing

2002-09-10 Thread chuckcavaness

Eddie,

Take a look at the performance chapter from my book. I 
list many of the tools and give links to them.

Chuck
 I know different solutions have been presented for this ... and I keep 
 all messages from the list ... but I can't seem to find any of them 
 right now :-(
 
 Could someone rehash for me on what's available for load-testing?  The 
 MS tool springs to mind as somthing I should examine, but I can't find 
 the danged thing.
 
 Thanks!
 
 Eddie
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 

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




RE: [OT] Load-Testing

2002-09-10 Thread Jason Rosen

The MS one is the Microsoft Web Application Stress Tool - not bad for
client side simulation load testing.
http://webtool.rte.microsoft.com/


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 9:03 AM
To: Struts Users List
Subject: [OT] Load-Testing


I know different solutions have been presented for this ... and I keep 
all messages from the list ... but I can't seem to find any of them 
right now :-(

Could someone rehash for me on what's available for load-testing?  The 
MS tool springs to mind as somthing I should examine, but I can't find 
the danged thing.

Thanks!

Eddie



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

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




Re: [OT] Load-Testing

2002-09-10 Thread Eddie Bush

Thanks, Chuck - will do!  (I guess I must have *embarrassed look* missed 
that part)

[EMAIL PROTECTED] wrote:

Eddie,

Take a look at the performance chapter from my book. I 
list many of the tools and give links to them.

Chuck

I know different solutions have been presented for this ... and I keep 
all messages from the list ... but I can't seem to find any of them 
right now :-(

Could someone rehash for me on what's available for load-testing?  The 
MS tool springs to mind as somthing I should examine, but I can't find 
the danged thing.

Thanks!

Eddie




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




RE: AW: WYSIWYG for Struts?

2002-09-10 Thread Sandra Cann

Here's the url - www.objectventure.com 

Fyi his name is Bill Willis

 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, September 10, 2002 9:51 AM
 To: Struts Users Mailing List
 Subject: Re: AW: WYSIWYG for Struts?
 
 
 I think (and could be wrong) that Object Assembler is aimed 
 at providing 
 this sort of ability, isn't it?  I'm not finding a URL for 
 them.  Maybe 
 ... what's his name ... Bill Wallis?  ... will come by and 
 poke the URL in.



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




Re: jndi as a data source

2002-09-10 Thread Vincent Stoessel

I thought it might be cool to use ldap as an authetication mechanism.
Yeah, I saw the tomcat jndi how-to.
I could have sworn that I saw jndi used as a datasource but I could 
haave been tired on that day. I'm still a struts newbie, so I wouldn't 
know how to do cool struts authetication with regular JDBC either.  :)


Galbreath, Mark wrote:
 JNDI operates through your container environment, not Struts.  You can get
 that information from your app server's docs (specifically) or from
 java.sun.com (generally). What, specifically do you need to know?
 
 Mark
 
 -Original Message-
 From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 10:26 AM
 To: Struts Users
 Subject: jndi as a data source
 
 
 Hello All,
 I'm cuurently searching but can't seem to find a page with an example
 jndi example for struts. I have to build a quick demo app for the suits. :)
 Any pointers or clue bricks will be appreciated.
 Thanks in advance.
 
 


-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com



smime.p7s
Description: S/MIME Cryptographic Signature


deploying a struts application

2002-09-10 Thread Mark Silva

i have a question on deployment.

i am thinking of packaging my application as a war file, and letting the users place 
this in the right location in their container.  the only problem is that there is a 
config file that needs to be edited prior to the application working.  the config file 
lives in a specific path within the class files.  so the users have to un-war the 
files first to get at the config file, which i think defeats the purpose and 
convenience of it a bit.

is there another standard way to distribute config files so the users can make changes 
to them at the same time as deployment of the war?  any tricks that you all have come 
across?

thanks,
mark

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




RE: deploying a struts application

2002-09-10 Thread Darren Hill

Remove the config file from the war file, and ask the user to place that
properties file in the classpath.

-Original Message-
From: Mark Silva [mailto:[EMAIL PROTECTED]]
Sent: September 10, 2002 12:20 PM
To: Struts Users Mailing List
Subject: deploying a struts application


i have a question on deployment.

i am thinking of packaging my application as a war file, and letting the
users place this in the right location in their container.  the only problem
is that there is a config file that needs to be edited prior to the
application working.  the config file lives in a specific path within the
class files.  so the users have to un-war the files first to get at the
config file, which i think defeats the purpose and convenience of it a bit.

is there another standard way to distribute config files so the users can
make changes to them at the same time as deployment of the war?  any tricks
that you all have come across?

thanks,
mark

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

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




Re: [OT] RE: Struts and Large ResultSet

2002-09-10 Thread Michael Lee

This is to all the book writing dudes.
A lot of people here seem to be writing struts books.
Include an example that does this...
Scrolling through pageable data on a JSP from a large result set is very
common for J2EE/struts developers yet there are no good examples out there.
Real world examples would help sell the book for me.
My 5 c

BTW, I'm implementing this same routine now as we speak. I've done it before
(setting cursors and cursor sql in JDBC) but I'm trying to do it slightly
differently and in a more DB independent way (no DB specific SQL, stored
procedures, etc. just JDBC method calls and DB independent SQL) so I'll post
the code here when I get it working (and working fast).
Mike


- Original Message -
From: Ashish Kulkarni [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 11:30 AM
Subject: Re: [OT] RE: Struts and Large ResultSet


 Hi Dave,
 thanx for the solution, but i guess first one is okay,
 for me, since if i keep the primary keys in list and
 store it in user session, then it may be a problem if
 some one else, deletes a record from database. since
 the same database will be used by may user, i dont
 want to check for each record while loading from
 database,
 Ashish
 --- David Graham [EMAIL PROTECTED] wrote:
  Here's how you would grab the next set of values:
  select id, field1, fieldn
  from table
  where id  cur_value
  order by id
  fetch first 30 rows only
 
  You would put a number in for cur_value like 30 to
  get the second set of 30
  records.  If you don't want to run that query each
  time, just query the
  whole table and put the primary keys into a List
  object in the user's
  session.  When the user wants the next set of values
  you query the table
  using an appropriate subset of the primary keys you
  stored in the session.
 
  These are your 2 best bets.
  Dave
 
  Hi Dave,
  this querry only works for first 30 fields, but
  what
  if i want to get data from 31 to 60, then either i
  have to have the key for 31 record, or else i will
  have to run the querry twice, first to get the
  first
  30 and then the next 30 after setting the key..
  i have nottired getting the next 30 records, but
  this
  querry work on as400 i have tried it before
  Ashish
  --- David Graham [EMAIL PROTECTED] wrote:
The databases all have their own version of this
feature :-( so in SQL
Server it's:
   
select top 10 from table
   
which makes the most sense to me.  But, in DB2
  you
use a fetch first
clause like this:
   
select * from table
fetch first 30 rows only
   
Here's where I found the info
   
 
 http://nscpcw.physics.upenn.edu/db2_docs/db2s0/fet1st.htm#HDRFET1ST
   
I tried it out on a db2 7.2 database on win2k so
hopefully it works on
AS400.
   
Dave
   
From: Ashish Kulkarni
  [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List
[EMAIL PROTECTED]
To: Struts Users Mailing List
[EMAIL PROTECTED]
Subject: Re: [OT] RE: Struts and Large
  ResultSet
Date: Mon, 9 Sep 2002 16:02:00 -0700 (PDT)

Hi,
I am developing an web interface to existing
  AS400
system, so there is no way i can go to MYSQL or
suggest to change database, i have to live with
AS400
and DB2 and try to find a way out
thanx for suggestion

--- Peter A. J. Pilgrim
[EMAIL PROTECTED] wrote:
  Ashish Kulkarni wrote:
   Hi,
   But is there a way to write some thing,
  which
is
   database independent, so u can change the
database
   without any code modification,
   what i am trying it using CachedRowSet, i
  load
the
   resultset into a cachedrowset and then
  display
it
  page
   by page,
   now only think i have to figure is, how
  can i
load
   only few records in this rowset, like if i
have 1
   million records, just load say 1000
  records,
  iterate
   through them, if u reach end of cache load
another
   1000, and so,
   since a user will never go through a
  process
of
  seeing
   million records at a time, may be 1000 the
max...
   most user will use some thing like Go To
  to
  point at
   a specific record in database,
   I hope this thing works out well
   Ashish
 
 
  Then you need something like MYSQL which has
special
  reserved word to help you limit the size of
  the
  results.
 
  SELECT LAST_NAME, FIRST_NAME, DEPT FROM
  COMPANY_EMPLOYEES
  ORDER BY LAST_NAME
  GROUP BY DEPT
  LIMIT offset, number-of-rows
 
  The LIMIT word get you a finite rowset
limitation
  efficiently on the Database server side.
  Without
  this
  you may have to read the entire data set out
  of
the
  database. Say you only interested in rows 30
  to
40
  then you discard 30 rows already as in
  normal
JDBC
  

Re: Using global forwards to tile definitions?

2002-09-10 Thread Cedric Dumoulin


  The html:link tag can't be used with a Tiles name as path. You need 
to use an intermediate action. An often used solution is to have an 
action taking a definition name as http parameter, like the tiles 
DefinitionDispatcherAction. This action should check if the provided 
definition name is allowed, otherwise it is possible to access all your 
definitions.
  Your global forward could now look like:

   forward name=home  
path=path.to.dispatcheraction.do?def=plantsec.index/

  Hope this help,
 Cedric

[EMAIL PROTECTED] wrote:

I'm going back and trying to implement some best practices that I
skipped over in the beginning.  One of which is to use global forwards
alot.   

Say I have some global forwards that look like this:

global-forwards
   forward name=home  path=plantsec.index/
   forward name=faqMain   path=plantsec.faq/
   forward name=contactMain   path=plantsec.contact/


And in my JSP pages I use:

html:link forward=contactMainContact Us/html:link

I can see the benefit that gives me.

But if I have a tiles definition for the plantsec.faq it does not seem
to want to run that.  Am I doing something wrong or do I need to use an
action for every one of those?  That is the only way I can seem to make
it work...

Any help is appreciated






William B Chmura
Internet Services Admin / IT Department 
Ensign-Bickford Industries, Inc and subsidiaries

Tel: 860.843.1542
660 Hopmeadow Street
Simsbury, CT  06070

http://www.e-bind.com
http://www.e-bco.com
http://www.e-brealty.com
http://www.eba-d.com
http://www.applied-food.com

 


  




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




RE: deploying a struts application

2002-09-10 Thread Mark Silva

is there a specific place that the config files are usually placed?  currently mine is 
stored undr something like this:

classes/com/company/manage/config.properties

is there an easier, more standard higher level directory that i could use, that is 
automaatically under the classpath?  the lib or WEB-INF dir seems like good places, 
but i am unsure how to acess those places from a ResourceBundle.

thanks,
mark


-Original Message-
From: Darren Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 9:22 AM
To: 'Struts Users Mailing List'
Subject: RE: deploying a struts application


Remove the config file from the war file, and ask the user to place that
properties file in the classpath.

-Original Message-
From: Mark Silva [mailto:[EMAIL PROTECTED]]
Sent: September 10, 2002 12:20 PM
To: Struts Users Mailing List
Subject: deploying a struts application


i have a question on deployment.

i am thinking of packaging my application as a war file, and letting the
users place this in the right location in their container.  the only problem
is that there is a config file that needs to be edited prior to the
application working.  the config file lives in a specific path within the
class files.  so the users have to un-war the files first to get at the
config file, which i think defeats the purpose and convenience of it a bit.

is there another standard way to distribute config files so the users can
make changes to them at the same time as deployment of the war?  any tricks
that you all have come across?

thanks,
mark

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

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


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




Executing code before each action

2002-09-10 Thread Brett

Hello,

I have a piece of code than I need to execute before each action (it checks which 
country the user is in the then sets a session variable).  I want to execute this 
before each action so that if a user bookmarks a page and returns without entering 
through the front door I still have the session variable.  

What is the best way of doing this.  I have thought about using the RequestProcesser 
but as I understood it that is for changing request behaviour rather than this type of 
thing.

Thanks in advance.
Brett




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




RE: Executing code before each action

2002-09-10 Thread Mark Silva

you could sublass the Action Object (BaseAction), and provide this functionality.  
your Action classes will then subclass this object.  you may need to rename your 
perform method and call that my you BaseAction class' perform method.

-mark

-Original Message-
From: Brett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Executing code before each action


Hello,

I have a piece of code than I need to execute before each action (it checks which 
country the user is in the then sets a session variable).  I want to execute this 
before each action so that if a user bookmarks a page and returns without entering 
through the front door I still have the session variable.  

What is the best way of doing this.  I have thought about using the RequestProcesser 
but as I understood it that is for changing request behaviour rather than this type of 
thing.

Thanks in advance.
Brett




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


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




RE: Security and Struts

2002-09-10 Thread Malani, Prakash

Hi,

How are you doing?  You may want to check Security Filter.  It supports
roles 'n' such.  It is well documented and very cleanly implemented.  Here
is the URL: http://securityfilter.sourceforge.net/

Best regards,
-Prakash

-
eBuilt, Inc. - Builders of Industrial-Strength e-Business
(http://www.eBuilt.com)
Learn Java! (http://www.cact.csupomona.edu/javacert.html)
Learn Design Patterns! (http://www.cact.csupomona.edu/UML_Specialist.htm)
Want answers to Java, OOAD, UML, Design Patterns, EJBs, JSPs, Servlets, XP,
etc? (http://groups.yahoo.com/group/bartssandbox)

 Michael ... I've tried the same and thought it was a little messy.
 
 I was hope to find an example to uses roles 'n' such.
 
 -Original Message-
 From: Michael Lee [mailto:[EMAIL PROTECTED]]
 Sent: September 10, 2002 11:13 AM
 To: Struts Users Mailing List
 Subject: Re: Security and Struts
 
 
 They have a good login example in the example war in the 
 struts/webapps dir.
 That's the way I've done it in the past. The way I'm 
 currently doing it is
 to use container managed security. This means NOT using struts for
 authorization/authentication (for J2EE security). Since your 
 using JSP your
 probably gonna do form base authentication so just post your form to
 action=j_security_check and make sure your form username 
 and password
 fields are j_username and j_password appropriately. Check 
 your container
 documentation for how to hook this into its security model.
 I'm currently actually having a problem with this in that I 
 need for the
 user information to be stored in the session at login. I may 
 just put a tag
 at the top of every page but that seems to get rid of the 
 'niceties' of
 using J2EE security. I want to set the locale based upon the 
 loaded user
 object. Problem is, it goes right to the requested jsp page 
 after login
 without loading the user and his preferences. Not sure how 
 I'm going to
 handle this but in the mean time, that is how I handle security.
 Mike
 
 
 - Original Message -
 From: Darren Hill [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 10:24 AM
 Subject: Security and Struts
 
 
  Hey all,
 
  I'm looking for a job document and example about best practices in
  implementing security in struts.
  I've got the general idea about placing all my JSP's under 
 WEB-INF, but a
  doc/example might really solidify it for me.  Thanks in advance.
 
  Darren.
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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




RE: Executing code before each action

2002-09-10 Thread Trieu, Danny

Use servlet filter

-Original Message-
From: Brett [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Executing code before each action


Hello,

I have a piece of code than I need to execute before each action (it checks
which country the user is in the then sets a session variable).  I want to
execute this before each action so that if a user bookmarks a page and
returns without entering through the front door I still have the session
variable.  

What is the best way of doing this.  I have thought about using the
RequestProcesser but as I understood it that is for changing request
behaviour rather than this type of thing.

Thanks in advance.
Brett




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

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




RE: Executing code before each action

2002-09-10 Thread Trieu, Danny

In short, what you are doing is templating your action classes.  This is
good if it is a core service to the action class.  Another alternative way
is to use servlet filter, this is good because your action class to not need
to know the default behavior, plus it doesn't need to since the action class
does not depend on it.

-Original Message-
From: Mark Silva [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 10:20 AM
To: Struts Users Mailing List
Subject: RE: Executing code before each action


you could sublass the Action Object (BaseAction), and provide this
functionality.  your Action classes will then subclass this object.  you may
need to rename your perform method and call that my you BaseAction class'
perform method.

-mark

-Original Message-
From: Brett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Executing code before each action


Hello,

I have a piece of code than I need to execute before each action (it checks
which country the user is in the then sets a session variable).  I want to
execute this before each action so that if a user bookmarks a page and
returns without entering through the front door I still have the session
variable.  

What is the best way of doing this.  I have thought about using the
RequestProcesser but as I understood it that is for changing request
behaviour rather than this type of thing.

Thanks in advance.
Brett




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


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

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




Re: Recognizing Cancel Button over Submit Button

2002-09-10 Thread Eddie Bush

http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




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




Re: NullPointerException while extending DynaValidatorForm

2002-09-10 Thread micael

You are not initializing a variable for an object.  I know that is rather 
obvious, but sometimes the obvious helps.  I hope it does here.

At 09:53 AM 9/10/2002 -0400, you wrote:
Hi all,

I have a problem setting values of a form in my action.
The form extends the org.apache.struts.validator.DynaValidatorForm. The 
struts-config.xml defines all the properties of the form except 2, that 
are defined in the actual Java source of the form.

This is the error I'm getting :

java.lang.NullPointerException
 at 
 org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:551)


In struts config I have :

form-bean name=CustomerForm type=com.forms.CustomerForm
form-property name=cid type=java.lang.String/
/form-bean

The action is trying to set the property of the form :

form = new CustomerForm();
CustomerForm cf = (CustomerForm) form;
cf.set(cid, customer.getCid()); // THIS iS WHERE IT ERRORS OUT.



Any ideas what I'm doing wrong ?

Jf


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




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




[ActionForm] Returning from validate routine

2002-09-10 Thread Jerry Jalenak

Hi All,

In a validate routine, if a non-null ActionErrors object is returned, struts
returns to the 'page' identified on the input parameter in the
action-mapping for the action.  I need to return to a dynamically determined
'page'.  Is this possible?  If so, what has to be overridden to make it
happen?

TIA,



Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




RE: Recognizing Cancel Button over Submit Button

2002-09-10 Thread Cohan, Sean

Thanks, Eddie.  It looks exactly what I'm looking for.  

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:43 PM
To: Struts Users Mailing List
Subject: Re: Recognizing Cancel Button over Submit Button


http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the
bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two
image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




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

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




Re: Executing code before each action

2002-09-10 Thread Eddie Bush

Go read up on filters.  Here's the short of it:
- transparent to client and application
- can modify request / response

Since you can grab the session from the request, you could check for the 
presence of your attribute in the session, set it if it's not there, and 
just breeze past if it is.

Regards,

Eddie

Brett wrote:

If I understand servlet filters correctly you mean I could simply set /* to go to my 
filter and then perform the steps I need in the filter.  Does it then pass the 
request onto the Action as per normal?  I assume it does.




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




Re: Just one question. Does page works with DynaValidatorForm?

2002-09-10 Thread JuanPedro . DeAndres

I've done this and know it works with DynaValidatorForm, just taking the page value
from the DynaForm and Setting it.

This is the only solution I have found.


public class MiDynaValidatorForm extends DynaValidatorForm {

private static Log milog = LogFactory.getLog(MiDynaValidatorForm.class);

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

ServletContext application = getServlet().getServletContext();
ActionErrors errors = new ActionErrors();


try{
  Integer dinaPage =(Integer)PropertyUtils.getSimpleProperty( this,page);
  if(dinaPage!=null) setPage(dinaPage.intValue()); 
---setPage
}catch(Exception e){
  if(!(e instanceof java.lang.NoSuchMethodException))
milog.error(e.getMessage(),e);
}


Validator validator = StrutsValidatorUtil.initValidator(mapping.getAttribute(),
this,
application, request,
errors, page);

try {
   validatorResults = validator.validate();
} catch (ValidatorException e) {
   milog.error(e.getMessage(), e);
}

return errors;
}

}



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




RE: How to user logic:iterate[MORON]

2002-09-10 Thread Joe Barefoot

wow, really!?  The JSP compiler doesn't even issue a warning?  That's pretty lame.

--joe

 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 7:59 AM
 To: Struts Users Mailing List
 Subject: Re: How to user logic:iterate[MORON]
 
 
 Without the taglib statement, the tag is completely ignored, as if it 
 wasn't there. The JSP service assumes it's a HTML tag, and 
 the browsers 
 silently swallow anything they don't understand. C'est la vive.
 
 -T.
 
 Michael Lee wrote:
 
  I would like to thank everyone on this email list that 
 helped out. Every
  little bit helped including the property attribute on 
 iterate and that
  logic:present is very handy.
  The main problem though was a complete brain fart on my part.
  I am moron, hear me roar.
  I forgot to include the tag lib import for logic. The thing I dont
  understand is how it even go to the bean:write tag inside 
 the iterate and
  failed there?
  Oh well, if you ever get an error message like I did, don't 
 run around like
  a chickend with your head chopped off, just include this 
 line at the top of
  the jsp...
  %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
  
  AAA, I hate stupid mistakes that waste everyone's time!!!
  Mike
  :(
  
  
  - Original Message -
  From: John Yu [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Monday, September 09, 2002 10:20 PM
  Subject: Re: How to user logic:iterate
  
  
  
 Option 1:
 
 In Action,
 
request.setAttribute(myUsers, users); // no need to 
 call getUsers()
 
 In JSP,
 
logic:present name=myUsers
  logic:iterate id=aUser name=myUsers property=users
 scope=request
  tr
tdbean:write name=aUser property=userID//td
tdbean:write name=aUser property=userType//td
tdbean:write name=aUser property=fName//td
tdbean:write name=aUser property=mName//td
tdbean:write name=aUser property=lName//td
tdbean:write name=aUser 
 property=accoundDisabled//td
tdbean:write name=aUser property=email//td
  /tr
  /logic:iterate
/logic:present
 
 Option 2:
 
 Use your existing code, but get rid of the user. part 
 from the property
 of the bean:write tags.
 
 At 04:55 am 10-09-2002, you wrote:
 
 Im having a helluva time getting logic:iterate to work..
 I have a Users object that contains an array list of
 User objects.
 you call Users.getUsers() and it returns an arrayList
 I stick that in the request object in the perform() method using
 request.setAttribute(users, users.getUsers());
 In the JSP the code I have is;
 
  % ArrayList users = (ArrayList) request.getAttribute(users);
if(users != null)
{%
 logic:iterate name=users id=aUser scope=request
 tr
   tdbean:write name=aUser property=user.userID//td
   tdbean:write name=aUser property=user.userType//td
   tdbean:write name=aUser property=user.fName//td
   tdbean:write name=aUser property=user.mName//td
   tdbean:write name=aUser property=user.lName//td
   tdbean:write name=aUser
 
  property=user.accoundDisabled//td
  
   tdbean:write name=aUser property=user.email//td
 /tr
 /logic:iterate
 %}%
 
 The error I'm getting is;
 
 Sep 9, 2002 4:52:00 PM EDT Error HTTP
 [WebAppServletContext(4398493,recei
 ptsplus,/receiptsplus)] Root cause of ServletException
 javax.servlet.jsp.JspException: Cannot find bean aUser in 
 scope null
 at
 
  org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
  
 at
 org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.
 java:179)
 at
 jsp_servlet.__advanced_user_search._jspService(__advanced_u
 ser_search
 .java:1541)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ser
 vletStubIm
 pl.java:265)
 
 what am I doing wrong?
 help!
 thanks,
 Mike
 
 --
 John Yu   Scioworks Technologies
 e: [EMAIL PROTECTED] w: +(65) 873 5989
 w: http://www.scioworks.com   m: +(65) 9782 9610
 
 Scioworks Camino - Don't develop Struts Apps without it!
 Copyright (c) 2002 John Yu/Scioworks Technologies. All 
 rights reserved.
 
 
 --
 To unsubscribe, e-mail:
 
  mailto:[EMAIL PROTECTED]
  
 For additional commands, e-mail:
 
  mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


-- 
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:
http://husted.com/struts/book.html


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


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




Re: [ActionForm] Returning from validate routine

2002-09-10 Thread Jim Crossley

The input can reference another struts action that is able to do the
dynamic determination, e.g.

  input=/determinator.do?valid=no

or some such thing.

Jim

- Original Message -
From: Jerry Jalenak [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 1:47 PM
Subject: [ActionForm] Returning from validate routine


 Hi All,

 In a validate routine, if a non-null ActionErrors object is returned,
struts
 returns to the 'page' identified on the input parameter in the
 action-mapping for the action.  I need to return to a dynamically
determined
 'page'.  Is this possible?  If so, what has to be overridden to make it
 happen?

 TIA,



 Jerry Jalenak
 Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496
 [EMAIL PROTECTED]


 This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



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



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




RE: Question: Configuring Multiple message-resources Elements With Sub-Applications

2002-09-10 Thread Hohlen, John

Whoops!  In my examples below, the action tags should actually be
action-mappings.  That was a cut-and-paste error on my part and not
relevant to this problem.  I fixed the examples in this reply.

-Original Message-
From: Hohlen, John 
Sent: Tuesday, September 10, 2002 11:43 AM
To: Struts-Help (E-mail)
Cc: '[EMAIL PROTECTED]'
Subject: Question: Configuring Multiple message-resources Elements
With Sub-Applications


If I'm using multiple message resource files with sub-applications, do I
need declare all the message resource files in the default struts config
file or do I declare each message resource file in the corresponding
sub-app's struts config file? I searched the mailing lists, Struts
documentation, and the online chapter's in Chuck Cavaness' upcoming Struts
book (O'Reilly).  I have not found a clear example on how to do this.


Example #1 - Declaring All Message Resources In struts-config.xml:
=

  --- struts-config.xml-
struts-config
  message-resources parameter=com.abc.training.Messages 
  null=false/ 

  message-resources key=SUB_APP_A_MESSAGES_KEY 
   parameter=com.abc.training.SubAppAMessages 
null=false/  

/struts-config

  --- struts-config-sub-app-a.xml-
struts-config
   form-beans
 ...
   /form-beans
   action-mappings
 ...
   /action-mappings
/struts-config



Example #2 - Declaring Each Message Resource In Each Sub App's
struts-config-xml:



  --- struts-config.xml-
struts-config
  message-resources parameter=com.abc.training.Messages 
  null=false/

/struts-config


  --- struts-config-sub-app-a.xml-
struts-config
  form-beans
...
  /form-beans
  action-mappings
...
  /action-mappings

  message-resources key=SUB_APP_A_MESSAGES_KEY 
   parameter=com.abc.training.SubAppAMessages 
null=false/  

/struts-config

I can't get either approach to work.  If I use approach #1, error keys are
not properly located for errors placed in the errors container by
sub-application A.  Hence, error mesages appear as ???en_US.key???.  But
this approach does work for JSP text retrieved from sub-app A's message
resource file (as long as I specify the bundle attribute).  

If I use approach #2, I get the following exception (WebLogic 6.1 with SP2
or SP3):
   
javax.servlet.ServletException: Cannot find message resources under key
SUB_APP_A_MESSAGES_KEY
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:256)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
14)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:417)
at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
sor.java:390)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at
com.erac.fleetsystems.strutsx.FleetSystemsServlet.process(FleetSystemsServle
t.java:178)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

I believe approach #2 makes the most sense, but I keep getting the above
servlet exception.  FYI - I have the folllowing in my web.xml file for
either approach:
  
init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
param-nameconfig/subAppA/param-name
param-value/WEB-INF/struts-config-sub-app-a.xml/param-value
  /init-param

Thanks in advance for your help.

JOHN HOHLEN
 



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

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




RE: jndi as a data source

2002-09-10 Thread Hajratwala, Nayan (N.)

Here's some code that I wrote to use LDAP through the Commons Pooling
mechanism... I'm still trying to figure out a good way to validate the
connection using the validateObject method, so that part is likely not
optimal.

There are 2 classes:
* LdapConnectionFactory, which implements
BasePoolableObjectFactory
* HRLdap uses the LdapConnectionFactory

Here is the code that then can use HRLdap:

HRLdap ldap = new HRLdap();
ldap.executeCdsIdLookup(cdsId);
String buCode = ldap.getBusinessUnitCode();
...
...
...

I've tried to strip out some stuff that is only applicable in the
environment here, but hopefully this helps.

I'd be interested in anyone else's feedback on this as well in case i'm
doing something stupid =)


=
import org.apache.commons.pool.BasePoolableObjectFactory;

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;

/**
 * @version $Revision:   1.1  $
 * @author Nayan Hajratwala [EMAIL PROTECTED]
 */
public class LdapConnectionFactory extends BasePoolableObjectFactory {

private static Log logger_ = Log.getInstance();

private static Hashtable env_ = null;

private static Object lock_ = new Object();

private Hashtable getEnvironment() {
if (env_ == null) {
synchronized(lock_) {
if (env_ == null) {
env_ = new Hashtable();

FrameworkEnvConfig props =
FrameworkEnvConfig.getInstance();


env_.put(Context.INITIAL_CONTEXT_FACTORY,
com.sun.jndi.ldap.LdapCtxFactory);
env_.put(Context.PROVIDER_URL,
ldap://; + props.getProperty(hronline.ldap.default.host) + 

: + props.getProperty(hronline.ldap.default.port));

env_.put(Context.SECURITY_AUTHENTICATION, simple);

env_.put(Context.SECURITY_PRINCIPAL,
props.getProperty(hronline.ldap.default.auth.dn));

env_.put(Context.SECURITY_CREDENTIALS,
props.getProperty(hronline.ldap.default.auth.pwd));

// Ford LDAP servers are version
2 servers.  If we don't specify this, then some strange
// results occur.  Namely,
Non-ASCII characters are not returned properly.

env_.put(java.naming.ldap.version, 2);
}
}
}

return env_;
}


public Object makeObject() {

try {
return new InitialDirContext(getEnvironment());
}
catch (NamingException e )
{
logger_.error(this, Exception during creation
of LDAP connection., e);
return null;
}
}
public void destroyObject(Object o) {

try {
((DirContext)o).close();
}
catch(NamingException e)
{
logger_.error(this, Exception during expire of
LDAP connection., e);
}
}

public boolean validateObject(Object o) {
try {
((DirContext)o).getAttributes(test);
}
catch (Exception e) {
logger_.error(this, Exception during Ldap
Connection validation);
return false;
}

return true;
}

}
=

=
import org.apache.commons.pool.ObjectPool;
import org.apache.commons.pool.impl.StackObjectPool;

import java.util.HashMap;
import java.util.Map;

import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchResult;

/**
 * This class provides the necessary methods to obtain LDAP data from
CDS
 * pre
 *   Rev 1.27   Aug 27 2002 16:00:32   nhajratw
 *fixes from synchronization code review.
 *
 *   Rev 1.26   Aug 26 2002 14:23:30   nhajratw
 *updates for synchronization fixes, franchiseFactory  search engine.
 * /pre
 * @version $Revision:   1.27  $
 * @author Nayan Hajratwala [EMAIL PROTECTED]
 */
public class HRLdap {

private static final String ATTR_NAME_BUILDING_COUNTRY  = c;
private static final String ATTR_NAME_CDSID
= uid;
private static final 

RE: Improving performance by splitting JSP?

2002-09-10 Thread Hajratwala, Nayan (N.)

Was it a Hashtable or HashMap?

It might be that since Hashtable is synchronized you were encountering a
bottleneck in your multithreaded environment, whereas just a regular loop
would not have this problem...

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 11:48 AM
To: Struts Users Mailing List
Subject: RE: Improving performance by splitting JSP?



I had to go back and look at the test code we used, but yes - looks like we
did try a non-body tag.  It did a hashtable lookup for whatever key values
was passed in as a parameter.  I remember we found that we could only
recreate the performance discrepancy with tags that did some kind of memory
lookup; just adding loops around arithmetic statements are writing output
were tried, but did not exhibit the symptoms.

Jim Weaver
Software Developer - ThoughtWorks


 

  Martin Cooper

  martin.cooper@tumbTo:   'Struts Users
Mailing List' [EMAIL PROTECTED]  
  leweed.comcc:

 Subject:  RE: Improving
performance by splitting JSP? 
  09/09/2002 05:24 PM

  Please respond to

  Struts Users

  Mailing List

 

 







 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 09, 2002 2:51 PM
 To: Struts Users Mailing List
 Subject: RE: Improving performance by splitting JSP?



 Yup, we looked at overall size of the JSP as well, and the
 association with
 performance was definitely number of bm/bw tags within a
 single JSP rather
 than overall JSP size.  We even tried editing the generated
 servlet code
 and adding big unused methods to see if the problem had to do with
 generated servlet file size.  That would kind've made sense, but was a
 negative.  I believe we also tried a tag that just did a
 sysout rather than
 any kind of memory lookup (hashtable or properties file) and
 found that
 this performance quirk in the sun vm did not appear in that case.

When you wrote your own tags (the message/write equivalents, I mean), did
you happen to play with body versus non-body tags? When I was wrestling
with
the too many tags problem a while ago, I ended up writing my own versions
of some of the Struts tags so that they were non-body tags, because they
caused noticeably less code to be generated. I didn't measure performance
differences, but I wouldn't be surprised to see a noticeable improvement
there too.

--
Martin Cooper



 We could never pin down a why, it seemed that the sun 1.3 vm
 just ran like
 a snail with a lot of bm or bw tags in a single page, so we
 stopped doing
 that ;-).  Same number of tags split up into multiple JSPs,
 or a few tags
 called the same number of times via a loop - OK performance.

 It is very true also that splitting them up into smaller
 bites makes them
 more readable and maintainable, so it was a good solution all
 around.  It's
 just that you are always nervous when you fix a problem and
 don't know the
 why of it ;-).

 Jimbo



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




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







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

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




RE: Improving performance by splitting JSP?

2002-09-10 Thread Joe Barefoot

True.  However, Jim encountered this performance problem with the bean:write and 
bean:message tags provided with Struts as well, and AFAIK they use an unsyncronized 
FastHashMap, so that wouldn't explain the slow-down he got with lots of write/message 
tags (that's why they were trying to write their own custom tags to replace them in 
the first place).

peace,
Joe

 -Original Message-
 From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 11:02 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Improving performance by splitting JSP?
 
 
 Was it a Hashtable or HashMap?
 
 It might be that since Hashtable is synchronized you were 
 encountering a
 bottleneck in your multithreaded environment, whereas just a 
 regular loop
 would not have this problem...
 
 ---
 - Nayan Hajratwala
 - Chikli Consulting LLC
 - http://www.chikli.com
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 11:48 AM
 To: Struts Users Mailing List
 Subject: RE: Improving performance by splitting JSP?
 
 
 
 I had to go back and look at the test code we used, but yes - 
 looks like we
 did try a non-body tag.  It did a hashtable lookup for 
 whatever key values
 was passed in as a parameter.  I remember we found that we could only
 recreate the performance discrepancy with tags that did some 
 kind of memory
 lookup; just adding loops around arithmetic statements are 
 writing output
 were tried, but did not exhibit the symptoms.
 
 Jim Weaver
 Software Developer - ThoughtWorks
 
 
  
 
   Martin Cooper
 
   martin.cooper@tumbTo:   
 'Struts Users
 Mailing List' [EMAIL PROTECTED]  
   leweed.comcc:
 
  Subject:  
 RE: Improving
 performance by splitting JSP? 
   09/09/2002 05:24 PM
 
   Please respond to
 
   Struts Users
 
   Mailing List
 
  
 
  
 
 
 
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 09, 2002 2:51 PM
  To: Struts Users Mailing List
  Subject: RE: Improving performance by splitting JSP?
 
 
 
  Yup, we looked at overall size of the JSP as well, and the
  association with
  performance was definitely number of bm/bw tags within a
  single JSP rather
  than overall JSP size.  We even tried editing the generated
  servlet code
  and adding big unused methods to see if the problem had to do with
  generated servlet file size.  That would kind've made 
 sense, but was a
  negative.  I believe we also tried a tag that just did a
  sysout rather than
  any kind of memory lookup (hashtable or properties file) and
  found that
  this performance quirk in the sun vm did not appear in that case.
 
 When you wrote your own tags (the message/write equivalents, 
 I mean), did
 you happen to play with body versus non-body tags? When I was 
 wrestling
 with
 the too many tags problem a while ago, I ended up writing 
 my own versions
 of some of the Struts tags so that they were non-body tags, 
 because they
 caused noticeably less code to be generated. I didn't measure 
 performance
 differences, but I wouldn't be surprised to see a noticeable 
 improvement
 there too.
 
 --
 Martin Cooper
 
 
 
  We could never pin down a why, it seemed that the sun 1.3 vm
  just ran like
  a snail with a lot of bm or bw tags in a single page, so we
  stopped doing
  that ;-).  Same number of tags split up into multiple JSPs,
  or a few tags
  called the same number of times via a loop - OK performance.
 
  It is very true also that splitting them up into smaller
  bites makes them
  more readable and maintainable, so it was a good solution all
  around.  It's
  just that you are always nervous when you fix a problem and
  don't know the
  why of it ;-).
 
  Jimbo
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


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




RE: Executing code before each action

2002-09-10 Thread Trieu, Danny

Yes ... 

-Original Message-
From: Brett [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 10:40 AM
To: Struts Users Mailing List
Subject: RE: Executing code before each action


If I understand servlet filters correctly you mean I could simply set /* to
go to my filter and then perform the steps I need in the filter.  Does it
then pass the request onto the Action as per normal?  I assume it does.


At 10:25 10/09/2002 -0700, you wrote:
In short, what you are doing is templating your action classes.  This 
is good if it is a core service to the action class.  Another 
alternative way is to use servlet filter, this is good because your 
action class to not need to know the default behavior, plus it doesn't 
need to since the action class does not depend on it.

-Original Message-
From: Mark Silva [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:20 AM
To: Struts Users Mailing List
Subject: RE: Executing code before each action


you could sublass the Action Object (BaseAction), and provide this 
functionality.  your Action classes will then subclass this object.  
you may need to rename your perform method and call that my you 
BaseAction class' perform method.

-mark

-Original Message-
From: Brett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Executing code before each action


Hello,

I have a piece of code than I need to execute before each action (it 
checks which country the user is in the then sets a session variable).  
I want to execute this before each action so that if a user bookmarks a 
page and returns without entering through the front door I still have 
the session variable.

What is the best way of doing this.  I have thought about using the 
RequestProcesser but as I understood it that is for changing request 
behaviour rather than this type of thing.

Thanks in advance.
Brett




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


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

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


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

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




more verbose logging

2002-09-10 Thread Vincent Stoessel

Hello, I am trying to debug my struts app.
When I submit a form I just get a blank page and I would
like to know if there is a way for struts to tell me what
exactly it is doing the action mapping as it is happening.
thanks.

-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com



smime.p7s
Description: S/MIME Cryptographic Signature


RE: document.forms[0].submit()::

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


RE: alternating row colors in the iterate tag.

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


RE: How to user logic:iterate[MORON]

2002-09-10 Thread Craig R. McClanahan



On Tue, 10 Sep 2002, Joe Barefoot wrote:

 Date: Tue, 10 Sep 2002 10:49:09 -0700
 From: Joe Barefoot [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: RE: How to user logic:iterate[MORON]

 wow, really!?  The JSP compiler doesn't even issue a warning?  That's
 pretty lame.

In the absence of a taglib directive, what looks to you like a Struts tag
just looks like template text to the compiler, and it is simply passed
through to the response (like all the non-tag HTML markup in a typical
Struts-based JSP page).

Remember, there is no requirement that the template text look like HTML or
XML markup, so there is absolutely no basis on which the compiler can
possibly consider this to be an error condition.


 --joe

Craig


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




RE: Improving performance by splitting JSP?

2002-09-10 Thread JEWeaver


Our test tag was using a HashMap.

You can view this performance quirk yourself using Struts bean:message tag.
To get orders of magnitude in the performance discrepancy (to make sure we
were measuring the tag performance difference on a much more significant
scale than server access variance times) we went to 200,000 tag exectutions
done a variety of ways:

One of our cases was a page with 20 tags, inside a loop 10,000 times.
Another case was same page, but done by 160 tags inside a 1250 loop.
Another case same page rendered by includes:  page included another page 8
times inside a 1250 loop.  The included page had 20 tags.

There were other varieties, but these three show the discrepancy in
performance with the increased number of tags very significantly.  All
three cases output the same resulting html.  All three cases executed the
tag code 200,000 times.  The first and third cases, with 20 custom tag
occurrences, performed roughly the same (better performance).  The second
case with 160 tags performed much much worse.  I don't have our statistics
anymore, alas, but it was two or more orders of magnitude worse.  We tried
an 80 tag variety as well, and it put the expected point on the slope
(significantly worse than same output rendered via 20 tags, not as bad as
160 tags).

Switching to IBM VM, or turning profiling flags on in the Sun VM before
running the tests, caused the performance discrepancy between these
approaches to vanish (roughly the better performance mark for all three).

Be wonderful if someone else could verify on their own.  Two days of
cursing over it was enough for us ;-).  As soon as we realized we could fix
the problem pages by restructuring them into separate JSPs, we declared
victory over the Mystery of the VM ;-).

Again this was 1.3, who knows if Sun's 1.4 vm still does this

Jimbo

Build a simple JSP that contains


   
  
  Hajratwala, 
  
  Nayan (N.)  To:   'Struts Users Mailing List' 
[EMAIL PROTECTED]  
  [EMAIL PROTECTED]cc: 
  
  m   Subject:  RE: Improving performance by 
splitting JSP? 
   
  
  09/10/2002 01:02 
  
  PM   
  
  Please respond to
  
  Struts Users
  
  Mailing List
  
   
  
   
  




Was it a Hashtable or HashMap?

It might be that since Hashtable is synchronized you were encountering a
bottleneck in your multithreaded environment, whereas just a regular loop
would not have this problem...

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 11:48 AM
To: Struts Users Mailing List
Subject: RE: Improving performance by splitting JSP?



I had to go back and look at the test code we used, but yes - looks like we
did try a non-body tag.  It did a hashtable lookup for whatever key values
was passed in as a parameter.  I remember we found that we could only
recreate the performance discrepancy with tags that did some kind of memory
lookup; just adding loops around arithmetic statements are writing output
were tried, but did not exhibit the symptoms.

Jim Weaver
Software Developer - ThoughtWorks




  Martin Cooper

  martin.cooper@tumbTo:   'Struts Users
Mailing List' [EMAIL PROTECTED]
  leweed.comcc:

 Subject:  RE: Improving
performance by splitting JSP?
  09/09/2002 05:24 PM

  Please respond to

  Struts Users

  

RE: [ActionForm] Returning from validate routine

2002-09-10 Thread Jerry Jalenak

Jim,

Thanks!  I was about 1/2 way there - forget to add the .do to the
reference.

Jerry

 -Original Message-
 From: Jim Crossley [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 12:55 PM
 To: Struts Users Mailing List
 Subject: Re: [ActionForm] Returning from validate routine
 
 
 The input can reference another struts action that is able to do the
 dynamic determination, e.g.
 
   input=/determinator.do?valid=no
 
 or some such thing.
 
 Jim
 
 - Original Message -
 From: Jerry Jalenak [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 1:47 PM
 Subject: [ActionForm] Returning from validate routine
 
 
  Hi All,
 
  In a validate routine, if a non-null ActionErrors object is 
 returned,
 struts
  returns to the 'page' identified on the input parameter in the
  action-mapping for the action.  I need to return to a dynamically
 determined
  'page'.  Is this possible?  If so, what has to be 
 overridden to make it
  happen?
 
  TIA,
 
 
 
  Jerry Jalenak
  Web Publishing
  LabOne, Inc.
  10101 Renner Blvd.
  Lenexa, KS  66219
  (913) 577-1496
  [EMAIL PROTECTED]
 
 
  This transmission (and any information attached to it) may 
 be confidential
 and is intended solely for the use of the individual or 
 entity to which it
 is addressed. If you are not the intended recipient or the person
 responsible for delivering the transmission to the intended 
 recipient, be
 advised that you have received this transmission in error and 
 that any use,
 dissemination, forwarding, printing, or copying of this information is
 strictly prohibited. If you have received this transmission 
 in error, please
 immediately notify LabOne at (800)388-4675.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




Re: Back Button Shown 'Page Expired' on IE ..... What really happens? ....

2002-09-10 Thread Ashish Kulkarni

Hi,
check if u have following lines in your html 
meta http-equiv=Pragma content=no-cache
meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Expires content=-1
or following code in your jsp
%response.setHeader(Cache-Control,no-store);%
if yes, then it tells the browser that is should not
load the page from cache and load a fresh page , and
so u get that message
Ashish
--- Trieu, Danny [EMAIL PROTECTED] wrote:
 Browser diplay messages saying the page has been
 expired when I hit the back
 button after I submitted a form.  Can someone point
 out what happens?
 
 Thanks,
 
 Danny.
 


=
A$HI$H

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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




Out of Context

2002-09-10 Thread Singh, Sandeep

Can anybody guide me how I can put TimeStamp
in stderr file of websphere Application server,
I am using exception.printStackTrace() in my catch block of
java code.

Thanks

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:41 PM
To: 'Struts Users Mailing List'; 'Jim Crossley'
Subject: RE: [ActionForm] Returning from validate routine


Jim,

Thanks!  I was about 1/2 way there - forget to add the .do to the
reference.

Jerry

 -Original Message-
 From: Jim Crossley [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 12:55 PM
 To: Struts Users Mailing List
 Subject: Re: [ActionForm] Returning from validate routine
 
 
 The input can reference another struts action that is able to do the
 dynamic determination, e.g.
 
   input=/determinator.do?valid=no
 
 or some such thing.
 
 Jim
 
 - Original Message -
 From: Jerry Jalenak [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 1:47 PM
 Subject: [ActionForm] Returning from validate routine
 
 
  Hi All,
 
  In a validate routine, if a non-null ActionErrors object is 
 returned,
 struts
  returns to the 'page' identified on the input parameter in the
  action-mapping for the action.  I need to return to a dynamically
 determined
  'page'.  Is this possible?  If so, what has to be 
 overridden to make it
  happen?
 
  TIA,
 
 
 
  Jerry Jalenak
  Web Publishing
  LabOne, Inc.
  10101 Renner Blvd.
  Lenexa, KS  66219
  (913) 577-1496
  [EMAIL PROTECTED]
 
 
  This transmission (and any information attached to it) may 
 be confidential
 and is intended solely for the use of the individual or 
 entity to which it
 is addressed. If you are not the intended recipient or the person
 responsible for delivering the transmission to the intended 
 recipient, be
 advised that you have received this transmission in error and 
 that any use,
 dissemination, forwarding, printing, or copying of this information is
 strictly prohibited. If you have received this transmission 
 in error, please
 immediately notify LabOne at (800)388-4675.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



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



struts basic question

2002-09-10 Thread Ashish Kulkarni

Hi,
I have a question about defining a html:form.. on my
jsp page,
1. suppose i define a form like below in my
selectenv.jsp
html:form action=/pages/selectenv
do i have to have a bean-form defination in my
struts-config file like below
form-bean name=selectEnvForm dynamic=true
type=org.apache.struts.validator.DynaValidatorForm
form-property name=envDrop
type=java.lang.String/
/form-bean

2 . can i define a form with action as blank like
html:form action= and then have a javascript which
will define value for action, 

3. If my old html form looks like this
form name=myform action=env.jsp 
what would be struts equivalent, if i define a name
for the form it gives me error, that a type must be
assigend, and when i give type as
org.apache.struts.validator.DynaValidatorForm,
it gives me class cast exception error. for the above
form defination
Ashish

 



=
A$HI$H

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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




RE: Back Button Shown 'Page Expired' on IE ..... What really happens? ....

2002-09-10 Thread Trieu, Danny

No, this has nothing to do with no-cache setting.  Even with Struts setting
for the controller setting to be no-cache, I still sometime see this happens
on form submittion.  Yes, I do understand that you can set no-cache on
response header, or html meta data setting, but I don't understand why it
happens sometime with form submittion, especially file upload.  

Thanks,

danny

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 11:43 AM
To: Struts Users Mailing List
Subject: Re: Back Button Shown 'Page Expired' on IE . What really
happens? 


Hi,
check if u have following lines in your html 
meta http-equiv=Pragma content=no-cache
meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Expires content=-1
or following code in your jsp
%response.setHeader(Cache-Control,no-store);%
if yes, then it tells the browser that is should not
load the page from cache and load a fresh page , and
so u get that message
Ashish
--- Trieu, Danny [EMAIL PROTECTED] wrote:
 Browser diplay messages saying the page has been
 expired when I hit the back
 button after I submitted a form.  Can someone point
 out what happens?
 
 Thanks,
 
 Danny.
 


=
A$HI$H

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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

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




Tip #1

2002-09-10 Thread Cohan, Sean

Should we be extending ActionForm for this tip?  

I'm guessing yes since the sample Action code was listed as:

String selected = ((myForm) form).getSelected();

if (Constants.CANCEL.equals(selected)) ...


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:43 PM
To: Struts Users Mailing List
Subject: Re: Recognizing Cancel Button over Submit Button


http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the
bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two
image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




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

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




RE: Tip #1

2002-09-10 Thread Cohan, Sean

NeverMind.  Brain freeze.

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:57 PM
To: 'Struts Users Mailing List'
Subject: Tip #1


Should we be extending ActionForm for this tip?  

I'm guessing yes since the sample Action code was listed as:

String selected = ((myForm) form).getSelected();

if (Constants.CANCEL.equals(selected)) ...


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:43 PM
To: Struts Users Mailing List
Subject: Re: Recognizing Cancel Button over Submit Button


http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the
bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two
image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




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

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

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




[Announce] [New Extension] ApplicationResources.properties from Database

2002-09-10 Thread James Mitchell

For anyone interested, I have finished implementing DBMessageResources
which allows you to keep the key-value pairs (from your
ApplicationResources.properties) in a single database table.

You can load your property files into a table (generic schema is provided)
and with this extension, by only modifying message-resources in the
struts-config.xml your application will run WITHOUT ANY code changes. (See
the readme.txt file included)

This extension uses OJB (http://jakarta.apache.org/ojb) O/R mapping for
database configuration and connection pool management.

I have included a modified version of the (1.1b2) struts-example to
demonstrate.

I have tested this with Struts 1.1b2, and I'm sure it will work with 1.1b1
(If anyone requires a 1.0.x compatible, I can look at that also)

I will get this project available as soon as I work through some cvs issues
on sf.net:

If anyone is REALLY itching to get their hands on it sooner, send me a
email.

For those who were waiting, thanks for your patience.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta


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




Servlte-level Resource Files

2002-09-10 Thread Billy Ng

Hi folks,

I don't know if anybody is doing this.  I want to move the resoruces to the servlet 
level which means each servlet has its own resources instead of putting the entire 
app's subtitutes in ApplicationResources.properties.  If you have the mechanism like 
this, would you please give me some points for how to do it.

Thanks!

Billy Ng



XSL for struts config?

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


WINMAIL.DAT
Description: application/vnd.ms-tnef

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


RE: Out of Context

2002-09-10 Thread Galbreath, Mark

} catch( Exception e) {
  Timestamp ts = new Timestamp( System.currentTimeMillis());
  System.err.println( ts.toString());
  e.printStackTrace();
}

Mark

-Original Message-
From: Singh, Sandeep [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:44 PM
To: 'Struts Users Mailing List'
Subject: Out of Context


Can anybody guide me how I can put TimeStamp
in stderr file of websphere Application server,
I am using exception.printStackTrace() in my catch block of
java code.

Thanks

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:41 PM
To: 'Struts Users Mailing List'; 'Jim Crossley'
Subject: RE: [ActionForm] Returning from validate routine


Jim,

Thanks!  I was about 1/2 way there - forget to add the .do to the
reference.

Jerry

 -Original Message-
 From: Jim Crossley [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 12:55 PM
 To: Struts Users Mailing List
 Subject: Re: [ActionForm] Returning from validate routine
 
 
 The input can reference another struts action that is able to do the
 dynamic determination, e.g.
 
   input=/determinator.do?valid=no
 
 or some such thing.
 
 Jim
 
 - Original Message -
 From: Jerry Jalenak [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 1:47 PM
 Subject: [ActionForm] Returning from validate routine
 
 
  Hi All,
 
  In a validate routine, if a non-null ActionErrors object is 
 returned,
 struts
  returns to the 'page' identified on the input parameter in the
  action-mapping for the action.  I need to return to a dynamically
 determined
  'page'.  Is this possible?  If so, what has to be 
 overridden to make it
  happen?
 
  TIA,
 
 
 
  Jerry Jalenak
  Web Publishing
  LabOne, Inc.
  10101 Renner Blvd.
  Lenexa, KS  66219
  (913) 577-1496
  [EMAIL PROTECTED]
 
 
  This transmission (and any information attached to it) may 
 be confidential
 and is intended solely for the use of the individual or 
 entity to which it
 is addressed. If you are not the intended recipient or the person
 responsible for delivering the transmission to the intended 
 recipient, be
 advised that you have received this transmission in error and 
 that any use,
 dissemination, forwarding, printing, or copying of this information is
 strictly prohibited. If you have received this transmission 
 in error, please
 immediately notify LabOne at (800)388-4675.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



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

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




RE: Improving performance by splitting JSP?

2002-09-10 Thread Craig R. McClanahan

It would also be interesting to try different JSP page compilers, which
would also make a huge difference - for example, Jasper2 (used in Tomcat
4.1.x) versus the original Jasper in Tomcat 4.0.

On the Sun JVM, one additional variable is to try the -server system
property at startup time for your container.  This selects the HotSpot
mode optimized for long-running server applications, versus the default
-client setting.

Craig


On Tue, 10 Sep 2002 [EMAIL PROTECTED] wrote:

 Date: Tue, 10 Sep 2002 13:34:08 -0500
 From: [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Cc: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: Improving performance by splitting JSP?


 Our test tag was using a HashMap.

 You can view this performance quirk yourself using Struts bean:message tag.
 To get orders of magnitude in the performance discrepancy (to make sure we
 were measuring the tag performance difference on a much more significant
 scale than server access variance times) we went to 200,000 tag exectutions
 done a variety of ways:

 One of our cases was a page with 20 tags, inside a loop 10,000 times.
 Another case was same page, but done by 160 tags inside a 1250 loop.
 Another case same page rendered by includes:  page included another page 8
 times inside a 1250 loop.  The included page had 20 tags.

 There were other varieties, but these three show the discrepancy in
 performance with the increased number of tags very significantly.  All
 three cases output the same resulting html.  All three cases executed the
 tag code 200,000 times.  The first and third cases, with 20 custom tag
 occurrences, performed roughly the same (better performance).  The second
 case with 160 tags performed much much worse.  I don't have our statistics
 anymore, alas, but it was two or more orders of magnitude worse.  We tried
 an 80 tag variety as well, and it put the expected point on the slope
 (significantly worse than same output rendered via 20 tags, not as bad as
 160 tags).

 Switching to IBM VM, or turning profiling flags on in the Sun VM before
 running the tests, caused the performance discrepancy between these
 approaches to vanish (roughly the better performance mark for all three).

 Be wonderful if someone else could verify on their own.  Two days of
 cursing over it was enough for us ;-).  As soon as we realized we could fix
 the problem pages by restructuring them into separate JSPs, we declared
 victory over the Mystery of the VM ;-).

 Again this was 1.3, who knows if Sun's 1.4 vm still does this

 Jimbo

 Build a simple JSP that contains



   Hajratwala,
   Nayan (N.)  To:   'Struts Users Mailing 
List' [EMAIL PROTECTED]
   [EMAIL PROTECTED]cc:
   m   Subject:  RE: Improving performance 
by splitting JSP?

   09/10/2002 01:02
   PM
   Please respond to
   Struts Users
   Mailing List






 Was it a Hashtable or HashMap?

 It might be that since Hashtable is synchronized you were encountering a
 bottleneck in your multithreaded environment, whereas just a regular loop
 would not have this problem...

 ---
 - Nayan Hajratwala
 - Chikli Consulting LLC
 - http://www.chikli.com


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 11:48 AM
 To: Struts Users Mailing List
 Subject: RE: Improving performance by splitting JSP?



 I had to go back and look at the test code we used, but yes - looks like we
 did try a non-body tag.  It did a hashtable lookup for whatever key values
 was passed in as a parameter.  I remember we found that we could only
 recreate the performance discrepancy with tags that did some kind of memory
 lookup; just adding loops around arithmetic statements are writing output
 were tried, but did not exhibit the symptoms.

 Jim Weaver
 Software Developer - ThoughtWorks




   Martin Cooper

   martin.cooper@tumbTo:   'Struts Users
 Mailing List' [EMAIL PROTECTED]
   leweed.comcc:

  Subject:  RE: Improving
 performance by splitting JSP?
   09/09/2002 05:24 PM

   Please respond to

   Struts Users

   Mailing List











  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 09, 2002 2:51 PM
  To: Struts Users Mailing List
  Subject: RE: Improving performance by splitting JSP?
 
 
 
  Yup, we looked at overall size of the JSP as well, and the
  association with
  performance was definitely number of bm/bw tags within a
  single JSP rather
  than overall JSP size.  

Re: Tip #1

2002-09-10 Thread Eddie Bush

You'd need a descendant of ActionForm, yes.  It would have a property 
for each image button (an instance of ImageButtonBean) that you needed 
to have on your form.  It kind of yanks dyna-forms out from under you a 
little bit.  I'm not entirely sure, but possibly you could specify a 
formbean that descended from the dyna* stuff and had your button 
properties -- which could be reused and still have dynamic fields as 
well.  I'd have to dig and I'm kind of in the middle of something else 
right now :-(

Sorry.  I didn't see your reply or I'd have answered sooner.

The most straight-forward implementation would build a new ActionForm 
descendant that had properties for each of your required fields, and a 
property for each button - yes.

HTH,

Eddie

Cohan, Sean wrote:

NeverMind.  Brain freeze.

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:57 PM
To: 'Struts Users Mailing List'
Subject: Tip #1


Should we be extending ActionForm for this tip?  

I'm guessing yes since the sample Action code was listed as:

String selected = ((myForm) form).getSelected();

if (Constants.CANCEL.equals(selected)) ...




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




RE: Out of Context

2002-09-10 Thread Singh, Sandeep

Thanks Mark I will try this

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 3:33 PM
To: 'Struts Users Mailing List'
Subject: RE: Out of Context


} catch( Exception e) {
  Timestamp ts = new Timestamp( System.currentTimeMillis());
  System.err.println( ts.toString());
  e.printStackTrace();
}

Mark

-Original Message-
From: Singh, Sandeep [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:44 PM
To: 'Struts Users Mailing List'
Subject: Out of Context


Can anybody guide me how I can put TimeStamp
in stderr file of websphere Application server,
I am using exception.printStackTrace() in my catch block of
java code.

Thanks

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:41 PM
To: 'Struts Users Mailing List'; 'Jim Crossley'
Subject: RE: [ActionForm] Returning from validate routine


Jim,

Thanks!  I was about 1/2 way there - forget to add the .do to the
reference.

Jerry

 -Original Message-
 From: Jim Crossley [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 12:55 PM
 To: Struts Users Mailing List
 Subject: Re: [ActionForm] Returning from validate routine
 
 
 The input can reference another struts action that is able to do the
 dynamic determination, e.g.
 
   input=/determinator.do?valid=no
 
 or some such thing.
 
 Jim
 
 - Original Message -
 From: Jerry Jalenak [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 1:47 PM
 Subject: [ActionForm] Returning from validate routine
 
 
  Hi All,
 
  In a validate routine, if a non-null ActionErrors object is 
 returned,
 struts
  returns to the 'page' identified on the input parameter in the
  action-mapping for the action.  I need to return to a dynamically
 determined
  'page'.  Is this possible?  If so, what has to be 
 overridden to make it
  happen?
 
  TIA,
 
 
 
  Jerry Jalenak
  Web Publishing
  LabOne, Inc.
  10101 Renner Blvd.
  Lenexa, KS  66219
  (913) 577-1496
  [EMAIL PROTECTED]
 
 
  This transmission (and any information attached to it) may 
 be confidential
 and is intended solely for the use of the individual or 
 entity to which it
 is addressed. If you are not the intended recipient or the person
 responsible for delivering the transmission to the intended 
 recipient, be
 advised that you have received this transmission in error and 
 that any use,
 dissemination, forwarding, printing, or copying of this information is
 strictly prohibited. If you have received this transmission 
 in error, please
 immediately notify LabOne at (800)388-4675.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



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

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



Re: [OT]RE: accessing large/multiple files on hard drive

2002-09-10 Thread Nani Jon


Will:
I am just trying to reference them in my JSP page. I have constructed a URL which 
points to the .mp3 file: http://jupiter/music/mp3/song1.mp3   This is part of an 
iterate loop logic:iterate ... So, when the user clicks on the link the file will 
start streaming from a directory on the hard drive. I would appreciate your 
suggestions.
Thanks,
Nanijon.
 Will Etson wrote:Are you trying to access the files from Java or just reference them 
via html? If you just want a reference, Tomcat and most other web servers have a 
notion of a virtual directory. I believe with tomcat you can set this up with context 
entry pointing to some random directory. If you want to reference the MP3s via Java, I 
used a property file to indicate the directory the my mp3s are stored in along with 
the virtual reference from the new Tomcat Context. This is essentially the same as 
having two web applications. One being deployed as an ear and one as an web 
application with its document root as a directory reference to the mp3 collection. The 
only draw back I found to this is that tomcat treats mime mappings somewhat strangely. 
.MP3 and .mp3 are not equal. .mp3 returns the right mime mapping and .MP3 was 
returned as an octet string.

P.S. If some one has a better solution I be glad to hear it. I toyed around with the 
idea of hijacking the Invoker servlet with a struts action but I didn't feel this was 
very portable and the purpose of this app was to demonstrate best practices i.e. 
portability.

 09/09/02 02:06PM  
This has got to be a candidate for the worst, messiest solution ever... 

Worse comes to worse, you could have two applications... one that holds 
and serves up the mp3 files and the other that does all the other 
work... 

I'm sure there is a hole a mile wide in this idea... 



-Original Message- 
From: ekbush [ mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 09, 2002 4:39 PM 
To: struts-user 
Subject: Re: accessing large/multiple files on hard drive 


That could get quite tricky if you're running out of a WAR archive. If 
your application is deployed in unpacked format, then you could 
sym-link (on Un*x anyway) to it I would think. So you'd wind up with a 
sym-link in your root (or protected under WEB-INF) that pointed to the 
real directory. I can't think of another elegant solution. Maybe 
someone else can. 

Regards, 

Eddie 

Nani Jon wrote: 

Hi: 
 
Here is my sitiuation. I have deployed my application war file to a 
JBoss_Tomcat caontainer. I have developed this app using struts. I am 
trying to access multiple music files (mp3 format) form this app. I 
don't want to wrap all of my mp3 files which total to about 1 GB in my 
war file. This makes for a very lenghty deploy process, especially when 
it is work in progress. I just want to put them in a directory on the 
server where Tomcat is running and point to that directory in my 
application. How is this done. Your help is greatly appreciated. 
 
Thanks, 
 
Nanijon. 
 



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



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


RE: Servlte-level Resource Files

2002-09-10 Thread Galbreath, Mark

I don't know why you would want to do this, but you have a few of options
(and probably more):

1.  declare the wanted resources as instance variable final Strings in each
servlet;

2.  load the resources into a separate java.util.Properties class with
groups of resources available in different returning static methods and have
the servlets call the appropriate method;

3.  put the resources in difference database tables as strings with each
key-value pair separated by some delimiter recognized by default by
java.util.Properties, and have the servlets get them via some type of data
access object which would read the records into a StringBuffer, call
toString(), load the string into a ByteArrayOutputStream that is chained to
a ByteArrayInputStream and call properties.load( inputStream).

Mark

-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 3:15 PM
To: Struts Users Mailing List
Subject: Servlte-level Resource Files


Hi folks,

I don't know if anybody is doing this.  I want to move the resoruces to the
servlet level which means each servlet has its own resources instead of
putting the entire app's subtitutes in ApplicationResources.properties.  If
you have the mechanism like this, would you please give me some points for
how to do it.

Thanks!

Billy Ng

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




Re: Servlte-level Resource Files

2002-09-10 Thread Eddie Bush

Sub-applications may have their own resources.  That's not quite as 
fine-grained as you are talking about, but it's a lot finer-grained than 
it used to be.  Also, James Mitchell has recently completed a 
DBMessageResources which will suck in your resources from a DB table 
(you could use basically any JDBC-capable DBMS to store them; that's an 
assumption based off the fact that he's using OJB).

Regards,

Eddie

Billy Ng wrote:

Hi folks,

I don't know if anybody is doing this.  I want to move the resoruces to the servlet 
level which means each servlet has its own resources instead of putting the entire 
app's subtitutes in ApplicationResources.properties.  If you have the mechanism like 
this, would you please give me some points for how to do it.

Thanks!

Billy Ng




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




RE: Servlte-level Resource Files

2002-09-10 Thread James Mitchell

It doesn't actually 'suck in' the data.  I've implemented a database call
for getMessage() based on a few predetermined variables (current module,
bundleKey, etc).

This way you won't ever have to ask for 'reload' capabilities, because it is
never 'loaded' to begin with.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 3:57 PM
 To: Struts Users Mailing List
 Subject: Re: Servlte-level Resource Files


 Sub-applications may have their own resources.  That's not quite as
 fine-grained as you are talking about, but it's a lot finer-grained than
 it used to be.  Also, James Mitchell has recently completed a
 DBMessageResources which will suck in your resources from a DB table
 (you could use basically any JDBC-capable DBMS to store them; that's an
 assumption based off the fact that he's using OJB).

 Regards,

 Eddie

 Billy Ng wrote:

 Hi folks,
 
 I don't know if anybody is doing this.  I want to move the
 resoruces to the servlet level which means each servlet has its
 own resources instead of putting the entire app's subtitutes in
 ApplicationResources.properties.  If you have the mechanism like
 this, would you please give me some points for how to do it.
 
 Thanks!
 
 Billy Ng
 



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



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




RE: Servlte-level Resource Files

2002-09-10 Thread Jason Rosen

James,

Sounds like you did some nice work with the DBMessageResources - I can't
wait to use it!

Jason

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:04 PM
To: Struts Users Mailing List
Subject: RE: Servlte-level Resource Files


It doesn't actually 'suck in' the data.  I've implemented a database call
for getMessage() based on a few predetermined variables (current module,
bundleKey, etc).

This way you won't ever have to ask for 'reload' capabilities, because it is
never 'loaded' to begin with.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 3:57 PM
 To: Struts Users Mailing List
 Subject: Re: Servlte-level Resource Files


 Sub-applications may have their own resources.  That's not quite as
 fine-grained as you are talking about, but it's a lot finer-grained than
 it used to be.  Also, James Mitchell has recently completed a
 DBMessageResources which will suck in your resources from a DB table
 (you could use basically any JDBC-capable DBMS to store them; that's an
 assumption based off the fact that he's using OJB).

 Regards,

 Eddie

 Billy Ng wrote:

 Hi folks,
 
 I don't know if anybody is doing this.  I want to move the
 resoruces to the servlet level which means each servlet has its
 own resources instead of putting the entire app's subtitutes in
 ApplicationResources.properties.  If you have the mechanism like
 this, would you please give me some points for how to do it.
 
 Thanks!
 
 Billy Ng
 



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



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

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




Re: How to use logic:present

2002-09-10 Thread Keven

 % if(request.getSession().getAttribute(User) != null) { %  is same as
logic:present name=User scope=session, is it right? If it is right,
why the former works, but the latter does not.(I have the line %@ taglib
uri=/WEB-INF/struts-logic.tld prefix=logic % in my jsp file).

Cn someone give me an example on how to use logic:present? I searched from
web, I can't find a specific example including the usage of logic:present.

Thanks,

Keven


  From: Keven [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 09, 2002 7:41 PM
  To: Struts Users Mailing List
  Subject: How to use logic:present
 
 
  Hi, all:
 
  I want to use logic:present to check if user has logon.
 
  If I use % if(request.getSession().getAttribute(User) !=
  null) { % .
  it works fine. but I change it to use logic:present. I changed it to
  logic:present name=User scope=session...
  /logic:present. But it
  never evaluate logic:present... as true. Am I doing
  somethig wrong here?
  How to use logic:present.Could some one give me an example?
 
  Thanks,
 
  Keven
 
  __
  
  Post your ad for free now! http://personals.yahoo.ca
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 

__ 
Post your ad for free now! http://personals.yahoo.ca

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




Re: Servlte-level Resource Files

2002-09-10 Thread Eddie Bush

James Mitchell wrote:

It doesn't actually 'suck in' the data.  I've implemented a database call
for getMessage() based on a few predetermined variables (current module,
bundleKey, etc).

This way you won't ever have to ask for 'reload' capabilities, because it is
never 'loaded' to begin with.

Hey - that's slick!  Is it performant too?  How did you manage to get 
the current module?  I'll have to dig through your code when I get a 
chance ... sounds quite nice!

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




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




Re: ActionError question

2002-09-10 Thread Dave Derry

You could have an entry in your properties file like error.generic={0}

Then use new ActionError( error.generic, The legacy error message );

That what you were looking for?
Dave Derry


- Original Message - 
From: Ashish Kulkarni [EMAIL PROTECTED]


 Hi,
 Does ActionError class read value from properties
 file??
 what if i have an error message coming from some
 legacy application, can i still user ActionError, 
 if yes how do i build a ActionError class with this
 message??
 
 
 =
 A$HI$H



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




Re: Using global forwards to tile definitions?

2002-09-10 Thread Dylan van Iersel

On Tue, 2002-09-10 at 19:33, Cedric Dumoulin wrote:

  Yes, the problem comes from  html:link. It is not a bug: Tiles 
definitions name are logical names, not URLs. html:link require a real 
URL to work because its result is interpreted on the server side.


The tag is processed on the server side but the actual result is an URL
which get sent back to the client within the HTML. That leads me to
think that the tag can generate a 'normal' URL from a symbolic name
perfectly well. 


   Cedric

[EMAIL PROTECTED] wrote:

Well, that does help.  I can stop banging my head against the desk
now...

In the struts book online it covers this...

definition name=storefront.superuser.main
extends=storefront.default
put name=header value=/common/super_header.jsp /
put name=menubar value=/common/super_menubar.jsp /
put name=copyright value=/common/copyright.jsp /  
  /definition  
/tiles-definitions

global-forwards
 forward name=Super_Success path=storefront.superuser.main /   
/global-forwards



So this is a problem in the HTML:Link forward code?  Is it intentional? 
Is it something I can look at fixing?

Thanks for the answer!




-Original Message-
From: cedric [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 12:24 PM
To: struts-user
Subject: Re: Using global forwards to tile definitions?



  The html:link tag can't be used with a Tiles name as path. You need 
to use an intermediate action. An often used solution is to have an 
action taking a definition name as http parameter, like the tiles 
DefinitionDispatcherAction. This action should check if the provided 
definition name is allowed, otherwise it is possible to access all your 
definitions.
  Your global forward could now look like:

   forward name=home
path=path.to.dispatcheraction.do?def=plantsec.index/

  Hope this help,
 Cedric

[EMAIL PROTECTED] wrote:

  

I'm going back and trying to implement some best practices that I
skipped over in the beginning.  One of which is to use global forwards
alot.   

Say I have some global forwards that look like this:

global-forwards
  forward name=home  path=plantsec.index/
  forward name=faqMain   path=plantsec.faq/
  forward name=contactMain   path=plantsec.contact/


And in my JSP pages I use:

html:link forward=contactMainContact Us/html:link

I can see the benefit that gives me.

But if I have a tiles definition for the plantsec.faq it does not seem
to want to run that.  Am I doing something wrong or do I need to use an
action for every one of those?  That is the only way I can seem to make
it work...

Any help is appreciated






William B Chmura
Internet Services Admin / IT Department 
Ensign-Bickford Industries, Inc and subsidiaries

Tel: 860.843.1542
660 Hopmeadow Street
Simsbury, CT  06070

http://www.e-bind.com
http://www.e-bco.com
http://www.e-brealty.com
http://www.eba-d.com
http://www.applied-food.com




 






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



  




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


Groeten, 

Dylan 

 
Dylan van Iersel 
E-mail:   [EMAIL PROTECTED]
Web: http://www.van-iersel.org
ICQ#:46244248 
 




html:image pageKey

2002-09-10 Thread Cohan, Sean

I'm having trouble trying to use html:image pagekey=... /  Am I using the
correct syntax?  In my jsp I have:

   html:image pageKey=login.image/

and in my ApplicationResources.properties I have:

login.image=/images/login.gif

In my struts_config.xml I have:

  message-resources
parameter=gov.doc.bis.ecass2k.ui.struts.ApplicationResources/

and in my web.xml I have:

servlet
servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
   param-nameapplication/param-name
 
param-valuegov.doc.bis.ecass2k.ui.struts.ApplicationResources/param-value

/init-param

Thanks.

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




The Shifting Session Action.LOCALE_KEY Value Mystery -- Sleuths Welcome!

2002-09-10 Thread micael

I use the following page to set the session Action.LOCALE_KEY to some 
language.  (I know, it could be done differently.)  This works great except 
I get the correct Action.LOCALE_KEY value for every page except 
index.jsp.  Why would that be?  I had this configured before so the index 
page also worked.

Now, if I set the language to, say lang=ko, it works in every page but the 
index page and the index page shows that the session object is different 
than the session object is on every other page.  That is nutty.  Anyone 
have an idea?

%@ page language=java import=java.util.*,org.apache.struts.action.* 
contentType=text/html;charset=utf-8 %
%@ taglib uri=template prefix=template %
%@ taglib uri=bean prefix=bean %
%@ taglib uri=html prefix=html %
html:html locale=true

%
 String language = null;
 String localeValue = request.getParameter(locale);

 if(localeValue != null) {
language = localeValue.substring(0, 2);
response.setContentType(text/html;charset=utf-8);
Locale newLocale = new Locale(language);
session.setAttribute(Action.LOCALE_KEY, newLocale);
 }

%

template:insert template=../template/template_work.jsp
   template:put name=title content=../title/language_title.jsp/
   template:put name=navigation 
content=../navigation/standard_navigation.jsp/
   template:put name=content content=../content/language_content.jsp/
/template:insert

/html:html



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




Re: The Shifting Session Action.LOCALE_KEY Value Mystery -- Sleuths Welcome!

2002-09-10 Thread micael

On this situation, if the index page is in another language, it works on 
the index.jsp page fine, i.e., if I set my browser to Italian, Chinese, 
etc. it will show up correctly.


At 01:49 PM 9/10/2002 -0700, you wrote:
I use the following page to set the session Action.LOCALE_KEY to some 
language.  (I know, it could be done differently.)  This works great 
except I get the correct Action.LOCALE_KEY value for every page except 
index.jsp.  Why would that be?  I had this configured before so the index 
page also worked.

Now, if I set the language to, say lang=ko, it works in every page but the 
index page and the index page shows that the session object is different 
than the session object is on every other page.  That is nutty.  Anyone 
have an idea?

%@ page language=java import=java.util.*,org.apache.struts.action.* 
contentType=text/html;charset=utf-8 %
%@ taglib uri=template prefix=template %
%@ taglib uri=bean prefix=bean %
%@ taglib uri=html prefix=html %
% String language = null; String localeValue = 
request.getParameter(locale); if(localeValue != null) { language = 
localeValue.substring(0, 2); 
response.setContentType(text/html;charset=utf-8); Locale newLocale = new 
Locale(language); session.setAttribute(Action.LOCALE_KEY, newLocale); } % 
-- To unsubscribe, e-mail: For additional commands, e-mail:



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




Session Values for Action.LOCALE_KEY Change

2002-09-10 Thread micael

I set the session locale in a language.jsp page with:
   session.setAttribute(Action.LOCALE_KEY, new Locale(language));
where language is a return from a form parameter locale via:
String localeValue = request.getParameter(locale);
String language = localeValue.substring(0, 2);
This works on all pages, except the index.jsp page.  I can set the language 
variable to ko and the entire site will stay on Korean, but when I go to 
the index.jsp page, it is back to English.  If I go from the index.jsp page 
back to the other pages, they stay in Korean.  I am very puzzled.

Any ideas.  I posted this before, but it chopped my code off.



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




RE: Question: Configuring Multiple message-resources Elements W ith Sub-Applications

2002-09-10 Thread Hohlen, John

Well, I think I finally figured all this stuff out.  It sure wasn't clear
from any of the documentation I looked at.  I'm not slamming the documenters
out there b/c I know how it is.  I just thought somewhere I'd find a clear
explanation on this.  I think the sub-application feature is one of the best
things about Struts 1.1:  Here's what you need to know:

1) Whatever key name you specify for a message-resource in a sub-app
config file (e.g. SUB_APP_A_MESSAGES_KEY in my example below) gets a /
plus the module name concantenated to it.  So in my example, the message
resource object (properties) gets stored in application scope under the key
name SUB_APP_A_MESSAGES_KEY/sub-app-a.

2) In your JSP file, if you want to use the html:errors tag and the error
messages are in a sub-app's message resource file, you'll need to specify
the resource bundle.  For example:

html:errors bundle=SUB_APP_A_MESSAGES_KEY/sub-app-a /

Be sure to include the errors.header, errors.footer, errors.prefix, and
errors.suffix key/value pairs each sub-app's message resource file if you're
using the html:errors tag.  This was one thing I don't like about this
approach.  These header keys are duplicated across files -- if you're
placing error messages for each sub-app in the corresponding message
resource file.  Unless I'm missing something, I think these header keys must
be in the same file as the error message.

3) To write text in a JSP from a sub-app's message resource file, be sure to
include the sub-app bundle:

bean:message key=copyright.notice
bundle=SUB_APP_A_MESSAGES_KEY/sub-app-a/

Note:
-
Now that I understand the naming convention for the keys to store/retrieve
message resources by sub-app, I thought my convention was redundant.
Therefore I changed the key name in ALL my sub-app config files to just be
MESSAGE.  For example:

  message-resources key=MESSAGE 
 parameter=com.abc.training.LoginMessages 
 null=false/

This will result in key names as follows:

MESSAGE/sub-app-a
MESSAGE/sub-app-b
MESSAGE/sub-app-c
...

Whew! I finally got this working!!

JOHN
-Original Message-
From: Hohlen, John 
Sent: Tuesday, September 10, 2002 12:56 PM
To: 'Struts Users Mailing List'
Subject: RE: Question: Configuring Multiple message-resources Elements
W ith Sub-Applications


Whoops!  In my examples below, the action tags should actually be
action-mappings.  That was a cut-and-paste error on my part and not
relevant to this problem.  I fixed the examples in this reply.

-Original Message-
From: Hohlen, John 
Sent: Tuesday, September 10, 2002 11:43 AM
To: Struts-Help (E-mail)
Cc: '[EMAIL PROTECTED]'
Subject: Question: Configuring Multiple message-resources Elements
With Sub-Applications


If I'm using multiple message resource files with sub-applications, do I
need declare all the message resource files in the default struts config
file or do I declare each message resource file in the corresponding
sub-app's struts config file? I searched the mailing lists, Struts
documentation, and the online chapter's in Chuck Cavaness' upcoming Struts
book (O'Reilly).  I have not found a clear example on how to do this.


Example #1 - Declaring All Message Resources In struts-config.xml:
=

  --- struts-config.xml-
struts-config
  message-resources parameter=com.abc.training.Messages 
  null=false/ 

  message-resources key=SUB_APP_A_MESSAGES_KEY 
   parameter=com.abc.training.SubAppAMessages 
null=false/  

/struts-config

  --- struts-config-sub-app-a.xml-
struts-config
   form-beans
 ...
   /form-beans
   action-mappings
 ...
   /action-mappings
/struts-config



Example #2 - Declaring Each Message Resource In Each Sub App's
struts-config-xml:



  --- struts-config.xml-
struts-config
  message-resources parameter=com.abc.training.Messages 
  null=false/

/struts-config


  --- struts-config-sub-app-a.xml-
struts-config
  form-beans
...
  /form-beans
  action-mappings
...
  /action-mappings

  message-resources key=SUB_APP_A_MESSAGES_KEY 
   parameter=com.abc.training.SubAppAMessages 
null=false/  

/struts-config

I can't get either approach to work.  If I use approach #1, error keys are
not properly located for errors placed in the errors container by
sub-application A.  Hence, error mesages appear as ???en_US.key???.  But
this approach does work for JSP text retrieved from sub-app A's message
resource file (as long as I specify the bundle attribute).  

If I use approach #2, I get the following exception (WebLogic 6.1 with SP2
or SP3):
   
javax.servlet.ServletException: 

  1   2   >