dcsimg
<% page import ... %>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   garfield_11
Posted On:   Thursday, September 5, 2002 02:56 AM

Hi all, I'm new in JSP and totally no idea how it works. So far I was able to load the driver and get a connection to the database already. That's great! Now the problem is I have created a package called "myappli" and placed it in C: omcatwebappsROOT. In it I created another folder called "classes" where all my .java/class files are stored. Under JPadPro menu, I set the standard classpaths as: \WESTPOINTMicrosoft_SQL_Server_2000_Driver_for_JDBClibmsbase.jar \WESTPOINTMicrosoft_SQL_Server_2000_Driver_for_JDBClibmssqlserver.jar \WESTPOINTMicrosoft_SQL_Server_2000_Driver_for_JDBClibmsutil.jar \WESTPOINT omcatlibservlet.jar So far I created Employee.java/class n Employee.   More>>

Hi all,


I'm new in JSP and totally no idea how it works. So far I was able to load the driver and get a connection to the database already. That's great!


Now the problem is I have created a package called "myappli" and placed it in C: omcatwebappsROOT. In it I created another folder called "classes" where all my .java/class files are stored. Under JPadPro menu, I set the standard classpaths as:
\WESTPOINTMicrosoft_SQL_Server_2000_Driver_for_JDBClibmsbase.jar
\WESTPOINTMicrosoft_SQL_Server_2000_Driver_for_JDBClibmssqlserver.jar
\WESTPOINTMicrosoft_SQL_Server_2000_Driver_for_JDBClibmsutil.jar

\WESTPOINT omcatlibservlet.jar

So far I created Employee.java/class n Employee.jsp and import as like <%@ page import = "myappli.Employee" %> and view it in http://localhost:8080/myappli/Employee.jsp but i encountered error -

org.apache.jasper.JasperException: Unable to compile class for JSPC: omcatworklocalhost_8080\_0002fmyappli_0002fEmployee_0002ejspEmployee_jsp_0.java:15: Class myappli.Employee not found in import. import myappli.Employee; ^ 1 error at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Unknown Source)

Can anyone please advise? Thanks!

Love_Garfield

   <<Less

Re: &lt;% page import ... %&gt;

Posted By:   AlessandroA_Garbagnati  
Posted On:   Thursday, September 5, 2002 03:38 AM

Hi,

per specifications, the classes used by a web application have to be located under WEB-INF/classes, while all the jars have to be located under WEB-INF/lib.
About | Sitemap | Contact