January 5, 2010 at 3:00 pm
by admin · Filed under HowTo, Troubleshoot
I installed Visual Studio, and with this it installed a Just-In-time script debugger .This Just-In-Time seems to come up all the time when I run Internet Explore and on each page of IE.
Solution
Open Start>Control Panels>Internet Options: Advanced and activate (check box)
* Disable Script Debugging (Internet Explorer)
* Disable Script Debuggung (Other)
Open the registry (use regedit, Click Start, Run, Regedit).
Go to this key:
HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings\JITDebug
And set it to 0.
Permalink
August 7, 2009 at 12:27 pm
by nitingautam · Filed under log4j, HowTo, Java
Some time the need arises to have our log4j.properties with different name. By default, if no other configuration is given, log4j will search your classpath for a 'log4j.properties' file.
Now to use your own named log4j property add the following line in your main program:
PropertyConfigurator.configure("File name with path")
exmaple:
PropertyConfigurator.configure("c:\\logs\\my-log4j.properties") this will set this as a default property name and all done =)
Permalink
October 1, 2008 at 4:10 pm
by nitingautam · Filed under HowTo, Java
Hi All,
As you all know In web application inside web directory there is a META-INF directory. Inside which we have MANIFEST.MF that holds version information. I have to read the MANIFEST.MF from this directrory. Need the manifest info for the purpose of build info and have to show in footer of each page. It's easy to read it in case of JAR file and while searching on net I got mostly examples on jar,classpath related Manifest. But my requirement was to read web/META-INF/MANIFEST.MF file.
So I am posting here what I done:
Inside web application then using the ServletContext.getResourceAsStream
method should work and same I used.
// for a Servlet, you can get the ServletContext like this
ServletContext aContext = getServletConfig().getServletContext();
InputStream inputStream = aContext.getResourceAsStream("/META-INF/MANIFEST.MF");
In Spring application do following inside controller:
//Build Info
ServletContext aContext= getServletContext();
InputStream fis =aContext.getResourceAsStream("/META-INF/MANIFEST.MF");
Hope this helps you
. Do post your comments
Permalink
September 13, 2008 at 6:41 pm
by nitingautam · Filed under HowTo, Articles
Hi all,
Yesterday I got a code for study that was actually maintained inside Subversion. The code I get was not a exported copy of subversion, because of this I get a deep hierarchy of code included ".svn" folder in each folder. Now before start working with the code in eclipse it was mandatory for me to remove the .svn folders.
Below I am providing solution for both OS (windows/Linux) to remove these recursive ".svn" folders. Hope you will find helpful.
Do post your comments
Solution under Windows:
Right click on the folder and click Search..
Enter .svn as the filename to search for.
Click “More advanced options” and select:
- Search hidden files and folders
- Search subfolders
Press search button and delete the folders you find appropriate.
Solution under Linux/Unix:
find ./ -name ".svn" | xargs rm -Rf
or
find . -type d -name ‘.svn’ -print0 | xargs -0 rm -rdf
Permalink