Date format becomes incorrect when you run check option on portal

Hi,
We have a report which has Date variable in selection screen. When we enter selection as interval and then when we click on Check option before executing the report, the date format becomes garbage.
Here is an example:
This is what I enter in Date variable :
Date : 01/01/2001-01/01/2010
After that when I click on CHECK option, the system automatically converts the first date into garbage value i.e. 01/01/2001 will be converted to 1//20/01/0
This only happens when we run report in Portal 7.0 When we try to run similar report using default web template of BW 3.5, it works fine.
Has anybody faced similar problem ? We are on Portal Java SP13 with Patch 6.
Thanks,
Parin Gandhi.

Thanks Frank for a quick reply.
I have used the SimpleDateFormat for formatting with the pattern as, "MM/dd/yyyy" and it is working fine if user enters 4 digit year.
However, for a entry with 2 digits for a year e.g. 04/10/07 when i parse the date using SimpleDateFormat,it is giving me date as 04/10/0007.
Is there a way by means of which i could force the user to enter 4 digits for the year?
I have tried using dateStyle attribute of <af:convertDateTime> tag with 'shortish' as its value, it converts a 2 digit year into 4digit on the browser side & displays on the screen e.g. if user enters 04/10/07 it will appear as 04/10/2007 on the screen however, in value change listener method, i could see date as 04/10/0007.
Any help in this regard is highly appreciated.
Thanks in advance,
Shriniwas

