Archive for the ‘Uncategorized’ Category

As logging required in every project.  Log4j provided by Apache to add logging to your system in best way.  I also required logging to my application and decided to use Log4j but could find any comprehensive tutorial about logging as somewhere basic were forund and advance use on other site. the way you want to add logging [...]

I am working on web service from last couple of years  before i was only know about Axis1/Axis2 and later i get to know more webservice API and framworks for JAVA(some of them given by Apache and SUN). Therefore first thing to know is whats the difference between all these APIs and framworsk. here is [...]

When you installed mysql first time all goes well but if due to some reason you need to uninstall then install mysql agian follwoing problem always occure at configuring it Processing configuration…   / Prepare configuration / Write configuration file (c:\Program … \my.ini) / Start service x Apply Security settings   the last step (Apply [...]

I had gone through lost of taturial about how to configure axis1 or axis2 then add your projetcs to Axisp.but there is no taturial that tells about “how to add Axis1 into running projetc” instead of adding projetc to Axis..so i have made this short taturial for it..its v simple Simply follow these smal steps.. [...]

Javascript calendar

Posted: September 17, 2008 in Uncategorized

i have used this javascript calendare on my web pag..its good check this link to follow http://ui.jquery.com/repository/latest/demos/functional/#ui.datepicker http://docs.jquery.com/UI/Datepicker

if you want to get path where calss is located ..here is code URL url =getClass().getProtectionDomain().getCodeSource().getLocation(); hop its helpfull write here if you feel its helpful cherrrrrrrrrrzzzzzzzzzzzzz

How to add veriable/enviorment variabls in web application.these are the variable you can access anywhere in project here is solution addfollwing tag to web xm…and given values of your own choics <env-entry> <env-entry-name>webmasterEmail</env-entry-name> <env-entry-value>admin@domain.com</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> you can access in a code by this // Get a handle to the JNDI environment naming context Context env = (Context)new InitialContext().lookup(“java:comp/env”); // Get a single value String webmasterEmail = (String)env.lookup(“webmasterEmail”); thats It …enjoyyyyyyyy here is the helping [...]

get Server Context Path

Posted: September 1, 2008 in Uncategorized

Q:how take server(tomcat, Jboss)context path for any work e:g file upload. A:here is the solution make a class of any name and implements ServletContextListener(its servlet calss) write body of contextInitialized(ServletContextEvent event) method like this public void contextInitialized(ServletContextEvent event) { yourUtilitiesClass.FILES_PATH = event.getServletContext().getRealPath(””) + File.separator + “files” + File.separator; yourUtilitiesClass.IMAGES_FILES_PATH = event.getServletContext().getRealPath(””) + File.separator + “images” [...]

DBCp connection!

Posted: August 13, 2008 in Uncategorized

1.create your own context.xml file and put in Yourapp/META-INF/ location its contents should be <Context docBase=”Tracker” path=”/Tracker”> <Resource name=”jdbc/tracker” scope=”Shareable” type=”javax.sql.DataSource” factory=”org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory” url=”jdbc:mysql://localhost:3306/tracker?autoReconnect=true” driverClassName=”com.mysql.jdbc.Driver” username=”root” password=”admin” maxIdle=”5″ maxActive=”50″ /> 2.Then make entry in web.xml <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/tracker</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> 3.Then place mysql-connector-java-3.1.13.jar in TOMCAT_HOME/common/lib folder 4.place jstl.jar.standar,jar in TOMCAT_HOME/common/lib folder/ or in you [...]

Q.how to send an configration SMS(like mobile operators send GPRS setting, its an configration SMS) A.configration SMS is not a simple text sms.you have to send your message using  Over The Air(OTA) or Open Mobile Alaince (OMA). you can download OTA spacification document from there but first you have to make a login to nokia [...]