java - javax.servlet.* cannot be resolved to a type -


i running ubuntu 14.04 , eclipse kepler (with java ee modules preloaded) , developing dynamic web app first time, says javax.servlet.xyz cannot resolved type please including screen snapshot error page!

system snapshot

only 2 things required in eclipse this:

one

in eclipse, window -> preferences -> server -> runtime environment
specify web server or application server path, adding "new server runtime environment".

update

initially, there few server runtime environments available eclipse like:

  1. apache
  2. basic
  3. objectweb

on additional note, can add more server adapters using link download additional server adapters in server runtime environments dialog screen.

server runtime environment list in eclipse preferences

two

in project properties (right click on project -> properties), in java build path, add library "server runtime".
on adding server runtime project library add servlet-api.jar , jsp-api.jar jars project dependencies.

add server runtime library project


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -