1

I am unable to open jar files in eclipse. For example:

public class HttpSessionAndContextExa extends HttpServlet

if I want to see HttpServlet class it show me following error:

javax.servlet.http.HttpServlet
Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found. Please help.

alok
  • 2,718
  • 21
  • 17
  • possible duplication of: http://stackoverflow.com/questions/122160/is-there-an-easy-way-to-attach-source-in-eclipse – wake-0 Jul 09 '16 at 09:17

1 Answers1

1

I got the solution. The issue is due to we have not added tomcat source file for servlet in eclipse:

  1. right click on project -> prefrences -> Java Build Path -> Libraries -> add external jar - > add servlet-api.jar(in var/lib/tomcat/lib)
  2. Then add java decopiler in your eclipse with market place. Help->eclipse marketplace->search “JadClipse” ->install
  3. apply decompiler: window->prefrences->serach “decompiler” ->Apply
alok
  • 2,718
  • 21
  • 17
  • This was a quick answer (0: (you can mark your answer as accepted so others know that it solved your problem) – c0der Jul 09 '16 at 09:59