Skip to main content

Posts

Showing posts with the label misc

Generating Menu Tree Or Catagory Tree hierarchy

There has always been a basic requirements in website or web applications that the menu bar must be dynamic and all menu items should be appeared under their respected parent. Here, if you are managing the menu items in database, then you have to retrieve all menu items in the way that each menu item must have its proper position in menu tree. here you could use just a loop because you don't know that how many menu times are going to be added in future. So, Here is the example in which I am using the recursion approach for creating the menu tree dynamically for any level. there is the database table "menu_items" having the columns id , name and parent . Parent column will have the id of the parent menu as foreign key. You can increase some more columns as per your requirements like label, url and so on. There are some values already there for testing purpose.     import java . sql . Connection ; import java . sql . DriverManager ; import java . sql . Re...

Authorize.Net Java Integration - Your script timed out while we were trying to post transaction results to it.

I have been facing the following error while integrating Authorize.Net with java project using Direct Post Method . Your script timed out while we were trying to post transaction results to it.    Transaction ID: 0 Transaction Result: This transaction has been approved. I searched for solutions but did not get resolved this issue easily. I traced network packets and found some issues with response text.  And the problem was in my relay_response jsp page of encoding. I made following changes in my page : 1  updated following at the top of the page  <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 and added charset="UTF-8" in meta tag <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

SVN problem while committing or updating the directory

You may see following error when you are committing or updating directory, Update/Commit Working copy 'E:\work\myproject locked Please execute the 'Cleanup' command. According to the above error message, you should execute Cleanup command from svn-client like TortoiseSVN. But when you are performing cleanup, you may get another problem as shown below. Cleanup failed to process the following paths: -'E:\ work \myproject ''E:\ work \myproject\build' is not a working copy directory According to above error message, you should follow the following steps : delete the build folder update the folder myproject by executing the svn-command update then commit the changes by executing the commit svn-command If this problem is due to conflicting changes between local and server contents and you have resolve the problem manually, use resolved svn-command for confirmation. There may be other issues and solution for svn, please let me know if you hav...