DO NOT REPLY [Bug 15697] - AbstractMethodError when using Plugins like Tiles and Validator

2002-12-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697

AbstractMethodError when using Plugins like Tiles and Validator

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-12-28 08:09 ---
Eddie - thanks for the tip.  It turned out to be the struts-menu plugin.  Now 
I just have to figure out how to make it jive with the latest Struts version.

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




DO NOT REPLY [Bug 15697] - AbstractMethodError when using Plugins like Tiles and Validator

2002-12-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697

AbstractMethodError when using Plugins like Tiles and Validator





--- Additional Comments From [EMAIL PROTECTED]  2002-12-28 08:47 ---
Just in case any else encounters this error - I might as well document the 
fix ;)

I had to add the following to the MenuPlugIn.java class:

/** The plugin config object provided by the ActionServlet initializing
 *  this plugin.
 */
protected PlugInConfig currentPlugInConfigObject;

/**
 * Method used by the ActionServlet initializing this plugin.
 * Set the plugin config object read from module config.
 * @param currentPlugInConfigObject
 */
public void setCurrentPlugInConfigObject(PlugInConfig 
currentPlugInConfigObject) {
this.currentPlugInConfigObject = currentPlugInConfigObject;
}

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




DO NOT REPLY [Bug 15697] - AbstractMethodError when using Plugins like Tiles and Validator

2002-12-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697

AbstractMethodError when using Plugins like Tiles and Validator





--- Additional Comments From [EMAIL PROTECTED]  2002-12-28 14:12 ---
I have added the capability to get the config object from a plugin by declaring a  
setCurrentPlugInConfigObject(Object) setter in the plugin. 
  This property is set only if the plugin declare the appropriate method. If a 
plugin doesn't need the property, it should not declare the method.
  I don't see why your menu-plugin need to declare the method. I suspect that your 
plugin just need to be recompiled with the latest struts jar files. Can you
confirm/ infirm this ?

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




Re: Switching Modules - isn't working for me...

2002-12-28 Thread Cedric Dumoulin

 Hi,

 For me it sound like a binary version problem. Maybe one of your 
plugin has been compiled with an older and incompatible jar file.

 The tiles-documentation.war file use modules and tiles (module 
default, example, test). It works on my configuration.
 Hope this help,

   Cedric


Matt Raible wrote:

I tried switching to last night's build, but that appears to be even
worse - I can't even use the default module.  I get the following error
the first time (and all other times) I hit an action:

- Root Cause -
java.lang.AbstractMethodError
	at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava:1096)
	at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)

My log file never shows any modules getting initialized (save '').  The
last build I had, from 11-24, the default app worked, just the switching
didn't.  Are there any sample applications I can prove this works
against?

Thanks,

Matt

 

-Original Message-
From: 	Matt Raible [mailto:[EMAIL PROTECTED]] 
Sent:	Friday, December 27, 2002 1:37 AM
To:	'[EMAIL PROTECTED]'
Subject:	Switching Modules - isn't working for me...

It's late, so it's possible my problem is something small and 
I just need a second set of eyes on it.  I am trying to 
configure my application have an upload module.  I'm 
following the instructions at 
http://jakarta.apache.org/struts/userGuide/configuration.html#
module_config-switching.

In my global-forwards, I have the following forward:

   !-- Switch to upload sub-application --
   forward name=uploadResume contextRelative=true
   path=/upload/index.do redirect=true /

I have my ActionServlet configured as follows:

   init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
   param-nameconfig/upload/param-name
   param-value/WEB-INF/struts-upload.xml/param-value
   /init-param

And struts-upload.xml has the following action-mappings:

   !-- Router to upload tiles definition --
   action
   path=/index
   type=org.apache.struts.actions.ForwardAction
   parameter=upload/
   
   !-- Upload Action --
   actionpath=/uploadFile
  type=org.appfuse.webapp.actions.UploadAction
  name=uploadForm
 scope=request
 input=upload
   forward name=success path=display /
  /action

Where upload and display are tiles definitions.  When I 
try to access this forward (either via link or direct URL), I get:

Tomcat 404: The requested resource (/appfuse/upload) is not available.

And in the log file:

INFO [Thread-4] 
[org.apache.struts.util.PropertyMessageResources] 
PropertyMessageResources.init(127) | Initializing, c
onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
INFO [Thread-4] 
[org.apache.struts.tiles.TilesRequestProcessor] 
TilesRequestProcessor.initDefinitionsMapping(154) | Tile
s definition factory found for request processor '/upload'.
INFO [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.process(225) | Processing a 'GET' for path
'/index'
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processActionCreate(305) |  Looking for Ac
tion instance for class org.apache.struts.actions.ForwardAction
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processActionCreate(321) |   Creating new
Action instance
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processForwardConfig(428) | processForward
Config(ForwardConfig[name=null,path=upload,redirect=false,cont
   

extRelative=true])
 


Any ideas?

Thanks,

Matt


   


 



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




DO NOT REPLY [Bug 15697] - AbstractMethodError when using Plugins like Tiles and Validator

2002-12-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697

AbstractMethodError when using Plugins like Tiles and Validator





--- Additional Comments From [EMAIL PROTECTED]  2002-12-28 17:55 ---
I compiled with the latest nightly of Struts and got some deprecation warnings 
for ApplicationConfig, but it wouldn't compile because of the init
(ActionServlet, ModuleConfig) method:

[javac] 
D:\source\StrutsMenu\src\share\com\fgm\web\menu\MenuPlugIn.java:26: 
com.fgm.web.menu.MenuPlugIn should be declared abstract; it does not d
efine init
(org.apache.struts.action.ActionServlet,org.apache.struts.config.ModuleConfig) 
in com.fgm.web.menu.MenuPlugIn
[javac] public class MenuPlugIn implements PlugIn {
[javac]^

Changing my init method to use init(ActionServlet, ModuleConfig) vs. 
(ActionServlet, ApplicationConfig) fixed the problem.  Does this break 
backwards compatibility with old PlugIns?

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




cvs commit: jakarta-struts/doc/userGuide building_view.xml

2002-12-28 Thread husted
husted  2002/12/28 13:53:15

  Modified:doc/userGuide building_view.xml
  Log:
  Conform line-ends only. No content changes.
  
  Revision  ChangesPath
  1.24  +969 -674  jakarta-struts/doc/userGuide/building_view.xml
  
  Index: building_view.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_view.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- building_view.xml 27 Dec 2002 11:57:48 -  1.23
  +++ building_view.xml 28 Dec 2002 21:53:15 -  1.24
  @@ -1,7 +1,11 @@
   ?xml version=1.0?
   document url=./building_view.xml
   
  -  properties
  +!--
  +//  78
  +--
  +
  +properties
   authorCraig R. McClanahan/author
   authorMike Schachter/author
   authorTed Husted/author
  @@ -10,239 +14,294 @@
   authorJames DeVries/author
   authorDavid Graham/author
   titleThe Struts User's Guide - Building View Components/title
  -  /properties
  +/properties
   
  -  body
  -  chapter name=3. Building View Components href=building_view
  +body
  +chapter name=3. Building View Components href=building_view
   
  -  section name=3.1 Overview href=overview
  +section name=3.1 Overview href=overview
   
  -p
  -This chapter focuses on the task of building the iView/i components
  -for use with the Struts framework. Many applications rely on JavaServer 
Pages
  -(JSP) technology to create the presentation layer. The Struts distribution
  -includes a comprehensive JSP tag library that provides support for building
  -internationalized applications, as well as for interacting with input forms.
  -Several other topics related to the View components are briefly discussed.
  -  /p
  +p
  +This chapter focuses on the task of building the iView/i components
  +for use with the Struts framework. 
  +Many applications rely on JavaServer Pages (JSP) technology to create the 
  +presentation layer. 
  +The Struts distribution includes a comprehensive JSP tag library that 
  +provides support for building internationalized applications, as well as 
  +for interacting with input forms.
  +Several other topics related to the View components are briefly discussed.
  +/p
   
  -/section
  +/section
  +
  +section name=3.2 Internationalized Messages href=i18n
  +
  +p
  +A few years ago, application developers could count on having to support
  +only residents of their own country, who are used to only one (or 
  +sometimes two) languages, and one way to represent numeric quantities like 
  +dates, numbers, and monetary values.  
  +However, the explosion of application development based on web 
  +technologies, as well as the deployment of such applications on the 
  +Internet and other broadly accessible networks, have rendered national 
  +boundaries invisible in many cases.  
  +This has translated (if you will pardon the pun) into a need for 
  +applications to support iinternationalization/i (often called i18n 
  +because 18 is the number of letters in between the i and the n) and 
  +ilocalization/i.
  +/p
  +
  +p
  +Struts builds upon the standard classes available on the Java platform to
  +build internationalized and localized applications. 
  +The key concepts to become familiar with are:
  +/p
  +
  +ul
  +
  +li
  +a href=http://java.sun.com/j2se/1.4.1/docs/api/java/util/Locale.html;
  +bLocale/b/a - The fundamental Java class that supports 
  +internationalization is codeLocale/code.  
  +Each codeLocale/code represents a particular choice of country and 
  +language (plus an optional language variant), and also a set of 
  +formatting assumptions for things like numbers and dates.
  +/li
  +
  +li
  +a 
href=http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html;
  +bResourceBundle/b/a - The codejava.util.ResourceBundle/code 
  +class provides the fundamental tools for supporting messages in 
  +multiple languages.  
  +See the Javadocs for the codeResourceBundle/code class, and the 
  +information on Internationalization in the documentation bundle for your 
  +JDK release, for more information.
  +/li
  +
  +li
  +a 
href=http://java.sun.com/j2se/1.4.1/docs/api/java/util/PropertyResourceBundle.html;
  +bPropertyResourceBundle/b/a - One of the standard 
  +implementations of codeResourceBundle/code allows you to define 
  +resources using  the same name=value syntax used to initialize 
  +properties files.  
  +This is very convenient for preparing resource bundles 

cvs commit: jakarta-struts/doc/faqs actionForm.xml project.xml index.xml

2002-12-28 Thread husted
husted  2002/12/28 14:27:48

  Modified:doc/faqs project.xml index.xml
  Added:   doc/faqs actionForm.xml
  Log:
  Move 3.3.1 into Howto as Building an ActionForm. Break-out IDE howtos.
  
  Revision  ChangesPath
  1.7   +35 -10jakarta-struts/doc/faqs/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/faqs/project.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- project.xml   29 Nov 2002 21:24:49 -  1.6
  +++ project.xml   28 Dec 2002 22:27:48 -  1.7
  @@ -1,24 +1,49 @@
   ?xml version=1.0 encoding=ISO-8859-1?
  -project name=Apache Struts Web Application Framework
  - href=http://jakarta.apache.org/struts;
  -image=images/struts.gif
  +
  +project 
  +name=Apache Struts Web Application Framework
  +href=http://jakarta.apache.org/struts;
  +image=images/struts.gif
   
   titleApache Struts Web Application Framework/title
   
   menu name=FAQs
  -item href=kickstart.html name=Kickstart/
  -item href=newbie.html name=Newbie/
  -item href=helping.html name=How to Help/
  +item 
  +href=kickstart.html 
  +name=Kickstart/
  +item 
  +href=newbie.html 
  +name=Newbie/
  +item 
  +href=helping.html 
  +name=How to Help/
   /menu
   
   menu name=Howto Guides
  -item href=ssl.html name=SSL/
  -item href=netbeans.html name=Netbeans/
  -item href=eclipse.html name=Eclipse/
  +item 
  +href=actionForm.html 
  +name=Action Forms/
  +item 
  +href=indexedprops.html 
  +name=Indexed Properties/
  +item 
  +href=ssl.html 
  +name=SSL/
  +/menu
  +
  +menu name=IDE Guides
  +item 
  +href=eclipse.html 
  +name=Eclipse/
  +item 
  +href=netbeans.html 
  +name=Netbeans/
   /menu
   
   menu name=Struts
  -item name=Welcome href=../index.html/
  +item 
  +name=Welcome 
  +href=../index.html/
   /menu
   
   /project
  
  
  
  1.6   +56 -12jakarta-struts/doc/faqs/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/faqs/index.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.xml 30 Nov 2002 22:25:16 -  1.5
  +++ index.xml 28 Dec 2002 22:27:48 -  1.6
  @@ -1,17 +1,30 @@
   ?xml version=1.0 encoding=ISO-8859-1?
  +
   document url=./index.xml
  +
   properties
  -authorTed Husted/author
  -titleFAQs and Howtos - Apache Struts/title
  +authorTed Husted/author
  +titleFAQs and Howtos - Apache Struts/title
   /properties
  +
   body
   
   section name=Struts FAQs
   
ul
  -lia href=kickstart.htmlKickstart FAQ/a (read me first)/li
  -lia href=newbie.htmlNewbie FAQ/a /li
  -lia href=helping.htmlHow to Help FAQ/a /li
  +
  +li
  +a href=kickstart.htmlKickstart FAQ/a (read me first)
  +/li
  +
  +li
  +a href=newbie.htmlNewbie FAQ/a
  +/li
  +
  +li
  +a href=helping.htmlHow to Help FAQ/a
  +/li
  +
/ul
   
   /section
  @@ -19,10 +32,35 @@
   section name=Howto Guides
   
ul
  -lia href=ssl.htmlUsing the SSL protocol/a/li
  -lia href=eclipse.htmlInstalling the Eclipse IDE/a/li
  -lia href=netbeans.htmlInstalling the Netbeans IDE/a/li
  -lia href=indexedprops.htmlIndexed Properties, Mapped Properties, and 
Indexed Tags/a/li
  +
  +li
  +a href=actionForm.htmlBuilding an Action Form/a
  +/li
  +
  +li
  +a href=indexedprops.htmlIndexed Properties, Mapped Properties, and Indexed 
Tags/a
  +/li
  +
  +li
  +a href=ssl.htmlUsing the SSL protocol/a
  +/li
  +
  + /ul
  +
  +/section
  +
  +section name=IDE Guides
  +
  + ul
  +
  +li
  +a href=eclipse.htmlInstalling the Eclipse IDE/a
  +/li
  +
  +li
  +a href=netbeans.htmlInstalling the Netbeans IDE/a
  +/li
  +
/ul
   
   /section
  @@ -30,15 +68,21 @@
   section name=Offsite FAQs and Howtos
   
ul
  -lia href=http://www.jguru.com/faq/home.jsp?topic=Struts;jGuru FAQ/a/li
  +li
  +a href=http://www.jguru.com/faq/home.jsp?topic=Struts;jGuru FAQ/a
  +/li
/ul
   
ul
  -lia href=http://strutstestcase.sourceforge.net;Unit testing with Struts 
Use Case/a/li
  +li
  +a href=http://strutstestcase.sourceforge.net;Unit testing with Struts Use 
Case/a
  +/li
/ul
   
ul
  -lia href=http://www.husted.com/struts/tips;Struts Tips/a/li
  +li
  +a href=http://www.husted.com/struts/tips;Struts Tips/a
  +/li
/ul
   
   /section
  

cvs commit: jakarta-struts/doc/userGuide index.xml building_view.xml

2002-12-28 Thread husted
husted  2002/12/28 14:28:27

  Modified:doc/userGuide index.xml building_view.xml
  Log:
  Move 3.3.1 into Howto as Building an ActionForm. Move 3.3.6 up as 3.3.1.
  
  Revision  ChangesPath
  1.25  +1 -2  jakarta-struts/doc/userGuide/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/index.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- index.xml 27 Dec 2002 02:38:43 -  1.24
  +++ index.xml 28 Dec 2002 22:28:27 -  1.25
  @@ -82,12 +82,11 @@
   lia href=building_view.html#i18n3.2 
Internationalization/a/li
   lia href=building_view.html#form_beans3.3 Forms and FormBean 
Interactions/a
   ul
  -lia href=building_view.html#forms3.3.1 Building Forms 
With Struts/a/li
  +lia href=building_view.html#indexed3.3.1 Indexed amp; 
Mapped Properties/a/li
   lia href=building_view.html#form_input3.3.2 Input Field 
Types Supported/a/li
   lia href=building_view.html#presentation_tags3.3.3 Other 
Useful Presentation Tags/a/li
   lia href=building_view.html#form_validation3.3.4 
Automatic Form Validation/a/li
   lia href=building_view.html#struts_validator3.3.5 Struts 
Validator/a/li
  -lia href=building_view.html#indexed3.3.6 Indexed amp; 
Mapped Properties/a/li
   /ul/li
   lia href=building_view.html#other_presentations3.4 Other 
Presentation Techniques/a
   ul
  
  
  
  1.25  +27 -282   jakarta-struts/doc/userGuide/building_view.xml
  
  Index: building_view.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_view.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- building_view.xml 28 Dec 2002 21:53:15 -  1.24
  +++ building_view.xml 28 Dec 2002 22:28:27 -  1.25
  @@ -272,276 +272,39 @@
   handle the incoming files. 
   Struts handles these multipart forms in a way identical to building 
   normal forms. 
  -In the next section, we will cover using Struts to create a simple login 
  -form, and also a simple mulitpart form.
   /p
  -
  -/section
  -
  -section name=3.3.1 Building Forms With Struts href=forms
  -
  -p
  -A complete example of a login form will illustrate how Struts
  -makes dealing with forms much less painful than using straight HTML
  -and standard JSP facilities.  
  -Consider the following page (based on the example application included 
  -with Struts) named codelogon.jsp/code:
  -/p
  -
  -hr/
  -
  -precode![CDATA[
  -%@ page language=java %
  -%@ taglib 
  -uri=/WEB-INF/struts-html.tld
  -prefix=html %
  -%@ 
  -taglib uri=/WEB-INF/struts-bean.tld
  -prefix=bean %
  -html:html
  -head
  -title
  -bean:message key=logon.title/
  -/title
  -/head
  -body bgcolor=white
  -html:errors/
  -html:form action=/logon focus=username
  -table border=0 width=100%
  -tr
  -th align=right
  -bean:message key=prompt.username/
  -/th
  -td align=left
  -html:text 
  -property=username
  -size=16/
  -/td
  -/tr
  -tr
  -th align=right
  -bean:message key=prompt.password/
  -/th
  -td align=left
  -html:password 
  -property=password
  -size=16/
  -/td
  -/tr
  -tr
  -td align=right
  -html:submit
  -bean:message key=button.submit/
  -/html:submit
  -/td
  -td align=right
  -html:reset
  -bean:message key=button.reset/
  -/html:reset
  -/td
  -/tr
  -/table
  -/html:form
  -/body
  -/html:html
  -]]/code/pre
  -
  -hr/
  -
  -p
  -The following items illustrate the key features of form handling in Struts,
  -based on this example:
  -/p
  -
  -ul
  -
  -li
  -The codetaglib/code directive tells the JSP page compiler where to
  -find the itag library descriptor/i for the Struts tag library.  
  -In this case, we are using codebean/code as the prefix that 
  -identifies tags from the struts-bean library, and html as the prefix  
  -that identifies tags from the struts-html library.  
  -Any desired prefix can be used.
  -/li
  -  
  -li
  -This page uses several occurrences of the
  -bmessage/b tag to look up internationalized
  -message strings from a codeMessageResources/code object containing
  -all the resources for this application.  
  -For this page to work, the following message keys must be defined in 
  -these resources:
  -  
  -ul
  -
  -li
  -blogon.title/b - Title of the logon page
  -/li
  -
  -li
  -bprompt.username/b - A Username: prompt string
  -

cvs commit: jakarta-struts/doc/userGuide building_model.xml

2002-12-28 Thread husted
husted  2002/12/28 14:33:09

  Modified:doc/userGuide building_model.xml
  Log:
  Correct link to data-source configuration.
  
  Revision  ChangesPath
  1.15  +2 -2  jakarta-struts/doc/userGuide/building_model.xml
  
  Index: building_model.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_model.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- building_model.xml27 Dec 2002 11:44:13 -  1.14
  +++ building_model.xml28 Dec 2002 22:33:09 -  1.15
  @@ -281,7 +281,7 @@
   
   p
   The Struts datasource manager is configured as an element in the
  -a href=building_controller.html#other_config
  +a href=configuration.html#data-source_config
   Struts configuration file/a (struts-config.xml). 
   The manager can used to deploy any connection pool that implements the
   codejavax.sql.DataSource/code interface and is configurable totally
  @@ -299,7 +299,7 @@
   The GenericDataSource class is deprecated as of Struts 1.1 and replaced 
   by direct use of the BasicDataSource.
   /p
  -
  +
   p
   After the datasource is defined, here is an example of using the
   manger to establishing a connection from within an Action's 
  
  
  

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




cvs commit: jakarta-struts/doc/userGuide configuration.xml

2002-12-28 Thread husted
husted  2002/12/28 16:02:06

  Modified:doc/userGuide configuration.xml
  Log:
  Add introductory material regarding role of data-sources element.
  
  Revision  ChangesPath
  1.8   +81 -14jakarta-struts/doc/userGuide/configuration.xml
  
  Index: configuration.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/configuration.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- configuration.xml 27 Dec 2002 09:21:36 -  1.7
  +++ configuration.xml 29 Dec 2002 00:02:06 -  1.8
  @@ -304,7 +304,7 @@
   /section
   
   section name=7.2.3 PlugIn Configuration href=plugin_config
  -
  +   
   p
   Struts PlugIns are configured using the codelt;plug-ingt;/code
   element within the Struts configuration file.
  @@ -334,20 +334,80 @@
   
   section name=7.2.4 Data Source Configuration href=data-source_config
   
  -  p
  -  Besides the objects related to defining ActionMappings, the Struts
  -  configuration may contain elements that create other useful objects.
  -  /p
  -
  -  p
  -  The codelt;data-sources/code section, which specifies data sources
  -  that your application can use.
  -  This is how you would specify a basic data source for your application
  -  inside of struts-config.xml:
  -  /p
  +p
  +Besides the objects related to defining ActionMappings, the Struts
  +configuration may contain elements that create other useful objects.
  +/p
  +
  +p
  +The codelt;data-sources/code section can be used to specify 
  +a collection of DataSources [javax.sql.DataSource] for the use of your
  +application. 
  +Typically, a DataSource represents a connection pool to a database 
  +or other persistent store. 
  +As a convenience, the Struts DataSource manager can be used to 
  +instantiate whatever standard pool your application may need. 
  +Of course, if your persistence layer provides for its own connections, 
  +then you do not need to specify a codedata-sources/code element.
  +/p
  +
  +p
  +Since DataSource implementations vary in what properties need to be
  +set, unlike other Struts configuration elements, the 
  +codedata-source/code element does not pre-define a slate of 
  +properties.
  +Instead, the generic codeset-property/code feature is used to set 
  +whatever properties your implementation may require. 
  +Typically, these settings would include:
  +/p
  +
  +ul
  +
  +li
  +A driver class name
  +/li
  +
  +li
  +A url to access the driver
  +/li
  +
  +li
  +A description
  +/li
  +
  +/ul
  +
  +p
  +And other sundry properties. 
  +/p
  +
  +p
  +As a further convenience, Struts provides a default DataSource 
  +implementation, [codeorg.apache.struts.util.GenericDataSource/code].
  +The codetype/code property can be used to specify another 
  +implementation: 
  +/p
  +
  +precode![CDATA[
  +data-source type=org.apache.commons.dbcp.BasicDataSource
  +!-- ... set-property elements ... --
  +/data-source
  +]]/code/pre
  +
  +p
  +In Struts 1.1, the GenericDataSource is deprecated, and it is 
  +recommended that you use the Commons BasicDataSource directly. 
  +In practice, if you need to use the DataSource manager, you should use 
  +whatever DataSource implementation works best with your container or 
  +database. 
  +/p
  +  
  +p
  +This is how you would specify a default data source for your application
  +inside of struts-config.xml:
  +/p
   
   precode![CDATA[
  -struts-config
   data-sources
   !-- configuration for GenericDataSource wrapper --
   data-source
  @@ -376,7 +436,15 @@
   property=user
   value=myusername/
   /data-source
  +/data-sources
  +]]/code/pre
   
  +p
  +This is how you would specify a DBCP BasicDataSource for your application:
  +/p
  +
  +precode![CDATA[
  +data-sources
   !-- configuration for commons BasicDataSource --
   data-source type=org.apache.commons.dbcp.BasicDataSource
   set-property
  @@ -400,7 +468,6 @@
   
   /data-source
   /data-sources
  -/struts-config
   ]]/code/pre
   
   p
  
  
  

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




cvs commit: jakarta-struts/doc/faqs database.xml project.xml index.xml

2002-12-28 Thread husted
husted  2002/12/28 17:19:32

  Modified:doc/faqs project.xml index.xml
  Added:   doc/faqs database.xml
  Log:
  Combine pieces from Model and Configuration to create Accessing a Database HowTo.
  
  Revision  ChangesPath
  1.8   +3 -0  jakarta-struts/doc/faqs/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/faqs/project.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.xml   28 Dec 2002 22:27:48 -  1.7
  +++ project.xml   29 Dec 2002 01:19:32 -  1.8
  @@ -24,6 +24,9 @@
   href=actionForm.html 
   name=Action Forms/
   item 
  +href=database.html 
  +name=Database/
  +item 
   href=indexedprops.html 
   name=Indexed Properties/
   item 
  
  
  
  1.7   +4 -0  jakarta-struts/doc/faqs/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/faqs/index.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- index.xml 28 Dec 2002 22:27:48 -  1.6
  +++ index.xml 29 Dec 2002 01:19:32 -  1.7
  @@ -38,6 +38,10 @@
   /li
   
   li
  +a href=database.htmlAccessing a Database/a
  +/li
  +
  +li
   a href=indexedprops.htmlIndexed Properties, Mapped Properties, and Indexed 
Tags/a
   /li
   
  
  
  
  1.1  jakarta-struts/doc/faqs/database.xml
  
  Index: database.xml
  ===
  ?xml version=1.0?
  
  document url=./database.xml
  
   properties
 authorCraig R. McClanahan/author
  authorMike Schachter/author
  authorTed Husted/author
  authorMartin Cooper/author   authorEd Burns/author
titleAccessing a Database/title
   /properties
  
  body
  chapter href=actionForm name=How to Access a Database
 
  section name=Accessing a Database href=database
  
  p
  Ideally, the business logic layer should encapsulate the data access
  details, including acquiring a database connection. 
  However, some application designs expect that the caller able to provide a
  with a database connection or DataSource instance. 
  When this is the case, the Struts DataSource manager can make it easy for 
  your Action to produce these resources on demand.
  /p
  
  p
  The Struts DataSource manager is configured as an element in the
  a href=../userGuide/configuration.html#data-source_config
  Struts configuration file/a (struts-config.xml). 
  The manager can used to deploy any connection pool that implements the
  codejavax.sql.DataSource/code interface and is configurable totally
  from JavaBean properties. 
  If your DBMS or container provides a connection pool that meets these 
  requirements, then that component might your first choice.
  /p
  
  p
  The Jakarta Commons dbcp's BasicDataSource 
  [codeorg.apache.commons.dbcp.BasicDataSource/code] also works well 
  with the DataSource manager, if a native component is not available. 
  The Struts distribution includes a Generic DataSource class in its util
  package, but this is now only a wrapper around the BasicDataSource. 
  The GenericDataSource class is deprecated as of Struts 1.1 and replaced 
  by direct use of the BasicDataSource.
  /p
  
  p
  This is how you would specify a default data source for your application
  from the struts-config.xml:
  /p
  
  precode![CDATA[
  data-sources
  !-- configuration for GenericDataSource wrapper --
  data-source
set-property
  property=autoCommit
  value=false/
set-property
  property=description
  value=Example Data Source Configuration/
set-property
  property=driverClass
  value=org.postgresql.Driver/
set-property
  property=maxCount
  value=4/
set-property
  property=minCount
  value=2/
set-property
  property=password
  value=mypassword/
set-property
  property=url
  value=jdbc:postgresql://localhost/mydatabase/
set-property
  property=user
  value=myusername/
  /data-source
  /data-sources
  ]]/code/pre
  
  p
  This is how you would specify a DBCP BasicDataSource for your application:
  /p
  
  precode![CDATA[
  data-sources
  !-- configuration for commons BasicDataSource --
  data-source type=org.apache.commons.dbcp.BasicDataSource
  set-property
property=driverClassName
value=org.postgresql.Driver /
  set-property
property=url
value=jdbc:postgresql://localhost/mydatabase /
  set-property
property=maxActive
value=10 /
  set-property
property=maxWait
value=5000 /
  

cvs commit: jakarta-struts/doc/userGuide configuration.xml building_model.xml

2002-12-28 Thread husted
husted  2002/12/28 17:19:48

  Modified:doc/userGuide configuration.xml building_model.xml
  Log:
  Combine pieces from Model and Configuration to create Accessing a Database HowTo.
  
  Revision  ChangesPath
  1.9   +5 -88 jakarta-struts/doc/userGuide/configuration.xml
  
  Index: configuration.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/configuration.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- configuration.xml 29 Dec 2002 00:02:06 -  1.8
  +++ configuration.xml 29 Dec 2002 01:19:48 -  1.9
  @@ -401,96 +401,13 @@
   whatever DataSource implementation works best with your container or 
   database. 
   /p
  -  
  -p
  -This is how you would specify a default data source for your application
  -inside of struts-config.xml:
  -/p
  -
  -precode![CDATA[
  -data-sources
  -!-- configuration for GenericDataSource wrapper --
  -data-source
  -  set-property
  -property=autoCommit
  -value=false/
  -  set-property
  -property=description
  -value=Example Data Source Configuration/
  -  set-property
  -property=driverClass
  -value=org.postgresql.Driver/
  -  set-property
  -property=maxCount
  -value=4/
  -  set-property
  -property=minCount
  -value=2/
  -  set-property
  -property=password
  -value=mypassword/
  -  set-property
  -property=url
  -value=jdbc:postgresql://localhost/mydatabase/
  -  set-property
  -property=user
  -value=myusername/
  -/data-source
  -/data-sources
  -]]/code/pre
  -
  -p
  -This is how you would specify a DBCP BasicDataSource for your application:
  -/p
  -
  -precode![CDATA[
  -data-sources
  -!-- configuration for commons BasicDataSource --
  -data-source type=org.apache.commons.dbcp.BasicDataSource
  -set-property
  -  property=driverClassName
  -  value=org.postgresql.Driver /
  -set-property
  -  property=url
  -  value=jdbc:postgresql://localhost/mydatabase /
  -set-property
  -  property=maxActive
  -  value=10 /
  -set-property
  -  property=maxWait
  -  value=5000 /
  -set-property
  -  property=defaultAutoCommit
  -  value=false /
  -set-property
  -  property=defaultReadOnly
  -  value=false /
  -
  -/data-source
  -/data-sources
  -]]/code/pre
  -
  -p
  -For information on how to retrieve the data source, see the
  -a href=building_model.html#databasesAccessing Relational Databases/a
  -section.
  -/p
  -
  -p
  -iNote: Since Struts is now using commons-dbcp for all it's data-source
  -needs, the query you provide for the pingQuery attribute must return at
  -least one row./i
  -/p
  -
  +
   p
  -bExample:/b codeSELECT COUNT(*) FROM VALIDTABLE/code
  +For examples of specifying a data-sources element and using the 
  +DataSource with an Action, see the 
  +a href=../faqs/database.htmlAccessing a Database HowTo/a.
   /p
  -
  -p
  -Just be sure you to replace VALIDTABLE with the name of a valid table
  -in your database.
  -/p
  -
  +  
   /section
   
   section 
  
  
  
  1.16  +2 -75 jakarta-struts/doc/userGuide/building_model.xml
  
  Index: building_model.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_model.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- building_model.xml28 Dec 2002 22:33:09 -  1.15
  +++ building_model.xml29 Dec 2002 01:19:48 -  1.16
  @@ -11,7 +11,6 @@
   authorMike Schachter/author
   authorTed Husted/author
   authorMartin Cooper/author
  -authorEd Burns/author
   titleThe Struts User's Guide - Building Model Components/title
   /properties
   
  @@ -265,82 +264,10 @@
   For larger applications, these beans will often be stateful or stateless 
   Enterprise JavaBeans (EJBs) instead.
   /p
  -
  -/section
  -
  -section name=2.6 Accessing Relational Databases href=databases
  -
  -p
  -Ideally, the business logic beans should encapsulate the data access
  -details, including acquiring a database connection. 
  -However, some application designs expect that the caller able to provide a
  -with a database connection or datasource instance. 
  -When this is the case, the Struts datasource manager can make it easy for 
  -your Action to produce these resources on demand.
  -/p
  -
  -p
  -The Struts datasource manager is configured as an element in the
  -a href=configuration.html#data-source_config
  -Struts configuration file/a (struts-config.xml). 
  -The manager can used to deploy any connection pool that implements the
  -codejavax.sql.DataSource/code interface 

Cactus tests failing

2002-12-28 Thread Martin Cooper
Trying to run the Cactus tests, I'm getting a very strange error. Many of
the tests succeed just fine, but then I get an HTTP 500 error on the
testCookieStringEquals test, with a partial stack trace looking like this:

- Root Cause -
javax.servlet.ServletException: 
org.apache.cactus.util.Configuration.isLoggingEnabled()Z
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at
org.apache.jsp.jspRedirector_jsp._jspService(jspRedirector_jsp.java:121)

The weird thing about this is that jspRedirector_jsp.java only has 91
lines, but the exception supposedly occurs on line 121!

I get the same error with Tomcat 4.1.18 and 4.0.6, and an equivalent error
with Tomcat 3.3.1, so either my system is misconfigured, or we have a bug
in the tests. Given that the error message refers to a non-existent line
of code, I'm having a hard time figuring out which...

I'm using Cactus 13-1.3 (the tests fail even earlier with more recent
versions) and Ant 1.5.1.

Anyone have any idea what's up?

--
Martin Cooper



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