Re: Changing request Parameters in an Action.

2002-10-06 Thread Antonio Gallardo Rivera

The answer I found was using Javascript to change the values of 2 hidden 
parameters using the OnChange event of the object select.

Antonio Gallardo

El Lunes, 07 de Octubre de 2002 00:31, Antonio Gallardo Rivera escribió:
> Sorry but, I am reopening this, because I need to change some parameters on
> the client form before I can add it to the database.
>
> I have a 2 fields database key:
>
> cat_id (foreign key from table categories)
> pro_id
>
> In the table are some values:
>
> cat_idpro_id  pro_name
> 1 1   product1
> 1 2   product2
> 2 1   product3
> 2 2   product4
>
> I need to let the user select the product from a HTML page in a combo
> basis. Then i can code:
>
> 
>   product1
>   product2
>   product3
>   product4
> 
>
> When the user send the request I get a parameter my_product="x-y". Where x
> is the encoded value of cat_id and y is the value of pro_id.
>
> Now my problem comes to life: How to create new request parameters into an
> action to make 2 new parameters:
>
> cat_id="x" and pro_id="y"
>
> Please help me ;)
>
> Antonio Gallardo.
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Changing request Parameters in an Action.

2002-10-06 Thread Antonio Gallardo Rivera

Sorry but, I am reopening this, because I need to change some parameters on 
the client form before I can add it to the database.

I have a 2 fields database key:

cat_id (foreign key from table categories)
pro_id 

In the table are some values:

cat_id  pro_id  pro_name
1   1   product1
1   2   product2
2   1   product3
2   2   product4

I need to let the user select the product from a HTML page in a combo basis. 
Then i can code:


product1
product2
product3
product4


When the user send the request I get a parameter my_product="x-y". Where x is 
the encoded value of cat_id and y is the value of pro_id.

Now my problem comes to life: How to create new request parameters into an 
action to make 2 new parameters:

cat_id="x" and pro_id="y"

Please help me ;)

Antonio Gallardo.

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: URL caching in pipelines

2002-10-06 Thread Miles Elam

Ivelin Ivanov wrote:

>Try the WebServicesProxyGenerator.
>It uses the HttpClient library, which might actually support caching. Have
>not tried it though.
>
>Ivelin
>  
>

Thanks, but a quick browse through the source doesn't reveal anything 
about forced caching.  To be more specific, the HttpClient would support 
caching of content that is flagged as cacheable by the server, but if 
they server doesn't send an expires header, HttpClient (to my knowledge) 
would make just as many requests but with an If-Modified-Since header. 
 Since the feed on the server is a static file that periodically 
generated, HttpClient may save bandwidth, but do basically nothing for 
server load.  Somehow I think the latter is of more interest to the 
Slashdot folks since the file is about 6K.

What I'm looking for is a way to mandate to my Cocoon installation that 
I don't care more often than every thirty minutes.  As a bonus, I'd like 
it to allow the cache to agree so that my stylesheets aren't reprocessed 
unnecessarily.

I know.  I'm asking a lot.  ;-)

Wasn't Gianugo Rabellino working on something like this?

- Miles Elam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: URL caching in pipelines

2002-10-06 Thread Ivelin Ivanov


Try the WebServicesProxyGenerator.
It uses the HttpClient library, which might actually support caching. Have
not tried it though.

Ivelin

- Original Message -
From: "Miles Elam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 06, 2002 9:13 PM
Subject: URL caching in pipelines


> I want to put a Slashdot feed on my web page with the following (out of
> context for brevity):
>
> 
>   
> http://slashdot.org/slashdot.xml"/>
> 
>   
> 
>
> This works fine, but the server opens a socket to Slashdot on every
> request to my page.  If my site gets some traffic, Slashdot will not be
> happy with me.  Further, my bandwidth usage goes up.  And when Slashdot
> (and others) become slow, my site will become slow right along with
> them.  None is particularly appealing.
>
>  From the Slashdot syndication page (slashcode): "Do whatever you want,
> but *don't* access the file more than once every 30 minutes."
>
> I went hunting in the mail archives for user and dev and came up with
> the following:
>
> 
>   
> http://slashdot.org/slashdot.xml"/>
> 
>   
> 
>
> No difference.  My server's still hitting Slashdot over and over.  I
> tried telnet-ing to the port to at least check for "expires" headers.
>  No dice.  I looked at HttpHeaderAction but that doesn't seem to touch
> Cocoon's cache at all (so of limited use to me).  I've used both 2.0.3
> and 2.1 CVS (as of two weeks ago).
>
> A part of me smiles when I think that if Slashdot ever "slashdotted" me,
> they would be somewhat slashdotted themselves, but this is not my intent
> and I very much want to be a decent feed client.
>
> Anyone have any ideas?  ...preferably with little stress on my server.
>
> - Miles Elam
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Changing parameters of request inside Action

2002-10-06 Thread Antonio Gallardo Rivera

Thanks. I will try in another way:

1-generate a random key - I will generate at the request time from the XSP.
2-Create a timestamp - Like above.
3-Validate a code numer based on the category of the selected product - 
Validate in an action.

Thanks.

El Domingo, 06 de Octubre de 2002 20:59, Ryan Agler escribió:
> I am not sure how to alter request parameters, but I do know you can
> set/change request attributes.  So, If you had an action with a
> statement like request.setAttribute("myAtt","10"), and then you could
> call request.getAttribute("myAtt") from subsequent actions or xsp.
>
> -Original Message-
> From: Antonio Gallardo Rivera [mailto:[EMAIL PROTECTED]]
>
> Sent: Sunday, October 06, 2002 8:48 PM
> To: [EMAIL PROTECTED]
> Subject: Changing paramaters of request inside Action
>
> Is posible to change parameters request inside an Action?
>
> I need to set some parameters before insert into the database.
>
> For example:
> 1-generate a random key
> 2-Create a timestamp
> 3-Validate a code numer based on the category of the selected product
> after
> the user select a product and write a number.
>
> Thanks in advance, :)
>
> Antonio Gallardo
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Changing parameters of request inside Action

2002-10-06 Thread Ryan Agler

I am not sure how to alter request parameters, but I do know you can
set/change request attributes.  So, If you had an action with a
statement like request.setAttribute("myAtt","10"), and then you could
call request.getAttribute("myAtt") from subsequent actions or xsp.

-Original Message-
From: Antonio Gallardo Rivera [mailto:[EMAIL PROTECTED]]

Sent: Sunday, October 06, 2002 8:48 PM
To: [EMAIL PROTECTED]
Subject: Changing paramaters of request inside Action

Is posible to change parameters request inside an Action?

I need to set some parameters before insert into the database.

For example:
1-generate a random key
2-Create a timestamp
3-Validate a code numer based on the category of the selected product
after 
the user select a product and write a number.

Thanks in advance, :)

Antonio Gallardo

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




URL caching in pipelines

2002-10-06 Thread Miles Elam

I want to put a Slashdot feed on my web page with the following (out of 
context for brevity):


  
http://slashdot.org/slashdot.xml"/>

  


This works fine, but the server opens a socket to Slashdot on every 
request to my page.  If my site gets some traffic, Slashdot will not be 
happy with me.  Further, my bandwidth usage goes up.  And when Slashdot 
(and others) become slow, my site will become slow right along with 
them.  None is particularly appealing.

 From the Slashdot syndication page (slashcode): "Do whatever you want, 
but *don't* access the file more than once every 30 minutes."

I went hunting in the mail archives for user and dev and came up with 
the following:


  
http://slashdot.org/slashdot.xml"/>

  


No difference.  My server's still hitting Slashdot over and over.  I 
tried telnet-ing to the port to at least check for "expires" headers. 
 No dice.  I looked at HttpHeaderAction but that doesn't seem to touch 
Cocoon's cache at all (so of limited use to me).  I've used both 2.0.3 
and 2.1 CVS (as of two weeks ago).

A part of me smiles when I think that if Slashdot ever "slashdotted" me, 
they would be somewhat slashdotted themselves, but this is not my intent 
and I very much want to be a decent feed client.

Anyone have any ideas?  ...preferably with little stress on my server.

- Miles Elam



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Changing paramaters of request inside Action

2002-10-06 Thread Antonio Gallardo Rivera

Is posible to change parameters request inside an Action?

I need to set some parameters before insert into the database.

For example:
1-generate a random key
2-Create a timestamp
3-Validate a code numer based on the category of the selected product after 
the user select a product and write a number.

Thanks in advance, :)

Antonio Gallardo

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




JBoss-3.0.3_Tomcat-4.1.12 with cocoon 2.1

2002-10-06 Thread Thorsten Mauch

Hi All
 I try to setup my cocoon Application to work inside the Jboss-tomcat.
I changed from crimson/jaxp to xerces. I also copy some of the jars 
form cocoon/WEB-INF/lib to /server/default/deploy to avoid classnotfound
exceptions.
Currently i can run the cocoon and i see the documentaion. But i got a lot
errors about logging
like:

01:03:31,186 INFO  [Engine] DEBUG   (2002-10-07) 01:03.31:186   []
(/cocoon/webshop/index) HttpProcessor[8080][1]/DefaultLogKitManag
er: Logger for category sitemap.KONT not defined in configuration. New
Logger created and returned
01:03:31,456 INFO  [Engine] DEBUG   (2002-10-07) 01:03.31:456   []
(/cocoon/webshop/index) HttpProcessor[8080][1]/DefaultLogKitManag
er: Logger for category sitemap.generator.file not defined in configuration.
New Logger created and returned

When I try to run my own application I get also a error:
ERROR   (2002-10-07) 01:03.26:539   [access] (Unknown-URI)
Unknown-thread/CocoonServlet: Cocoon servlet threw an Exception while trying
to close stream.
java.io.IOException: The stream has been closed
at
org.apache.catalina.connector.ResponseStream.flush(ResponseStream.java:238)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1139)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
at java.lang.Thread.run(Thread.java:484)

I have no idea what this means and where I have to search for this error. 
If anybody have a instruction how to setup Jboss 3.0.3 with cocoon
it would make me really happy ;)

Thanx a lot Thorsten

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Random generator

2002-10-06 Thread Antonio Gallardo Rivera

Hi Folks!

Is in Cocoon support for generating random database keys? Or a function that 
can return a random number?

I know that in Java is support for the Random class. This class generate a 
sequence based on a seed (like always).

The point is: I need generator of random numbers that will live all the 
run-time to return for every request a new random number lets said: 2^32.

Maybe this generator of random numbers can be called inside an action or in a 
xsp fashion.

Thanks in advance

Antonio Gallardo.

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




*Bizarre* Sitemap Problem

2002-10-06 Thread Sonny Sukumar

Hi guys,

I am new to Cocoon, but I have read the FAQ and tried searching some archives as well 
as on Google, and haven't found the solution to this. Still, I am *really* sorry if 
this has been touched on before.

Anyhow, onto the problem.  I'm following along in the book Cocoon: Building XML 
Applications and trying to get the "Hello World" example to work.  For ultra 
simplicity I modified sitemap.xmap so that the  section is ONLY the 
following (after backing up the original sitemap.xmap, of course):


  

  
  
  

  
 

What's strange is that even after stopping and restarting Tomcat, when I go to 
http://localhost:8080/cocoon, the original Cocoon welcome page comes up that says 
something like "Congratulations, you got me running".  I flushed the cache in 
Konqueror and turned off its cache as well.  Also, here's the  tag in 
$COCOON_HOME/WEB-INF/cocoon.xconf:



The check-reload and reload-methods look like what they should be for the sitemap to 
be reloaded upon being changed and before serving any new requests.

Ok, now here's the contents of the helloworld.xml file:



  Hello World
 

And of the helloworld2html.xsl file:


http://www.w3.org/1999/XSL/Transform";>
  

  

  

  


Btw, both of these files are in $COCOON_HOME.  Here is the error I get when I try to 
load http://localhost:8080/cocoon/helloworld:

"The requested URI "/cocoon/helloworld" was not found."

There is no stacktrace given.  So..with the new sitemap it *can't* map the URI 
helloworld and yet it can still find the files for http://localhost:8080/cocoon.  This 
is really baffling me.

Lastly, here's my version info:
Cocoon 2.0.3 (latest stable release, obtained in binary form & meant for JDK 1.4, 
which I have)
Tomcat 4.1.12 (just obtained about a week ago in binary form)
JDK: 1.4
OS: Redhat 7.3

I would be very happy if one of you could take the time to point me in the right 
direction.  I'm a newbie, I know, but I'd like to become the next happy Cocoon user.

All the best,

Sonny

_
Conserve wilderness with a click (free!) and get your own EcologyFund.net email 
(free!) at http://www.ecologyfund.com.

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP & more! http://www.everyone.net/selectmail?campaign=tag

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Problem with modular database actions from CVS

2002-10-06 Thread Hugo Burm

Hello,

I am using the modular database actions and doing a simple select action on
a table.
With the CVS version of about a week ago, this worked ok, and the results
were stored in the request attributes by the default output module.
With the CVS from Oct 5, I get a warn message : "Could not select output
mode attribute:null" and the values that are fetched from the database are
not stored in the request atttributes. From the log files I can see that the
key is set correctly and the results are fetched correctly from the
database. Storing them in the request attributes seems to be the problem. Is
this broken or do I now have to specify an output module myself?

Thanks

Hugo Burm
[EMAIL PROTECTED]

sitemap.log
===
Thread-9/AbstractComplementaryConfigurableAction: (Re)Loading
db_consult_descriptor.xml
Thread-9/DatabaseAction: modeTypes : {2=attribute, 1=others, 0=autoincr}
Thread-9/DatabaseAction: i=0
Thread-9/DatabaseAction: requested mode was "others" returning "others"
Thread-9/DatabaseAction: i=1
Thread-9/DatabaseAction: i=2
Thread-9/DatabaseAction: i=3
Thread-9/DatabaseAction: query: SELECT idc, display, descr FROM t_consult
WHERE userid= ?
Thread-9/DatabaseAction: Trying to set column t_consult.userid from j-auth
using getAttribute method
Thread-9/DatabaseAction: Setting column t_consult.userid [0] hugob
Thread-9/DatabaseAction: > row no. 0
Thread-9/DatabaseAction: Setting column t_consult.userid[0] to hugob
Thread-9/DatabaseAction: Could not select output mode attribute:null
Thread-9/DatabaseAction: Setting column t_consult.idc[0] to 7
Thread-9/DatabaseAction: Could not select output mode attribute:null

descriptor
==
  

  

 


  
  
  

  


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: jsp cocoon

2002-10-06 Thread Michael Wechner



[EMAIL PROTECTED] wrote:

> hello,
> 
> here it's a big quest
> 
> my name is raul, i'm spanish student that is trying to make a website 
> that is based on xml, jsp,servlets(tomcat). It must be able to 
> transfor xml in some formats.Some of the source is in mathml
> that i have to transform in svg,and all the xml documents (that are 
> dinamic generated ) must to be send to the browser in html, wml or 
> pdf.
> 
> My problens are:
> 
> 1.-I have all implementes in jsp and servlets pages,so i can't use 
> cocoon 2.0 that i think
> it's able to do all this thins.
> Any one knows a way to use cocoon 2.0 like a servlet to call from my 
> jsp pages?examples?
> 
> 2.-Any one knows how i can transform mathml to svg in a jsp?



Maybe the JEuclid project helps you:

http://sourceforge.net/projects/jeuclid/


Michael




> 
> 
> Lots of thanks to all
> 
> I'm desesperated,please help me!
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Link Livesites: Nun.Me.Shu XML/XSL development - Cocoon2

2002-10-06 Thread Edward Maesen

http://www.nunmeshu.com
A site about XML/XSL development, powered by Cocoon, with details about the
XML and XSL stylesheet used. One of the pages
(http://www.nunmeshu.com/xmlxsl/nms/hostenv.html) describes the hosting
environment; with details about installing and configuring Cocoon, Tomcat
and Apache.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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