Hi, com.ibm.servlet.engine.webapp.WebAppDispatcherRequest myReq =(com.ibm.servlet.engine.webapp.WebAppDispatcherRequest) request; String url = "/Remote"; myReq.setRawParameters(temp_map); myReq.setPathInfo(url); Stis giving an request.getRequestDispatcher("/RemServlet").forward( myReq, response); String value=req.getParameter(name) is giving a but the getParameterNames is working fine Servlet Error: java.lang.String: java.lang.ClassCastException: java.lang.String Thanx
Joined: May 30, 2002
May I help you?
Joined: Oct 04, 2003
is name a String object? you haven't created a local class called String have you?
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
Joined: Nov 27, 2001
String value = req.getParameter(name) getParameter returns an Object, you have to type cast it. String value = (String)req.getParameter(name)
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Joined: Nov 07, 2001
Originally posted by Andres Gonzalez: String value = req.getParameter(name) getParameter returns an Object, you have to type cast it. String value = (String)req.getParameter(name)
Hi, By default req.getParameter("name") returns a String Object only. You don't required to type cast it. Regards, M.S.Raman