Saturday, August 27, 2011

Explain different logging levels?

The logging levels are, in ascending order of severity, as follows: ALL, DEBUG, INFO, WARN,ERROR, FATAL, and OFF

How to start Tomcat with security?

By default, Tomcat starts without security. To start it with security, use the -security switch

$CATALINA_HOME/bin/startup security

what are different configuration files in Tomcat conf folder?

• catalina.policy
• catalina.properties
• context.xml
• server.xml
• logging.properties
• tomcat-users.xml
• web.xml

what is META-INF?

The META-INF directory is placed at the root of a web application when it’s deployed as a WAR file

what is WEB-INF?

The Servlet specification sets out how you partition web applications into public and private areas. You store the private resources in a directory called WEB-INF in the root of the web application. This is where you store all the web-application–specific configuration files, application classes, and application-specific utilities

WEB-INF
classes
lib
tags

what is WAR?

A web application is a collection of web resources, such as JSP pages, HTML pages, servlets,and configuration files, organized into a hierarchy as specified in the Servlet specification. You have two ways in which to organize a web application: packed and unpacked. The packed form is called a web archive (WAR) file, and the unpacked form is a collection of directories stored on the file system.

Tomcat 6.x Supports

Servlet 2.5 and JSP 2.1 specifications

Monday, August 22, 2011

mysql :create table with a primary key

create table pmuser(
user_id BIGINT NOT NULL AUTO_INCREMENT,
user_name varchar(40),
user_pwd varchar(50),
primary key(user_id)
);

mysql - Create database and assign user access

create user pmuser@'localhost' identified by 'pmuser';
drop database pmdata;
create database pmdata;
grant all on pmdata.* to pmuser@'localhost';

Mysql-Create user

First log on to mysql DB as root

>mysql -u root -p (press enter)
Enter Password :enter password
then create user
>
create user 'suresh' identified by 'suresh';