So I'm trying to enter the fun world of
JSP's and so I bought murach's Servelets and JSP 2nd edition, installed NetBeans and
Tomcat, configured them, and was trying to run a simple application named TestApp. I created the project in NetBeans, and ran it, and it runs great it says "Hello World" and everything. The next step was to add a new JSP, and here's where I am having a problem. When I add a new JSP called "test.jsp" in the WEB-INF folder, and use the Run File command, I get an error at the first line of code
Exception in
thread "main" java.lang.NoSuchMethodError: javax.servlet.ServletContext.getJspConfigDescriptor()Ljavax/servlet/descriptor/JspConfigDescriptor;
at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:104)
at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:194)
at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:257)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:162)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:447)
at org.apache.jasper.JspC.processFile(JspC.java:1153)
at org.apache.jasper.JspC.execute(JspC.java:1322)
at org.netbeans.modules.web.project.ant.JspC.main(JspC.java:101)
at org.netbeans.modules.web.project.ant.JspCSingle.main(JspCSingle.java:119)
I have triple and quadruple checked and I am absolutely sure I am doing everything the book said to do to the letter. The same error seems to happen if I click on or change anything. It creates the project fine, and if I don't do anything whatsoever to it it will run. But if I do anything like change the html in the index.jsp or add a jsp I get this error. Of course I am a complete beginner so I have no idea what is going on, but can anybody help? It is exercise 3.1 in the book and it seems like it should be super simple.