cocoon and application configuration (maybe not long but short not also)

2003-04-01 Thread Leszek Gawron
I started to learn web development some years ago with PHP. Up till now some
habits are still vivid. Some days ago I came up with a problem while
developing simple application with cocoon that I cannot overcome. If you ever
used php you should be familar with the way that PHP gives you a possibility
to customize a web application. The only PHP app I'm using now is MantisBT (a
bugtracker) so my explanation will be based on this one. Mantis contains a
configuration file called config_inc.php that contains the application options
you can change (there are really a lot of them - all config options take 40kB
of text). That file is included into every php script. The options configure
all aspects of web application. The examples are:
- application base url
- smtp host
- administrative options like
- should application present an option to sign up or not
- should user be able to reset his/hers password
- should email notification be enabled or not
- presentation options
- should menu bar be displayed at top of the page, bottom or maybe
  both
- colors
- available languages
- number of entries per page

The way described above is ok for a scripting language like PHP. Cocoon is not
so I started searching for the way to provide a user with a file with all
configuration options. We have different cocoon areas that we have to cover: 

1. Data
There is no problem if data is generated dynamically with XSP - you can
use XMlFileModule and query configuration from external file

2. Logic 
If logicsheet is being used (or actions) one could also use input modules
to read configuration from

But then we end up with:

3. Presentation
If one wants to use XSL to present data the only way to parametrize the
stylesheet is to provide _ALL_ parameters in the sitemap. That is ok if
you have 4-5 parameters (you can pass them all using map:parameter and
sitemap is still quite readable). Imagine now you have 100 parameters that
strictly define presentation aspects. Another example: if you wanted to
parametrize administrator's email that could be shown in different
application pages you would have to pass this parameter to EVERY
stylesheet that renders it. 

You could aggregate every static/dynamic data with a static configuration file
and then filter it out at last transformation but:
1. Is would not be nice for the performance
2. You would have to do a lot of XPath gymnastics
3. There still is a bug with caching pipelines and aggregated dynamic content.
It has been reported here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16958 and here
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14348

My idea: is it possible to modify the transformer so it could see all the
parameters without declaring them in sitemap? You just pass an input module
and it uses all variables it can query in it.
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: database caching

2003-04-01 Thread Leszek Gawron
On wto, kwi 01, 2003 at 12:43:29 -0800, Kris Rasmussen wrote:
 
 How does cocoon handle caching of xsp pages with esql tags? It seems to me that 
 cocoon would have to generate the xml output of the xsp page every time the page is 
 called, and thus would be unable to cache any xsl translation latter? Is this true? 
 If so would it not be a better idea to have the page be translated into html before 
 all database code is called and then insert the database code at the very end and 
 output as a jsp page or something?
Is that the way other server side frameworks do? Remember that the most
important thing is data, which is being generated at the beginning and then
the presentation is applied. Your approach is completely reversed. 

Take look at Velocity - maybe it could solve your problems
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Eclipse, Tomcat and Sysdeo Plugin

2003-03-20 Thread Leszek Gawron
On czw, mar 20, 2003 at 09:34:06 +0100, SAXESS - Hussayn Dabbous wrote:
 Hi,
 
 I can't tell you why you get this error, but i can tell you
 how we are debugging cocoon enabled web applications in a
 similar environment as yours:
 
 We are running eclipse, cocoon-2.0.4, tomcat-4.1.18 on solaris
 and linux. We run eclipse on a PC-frontend and we always start
 the tomcat server with the startup scripts. When debuging
 whichever webapp (including cocoon) we set the JAVA_OPTS
 as follows:
 
 -server -Xdebug -Xnoagent -Djava.compiler=NONE 
 -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
 
 Then we (re)start the tomcat server as usual with startup.sh or
 startup.bat. Please note, that we set the JAVA_OPTS, not the
 CATALINA_OPTS for this, although the docs at the tomcat site
 state something else (that does not work for us)
 
 On eclipse we set up a remote debugging session on port 8000.
 This works perfectly! It should also work, when the tomcat server
 is running locally.
Yes it is - the only exception is debugging XPSs - couldn't make it work under
eclipse.
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Some results on cocoon debug attempt

2003-03-09 Thread Leszek Gawron
I tried to debug some cocoon parts. Here is what I achieved. I would be
grateful for any feedback. The attempt were made on WinXP

The easiest way to run cocoon set up with remote debugging is to run
cocoon.bat servlet-debug

and now: 
1. JSwat 2.3:
a) attach to cocoon 
b) set source path to :
- {cocoon-cvs-home}\src\java
- {your-win-profile}\Local Settings\Temp\Jetty____\cocoon-files
c) if you want to debug cocoon core:
- set breakpoint providing:
- class name
- line number/method name
d) if you want to debug xsp:
- run it at least once to have .java file generated
- browse class hierarchy (there is a special view for that in jSwat),
  select the appropriate class and place a breakpoint
e) hit the page you want to debug in a browser - the execution will stop at
breakpoint
f) now you can run your code by steps. source browser will show you the
current position

Everything works quite fine but jSwat functionality is not enough for us.
So lets switch to:
2. Eclipse
a) do build eclipse-project
b) edit {cocoon-cvs-home}\build\webapp\WEB-INF\web.xml to change the
location of cocon temporary files. All you have to do is to uncomments
this section:
init-param
  param-namework-directory/param-name
  param-valueWEB-INF/work/param-value
/init-param
You have to have all source files to be placed relatively from your
project home.
c) Run eclipse
d) do File - Import and point to your cocoon directory
e) be patient ... :)
f) add additional source path: {cocoon-cvs-home}\build\webapp\WEB-INF\work
g) prepare new remote debug configuration (choose your current project so
eclipse will be able to resolve sources)
h) attach to cocoon VM
i) browse your project for appropriate class, open the source file and set
a breakpoint in a place you want to.
j) hit the page - wait for breakpoint to be triggered
k) eclipse will open a source file and from now on you can step through
the code.

Everything would be fine but Eclipse does not want to work with XSP generated
java files properly. When first run the .java file is being generated from xsp
so from now on it is visible from eclipse IDE. You can compile it (if you add
all cocoon libraries to your project), you can also set a breakpoint. The
execution will be stopped at breakpoint but you will get a message that
eclipse cannot find source for this class. I've tried any combination and
still eclipse is not aware of the source. It works for any other classes
though (not generated).

Does anyone have some experience with eclipse?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



XSP debugging under eclipse

2003-03-08 Thread Leszek Gawron
Has anyone succeeded in debugging xsp generated java files under eclipse? I
have manager to do it once or twice but currently eclipse stubbornly says it
cannot locate source for compiled class file (even though it exists in a
project and it can be compiled from IDE). I tried all combinations and still
the same comes out - source is not being located
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



cocoon and new eclipse java compiler

2003-03-06 Thread Leszek Gawron
I have updated my cocoon installation today and I started to get a LOOOT of
Unreachable code errors disappeared while switching back to Pizza
What may be a problem ? 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |

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



Re: cocoon and new eclipse java compiler

2003-03-06 Thread Leszek Gawron
On czw, mar 06, 2003 at 09:44:17 +0100, Robert Douglass wrote:
 I had this when there was legacy code that we imported into Eclipse where
 people had used semicolons to close { } blocks. Here's an example that would
 cause an unreachable code:
 
 try {
 ...
 } catch (...) {...};
 
 The semicolon is superfluous, but doesn't cause a problem in this block:
 
 if(){...};
 
 because it is interpreted as a complete Java statement which does nothing.
 Same in the first example, except you can never get there. VisualAge doesn't
 complain, but Eclipse does.
nice but my problem is in xsp containing esql and very little xsp:logic
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Creating a variable map:act type?

2003-03-05 Thread Leszek Gawron
On ro, mar 05, 2003 at 03:13:02 +0200, Derek Hohls wrote:
 I am trying to create a map:act that has a variable
 type name, based on the input to the match pattern.
  
 I have tried various combinations of nesting, such as
 the shown in the sitemap fragment one below, but I get 
 the same type of error each time, ie.
  
 org.apache.avalon.framework.component.ComponentException: 
 UnnamedSelector: 
 ComponentSelector could not find the component for hint:
 {../../1}-entry
 
 Any ideas how I handle this?
  
  
map:match pattern=forms/*_entry
  map:act type=session-validator
map:parameter ...
map:act type=form-validator
  map:parameter ...
  !--  attempt to have variable --  
  map:act type={../../1}-entry
if you could consider switching to xsp actions you could do :
map:match pattern=*
map:act type=serverpages src={1}-action.xsp
map:generate src=ok.xml/
map:serialize/
/map:act
map:generate src=failed.xml/
map:serialize/
/map:match
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Creating a variable map:act type?

2003-03-05 Thread Leszek Gawron
On ro, mar 05, 2003 at 03:25:18 +0200, Derek Hohls wrote:
 Hmm - well, the whole point is to keep the 
 flow logic inside the sitemap - the point is that
 I want a number of different types of actions to
 have the same end result (inside the most nested
 action is an XSP page doing the processing).
  
 I would like to know/understand if what I trying
 is possible or not?
To select a standard action using sitemap variables ? Think not.
What is wrong with xsp action approach . I do not quite follow your problem.
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: setCharacterEncoding in jsp page through cocoon?

2003-03-05 Thread Leszek Gawron
On ro, mar 05, 2003 at 08:22:55 -0500, Tsui, Alban wrote:
 Hi
 
 I have cocoon 2.0.3 serving xsp pages, custom generator pages and jsp pages.
 Jsp pages are done via the jsp reader:
 
   map:match pattern=*/*
   map:act type=setutf8encoding/
   map:read type=jsp
 src=/admin/lang/{1}/jsp/{2}.jsp mime-type=text/html /
   /map:match
 
 I have created a simple action to setCharacterEncoding to utf-8 for all my
 pipelines and it works for my xsp pages etc except for the above
 pipeline. If I have some japanese parameters going through the request
 object in jsp, the text gets corrupted ... so for some reasons,
 setCharacterEncoding doesn't work in jsp pages.
 
 My action is something like:
 
  public java.util.Map act(org.apache.cocoon.environment.Redirector
 redirector, org.apache.cocoon.environment.SourceResolver sourceResolver,
 java.util.Map map, String str,
 org.apache.avalon.framework.parameters.Parameters parameters) throws
 java.lang.Exception
 {
 // Grab request object
 Request request = ObjectModelHelper.getRequest(map);
 request.setCharacterEncoding(utf-8);
 return null;
 }
Apart from your problem: there is no need do implement another action. Ses
SetCharacterEncodingAction (it's already there)
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: setCharacterEncoding in jsp page through cocoon?

2003-03-05 Thread Leszek Gawron
On ro, mar 05, 2003 at 08:37:57 -0500, Tsui, Alban wrote:
 Could you tell me how to use the cocoon SetCharacterEncodingAction ?
Declare it:
map:action logger=sitemap.action.characterencoding name=characterencoding 

src=org.apache.cocoon.acting.org.apache.cocoon.acting.SetCharacterEncodingAction
form-encodingutf-8/form-encoding
map:action

and then use it just like yours

yo ucan also override the default parameter by :

map:act type=characterencoding
map:parameter name=form-encoding value=iso-8859-2/
!-- rest of stuff goes here --
/map:act
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: big ESQL performance problem

2003-03-04 Thread Leszek Gawron
On wto, mar 04, 2003 at 09:05:44 -0500, Peter Royal wrote:
 On Tuesday, March 4, 2003, at 08:55  AM, Leszek Gawron wrote:
 I've been fighting with this all day and cannot find a cause. I'm 
 using quite
 fresh esql implementation to access Pervasive SQL 2000 database. The 
 problem
 is I have to pull 5500 rows from database. Performing query in 
 Squirell SQL it
 takes 3 second to execute and 16 to build output table (build squirell 
 view).
 The same query executed under cocoon takes 3.5 MINUTES! I'm desperate.
 Pervasive is a weird database (the SQL access is built on very low 
 lewel
 core).
 
 We are in the process of switching from pervasive to postgresql for 
 performance reasons. We have a 70k record table that takes *10 MINUTES* 
 to do a SELECT COUNT(col) FROM table WHERE col2 = X when col2 is 
 indexed. I have also noticed a very quick and steady decrease in 
 performance doing SELECT COUNT(col) FROM table, *no where clause*, as 
 records are added.
Things are not so simple for me because I'm plugging into an existing system
(database change is impossible).

Second thing is that the same query that works reasonably fast under Squirell
JBDC client is a nightmare under cocoon
LG
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: big ESQL performance problem

2003-03-04 Thread Leszek Gawron
On wto, mar 04, 2003 at 03:21:27 +0100, Steven Noels wrote:
 Leszek Gawron wrote:
 
 esql:execute-query
 esql:query
 SELECT
  K.K_NIP AS Knt_NipE,
  B.GST_KntID AS Knt_KntId,
  B.GST_KntID AS Knt_Kod,
  K.K_GRUPA AS Knt_Grupa,
 
 How does the rest of your pipeline looks like? Can you post the relevant 
 sitemap snippet?
Most simple as I could get: match, generate type=serverpages, serialize to
xml
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: big ESQL performance problem

2003-03-04 Thread Leszek Gawron
On wto, mar 04, 2003 at 04:34:52 -, Upayavira wrote:
  On wto, mar 04, 2003 at 03:21:27 +0100, Steven Noels wrote:
   Leszek Gawron wrote:
   
   esql:execute-query
   esql:query
   SELECT
K.K_NIP AS Knt_NipE,
B.GST_KntID AS Knt_KntId,
B.GST_KntID AS Knt_Kod,
K.K_GRUPA AS Knt_Grupa,
   
 
 It sounds like people are doubting ESQL, so it is worth trying accessing your 
 database JDBC with Java, without Cocoon in the picture. Then you can work out 
 whether it is Cocoon or JDBC that is causing you a problem. I had to do this 
 recently, so I used some code in the O'Reilly Java Examples in a Nutshell book.
Just as I said before. I'm using sourceforge JDBC Client named Squirell and
have no problem with retreieving large amounts of data
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



big ESQL performance problem

2003-03-04 Thread Leszek Gawron
I've been fighting with this all day and cannot find a cause. I'm using quite
fresh esql implementation to access Pervasive SQL 2000 database. The problem
is I have to pull 5500 rows from database. Performing query in Squirell SQL it
takes 3 second to execute and 16 to build output table (build squirell view).
The same query executed under cocoon takes 3.5 MINUTES! I'm desperate.
Pervasive is a weird database (the SQL access is built on very low lewel
core). Maybe this has something to do with scrolling rowsets or something. My
query is really simple:

esql:execute-query
esql:query
SELECT
K.K_NIP AS Knt_NipE,
B.GST_KntID AS Knt_KntId,
B.GST_KntID AS Knt_Kod,
K.K_GRUPA AS Knt_Grupa,
K.K_Nazwa1 AS Knt_Nazwa1,
K.K_Nazwa2 AS Knt_Nazwa2,
K.K_NIP AS Knt_Nip,
K.K_Adres1 AS Knt_Ulica,
K.K_Miasto AS Knt_Miasto,
K.K_KodPocztowy AS Knt_KodPocztowy,
B.GST_TypMod AS SyncType
FROM
gemini_syn_knt B LEFT OUTER JOIN kontrah K ON K.K_KOD = B.GST_KntId
WHERE
B.GST_Datetime  CONVERT( 'xsp:exprtime/xsp:expr', SQL_TIMESTAMP )
AND K.K_GRUPA = 'ODB'
ORDER BY
K.K_Nazwa1
/esql:query
esql:results
esql:row-results
row
esql:get-columns/
/row
/esql:row-results
/esql:results
/esql:execute-query

I'm not using any row skipping or limit clauses and still the performance is awful.


My second thought is that esql asks the database too often for metadata
information.


Any ideas ? It's crucial for me to solve this ASAP
regards
LG
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Very strange behaviour -- caching bug?

2003-03-03 Thread Leszek Gawron
On pon, mar 03, 2003 at 10:01:03 -0800, Alex Romayev wrote:
 Hi Mark,
 
 Thanks for your help.  I like your test case -- it
 simpler and cleaner.  Do you (or anyone else) know how
 to submit this as a bug to make sure the developers
 know about it?

I have encountered the same bug (I think) or very similar while working with
aggregation (XSP + ESQL and static xml files. See my bug description at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16958

I have reported it long time ago but no action was taken.

ouzo

PS. a very temporary solution is to set your pipeline type to noncaching.
Doesn't solve the problem but allows you to work further.

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Very strange behaviour -- caching bug?

2003-03-03 Thread Leszek Gawron
On pon, mar 03, 2003 at 11:27:10 -0800, Alex Romayev wrote:
 Do you know the syntax for making a pipeline
 noncaching?

first see if your main sitemap.xmap contains different pipeline implementation
(grep for caching, noncaching)
use it like this:

map:pipeline type=noncaching
  !-- map:match stuff goes here --
/map:pipeline

or set it do default at your main sitemap:

   ++ here ++
map:pipes default=noncaching
 map:pipe name=caching 
src=org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline/
 map:pipe name=caching-point 
src=org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline
   autoCachingPointOn/autoCachingPoint
 /map:pipe
 map:pipe name=noncaching 
src=org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline/
/map:pipes

ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Question

2003-03-03 Thread Leszek Gawron
On pon, mar 03, 2003 at 05:31:17 -0300, Alejandro Raiczyk wrote:
 Is there any way to detect when a user closes the browser and that session
 is destroyed ?
 There was a way under C1 using SessionListener, but I can't find an
 implementation or something like that under C2.
It is not possible to detect browser closing but it's possible to capture
session timeout event
see http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=104609991021185w=2
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Unable to run cocoon-2.1-dev on tomcat 4.1.18

2003-02-26 Thread Leszek Gawron
On ro, lut 26, 2003 at 08:56:02 -, Richard In Public wrote:
 Hi Alex
 
 Are you running tomcat as a service?  If so, try running it from the command
 line using the appropriate batch file (%CATALINA_HOME%\bin\startup.bat for
 windows).
 
 If this helps, see my earlier post on this subject:
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg24914.html
I've succeeded to setup Tomcat as win32 service using this batch instructions

SET GEMINI_JDK_HOME=c:\DevTools\j2sdk1.4.1_01
SET GEMINI_TOMCAT_HOME=c:\DevTools\jakarta-tomcat-4.1.18-LE-jdk14
SET GEMINI_JVM=%GEMINI_JDK_HOME%\jre\bin\client\jvm.dll
SET 
GEMINI_CLASSPATH=%GEMINI_TOMCAT_HOME%\bin\bootstrap.jar;%GEMINI_TOMCAT_HOME%\common\lib\servlet.jar
SET GEMINI_ENDORSED=%GEMINI_TOMCAT_HOME%\common\endorsed
SET GEMINI_LOG=%GEMINI_TOMCAT_HOME%\logs\stdout.log
SET GEMINI_ERR_LOG=%GEMINI_TOMCAT_HOME%\logs\stdout.log

tomcat -uninstall Gemini
tomcat.exe -install Gemini %GEMINI_JVM% -Djava.class.path=%GEMINI_CLASSPATH% 
-Djava.endorsed.dirs=%GEMINI_ENDORSED% -Dcatalina.home=%GEMINI_TOMCAT_HOME% -start 
org.apache.catalina.startup.BootstrapService -params start -stop 
org.apache.catalina.startup.BootstrapService -params stop -out %GEMINI_LOG% -err 
%GEMINI_ERR_LOG%

no problem with endorsed libraries at all
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



Re: Experiences with Cocoon Microsoft SQLServer?

2003-02-14 Thread Leszek Gawron
On pią, lut 14, 2003 at 05:17:18 +0100, Felix Maeder wrote:
 Hi list,
 
 Does anyone use Cocoon in connection with Microsoft SQLServer in a 
 production environment? What are the experiences? Are there any known 
 issues with this combination?
The combination works like a charm using inetsoftware jdbc driver. Using
microsoft free jdbc driver you may encounter some performance problems (
http://groups.google.com/groups?dq=hl=pllr=ie=UTF-8oe=UTF-8group=microsoft.public.sqlserver.jdbcdriverselm=04bc01c2c878%2457d988a0%248af82ecf%40TK2MSFTNGXA03
) but for me it's quite ok.
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Experiences with Cocoon Microsoft SQLServer?

2003-02-14 Thread Leszek Gawron
On pią, lut 14, 2003 at 08:22:28 +0100, Thorsten Scherler wrote:
 Hi Felix,
 
 I tried it but didn't like the result!
 
 e.g. the Select * from table were working fine, but I had trouble with 
  Update, insert into,
 
 Despite that I never got it working that I could got the data where 
 date=xsp-parameter-request .../. I wasn't patient enough to get to 
 the course.
 
because it should be where date = 'xsp-request:get-parameter name=xxx/'
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Retrieving a String from the database in XSP

2003-02-11 Thread Leszek Gawron
On wto, lut 11, 2003 at 11:36:14 -, Tom Place wrote:
 I am trying to retrieve a string from the database an place it into a
 variable (should be simple I know)
 However I am getting a compilation error
  
 I am trying to insert the string value correctly? 
  
 String myString = null;

  esql:connectionesql:poolautorevs_pool/esql:pool
   esql:execute-query
 esql:queryselect * from user_info where
 USERNAME='xsp:exprusername/xsp:expr' and
 PASSWORD='xsp:exprpassword/xsp:expr'/esql:query
 esql:results
   xsp:logic
 style = esql:get-string column=STYLE/;
   /xsp:logic
 /esql:results
 esql:no-results
   xsp:logic 
 style = ;
   /xsp:logic
 /esql:no-results
   /esql:execute-query
 /esql:connection
You forgot to use esql:row-results tag, check out the esql reference on cocoon
site
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: xsp util and file contents

2003-02-11 Thread Leszek Gawron
On wto, lut 11, 2003 at 09:13:08 -, Tom Place wrote:
 Hi,
 
 I’m trying to insert xml into my xsp, this xml is for navigation
 purposes so ideally I would like to use one navigation file in many
 different xsp documents.
Apart from your problem : why don't you use aggregation?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Custom cocoon.xconf

2003-02-05 Thread Leszek Gawron
I have already asked this question some time ago but go no answer. Somebody
claimed it to be true so it goes again:

Is it possible to define own cocoon.xconf files? Example: you do not define a
connection pool in main cocoon.xconf file (so when changing cocoon build you
have to update the config file again ) but in /mount/myapp/cocoon.xconf so
changing cocoon build makes you copy myapp directory and nothing else.

ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




HEAD problems

2003-01-23 Thread Leszek Gawron
1. The current HEAD is not compiling as scratchpadwar
validate-config:
 [echo] Conducting validation of core configuration files.
 [echo] (You can turn validation off if you must, using ./properties.xml)
 [echo] Validating all cocoon.roles instances ...

BUILD FAILED
file:C:/Dev/CvsProjects/xml-cocoon2/build.xml:2423: There must be a file attribute or 
a fileset child element

2. Current HEAD after compiling with webapp target and running shows this
error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
org.apache.cocoon.CascadingIOException: 
org.apache.xml.utils.WrappedRuntimeException: The output format must have a 
'{http://xml.apache.org/xslt}content-handler' property!: 
org.apache.xml.utils.WrappedRuntimeException: The output format must have a 
'{http://xml.apache.org/xslt}content-handler' property!

While trying I had also Failed to generate program code (with the same must have 
content-handler remark)

How can I fix it ? 
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




LogKit problem

2003-01-15 Thread Leszek Gawron
Hello,
My problem is simple: I'd like to have rotated logs named : 
sitemap.log.2003.01.15.18.19h. I have already found that cocoon is able to
append and rotate logs which can be quite nicely configured. I've read that
there are two types of log file naming 
1. revolving : you have to provide start and stop log index. File names look
like : sitemap.log.1, sitemap.log.2. When the upper bound index is reached the
lower index is taken so the log rotates 

2. unique : filename is sitemap.log.uniqueid where logkit documentation says
that unique id is a number of milisecond since 1970/sth/sth. I've read in
logkit documentation that the file name may also contain human readable date
version but I have not idea how to configure it in the logkit.xconf file.

I need to change the log file every hour because I'm sometimes searching for
database errors and in bigger files it's a nightmare.

best regards 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Cocoon/XSP/ESQL help

2003-01-11 Thread Leszek Gawron
On Fri, Jan 10, 2003 at 07:52:33PM +, Brian Campbell wrote:
 Hope this is the appropriate list for this question.
 
 I have a simple XSP page.  I want to use ESQL to call stored procedures in 
 a Microsoft SQL Server database.  I've got my connection pool set up 
 correctly.  I'm able to execute simple select statements and I'm able to 
 execute a stored procedure that doesn't take any parameters.  But most of 
 my stored prcedures take parameters.  Can't seem to find any good examples 
 anywhere.  My code is below.  Anyone able to tell me what I'm doing wrong?  
 Thanks.
 
 
 
 xsp:page language=java
   xmlns:xsp=http://apache.org/xsp;
   xmlns:xsp-request=http://apache.org/xsp/request/2.0;
   xmlns:esql=http://apache.org/cocoon/SQL/v2;
   xmlns:log=http://apache.org/xsp/log/2.0;
   root
   esql:connection
   esql:poolmpts-pool/esql:pool
 
   esql:execute-query
   esql:call
   { call sp_DayShift_Report_ListByName 
   ((esql:parameter direction=in
   
type=Stringxsp-request:get-parameter name=sQuerry//esql:parameter) 
 }
   /esql:call
 
   esql:results
   esql:row-results
   data
   esql:get-columns/
   /data
   /esql:row-results
   /esql:results
   /esql:execute-query
   /esql:connection
   /root
 /xsp:page
I remember I had two problems with stored procedures in MS SQL:
1. if you use for example integer parameters you have to have an separated int variable
declared for parameter use 

2. my stored procedure did not work without allow-multiple-results clause set
to yes - for example errors were not reported
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




ESQL problem - current cocoon HEAD

2003-01-09 Thread Leszek Gawron
I'm using cocoon to communicate with MS SQL Server via MS JDBC driver (Java
1.3). After switching to current HEAD I get an error message that did not
exist in my previous version:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing
statement:  select id, ope_opeid from gemini_users where device_id =
'ouzo': java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]0 is not a valid row parameter value for the ResultSet.Absolute method.

Is this a bug or a matter of configuration?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Something really stupid

2002-11-26 Thread Leszek Gawron
On Tue, Nov 26, 2002 at 07:15:30PM -0800, Steven Punte wrote:
 
 A cleaner bridge, if possible, would be to have your existing application
 output it's contents over HTTP as either just text or preferrable XML.  If
 XML, then just a pipelien with the XML Generator and you got it all: no
 temporary files, etc..   If the output is a more primitive text format, then
 just write a custom XSP to digest it and begin your pipeline.

Yes that is nice but the problem is the application is not mine .. so if I
wanted to use it over HTTP I would have to write an apache module or kind of
simple HTTP server that runs the executable and sends applications output in
HTTP response
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Passing database result as parameter in XSL

2002-11-20 Thread Leszek Gawron
On Wed, Nov 20, 2002 at 02:47:42PM +0100, Ebert Andreas wrote:
 Hello,
 
 I am trying to pass a parameter from one XSL template to another using the
 code snippet below. The value of the parameter should be obtained from a
 database. Unfortunately, the code does not work and I do not have any idea
 why. Is it possible to do that with XSLT or do I misunderstand something
 completely? I tried different ways (e.g. assign the database result to a
 variable and then use it in the with-param tag), but the resulting Java code
 simply seems to be empty. 
 
 xsl:call-template name=category
 xsl:with-param name=categoryidesql:get-int
 column=categoryid//xsl:with-param
 /xsl:call-template
 
 If I hardcode the parameter (e.g. replace 'esql:get-int
 column=categoryid/' with '4') everything works fine. 
 
AFAIR you are allowed to use ESQL only in XSPs as it's tags are converted to
Java. So even trying to use and logicsheet in xsl is useless. Your xsp output
should provide you with appropriate data
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




PHPGenerator

2002-11-18 Thread Leszek Gawron
I am not able to make PHPGenerator work but maybe you will see some mistake in
my actions:
1. I have downloaded PHP 4.2.3 Win32 binaries from PHP site 
2. I have enabled php_java extension and setup [Java] section like this:
[Java]
java.class.path = c:\DevTools\php-4.2.3-Win32\extensions\php_java.jar
java.home = c:\DevTools\jdk1.3.1_06 
java.library = c:\DevTools\jdk1.3.1_06\jre\bin\hotspot\jvm.dll 
java.library.path = c:\DevTools\php-4.2.3-Win32\extensions\

3. I have downloaded phpsrvlt.jar from somewhere (the original from PHP
binaries did not contain net.php.servlet class and I was not able to compile
PHP by myself due to some compilation errors)

4. I have put phpsrvlt.jar int lib/optional dir of cocoon sources (today's
snapshot) and updated jars.xml

5. I have built cocoon (scratchpad war)

6. Set up some environment variables (do not even remember which ones)

7. started tomcat (4.1.12)

8. opened cocoon to see if it works

9. added the sitemap entry:
map:match pattern=test.php
   map:generate type=php src=documents/test.php/
   map:serialize type=xml/
/map:match
10.  created a simple php file:
?php 

   print ?xml version=\1.0\?\n;

   print page\n;
   print titleHello world from PHP/title\n;
   print content\n;
   print paraThis is my page being dynamically generated using a 
PhpGenerator/para\n;
   print /content\n;
   print /page\n;
?

11. run http://localhost:8080/cocoon/test.php

And I get the following error: 
Function registration failed - duplicate name - java_last_exception_get
Function registration failed - duplicate name - java_last_exception_clear
java: Unable to register functions, unable to load

I have figured out that if I disable php_java.dll extension ( and [Java]
section) this error does not occur but still happens what follows:

org.apache.cocoon.ProcessingException: org.xml.sax.SAXParseException: Premature end of 
file.: null:-1:-1:org.xml.sax.SAXParseException: Premature end of file.
at org.apache.cocoon.generation.PhpGenerator.generate(PhpGenerator.java:198)
at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:512)
at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
at org.apache.cocoon.Cocoon.process(Cocoon.java:596)

What is really funny, when i look into tomcat's console window I see:
?xml version=1.0?
page
titleHello world from PHP/title
content
paraThis is my page being dynamically generated using a PhpGenerator/para
/content
/page

Configuration summary:
Windows 2000
JDK 1.3.1 06
xml-cocoon2_20021118112152.tar.gz
php 4.2.3
phpsrvlt.jar from somewhere :) (got the link :
http://www.9753.net/download/server/php/java/ )

Has anyone got this error before?

I thought that PHP Generator would be quite useful when dealing with databases
that do have ODBC and do not have JDBC (still I'm trying to figure out how to
access Pervasive 7 from cocoon)

but questions are coming:
1. What about request parameters? Will they be visible in php code?
2. How could I access user session data?
3. What to do if php code generates an error ? I'm almost sure that this would
lead to non well formed xml document
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL

Sendmail action

2002-09-29 Thread Leszek Gawron

What should I do to include sendmailaction.java in source compilation  ?
ouzo


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Connecting to MS SQL Server

2002-09-09 Thread Leszek Gawron

On Mon, Sep 09, 2002 at 12:01:57PM +0200, Lars Martinsen wrote:
 Does anyone have a step-by-step on how to connect to a MS SQL Server and do
 SQL commands on it? I have tried to do it by reading all the help and
 how-tos that is bundeled with Cocoon, but I didn't manage.
For my development I'm using two drviers: Izmado (an ADO wrapper from
www.infozoom.de - quite slow for larger queries) and InetOpta
(www.inetsoftware.de)

to install the mssql server datasource:
1. download one of the drivers and put them into cocoon's web-xml/lib directory 
( for izmado you also have to copy a .dll file from driver zip file in to 
%WINDIR%/system32

2. in cocoon's web.xml file preload appropriate driver class:
 init-param
  param-nameload-class/param-name
  param-value
!-- For IBM WebSphere:
com.ibm.servlet.classloader.Handler --

!-- For Database Driver: --
org.hsqldb.jdbcDriver
com.inzoom.jdbcado.Driver
com.inet.tds.TdsDriver
!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator
--
  /param-value
/init-param

3. Add a datasource:
3a. for izmado it is:
jdbc name=cdn-izmado logger=core.datasources.cdn-izmado
pool-controoller min=1 max=10/
auto-commitfalse/auto-commit
dburljdbc:izmado:Provider=MSDASQL;Driver={Sql 
Server};Server=OUZO\CDN_OPTIMA;Database=CDN_Full;USER ID=SA;/dburl
usersa/user
password/password
/jdbc
3b. for opta it is:
jdbc name=cdn logger=core.datasources.cdn-opta
pool-controoller min=1 max=10/
auto-commitfalse/auto-commit

dburljdbc:inetdae7:localhost:1134?database=CDN_Fullamp;charset=Cp1250/dburl
usersa/user
password/password
/jdbc

tweak dburl for your needs and it will surely work 

I advice to use Inet Opta, but you'll have to pay ( 50 redistributable driver
licenses cost 3200$)

you can get trial versions of both drivers (with time and connection limit)
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Strange response time pattern + Cocoon performance

2002-09-06 Thread Leszek Gawron

I have noticed something very strange in cocoon log :

/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 291 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 511 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 290 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 541 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 290 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 511 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 291 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 511 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 290 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 510 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 280 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 531 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 310 
milliseconds.
/CocoonServlet: 'cdn/dataold/goods' Processed by Apache Cocoon 2.1-dev in 521 
milliseconds.

These are subsequent calls to url from IE. The xsp is very simple:
?xml version=1.0 encoding=ISO-8859-1?
xsp:page language=java xmlns:xsp=http://apache.org/xsp; 
xmlns:esql=http://apache.org/cocoon/SQL/v2;
content
esql:connection
esql:poolcdn/esql:pool
esql:execute-query
esql:queryselect Twr_TwrId, Twr_Grupa, Twr_EAN from 
cdn.towary/esql:query
esql:results
esql:row-results
row
esql:get-columns/
/row
/esql:row-results
/esql:results
/esql:execute-query
/esql:connection
/content
/xsp:page

I have been reporting also some performance problems concering xsp + esql (dev
snapshot from April vs snaspshot from July gave nearly 2 times lower response
times).
From that time I have switched to Windows XP (everyting remained the same -
database, jdbc driver, tomcat version).

Yesterday I've downloaded new cocoon dev snapshot and I am shocked. What
*ALWAYS* took less than 400-500 ms now took more than 2 seconds !! I'm still
praying that it's Windows XP

I'm going to recheck the problem on some older cocoon version later this day
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




very strange error when using tomcat + cocoon + ajp13 + apache

2002-09-05 Thread Leszek Gawron
(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)

And the error in Tomcat log:
2002-09-05 19:40:02 StandardWrapperValve[Cocoon2]: Servlet.service() for servlet 
Cocoon2 threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java:243)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1072)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)

