- This topic has 16 replies, 3 voices, and was last updated 17 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
begurraoMemberCan any body tell me how to import the existing JSP + Servlet + Tomcat project into MyEclise and debug JSP and Servlets?
Thanks
Riyad KallaMemberThere is no automated wizard to import a project like this, but if the project is in a straight forward layout, you should be able to create a new Web Project and drop your project artifacts into the project into the right locations and go from there.
begurraoMemberI am able to import the project (its not that simple) and am able to get into the debug mode and set the break point. It breaks at the line but I am unable see the values of the servlet’s local variables. What is the trick? how to see the value of the local variables?
Riyad KallaMemberIt’s possible that view could be closed. Go to the debug perspective and go to Window > Reset Perspective. You should have your variable values on the top right view. Furthermore you can set watches to get exact values if you need to.
begurraoMemberThanks for the response.
I did but still not able to see the servlet local variable values. In the left side of the debug window I see the below message. AdminUtil is a package and getConn is a method. Why local variables are not available?
AdminUtil.getConn()line:28[local variables unavailable]
Riyad KallaMemberThe reason this information is not displayed is because the class file was compiled without debugging information most likely. If you have access to that source code, you can try rebuilding it using compiler settings that will generate the debugging information necessary for the debugger to show that information.
begurraoMemberthanks for the info. I am able to debug now and see all the variables. Is it necessary to turn off the debug for production environment?
Riyad KallaMemberIt’s not necessary, it depends if you want to or not.
begurraoMemberIf it compiled with debug is on, then there will be any performance degradation in production environment?
Riyad KallaMemberNo measurable amount, the JVM has gotten so fast that these little things don’t matter anymore.
avryadavMembercan i get the inner source code of servlets in this debugging process, if so, tell the process
begurraoMemberYes, I am able to get to the inner source code of servlets in the debugging process and see/inspect all the variables. Put a break point in the servlet and then go step by step.
begurraoMemberRiyad,
Why debugging servlet and JSP are different? I am not able use ‘inspect’ in JSP. I can only see JSP variables in a separate window.
Riyad KallaMemberBecause JSP pages are actually compiled by the server at run time into Servlets themselves. So that extra layer of abstraction does cause some detail to be removed from the debugging process.
begurraoMemberOK. However, I am liking MyEclipse IDE environement. I have created & configured my workspace and Tomcat server deployment on to a flash drive so that I can carry my project development from work to home or work to home with out any problems. It is working great.
Do you have any suggestions to enhace my environment?
thanks
-
AuthorPosts