• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Another Newb failing at HF Servlets & JSP Beer Example

 
Kai Karius
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off,

relax. I didnt fail completely . Its just the last step involving an actual JSP file that troubles me. My deployment structure is as given in the book. Each of the previous examples worked fine. Now, building in the result.jsp my fox gives me the following:



Now, i cant get smart of this....Here are my files:

Its the BeerExpert.java :



The BeerSelect.java



The web.xml



And, ofc. the result.jsp



Thanks in advance.
 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.apache.jasper.JasperException: /result.jsp(1,5) Invalid directive


Here where it comes from,

, where it should be



You are using an import statement but there's no directive called import but page and import is an attribute of it.
This will solve your problem
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A little hint:
<%@ import="java.util.*" %>

is a "directive", and it's where the error occurs. The other files are not relevant to this problem. Consult the book or the JSP specification on what the valid directives are, and what their syntax is.
 
Kai Karius
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Tanks, i checked the statement. Ofc, it should read:

<%@ page import="java.util.*" %>


Guess i was so glad to see some familiar Java that i didnt consider the differences.

Thank you very much,

TWERP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic