Thursday, April 28, 2011

MySQL installation on Ubuntu 10.04

I went through the flowing link which is the best guideline for installation of MySQL on Ubuntu 10.04

http://ariejan.net/2007/12/12/how-to-install-mysql-on-ubuntudebian/

Flow all the steps given in the link

servlet to servlet calling problems

Currently I am working on the project which was based on JAVA coding. Basically it involves the servlets coding and passing the control from servlet to servlet. I came across some problems when I wanted to call one servlet from another.

1. check the client http request type i.e whether it is GET/POST etc.. Change the method type of the JAVA code as per the request type.

2.  use sendRedirect() only when you want to call the servlet on some another server

3. use forward() when other servlet is on the same server

4. find the type of client who is initiating the request i.e. is the request initiated from Web Browser or some external code like .jsp/.php etc. Because, there are some cases like Common Gateway Interface codes which are written in .jsp and they might not respond to sendRedrect statements.

5. check the role manager rights assigned to the servlets from the web server (e.g Tomcat)  

Wednesday, April 27, 2011

Difference between response.sendRedirect() and requestDispatcher.forward()

sendRedirect() and forward() are basically used to pass the request to another servlet for further processing.

sendRedirect() is basically is used when there request is to be sent to the servlet which is uploaded on another server. When the sendRedirect() is called, the servlet passes the request back to client and so that the client would call another servlet whose path is mentioned in the ().

forward() is used when the request is to be sent to the servlet which is present on the same server. When the forward() is called, the servlet passes the control to another servlet directly, without requesting the client again to call another servlet.

Thus, forward is pretty fast in execution but it has the boundary of the server container.  

Monday, April 4, 2011

Things about learning java

Few days back when I was searching on Internet for Java tips, I found some one interesting link. I thought it would be useful for others after going through the following website

PROFILE

My photo
India
Design Engineer ( IFM Engineering Private Limited )

Followers