- This topic has 5 replies, 2 voices, and was last updated 18 years ago by
Riyad Kalla.
-
AuthorPosts
-
Lahellec Jean-FrancoisMemberHello ,
Something that I don’t understand :
I use JSP and servlet with a Tomcat server. I use the remote debug mode to debug my application . The JSP sends some parameters to the servlet via the request object ( post or get ). I put a breakpoint in the servlet and I hope to see the value of the parameter in the request object but I cant find it !! I can’t find the parameter variable and so its value .
If someone can explain me how find parameters value ( variable window in debug mode ) during the servlet debug ?
Thanks
May 29, 2007 at 10:17 am #270792
Riyad KallaMemberIf you aren’t seeing your parameter values then chances are you are sending them wrong. You could try and just print them out with System.out.println arguments, if you get back “null” then you are likely sending them wrong to your servlet.
May 30, 2007 at 2:24 am #270851
Lahellec Jean-FrancoisMemberHello,
Thanks you, but my application works . Parameters are right sending by the JSP and received by the servlet . But I can’t find them in the request object of the Variable window .Neither the name nor the value …
May 30, 2007 at 10:20 am #270863
Riyad KallaMemberI’m confused… I’m guessing at some point in your servlet you do request.getParameter to get the values out right? If you are debugging and step to that point, and then check the returned value from the getParameter call, I’m guessing it’s the legit value right?
I would suggest necessarily digging around the request objects, server-objects tend to be really complex and layered with abstraction. Instead add some watch variables that evaluate them for the specific values you want to see.
June 6, 2007 at 4:56 am #271166
Lahellec Jean-FrancoisMemberIt does’nt give me a suffisant debug level for a issue that I have :
a parameter is null but seeing not null in the servlet :
cat.debug("rev = "+request.getParameter(PidParam.JSP_PARAM_PROD_REV)); if ((request.getParameter(PidParam.JSP_PARAM_PROD_REV) != null) && (request.getParameter(PidParam.JSP_PARAM_PROD_REV) != "")) { where = Tools.buildWhereString(where, "P.PROD_REV", request.getParameter(PidParam.JSP_PARAM_PROD_REV), "", ""); searchVO.setProd_rev(request.getParameter(PidParam.JSP_PARAM_PROD_REV)); searchVO.setChk_prod_rev(new String("Y")); } else { searchVO.setChk_prod_rev(new String("N")); searchVO.setProd_rev(""); }
the parameter PidParam.JSP_PARAM_PROD_REV is null but I enter in the if condition, not in the else !! I don’t understand why ??
the cat.debug print give nothing !!
June 6, 2007 at 11:11 am #271185
Riyad KallaMemberThis is no longer a MyEclipse question, this is more of an issue of troubleshooting code. Adding a breakpoint and then stepping through this code adding a watch variable to watch the value of “request.getParameter(PidParam.JSP_PARAM_PROD_REV)” should give you all the data you need.
-
AuthorPosts