• Post Reply Bookmark Topic Watch Topic
  • New Topic

learning servlets but getting IOException error  RSS feed

 
Higgledy Smith
Ranch Hand
Posts: 193
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my first servlet and I can't get the thing to compile. Can anyone offer me some direction? Thank you.

From C:\workspace\test, I run: javac HelloServlet.java

CLASSPATH=.;C:\workspace\test;C:\workspace\apotheke;C:\Program Files\apache-tomcat-5.5.17\common\lib\servlet-api.jar;C:\Program Files\apache-tomcat-5.5.17\common\lib\jsp-api.jar



Here is my error:
C:\workspace\test>javac HelloServlet.java
HelloServlet.java:19: unreported exception java.io.IOException; must be caught or declared to be thrown
PrintWriter out = response.getWriter();
^
1 error
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take care not to post the same topic more than once.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!