how to access parameter inside of action

2003-01-19 Thread Nils Leßmann








Hi!



This
one cant be too tough  anyway Im not able to find an
example somewhere. Im writing my own action and need to pass a
parameter, with something like



map:parameter name=fileid value=smoevalue /



How
can I access this value inside the action? The cocoon docs
just mention that this work, but not how.



Regards,
Nils



Nils Leßmann

Stockacher Str. 38

68239 Mannheim



0175 - 814 899 8














AW: DB2 with Cocoon

2003-01-04 Thread Nils Leßmann
Dear Robert,

without knowing anything aboout db2 or db schemas - my guess is that
this error results from Excalibur sending a select 1 as a dummy query
to the database so the connection doesn't time out.

Try setting oradb to true in your cocoon.xconf where you configured the
connection pool. This solved the issue for me (using sapdb).

Regards, Nils
 
 

-Ursprüngliche Nachricht-
Von: Robert Sösemann [mailto:[EMAIL PROTECTED]] 
Gesendet: Samstag, 4. Januar 2003 00:12
An: [EMAIL PROTECTED]
Betreff: DB2 with Cocoon

Hello,

this is my first time connecting IBMs DB2 with cocoon. Cocoon
succesfully
finds the drivers and connects correctly.

But I get strange SQL Errors like:

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0104N  Auf
SELECT 1 folgte das unerwartete Token END-OF-STATEMENT.  Zu den
möglichen Token gehören: table_expr.  SQLSTATE=42601

Before I used MySQL, which doesn't have something like a db schema. As I
know in DB2 you always must set a correct schema before queriing.

I guess the problem causes from the fact that I didn't set a schema in
my
ESQL XSP. But how should I do that??

Who can help me out?

Rob



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


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




AW: xsp + parameters

2002-12-31 Thread Nils Leßmann
Hi,

have a look in the generated java file (search for factoriel_xsp.java),
that's usually the fastest way to see what's really going on.

Anyway, I'd suggest using a second method

public static String get_fac(String number) {
  try {
long l = Long.parseLong(number);
return fac(l);
  } catch (NumberFormatException e) {
return number+ not a number;
  }
}
 
and calling this from the xsp.

Nils
 

-Ursprüngliche Nachricht-
Von: cyril vidal [mailto:[EMAIL PROTECTED]] 
Gesendet: Dienstag, 31. Dezember 2002 11:08
An: [EMAIL PROTECTED]
Betreff: Re: xsp + parameters


So, I've tried the following code, in the aim to convert String to long:
 factorial-calculresult:
xsp:exprfac(java:lang.Long.parseLong(xsp-request:get-parameter
 name=number default=0/))/xsp:expr/factorial-calcul

but it doesn't run:
Error compiling factoriel_xsp: Line 127, column 57: ')' expected. Line
0,
column 0: 1 error



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




class reloading?

2002-12-29 Thread Nils Leßmann








Hi!



I
dont know wether its
good style but im currently using a lot of
helper classes in my logicsheets, simply because i need an ide and hating writing
my java-code directly into the xsp. Id be
interested how you folks do it, by the way.



Thing
is, I have to restart tomcat everytime I recompile my
external java classes, which can be pretty time consuming. Is there a way to
reload the classes while tomcat is running?



Thanks,
nils














How to use id from authentication-fw in xsp

2002-12-22 Thread Nils Leßmann










Hi!



I
need to use the username in my xsps but it seems Im not able to
access it. I use the following line to get the username:



sunshine:getxml
context=sunRise path=/authentication/ID/



This
works if for example I want to display the current username somewhere. But when
using it in my xsp the tag is not evaluated  I guess because the
sunshine-transformer works on it after the xsp has run. But how can I get the
ID in my xsp?



Regards,
Nils

 












still stuck with esql connection pool

2002-12-19 Thread Nils Leßmann








Hi!



Sorry
to bother you again, but I still cant get that esql-connection to work,
Ive tried three different databases up to now...



Whenever
I use esql:pool I get the following exception:



Could not get the datasource
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid
JdbcConnection class available



Using
esql:dburl etc. works just fine. I can see in the database monitor that
cocoon _has_ established the
connection to the database using the parameters I set up in cocoon.xconf. 



Is
there a way to get some more information in order to hunt down what Im
doing wrong? Something like a list of connections cocoon has set up, some
status info or whatever.



Thankful
for any hints,

  Nils












How to get User ID after authentication

2002-12-19 Thread Nils Leßmann








Hi!



Ive
been able to write my own authenticator using the sunrise-components. How can I
access the user id in my xsp after the user has logged in?



Thanks,
Nils










XML-Output from Helperclass

2002-12-15 Thread Nils Leßmann








Hi!



How
can I use xml-output from java-classes in my xsps? I have a class, say Foo and
my logicsheet inserts something like



xsp:exprFoo.showData()/xsp:expr



in
my xsp. The output from Foo is then escaped and all my tags end up in
lt;taggt;... 



I
really want to put the heavy logic into my own classes, away from the xsp 
is that possible somehow?



Thanx
in advance, Nils