Cannot compile class in WEB-INF/classes

2005-03-10 Thread Rahul Joshi
I have a Simple JSP page in my webapps/myappname. I
have a utility class which this page will use. The
class file for this should be in
webapps/myappname/WEB-INF/classes. So I put the java
source file in that directory
(webapps/myappname/WEB-INF/classes). Also, a method in
this utility class has HttpServletRequest request as
an argument. This will be passed when this method is
called from the scriplet java code from the JSP page. 

The Problem is that the utility java file does not
compile and gives error- Cannot recognize
HttpServletRequest. Shouldn't servlet-api.jar be
automatically visible?

I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5.
I can avoid the issue by not passing the request
object but still is there a way to pass the request
object?

Thanks!
Rahul.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile class in WEB-INF/classes

2005-03-10 Thread Anderson, M. Paul
Did you import javax.servlet.http.* ?

-Original Message-
From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:19 PM
To: tomcat-user@jakarta.apache.org
Subject: Cannot compile class in WEB-INF/classes


I have a Simple JSP page in my webapps/myappname. I
have a utility class which this page will use. The
class file for this should be in webapps/myappname/WEB-INF/classes. So I
put the java source file in that directory
(webapps/myappname/WEB-INF/classes). Also, a method in this utility
class has HttpServletRequest request as an argument. This will be passed
when this method is called from the scriplet java code from the JSP
page. 

The Problem is that the utility java file does not
compile and gives error- Cannot recognize
HttpServletRequest. Shouldn't servlet-api.jar be
automatically visible?

I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5.
I can avoid the issue by not passing the request
object but still is there a way to pass the request
object?

Thanks!
Rahul.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile class in WEB-INF/classes

2005-03-10 Thread Rahul Joshi
Yes, I did.

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;


API signature:  String expand(HttpServletRequest
request)

-Rahul.

--- Anderson, M. Paul [EMAIL PROTECTED]
wrote:
 Did you import javax.servlet.http.* ?
 
 -Original Message-
 From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 10, 2005 1:19 PM
 To: tomcat-user@jakarta.apache.org
 Subject: Cannot compile class in WEB-INF/classes
 
 
 I have a Simple JSP page in my webapps/myappname. I
 have a utility class which this page will use. The
 class file for this should be in
 webapps/myappname/WEB-INF/classes. So I
 put the java source file in that directory
 (webapps/myappname/WEB-INF/classes). Also, a method
 in this utility
 class has HttpServletRequest request as an argument.
 This will be passed
 when this method is called from the scriplet java
 code from the JSP
 page. 
 
 The Problem is that the utility java file does not
 compile and gives error- Cannot recognize
 HttpServletRequest. Shouldn't servlet-api.jar be
 automatically visible?
 
 I am using latest Tomcat 5.5.8 and latest JDK/JRE
 1.5.
 I can avoid the issue by not passing the request
 object but still is there a way to pass the request
 object?
 
 Thanks!
 Rahul.
 
 
   
 __ 
 Do you Yahoo!? 
 Yahoo! Small Business - Try our new resources site!
 http://smallbusiness.yahoo.com/resources/ 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile class in WEB-INF/classes

2005-03-10 Thread Anderson, M. Paul
Have you compiled the class previously?  The source for the class does
not go in the WEB-INF/classes directory - only the class files go
here.  You also need to pre-compile your classes - Tomcat doesn't do
this for you.

-Original Message-
From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:26 PM
To: Tomcat Users List
Subject: RE: Cannot compile class in WEB-INF/classes


Yes, I did.

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;


API signature:  String expand(HttpServletRequest
request)

-Rahul.

--- Anderson, M. Paul [EMAIL PROTECTED]
wrote:
 Did you import javax.servlet.http.* ?
 
 -Original Message-
 From: Rahul Joshi [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 10, 2005 1:19 PM
 To: tomcat-user@jakarta.apache.org
 Subject: Cannot compile class in WEB-INF/classes
 
 
 I have a Simple JSP page in my webapps/myappname. I
 have a utility class which this page will use. The
 class file for this should be in webapps/myappname/WEB-INF/classes. So

 I put the java source file in that directory
 (webapps/myappname/WEB-INF/classes). Also, a method
 in this utility
 class has HttpServletRequest request as an argument.
 This will be passed
 when this method is called from the scriplet java
 code from the JSP
 page. 
 
 The Problem is that the utility java file does not
 compile and gives error- Cannot recognize
 HttpServletRequest. Shouldn't servlet-api.jar be automatically 
 visible?
 
 I am using latest Tomcat 5.5.8 and latest JDK/JRE
 1.5.
 I can avoid the issue by not passing the request
 object but still is there a way to pass the request
 object?
 
 Thanks!
 Rahul.
 
 
   
 __
 Do you Yahoo!? 
 Yahoo! Small Business - Try our new resources site!
 http://smallbusiness.yahoo.com/resources/ 
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile class in WEB-INF/classes

2005-03-10 Thread Rahul Joshi
I did not try compiling it at an external location. I
thought I would compile it in classes and then delete
the source java file later. 

I will try your suggestion of compiling it outside of
tomcat and then copying the class in the classes
directory. But does it mean that a java file cannot be
compiled in WEB-INF/classes if it is accessing
Tomcat's own servlet-api.jar?

Thanks,
Rahul.

--- Anderson, M. Paul [EMAIL PROTECTED]
wrote:
 Have you compiled the class previously?  The source
 for the class does
 not go in the WEB-INF/classes directory - only the
 class files go
 here.  You also need to pre-compile your classes -
 Tomcat doesn't do
 this for you.
 
 -Original Message-
 From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 10, 2005 1:26 PM
 To: Tomcat Users List
 Subject: RE: Cannot compile class in WEB-INF/classes
 
 
 Yes, I did.
 
 import java.io.*;
 import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
 
 API signature:String expand(HttpServletRequest
 request)
 
 -Rahul.
 
 --- Anderson, M. Paul [EMAIL PROTECTED]
 wrote:
  Did you import javax.servlet.http.* ?
  
  -Original Message-
  From: Rahul Joshi [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 10, 2005 1:19 PM
  To: tomcat-user@jakarta.apache.org
  Subject: Cannot compile class in WEB-INF/classes
  
  
  I have a Simple JSP page in my webapps/myappname.
 I
  have a utility class which this page will use. The
  class file for this should be in
 webapps/myappname/WEB-INF/classes. So
 
  I put the java source file in that directory
  (webapps/myappname/WEB-INF/classes). Also, a
 method
  in this utility
  class has HttpServletRequest request as an
 argument.
  This will be passed
  when this method is called from the scriplet java
  code from the JSP
  page. 
  
  The Problem is that the utility java file does not
  compile and gives error- Cannot recognize
  HttpServletRequest. Shouldn't servlet-api.jar be
 automatically 
  visible?
  
  I am using latest Tomcat 5.5.8 and latest JDK/JRE
  1.5.
  I can avoid the issue by not passing the request
  object but still is there a way to pass the
 request
  object?
  
  Thanks!
  Rahul.
  
  
  
  __
  Do you Yahoo!? 
  Yahoo! Small Business - Try our new resources
 site!
  http://smallbusiness.yahoo.com/resources/ 
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 
 
   
 __ 
 Do you Yahoo!? 
 Yahoo! Small Business - Try our new resources site!
 http://smallbusiness.yahoo.com/resources/ 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]