Should I repost it to Tomcat groups or is it maybe something in cocoon ?
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: very strange error when using tomcat + cocoon + ajp13 + apache

2002-09-05 Thread Leszek Gawron

On Thu, Sep 05, 2002 at 07:47:17PM +0200, Leszek Gawron wrote:
 I have a very strange problem and do not quite know what is the cause so I
 post here as I think this is the most responsive group I've ever seen. So:
 
 1. I have a simple xsp page that collects data from request body, parses it to
 DOM structure and uses it later:
 ?xml version=1.0 encoding=ISO-8859-2?
 xsp:page language=java xmlns:xsp=http://apache.org/xsp; 
xmlns:esql=http://apache.org/cocoon/SQL/v2; 
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
   xsp:structure
   xsp:includejava.net.*/xsp:include
   xsp:includeorg.w3c.dom.*/xsp:include
   xsp:includeorg.apache.cocoon.xml.dom.DOMStreamer/xsp:include
   xsp:includeorg.apache.cocoon.xml.dom.DOMBuilder/xsp:include
   xsp:includeorg.apache.cocoon.components.parser.Parser/xsp:include
   xsp:includeorg.apache.cocoon.util.PostInputStream/xsp:include
   
xsp:includeorg.apache.cocoon.environment.http.HttpEnvironment/xsp:include
   xsp:includejavax.servlet.http.HttpServletRequest/xsp:include
   xsp:includeorg.apache.xpath.XPathAPI/xsp:include
   xsp:includejavax.xml.transform.TransformerException/xsp:include
   /xsp:structure
   xsp:logic
   Document document = null;
   long maxNumerNr;
   String odbiorca;
 
   public Document GetInputStreamDocument() throws IOException {
   int contentLength = request.getContentLength();
   if ( contentLength = 0 ) {
I know that this should be  not = but I wanted to generate an exception on
purpose and catch it.
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Setting Content-Length

2002-08-31 Thread Leszek Gawron

I'm using as an application server for pocket pc application. The problem is
downloading even a small file via 19200 GPRS modem takes time, so I wanted to
provide a user with progress bar. The problem is that cocoon is not sending
Content-Length header. Is there a nice and clean way to include it in response
header?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




gzipping content

2002-08-31 Thread Leszek Gawron

I wanted to gzip the content coming out of cocoon so i wanted to add gzip
filter to web.xml file
first it occured to me that web.xml is in servlet 2.2 standart not in 2.3 
so is it possible ? I wouldn't like to use Apache frontend.
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Counting rows in a resultset

2002-08-28 Thread Leszek Gawron

  ...
  xsp:logic
  int rowCount = 0;
  ...
  esql:execute-query
  ...
  esql:row-results
  ...
  xsp:logic
  rowCount++;

try to do select count(*) as row_count from table;

and then in esql:row-results do esql:get-long column=row_count/

I'm not 100% sure but this highly probable to work
   ouzo


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XML data via POST request

2002-08-20 Thread Leszek Gawron

On Tue, Aug 20, 2002 at 01:33:49PM +0200, Boscoe wrote:
  Hi all,
 
 I am writing this because the archive isn't accessible at the moment, so 
 I can' t reply to my original mail.
 
 A while ago, I had the problem that I wanted to send XML data via POST 
 to a XSP. I received some interesting hints from Vadim Gritschenko 
 (thanks again, Vadim), but in the end, nothing seemed to solve my 
 problem, at least in a simple, obvious way. So, here is what I found out:
 
 Actually, the solution is very simple. I looked for a way to directly 
 access the input stream which is associated with a HttpServletRequest. 
 This can be done via
 
 public Map act (Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters params)
 
 which is a method of org.apache.cocoon.acting.AbstractAction. Using this 
 approach, the HttpServletRequest instance is accessible via
 
 objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
 
 I developed my own action, passed the request object the

What do you need the action for ? The way I do it is pure xsp, an example
below.  I do not quite know though how to make it reusable and put it into
logicsheet so I do not have to make xsp:includes and so I could do:
Document document = myutils:get-request-body-as-DOM/;

Could someone help me ?


?xml version=1.0 encoding=ISO-8859-1?
xsp:page language=java
  xmlns:xsp=http://apache.org/xsp;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;
xsp:structure
xsp:includejava.net.*/xsp:include
xsp:includeorg.w3c.dom.*/xsp:include
xsp:includeorg.apache.cocoon.xml.dom.DOMStreamer/xsp:include
xsp:includeorg.apache.cocoon.xml.dom.DOMBuilder/xsp:include
xsp:includeorg.apache.cocoon.components.parser.Parser/xsp:include
xsp:includeorg.apache.cocoon.util.PostInputStream/xsp:include
xsp:includeorg.apache.cocoon.environment.http.HttpEnvironment/xsp:include
xsp:includejavax.servlet.http.HttpServletRequest/xsp:include
xsp:includeorg.apache.xpath.XPathAPI/xsp:include
xsp:includejavax.xml.transform.TransformerException/xsp:include
/xsp:structure
xsp:logic
Document document = null;
public Document GetInputStreamDocument() throws IOException {
//  Node node = 
XPathAPI.selectNode(parser.parse(request.getParameter(xmlparam), kazoo);
int contentLength = request.getContentLength();
if ( contentLength = 0 ) {
HttpServletRequest request =
(HttpServletRequest) objectModel.get( 
HttpEnvironment.HTTP_REQUEST_OBJECT );

PostInputStream anStream = new PostInputStream( 
request.getInputStream(), contentLength );
InputSource contentSource = new InputSource( anStream );

Parser newParser = null;
DOMBuilder builder = null;
try {
newParser = (Parser) this.manager.lookup(Parser.ROLE);
document = newParser.newDocument();
builder = new DOMBuilder(newParser);
newParser.setContentHandler(builder);
newParser.setLexicalHandler(builder);
newParser.parse( contentSource );

} catch (Exception e) {
// ignore - return null
} finally {
this.manager.release((Component) newParser);
}
return builder.getDocument();
}
return null;
}
/xsp:logic
content
xsp:logic
document = GetInputStreamDocument();
try {
idxsp:exprXPathAPI.selectSingleNode(document, 
/Orders/OrderID).getFirstChild().getNodeValue()/xsp:expr/id
} catch ( TransformerException e ) {
} catch ( DOMException e ) {
}
/xsp:logic
/content
/xsp:page

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Packaging a cocoon web application

2002-08-18 Thread Leszek Gawron

I have quite a problem that I think some of you also might have.
I'd like to package my web application along with cocoon to make a nice one
file .war automatic installation package. I have already found that there is
a special build target for cocoon that produces a framework with no examples
or docs ( clean-webapp it is ). The problem is that my cocoon app consists
of one automounted directory, jdbc driver declaration in web.xml and
datasource definition in cocoon.xconf, so some files (apart from adding) have
to be modified also.

I do not want to modify cocoon's build.xml file because that would lead me to
changing it every time i download new distribution.
Is there any simple solution for my problem?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: using 1.8.2 with Tomcat as Service on w2k

2002-08-15 Thread Leszek Gawron

On Mon, Aug 12, 2002 at 05:07:00PM -0400, [EMAIL PROTECTED] wrote:
 
   Hi --
 
   Managed to get Tomcat 3.3.1 running as a service on my w2k server.  It is running 
in conjunction with IIS 5.0.
 
   Tomcat also has Cocoon 1.8.2.  If I kick off Tomcat manually Cocoon works great.  
If it runs as a service, I get
 
 Class not found: org.apache.cocoon.Cocoon
 
   In jvm.stderr
 
   I'm guessing it's a configuration problem - anyone see this before?
yeah, see how Tomcat service is started and compare it to manual startup.bat -
the classpath and some options are set that do not get set while running as
service
ouo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




WAP problem

2002-08-15 Thread Leszek Gawron

Its strange but my cell phone does not open
http://xxx/cocoon/samples/hello-world/hello.wml saying: 1019 Compile Error
What's the matter?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




cocoon.xconf in subdirectory

2002-08-09 Thread Leszek Gawron

Following the statement :

!Sub-Sitemaps and Components

Since Cocoon 2.0.X it has been possible to include additional cocoon.xconf
files in sub-directories. These will be automatically processed by Cocoon,
allowing the declaration and use of additional components, JDBC connections,
etc. Again this enables multiple users to more easily share a single
Cocoon instance.
I was trying to put the appropriate datasource definition for my cocoon
application in th application folder (/cocoon/cdn)

The cocoon says that no datasource can be found so my cocoon.xconf is not
being processed. I also tried to put it into /cocoon/cdn/WEB-INF but that gave
no result also 
my cocoon.xconf file is simple:

coon version=2.0
  datasources
jdbc name=cdn logger=core.datasources.cdn
pool-controoller min=1 max=10/
auto-commitfalse/auto-commit
dburljdbc:izmado:Provider=MSDASQL;Driver={Sql 
Server};Server=OUZO\CDN_OPTIMA;Database=CDN_Demo;USER ID=SA;/dburl
usersa/user
password/password
/jdbc
  /datasources
/cocoon

Is this all really possible ? 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: looking for util reference [was Re: stuck with sunrise and session, please help...]

2002-07-23 Thread Leszek Gawron

On Mon, Jul 22, 2002 at 11:40:50AM +0200, Barbara Post wrote:
 Hi Guido, it works better now, since info are indeed automatically added to
 sunRise context when authenticating. Thanks for the explaination. :-)
 
 However I am looking for a reference regarding the util tags (built-in
 logicsheet).
I think the only available reference are the util.xsl sources .. I haven't
found another
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: How to match jsessionid?

2002-07-23 Thread Leszek Gawron

On Mon, Jul 22, 2002 at 06:53:31PM +0200, Johannes Koch wrote:
 Piroumian Konstantin wrote:
 Ah! It should be that servlet container simply strips out 
 the session Id and
 provides a clear URL. In this case you should use an action 
 to get the
 session Id from request and use a matcher like: foo.*.
 
 How is this done?
 
 
 Take a look at other Session* actions in org.apache.cocoon.acting.* 
 package.
 You should do something like this in your act() method:
 
 Map map = new HashMap(1);
 map.put(jsessionid,
 ObjectModelHelper.getRequest(objectModel).getSession().getId());
 return map;
 
 So, it's not possible only with sitemap things and existing Java code, 
 is it?
Use server pages action: you can write an xsp that will do what you need .. 
What comes to my mind is: 

xsp:page [namespaces here]
page
xsp-request:set-attribute 
name=session_idxsp-session:get-id//xsp-request:set-attribute
action:set-success/
/page

I do not remember how but I know there is a way to access a request attribute
in the sitemap syou can have an access to sessionid this way
Would be something like:
map:match pattern=foo.*
map:act type=serverpages src=[your action file]
map:act type=request!- I'm not sure if this one works for request
attributes --
map:generate src=foo.{../../1}; {session_id}/!-- just for 
an
example --
map:serialize/
/map:act
/map:act
/map:match

ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Redirect depending on action?

2002-07-23 Thread Leszek Gawron

On Mon, Jul 22, 2002 at 02:46:45PM -0400, Spectron International, Inc. wrote:
 I have a password protected site. When a new user is added the password is
 the same as the user name. I want to redirect to a change password page if
 it is the first time he has logged in (username=password). How can I do
 that?
Write simple server pages action that queries the database and returns success
if user has logged in before or false if never before. Then the sitemap looks
like:

map:match pattern=welcome
map:act type=serverpages src=validatepassword.xsp
!-- got here - it means that password is ok
map:redirect-to cocoon://welcome2/
/map:act
map:redirect-to cocoon://changepass/
/map:match

of course you need also a db_authenticator prior to validatepass action
you can also place /welcome2 in internal-only pipeline so it's not available
directly
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Redirect depending on action?

2002-07-23 Thread Leszek Gawron

On Mon, Jul 22, 2002 at 09:34:19PM +0200, Nicola Ken Barozzi wrote:
 Spectron International, Inc. wrote:
 I have a password protected site. When a new user is added the password is
 the same as the user name. I want to redirect to a change password page 
 if
 it is the first time he has logged in (username=password). How can I do
 that?
 
 You should not redirect.
 
 When you get the data about the login, you select what to return to him, 
 ie the change password pipeline or the other one.
 
 Forget redirects if possible, that are like gotos; just think of how you 
 would do things in a more high level proramming language like C or Java, 
 and you will have some hints.
Isn't an internal redirect like a procedure call ? I mean cocoon://pipeline ? 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Esql and rollback

2002-07-23 Thread Leszek Gawron

I'm quite new to JDBC and ESQL. My question is: I have more that one database
inserts. Every one in different esql:execute tag. How can I rollback the
transaction if say the 3rd goes wrong? There is no such esql tag and I do not
know how to obtain the appropriate jdbc session variable? or maybe I'm totally
wrong?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: newbie: aggregation question

2002-07-23 Thread Leszek Gawron

On Tue, Jul 23, 2002 at 09:23:47AM +0200, Luca Morandini wrote:
 Leszek,
 
 I presume this issue can't be solved like you suggested.
 
 Including a stylesheets (which is what Zach wants) is just a mean for separating 
source code into different files, but the
 transformation is happening at the same time.
 What you suggested is a serial bunch of transformations, which is quite different.
I think I did not got the point. Sorry for messing up
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




authentication example problem

2002-07-21 Thread Leszek Gawron

Are you able to login into http://cocoon-srvr/cocoon/samples/authentication/
using cocoon login as written on the welcome page ? 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cocoon database connection

2002-07-14 Thread Leszek Gawron

I have encountered next problem:
After restarting dbms that cocoon uses via pool it is not able to reconnect to
it. Am I doing something wrong or is cocoon problem ?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Stream generator XMLForms

2002-07-13 Thread Leszek Gawron

On Fri, Jul 12, 2002 at 08:55:23PM -0500, Ivelin Ivanov wrote:
 
 Maybe you should be looking at Axis instead of Cocoon for this kind of task.
 
 http://xml.apache.org/axis/
the problem is my client is Pocket PC 2002 and I do not have any SOAP client
libraries for it. 
if I had SOAP I would use Microsoft .NET Web Services

Any other ideas how to do it ? using cocoon actions maybe ?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cocoon as an application server

2002-07-13 Thread Leszek Gawron

Still being lame to cocoon that is why next questions come (among of which the
main is: how to do it ?)

0. I'd like to use cocoon as application server

1. The Pocket PC application needs to send some data to cocoon sever. This is
quite structured and complex data.

2. Using XHTTPRequest component from MSXML library I'm sending this data to
cocoon server.

3. Cocoon server processes the data and sends a XML response.

and now the details:
ad 1). Let's assume the request data is an order so if it was xml it might
look somewhat like (taken from cocoon://samples/Order)
?xml version=1.0?
Orders
OrderID20259/OrderID
CustomerIDWWW/CustomerID
EmployeeID6/EmployeeID
OrderDate2001-05-05 00:00:00/OrderDate
ShipVia1/ShipVia
Freight11.6100/Freight
ShipNameThoms White/ShipName
ShipAddressSomestr. 48/ShipAddress
ShipCityMunster/ShipCity
ShipRegionWest/ShipRegion
ShipPostalCode0/ShipPostalCode
ShipCountryGermany/ShipCountry
OrderDetails
OrderID20259/OrderID
ProductID51/ProductID
UnitPrice42.4000/UnitPrice
Quantity40/Quantity
Discount0.0/Discount
/OrderDetails
OrderDetails
OrderID20259/OrderID
ProductID14/ProductID
UnitPrice18.6000/UnitPrice
Quantity9/Quantity
Discount0.0/Discount
/OrderDetails
OrderDetails
OrderID20259/OrderID
ProductID7/ProductID
UnitPrice12.4000/UnitPrice
Quantity30/Quantity
Discount0.0/Discount
/OrderDetails
Customers
CustomerIDWWW/CustomerID
CompanyNameThomas White/CompanyName
ContactNameKarin Black/ContactName
ContactTitleMarketing Manager/ContactTitle
AddressSomestr. 48/Address
CityMunster/City
/Customers
/Orders

I am not able to use SOAP because Pocket PC platform does not have a good one
( .NET Compact Framework is still beta and PocketSOAP won't even run on
Emulator - I think they cannot be considered as a good basis for reliable
software).

The data does not have to be in that format. If not the question is : WHAT
FORMAT ? 

ad 3)
Using cocoon functionality (actions I think) I have to be able to parse client
data, connect to database, validate data against database, do some database
insertions and finally send some response to client
now the questions:
1. IS IT POSSIBLE TO PARSE A REQUEST PARAMETER WITH XML PARSER? 
2. HOW CAN I OBTAIN A CONNECTION FROM COCOON POOL ? 
3. HOW CAN I SEND STRUCTURED XML RESPONSE USING COCOON ACTION?

In third question I mean I have to provide a client with a complex error
response if error occurs (for example there are only 5 units of product of id
14, so this cannot be only: order not taken  ). I'd like to do it simple and
scalable way ( it means no SAX handling if it's possible)

My time is running and I still have no idea how to manage it all. I've nearly
mastered providing pocket pc client with xml data provided by cocoon
querying databases and it works like a charm. The only thing i need now is to
provide cocoon with data it will be able to understand and process.

the last question is : WHAT IS STREAM GENERATOR FOR ? IT CAN XML'IZE A REQUEST
PARAMETER BUT HOW CAN I PROCESS THIS XML TREE?

I would do anything with the simplest example that solves my problem
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Stream generator XMLForms

2002-07-13 Thread Leszek Gawron

On Sat, Jul 13, 2002 at 09:02:40AM -0500, Jorge Bello wrote:
 From: Leszek Gawron [EMAIL PROTECTED]
 
  What I would like to do is to send xml data to server
  (prepared by client), do some businness processing and send response to
  client.
 
 Perhaps with SOAP ?
AS I said before I do not have reliable SOAP client implementation on Pocket
PC 2002
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Cocoon as an application server

2002-07-13 Thread Leszek Gawron

On Sat, Jul 13, 2002 at 02:43:41PM +0200, Koen Pellegrims wrote:
 Don't cling too much to the fact that you are using a PocketPC. If your
 application sends data as an HTTP request, your server can handle it easily;
 you could develop the entire server-side application using a normal browser
 as a client and then switch over to the PocketPC...
This was my first idea .. the application's got to be quick and I need to do
some client side data caching 

 
 To answer you last question: the StreamGenerator generates XML data from an
 incoming stream, who's length is not fixed. You won't be needing this, as
I think that for stream that length IS fixed
from cocoon docs:
For POST requests with mimetypes: text/plain, text/xml, application/xml the
xml data is in the body of the POST request and its length is specified by the
value returned by getContentLength() method. 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: [OT] SOAP/ XML on PocketPC (was: Re: Cocoon as an application server)

2002-07-13 Thread Leszek Gawron

On Sat, Jul 13, 2002 at 05:09:30PM +0200, Sven Kuenzler wrote:
 Leszek Gawron wrote:
 
 2. Using XHTTPRequest component from MSXML library I'm sending this data to
 cocoon server.
 
 [...]
 
 I am not able to use SOAP because Pocket PC platform does not have a good 
 one
 ( .NET Compact Framework is still beta and PocketSOAP won't even run on
 Emulator - I think they cannot be considered as a good basis for reliable
 software).
 
 While PocketSOAP does not run on PocketPC 2002 emulation, I am using it 
 on PocketPC 2002 and HPC Jornada devices w/o any problem.
 
 However, I am using it in order to transfer DOMDocuments. This means 
 that I  serialize the document as lt;escaped/ String parameter that 
 needs another parsing at the server side.
 
 Thus, I am curious about your XMLHTTPRequest approach. I thought these 
 components where available on MSXML 3.0 and upwards, while WinCE 3.0 
 still includes MSXML 2.5!? Does the component on WinCE support HTTPS and 
 authentication?
the article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnce30/html/xml_ce.asp
says that you'vee got XMLHTTP interface available:

provides even an example:
var httpOb = new ActiveXObject(Microsoft.XMLHTTP);
httpOb.Open(POST,http://myServer/postContact.asp;, false);
var contact = template.XMLDocument.documentElement;
contact.childNodes.item(0).text = contactName.value;
contact.childNodes.item(1).text = contactPhone.value;
contact.childNodes.item(2).text = contactEmail.value;
httpOb.send(template.XMLDocument);

I still am in attempt stage of my application (and becoming more and more
furious while new troubles of this kid arrive). I've got no idea if XMLHTTP
supports HTTPS (eVC propmpts for some dll files that i do not have - I will
deal with that as soon as I take care of server part)

Can you give me an example how you are sending xml documents to the server? 
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Stream generator XMLForms

2002-07-13 Thread Leszek Gawron

On Sat, Jul 13, 2002 at 11:23:56AM -0500, Ivelin Ivanov wrote:
 
 Tell us more about the problem you're trying to solve.
 What type of content you want to send in and return back.
 
 Can you you consider using HTTP GET parameters to submit to Cocoon, instead
 of XML?
 This will allow you to use XMLForm, etc.
I am writing an application for Pocket PC for company's mobile representatives
I don't think I can use GET parameter because of the size of data (whole
invoice for example - I do not want to collect is sequentially in session
object because it's more complicated)

 Otherwise you can use StreamGenerator. It will read your XML Post and make
 the XML available in the pipeline.
Still I do not know how to validate the data ( product units number available
in store vs units ordered for example ) and place an order using plain XSL
because that's all left when you receive the document as SAX events

The best way i figured now is:
make an xsp that parses appropriate request parameter manually, esqls to
database, outputs result

ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Stream generator XMLForms

2002-07-13 Thread Leszek Gawron

On Sat, Jul 13, 2002 at 07:35:32PM +0200, Koen Pellegrims wrote:
 Maybe off-topic, but are you sure you are taking the right approach with
 this?
 If the communication is wireless, how will you add transaction support?
 You have to make sure that each invoice is sent and that it is sent only
 once!
 
 I have a lot of expierence in this area and I can tell you that plain
 web-technologies are not very well suited for this kind of communications (I
 learned this the hard way :-p ).
 Maybe you should look at a more suitable approaches such as Sybase's
 iAnywhere suite, which is very good; or (if you happen to have an SAP
 backend) the SAP mobile engine. Both of these technologies allow you to run
 an offline application on a mobile device and then synchronize (be it
 wireless or not) with a backend. Both of them can be implemented with full
 transaction support...
It is not plain web-technology project. The client is written in eVC 3.0. I'm
using cocoon as an application server. And for maintaining database coherence
I'm sending whole transaction data as one part (client prepares the invoice
and sends it in one piece). And the client will handle the proper
order/invoice placing so the user won't be able to resend it (just like in a
web browser)

ouzo

PS. SAP engine is far too expensive, got no idea about Sybase solution
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Stream generator

2002-07-12 Thread Leszek Gawron

There is a nice example how cocoon can handle posted xml data under
samples/request1 uri. Still I got no idea how to process this data. Let's
suppose I really want to make an order so it has to end up in some database
tables. What do I do ? Do I need to write my own action? Is it posssible to
use only XSP ? If an action is needed can anyone provide me with simplest
action code snippet. My knowledge of cocoon classes is still very limited.
Thanks
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Stream generator XMLForms

2002-07-12 Thread Leszek Gawron

On Fri, Jul 12, 2002 at 09:32:12AM -0400, Andrew C. Oliver wrote:
 enlightenment on this question is found here: 
 http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html
I do not think that is the solution for my problem. From what I have read(
maybe I'm wrong ) XMLForms are good for collecting data on server side for
example in DOM Node. What I would like to do is to send xml data to server
(prepared by client), do some businness processing and send response to
client.
In my case the client is a simple C++ application using MSXML
ouzo

PS. I would be grateful for any quick tutorial
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-07-04 Thread Leszek Gawron

 That looks bad, indeed. I will have a look at it but it will take some
 time to reproduce these values (gimme a week or so). I take your word
 for it that you haven't changed anything else around it like move the
 DBMS to another machine, upgrade your network, CPU, RAM, JDK, JDBC
 driver or anything else.

I've collected these timings today substituting only cocoon directories

 
 However, I will not be able to test against your setup and use a
 different DBMS / OS / JDK / Servlet-Container.
To eliminate my fault somewhere please download file from

http://ouzo.niebiosa.com/cocoon.rar (rar 3.0 packed - ca. 18 MB ) or
http://ouzo.niebiosa.com/cocoon.tar.gz  - ca. 27 MB

It contains both cocoon versions (apidocs were stripped because of size but I
left the rest). I can also send you the database installation file but you'll
have to run in on Win32( or someone else who is willing to try to reproduce my
results)

 It would help to have some more information on the table, like number
 and type of columns, number of rows.

at the location http://ouzo.niebiosa.com/table.txt you will find as much table
information as I could get
the records I'm working on are at http://ouzo.niebiosa.com/records.txt

 If you care to do some experiments yourself, the ESQL stuff is fairly
 self-contained and does not depend on other changes in Cocoon. Thus
 it's only o.a.c.c.l.m.xsp/Esql*.java and o.a.c.c.l.m.xsp.java/esql.xsl
 
 The resulting java code produced from your XSP should be fairly
 similar with both versions, actually. 
 
 The main difference should be the introduction of various switch
 statements to select different results. Those are outside the
 retrieval loop and so should not account for a big slow-down.
 
 The other major difference should be, that the current version does
 not check for another result set while the older version did (in a not
 JDBC compliant way - that was changed to be compliant and later
 disabled).
 
 Other things happend in the grouping / CallableStatement support which
 should not be used in your case.

What exactly should I do ?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-07-04 Thread Leszek Gawron

 Well, if you want to spare me the experimenting you could take the
 ESQL components from one version and replace the other versions,
 rebuild and retry. If this setup shows the same timings as before

The problem is I do not have the cocoon sources for older version. If you are
able to identify the version and tell me where I can download it from (I think
dev snapshots are not archved, are they?)
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




SUMMARY: Cocoon, MSDE, jadozoom jdbc driver

2002-07-02 Thread Leszek Gawron

SUMMARY:
When using cocoon with MSDE and jadozoom jdbc driver this error may occur:
  On Sunday 30 June 2002 01:24 pm, Leszek Gawron wrote:
   com.inzoom.adojni.ComException: Current provider does not support returning
   multiple recordsets from a single execution. in ADODB.Recordset code=0
   Type=1

The error starts to occur somewhere between esql.xsl version 1.6 (still works)
and 1.28 (does not). The 1.29 works properly for this case

 Please try again with a snap shot newer than 2002-06-28
Applying this solved the problem
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-07-02 Thread Leszek Gawron

 Since multiple important DBMSs have problems with checking for
 multiple result sets, it has been disabled by default for the current
 CVS version. It can be re-enabled by using
 esql:allow-multiple-resultsyes/esql:allow-multiple-results Option
 to esql:connection/.
 
 Please try again with a snap shot newer than 2002-06-28

It works quite fine with only one small but: I was using cocoon version from
april ( 2002.04.20 i think ). The response times (after compiling the xsp
page) where somewhere about 80-190 ms. Now it's 200-400 ms and sometimes more.
What may cause such great difference in response times? The xsp file is really
simple: it does select * from tablename only and outputs all columns. The
recordset retrieved contains 23 records (about 20 columns each).
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-07-02 Thread Leszek Gawron

On Tue, Jul 02, 2002 at 12:09:35PM +0200, Christian Haul wrote:
 On 02.Jul.2002 -- 11:55 AM, Leszek Gawron wrote:
   Since multiple important DBMSs have problems with checking for
   multiple result sets, it has been disabled by default for the current
   CVS version. It can be re-enabled by using
   esql:allow-multiple-resultsyes/esql:allow-multiple-results Option
   to esql:connection/.
   
   Please try again with a snap shot newer than 2002-06-28
  
  It works quite fine with only one small but: I was using cocoon version from
  april ( 2002.04.20 i think ). The response times (after compiling the xsp
  page) where somewhere about 80-190 ms. Now it's 200-400 ms and sometimes more.
  What may cause such great difference in response times? The xsp file is really
  simple: it does select * from tablename only and outputs all columns. The
  recordset retrieved contains 23 records (about 20 columns each).
 
 Mmmh, nothing that comes to mind should have a significant effect on
 performance. Someone suggested using a different driver, so, did you
 measure the different response times with the same driver? Does
 performance degenerate over time?
It is the very same jadozoom driver. I cannot tell if the performance
degenerates but I think not. The difference is significant though.
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-07-02 Thread Leszek Gawron

 It is the very same jadozoom driver. I cannot tell if the performance
 degenerates but I think not. The difference is significant though.
   ouzo
here are some timings taken from cocoon log:

version somewhere round 2002.04.20
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 2.453 seconds.
DEBUG HttpProcessor[80][4]/AbstractEnvironment: Resolving 'docs/samples/xsp/esql2.xsp' 
in context 'file:/C:/Dev/Tomcat/webapps/ROOT/'
DEBUG HttpProcessor[80][4]/AbstractEnvironment: Resolving 'docs/samples/xsp/esql2.xsp' 
in context 'file:/C:/Dev/Tomcat/webapps/ROOT/'
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 270 milliseconds.
DEBUG HttpProcessor[80][4]/AbstractEnvironment: Resolving 'docs/samples/xsp/esql2.xsp' 
in context 'file:/C:/Dev/Tomcat/webapps/ROOT/'
DEBUG HttpProcessor[80][4]/AbstractEnvironment: Resolving 'docs/samples/xsp/esql2.xsp' 
in context 'file:/C:/Dev/Tomcat/webapps/ROOT/'
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 140 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 110 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 200 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 211 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 110 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 190 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 120 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 111 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 200 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 110 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 230 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 100 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 220 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 110 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 110 milliseconds.

version 2002.07.01
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 5.378 seconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 460 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 250 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 270 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 280 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 300 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 231 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 270 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 201 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 270 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 771 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 321 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 300 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 300 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 210 milliseconds.
INFO  HttpProcessor[80][4]/CocoonServlet: 'xspxml/cdn' Processed by Apache Cocoon 
2.1-dev in 300 milliseconds.

there was no performance tuning, no other pages are created just standard
cocoon installation + one xsp file (and jdbc driver of course)

ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has

Re: strange database problem

2002-07-02 Thread Leszek Gawron

 Just double checking. You've upgraded from 2.0.2 to 2.1-dev
 (snapshot), right? Could you try the same with a 2.0.3 CVS version?
Both cocoon versions are 2.1-dev (downloaded as cvs snapshots)
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




strange database problem

2002-06-30 Thread Leszek Gawron
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Unknown Source)

-- 
-- [EMAIL PROTECTED]
Leszek GawronICQ# 19681190
Software development  SE consulting Mobile +48 (608) 23 74 55

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-06-30 Thread Leszek Gawron

 The esql logicsheet is now using JDBC features that your driver does not 
 support.
I do not really think that is a problem. See what gets generated:

row
   
Twr_TwrId22/Twr_TwrIdTwr_Typ0/Twr_TypTwr_KodNIWELACJA/Twr_KodTwr_NumerKat020/Twr_NumerKatTwr_SWW/Twr_EAN/Twr_NazwaNiwelacja
 ogrodu, przygotowanie do 
nasadzeń/Twr_NazwaTwr_GrupaUSŁUGI/Twr_GrupaTwr_URL/Twr_KatId55/Twr_KatIdTwr_KategoriaWykonanie
 
ogrodów/Twr_KategoriaTwr_Opis/Twr_EdycjaNazwy0/Twr_EdycjaNazwyTwr_KopiujOpis1/Twr_KopiujOpisTwr_EdycjaOpisu0/Twr_EdycjaOpisuTwr_JMDZIEŃ/Twr_JMTwr_JMZ/Twr_JMPrzelicznikL1/Twr_JMPrzelicznikLTwr_JMPrzelicznikM1/Twr_JMPrzelicznikMTwr_JMCalkowite0/Twr_JMCalkowiteTwr_TwCNumer2/Twr_TwCNumerTwr_UdostepniajWCenniku0/Twr_UdostepniajWCennikuTwr_KosztUslugi70/Twr_KosztUslugiTwr_KosztUslugiTyp1/Twr_KosztUslugiTypTwr_Stawka22/Twr_StawkaTwr_Flaga2/Twr_FlagaTwr_Zrodlowa0/Twr_ZrodlowaTwr_OpeZalID3/Twr_OpeZalIDTwr_TS_Zal2000-11-15
 10:37:37/Twr_TS_ZalTwr_OpeModID1/Twr_OpeModIDTwr_TS_Mod2001-11-23 
09:41:17/Twr_TS_ModTwr_KatZakId55/Twr_KatZakIdTwr_KategoriaZakWykonanie 
ogrodów/Twr_KategoriaZakTwr_StawkaZak22/Twr_StawkaZakTwr_FlagaZak2/Twr_FlagaZakTwr_ZrodlowaZak0/Twr_ZrodlowaZak

   /row
 
row
   
Twr_TwrId23/Twr_TwrIdTwr_Typ1/Twr_TypTwr_KodGRABKI/Twr_KodTwr_NumerKat021/Twr_NumerKatTwr_SWW/Twr_EAN201000106/Twr_EANTwr_NazwaGrabki
 do 
liści/Twr_NazwaTwr_GrupaAKCESORIA/Twr_GrupaTwr_URL/Twr_KatId17/Twr_KatIdTwr_KategoriaSprzedaż
 akcesoriów 
ogrodniczych/Twr_KategoriaTwr_Opis/Twr_EdycjaNazwy1/Twr_EdycjaNazwyTwr_KopiujOpis1/Twr_KopiujOpisTwr_EdycjaOpisu1/Twr_EdycjaOpisuTwr_JMSZT/Twr_JMTwr_JMZ/Twr_JMPrzelicznikL1/Twr_JMPrzelicznikLTwr_JMPrzelicznikM1/Twr_JMPrzelicznikMTwr_JMCalkowite0/Twr_JMCalkowiteTwr_TwCNumer2/Twr_TwCNumerTwr_UdostepniajWCenniku0/Twr_UdostepniajWCennikuTwr_KosztUslugi0/Twr_KosztUslugiTwr_KosztUslugiTyp1/Twr_KosztUslugiTypTwr_Stawka7/Twr_StawkaTwr_Flaga2/Twr_FlagaTwr_Zrodlowa0/Twr_ZrodlowaTwr_OpeZalID3/Twr_OpeZalIDTwr_TS_Zal2000-11-15
 14:51:36/Twr_html xmlns:error=http://apache.org/cocoon/error/2.0;
head
META http-equiv=Content-Type content=text/html; charset=UTF-8
titleerror:An error occurred/title
style

23 rows get generated and suddenly one of the tags does not get closed:
Twr_TS_Zal2000-11-15 14:51:36/Twr_html 
xmlns:error=http://apache.org/cocoon/error/2.0;
   ^^ in here

if my driver does not support logicsheet functionality howcome do I see some data from 
db?
ouzo
-- 
-- [EMAIL PROTECTED]
Leszek GawronICQ# 19681190
Software development  SE consulting Mobile +48 (608) 23 74 55

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: strange database problem

2002-06-30 Thread Leszek Gawron

 The esql logicsheet is now using JDBC features that your driver does not 
 support.
the older version that works for me is 1.18
the one that does not: 1.28

-- 
-- [EMAIL PROTECTED]
Leszek GawronICQ# 19681190
Software development  SE consulting Mobile +48 (608) 23 74 55

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




namespace prefixes declarations in output HTML (repost - sorry if you got it twice)

2002-05-12 Thread Leszek Gawron

[Sorry if you got this mail twice - I have some problems with my SMTP
server]

I know that this subject has already been discussed but I think with no
success I'm preparing a cross-platform system for very thin clients
(PDAs for example) I'd like to strip all namespace declarations before
serialization. I have seen somewhere on the mailing archives that I
should use exclude-result-prefixes directive.

So I have (the version I'm presenting is still not optimal in case of
size - I have to use CSS stylesheets also):

1. A simple xsp file:
?xml version=1.0 encoding=UTF-8?
xsp:page language=java xmlns:xsp=http://apache.org/xsp; 
xmlns:xsp-formval=http://apache.org/xsp/form-validator/2.0; 
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
page
titleLogin page/title
body
para
bEnter login information:/b
/para
form action=login method=POST
input type=hidden name=visited
value=true/
xsp:logic
boolean userHasSeenForm =  (xsp-request:get-parameter
name=visited/ != null );
/xsp:logic
xsp-formval:descriptor
name=descriptors/login.xml
constraint-set=login-info
xsp-formval:validate
name=username
xsp:logic
if (userHasSeenForm) {
if ( xsp-formval:is-null/ ) {
div align=center

bPlease provide a valid
username/b
/div
} else if (
xsp-formval:is-toolarge/ ) {
div align=center

bUsername too long/b
/div
}
}
/xsp:logic
[...]
and so on - this is not important here

2. my stylesheet is :
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
exclude-result-prefixes=xsp xsp-request xsp-formval
xsl:template match=page
html
head
title
xsl:value-of select=title/
/title
META content=0 http-equiv=expires/
META content=nocache
http-equiv=pragma/
/head
xsl:apply-templates/
/html
/xsl:template
xsl:template match=title/
xsl:template match=body
body style=font-family: Tahoma;font-size: 10pt
bgcolor=#FAEBD7
xsl:apply-templates/
/body
/xsl:template
xsl:template match=para
p align=centerxsl:apply-templates//p
/xsl:template
xsl:template match=br
br/
/xsl:template
xsl:template match=link
a href={@href}xsl:value-of select=.//a
/xsl:template
xsl:template match=@*|node() priority=-2
xsl:copy
xsl:apply-templates select=@*|node()/
/xsl:copy
/xsl:template
xsl:template match=text() priority=-1
xsl:value-of select=./
/xsl:template
/xsl:stylesheet

Although I have included exclude-result-prefixes=xsp xsp-request
xsp-formval still the output is:

html
head
META http-equiv=Content-Type content=text/html; charset=UTF-8
titleLogin page/title META http-equiv=expires content=0 META
http-equiv=pragma content=nocache /head

body bgcolor=#FAEBD7 style=font-family: Tahoma;font-size: 10pt

p align=center

b xmlns:xsp=http://apache.org/xsp;
xmlns:xspdoc=http://apache.org/cocoon/XSPDoc/v1; 
xmlns:xsp-formval=http://apache.org/xsp/form-validator/2.0; 
xmlns:xsp-request=http://apache.org/xsp/request/2.0;Enter login
information:/b

/p

form xmlns:xsp=http://apache.org/xsp;
xmlns:xspdoc=http://apache.org/cocoon/XSPDoc/v1; 
xmlns:xsp-formval=http://apache.org/xsp/form-validator/2.0; 
xmlns:xsp-request=http://apache.org/xsp/request/2.0; action=login
method=POST

input type=hidden name=visited value=true

so it's more than ugly (the namespace declarations have been propagated
to all tags that are not explicitly matched in the xsl stylesheet

What can I do ?
ouzo


-
Please check that your question has not already been 

Re: Printing Cocoon2 docs

2002-05-10 Thread Leszek Gawron

 If you want to print the following page:
 http://localhost:8080/cocoon/documents/introduction.html
 
 You can modify it to this URL:
 http://localhost:8080/cocoon/documents/body-introduction.xml
Isn't there a special build target that creates printable docs version ? 
ouzo
-- 
-- [EMAIL PROTECTED]
Leszek GawronICQ# 19681190
Software development  SE consulting Mobile +48 (608) 23 74 55

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Cocoon installation on JDK 1.4

2002-04-27 Thread Leszek Gawron

has anyone succeeded in this one (on Win32) ? 
I've spent almost a week digging mailing archives, cocoon website, 
Even when I succeed to compile and install war file in Tomcat/webapps dir a
lot of examples do not work at all.
I'm downloading CVS snapshots every day but the effect is quite the same. The
latest stable platform I managed to install was Cocoon 2.0.1, JDK 1.3.1_02
and Tomcat 4.0.3, anything higher makes some features unusable

ouzo
-- 
-- [EMAIL PROTECTED]
Leszek GawronICQ# 19681190
Software development  SE consulting Mobile +48 (608) 23 74 55

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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