Posts

Apache Lucene Ultra Search Utility

 Apache lucene sets the standard for Search and Indexing performance It is high performance and full-feature text search engine fully written using java. It is used to any application that requires full-text search, especially cross platform. It is open source project we can download it freely. Using this link to download the apache lucene from server download  . Features: 1. Scalable and High performance  Indexing Small Ram  require i.e 1 MB Heap Incremental indexing is faster than Batch indexing  2. Powerful, Accurate and Efficient Searching algorithm  It is support Ranked Searching i.e best result return first  It is allow Fielded searching  It is allow Sorting by any order  It support Multiple-index searching   Allow concurrency access i.e at the same time indexing and updating it  It is easy to fetching, join, and grouping data  It is fast retrieve  3. Stop-word processing  ...

Send Email using Python through Gmail, Sendgrid and Elasticmail

Image
We have the lot of use case to send the email through the code.  For that purpose, I had post this to send email / notification through the python smtp . Description      We have to send the email using the python code. That will use the third party smtp library to send email. For this we have to get the smtp configuration from the email service provider .  Based on the configuration we can send the normal email or attached one. But this will help us to send the marketing email / notification and other purpose. Pre-requesting  Have to install python on your machine. And have to install  smtplib library with the help of  pip or other tool. Have to get the gmail smtp information Use cases : Now a days with out email notification none of the application delivered.  That would help to boom the sales or reach out the right customer. Sample code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26...

SSI (Server Side Includes) in Servlet

Image
         Server Side Includes  are commands and directives placed in the web page that can be evaluated by the web server when the web page being served. The servlet code embedded inside the HTML code called as SSI .            SSI cant be supported for all web server. so you can read web server supported documents before using the SSI in your code.            It helpful for when you want to small part of page loading dynamically instead of whole page loading. Below the Syntex given, <SERVLET CODE=MyservletClassname CODEPASE=path      initparam1=initparamvalue initparam2=initparam2value> <PARAM NAME=name1 VALUE=value1> <PARAM NAME=name2 VALUE=value2> </SERVLET> Here the path indicate the MyservletClassname class name path in the server.  you can setup the remote file path also. the remote file path syntex is, http://server:port/di...

Servlet Tutorial

Image
What is Servlet ?       Servlet  is a java  programming language class used request  response programming model. Used to create server side web application and generate dynamic web page. Servlet language is Robust and scalable because of java language.Before Servlet we used CGI (Comman Gateway Interface) for server side programming.  The javax.servlet and javax.servlet.http packages provide the servlet interfaces and classes to implement the servlet.      All servlet must implement the servlet interface. Advantage of Servlet :  The servlet contain the many advantages over the CGI. The web container creates threads for handling the multiple requests to the servlet. Threads have a lot of benefits over the processes such as they share a common memory area, lightweight, cost of communication between the treads are low.The following benefits for Servlets are , 1. Better Performance --> Because it create thr...

Reason for Wait, Notify and NotifyAll are in Object class Not in Thread Class

The mostly asked interview question for experienced person who have experience Nearly 2-3 years in java. Here  are some thoughts on why they should not be in Thread class  which   make sense to me : 1)  W ait and notify is not just normal meth ods or synchronization utility,  more than that   they are communication mechanism between two threads in Java. And Object class is correct   place to make them available for every object if this mechanism is not available via  any java  keyword like synchronized.   Remember synchronized and wait notify are two different area and don’t confuse that they are same or related. Synchronized is to provide mutual exclusion and ensuring  thread safety of Java class  like race condition while wait and notify are communication mechanism between two thread. 2   )Locks are made available on per Object basis, which is another reason wait and notify is   decl...