This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Zero to AI - A non-technical, hype-free guide to prospering in the AI era and have Nicolò Valigi and Gianluca Mauro on-line!
See this thread for details.
Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Get rid of line numbers

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am debugging a situation and am trying to learn more about the inner workings of struts.

So when I suspend a thread with a breakpoint, I look at the StackTrace and decide I want to put a breakpoint in:

ActionServlet.getRequestProcessor(ModuleConfig) line: 620.

Eclipse wants to know where the source is. So I point it to:

http://www.docjar.com/html/api/org/apache/struts/action/ActionServlet.java.html.

Eclipse says the path doesn't exist.

So I try to create a new ActionServlet class in my project and copy in the contents from Docjar, but I can't get rid of the line numbers.

I expect that when I successfully create this new class I will need to modify web.xml to point to the new location for the definition of ActionServlet.

Thanks.

Matt

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you need to do is download the source code for Struts and point Eclipse to that. I think it will accept the source as a zip file, or you can unzip it and point Eclipse to the base source directory.

P.S. If you get rid of the line numbers, nothing will work. (How can Eclipse show you line on code in question if it cannot find it by line number?)
 
matt love
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter, I'm making bunches of progress.

I have downloaded struts source to a directory in c:\Program Files... I've created 2 classes in a new package (strutssource) in my project and copied in ActionServlet and RequestProcessor classes respectively.

After resolving all the missing imports, I'm left with many "...not applicable for arguments..." compilation errors, which I've identified by placing at the end of each affected line "//here".

For example, there's 1 in ActionServlet.initModulePlugIns(ModuleConfig config) on the line "plugIns[i].init(this, config);" where the error message is "The method init(ActionServlet, ModuleConfig) in the type PlugIn is not applicable for the arguments (ActionServlet, ModuleConfig)".

In RequestProcessor class I have 6 likewise errors.

I don't believe this is an exercise in futility because I wish to "step through" parts of code and what if I wanted to override some behavior in one of the methods producing the compilation errors - I'd quite possibly have to resolve one or more of these errors to do so - wouldn't I?

Thanks.

Matt







+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 
Paper beats rock. Scissors beats tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic