dcsimg
Eclipse - java class - jsp - jboss
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sajith_pp
Posted On:   Friday, September 8, 2006 02:21 PM

My directory structure in Eclipse emp/ some jsp files using Employee.class and MyConnection.class emp/WEB-INF/web.xml emp/WEB-INF/classes/apps/Employee.java emp/WEB-INF/classes/apps/MyConnection.java ----------- Employee.java ------------------ package apps; import java.sql.*; public class Employee { private String EmployeeID; private String FirstName; private String MiddleName; private String LastName; ............. --------- One jsp file in emp folder ------------------ <%@ page language="java" import="   More>>

My directory structure in Eclipse


emp/ some jsp files using Employee.class and MyConnection.class

emp/WEB-INF/web.xml

emp/WEB-INF/classes/apps/Employee.java

emp/WEB-INF/classes/apps/MyConnection.java


----------- Employee.java ------------------

package apps;

import java.sql.*;


public class Employee

{

private String EmployeeID;

private String FirstName;

private String MiddleName;

private String LastName;



.............


--------- One jsp file in emp folder ------------------



<%@ page language="java" import="apps.MyConnection" %>

<%@ page language="java" import="apps.Employee" %>

<%@ page language="java" import="java.sql.*" %>

<%!

//Initilising

MyConnection Db = new MyConnection();

Connection Con;

Employee Emp = new Employee();


%>


----------------------------------------------------------
in eclipse iam getting this error


The declared package does not match the expected package WEB-INF.classes.apps



Please help me to use this class in jsp file and how to deply this to JBOSS

   <<Less

Re: Eclipse - java class - jsp - jboss

Posted By:   Anonymous  
Posted On:   Friday, September 8, 2006 03:34 PM

you should have a source directory containing your java classes. Then you could set the build directory for them to WEB-INF/classes.



But without setting a source directory eclipse sees WEB-INF/classes/apps as the package.



You should take a look at the Web Tools Platform, it may help you with issues like this.
About | Sitemap | Contact