Servlet not reflecting change in DB

Hi All !
I am doing the Sun J2EE 1.4 Tutorial (Duke's BookStore).
I have been reading the code in the tutorial and writing it out myself. I have successfully create the BookStoreServlet which connects to the DB and gets the number of books.
Then, I delete the books from the DB and commit to the DB.
However, ON REFRESH, the servlet still shows the same number of books available.
Is this behaviour expected? Or am I coding something incorrectly?
If it is expected behaviour then how can I change it so that it is dynamic, i.e. the page reflects the changes in the DB with every refresh
TIA,
Kunal

No, my DB is not caching either.
I can tell so because, I have now compiled my webapp on to different tomcat servers (running on seperate computers), but using the same DB.
The second one that I deployed my webapp on reflects the change. But the first one is still showing the same old info.
Note that I have BookDatabase object that connects to the DB, fetchs the records and creates multiple Book objects.
The BookDatabase object is initialized in a ContextListener and also destroyed in the contextDestroyed( ... ) method.

Similar Messages

  • Why do the thumbnails not reflect changes I make to pages?

    I am working on a pdf in Acrobat DC.
    I am working on a page with all the layers hidden.
    So the thumbnail is blank
    When I show a layer it appears on the page.
    The thumbnail however does not change.
    Why do the thumbnails not reflect changes I make to pages?

    Hi Jules,
    The behavior is same in Acrobat 11 as well. The thumbnails do not get refreshed till you close the document and reopen.
    Regards,
    Rave

  • List view web part not reflecting changes made to list view in SharePoint Designer

    Dear All,
    When adding a list view web part containing a view modified in SharePoint designer (e.g. conditional formatting applied, or group headers modified) I'm finding that the changes made in SPD are not reflected in the web part. 
    For example, I go into SPD edit a view, and the view appears correctly when I go back into SharePoint, however when I link to the view within a list view web part it results in losing the changes made in SPD. 
    Becasue it's a publishing page I'm unable to edit the contents of the web part in SPD.
    I'm sure this is expected behavior but how do I get around this?
    Thnaks,
    MDB

    Try below
    http://stackoverflow.com/questions/19533998/sharepoint-designer-doesnt-show-anything-in-list-and-libraries-link
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/a63a1894-6b1d-420a-95dd-b6c546eab34d/updates-made-to-sharepoint-designer-2010-workflow-do-not-show-up-on-the-server?forum=sharepointcustomizationprevious
    http://stackoverflow.com/questions/5959521/sharepoint-designer-saves-the-changes-but-it-does-not-affect
    http://social.technet.microsoft.com/Forums/en-US/1e9a8c27-bbc5-4a6f-8daf-4b243182f543/changes-in-sharepoint-designer-2010-not-showing-in-sharepoint-server-2010-page?forum=sharepointadminprevious

  • DataGrid not reflecting changes after INSERT into Table. Delete from Table does.

    Wow, it's been a while.
    Hope you guys can help.
    This is my DataGrid:
    <DataGrid DataContext="{StaticResource TableAssetsViewSource}" ItemsSource="{Binding}" x:Name="TableAssetsDataGrid" AutoGenerateColumns="False" EnableRowVirtualization="True" Margin="15,10,10,10" RowDetailsVisibilityMode="VisibleWhenSelected" Grid.Column="1" HeadersVisibility="Column" CanUserResizeRows="False" IsReadOnly="True">
    <DataGrid.CellStyle>
    <Style TargetType="DataGridCell">
    <Setter Property="BorderThickness" Value="0"/>
    </Style>
    </DataGrid.CellStyle>
    <DataGrid.Columns>
    <DataGridTextColumn x:Name="NodeColumn" Binding="{Binding node}" Header="VS Number" Width="*"/>
    <DataGridTextColumn x:Name="SerialColumn" Binding="{Binding serial}" Header="Serial Number" Width="*"/>
    <DataGridTextColumn x:Name="NameColumn" Binding="{Binding name}" Header="Asset Name" Width="*"/>
    <DataGridTextColumn x:Name="TypeColumn" Binding="{Binding type}" Header="Asset Type" Width="*"/>
    <DataGridTextColumn x:Name="_dateColumn" Binding="{Binding date}" Header="Date Allocated" Width="*"/>
    <DataGridTextColumn x:Name="PoColumn" Binding="{Binding po}" Header="Purchase Order" Width="*"/>
    </DataGrid.Columns>
    </DataGrid>
    This is where I add a new Row to the Table:
    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
    Dim cbblocation As ComboBox = Me.FindName("LocationComboBox")
    Dim row As DataRowView = DirectCast(cbblocation.SelectedItem, DataRowView)
    Dim cbbtext As String = row.Item("node")
    Dim cbbtype As ComboBox = Me.FindName("comboBoxType")
    Dim cbbtext2 As String = cbbtype.Text
    Dim RETAILISOAMDDataSet As Retail_ISO_AMD.RETAILISOAMDDataSet = CType(Me.FindResource("RETAILISOAMDDataSet"), Retail_ISO_AMD.RETAILISOAMDDataSet)
    Dim RETAILISOAMDDataSetTableAssetsTableAdapter As Retail_ISO_AMD.RETAILISOAMDDataSetTableAdapters.tableAssetsTableAdapter = New Retail_ISO_AMD.RETAILISOAMDDataSetTableAdapters.tableAssetsTableAdapter()
    RETAILISOAMDDataSetTableAssetsTableAdapter.AddNewAsset(cbbtext, txbSerial.Text, txbName.Text, cbbtext2, Date.Today, txbPO.Text)
    node = cbbtext
    Dim mp As New MainPage
    mp.RefreshGrid(node)
    Me.Close()
    End Sub
    The RefreshGrid method:
    Public Sub RefreshGrid(node As String)
    Dim RETAILISOAMDDataSet As Retail_ISO_AMD.RETAILISOAMDDataSet = CType(Me.FindResource("RETAILISOAMDDataSet"), Retail_ISO_AMD.RETAILISOAMDDataSet)
    Dim RETAILISOAMDDataSetTableAssetsTableAdapter As Retail_ISO_AMD.RETAILISOAMDDataSetTableAdapters.tableAssetsTableAdapter = New Retail_ISO_AMD.RETAILISOAMDDataSetTableAdapters.tableAssetsTableAdapter()
    RETAILISOAMDDataSetTableAssetsTableAdapter.FillByNode(RETAILISOAMDDataSet.tableAssets, node)
    Dim TableAssetsViewSource As System.Windows.Data.CollectionViewSource = CType(Me.FindResource("TableAssetsViewSource"), System.Windows.Data.CollectionViewSource)
    Dim be As BindingExpression = BindingOperations.GetBindingExpression(TableAssetsViewSource, CollectionViewSource.SourceProperty)
    be.UpdateTarget()
    End Sub
    And this is what I use to delete a row from the table (and without doing anything special, the DataGrid auto-updates with the changes):
    Private Sub Button_Click_4(sender As Object, e As RoutedEventArgs)
    If TableAssetsDataGrid.SelectedIndex = -1 Then
    MsgBox("You have selected nothing to Delete!", MsgBoxStyle.OkOnly, "Nothing Selected")
    Else
    Dim dgv As DataGridTextColumn = Me.FindName("NodeColumn")
    Dim row As DataRowView = DirectCast(Me.TableAssetsDataGrid.SelectedItem, DataRowView)
    Dim dgvText As String = row.Item("node")
    Dim dgv2 As DataGridTextColumn = Me.FindName("SerialColumn")
    Dim row2 As DataRowView = DirectCast(Me.TableAssetsDataGrid.SelectedItem, DataRowView)
    Dim dgvText2 As String = row.Item("serial")
    Dim dgv3 As DataGridTextColumn = Me.FindName("NameColumn")
    Dim row3 As DataRowView = DirectCast(Me.TableAssetsDataGrid.SelectedItem, DataRowView)
    Dim dgvText3 As String = row.Item("name")
    Dim dgv4 As DataGridTextColumn = Me.FindName("TypeColumn")
    Dim row4 As DataRowView = DirectCast(Me.TableAssetsDataGrid.SelectedItem, DataRowView)
    Dim dgvText4 As String = row.Item("type")
    Dim dgv5 As DataGridTextColumn = Me.FindName("_dateColumn")
    Dim row5 As DataRowView = DirectCast(Me.TableAssetsDataGrid.SelectedItem, DataRowView)
    Dim dgvText5 As String = row.Item("date")
    Dim dgv6 As DataGridTextColumn = Me.FindName("POColumn")
    Dim row6 As DataRowView = DirectCast(Me.TableAssetsDataGrid.SelectedItem, DataRowView)
    Dim dgvText6 As String = row.Item("po")
    Dim RETAILISOAMDDataSet As Retail_ISO_AMD.RETAILISOAMDDataSet = CType(Me.FindResource("RETAILISOAMDDataSet"), Retail_ISO_AMD.RETAILISOAMDDataSet)
    Dim RETAILISOAMDDataSetTableAssetsTableAdapter As Retail_ISO_AMD.RETAILISOAMDDataSetTableAdapters.tableAssetsTableAdapter = New Retail_ISO_AMD.RETAILISOAMDDataSetTableAdapters.tableAssetsTableAdapter()
    RETAILISOAMDDataSetTableAssetsTableAdapter.RemoveAsset(dgvText, dgvText2, dgvText3, dgvText4, dgvText5, dgvText6)
    Dim cbb As ComboBox = Me.FindName("cbbLocation")
    Dim row7 As DataRowView = DirectCast(cbb.SelectedItem, DataRowView)
    Dim cbbtext As String = row.Item("node")
    RefreshGrid(cbbtext)
    End If
    End Sub
    --------- End of Edit
    It is bound to a Dataset which gets it's data from a SQL Database.
    Loading the Data and Filtering the data based on certain conditions work 100%. The problem I am having is as follows:
    I have a form on the Page that takes input and inserts a row into the Database. When this happens, the DataGrid won't automatically reflect the changes (even if I recall the Fill Method of the Dataset). No matter what I do, I have to refresh the entire page
    and THEN Fill the Dataset to see any changes.
    This is what strikes me as odd...
    When I do a delete row operation on the Database (Custom Method on the Dataset with conditions), and just Fill the Dataset again (without doing anything special), the row deletes and the changes is reflected IMMEDIATELY.
    What am I doing wrong here? Why would Delete Row reflect the changes on the DataGrid but no Insert Row?
    Thanks in Advance.
    (P.S. I am very rusty with my developing skills, I haven't done this in YEARS)

    >>And what about the the most important question, how exactly is TableAssetsViewSource defined in the XAML markup and what is
    its Source property set or bound to? And what about the reproducable sample...?
    Here is the Markup of the TableAssetsViewSource:
    <Page.Resources>
    <local:RETAILISOAMDDataSet x:Key="RETAILISOAMDDataSet"/>
    <CollectionViewSource x:Key="TableRegionsViewSource" Source="{Binding tableRegions, Source={StaticResource RETAILISOAMDDataSet}}"/>
    <CollectionViewSource x:Key="TableLocationsViewSource" Source="{Binding tableLocations, Source={StaticResource RETAILISOAMDDataSet}}"/>
    <CollectionViewSource x:Key="TableAssetsViewSource" Source="{Binding tableAssets, Source={StaticResource RETAILISOAMDDataSet}}"/>
    </Page.Resources>
    The ItemsSource of the DataGrid is bound to the TableAssetsViewSource:
    <DataGrid DataContext="{StaticResource TableAssetsViewSource}" ItemsSource="{Binding}" x:Name="TableAssetsDataGrid" AutoGenerateColumns="False" EnableRowVirtualization="True" Margin="15,10,10,10" RowDetailsVisibilityMode="VisibleWhenSelected" Grid.Column="1" HeadersVisibility="Column" CanUserResizeRows="False" IsReadOnly="True">
    Just remember, this code was auto-generated with the drag & drop onto the Page, so I did little in terms of setting the actual bindings.
    All in all, what I have done so far works as intended, except that when I want to add a row to the table it does not reflect, and that it only shows after refreshing/restarting the application.
    I will try and put together a reproducable sample.

  • BAPI_ACTIVITYCRM_CHANGEMULTI not reflecting changes

    HI All,
    I want to update the partner info for an activity.
    I am updating the Activity in CRM using BAPI_ACTIVITYCRM_CHANGEMULTI and have used BAPI_TRANSACTION_COMMIT after that. No error messages are returned, but the changes are not reflected.
    Am I missing something ? any hints ?
    are there any alternative BAPi's, FM's to do the same ?
    thanks in advance,
    Raviraj

    Hi Raviraj,
    Try using the Function module - CRM_ORDER_MAINTAIN. You need to pass the CHANGING parameter - CT_INPUT_FIELDS. This should contain all the fields that you want to change.
    After this you need to call the FM - CRM_ORDER_SAVE and then call the BAPI_TRANSACION_COMMIT.
    Regards,
    Prabhas.

  • RPM Portal - not reflecting - change in WD Abap structure

    Hello,
    I am Abap developer and know very few things about portal.
    Recently changed a struture(enlarged two fields from INT1 to INT2) in WD ABAP.
    The problem is change is not reflected in RPM Portal.
    My questions :
    1.How to find from which struture the portal fetches the value ?
    2.New error is displayed on an other field in the same structure which was modified.
        Type conversion error, field ZZRPM_INV_MAK,complex type class
        com.sap.xapps.cprxrpm.model__Rpm_Ts_Item_D_Api.
    Solution is quite urgent.
    Thank you

    It was resolved after restart of Portal server.

  • Workbook is not reflecting changes

    Hi Friends,
       I have done some changes in existing structure at1 existing query and same structure are using in different query also, that also reflected and working fine, but these 2 queries are already added in 1 workbook as in 2 worksheets, the problem is, the changes which I did in query is not reflecting in workbook ( 2 worksheets in workbook ), how do get reflect those queries in workbook. Pls suggest. Thanks.
    Regards,
    CS.
    Edited by: csr_03 on Jul 22, 2010 3:07 PM

    Hi,
    You have made changes to query but those changes do not refelct in workbook automatically.
    Either you need to create new work book by using the modfied query or use the existing workbook and include the modified query again after removing the existing one.
    Workbook is just an excel save file of any exitisng query so you need to save or creat that file again.
    I hope it will help.
    Thanks,
    S

  • LR export not reflecting changes

    I am using LR4.4. I work in RAW and then export to RAW. Suddenly my exports do not reflect the changes I have made in LR. It is as though LR has stopped working. I have done this a thousand times. I cannot understand why it has stopped working as usual. I can export to jpg and psd and retain changes.

    You say you export to RAW, which I assume means you set the Image Format (in the Export's File Settings box) to "Original", yes? In that situation if you are exporting an existing proprietary Raw file such as CR2, NEF, etc., all that the Export process does is make a copy of the original file but also write out a sidecar XMP file containing all the edits that you made in Lightroom. It's always been that way. To see the effect of those edits you have to open the exported file in an application that is capable of reading and applying those changes in the XMP sidecar, such as Bridge, PS, PSE (i.e. Adobe products).
    So if you have done this a thousand times before, what application were you viewing the exported RAW file with? And have you changed it?
    Or are you using DNG?

  • Flash not reflect changes on postback

    Hi
    My flash file get images from one folder
    with C# code file I changes the image in the folder dynamically on button click
    flash not show changes on post back
    but when I close IE and run page then flash reflect changes 
    pls help 
    Thank You

    I have the same problem!!  This was first asked some time ago and I have been searching for an answer, but have not found one.  COULD SOMEONE FROM APPLE PLEASE ANSWER THIS??!!  It is a real pain and a black mark on an otherwise great product.
    I have tried sync-ing via the cable and via wireless.  No difference.  My SW versions are:  iPad: 5.1.1, iTunes: 10.6.3, OSX: 10.6.8.  My iPad is an iPad1; my computer is a MacBook Pro.

  • Adobe Media Encoder CC renders do not reflect changes to Dynamically Linked After Effects Comps

    When rendering a Premiere timeline with a dynamically linked After Effects composition, Adobe Media Encoder will sometimes use an older version of the linked composition (even after I have saved changes in the After Effects comp).
    For example, if I correct a spelling mistake on some text in After Effects, save the composition, and then add the sequence to the render queue in Premiere, the final output from media encoder still has the old spelling.
    If I do a straight export from Premiere instead of adding to render queue, the output is always correct. I've noticed this problem on several different Windows 8.1 systems.
    All versions of the software are up to date as of today.
    Why is this? Is it something to do with the disk cache in After Effects? Does media encoder have it's own cache that I need to clear?

    Hi, I've been having this same issue.  Here are some additional things I've noticed about it:
    Changes are reflected properly when played back on timeline in Pr CC 2014.
    Happens regardless if the dynamic link file was rendered or not, thus deleting the render files does not fix the issue.
    The issue can persist through saving, closing, and reopening both AE and Pr. 
    I'm using OSX 10.9.4, so this is not just a PC issue.
    Other than manually watching for every change to be reflected in the render, there is no way to know a problem has occurred.  Needless to say this can be incredibly costly.
    Please address this quickly, it's completely unacceptable that what we render out could be a different version from what we see on the timeline.
    PS Some additional things I will be testing:
    Does the issue persist through closing all CC apps, including Media Encoder.
    Does rendering directly out of Pr, i.e. not using Media Encoder, fix the issue.

  • Eclipse not reflecting changes

    Hi,
    When I do some change in the code using eclipse ,the change is not getting reflected in the application. I checked by giving a simple print statement also.I could not see that displayed.
    When I create a war file separately using ant I could see the application running with the changes done.This problem is with my Eclipse.
    Anybody can help me in finding what could be the problem?
    Till now it was working fine.I am not getting any error/exception.
    Regards,
    RPS15

    RPS15 wrote:
    Hi,
    When I do some change in the code using eclipse ,the change is not getting reflected in the application. I checked by giving a simple print statement also.I could not see that displayed.
    When I create a war file separately using ant I could see the application running with the changes done.This problem is with my Eclipse.
    Anybody can help me in finding what could be the problem?
    Till now it was working fine.I am not getting any error/exception.
    Regards,
    RPS15The project you are executing is in a different folder/directory than where you are updating your code. I've seen that problem a few times and it is never the IDE's fault, it's always somebody put the code someplace else and it running from a different location than you think it is.

  • FTP Upload is not reflecting changes

    My website is hosted by Go Daddy.  They had a server change today requiring me to change their FTP Host IP address, which I did.  It worked perfectly, connected without a hitch and uploaded just fine with no errors but no changes are being reflected to my live site.  I called Go Daddy and they say everything is working fine on their end and that it must be something with Adobe Muse.  I have tried emptying my cache, uploading all files rather than just the changed files, have used 2 different browsers to view it but nothing is being changed.  Could it possibly have anything to do with the Creative Cloud maintenance going on today?  I can't see what but who knows.  Any help would be greatly appreciated.

    I have contacted GoDaddy agaiin and they are unable to explain what is happening here but they deny all responsibility.  Here is the current situation.  As I said, when I export the site as HTML, I can look at the files and see that they contain my changes.  I then go to the remote server and delete the relevant pages.  I then empty my cache and go to my site.  For whatever reason, that page never goes away but as I said - the file is not on the remote server at all so I should be getting a 404 error.  I then upload the new file and see it appear on the remote server with the correct date and time.  I go back to the site, nothing has changed.  It just doesn't make sense.  I can't help but believe that it has something to do with the fact that GoDaddy changed their servers yesterday and I had to enter a new IP address for my domain.  I am wondering now if it could have anything to do with DNS propagation.  Does anyone have any ideas because I am at a loss. 
    Thanks very much -
    Don 

  • Exporting video from Premiere 2 Encore... change video in Premiere... Encore does not reflect change

    Hi everyone,
    I have a good question, hopefully it's a Premiere question, but it's also an Encore question.
    First off, I have my video project, simple segments of video, that I've added to my timeline, and I've added a simple
    title to the whole thing ( entire length of videos )
    So far so good.
    So what I did was export the project to Encore, where it loaded fine, and in Encore I worked on making a simple DVD menu for the movie.
    I did about 2 hours on the DVD menu, and then saved the Encore project.
    .... then I realized that the video project in Premiere needed some tweeking, so I went back and did that.  I saved the Premiere project
    and now I'm stumped as what to do next.
    After I saved the newly tweeked Premiere project, I exported it to Encore, and of course, as I knew it would happen, Encore opened up
    a new project with none of my menu system I had made for the DVD.  Argh, now I'm very disappointed..... HOW would I go about getting
    the DVD menu to work with the newly tweeked Premiere project ?
    I'm guessing I'm doing something wrong, and that there is indeed a way to fix this.  I'm really really hoping so.
    Thanks for any help you can offer.
    Dave.

    Hi Dave, To be honest Colin's way is the correct way to do it and it has worked so you should probably do it that way. I just like to
    take the full control back so if I do make changes I like to give it another version number and then match that version number in my
    new saved Encore project taken from the original. It is also the very last thing I do as well so I just find that workflow means I
    control every asset and version but no doubt about it Colin's way is the correct method and the one that allows all
    changes within Adobe to reflect through. Cheers, Steve.

  • IPhoto Not Reflecting Changes From Photoshop

    Does anyone have any advice or guidance as to why changes I'm applying in Photoshop Elements 4 are not showing up in iPhoto 6.0.2 - particularly the modified file size after I've applied sharpening or other adjustments? The Finder knows that the file is now twice as large, but iPhoto continues to show the "old" size...
    Thanks in advance for any information.
    -Darren

    Hi Darren,
    Are you using PS Elements as the external editor as set up in iPhoto Preferences? If not, then that is your problem.
    Editing photos in another application
    You can do many editing tasks in iPhoto, such as rotating and cropping a photo, changing a color photo to black and white, adjusting exposure and contrast, and reducing red-eye. If you want to make other changes to a photo, you can open it in another image-editing application, such as Adobe Photoshop.
    To edit photos in another application:
    Set your preferences to open photos in another application when you double-click them or click the Edit button. (See Related Topics below.)
    Double-click the photo to open it in the application.
    Edit the photo and save it using the same name and file format.
    The changes you made to the photo will be visible when you return to iPhoto.
    IMPORTANT: When you double-click a RAW-format photo, iPhoto creates a copy of the photo in JPEG format, which opens in the other application. To edit the photo in its original RAW format, drag the photo from the iPhoto window to the Finder, and then use the other application to open it. (If you previously used iPhoto to edit the RAW photo, select the photo and choose Photos > Revert to Original before dragging it to the Finder. This way, you can edit the photo using its RAW data in the other application.) If you want to import the photo back into iPhoto, you must first save it as a JPEG or TIFF file.

  • SAPScript output does not reflect changes

    Hi All.
    I am trying to make a minor standard attribute change to
    a SAPScript layout set. I want to move the upper margin of one of the windows.
    The problem is that it does not matter what I do, the change (any change, even font changes) does not display when I print it.
    The Layout set is correctly linked in customizing and it is transported correctly to the relevant client.
    Thank you in advance

    Hi Ryno,
    in order to move the upper margin of one of the windows
    you have to go to pages, select the page in question and then click on "page windows button" and afterwards in "standard attributes" tab you would pass from:
    Window        CMR-1          Description     Sender     
    Window type   VAR                                                                               
    Left Margin   1,30   CM      Window width    9,10   CM  
    Upper margin  <b>2,20   CM     </b> Window height   2,00   CM  
    to:
    Left Margin   1,30   CM      Window width    9,10   CM  
    Upper margin  <b>1,20   CM     </b> Window height   2,00   CM  
    Best regards.

Maybe you are looking for