Geeks Talk

Prepare for your Next Interview




related to servlet

This is a discussion on related to servlet within the Java forums, part of the Software Development category; hi friends i m harpreet as softwate develper.....my problem is related to servelt.....i m try ing to import own class in servlet but i m unable to use ...


Go Back   Geeks Talk > Software Development > Java

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-13-2008
Junior Member
 
Join Date: Oct 2008
Location: amritsar
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
harpreet_your is on a distinguished road
related to servlet

hi friends i m harpreet as softwate develper.....my problem is related to servelt.....i m try ing to import own class in servlet but i m unable to use own class in servlet......but i do.....so plz help i m sending my code as simple...............

abc.java
------------
package dir;
class abc
{
void abc()
{

}
public void dis()
{

}

}
javaser.java
--------------
import dir.abc;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class javaser extends HttpServlet
{
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
PrintWriter out = response.getWriter();
dir.abc ob=new dir.abc();
ob.dis();
out.println("<html>");
out.println("<body>");
out.println("<h1>Servlet test</h1>");
out.println("</body>");
out.println("</html>");
}


}
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-16-2008
Contributing Member
 
Join Date: Sep 2006
Location: India
Posts: 32
Thanks: 1
Thanked 10 Times in 9 Posts
SahilKabra is on a distinguished road
Re: related to servlet

Your class should be public.

Sahil.
Reply With Quote
Reply

  Geeks Talk > Software Development > Java


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Servlet context and Servlet config narenderreddy Java 4 06-26-2008 08:54 AM
related to PO kanti Oracle Apps 3 03-10-2008 09:10 AM
QTP related rvasantha QTP 3 08-21-2007 06:47 AM
c++ related. kamanianil PeopleSoft 1 07-31-2007 06:30 AM
Java related annaannam Java 1 05-25-2007 06:19 AM


All times are GMT -4. The time now is 01:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved