classpath « API « JSP-Servlet Q&A

1. classpath problem

I'm trying to compile the Servlet class in Tomcat's webappps/Email/src/Mail folder, but I'm getting compile time errors:

./Email/src/Mail/ package javax.mail does not exist 

import javax.servlet.http.*;

./Email/src/Mail/ javax.servlet does not exist
import javax.servlet.*;

./Email/src/Mail/ find ...

2. How to load a properties file put in the classpath from a JSP?

I have a properties file which I have put in the classpath and I am trying to load it from a JSP:

InputStream stream = application.getResourceAsStream("/"); 
Properties props = new Properties(); 
props.load(stream); ...

3. Obtaining the Web application classpath from within a servlet

The reason to do that is because I want to use Runtime.exec() using the same classpath as my servlet. The class I want to run is within WEB-INF/classes/my/package/. So I want to build ...

4. java won't compile with RequestDispatcher, classpath set correctly

I'm using ubuntu and I've been trying to compile based on my research and my previous posting regarding to compilation issue. This time I suspect CLASSPATH but cannot figure out what ...

5. What Classpath should be given for the libservlets that I have installed through Synaptic Manager?

I have installed libservlets through Synaptic manager to help me code servlets using Tomcat6 server . I am not using any IDE and doing everything from command-line and Gedit as an ...

6. Problem resolving javax.servlet

Eclipse can't resolve javax.servlet. I use Apache Tomcat. My CLASSPATH variable looks as following:

As far as I know javax.servlet is in the file servlet-api.jar which is there. Do I need to ...

7. I am getting an error "javax.servlet package not found" when i m trying to compile the following java code

I am getting an error javax.servlet.* package not found while trying to compile the following source code :

import javax.servlet.*;
import javax.servlet.http.*;

public class servlet1 extends HttpServer
public void doPOST(HttpServletRequest req , HttpServletResponse res) ...

8. Batik not in classpath

I'm writing an extension of the included in Apache FOP.
My platform is Linux CentOS 5.7-64bit, with Tomcat 5.5.
The servlet 'works', but I'm unable to process SVG files. The error I ...

9. Java servlet will not compile - cannot find javax.servlet

Im having big problems compiling java servlets. As far as i can see, ive done everything i need to do, ive installed tomcat 7 correctly, and tomcat is working. As i ...

10. Changing ClassPath

How can I append to/change my ClassPath? I can't get any of my beans to work with Tomcat 4. I've copied them into every tomcat directory... just to expirement- though I knew it wouldn't help. I thought that I just had to place them in either the WEB-INF/classes or /classes directory. I think that the problem is that when I start ...

11. JSPs and -classpath

12. how to specify classpath in jsp ?

do i include this in or ? could u please tell me the position and the exact line of code i need to enter .. say the file i need to access is here tomcat/webapps/ROOT/myusers/ I cannot put this class in WEB-INF/classes ... so i need to set the classpath to refer to this one

13. iWS ldap classpath

14. locating classpath in jsp...

15. Setting classpath help ???

16. set classpath for JSP files

21. JavaServlet-CLASSPATH problem

22. package,classpath and servlet

I am trying to call a class (RecordObj) that in turn calls another class (DBConnector) from my getPost() method in my servlet. I placed the two subordinate classes in a package in the directory holding my servlet class. This is my directory structure (Windows NT): jswdk-1.0.1\examples\WEB-INF\servlets\Record My servlet is in servlets\. The compiler will not compile my servlet because it cannot ...

25. Problem in the compilation of the servlet using the classpath in the command line

I was having some problems with some of the examples in HFS&J. I am able to compile but not able to see if after deploying it. I guess the compilation problem will go away if you set classpath. Before you compile it set classpath >set CLASSPATH=C:/path.../Tomcat/common/lib/servlet-api.jar Then compile it without the classpath parameter. Let me know if it helps.

27. Enumerating over classpath images in a servlet

Hi I've got a problem where I need to create an image browser for all the icons in our webapp. All the image icons I can put into the classpath but I need to enumerate over them so that I can return all the URLs to the front end so it'll display all images/locations for that directory. I'm able to get ...

29. Classpath issue with HF Servlets & JSP

30. Still cant complile servlet after setting classpath

after system restart: C:\>echo %CLASSPATH% .;C:\Program Files\Java\jre1.5.0_06\lib\ext\;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar; C:\> so now i know that the classpath is set correcly... i also re-check the PATH to make sure it doesnt say %JAVA_HOME% , rather the actual path where the java is installed. then i tried to compile the servlet again C:\beerV1>javac -classpath "C:\Program Files\Apache Software ...


32. setting classpath for servlet-api.jar

33. how to set Classpath to run Servlets

36. dll insidethe classpath

37. Classpath Issue

Hi Guys I have to test 2 projects against each other. An old project and a new project. I have to call each webservice and compare results. So i created a third project. I added the old and new projects to the class path of the compare project Only issue is that they both share and identically named package/class but have ...

38. Problems setting the CLASSPATH for my servlets

Good Afternoon; I am a newbie trying to figure out how to simply get my first servlet to run. The servlet is name "HelloServlet." The first initial test that I am running is a "Servlet That Does Not Use Packages." When I compile the file for the command prompt and use the URL localhost:1979/servlet/HelloServlet, I get an error message of stating ...

41. Servlet CLASSPATH for Apache

42. setting classpath for java in ubuntu

43. help me to set classpath

44. classpath set BUT still javax.servlet package not found when compiling

Then you haven't set the actual classpath that the compiler is using. Just because you say you have set the 'classpath' doesn't mean you've properly told the compiler that. Such as, what did you do, set the CLASSPATH environment variable? Don't do that - ever. If that's what you did, and you're using an IDE, the IDE project is ignoring that ...

45. jsp, java, classpath, help :)

public class Test { public static String printTest() { return "endelig virker det"; } } 1 JSP file like this: @page import="tried many things here <% out.println("test"); out.println(Test.printTest()); %> it seems I cant find out where I should place the files, how I should orgenize the folder etc, have tried many diffrent options. after reading ...

46. jsp, java, classpath, help :)

47. How to Set Classpath in servlet