please help!!!!

Reply

Join Date: Dec 2005
Posts: 5
Reputation: DiTony is an unknown quantity at this point 
Solved Threads: 0
DiTony DiTony is offline Offline
Newbie Poster

please help!!!!

 
0
  #1
Dec 20th, 2005
Please help

I keep getting this error message after compiling the following SimpleList.java


C:\jakarta-tomcat-5.0.28\webapps\Ch04\WEB-INF\classes\Ch04>javac SimpleList.java

SimpleList.java:21: cannot resolve symbol
symbol : class Questions
location: class Ch04.SimpleList
Questions questions = new Questions();
^
SimpleList.java:21: cannot resolve symbol
symbol : class Questions
location: class Ch04.SimpleList
Questions questions = new Questions();
^
2 errors


And this is the program:

package Ch04;

import java.util.*;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;
import java.io.*;


public class SimpleList extends SimpleTagSupport {
private String topic;

public void setTopic(String s ) {
topic = s;
}

public String getTopic() {
return topic;
}

public void doTag() throws JspException {
Questions questions = new Questions();
questions.setTopic(getTopic());

// Get List of questions, TreeMap will sort them by key
Map qmap = new TreeMap(questions.getQuestions());
Iterator faqs = qmap.values().iterator();
int count = 1;

while (faqs.hasNext()) {

try {
//Store the parameter for invoke()
getJspContext().setAttribute("qid", topic + "_" + count);
getJspContext().setAttribute("question", faqs.next());
count++;

//Process the body
getJspBody().invoke(null);


} catch (IOException e) {
throw new JspException("Exception processing body");
}
}

}
}


Can anybody sees the problem?

Thank you

Ditony
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 265
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: please help!!!!

 
0
  #2
Dec 22nd, 2005
apparantly it can not find the class Question. If you have the class in another package try importing it.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5
Reputation: DiTony is an unknown quantity at this point 
Solved Threads: 0
DiTony DiTony is offline Offline
Newbie Poster

Re: please help!!!!

 
0
  #3
Dec 26th, 2005
Originally Posted by sam1
apparantly it can not find the class Question. If you have the class in another package try importing it.
Hi Sam1:

Thank you for your replied....I gave back on this JSP problem, I have tried every possible way and still I have had problems with this JSP chapter.....

Anyway I skipped the last JSP pages and I am continuing with the Servlet Chapter....

On thing I found out about the authors, this is the worse book I have ever read and they are not clear in what they write.....

Also I have a small problem with the first servlet example and I am using Sun Application Developer and Tomcat 5.0.28 and this is what I am getting when I enter the URL - http://localhost:8080/Ch05/login.html

Login
Please enter your username and password
"/Ch05/Login" method="POST">

_________________
_________________

_________________
_________________

_________
Submit
_________

The error here is that this line is always there: "/Ch05/Login" method="POST">



Thank you anyway


Ditony
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5
Reputation: DiTony is an unknown quantity at this point 
Solved Threads: 0
DiTony DiTony is offline Offline
Newbie Poster

Re: please help!!!!

 
0
  #4
Dec 26th, 2005
Originally Posted by sam1
apparantly it can not find the class Question. If you have the class in another package try importing it.
Hi: Sam1

Now is working the first Servlet example....the problem is that in the html.login in the <form action="/Ch05/Login" method=POST> the POST had a double quotes(" "), so I remove them now is working fine in the Sun Application Server Deploytool and also in Tomcat 5.0.28....


Later
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,482
Reputation: jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all 
Solved Threads: 236
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: please help!!!!

 
0
  #5
Dec 28th, 2005
the double quotes are supposed to be there.
ALL attributes in html and xml files should always be quoted.
42
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5
Reputation: DiTony is an unknown quantity at this point 
Solved Threads: 0
DiTony DiTony is offline Offline
Newbie Poster

Re: please help!!!!

 
0
  #6
Dec 28th, 2005
Originally Posted by jwenting
the double quotes are supposed to be there.
ALL attributes in html and xml files should always be quoted.
Thank you Sam1, I just enclosed the double quotes (" ") back into method="POST" and works fine....But It has been working fine without the double quotes (" ")...isn't that weird? .............uhuuuuhuh

later
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5
Reputation: DiTony is an unknown quantity at this point 
Solved Threads: 0
DiTony DiTony is offline Offline
Newbie Poster

Re: please help!!!!

 
0
  #7
Dec 28th, 2005
Originally Posted by jwenting
the double quotes are supposed to be there.
ALL attributes in html and xml files should always be quoted.
Thank you jwenting, I just enclosed the double quotes (" ") back into method="POST" and works fine....But It has been working fine without the double quotes (" ")...isn't that weird? .............uhuuuuhuh

later
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JSP Forum


Views: 2582 | Replies: 6
Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC