I have 2 questions: 1) When i javac a java file, the following errors came out. C:\>javac logon.java logon.java:3: package javax.servlet does not exist import javax.servlet.*; ^ logon.java:4: package javax.servlet.http does not exist import javax.servlet.http.*; ^ 2 errors Anyone knows what does it means??? Any ways to solve this error?? 2) When i type http://localhost:8080/cdlist/cd_list.jsp at the IE address to view the file , the following error came out org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/taglibs/xtags-1.0) cannot be resolved in either web.xml or the jar files deployed with this application Can anyone please explain what it means and is there any ways to solve this error. Thankyou very much....
Bhushan Jawle
Ranch Hand
Joined: Nov 22, 2001
Posts: 247
posted
0
To answer your first question, servlet.jar is not in your CLASSPATH and hence the error. For second one, more info. is needed. I would check the following: -Is tomcat installed properly ? -Does anything(Simple.html) work under the newly created context root. Bhushan
qiu zhixiong
Greenhorn
Joined: Jan 14, 2003
Posts: 5
posted
0
Thanks for your reply. 1) Some people give me this solution javac logon.java -classpath c:\jakarta-tomcat-4.1.18\common\lib\servlet.jar but it cant works. 2) Tomcat works fine, the version i install is 4.1.18. I did change the context: <Context path="/examples" docBase="examples" debug="0" reloadable="true" crossContext="true"> <!---- my context here --> <Context path="/cdlist" docBase="c:\jsp\cdlist\" crossContext="false" debug="9" reloadable="true" > </Context> <!---- my context here --> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_examples_log." suffix=".txt" timestamp="true"/> If i put the cdlist folder outside root then will i need to change the context isit?? If i put the folder in root then i will not need to change anything right??? Not very sure isit 100% correct, cos it can't works. I have been tying to solve this problem for quite afew days already and i can't carry on with my project unless i solve this error. Hope you could help me, Thanks alot.
Neha Ashok
Greenhorn
Joined: Dec 12, 2002
Posts: 26
posted
0
Check where is your servlet.jar is located. And in the command prompt set the classpath: for instance if it is in C:\Program Files\Apache Tomcat 4.0\common\lib\servlets.jar set classpath=%classpath%;C:\Program Files\Apache Tomcat 4.0\common\lib\servlets.jar;
and then try javac logon.java
qiu zhixiong
Greenhorn
Joined: Jan 14, 2003
Posts: 5
posted
0
Thanks, i manage to get the class file out, but i still can't run the example??? The following error came out: 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: 40 in the jsp file: /processLogon.jsp Generated servlet error: [javac] Compiling 1 source file C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\processLogon_jsp.java:153: ';' expected routeURL = "frame.htm" ^ An error occurred at line: 19 in the jsp file: /processLogon.jsp Generated servlet error: C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\processLogon_jsp.java:71: cannot resolve symbol symbol : class logon location: package logonBean logonBean.logon logon = null; ^ An error occurred at line: 19 in the jsp file: /processLogon.jsp Generated servlet error: C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\processLogon_jsp.java:73: cannot resolve symbol symbol : class logon location: package logonBean logon = (logonBean.logon) pageContext.getAttribute("logon", PageContext.SESSION_SCOPE); ^ An error occurred at line: 19 in the jsp file: /processLogon.jsp Generated servlet error: C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\processLogon_jsp.java:76: cannot resolve symbol symbol : class logon location: package logonBean logon = (logonBean.logon) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "logonBean.logon"); ^ What does it means?? I just couldnt get this example to works, please help.....