What steps will reproduce the problem?
- intall tomcat, copy jsp to root folder (follow readme.inf instructions)
Apache Software Foundation\Tomcat 6.0\webapps\ROOT
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 6 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Poll resolves to a
package
An error occurred at line: 7 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Choice resolves to a
package
An error occurred at line: 8 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Pollsession resolves
to a package
An error occurred at line: 9 in the generated java file
Only a type can be imported. ilsrep.poll.server.db.SQLiteDBManager
resolves to a package
An error occurred at line: 10 in the generated java file
Only a type can be imported. ilsrep.poll.server.db.DBManager resolves to a
package
An error occurred at line: 11 in the generated java file
Only a type can be imported. ilsrep.poll.common.protocol.Pollsessionlist
resolves to a package
An error occurred at line: 12 in the generated java file
Only a type can be imported. ilsrep.poll.common.protocol.Item resolves to
a package
An error occurred at line: 13 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Poll resolves to a
package
An error occurred at line: 14 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Choice resolves to a
package
An error occurred at line: 15 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Pollsession resolves
to a package
An error occurred at line: 16 in the generated java file
Only a type can be imported. ilsrep.poll.server.db.SQLiteDBManager
resolves to a package
An error occurred at line: 17 in the generated java file
Only a type can be imported. ilsrep.poll.server.db.DBManager resolves to a
package
An error occurred at line: 18 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Poll resolves to a
package
An error occurred at line: 19 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Choice resolves to a
package
An error occurred at line: 20 in the generated java file
Only a type can be imported. ilsrep.poll.common.model.Pollsession resolves
to a package
An error occurred at line: 21 in the generated java file
Only a type can be imported. ilsrep.poll.server.db.SQLiteDBManager
resolves to a package
An error occurred at line: 22 in the generated java file
Only a type can be imported. ilsrep.poll.common.protocol.Answers resolves
to a package
An error occurred at line: 23 in the generated java file
Only a type can be imported. ilsrep.poll.common.protocol.AnswerItem
resolves to a package
An error occurred at line: 24 in the generated java file
Only a type can be imported. ilsrep.poll.server.db.DBManager resolves to a
package
An error occurred at line: 12 in the jsp file: /./links.jsp
Pollsessionlist cannot be resolved to a type
9: public String links() throws Exception{
10: String links="";
11: links="<ul>";
12: Pollsessionlist sessions;
13: DBManager db;try {
14: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
15: sessions=db.getPollsessionlist();
An error occurred at line: 13 in the jsp file: /./links.jsp
DBManager cannot be resolved to a type
10: String links="";
11: links="<ul>";
12: Pollsessionlist sessions;
13: DBManager db;try {
14: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
15: sessions=db.getPollsessionlist();
16: for ( Item sess : sessions.getItems()) {
An error occurred at line: 14 in the jsp file: /./links.jsp
SQLiteDBManager cannot be resolved to a type
11: links="<ul>";
12: Pollsessionlist sessions;
13: DBManager db;try {
14: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
15: sessions=db.getPollsessionlist();
16: for ( Item sess : sessions.getItems()) {
17: links+="<li><a href=\"./index.jsp?session="+sess.getId()
+"\">"+sess.getName()+"</a></li>\n";
An error occurred at line: 16 in the jsp file: /./links.jsp
Item cannot be resolved to a type
13: DBManager db;try {
14: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
15: sessions=db.getPollsessionlist();
16: for ( Item sess : sessions.getItems()) {
17: links+="<li><a href=\"./index.jsp?session="+sess.getId()
+"\">"+sess.getName()+"</a></li>\n";
18: }
19: links+="<ul>";} catch (Exception e){links=e.getMessage();}
An error occurred at line: 14 in the jsp file: /./poll.jsp
Pollsession cannot be resolved to a type
11: String resultingOutput="<script type=\"text/javascript\"
src=\"next.js\"></script>";
12: resultingOutput+="<form name=\"polls\" id=\"polls\"
action=\"index.jsp\" method=\"get\">\n"+
13: "<input type='hidden' name='session' value='"+sessi+"' >";
14: Pollsession sess;
15: DBManager db;
16: int numberOfPolls=0;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
An error occurred at line: 15 in the jsp file: /./poll.jsp
DBManager cannot be resolved to a type
12: resultingOutput+="<form name=\"polls\" id=\"polls\"
action=\"index.jsp\" method=\"get\">\n"+
13: "<input type='hidden' name='session' value='"+sessi+"' >";
14: Pollsession sess;
15: DBManager db;
16: int numberOfPolls=0;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
18: sess=db.getPollsessionById(sessi);
An error occurred at line: 17 in the jsp file: /./poll.jsp
SQLiteDBManager cannot be resolved to a type
14: Pollsession sess;
15: DBManager db;
16: int numberOfPolls=0;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
18: sess=db.getPollsessionById(sessi);
19:
20: resultingOutput+="<h1>"+sess.getName()+"</h1>";
An error occurred at line: 21 in the jsp file: /./poll.jsp
Poll cannot be resolved to a type
18: sess=db.getPollsessionById(sessi);
19:
20: resultingOutput+="<h1>"+sess.getName()+"</h1>";
21: for (Poll currentPoll : sess.getPolls()) {
22: resultingOutput+="<div id="+Integer.toString(numberOfPolls)+"
style=\"inner_poll\">";
23: resultingOutput+="<h2>"+currentPoll.getName()+"</h2>";
24: resultingOutput+="<h3>"+currentPoll.getDescription().getValue()
+"</h3>";
An error occurred at line: 25 in the jsp file: /./poll.jsp
Choice cannot be resolved to a type
22: resultingOutput+="<div id="+Integer.toString(numberOfPolls)+"
style=\"inner_poll\">";
23: resultingOutput+="<h2>"+currentPoll.getName()+"</h2>";
24: resultingOutput+="<h3>"+currentPoll.getDescription().getValue()
+"</h3>";
25: for( Choice currentChoice : currentPoll.getChoices()){
26: resultingOutput+="<input type='radio' name='"+currentPoll.getName()+"'
value='"+currentChoice.getName()+"'>"+currentChoice.getName()+"<br>";
27: }
28: if(currentPoll.getCustomEnabled().equals("true")){
An error occurred at line: 14 in the jsp file: /./submit.jsp
AnswerItem cannot be resolved to a type
11: <%!
12: public String getRes(ServletRequest request) throws Exception{
13: String res="<table border=\"1\">";
14: List<AnswerItem> answers = new ArrayList<AnswerItem>();
15: Pollsession sess;
16: DBManager db;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
An error occurred at line: 14 in the jsp file: /./submit.jsp
AnswerItem cannot be resolved to a type
11: <%!
12: public String getRes(ServletRequest request) throws Exception{
13: String res="<table border=\"1\">";
14: List<AnswerItem> answers = new ArrayList<AnswerItem>();
15: Pollsession sess;
16: DBManager db;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
An error occurred at line: 15 in the jsp file: /./submit.jsp
Pollsession cannot be resolved to a type
12: public String getRes(ServletRequest request) throws Exception{
13: String res="<table border=\"1\">";
14: List<AnswerItem> answers = new ArrayList<AnswerItem>();
15: Pollsession sess;
16: DBManager db;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
18: sess=db.getPollsessionById(request.getParameter("session"));
An error occurred at line: 16 in the jsp file: /./submit.jsp
DBManager cannot be resolved to a type
13: String res="<table border=\"1\">";
14: List<AnswerItem> answers = new ArrayList<AnswerItem>();
15: Pollsession sess;
16: DBManager db;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
18: sess=db.getPollsessionById(request.getParameter("session"));
19: if(sess.getTestMode().equals("true")){ res+="<tr><td colspan=2>Your
selection</td><td>Result</td></tr>\n";
An error occurred at line: 17 in the jsp file: /./submit.jsp
SQLiteDBManager cannot be resolved to a type
14: List<AnswerItem> answers = new ArrayList<AnswerItem>();
15: Pollsession sess;
16: DBManager db;
17: db = new SQLiteDBManager(null,getServletContext().getRealPath("/")
+"/pollserver.db");
18: sess=db.getPollsessionById(request.getParameter("session"));
19: if(sess.getTestMode().equals("true")){ res+="<tr><td colspan=2>Your
selection</td><td>Result</td></tr>\n";
20: } else {
An error occurred at line: 26 in the jsp file: /./submit.jsp
Poll cannot be resolved to a type
23:
24: float numberTotal=0;
25: float numberPassed=0;
26: for (Poll currentPoll : sess.getPolls()) {
27: numberTotal++;
28: AnswerItem answerItem = new AnswerItem();
29: if(request.getParameter(currentPoll.getName()).equals("custom_choice"))
{
An error occurred at line: 28 in the jsp file: /./submit.jsp
AnswerItem cannot be resolved to a type
25: float numberPassed=0;
26: for (Poll currentPoll : sess.getPolls()) {
27: numberTotal++;
28: AnswerItem answerItem = new AnswerItem();
29: if(request.getParameter(currentPoll.getName()).equals("custom_choice"))
{
30: answers.add(answerItem.setItem(Integer.parseInt(currentPoll.getId()),
request.getParameter("custom"+currentPoll.getName())));
31: if(sess.getTestMode().equals("true")){
An error occurred at line: 28 in the jsp file: /./submit.jsp
AnswerItem cannot be resolved to a type
25: float numberPassed=0;
26: for (Poll currentPoll : sess.getPolls()) {
27: numberTotal++;
28: AnswerItem answerItem = new AnswerItem();
29: if(request.getParameter(currentPoll.getName()).equals("custom_choice"))
{
30: answers.add(answerItem.setItem(Integer.parseInt(currentPoll.getId()),
request.getParameter("custom"+currentPoll.getName())));
31: if(sess.getTestMode().equals("true")){
An error occurred at line: 39 in the jsp file: /./submit.jsp
Choice cannot be resolved to a type
36: } else {
37: int selectionId=0;
38: String pass="";
39: for (Choice currentChoice : currentPoll.getChoices()) {
40: if (currentChoice.getName().equals
(request.getParameter(currentPoll.getName()))) selectionId=Integer.parseInt
(currentChoice.getId());
41: }
42: pass=(Integer.parseInt(currentPoll.getCorrectChoice())
==selectionId) ? "PASS" : "FAIL";
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError
(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError
(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass
(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Original issue reported on code.google.com by ukra...@gmail.com on 16 Sep 2008 at 7:47
Original issue reported on code.google.com by
ukra...@gmail.com
on 16 Sep 2008 at 7:47