Hi,
Try ?userID='123456' and it hopefully it will work.
Mohsin
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 10 August 2001 08:52
To: [EMAIL PROTECTED]
Subject: RE: HTTP request parameter
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(_we
lcom
e.java:379)
at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:5
27)
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.jav
a:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnec
tion
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50
1)
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]>
---------------------------------------------------------------------
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]>