Labels

Friday, January 4, 2013

Somemore Tomcat Interview Questions and Answers

1) How will you clear the cache of Tomcat server?
Ans: The tomcat server keeps a copy of compiled servlets and JSP’s present in all deployed web application at the following location.
$Tomcat_ServerworkCatalinalocalhost
To clear the cache, you just need to delete the folder corresponding to the web application for which you want to clear the cache.
2) What all services are provided by Tomcat?
Ans: Tomcat server provides a host of services which are not provided by normal web servers like Apache Web Server. The following is a list of services provided by Tomcat:
1) Life cycle Management
2) Handling Web Requests
3) Thread Management
4) Connection pooling
5) Clustering
Apart from the above service, you can also tell about the various tomcat components about which not everyone is aware in detail.
3) How will you create a database connection pool in Tomcat server?
Ans: The steps to configure connection pool:
1) Configure pool in context.xml inside conf folder of tomcat.
2) Perform a JNDI lookup of pool and get connection from data source.
The JDBC connection pooling page shows how one can create connection pool in tomcat server.
4) What are the steps to enable SSL in web application deployed on Tomcat?
Ans: Read this excellent tutorial on enabling SSL in web application deployed on tomcat
5) Can we run multiple instances of Tomcat server on single machine? If yes how?
Ans: I had posted a blog entry about configuring multiple instances of tomcat on a single machine.
6) Suppose there is a clash between the version of library being shipped with your application and the library of Tomcat, How will you resolve it? (Take example of Log4J)
Ans: There should be only one jar file for a particular library and if there is a clash, you should be using the version of library provided by the server which can avoid problems arising when deploying the application on client machines.
7) What is the directory structure of a web application deployed on Tomcat?
Ans: The typical web application structure which is deployed on tomcat is:


8) How can one enable Hot Deployment in Tomcat?
Ans: For enabling hot deployment, follow the official guide by Apache at configuring tomcat hot deployment.
9) Will you classify Tomcat as web server or application server?
Ans: Ideally speaking, tomcat is neither a web server not application server because of the following points:
a) Tomcat has servlet and JSP engine present in it which is not provided by web servers
b) Tomcat can not run EJB based applications which can be run by application servers.
10) What are the steps to configure clustering in Tomcat server?
Ans: Apache Tomcat wiki lists down the steps for configuring clustering in the guide at Tomcat server clustering

Tuesday, December 18, 2012

how to convert webpage to PDF file?

1)open the below url

http://www.web2pdfconvert.com/

2)enter the url of your webpage 

 3)click convert to PDF

Thursday, December 6, 2012

What is the Difference between Apache and IIS


Apache IIS
Apache is free. IIS is packaged with Windows.
Apache can run on almost any OS including UNIX, Apple’s OS X, and on most Linux Distributions. IIS only runs on Windows.
Apache comes from the community itself. IIS has a dedicated staff to answer most problems while support.
Apache optimized for the most of the OS including UNIX, Apple's OS X, Linux. IIS is optimized for Windows because they are from the same company.
The original Apache web server is based upon HTTP code largely credited for revolutionizing the entire World Wide Web. As an open-source software product, the earlier days saw it being used to mainly work with Unix and Unix-like platforms, even though it could be tweaked to work within the Windows environment. Since Windows NT 4.0 launched, Microsoft IIS has been available as an optional feature on Windows Server operating systems. At the time, IIS 3.0, was a basic application and didn’t really get its push as a true platform until IIS 4.0. The Microsoft server took off with the release of Windows Server 2003 and IIS 6.0, which was far more superior to previous editions. With the recent release of Windows Server 2008, IIS 7.0 was introduced, unleashing power and performance that would make it one of the most effective web servers on the market.

Oracle WebLogic vs IBM WebSphere?

Wednesday, December 5, 2012

How to find Quality Center 10 last login details for all the projects using SQL?

Below is the query to get last login details for all the projects. We can execute this query in site admin so that it will save time in executing individual projects.


SELECT PROJECTS.DOMAIN_NAME as "DOMAIN NAME", PROJECTS.PROJECT_NAME as "PROJECT NAME", MAX(SESSIONS_HISTORY.START_TIME) as "LAST LOGIN"
FROM qcsiteadmin_db.PROJECTS left outer join qcsiteadmin_db.SESSIONS_HISTORY SESSIONS_HISTORY
On (PROJECTS.PROJECT_NAME=SESSIONS_HISTORY.PROJECT_NAME) AND (PROJECTS.DOMAIN_NAME=SESSIONS_HISTORY.DOMAIN_NAME)
GROUP by PROJECTS.DOMAIN_NAME, PROJECTS.PROJECT_NAME ;

How to find QC10 bug history by using SQL?

SELECT AL.AU_USER, AL.AU_TIME, AP.AP_PROPERTY_NAME,
       AP.AP_NEW_VALUE, AP.AP_NEW_LONG_VALUE, AP.AP_NEW_DATE_VALUE,AL.AU_ACTION
FROM AUDIT_LOG AL, AUDIT_PROPERTIES AP, BUG B
WHERE (AL.AU_ACTION_ID = AP.AP_ACTION_ID)
  AND (TO_CHAR(B.BG_BUG_ID) = TO_CHAR(AL.AU_ENTITY_ID))
  AND (B.BG_BUG_ID = '20480')
  AND (AL.AU_ENTITY_TYPE = 'BUG')
ORDER BY AU_TIME ASC