Similar Messages

  • Error in Jboss when you run the reconciliation process in OIM

    Friends,
    I have a problem when launching the task of reconciliation that is part of the log when you run the process of and reconciliation, someone can help me with this problem. Regards.
    2010-07-05 11:40:16,278 WARN [XELLERATE.DATABASE] Trying to get the connection count : 0
    2010-07-05 11:40:16,278 WARN [XELLERATE.DATABASE] Trying to get the connection count : 1
    2010-07-05 11:40:16,278 WARN [XELLERATE.DATABASE] Trying to get the connection count : 2
    2010-07-05 11:40:16,278 WARN [XELLERATE.DATABASE] Trying to get the connection count : 3
    2010-07-05 11:40:16,278 WARN [XELLERATE.DATABASE] Trying to get the connection count : 4
    2010-07-05 11:40:16,278 ERROR [XELLERATE.DATABASE] Class/Method: DirectDB/getConnection encounter some problems: Error while retrieving database connection.Please check for the follwoing
    Database srever is running.
    Datasource configuration settings are correct.
    2010-07-05 11:40:16,278 ERROR [XELLERATE.DATABASE] Class/Method: tcDataBase/readPartialStatement encounter some problems: Got a null connection
    java.sql.SQLException: Got a null connection
         at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.cache.CacheUtil.getSetCachedQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor410.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
         at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
         at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:906)
         at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
         at org.jboss.mq.SpySession.run(SpySession.java:323)
         at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
         at java.lang.Thread.run(Thread.java:619)
    2010-07-05 11:40:16,278 ERROR [XELLERATE.SERVER] Class/Method: tcDataObj/eventPostUpdate encounter some problems: Data Access Error
    com.thortech.xl.dataaccess.tcDataSetException: Data Access Error
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.cache.CacheUtil.getSetCachedQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor410.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
         at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
         at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:906)
         at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
         at org.jboss.mq.SpySession.run(SpySession.java:323)
         at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
         at java.lang.Thread.run(Thread.java:619)
    Data AccessException:
    com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcRCE' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequenceDescription: Got a null connectionSQL State: Vendor Code: 0Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
         at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.cache.CacheUtil.getSetCachedQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor410.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
         at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
         at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:906)
         at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
         at org.jboss.mq.SpySession.run(SpySession.java:323)
         at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
         at java.lang.Thread.run(Thread.java:619)
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Hi,
    Did you test the database connection as explained in the entry log below?
    Class/Method: DirectDB/getConnection encounter some problems: Error while retrieving database connection.Please check for the follwoing Database srever is running.
    Do you have a Database Resource assigned to your recon task?
    Renato

  • BT Mighty Mouse become skippy when MacPro running intensive applications

    my BT Mighty Mouse become skippy when MacPro running intensive applications. Example, I was editing my photos with Aperture while I launch Visual Hub to convert a divx to Apple TV H.264, the mouse point become very skippy or sluggish. when Visual Hub complete the encoding the mouse is back to normal. is this an interfance or cause by running the CPU too hard?

    I'm going through the same "issue" actually so I hope I can save you some time.
    It's a grounding issue. You can experiment:
    - Touch your Mac Pro system while you're moving the mouse, or;
    - Touch your keyboard while moving the mouse
    If the mouse calms down and doesn't try to escape , then you have the source of the problem.
    I've read a lot of discussions on this, with people replacing their mice constantly, and even doing a full re-install. So if the above works, then your solution is in figuring out how to deal with the ground-ing problem.
    What's more surprising is that Apple hasn't addressed this (it seems) for some time now. With all the gyrations customers go through, you'd think there would have been some type of solution (a recall perhaps?).

  • When you run the Adobe Creative Cloud opens a blank window, without authorization...

    When you run the Adobe Creative Cloud opens a blank window, without authorization, without a list of programs, just empty, as in the screenshot

    Hi Vetal1000 ,
    Welcome to Adobe Forums
    You can use the below mentioned links for solution -
    http://forums.adobe.com/message/5509684
    or
    http://forums.adobe.com/thread/1251577
    Let us know if that helps !
    Thanks
    Garima

  • Installed hotfix for error 3241 when you run RESTORE FILELISTONLY statement in SQL Server 2008 R2. But still get same errormessage.

    I ran into erro 3241 when you run RESTORE FILELISTONLY statement in SQL Server 2008 R2.
    Found the hotfix 
    Cumulative Update 13 for SQL Server 2008 R2 SP1.
    I have installed this hotfix, now running 10.50.2876.0
    But I still get the same error when trying to restore a backup.
    What else do I need to do?

    second to what bodo said Instead of installing SQL server 2012 SP1 CU13 it would be better to install
    SQL Server 2008 r2 Sp2 SP's are more throughly tested and would include all fixes for CU and Sp1
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • LabVIEW crashes when you run a VI that contains a mixed signal graph with a multi-plot cursor.

    Hello, LV 8.2.1 notes indicates the following bug fix:
    43SAIR2A  Fixed an issue where LabVIEW crashes when you run a VI that contains a mixed signal graph with a multi-plot cursor.
    I am running this version, and still have this behavior.  Is there anything I may be missing, and/or certain circumstances that may still be causing this?
    thanks in advance,
    Darren

    Darren:
    I looked at the CAR ID that you mentioned and the issue has been resolved in LabVIEW 8.2.1. To verify something similar, I ran the attached VI and things worked just fine. Please feel free to send me the steps to follow to reproduce the issue you are running into in 8.2.1.
    Regards,
    Rudi N.
    Attachments:
    MixedGraphs.vi ‏15 KB

  • When you run Muse 2014 get an error unterminated string constant. Reinstalling does not help. System: Win8.1RU. Help!!!

    When you run Muse 2014 get an error unterminated string constant. Reinstalling does not help. System: Win8.1RU. Help!!!

    Is this occurring on launch? Can you post a screenshot? This isn't an error I recall being reported before.

  • My iphone 4 was updated to iOS 5, after update it heat up when you run application and when you call and touchscreen is not working well.

    Can someone please help me to trouble shoot my iPhone 4, where I have updated to iOS 5, and after the update, it started to heat when you run an application, make a call and the touch screen really got so crazy especially on the right part of the screen. It really upsets me updating it to iOS 5. Please I need support on this. Thank you.

    in your iTunes go to Store>Sign out ; then go to Store>Log in and log in under your old Apple ID
    Sync while logged on under the old ID, and everything purchased under that ID will sync.
    Cheers!

  • Which buttons dont work when you run windows xp

    the keyboard for a mac and a pc are kinda different. are there ne buttons that dont work when you run xp with bootcamp?

    Only one I can think of (if you're using the latest version of Boot Camp) is the "delete" key won't act as "delete" (such as in ctrl + alt + delete) under Windows. Other than that, every other key should function correctly. (The Apple/CMD key will work as the "Windows key." And the "option" key will be "alt."

  • I have a problem when you run Firefox to download a claim this tool (askToolbarInstaller-1.12.2.0.exe) What is the solution and how to prevent download scent tool.

    I have a problem when you run Firefox to download a claim this tool (askToolbarInstaller-1.12.2.0.exe) What is the solution and how to prevent download scent tool.

    i have the same exact problems too and it's starting to bother me further more...

  • What are your options when you run out of hard drive space?

    What are your options when you run out of hard drive space? 

    I 110% agree, it is a disaster but it saves your mac until you recieve an external HD.
    Csound1 wrote:
    XcodeDeveloper wrote:
    I know but he just wanted options so I gave him one that helped me. If he filled up his HD a Gigabyte is sometimes a small miracle, exaggeration on small .
    OSX with 1G of free space is a disaster waiting to happen.
    Read this:

  • HT201263 how do you stop recovery mode to prevent you loseing all your data on your device when you have to restore it?

    How do you stop recovery mode to prevent you loseing all your data on your device when you have to restore it?

    The thing is i did not start recovery mode, it did it automatically when i was updating to ios6 and  an error occured.

  • Change date format in EP when introduce values with "/" as date separator

    Hi experts,
    We have ECC 6 EHP3 with Enterprise Portal 7 SP 18. We instal BP_ERP5ESS
    1.31 SP 4.0, BP_ERP5COM 1.31 SP 4.0, BP_ERP5MSS 1.31 SP 4.0, SAP_ESS
    603 SP 4.12 and SAPPCUI_GP 603 SP 4.1
    We activate the Travel Management (FIN_TRAVEL_1) business function, so
    we use WD ABAP for travel expenses.
    The issue is when in the Portal, go to Travel and Expenses and create a
    new travel request or a new expense report and introduce the values of
    the date with "/" as separator. The system changes the date format, and
    change the days for months and months for days, DD/MM/YYYY change to
    MM/DD/YYYY. For example if we introduce 31/12/2009, the system change
    to 12/31/2009 and gives an error.
    If we introduce with "." as separator, 31.12.2009, it works fine, don´t change days for months, so it seems that is not a problem of language settings.
    Any idea?
    Thanks in advance,
    Manuel

    Hi,
    You can check the date formate in the portal.........
    log in by the Super Super give the user name ...........and check the details..........
    in there in the 1st ..view you can set the date formate..............

  • Dates for Backwards scheduling when MRP Run

    Hello experts,
    When MRP run, which calendar does SAP take to schedule planned orders? where could I indicate it?
    Thanks in advance.
    Laura

    Thank you all,
    I have checked the calendar that is assigned to my plant, and, as you have said, is the one that is taking into consideration to determine the dates.
    In my case, Saturdays and Sundays are not workdays. As a result, every purchase requisition has its release date assigned to a workday.  What I have noticed is that although Saturdays and Sundays are not work days, planned delivery time and In-house production time is taking them into consideration to calculate the release date. What I mean is that those two fields are defined as calendar days. Is that correct??
    Thanks again.

  • Date Format in servlet when i insert into database

    I am inserting data into database through servlet, but i am getting NumberFormat Exception, and my datatype in database is DATE ,when i typecast my day and year because they r in int and changing into String,still i am getting the same error .So please can any one tell me where to cahnge the format of date and how to type cast to my Date format of database.
    Thanks,
    lalitha

    My code is:import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.text.*;
    import java.sql.Date;
    import java.util.*;
    public class RegisterServlet extends HttpServlet
         Connection con;
         PreparedStatement ps;
    public void init(ServletConfig sc) throws ServletException
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         con=DriverManager.getConnection("jdbc:odbc:plk","scott","tiger");
         System.out.println("connection created");
         catch(Exception e)
         System.out.println(e);
    public void doPost(HttpServletRequest req, HttpServletResponse res)
         try
         res.setContentType("text/html");
         PrintWriter pw= res.getWriter();
    String ulogin=req.getParameter("login").trim();
    String uph1=req.getParameter("ph1").trim();
    int ph1=Integer.parseInt(uph1);
    String upass=req.getParameter("pass").trim();
    String uph2=req.getParameter("ph2").trim();
    int ph2=Integer.parseInt(uph2);
    String cpass=req.getParameter("cfm").trim();
    String uweb=req.getParameter("web").trim();
    String ufirst=req.getParameter("first").trim();
    String uaddress=req.getParameter("address").trim();
    String umiddle=req.getParameter("middle").trim();
    String ucity=req.getParameter("city").trim();
    String ulast=req.getParameter("last").trim();
    String uzip=req.getParameter("zip").trim();
    int zip=Integer.parseInt(uzip);
    String ud=req.getParameter("Aday").trim();
    String um=req.getParameter("Amonth").trim();
    String uy=req.getParameter("Ayear").trim();
    SimpleDateFormat din=new SimpleDateFormat("dd-mm-yyyy");
    SimpleDateFormat dout=new SimpleDateFormat("yyyy/mm/dd");
    String txtDate="2001-07-07";
    Date date=din.parse(txtDate);
    java.sql.Date dt=new java.sql.Date(txtDate);
    dout.format(dt);
    String usex=req.getParameter("sex").trim();
    String uemail=req.getParameter("email").trim();
    String ust=req.getParameter("st").trim();
    String ucty=req.getParameter("cty").trim();
    ps=con.prepareStatement("insert into Userdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    ps.setString(1,ulogin);
    ps.setString(2,uph1);
    ps.setString(3,upass);
    ps.setString(4,uph2);
    ps.setString(5,cpass);
    ps.setString(6,uweb);
    ps.setString(7,ufirst);
    ps.setString(8,uaddress);
    ps.setString(9,umiddle);
    ps.setString(10,ucity);
    ps.setString(11,ulast);
    ps.setString(12,uzip);
    ps.setDate(13,dt);
    ps.setString(14,usex);
    ps.setString(15,uemail);
    ps.setString(16,ust);
    ps.setString(17,ucty);
    int i=ps.executeUpdate();
    if(i==1)
    pw.println("<h3><center> Thankyou! Your details have been stored. </center></h3>");
    res.sendRedirect("http://localhost:8080/SeekLogin.html");
    pw.close();
    else
         pw.println("<h3><center>Sorry! you are not registered properly. </center></h3>");
    pw.close();
    catch(Exception e)
         System.out.println(e);
    Can anyone look this code and help me out where i am doing the mistake.
    Thanks.

Maybe you are looking for