cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: Problems with date and xsp
Date Sat, 03 Jan 2004 19:44:48 GMT
Could you *please* stop posting your problem in other threads? All it 
takes is to write a new mail instead of hitting reply+erase subject.

Davide wrote:

> Hi, i have some problems in getting the actual timestamp to put it into 
> a db.
> 
> My xsp is:
> 
> <?xml version="1.0"?>
> 
> <xsp:page language="java"
>     xmlns:xsp="http://apache.org/xsp"
>     xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>     xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0"
>     xmlns:esql="http://apache.org/cocoon/SQL/v2">
>     <xsp:logic>
>         java.util.Date now=new java.util.Date();
>     </xsp:logic>
> 
>     <addcomment>
>         <page-title>Add a comment</page-title>
>         <!-- header bar background source file -->
>         <bg>images/logobg.gif</bg>
>         <!-- mcnavigator css -->
>         <css>css/main.css</css>
>         <esql:connection>
>             <esql:pool>mcnavigator</esql:pool>
>             <esql:execute-query>
>                 <esql:query>Insert into comments (User_ID, Comment_text, 
> Commented_URL, Comment_Date, Comment_browser) values (
>                     '<xsp-session-fw:getxml context="authentication" 
> path="/authentication/ID"/>',
>                     '<xsp-request:get-parameter name="comment_text"/>',
>                     '<xsp-request:get-parameter name="link"/>',
>                     '<xsp:expr>new 
> java.sql.Timestamp(now.getTime())</xsp:expr>',
>                     '<xsp-request:get-header name="user-agent"/>')
>                 </esql:query>
>                 <esql:error-results>An error occurred</esql:error-results>
>                 <esql:update-results>
>                     <message>Your comment has ben added; you can now 
> close this window</message>
>                 </esql:update-results>
>             </esql:execute-query>
>         </esql:connection>
>     </addcomment>
> </xsp:page>
> 
> The problem is that every time i add a new record to the db using this 
> xsp i notice that the time doesn't change. Any solution??
> 
> Best Regards, Davide


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message