I have beggining to develop web based apps utilizing Java Servlets, in
order to expand my development areas to J2ee platforms. and I have come
across an issue when retrievimg parameter values using the HttpServlets Request
object. When I have a input field being retrieved, the data will be written
to the database, using jdbc as expected. However, comparison of the retrieved
values seems to fail miserably. Below attempts to show the problems I am

public class customerprocess extends HttpServlet
public void doPost(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException, java.io.IOException

// where "ActionType" is a Hidden Input Field
// within the posted form
String lActionType = req.getParameter("ActionType") ;

// Now the idea here is to make a comparison on the
// the field to determine what type of processing to
// do, as I am trying to make generic servlets that will
// will conduct a varitey of processes

if (lActionType == "GetCustomer")

// Even if "GetCustomer" is the hidden INput
// fieled value does does not evaluate to true

// processing for GetCustomer request


// unfortionately , the field will hit the null condition
// below

if (lActionType == null)

// null processing hits here



I am hitting the right page request, in that for data insert operations,
the req.getParameter() populates the data in my database
as expected. It is the comparision results that seem to be going haywire.
Is there something else I should be doing here?

thanks on any help here