This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
java.lang.NullPointerException at MVC.Example1.doGet(Example1.java:30) at MVC.Example1.doPost(Example1.java:56) --------------------
It would be difficult to answer your question without seeing your code. It seems that the reference variable is not initialized properly, but you have tried to access the methods associated with the reference. For example,
the above code snippet will throw NPE since str is not initialized.