• Post Reply Bookmark Topic Watch Topic
  • New Topic

Head Firsts BeerSelect compilation problem  RSS feed

 
Igor Mandic
Greenhorn
Posts: 24
Eclipse IDE Google App Engine Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seriously, I am losing my hair with Head First Servlets and JSP. This book is totally different from any other book that teach's you how to make web apps. BUT book seriously lacks of real job experiences, maybe its meant to be that way, I don't know. I had a lot of troubles even with first experience but that's nothing in compare with second where you need to make some BeerSelect app. And the problem is compilation and running.. Now, I feel disappointed for not knowing how to deal with this. Here is my java code, what I type in my Linux Ubuntu Terminal, and errors I get..

Code:


and now what I type in terminal to compile (I do not have much experience with javac way of compiling since I used to work only in Eclipse and everything is automatic):



and the error:



The thing is, I am starter with Linux Ubuntu (never used Linux before I started using this book) and I do not know where are half of my .jar files .. I have installed java Se and java Ee with that Glass Fish thing and I am pretty confused since I can't find..

I don't want to blame book for everything because its pretty old (from 2008) but, tell me (I assume that you had experience with this book) is it going to be like this all the way? If it is I'll not use it anymore, its making me more trouble then help.. Maybe I should go for something else..

So, I beg you can you help me with this thing here... and give me few advices, Now I have doubts in my knowledge..

 
Adam Cripps
Ranch Hand
Posts: 41
Eclipse IDE Linux Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just out of interest, what happens if you put System.out.println("..."); instead of out.println? It looks to me like your environment can't solve the call to out.println.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The compiler is giving you a pretty good idea what the problem is. It is telling you it has no idea what the 'out' variable is. It isn't something you declared anywhere, so what is it?
 
Igor Mandic
Greenhorn
Posts: 24
Eclipse IDE Google App Engine Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is how it was in the book. I am not sure should there be System. or not since I do not know this whole thing about servlets jet. Well, I added System. and compiled it successfully. BUT, now I can not see my response. There is a message in my browser:

HTTP Status 405 - HTTP method GET is not supported by this URL

and description:

The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

.. so I assume something's wrong.. again..
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Igor Mandic wrote:That is how it was in the book.

Are you sure ? Check line 11 of your code very carefully.
 
Igor Mandic
Greenhorn
Posts: 24
Eclipse IDE Google App Engine Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne Neal wrote:
Igor Mandic wrote:That is how it was in the book.

Are you sure ? Check line 11 of your code very carefully.


My goodnes...

I can not belive what I just did.. I blamed the book for my own mistakes. I was mad because I used Linux for a first time and I had troubles to find things.

Everything here is just my fault. Thank you all, especialy Joanne Neal.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!