Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

request becomes null in unix  RSS feed

Dips Rawat
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a problem with my application where request becomes null in
UNIX environment and works fine in windows XP system.
When I select a value from dropdown and hit submit eg. i selected Save. It fails to save as selected value comes null.
The selected value is null always.

JSP code which is built dynamically in a java class is as below:

if (new) {
sb.append("<td align=right colspan=2>\n");
sb.append("<select name=\"actionSelection\">");
sb.append(" <option value=\"save\">- Save </option>");
sb.append(" <option value=\"delete\" >- Delete </option>");
sb.append(" <option value=\"saveSchedule\" >- Schedule</option>");
sb.append(" <option value=\"saveRefer\" >- Refer</option>");
sb.append("</select>"); sb.append(" <input type=\"submit\" name=\"save\"
value=\"Complete\" class=Button >");

Action class code :
public ActionForward save(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
String method = "save";
Exception ex = null;
ActionForward forward = null;
AppUser appUser = getAppUser(request);
appUser.methodStart(this, "save");
HttpSession session = request.getSession(false);
String action = request.getParameter("actionSelection"); // Here I get action as null

action value comes as null and it throws null pointer exception.

As UNIX is case sensitive I checked the request parameter which is
actionSelection in this class and I do not see any problem with it. I
don't know why action servlet becomes null at this point. Please suggest if
anyone has any idea about this.Please let me know if you need some more information . I appreciate any help.
Note: This happens only in UNIX environment. Works fine in my local system (Windows XP).

Thanks ,
David Newton
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neither the request nor action servlet is null as you state: the request parameter is null.

Have you verified that the request is being GET/POSTed with the correct parameters (checking via Firebug or similar)?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!