Welcome Message

Hi, welcome to my website. This is a place where you can get all the questions, puzzles, algorithms asked in interviews and their solutions. Feel free to contact me if you have any queries / suggestions and please leave your valuable comments.. Thanks for visiting -Pragya.

November 5, 2009

Servlets n JSPs

1. How do u difine an error page?

2.What r the methods called in servlet life cycle?

3.How can u make session variables un available?

4. How to change the port no of agiven application server?

5.Why and in wat kind of requirments we need to use EJBs?

1. Create one jsp page and there is tag called IsErrorPage True it means this is an error page . I u need to call this error page in ur application u can decalre errorpage "give realtive url"

2. Init(). For intilizing the servlet.
Service(). For servicing the request .
Destroy(). TO destroy the resource allocated by Init().

3. In Jsp There having an attribute like Session false.

4. Inside the appication server(jBoss) u just go to server /default/deploy/tomacat5.5.rar/server.xml. Inside server.xml u can see Tag
8080. give some other name apart from 8080.

Restart the server and try with new port.

5. EJB is mainly for distributed application. It is following the RMI concept.

In RMI we are binding the Remote name and keep in the RMiregistry.
In Ejb We have a container it will provide lot of service like

1.persistance
2.Security
3.concurrency control.
4.Load balancing Etc
It will make our transction more powerful.

No comments: