RE: newbie Servlet

2001-09-25 Thread Martin van den Bemt

You have to use compiled classes.

Mvgr,
Martin

> -Original Message-
> From: Isak Rickyanto [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 23, 2001 3:21 PM
> To: Tomcat User Group
> Subject: newbie Servlet
> 
> 
> Sorry it is newbie..
> 
> I have myservlet.java
> and i place in
> tomcat/webapps/myapp/web-inf/classes
> and i had modified web.xml in web-inf..
> 
> I only want to ask... Is Tomcat not automatically compile it? or I must
> compile the servlet first?
> 
> 
> 



Re: newbie Servlet

2001-09-25 Thread Dmitri Colebatch

yes you do have to compile your servlets.  jsps are the only thing that
tomcat will compile for you.  

cheers
dim

On Sun, 23 Sep 2001, Isak Rickyanto wrote:

> Sorry it is newbie..
> 
> I have myservlet.java
> and i place in
> tomcat/webapps/myapp/web-inf/classes
> and i had modified web.xml in web-inf..
> 
> I only want to ask... Is Tomcat not automatically compile it? or I must
> compile the servlet first?
> 
> 
> 




Re: newbie servlet deploy question

2001-03-01 Thread Jan Labanowski

You may want to read about servlet URLs ramapping in my
   http://www.ccl.net/cca/software/UNIX/apache/tomcatfaq.shtml
Howver, I am not sure it will gonna work...
You can have it remapped to http://localhost:8080/demo/demo
but what you want is to have null path in the context to correspond
to your servlet... You probably still do not know what you want {:-)}.
But it will come with a sacrifice of reading stuff on Tomcat, the 
Servlet 2.1 spec and JSP 1.1 spec on the JavaSun. It is all in there...

 
   DemoServletto
   org.demo.DemoServlet
 
 
 
   DemoServletto
   demo
 

You may want to add

 
   DemoServletto
   /
 

and see if this will work for  
   http://localhost:8080/demo
But again... You only think you want it... But in fact you do not want it.

On Thu, 1 Mar 2001, Jason Novotny wrote:

> 
> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
> 
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
> 
> I have the following in server.xml and web.xml respectively:
> 
>   docBase="webapps/demo"
>  crossContext="true"
>  debug="0"
>  reloadable="true"
>  trusted="false" >
> 
> 
> BTW, should I comment out or use the following in some way?
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
> 
> 
> My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> 
> 
>   demo
>   org.demo.DemoServlet
> 
> 
> 
>   demo
>   /demo
> 
> 
> So I would like to be able to use   and have the
> servlet invoked.
> 
> 
> Thanks very much, Jason
> 
> 
> 
> 
> --
> Jason Novotny   [EMAIL PROTECTED]
> Home: (510) 704-9917Work: (510) 486-8662
> NERSC Distributed Computing http://www-didc.lbl.gov
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

Jan K. Labanowski|phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 
1224 Kinnear Rd, |http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163  |http://www.osc.edu/


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




Re: newbie servlet deploy question

2001-03-01 Thread Jason Novotny


Thanks, Jan

I actually read your great document plus all the docs in Tomcat- actually
I'm trying to design a web app very much like the one in chapter 9 of the
kolb and fields book.

The idea is to have a central controller servlet- DemoServlet that gets
invoked initially by the user. I was hoping to use localhost:8080/demo, but
as you say, it doesn't seem setup for this. (although in the chapter they
claim on page 275 to have mapped FaqAdminServlet to /faqtool- later they use
 to reinvoke the controller servlet)- which is
very much what I want to do-

In your opinion is it easier in the long run to map onto /demo/demo?

Ultimately, I want to be able to invoke the servlet and refer to html,jsp
without caring where the web app was deployed or site specific settings of
server.xml.

Thanks, Jason


Jan Labanowski wrote:

> You may want to read about servlet URLs ramapping in my
>http://www.ccl.net/cca/software/UNIX/apache/tomcatfaq.shtml
> Howver, I am not sure it will gonna work...
> You can have it remapped to http://localhost:8080/demo/demo
> but what you want is to have null path in the context to correspond
> to your servlet... You probably still do not know what you want {:-)}.
> But it will come with a sacrifice of reading stuff on Tomcat, the
> Servlet 2.1 spec and JSP 1.1 spec on the JavaSun. It is all in there...
>
>  
>DemoServletto
>org.demo.DemoServlet
>  
>
>  
>DemoServletto
>demo
>  
>
> You may want to add
>
>  
>DemoServletto
>/
>  
>
> and see if this will work for
>http://localhost:8080/demo
> But again... You only think you want it... But in fact you do not want it.
>
> On Thu, 1 Mar 2001, Jason Novotny wrote:
>
> >
> > I would like to be able to access a servlet with the URL
> > http://localhost:8080/demo
> >
> > However, it only works if I go to
> > http://localhost:8080/demo/servlet/demo
> >
> > I have the following in server.xml and web.xml respectively:
> >
> >  >  docBase="webapps/demo"
> >  crossContext="true"
> >  debug="0"
> >  reloadable="true"
> >  trusted="false" >
> > 
> >
> > BTW, should I comment out or use the following in some way?
> >  > className="org.apache.tomcat.request.InvokerInterceptor"
> > debug="0" prefix="/servlet/" />
> >
> >
> > My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> >
> > 
> >   demo
> >   org.demo.DemoServlet
> > 
> >
> > 
> >   demo
> >   /demo
> > 
> >
> > So I would like to be able to use   and have the
> > servlet invoked.
> >
> >
> > Thanks very much, Jason
> >
> >
> >
> >
> > --
> > Jason Novotny   [EMAIL PROTECTED]
> > Home: (510) 704-9917Work: (510) 486-8662
> > NERSC Distributed Computing http://www-didc.lbl.gov
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
> Jan K. Labanowski|phone: 614-292-9279,  FAX: 614-292-7168
> Ohio Supercomputer Center|Internet: [EMAIL PROTECTED]
> 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html
> Columbus, OH 43212-1163  |   http://www.osc.edu/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

--
Jason Novotny   [EMAIL PROTECTED]
Home: (510) 704-9917Work: (510) 486-8662
NERSC Distributed Computing http://www-didc.lbl.gov




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




Re: newbie servlet deploy question

2001-03-01 Thread Milt Epstein

On Thu, 1 Mar 2001, Jason Novotny wrote:

> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
> 
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
[ ... ]

How timely!  I just joined the list yesterday, and this is exactly one
of the questions I was going to ask, since I'm trying to do the same
thing.  I have managed to get close to what I want, but not quite.

I tried some similar things as you with a context in the server.xml
and with servlet names and mappings in web.xml without luck.

However, I did find this question in the FAQ-o-matic at jakarta.apache.org:

http://jakarta.apache.org:8080/jyve-faq/Turbine/screen/DisplayQuestionAnswer/action/SetAll/project_id/2/faq_id/12/topic_id/43/question_id/532

It's a bit cryptic, but it suggests two ways of doing this: One, have
an index page (jsp or html) that does a redirect to the servlet, or
two, use Apache's mod_rewrite.

Now, I tried the first of these, using both a META Refresh in an
index.html file and a RequestDispatcher forward() in an index.jsp
file, and it basically worked either way.  That is, it got it to the
right place from just a "http://localhost/demo" URL.  The problem is
that it changed the Location to "http://localhost/demo/servlet/demo",
which I'd like to avoid.

Now, I'm not familiar with mod_rewrite (and I don't currently have it
installed), so I don't know if it provides a cleaner way to do this
and/or avoids the above problem.  Maybe you or someone else here knows
the answer to that.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




Re: newbie servlet deploy question

2001-03-01 Thread Milt Epstein

On Thu, 1 Mar 2001, Jan Labanowski wrote:

> You may want to read about servlet URLs ramapping in my
>http://www.ccl.net/cca/software/UNIX/apache/tomcatfaq.shtml
> Howver, I am not sure it will gonna work...
> You can have it remapped to http://localhost:8080/demo/demo
> but what you want is to have null path in the context to correspond
> to your servlet... You probably still do not know what you want {:-)}.
> But it will come with a sacrifice of reading stuff on Tomcat, the 
> Servlet 2.1 spec and JSP 1.1 spec on the JavaSun. It is all in there...
> 
[ ... ]
> 
> and see if this will work for  
>http://localhost:8080/demo
> But again... You only think you want it... But in fact you do not want it.

OK, stop being coy, tell us why he doesn't want it :-).  (Because I
want it too ... at least, I think I do :-).


> On Thu, 1 Mar 2001, Jason Novotny wrote:
> 
> > 
> > I would like to be able to access a servlet with the URL
> > http://localhost:8080/demo
> > 
> > However, it only works if I go to
> > http://localhost:8080/demo/servlet/demo
> > 
> > I have the following in server.xml and web.xml respectively:
> > 
> >  >  docBase="webapps/demo"
> >  crossContext="true"
> >  debug="0"
> >  reloadable="true"
> >  trusted="false" >
> > 
> > 
> > BTW, should I comment out or use the following in some way?
> >  > className="org.apache.tomcat.request.InvokerInterceptor"
> > debug="0" prefix="/servlet/" />
> > 
> > 
> > My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> > 
> > 
> >   demo
> >   org.demo.DemoServlet
> > 
> > 
> > 
> >   demo
> >   /demo
> > 
> > 
> > So I would like to be able to use   and have the
> > servlet invoked.
> 

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




Re: newbie servlet deploy question

2001-03-01 Thread David Crooke

mod_rewrite is your friend - it's a steep learning curve but worth it

Milt Epstein wrote:

> On Thu, 1 Mar 2001, Jason Novotny wrote:
>
> > I would like to be able to access a servlet with the URL
> > http://localhost:8080/demo
> >
> > However, it only works if I go to
> > http://localhost:8080/demo/servlet/demo
> [ ... ]
>
> How timely!  I just joined the list yesterday, and this is exactly one
> of the questions I was going to ask, since I'm trying to do the same
> thing.  I have managed to get close to what I want, but not quite.


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




Re: newbie servlet deploy question

2001-03-01 Thread Jan Labanowski

OK, I found few minutes before my head hit the keyboard...
I am not coy, I am overworked... And lengthy explanations take time to type...

On Thu, 1 Mar 2001, Milt Epstein wrote:

> On Thu, 1 Mar 2001, Jan Labanowski wrote:
> 
> > You may want to read about servlet URLs ramapping in my
> >http://www.ccl.net/cca/software/UNIX/apache/tomcatfaq.shtml
> > Howver, I am not sure it will gonna work...
> > You can have it remapped to http://localhost:8080/demo/demo
> > but what you want is to have null path in the context to correspond
> > to your servlet... You probably still do not know what you want {:-)}.
> > But it will come with a sacrifice of reading stuff on Tomcat, the 
> > Servlet 2.1 spec and JSP 1.1 spec on the JavaSun. It is all in there...
> > 
> [ ... ]
> > 
> > and see if this will work for  
> >http://localhost:8080/demo
> > But again... You only think you want it... But in fact you do not want it.
> 
> OK, stop being coy, tell us why he doesn't want it :-).  (Because I
> want it too ... at least, I think I do :-).

Because if you assign a null path to your chosen servlet you will not be
able to serve anything else from this context from Tomcat.
I did not actually try it, but I assume that if you do
 
someServlet
/
  
i.e., when you map a servlet to / then each and every URL mapped to this
context and served by Tomcat will result in serving the someServlet.
Out goes packages, hierachy, JSPs and subdirs...
Of course, it has its uses (e.g., with MVC paradigm, when each URL goes
to a servlet, and then servlets forwards it to other stuff using forward call
within the container), but I suspect this was not a goal here, was it?
That is why I said what I said...

So the way to do it is to use mod_rewrite. In your httpd.conf you would put
something like:


RewriteEngine On
RewriteRule ^/demo$ /demo/servlet/someServlet [R]
RewriteRule ^/demo/$ /demo/servlet/someServlet [R]


And this will rewrite the URL 
http://whatever.com/demo
http://whatever.com/demo/
to
http://whatever.com/demo/servlet/someServlet

while it leaves other stuff alone... This way you do not remap all your
context to a single servlet, but you just remap the single URL.

Jan
[EMAIL PROTECTED]

> 
> 
> > On Thu, 1 Mar 2001, Jason Novotny wrote:
> > 
> > > 
> > > I would like to be able to access a servlet with the URL
> > > http://localhost:8080/demo
> > > 
> > > However, it only works if I go to
> > > http://localhost:8080/demo/servlet/demo
> > > 
> > > I have the following in server.xml and web.xml respectively:
> > > 
> > >  > >  docBase="webapps/demo"
> > >  crossContext="true"
> > >  debug="0"
> > >  reloadable="true"
> > >  trusted="false" >
> > > 
> > > 
> > > BTW, should I comment out or use the following in some way?
> > >  > > className="org.apache.tomcat.request.InvokerInterceptor"
> > > debug="0" prefix="/servlet/" />
> > > 
> > > 
> > > My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> > > 
> > > 
> > >   demo
> > >   org.demo.DemoServlet
> > > 
> > > 
> > > 
> > >   demo
> > >   /demo
> > > 
> > > 
> > > So I would like to be able to use   and have the
> > > servlet invoked.
> > 
> 
> Milt Epstein
> Research Programmer
> Software/Systems Development Group
> Computing and Communications Services Office (CCSO)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

Jan K. Labanowski|phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 
1224 Kinnear Rd, |http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163  |http://www.osc.edu/


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




Re: newbie servlet deploy question

2001-03-02 Thread Bo Xu

Jason Novotny wrote:

> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
>
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
>
> I have the following in server.xml and web.xml respectively:
>
>   docBase="webapps/demo"
>  crossContext="true"
>  debug="0"
>  reloadable="true"
>  trusted="false" >
> 
>
> BTW, should I comment out or use the following in some way?
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
>
> My web.xml in webapps/demo/WEB_INF/web.xml has the following:
>
> 
>   demo
>   org.demo.DemoServlet
> 
>
> 
>   demo
>   /demo
> 
>
> So I would like to be able to use   and have the
> servlet invoked.
>
> Thanks very much, Jason
>
> --
> Jason Novotny   [EMAIL PROTECTED]
> Home: (510) 704-9917Work: (510) 486-8662
> NERSC Distributed Computing http://www-didc.lbl.gov
> [...]

Hi :-)  with jakarta-tomcat-4.0-b1(standalone, JDK1.3, winnt40),
I find:

*  in webapps/myapp/WEB_INF/web.xml:
-  if I define the following servlet definitions:
   sn_0
   sn_1
   ...
  sn_m

 - and I define the following servlet-mapping:
   
  sn_0
  /up_0
   
   
  sn_1
  /up_1
   
   ...
   
  sn_m
  /up_m
   
   i.e., I map sn_j to up_j  (0<=j<=m)

*  then :
- if  NOONE "from up_0 to up_m" = "/", we can use the
   following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_0
   ...
   http://localhost:8080/myapp/up_m
   i.e., now we have m+1 "named" servlet definitions and
   1 "default(non-named)" servlet definition.

- if ANYONE "from up_0 to up_m" = "/", now I find perhaps
   it is what you need (i suppose up_i="/", 0<=i<=m):
  % we still can use the  following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_x(0<=x<=m, x ! = i)
   http://localhost:8080/myapp/YYY(YYY!=up_x, YYY
   can be anything :-)   )
   i.e., we can use:
   http://localhost:8080/myapp
   http://localhost:8080/myapp/
   http://localhost:8080/myapp/hahahahaha//hahahahaha :-)
   ...
   and thay all invoke that servlet defnition whose name is
   "sn_i" .


Bo
Mar.02, 2001




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




Re: newbie servlet deploy question

2001-03-02 Thread Bo Xu

Jason Novotny wrote:

> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
>
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
>
> I have the following in server.xml and web.xml respectively:
>
>   docBase="webapps/demo"
>  crossContext="true"
>  debug="0"
>  reloadable="true"
>  trusted="false" >
> 
>
> BTW, should I comment out or use the following in some way?
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
>
> My web.xml in webapps/demo/WEB_INF/web.xml has the following:
>
> 
>   demo
>   org.demo.DemoServlet
> 
>
> 
>   demo
>   /demo
> 
>
> So I would like to be able to use   and have the
> servlet invoked.
>
> Thanks very much, Jason
>
> --
> Jason Novotny   [EMAIL PROTECTED]
> Home: (510) 704-9917Work: (510) 486-8662
> NERSC Distributed Computing http://www-didc.lbl.gov
> [...]

Hi :-)  with jakarta-tomcat-4.0-b1(standalone, JDK1.3, winnt40),
I find:

*  in webapps/myapp/WEB_INF/web.xml:
-  if I define the following servlet definitions:
   sn_0
   sn_1
   ...
  sn_m

 - and I define the following servlet-mapping:
   
  sn_0
  /up_0
   
   
  sn_1
  /up_1
   
   ...
   
  sn_m
  /up_m
   
   i.e., I map sn_j to up_j  (0<=j<=m)

*  then :
- if  NOONE "from up_0 to up_m" = "/", we can use the
   following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_0
   ...
   http://localhost:8080/myapp/up_m
   i.e., now we have m+1 "named" servlet definitions and
   1 "default(non-named)" servlet definition.

- if ANYONE "from up_0 to up_m" = "/", now I find perhaps
   it is what you need (i suppose up_i="/", 0<=i<=m):
  % we still can use the  following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_x(0<=x<=m, x ! = i)
   http://localhost:8080/myapp/YYY
   (YYY!=up_x, YYY can be anything :-)   )
   i.e., we can use:
   http://localhost:8080/myapp
   http://localhost:8080/myapp/
   http://localhost:8080/myapp/hahahahaha//hahahahaha :-)
   ...
   and thay ALL invoke the Same servlet defnition whose name
   is "sn_i" .


Bo
Mar.02, 2001







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




Re: newbie servlet deploy question

2001-03-02 Thread Milt Epstein

On Fri, 2 Mar 2001, Bo Xu wrote:

> Jason Novotny wrote:
> 
> > I would like to be able to access a servlet with the URL
> > http://localhost:8080/demo
> >
> > However, it only works if I go to
> > http://localhost:8080/demo/servlet/demo
> >
> > I have the following in server.xml and web.xml respectively:
> >
> >  >  docBase="webapps/demo"
> >  crossContext="true"
> >  debug="0"
> >  reloadable="true"
> >  trusted="false" >
> > 
> >
> > BTW, should I comment out or use the following in some way?
> >  > className="org.apache.tomcat.request.InvokerInterceptor"
> > debug="0" prefix="/servlet/" />
> >
> > My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> >
> > 
> >   demo
> >   org.demo.DemoServlet
> > 
> >
> > 
> >   demo
> >   /demo
> > 
> >
> > So I would like to be able to use   and have the
> > servlet invoked.
> 
> Hi :-)  with jakarta-tomcat-4.0-b1(standalone, JDK1.3, winnt40),
> I find:
[ ... ]

>From something Craig McLanahan wrote in response to someone trying to
do something similar to Jason (and myself), it sounds like this works
in Tomcat 4.0, but not in Tomcat 3.2 (which is what I'm using).
(Question to Jason: Are you using 3.2 or 4.0?)  Personally, I think
I'm stuck with 3.2 for the time being.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




Re: [NEWBIE] Servlet-mapping question

2000-12-21 Thread Dave Smith

Leila,

Out of the box, /examples/ROOT
maps to /. If you put your package into
examples/ROOT/WEB-INF/classes, you
can access it as /servlet/.
Obviously you could change the server.xml
if you wanted to make / map where ever you like.


Dave

- Original Message -
From: "Algarve, Leila" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 21, 2000 7:32 AM
Subject: [NEWBIE] Servlet-mapping question


>   I've already tried to find the answer in many places, including the
> archives but it doesn't work.
>
> I am using Visual Cafe for the Servlet development and I want to be able
to
> debug it. I can configurate the Tomcat and send a post to my servlet with:
> http://localhost/servlet/myServletPackage.myServlet but I need to be able
to
> call it using only http://localhost during the development. Reading in the
> Internet, I deduced that I had to change the web.xml file:
>
>
> 
>   myServlet
>   myServletPackage.myServlet
> 
> -2147483646
> 
> 
> .
> 
>   myServlet
>   /
> 
>
>
> I put  ... after all
>  The servlet is loaded correctly.
>
> I know how to change the port number from 8080 to 80 in the server.xml, so
I
> think that is not the problem. Do I need to create a new context too? I
> tried this:
>
>   docBase="c:\develop\"
>  debug="1"
>  reloadable="true" >
> 
>
> To configure the Tomcat for debugging, I used two suggestions als
reference:
>
>
http://archives.java.sun.com/cgi-bin/wa?A2=ind0011&L=servlet-interest&D=0&P=
> 55344
>
>
http://people.netscape.com/chanezon/tech/java/tomcat/debug_jsp_in_cafe.html
>
> I'm trying now to get everything working with Tomcat3.1.1, I've tried
> Tomcat3.2.1 but I gave up after reading that it does't load the web.xml
> default file (I tested this making a sintax mistake and Tomcat didn't
> complain about it). I don't want to create an Web Aplication because I am
> still developing the servlet. Tomcat is running Stand-alone without any
> other server. I'm using WinNT.
>
> Tank you ver much for your time
>
> Leila
>




RE: newbie: servlet examples work, jsp not

2003-10-19 Thread Johan Kok
JAVA_HOME or Java_Home --- I'm not usre if it makes a difference on the
Windows environment, but under Unix it definitely does.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 19 October 2003 12:36
> To: [EMAIL PROTECTED]
> Subject: newbie: servlet examples work, jsp not
>
>
> hello,
>
> i am working in windows xp. i have the jsdk 1.4.1 installed.
> i also installed
> apache2 and tomcat 4.1 as described in the HowTo:
> http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
>
> after installation, i wanted to try the examples at
> http://localhost/examples.
> the servlet examples work, but the jsp examples not. i get
> the following
> error:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
> [javac] Compiling 1 source file
>
> and in the logs i have:
>
> Unable to find a javac compiler;
> com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK
>
> But my Java_Home does point to c:\j2sdk1.4.1
> and my classpath does point to c:\j2sdk1.4.1\lib\tools.jar
>
> So, what am i making wrong? thank you in
> advance.
>
>
> -
> 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: newbie: servlet examples work, jsp not

2003-10-19 Thread Ben Souther
You don't need to set your classpath. Tomcat does that for you.

You should double check that your JAVA_HOME environment variable is set 
properly. From the command line type: %JAVA_HOME%\bin\javac
You should see a menu of switches for the compiler.
If not, check to see where your JAVA_HOME environment variable is pointing by 
typing: echo %JAVA_HOME%

You might also want to get tomcat working as a standalone before integrating 
with Apache to cut down on the number of simultaneous issues to be debugged.
http://localhost:8080/examples






On Sunday 19 October 2003 06:35 am, you wrote:
> hello,
>
> i am working in windows xp. i have the jsdk 1.4.1 installed. i also
> installed apache2 and tomcat 4.1 as described in the HowTo:
> http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
>
> after installation, i wanted to try the examples at
> http://localhost/examples. the servlet examples work, but the jsp examples
> not. i get the following error:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
> [javac] Compiling 1 source file
>
> and in the logs i have:
>
> Unable to find a javac compiler;
> com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK
>
> But my Java_Home does point to c:\j2sdk1.4.1
> and my classpath does point to c:\j2sdk1.4.1\lib\tools.jar
>
> So, what am i making wrong? thank you in
> advance.
>
>
> -
> 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: newbie: servlet examples work, jsp not

2003-10-19 Thread busse
hello,

i tried %JAVA_HOME%\bin\javac and it works properly.

Any other ideas?

> You don't need to set your classpath. Tomcat does that for you.
> 
> You should double check that your JAVA_HOME environment variable is set 
> properly. From the command line type: %JAVA_HOME%\bin\javac
> You should see a menu of switches for the compiler.
> If not, check to see where your JAVA_HOME environment variable is pointing by 
> typing: echo %JAVA_HOME%
> 
> You might also want to get tomcat working as a standalone before integrating 
> with Apache to cut down on the number of simultaneous issues to be debugged.
> http://localhost:8080/examples
> 
> 
> 
> 
> 
> 
> On Sunday 19 October 2003 06:35 am, you wrote:
> > hello,
> >
> > i am working in windows xp. i have the jsdk 1.4.1 installed. i also
> > installed apache2 and tomcat 4.1 as described in the HowTo:
> > http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
> >
> > after installation, i wanted to try the examples at
> > http://localhost/examples. the servlet examples work, but the jsp examples
> > not. i get the following error:
> >
> > org.apache.jasper.JasperException: Unable to compile class for JSP
> >
> > An error occurred at line: -1 in the jsp file: null
> >
> > Generated servlet error:
> > [javac] Compiling 1 source file
> >
> > and in the logs i have:
> >
> > Unable to find a javac compiler;
> > com.sun.tools.javac.Main is not on the classpath.
> > Perhaps JAVA_HOME does not point to the JDK
> >
> > But my Java_Home does point to c:\j2sdk1.4.1
> > and my classpath does point to c:\j2sdk1.4.1\lib\tools.jar
> >
> > So, what am i making wrong? thank you in
> > advance.
> >
> >
> > -
> > 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]
> 



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



RE: newbie: servlet examples work, jsp not

2003-10-20 Thread Mike Curwen
Are you on XP Home or XP Pro ? 
 
What's CATALINA_HOME ?
 
If you're using the LE version of Tomcat, remove it, and try installing
the 'full' (non-LE) version.

> -Original Message-
> From: Sven Busse [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 20, 2003 8:50 AM
> To: 'Tomcat Users List'
> Subject: AW: newbie: servlet examples work, jsp not
> 
> 
> hello,
> 
> ahmm, still having this problem and don't know
> what to do, sorry ...
> 
> 
> > -Ursprüngliche Nachricht-
> > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Gesendet: Sonntag, 19. Oktober 2003 18:37
> > An: Tomcat Users List
> > Betreff: Re: newbie: servlet examples work, jsp not
> > 
> > 
> > hello,
> > 
> > i tried %JAVA_HOME%\bin\javac and it works properly.
> > 
> > Any other ideas?
> > 
> > > You don't need to set your classpath. Tomcat does that for you.
> > > 
> > > You should double check that your JAVA_HOME environment
> > variable is set
> > > properly. From the command line type: %JAVA_HOME%\bin\javac You 
> > > should see a menu of switches for the compiler. If not, 
> check to see 
> > > where your JAVA_HOME environment
> > variable is pointing by
> > > typing: echo %JAVA_HOME%
> > > 
> > > You might also want to get tomcat working as a standalone
> > before integrating
> > > with Apache to cut down on the number of simultaneous
> > issues to be debugged.
> > > http://localhost:8080/examples
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > On Sunday 19 October 2003 06:35 am, you wrote:
> > > > hello,
> > > >
> > > > i am working in windows xp. i have the jsdk 1.4.1
> > installed. i also
> > > > installed apache2 and tomcat 4.1 as described in the HowTo: 
> > > > http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
> > > >
> > > > after installation, i wanted to try the examples at 
> > > > http://localhost/examples. the servlet examples work, but
> > the jsp examples
> > > > not. i get the following error:
> > > >
> > > > org.apache.jasper.JasperException: Unable to compile 
> class for JSP
> > > >
> > > > An error occurred at line: -1 in the jsp file: null
> > > >
> > > > Generated servlet error:
> > > > [javac] Compiling 1 source file
> > > >
> > > > and in the logs i have:
> > > >
> > > > Unable to find a javac compiler;
> > > > com.sun.tools.javac.Main is not on the classpath.
> > > > Perhaps JAVA_HOME does not point to the JDK
> > > >
> > > > But my Java_Home does point to c:\j2sdk1.4.1
> > > > and my classpath does point to c:\j2sdk1.4.1\lib\tools.jar
> > > >
> > > > So, what am i making wrong? thank you in
> > > > advance.
> > > >
> > > >
> > > > 
> > 
> -
> > > > 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]
> > > 
> > 
> > 
> > 
> > 
> -
> > 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]
> 


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



Re: Newbie: Servlet under Windows does not run

2002-03-17 Thread Matt Egyhazy

what is the package name in the .java file of your censusquery class?

matt
- Original Message -
From: "Jim Cobban" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "John W Austin" <[EMAIL PROTECTED]>
Sent: Sunday, March 17, 2002 3:20 PM
Subject: Newbie: Servlet under Windows does not run


> I am desperate for help in getting Tomcat to run my servlet.  I have read
> all of the documentation and tried to follow the rules, but Tomcat just
does
> not run the servlet.
>
> Under 4.0.3 I get the following log entries:
>
> 2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at
> context path /Census from URL
> jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/
> 2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to
> work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census
> 2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number
> generator class java.security.SecureRandom
> 2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number
> generator has been completed
> 2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container
> servlet default
> 2002-03-17 14:52:34 default: init
> 2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container
> servlet invoker
> 2002-03-17 14:52:34 invoker: init
> 2002-03-17 14:52:34 jsp: init
> 2002-03-17 14:52:55
> StandardWrapper[:org.apache.catalina.INVOKER.Census.CensusQuery]: Marking
> servlet org.apache.catalina.INVOKER.Census.CensusQuery as unavailable
> 2002-03-17 14:52:55 invoker: Cannot allocate servlet instance for path
> /servlet/Census.CensusQuery
> javax.servlet.ServletException: Wrapper cannot find servlet class
> Census.CensusQuery or a class it depends on
>
> Tomcat expands my Census.war file as I expect so my class file is at:
>
D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
> ass
>
> so why can't Tomcat find the class?  Based upon the time stamps I believe
> that the problem was not detected until I actually tried to access the
> servlet.  I believe my init method was not invoked because it generates
log
> entries which do not appear in the file.
>
> Jim Cobban   [EMAIL PROTECTED]
> 34 Palomino Dr.
> Kanata, ON, CANADA
> K2M 1M1
> +1-613-592-9438
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Newbie: Servlet under Windows does not run

2002-03-17 Thread Jim Cobban

- Original Message -
From: "Matt Egyhazy" <[EMAIL PROTECTED]>
Subject: Re: Newbie: Servlet under Windows does not run


> what is the package name in the .java file of your censusquery class?

The package name in the .java file is Census, just like the file hierarchy
says.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




AW: RE: newbie: servlet examples work, jsp not

2003-10-20 Thread Sven Busse
hello,

i am using windows xp home edition.

CATALINA_HOME is the same as TOMCAT_HOME:

c:\tomcat

thanx

sven

> -Ursprüngliche Nachricht-
> Von: Mike Curwen [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 20. Oktober 2003 18:06
> An: 'Tomcat Users List'; [EMAIL PROTECTED]
> Betreff: RE: newbie: servlet examples work, jsp not
> 
> 
> Are you on XP Home or XP Pro ? 
>  
> What's CATALINA_HOME ?
>  
> If you're using the LE version of Tomcat, remove it, and try 
> installing
> the 'full' (non-LE) version.
> 
> > -Original Message-
> > From: Sven Busse [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, October 20, 2003 8:50 AM
> > To: 'Tomcat Users List'
> > Subject: AW: newbie: servlet examples work, jsp not
> > 
> > 
> > hello,
> > 
> > ahmm, still having this problem and don't know
> > what to do, sorry ...
> > 
> > 
> > > -----Ursprüngliche Nachricht-
> > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Gesendet: Sonntag, 19. Oktober 2003 18:37
> > > An: Tomcat Users List
> > > Betreff: Re: newbie: servlet examples work, jsp not
> > > 
> > > 
> > > hello,
> > > 
> > > i tried %JAVA_HOME%\bin\javac and it works properly.
> > > 
> > > Any other ideas?
> > > 
> > > > You don't need to set your classpath. Tomcat does that for you.
> > > > 
> > > > You should double check that your JAVA_HOME environment
> > > variable is set
> > > > properly. From the command line type: %JAVA_HOME%\bin\javac You 
> > > > should see a menu of switches for the compiler. If not, 
> > check to see 
> > > > where your JAVA_HOME environment
> > > variable is pointing by
> > > > typing: echo %JAVA_HOME%
> > > > 
> > > > You might also want to get tomcat working as a standalone
> > > before integrating
> > > > with Apache to cut down on the number of simultaneous
> > > issues to be debugged.
> > > > http://localhost:8080/examples
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > On Sunday 19 October 2003 06:35 am, you wrote:
> > > > > hello,
> > > > >
> > > > > i am working in windows xp. i have the jsdk 1.4.1
> > > installed. i also
> > > > > installed apache2 and tomcat 4.1 as described in the HowTo: 
> > > > > 
> http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
> > > > >
> > > > > after installation, i wanted to try the examples at 
> > > > > http://localhost/examples. the servlet examples work, but
> > > the jsp examples
> > > > > not. i get the following error:
> > > > >
> > > > > org.apache.jasper.JasperException: Unable to compile 
> > class for JSP
> > > > >
> > > > > An error occurred at line: -1 in the jsp file: null
> > > > >
> > > > > Generated servlet error:
> > > > > [javac] Compiling 1 source file
> > > > >
> > > > > and in the logs i have:
> > > > >
> > > > > Unable to find a javac compiler;
> > > > > com.sun.tools.javac.Main is not on the classpath.
> > > > > Perhaps JAVA_HOME does not point to the JDK
> > > > >
> > > > > But my Java_Home does point to c:\j2sdk1.4.1
> > > > > and my classpath does point to c:\j2sdk1.4.1\lib\tools.jar
> > > > >
> > > > > So, what am i making wrong? thank you in
> > > > > advance.
> > > > >
> > > > >
> > > > > 
> > > 
> > 
> -
> > > > > 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]
> > > > 
> > > 
> > > 
> > > 
> > > 
> > 
> -
> > > 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]
> > 
> 
> 
> -
> 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: RE: newbie: servlet examples work, jsp not

2003-10-20 Thread Mike Curwen
I once purchased an HP laptop with XP Home.  I eventually had to return
it for a number of reasons:  
 
*at the time, I hated XP, and I couldn't get 2000 to install correctly.
*more importantly (for this list),  I couldn't get tomcat to function
properly.
 
It's as if it ignored both JAVA_HOME and CATALINA_HOME.  Numerous
reboots and careful inspection of the settings for typos left me
mystified as to the cause.
 
As I said, I eventually gave up and returned the laptop. So XP Home
makes me suspicious, because of my own experience with this OS.
 
As an aside, I use XP Pro at work, and it's the best Windows OS yet
(yes, I'm sure there are Linux geeks just waiting in the wings with
their comments).
 


> -Original Message-
> From: Sven Busse [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 20, 2003 11:21 AM
> To: 'Tomcat Users List'
> Subject: AW: RE: newbie: servlet examples work, jsp not
> 
> 
> hello,
> 
> i am using windows xp home edition.
> 
> CATALINA_HOME is the same as TOMCAT_HOME:
> 
> c:\tomcat
> 
> thanx
> 
> sven
> 
> > -Ursprüngliche Nachricht-
> > Von: Mike Curwen [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 20. Oktober 2003 18:06
> > An: 'Tomcat Users List'; [EMAIL PROTECTED]
> > Betreff: RE: newbie: servlet examples work, jsp not
> > 
> > 
> > Are you on XP Home or XP Pro ?
> >  
> > What's CATALINA_HOME ?
> >  
> > If you're using the LE version of Tomcat, remove it, and try
> > installing
> > the 'full' (non-LE) version.
> > 
> > > -Original Message-
> > > From: Sven Busse [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, October 20, 2003 8:50 AM
> > > To: 'Tomcat Users List'
> > > Subject: AW: newbie: servlet examples work, jsp not
> > > 
> > > 
> > > hello,
> > > 
> > > ahmm, still having this problem and don't know
> > > what to do, sorry ...
> > > 
> > > 
> > > > -Ursprüngliche Nachricht-
> > > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > > Gesendet: Sonntag, 19. Oktober 2003 18:37
> > > > An: Tomcat Users List
> > > > Betreff: Re: newbie: servlet examples work, jsp not
> > > > 
> > > > 
> > > > hello,
> > > > 
> > > > i tried %JAVA_HOME%\bin\javac and it works properly.
> > > > 
> > > > Any other ideas?
> > > > 
> > > > > You don't need to set your classpath. Tomcat does 
> that for you.
> > > > > 
> > > > > You should double check that your JAVA_HOME environment
> > > > variable is set
> > > > > properly. From the command line type: 
> %JAVA_HOME%\bin\javac You
> > > > > should see a menu of switches for the compiler. If not, 
> > > check to see
> > > > > where your JAVA_HOME environment
> > > > variable is pointing by
> > > > > typing: echo %JAVA_HOME%
> > > > > 
> > > > > You might also want to get tomcat working as a standalone
> > > > before integrating
> > > > > with Apache to cut down on the number of simultaneous
> > > > issues to be debugged.
> > > > > http://localhost:8080/examples
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > On Sunday 19 October 2003 06:35 am, you wrote:
> > > > > > hello,
> > > > > >
> > > > > > i am working in windows xp. i have the jsdk 1.4.1
> > > > installed. i also
> > > > > > installed apache2 and tomcat 4.1 as described in the HowTo:
> > > > > > 
> > http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
> > > > > >
> > > > > > after installation, i wanted to try the examples at
> > > > > > http://localhost/examples. the servlet examples work, but
> > > > the jsp examples
> > > > > > not. i get the following error:
> > > > > >
> > > > > > org.apache.jasper.JasperException: Unable to compile
> > > class for JSP
> > > > > >
> > > > > > An error occurred at line: -1 in the jsp file: null
> > > > > >
> > > > > > Generated servlet error:
> > > > > > [javac] Compiling 1 source file
> > > > > >
> &

AW: RE: RE: newbie: servlet examples work, jsp not

2003-10-20 Thread Sven Busse
hello,

well, that would be bad. I don't have the time to re-install
everything now, ...

hmm ... 

> -Ursprüngliche Nachricht-
> Von: Mike Curwen [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 20. Oktober 2003 18:25
> An: 'Tomcat Users List'; [EMAIL PROTECTED]
> Betreff: RE: RE: newbie: servlet examples work, jsp not
> 
> 
> I once purchased an HP laptop with XP Home.  I eventually had 
> to return
> it for a number of reasons:  
>  
> *at the time, I hated XP, and I couldn't get 2000 to install 
> correctly.
> *more importantly (for this list),  I couldn't get tomcat to function
> properly.
>  
> It's as if it ignored both JAVA_HOME and CATALINA_HOME.  Numerous
> reboots and careful inspection of the settings for typos left me
> mystified as to the cause.
>  
> As I said, I eventually gave up and returned the laptop. So XP Home
> makes me suspicious, because of my own experience with this OS.
>  
> As an aside, I use XP Pro at work, and it's the best Windows OS yet
> (yes, I'm sure there are Linux geeks just waiting in the wings with
> their comments).
>  
> 
> 
> > -Original Message-
> > From: Sven Busse [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, October 20, 2003 11:21 AM
> > To: 'Tomcat Users List'
> > Subject: AW: RE: newbie: servlet examples work, jsp not
> > 
> > 
> > hello,
> > 
> > i am using windows xp home edition.
> > 
> > CATALINA_HOME is the same as TOMCAT_HOME:
> > 
> > c:\tomcat
> > 
> > thanx
> > 
> > sven
> > 
> > > -Ursprüngliche Nachricht-
> > > Von: Mike Curwen [mailto:[EMAIL PROTECTED]
> > > Gesendet: Montag, 20. Oktober 2003 18:06
> > > An: 'Tomcat Users List'; [EMAIL PROTECTED]
> > > Betreff: RE: newbie: servlet examples work, jsp not
> > > 
> > > 
> > > Are you on XP Home or XP Pro ?
> > >  
> > > What's CATALINA_HOME ?
> > >  
> > > If you're using the LE version of Tomcat, remove it, and try
> > > installing
> > > the 'full' (non-LE) version.
> > > 
> > > > -Original Message-
> > > > From: Sven Busse [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, October 20, 2003 8:50 AM
> > > > To: 'Tomcat Users List'
> > > > Subject: AW: newbie: servlet examples work, jsp not
> > > > 
> > > > 
> > > > hello,
> > > > 
> > > > ahmm, still having this problem and don't know
> > > > what to do, sorry ...
> > > > 
> > > > 
> > > > > -Ursprüngliche Nachricht-
> > > > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > > > Gesendet: Sonntag, 19. Oktober 2003 18:37
> > > > > An: Tomcat Users List
> > > > > Betreff: Re: newbie: servlet examples work, jsp not
> > > > > 
> > > > > 
> > > > > hello,
> > > > > 
> > > > > i tried %JAVA_HOME%\bin\javac and it works properly.
> > > > > 
> > > > > Any other ideas?
> > > > > 
> > > > > > You don't need to set your classpath. Tomcat does 
> > that for you.
> > > > > > 
> > > > > > You should double check that your JAVA_HOME environment
> > > > > variable is set
> > > > > > properly. From the command line type: 
> > %JAVA_HOME%\bin\javac You
> > > > > > should see a menu of switches for the compiler. If not, 
> > > > check to see
> > > > > > where your JAVA_HOME environment
> > > > > variable is pointing by
> > > > > > typing: echo %JAVA_HOME%
> > > > > > 
> > > > > > You might also want to get tomcat working as a standalone
> > > > > before integrating
> > > > > > with Apache to cut down on the number of simultaneous
> > > > > issues to be debugged.
> > > > > > http://localhost:8080/examples
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Sunday 19 October 2003 06:35 am, you wrote:
> > > > > > > hello,
> > > > > > >
> > &g

RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Wagoner, Mark

Did you add a Census context to your server.xml file?

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 9:51 AM
To: Tomcat Users List
Subject: Urgent Re: Newbie: Servlet under Windows does not run


I am really desperate.  I need to be able to demonstrate this servlet by
Tuesday evening and Tomcat still refuses to run it.

Essentially all that I have done is copy the examples from a book and change
the names to protect the innocent.  The first few lines of the .java file
are:

package Census;

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

public class CensusQuery extends HttpServlet {


I then compile this class and create the .war file with the following .bat
file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF

When the .war file is deployed by Tomcat the class file is located at:

D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
ass

All of this looks completely according to the documentation I have read.
What am I doing wrong so that Tomcat cannot find the class?



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Chris Pheby

Do you have a web.xml???

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Jim Cobban
Sent: 18 March 2002 14:51
To: Tomcat Users List
Subject: Urgent Re: Newbie: Servlet under Windows does not run


I am really desperate.  I need to be able to demonstrate this servlet by
Tuesday evening and Tomcat still refuses to run it.

Essentially all that I have done is copy the examples from a book and change
the names to protect the innocent.  The first few lines of the .java file
are:

package Census;

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

public class CensusQuery extends HttpServlet {


I then compile this class and create the .war file with the following .bat
file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF

When the .war file is deployed by Tomcat the class file is located at:

D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
ass

All of this looks completely according to the documentation I have read.
What am I doing wrong so that Tomcat cannot find the class?



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread dave . prout

Have you got an entry for you servlet in the web.xml file in the WEB-INF
folder ?

Dave 



-Original Message-
From: Chris Pheby [mailto:[EMAIL PROTECTED]]
Sent: 18 March 2002 15:07
To: Tomcat Users List
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


Do you have a web.xml???

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Jim Cobban
Sent: 18 March 2002 14:51
To: Tomcat Users List
Subject: Urgent Re: Newbie: Servlet under Windows does not run


I am really desperate.  I need to be able to demonstrate this servlet by
Tuesday evening and Tomcat still refuses to run it.

Essentially all that I have done is copy the examples from a book and change
the names to protect the innocent.  The first few lines of the .java file
are:

package Census;

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

public class CensusQuery extends HttpServlet {


I then compile this class and create the .war file with the following .bat
file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF

When the .war file is deployed by Tomcat the class file is located at:

D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
ass

All of this looks completely according to the documentation I have read.
What am I doing wrong so that Tomcat cannot find the class?



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message - 
From: "Chris Pheby" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 10:07 AM
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Do you have a web.xml???

Yes I previously posted its contents to this mailing list.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Did you add a Census context to your server.xml file?

No.  I looked at the way the examples used that file, and it seemed that it
was used only to override the default behavior. For example they change
where logs go in that context.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Wagoner, Mark

What URL are you using to get to the servlet?

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:47 PM
To: Tomcat Users List
Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run


- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Did you add a Census context to your server.xml file?

No.  I looked at the way the examples used that file, and it seemed that it
was used only to override the default behavior. For example they change
where logs go in that context.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> What URL are you using to get to the servlet?

I have tried a very wide range of URLs.  According to all of the
documentation the one that should work is
http://localhost/servlet/Census.CensusQuery  That is using the class name.
However when that failed I also tried  /servlet/Census/CensusQuery,
and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
earlier, the name of the servlet, as opposed to the class, was Census1901 I
also tried /servlet/Census1901.  I have also tried using URL mapping
specified in the
WEB-INF/web.xml file.  In any event the bottom lime is that when I request
the above URL TomCat does go looking for my class.  It just can't seem to
find it!

I know that I must be doing something wrong, because nobody else seems to be
having any difficulty running servlets, but this is driving me crazy.  I
have been trying everything I can think of for more than a week and  TomCat
keeps claiming that it can't find the class.  I have read the documentation
over and over again.  I have gone with a fine tooth comb through the
examples trying to see what they are doing that is different from what I am
doing.  I just don't understand why this is so bloody difficulty.

Just to put every bit of the documentation of this problem in one place:

The first few lines of my servlet are:

package Census;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class CensusQuery extends HttpServlet {


which I compile using the following .bat file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
 javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
 javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
 javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF


The .war file this produces contains:

D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
META-INF/
META-INF/MANIFEST.MF
CensusQuery.html
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/Census/
WEB-INF/classes/Census/ConnectionPool.class
WEB-INF/classes/Census/DBResults.class
WEB-INF/classes/Census/DriverUtilities.class
WEB-INF/classes/Census/DatabaseUtilities.class
WEB-INF/classes/Census/ServletUtilities.class
WEB-INF/classes/Census/CensusQuery.class
WEB-INF/web.xml

The web.xml file is:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


My Web Application

  This is version X.X of an application to perform
  a wild and wonderful task, based on servlets and
  JSP pages.  It was written by Dave Developer
  ([EMAIL PROTECTED]), who should be contacted for
  more information.




Census1901


Census.CensusQuery



DbVendor
 mysql


 Url
 localhost


 DbName
 Census


 UserName
 anonymous


 Password
 none


 InitConnections
 10


 MaxConnections
 10






and the relevant lines of the log file under TomCat 4.0.3 are:

2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at
context path /Census from URL
jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/
2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to
work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census
2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number
generator class java.security.SecureRandom
2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number
generator has been completed
2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container
servlet default
2002-03-17 14:52:34 default: init
2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container
servlet invoker
2002-03-17 14:52:34 invoker: init
2002-03-17 14:52:34 jsp: init
2002-03-17 14:52:55
StandardWrapper[:org.apache.catalina.INVOKER.Census.CensusQuery]: Marking
servlet org.apache.catalina.INVOKER.Census.CensusQuery as unavailable
2002-03-17 14:52:55 invoker: Cannot allocate servlet instance for path
/servlet/Census.CensusQuery
javax.servlet.ServletException: Wrapper cannot find servlet class
Census.CensusQuery or a class it depends on




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Wagoner, Mark

Are you absolutely sure the problem is with CensusQuery and not a referenced
class?  It could be that Tomcat can't find another class that is referenced
by CensusQuery, so it cannot load CensusQuery

Try stripping (or commenting) out all of the code except for a println call.
This will show you if the servlet is actually being located or not.

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 1:34 PM
To: Tomcat Users List
Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run


- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> What URL are you using to get to the servlet?

I have tried a very wide range of URLs.  According to all of the
documentation the one that should work is
http://localhost/servlet/Census.CensusQuery  That is using the class name.
However when that failed I also tried  /servlet/Census/CensusQuery,
and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
earlier, the name of the servlet, as opposed to the class, was Census1901 I
also tried /servlet/Census1901.  I have also tried using URL mapping
specified in the
WEB-INF/web.xml file.  In any event the bottom lime is that when I request
the above URL TomCat does go looking for my class.  It just can't seem to
find it!

I know that I must be doing something wrong, because nobody else seems to be
having any difficulty running servlets, but this is driving me crazy.  I
have been trying everything I can think of for more than a week and  TomCat
keeps claiming that it can't find the class.  I have read the documentation
over and over again.  I have gone with a fine tooth comb through the
examples trying to see what they are doing that is different from what I am
doing.  I just don't understand why this is so bloody difficulty.

Just to put every bit of the documentation of this problem in one place:

The first few lines of my servlet are:

package Census;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class CensusQuery extends HttpServlet {


which I compile using the following .bat file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
 javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
 javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
 javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF


The .war file this produces contains:

D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
META-INF/
META-INF/MANIFEST.MF
CensusQuery.html
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/Census/
WEB-INF/classes/Census/ConnectionPool.class
WEB-INF/classes/Census/DBResults.class
WEB-INF/classes/Census/DriverUtilities.class
WEB-INF/classes/Census/DatabaseUtilities.class
WEB-INF/classes/Census/ServletUtilities.class
WEB-INF/classes/Census/CensusQuery.class
WEB-INF/web.xml

The web.xml file is:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


My Web Application

  This is version X.X of an application to perform
  a wild and wonderful task, based on servlets and
  JSP pages.  It was written by Dave Developer
  ([EMAIL PROTECTED]), who should be contacted for
  more information.




Census1901


Census.CensusQuery



DbVendor
 mysql


 Url
 localhost


 DbName
 Census


 UserName
 anonymous


 Password
 none


 InitConnections
 10


 MaxConnections
 10






and the relevant lines of the log file under TomCat 4.0.3 are:

2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at
context path /Census from URL
jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/
2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to
work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census
2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number
generator class java.security.SecureRandom
2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number
generator has been completed
2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container
servlet default
2002-03-17 14:52:34 default: init
2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container
servlet invoker
2002-03-17 14:52:34 invoker: init
2002-03-17 14:52:34 jsp: init
2002-03-17 14:52:55
StandardWrapper[:org.apache.cat

Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Are you absolutely sure the problem is with CensusQuery and not a
referenced
> class?  It could be that Tomcat can't find another class that is
referenced
> by CensusQuery, so it cannot load CensusQuery
>
> Try stripping (or commenting) out all of the code except for a println
call.
> This will show you if the servlet is actually being located or not.

Yes I stripped out everything else and it still won't run the servlet.  In
any event the log from Tomcat says that the cause is that it can't find that
class.

- Root Cause -
java.lang.ClassNotFoundException: Census.CensusQuery

Would someone please tell me what the h**l I am doing wrong?


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread JavaJosh

I am fairly new, but perhaps I can help...

> -Original Message-
> From: Jim Cobban [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 18, 2002 10:34 AM
> To: Tomcat Users List
> Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run
> 
> - Original Message -
> From: "Wagoner, Mark" <[EMAIL PROTECTED]>
> Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run
> 
> 
> > What URL are you using to get to the servlet?
> 
> I have tried a very wide range of URLs.  According to all of the
> documentation the one that should work is
> http://localhost/servlet/Census.CensusQuery  That is using the class
> name.
> However when that failed I also tried  /servlet/Census/CensusQuery,
> and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
> earlier, the name of the servlet, as opposed to the class, was
> Census1901 I
> also tried /servlet/Census1901.  I have also tried using URL mapping
> specified in the
> WEB-INF/web.xml file.  In any event the bottom lime is that when I
> request
> the above URL TomCat does go looking for my class.  It just can't seem
> to
> find it!
> 
> I know that I must be doing something wrong, because nobody else seems
> to be
> having any difficulty running servlets, but this is driving me crazy.
> I
> have been trying everything I can think of for more than a week and
> TomCat
> keeps claiming that it can't find the class.  I have read the
> documentation
> over and over again.  I have gone with a fine tooth comb through the
> examples trying to see what they are doing that is different from what
> I am
> doing.  I just don't understand why this is so bloody difficulty.
> 
> Just to put every bit of the documentation of this problem in one
> place:
> 
> The first few lines of my servlet are:
> 
> package Census;

OK. First, you should use the naming convention of having your packages
lowercase. A little known fact is that classes and packages share the
same namespace, so you risk a collision. (You don't have any classes or
interfaces called Census do you???)
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.sql.*;
> public class CensusQuery extends HttpServlet {
> 
> 
> which I compile using the following .bat file:
> 
> set PATH=C:\jdk1.3.1\bin;%PATH%
> set
> CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-

I'm surprised this works since servlet.jar is in common/lib (at least in
the 4.0.3 release)

> INF\classes;%CLASSPATH%

This is dangerous. I notice you are doing db stuff. You wouldn't happen
to be doing a Class.forName would you? If you are, then your servlet
won't run without your JDBC driver in web-inf/lib.

>  javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
>  javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
>  javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java |
> more
>  javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more

> jar cf Census.war *.html WEB-INF

It seems like you are compiling a lot of stuff here. Is this your first
servlet? Have you ever successfully gotten a simple servlet to run? I
would recommend doing that first. That said...

Also, tomcat does not require that you use a war file, and I suggest
that you don't, especially for development. Also, tomcat will use the
default context of "Census" - possibly confusing itself and you.
> 
> 
> The .war file this produces contains:
> 
> D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
> META-INF/
> META-INF/MANIFEST.MF
> CensusQuery.html
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/Census/
> WEB-INF/classes/Census/ConnectionPool.class
> WEB-INF/classes/Census/DBResults.class
> WEB-INF/classes/Census/DriverUtilities.class
> WEB-INF/classes/Census/DatabaseUtilities.class
> WEB-INF/classes/Census/ServletUtilities.class
> WEB-INF/classes/Census/CensusQuery.class
> WEB-INF/web.xml
> 
> The web.xml file is:
> 
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
> 
> My Web Application
> 
>   This is version X.X of an application to perform
>   a wild and wonderful task, based on servlets and
>   JSP pages.  It was written by Dave Developer
>   ([EMAIL PROTECTED]), who should be contacted for
>   more information.
> 
> 
> 
> 
> Census1901
>  

Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Peter Wieland

I know it sounds stupid but sometimes it is a simple thing that blocks all:

When I had troubles like the one you describe I usually got it fixed
stopping tomcat, deleting the work directory (${tomcat-home}/work and
deleting the directory that contains the unpacked war-file (for you
${tomcat-home}/webapps/Census). Then restart Tomcat. This way you are sure
to have the actual version of your servlet and no older cached files used.

Besides this I have entries like this in my web.xml to access my servlets.

--

  my-servlet
  my.package.MyServlet



  my-servlet
  my-servlet.exe

---

which allows me to access the servlet with the url
http://localhost/my-application/my-servlet.exe (but this is not very
different from your web.xml).

Hope that helps. Good luck

Peter



> - Original Message -
> From: "Wagoner, Mark" <[EMAIL PROTECTED]>
> Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


>> What URL are you using to get to the servlet?

> I have tried a very wide range of URLs.  According to all of the
> documentation the one that should work is
> http://localhost/servlet/Census.CensusQuery  That is using the class name.
> However when that failed I also tried  /servlet/Census/CensusQuery,
> and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
> earlier, the name of the servlet, as opposed to the class, was Census1901
> I
> also tried /servlet/Census1901.  I have also tried using URL mapping
> specified in the
> WEB-INF/web.xml file.  In any event the bottom lime is that when I request
> the above URL TomCat does go looking for my class.  It just can't seem to
> find it!

> I know that I must be doing something wrong, because nobody else seems to
> be
> having any difficulty running servlets, but this is driving me crazy.  I
> have been trying everything I can think of for more than a week and
> TomCat
> keeps claiming that it can't find the class.  I have read the
> documentation
> over and over again.  I have gone with a fine tooth comb through the
> examples trying to see what they are doing that is different from what I
> am
> doing.  I just don't understand why this is so bloody difficulty.

> Just to put every bit of the documentation of this problem in one place:

> The first few lines of my servlet are:

> package Census;
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.sql.*;
> public class CensusQuery extends HttpServlet {


> which I compile using the following .bat file:

> set PATH=C:\jdk1.3.1\bin;%PATH%
> set
> CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPAT
> H%
>  javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
>  javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
>  javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
> jar cf Census.war *.html WEB-INF


> The .war file this produces contains:

> D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
> META-INF/
> META-INF/MANIFEST.MF
> CensusQuery.html
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/Census/
> WEB-INF/classes/Census/ConnectionPool.class
> WEB-INF/classes/Census/DBResults.class
> WEB-INF/classes/Census/DriverUtilities.class
> WEB-INF/classes/Census/DatabaseUtilities.class
> WEB-INF/classes/Census/ServletUtilities.class
> WEB-INF/classes/Census/CensusQuery.class
> WEB-INF/web.xml

> The web.xml file is:

> 

>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

> 
> My Web Application
> 
>   This is version X.X of an application to perform
>   a wild and wonderful task, based on servlets and
>   JSP pages.  It was written by Dave Developer
>   ([EMAIL PROTECTED]), who should be contacted for
>   more information.
> 

> 
> 
> Census1901
> 
> 
> Census.CensusQuery
> 

> 
> DbVendor
>  mysql
> 
> 
>  Url
>  localhost
> 
> 
>  DbName
>  Census
> 
> 
>  UserName
>  anonymous
> 
> 
>  Password
>  none
> 
> 
>  InitConnections
>  10
> 
> 
>  MaxConnections
>  10
> 

> 
> 
> 

> and the rele

Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-19 Thread Jim Cobban

- Original Message -
From: "Jim Cobban" <[EMAIL PROTECTED]>
Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run


> - Original Message -
> From: "Wagoner, Mark" <[EMAIL PROTECTED]>
> Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run
>
>
> > What URL are you using to get to the servlet?

This was the heart of the problem.  I was using the wrong URL.  I just
couldn't find any straightforward explanation of how you were supposed to
determine the URL to use to access the servlet once it was deployed.  The
URL which worked was:

http:servlet/.

The documentation continually talks in terms of relative URLs, so it only
gave the last part.  Furthermore most of the people I talked to just shoved
their servlets under ROOT, so their URLs were missing the 
part.

Thank you for your help.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

Please read this thread and tell me what the h**l I am doing wrong.  I am
just trying to write my first servlet.  I have to give a demo Tuesday
evening and I cannot get TomCat to run my servlet.  Tomcat insists that it
cannot find the class, even though as far as I can see the servlet has
deployed properly.  I have posted every bit of documentation I have on the
problem and so far all I have received is sympathy.

I have modelled my code directly on the examples, which Tomcat has no
trouble running.  I honestly cannot see that I am doing anything differently
except to name the package and class different names.  I am losing my mind!
I do not have time to root through the code of Tomcat to find out exactly
what it does during deployment of a servlet or where it goes looking for
classes, and frankly I don't think that I should have to worry about that.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jeff Macomber

I don't see any previous posting by you containing your web.xml (even though
I do see a note or two saying you had posted it before but no web.xml).
>From your previous posts it is clear that tomcat is finding your war file
and expanding it.  Your path appears to be correct from the war file.  Is
the case correct on your class file name (I'm not sure this is checked on
windows, I'm using Linux)?  I noticed you are loading java.sql.* does the
class you are loading require javax.sql.* ?  If so be sure you are including
the java extensions for jdbc 2.0.  Other than that I can't think of any
reason why it wouldn't be loading.  You said you had tried just doing a
simple hello world in the servlet and commenting everything else out?  When
you did that did you comment out the imports that you didn't need?

Hope this helps,
Jeff

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 3:00 PM
To: Tomcat Users List
Subject: Please read Re: Urgent Re: Newbie: Servlet under Windows does
not run


Please read this thread and tell me what the h**l I am doing wrong.  I am
just trying to write my first servlet.  I have to give a demo Tuesday
evening and I cannot get TomCat to run my servlet.  Tomcat insists that it
cannot find the class, even though as far as I can see the servlet has
deployed properly.  I have posted every bit of documentation I have on the
problem and so far all I have received is sympathy.

I have modelled my code directly on the examples, which Tomcat has no
trouble running.  I honestly cannot see that I am doing anything differently
except to name the package and class different names.  I am losing my mind!
I do not have time to root through the code of Tomcat to find out exactly
what it does during deployment of a servlet or where it goes looking for
classes, and frankly I don't think that I should have to worry about that.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Keng Wong

Have you tried
http://localhost/Census/servlet/Census.CensusQuery or
http://localhost:8080/Census/servlet/Census.CensusQuery ?
You are deploying a new war file(Census webapp) and requires the
webapp name before any servlet urls. Exception is the ROOT
webapp. Good luck.

-keng wong

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:00 PM
To: Tomcat Users List
Subject: Please read Re: Urgent Re: Newbie: Servlet under Windows
does
not run


Please read this thread and tell me what the h**l I am doing
wrong.  I am
just trying to write my first servlet.  I have to give a demo
Tuesday
evening and I cannot get TomCat to run my servlet.  Tomcat
insists that it
cannot find the class, even though as far as I can see the
servlet has
deployed properly.  I have posted every bit of documentation I
have on the
problem and so far all I have received is sympathy.

I have modelled my code directly on the examples, which Tomcat
has no
trouble running.  I honestly cannot see that I am doing anything
differently
except to name the package and class different names.  I am
losing my mind!
I do not have time to root through the code of Tomcat to find out
exactly
what it does during deployment of a servlet or where it goes
looking for
classes, and frankly I don't think that I should have to worry
about that.


--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
For additional commands:
<mailto:[EMAIL PROTECTED]>
Troubles with the list:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Fabien Nisol

At 02:59 PM 18/03/2002 -0500, you wrote:
>Please read this thread and tell me what the h**l I am doing wrong.  I am
>just trying to write my first servlet.  I have to give a demo Tuesday
>evening and I cannot get TomCat to run my servlet.  Tomcat insists that it
>cannot find the class, even though as far as I can see the servlet has
>deployed properly.  I have posted every bit of documentation I have on the
>problem and so far all I have received is sympathy.
>
>I have modelled my code directly on the examples, which Tomcat has no
>trouble running.  I honestly cannot see that I am doing anything differently
>except to name the package and class different names.  I am losing my mind!
>I do not have time to root through the code of Tomcat to find out exactly
>what it does during deployment of a servlet or where it goes looking for
>classes, and frankly I don't think that I should have to worry about that.
>

I've noticed that in certain cases, jar does put the *.class files in the 
file with a NON relative path... This lead to the impossibility for the 
java interpretter to find your classes...

Look with a jar -tvf if the pathes are relative or not ... That could be as 
stupid than this ! ( I had a problem similar to yours in a java 
application, I searched a solution for 4 days !

Also : Did you add your application to the server.xml file ?


>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: