RE: HTTP request parameter

2001-08-10 Thread annemarie . hartvigsen

Thanks for the tip; unfortunately it didn't work.

java.lang.RuntimeException: Error executed prepared statement:select
name as reg_name,  deviceID as reg_deviceID,
description as reg_description,  startTime as reg_startTime,
endTime as reg_endTime   from user, terminal, deviceType, registration
where terminal.userID = ? and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType and
registration.terminalID = terminal.terminalID; 
at
_var._tomcat._webapps._cocoon._vt._welcome._welcome.populateDocument(_welcom
e.java:379)
at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:527)
at org.apache.cocoon.Engine.handle(Engine.java:384)
at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

/Anne Marie

-Original Message-
From: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]]
Sent: 9. august 2001 18:09
To: [EMAIL PROTECTED]
Subject: Re: HTTP request parameter



Anne Marie,

try
esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID =
  esql:parameter type=int
   request:get-parameter name=userID/
  /esql:parameter
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query

Replace int with long or string, as necessary to match your field
type.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  HTTP request parameter


Hi,

what is required to get the http request parameter to work? I have

[...]
xsp:page language=java
  xmlns:xsp=http://www.apache.org/1999/XSP/Core;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;
  xmlns:request=http://www.apache.org/1999/XSP/Request;  ---HERE

[...]

esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = request:get-parameter name=userID/
---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query
[...]

As far as I have understood, I can then put

?userID=123456

at the end of the url, e.g.
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
!ENTITY userID 123456 //(in the DTD)

[...]

and terminal.userID = userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie





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

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




RE: HTTP request parameter

2001-08-10 Thread annemarie . hartvigsen

Hello Christian,

thanks for the suggestion. However, I have trouble finding any documentation
on this (I have looked through the examples and looked around on the cocoon
pages). Do you have any examples on how to do this?

But I thought it should be possible to do it my way to; anybody had success
with that?

Thanx!
/Anne Marie

-Original Message-
From: Christian Haul [mailto:[EMAIL PROTECTED]]
Sent: 9. august 2001 15:31
To: [EMAIL PROTECTED]
Subject: Re: HTTP request parameter


On 09.Aug.2001 -- 01:17 PM, [EMAIL PROTECTED] wrote:
 Hi,
 
 what is required to get the http request parameter to work? I have
 [...]
 xsp:page language=java
   xmlns:xsp=http://www.apache.org/1999/XSP/Core;
   xmlns:esql=http://apache.org/cocoon/SQL/v2;
   xmlns:request=http://www.apache.org/1999/XSP/Request;
---HERE
 

 I'm using Cocoon 1.8.2

I'm not familiar with C1 but the above looks a lot like C2 syntax. In
C1 you need AFAIK processing instructions to apply taglibs. Should be
in the examples  xsp docs.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

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




Re: HTTP request parameter

2001-08-09 Thread Christian Haul

On 09.Aug.2001 -- 01:17 PM, [EMAIL PROTECTED] wrote:
 Hi,
 
 what is required to get the http request parameter to work? I have
 [...]
 xsp:page language=java
   xmlns:xsp=http://www.apache.org/1999/XSP/Core;
   xmlns:esql=http://apache.org/cocoon/SQL/v2;
   xmlns:request=http://www.apache.org/1999/XSP/Request;  ---HERE
 

 I'm using Cocoon 1.8.2

I'm not familiar with C1 but the above looks a lot like C2 syntax. In
C1 you need AFAIK processing instructions to apply taglibs. Should be
in the examples  xsp docs.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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




Re: HTTP request parameter

2001-08-09 Thread Christopher Painter-Wakefield


Anne Marie,

try
esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID =
  esql:parameter type=int
   request:get-parameter name=userID/
  /esql:parameter
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query

Replace int with long or string, as necessary to match your field
type.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  HTTP request parameter


Hi,

what is required to get the http request parameter to work? I have

[...]
xsp:page language=java
  xmlns:xsp=http://www.apache.org/1999/XSP/Core;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;
  xmlns:request=http://www.apache.org/1999/XSP/Request;  ---HERE

[...]

esql:query
  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = request:get-parameter name=userID/
---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;
/esql:query
[...]

As far as I have understood, I can then put

?userID=123456

at the end of the url, e.g.
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
!ENTITY userID 123456 //(in the DTD)

[...]

and terminal.userID = userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie





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