Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Classes not Visible ?

Status
Not open for further replies.

letsGo123

Programmer
Jun 8, 2004
10
0
0
US
having problems w/my remote host recognizing my classes. i've put the classes in web-inf/classes and set the web/xml to:
Code:
   <servlet>
       <servlet-name>ServletName</servlet-name>
       <servlet-class>ServletName</servlet-class>
   </servlet>
   <servlet-mapping>
       <servlet-name>ServletName</servlet-name>
       <url-pattern>/ServletName</url-pattern>
   </servlet-mapping>

i get 500 error:
Code:
/filename_jsp.java:10: '.' expected import ServletName;

any suggestions would be great.

thanks.


 
You should add a package name to your classes :

Code:
package packageName;

public class ClassName {

}

And then add the compiled classes to this directory :

WEB-INF/classes/packageName

Then in your JSP,

<%@ page import="packageName.*" %>

or in a class :

import packageName.*;



Click here to learn Ways to help with Tsunami Relief
--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top