servlet and jsp

i want to display information inside of a jsp page instead of a servlet using the scriptlet tag...

my servlet is as follows:

import java.rmi.*;

import javax.servlet.*;

import javax.servlet.http.*;

import java.io.*;

public class JobServlet extends HttpServlet

{

public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException

{

PrintWriter out = res.getWriter();

res.setContentType("text/plain");

try

{

int jobno = Integer.parseInt(req.getParameter("jobno"));

JobInt e=(JobInt)Naming.lookup("rmi://localhost/job");

out.println("Details for job number "+jobno);

out.println("Registration Date: "+e.getdate(jobno));

out.println("Registration no of vehicle: "+e.getregno(jobno));

}

catch (Exception e1)

{

out.println(""+e1);

}

}

i have transferred it to a jsp like:

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>

<%@ page import="java.rmi.*" %>

<%@ page import="java.util.*, java.lang.*, java.io.*" %>

<html>

<head>

<title>Untitled Document</title>

</head>

<body>

<%

try {

int jobno = Integer.parseInt(request.getParameter("jobno"));

JobInt e=(JobInt)Naming.lookup("rmi://localhost/job");

out.println("Details for job number "+jobno);

out.println("Registration Date : "+e.getdate(jobno));

out.println("Registration no of vehicle : "+e.getregno(jobno));

} catch (Exception e1) {

out.println(""+e1);

}

%>

</body>

</html>

i get the error

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 13 in the jsp file: /jobdetails.jsp

Generated servlet error:

JobInt cannot be resolved to a type

what did i do wrong? do i need another import statement for my rmi interface?

thank you

[2105 byte] By [victoriousa] at [2007-11-26 19:57:34]
# 1
What's JobInt ?Is there a class you declared ?Regards,Sebastien Degardin
sdegardina at 2007-7-9 22:52:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
JobInt is my rmi interface
victoriousa at 2007-7-9 22:52:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
You have to import this java class to your JSP page.Design note : Such Business/Application logic into JSP is not recommanded.Regards,Sebastien Degardin
sdegardina at 2007-7-9 22:52:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

i tried

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

exception:

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:

The import JobInt cannot be resolved

An error occurred at line: 15 in the jsp file: /jobdetails.jsp

Generated servlet error:

JobInt cannot be resolved to a type

An error occurred at line: 15 in the jsp file: /jobdetails.jsp

Generated servlet error:

JobInt cannot be resolved to a type

victoriousa at 2007-7-9 22:52:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
what's the fully qualified name of this class ? You have to import using the fully qualified name.Regards,Sebastien Degardin
sdegardina at 2007-7-9 22:52:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Please Avoid cross posting... http://forum.java.sun.com/thread.jspa?threadID=5142257&messageID=9525128#9525128
RahulSharnaa at 2007-7-9 22:52:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...