You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kenneth Litwak <ja...@yahoo.com> on 2001/08/14 00:56:20 UTC

Trouble running a servlet

    I'm trying to run a basic servlet tutorial using
tomcat on Win 2000 with Netscape. It doens't work.

I start tomcat, and get
2001-08-13 03:34:12 - ContextManager: Adding context
Ctx( /examples )
2001-08-13 03:34:12 - ContextManager: Adding context
Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error
messages
2001-08-13 03:34:12 - ContextManager: Adding context
Ctx(  )
2001-08-13 03:34:12 - ContextManager: Adding context
Ctx( /test )
2001-08-13 03:34:13 - PoolTcpConnector: Starting
HttpConnectionHandler on 8080
2001-08-13 03:34:13 - PoolTcpConnector: Starting
Ajp12ConnectionHandler on 8007

Next, I go to Netscpae and tyr to opne a page.  The
final URL i sue is 
http://localhost:8080/ROOT/WEB-INF/classes/MyServletClass.class
That fails with a 404

THen I moved he code and tried
http:/localhost:8080/webapps/examples/WEB-INF/classes/Myservletcalss.class
That didn't work either.  The tomcat screen in both
cases listed the URL, followed by the word "null".  
I khave doen this under the ROOT directory wiht a
servlet on Solaris without a hitch Now that I'm trying
it on WIndows in a diferent environment, it won/t
work.

I've tried changing the Netscape settings for ptoxy. 
I swithced them to "Manual proxy", and set the http IP
address to 127..01, and the prot for everything to
8080.  This still doens't work.  I'm not trying to do
anything fancy.  I jsut want to be able to stat the
sever, and code and run JSPs and servlets.  I'd
appreciate help with this basic problem.  Thanks.

   If it matters,I'm not on the Internet, but I was
told htat's irrelevant. 

Ken


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

RE: Trouble running a servlet

Posted by Kenneth Litwak <ja...@yahoo.com>.
Robb wrote:
Are we talking about not being able to access 
localhost because you have a
proxy setup?  You can keep your proxy setup, just 
add an exception that
tells Netscape not to go to the Internet for the 
host 'localhost'.

I see the exception box, but I don't know what to put
there.  Thanks.


Ken



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Two configuration questions

Posted by Kenneth Litwak <ja...@yahoo.com>.
1.  Where do I put a JSP file?  Where do I put
associated helper beans and custom tags? 

2.  I want to access from a JSP's helper bean or a
servlet running on Tomcat on one host an EJB running
on the J2EE RI on another server on a separate host. 
If this were a standalone client I'd just give the
client some new JNDI code and provide the proper
client side jar.  How do I do this with Tomcat?  WOuld
my servlet or helper bean simply run the same JNDI
code?  Where do you put jar files for client side jars
for EJBs on Tomcat?  Thanks.



Ken

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

RE: Trouble running a servlet

Posted by "Rob S." <rs...@home.com>.
Are we talking about not being able to access localhost because you have a
proxy setup?  You can keep your proxy setup, just add an exception that
tells Netscape not to go to the Internet for the host 'localhost'.

- r

> -----Original Message-----
> From: Kenneth Litwak [mailto:javajedi2@yahoo.com]
> Sent: Tuesday, August 14, 2001 7:30 PM
> To: tomcat-user@jakarta.apache.org; richard@protected-data.com
> Cc: javajedi2@yahoo.com
> Subject: Re: Trouble running a servlet
>
>
>    Okay, I made my Win 2000  trouble go away by
> removing proxy settings in NetscRape and signing on to
> the Internet through my ISP.  Now everything works
> fine.  The question I have still, however, is:  how
> can I avoid this?  I should not have to tie up my
> phone line just to use Tomcat on my PC.  That's silly.
>  How can I get around this please? Thanks.
>
> Ken
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>


RE: Newbie help needed: error running JSP

Posted by "Rob S." <rs...@home.com>.
Well, of course the stack will be container-specific =)  In WebLogic, the
exception will be something like com.weblogic.blah.foo with a different
message.  The exception message there seemed descriptive enough to debug.

- r

> -----Original Message-----
> From: Kenneth Litwak [mailto:javajedi2@yahoo.com]
> Sent: Wednesday, August 15, 2001 7:09 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Newbie help needed: error running JSP
>
>
> Rob S. wrote:
> ot to be a jerk or anything, your "newbie help"
> questions are fine and all,
> but the problem is that the only connection they
> have to Tomcat is that
> you're using the container.
>
> It's like if I emailed the GCC or Visual Studio
> lists saying, "how come I'm
> getting all of these memory leaks in my
> programs?"  See what I'm saying?
> You really should pick up a book on JSPs /
> Servlets...
>
>    Rob, I understand your point.  The reason I posted
> here is that the stack trace appears to me completley
> unique to Tomcat. Weblogic might produce totally
> different information, as might Websphere as might the
> J2EE RI.  I don't know what from the stack trace is
> unique to Tomcat, and therefore a config error I've
> made, and what is common to all JSP engines.  How do
> you know the diference?  Thanks.
>
> Ken
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>


RE: Newbie help needed: error running JSP

Posted by Kenneth Litwak <ja...@yahoo.com>.
Rob S. wrote:
ot to be a jerk or anything, your "newbie help" 
questions are fine and all,
but the problem is that the only connection they 
have to Tomcat is that
you're using the container.

It's like if I emailed the GCC or Visual Studio 
lists saying, "how come I'm
getting all of these memory leaks in my 
programs?"  See what I'm saying?
You really should pick up a book on JSPs / 
Servlets...

   Rob, I understand your point.  The reason I posted
here is that the stack trace appears to me completley
unique to Tomcat. Weblogic might produce totally
different information, as might Websphere as might the
J2EE RI.  I don't know what from the stack trace is
unique to Tomcat, and therefore a config error I've
made, and what is common to all JSP engines.  How do
you know the diference?  Thanks.

Ken

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

RE: Newbie help needed: error running JSP

Posted by "Rob S." <rs...@home.com>.
Hiya Ken,

Not to be a jerk or anything, your "newbie help" questions are fine and all,
but the problem is that the only connection they have to Tomcat is that
you're using the container.

It's like if I emailed the GCC or Visual Studio lists saying, "how come I'm
getting all of these memory leaks in my programs?"  See what I'm saying?
You really should pick up a book on JSPs / Servlets...

- r

> -----Original Message-----
> From: Kenneth Litwak [mailto:javajedi2@yahoo.com]
> Sent: Wednesday, August 15, 2001 6:35 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Newbie help needed: error running JSP
>
>
>    I just ran my first JSP that uses a form and got an
> error. Unfortunately, the stack trace doesn't tell me
> where in the JSP the error occured (that I can tell)
> or where in my helper bean the problem ight be.  I'd
> heard that JSPs are hard to debug, and now I see why.
> The JSP engine is not very helpful with what's wrong.
> Here's the stack trace, followed by the JSP code.
>
> Location: /examples/jsp/form/Form.jsp
>
> Internal Servlet Error:
>
> org.apache.jasper.JasperException: Attempted a bean
> operation on a null object.
>         at
> org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspR
> untimeLibrary.java:424)
>         at
> jsp.f_00025rm._0002fjsp_0002fform_0002fForm_0002ejspForm_jsp_0._js
> pService(_0002fjsp_0002fform_0002fForm_0002ejspForm_jsp_0.java:122)
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
> Servlet.java:177)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>         at
> org.apache.tomcat.core.Handler.service(Handler.java:286)
>         at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>         at
> org.apache.tomcat.core.ContextManager.internalService(ContextManag
> er.java:797)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnec
> tion(HttpConnectionHandler.java:210)
>         at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>         at java.lang.Thread.run(Thread.java:484)
>
> JSP code:
> <html>
> <body bgcolor="#c8d8f8">
> <form action="/examples/jsp/form/Form.jsp"
> method=post>
> <center>
> <table cellpadding=4 cellspacing=2 border=0>
>
> <th bgcolor="#CCCCFF" colspan=2>
> <font size=5>User Registration</font>
> </th>
>
> <tr>
> <td valign=top>
> <b>First Name</b>
> <br>
> <input type="text" name="firstName" size=15></td>
> <td  valign=top>
> <b>Last Name</b>
> <br>
> <input type="text" name="lastName" size=15></td>
> </tr>
>
> <tr>
> <td valign=top colspan=2>
> <b>E-Mail</b>
> <br>
> <input type="text" name="email" size=20>
> <br></td>
> </tr>
>
> <tr>
> <td  valign=top colspan=2>
> <b>What languages do you program in?</b>
> <br>
> <input type="checkbox" name="languages"
> value="Java">Java&nbsp;&nbsp;
> <input type="checkbox" name="languages"
> value="C++">C++&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> <input type="checkbox" name="languages"
> value="C">C<br>
> <input type="checkbox" name="languages"
> value="Perl">Perl&nbsp;&nbsp;
> <input type="checkbox" name="languages"
> value="COBOL">COBOL
> <input type="checkbox" name="languages"
> value="VB">VB<br>
> </td>
> </tr>
>
> <tr>
> <td  valign=top colspan=2>
> <b>How often can we notify you regarding your
> interests?</b>
> <br>
> <input type="radio" name="notify" value="Weekly"
> checked>Weekly&nbsp;&nbsp;
> <input type="radio" name="notify"
> value="Monthly">Monthly&nbsp;&nbsp;
> <input type="radio" name="notify"
> value="Quarterly">Quarterly
> <br></td>
> </tr>
>
> <tr>
> <td  align=center colspan=2>
> <input type="submit" value="Submit"> <input
> type="reset"  value="Reset">
> </td>
> </tr>
>
> </table>
> </center>
> </form>
> <%-- Create the bean only when the form is posted --%>
> <%
> if (request.getMethod().equals("POST"))
>      {
> %>
> <jsp:useBean id="formHandler"
> class="com.shopping.FormBean">
> <%-- provide a setProperty tag and ensure that the
> setter methods are invoked via introspection
> --%>
> <jsp:setProperty name="formHandler" property="*"/>
> </jsp:useBean>
> <p>
> <hr>
> <font color=red>
> <b>You submitted:<P>
> First Name:</b><br>
> <%-- invoke the getter method to display the firstName
> using the getProperty tag --%>
> <jsp:getProperty name="formHandler"
> property="firstName"/><br>
> <br><b>Last Name:</b><br>
> <%-- invoke the getter method to display the lastName
> using the getProperty tag --%>
> <jsp:getProperty name="formhandler"
> property="lastName"/><br>
> <br><b>Email:</b><br>
> <%-- invoke the getter method to display the email
> address using the getProperty tag
> <jsp:getProperty name="formHandler"
> property="email"/><br>
> --%>
> <b>Languages:</b><br>
> <%
>    String[] lang = formHandler.getLanguages();
>    if (!lang[0].equals("1"))
>        {
>         out.println("<ul>");
>         for (int i=0; i<lang.length; i++)
>             out.println("<li>"+lang[i]);
>         out.println("</ul>");
>        }
>    else out.println("Nothing was selected<br>");
> %>
> <b>Notification:</b><br>
> <%-- invoke the getter method to display the
> notification status using the getProperty tag
> --%>
> <jsp:getProperty name="formHandler"
> property="notify"/><br>
> <br>
> <%
> }
> %>
> </font>
> </body>
> </html>
>
> I think this would be better as an attachment but lots
> of mailing lists don't like those, so ugly or not,
> there it is.  Thanks.
>
> Ken
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>


Newbie help needed: error running JSP

Posted by Kenneth Litwak <ja...@yahoo.com>.
   I just ran my first JSP that uses a form and got an
error. Unfortunately, the stack trace doesn't tell me
where in the JSP the error occured (that I can tell)
or where in my helper bean the problem ight be.  I'd
heard that JSPs are hard to debug, and now I see why. 
The JSP engine is not very helpful with what's wrong. 
Here's the stack trace, followed by the JSP code.

Location: /examples/jsp/form/Form.jsp

Internal Servlet Error:

org.apache.jasper.JasperException: Attempted a bean
operation on a null object.
        at
org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibrary.java:424)
        at
jsp.f_00025rm._0002fjsp_0002fform_0002fForm_0002ejspForm_jsp_0._jspService(_0002fjsp_0002fform_0002fForm_0002ejspForm_jsp_0.java:122)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at
org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)

JSP code:
<html>
<body bgcolor="#c8d8f8">
<form action="/examples/jsp/form/Form.jsp"
method=post>
<center>
<table cellpadding=4 cellspacing=2 border=0>

<th bgcolor="#CCCCFF" colspan=2>
<font size=5>User Registration</font>
</th>

<tr>
<td valign=top> 
<b>First Name</b> 
<br>
<input type="text" name="firstName" size=15></td>
<td  valign=top>
<b>Last Name</b>
<br>
<input type="text" name="lastName" size=15></td>
</tr>

<tr>
<td valign=top colspan=2>
<b>E-Mail</b> 
<br>
<input type="text" name="email" size=20>
<br></td>
</tr>

<tr>
<td  valign=top colspan=2>
<b>What languages do you program in?</b>
<br>
<input type="checkbox" name="languages"
value="Java">Java&nbsp;&nbsp; 
<input type="checkbox" name="languages"
value="C++">C++&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="languages"
value="C">C<br>
<input type="checkbox" name="languages"
value="Perl">Perl&nbsp;&nbsp;
<input type="checkbox" name="languages"
value="COBOL">COBOL
<input type="checkbox" name="languages"
value="VB">VB<br>
</td>
</tr>

<tr>
<td  valign=top colspan=2>
<b>How often can we notify you regarding your
interests?</b>
<br>
<input type="radio" name="notify" value="Weekly"
checked>Weekly&nbsp;&nbsp;
<input type="radio" name="notify"
value="Monthly">Monthly&nbsp;&nbsp; 
<input type="radio" name="notify"
value="Quarterly">Quarterly 
<br></td>
</tr>

<tr>
<td  align=center colspan=2>
<input type="submit" value="Submit"> <input
type="reset"  value="Reset">
</td>
</tr>

</table>
</center>
</form>
<%-- Create the bean only when the form is posted --%>
<%
if (request.getMethod().equals("POST"))
     {
%>
<jsp:useBean id="formHandler"
class="com.shopping.FormBean">
<%-- provide a setProperty tag and ensure that the
setter methods are invoked via introspection 
--%>
<jsp:setProperty name="formHandler" property="*"/>
</jsp:useBean>
<p>
<hr>
<font color=red>
<b>You submitted:<P>
First Name:</b><br>
<%-- invoke the getter method to display the firstName
using the getProperty tag --%>
<jsp:getProperty name="formHandler"
property="firstName"/><br>
<br><b>Last Name:</b><br>
<%-- invoke the getter method to display the lastName
using the getProperty tag --%>
<jsp:getProperty name="formhandler"
property="lastName"/><br>
<br><b>Email:</b><br>
<%-- invoke the getter method to display the email
address using the getProperty tag 
<jsp:getProperty name="formHandler"
property="email"/><br>
--%>
<b>Languages:</b><br>
<%
   String[] lang = formHandler.getLanguages();
   if (!lang[0].equals("1")) 
       {
        out.println("<ul>");
        for (int i=0; i<lang.length; i++)
            out.println("<li>"+lang[i]);
        out.println("</ul>");
       }
   else out.println("Nothing was selected<br>");
%>
<b>Notification:</b><br>
<%-- invoke the getter method to display the
notification status using the getProperty tag 
--%>
<jsp:getProperty name="formHandler"
property="notify"/><br>
<br>
<%
}
%>
</font>
</body>
</html>

I think this would be better as an attachment but lots
of mailing lists don't like those, so ugly or not,
there it is.  Thanks.

Ken

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Trouble running a servlet

Posted by Tim O'Neil <ti...@xythos.com>.
At 02:46 PM 8/15/2001, you wrote:
>   I'm trying to run Tomcat on W2K disconnected from
>the Internet.  In asking for help, I got one reply
>which said
>What solved the last of my disconnected-laptop
>issues (on Win98 at least)
>was adding a LOCALHOST entry in
>"c:\windows\hosts" (create it if needed):
>
>   127.0.0.1 localhost
>
>Win98 looks here first before it tries accessing
>your configured DNS
>servers, which is when it would try to access the
>network.
>
>Unfortunately, my system already has hosts files and
>they all include 127.0.01 localhost.  Thanks.

No, it MUST be "127.0.0.1", what you have there is
a typo. Also, there's only one file it should be in,
"hosts". Anything else is a mistake or a Microsoft
machination (LMHOSTS is not a traditional network config
file). If that's not working for you try addressing
your server as "http://127.0.0.1/" + your tomcat examples
dir, that will work.


RE: Trouble running a servlet

Posted by Martin van den Bemt <ma...@isallineed.org>.
thats a host sample file.. It has to be called hosts (you can copy the
hosts.sam to hosts if you want..)

Mvgr,
Martin

> -----Original Message-----
> From: Dmitri Colebatch [mailto:dim@bigpond.net.au]
> Sent: Wednesday, August 15, 2001 2:25 AM
> To: tomcat-user@jakarta.apache.org
> Cc: richard@protected-data.com; javajedi2@yahoo.com
> Subject: Re: Trouble running a servlet
>
>
> thats c:\windows\hosts.sam isn't it?
>
> On Tue, 14 Aug 2001, Craig R. McClanahan wrote:
>
> >
> >
> > On Tue, 14 Aug 2001, Kenneth Litwak wrote:
> >
> > >    Okay, I made my Win 2000  trouble go away by
> > > removing proxy settings in NetscRape and signing on to
> > > the Internet through my ISP.  Now everything works
> > > fine.  The question I have still, however, is:  how
> > > can I avoid this?  I should not have to tie up my
> > > phone line just to use Tomcat on my PC.  That's silly.
> > >  How can I get around this please? Thanks.
> > >
> >
> > What solved the last of my disconnected-laptop issues (on Win98
> at least)
> > was adding a LOCALHOST entry in "c:\windows\hosts" (create it
> if needed):
> >
> >   127.0.0.1 localhost
> >
> > Win98 looks here first before it tries accessing your configured DNS
> > servers, which is when it would try to access the network.
> >
> > > Ken
> > >
> >
> > Craig
> >
> >
>
>


Re: Trouble running a servlet

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
thats c:\windows\hosts.sam isn't it?

On Tue, 14 Aug 2001, Craig R. McClanahan wrote:

> 
> 
> On Tue, 14 Aug 2001, Kenneth Litwak wrote:
> 
> >    Okay, I made my Win 2000  trouble go away by
> > removing proxy settings in NetscRape and signing on to
> > the Internet through my ISP.  Now everything works
> > fine.  The question I have still, however, is:  how
> > can I avoid this?  I should not have to tie up my
> > phone line just to use Tomcat on my PC.  That's silly.
> >  How can I get around this please? Thanks.
> > 
> 
> What solved the last of my disconnected-laptop issues (on Win98 at least)  
> was adding a LOCALHOST entry in "c:\windows\hosts" (create it if needed):
> 
>   127.0.0.1 localhost
> 
> Win98 looks here first before it tries accessing your configured DNS
> servers, which is when it would try to access the network.
> 
> > Ken
> > 
> 
> Craig
> 
> 


Re: Trouble running a servlet

Posted by Kenneth Litwak <ja...@yahoo.com>.
  I'm trying to run Tomcat on W2K disconnected from
the Internet.  In asking for help, I got one reply
which said
What solved the last of my disconnected-laptop 
issues (on Win98 at least)  
was adding a LOCALHOST entry in 
"c:\windows\hosts" (create it if needed):

  127.0.0.1 localhost

Win98 looks here first before it tries accessing 
your configured DNS
servers, which is when it would try to access the 
network.

Unfortunately, my system already has hosts files and
they all include 127.0.01 localhost.  Thanks.


Ken


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Trouble running a servlet

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 14 Aug 2001, Kenneth Litwak wrote:

>    Okay, I made my Win 2000  trouble go away by
> removing proxy settings in NetscRape and signing on to
> the Internet through my ISP.  Now everything works
> fine.  The question I have still, however, is:  how
> can I avoid this?  I should not have to tie up my
> phone line just to use Tomcat on my PC.  That's silly.
>  How can I get around this please? Thanks.
> 

What solved the last of my disconnected-laptop issues (on Win98 at least)  
was adding a LOCALHOST entry in "c:\windows\hosts" (create it if needed):

  127.0.0.1 localhost

Win98 looks here first before it tries accessing your configured DNS
servers, which is when it would try to access the network.

> Ken
> 

Craig


Re: Trouble running a servlet

Posted by Kenneth Litwak <ja...@yahoo.com>.
   Okay, I made my Win 2000  trouble go away by
removing proxy settings in NetscRape and signing on to
the Internet through my ISP.  Now everything works
fine.  The question I have still, however, is:  how
can I avoid this?  I should not have to tie up my
phone line just to use Tomcat on my PC.  That's silly.
 How can I get around this please? Thanks.

Ken

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Trouble running a servlet

Posted by Richard Draucker <ri...@draucker.com>.
Before you try modifying your "server.xml" file, are you able to run the 
Tomcat examples?  If so, you should be able to drop your LibraryServlet into 
the webapps/examples/WEB-INF/classes directory and hit it at:
http://localhost:8080/examples/servlet/LibraryServlet

If you can't run the Tomcat examples, then your problem is something greater 
than matching the Url to your LibraryServlet.

 - Richard


On Tuesday 14 August 2001 12:04 pm, you wrote:
>   I'm afraid this it doens't work in ROOT or examples.
> How would I create a context for ROOT?  Another pster
> told me I needed to look at my servlet.xml file which
> should be in the config directory.  I don't know how
> the names difer between platforms, but my "Conf"
> directory under jakarta-tomcat-3.2.1 doens't have a
> servlet.xml file.  What ight it be called instead on
> Win 2000?  Thanks.
>
>
> Ken
>
> Your output from starting TOMCAT (in your earlier
> post) did not indicate a
> context being created for "ROOT", just "examples"
> and "admin".  Try putting
> it in the "examples" application and use the same
> url syntax:
>
> http://localhost:8080/examples/servlet/LibraryServlet
>
> As delivered, TOMCAT uses ROOT as the default
> webapp.  So, you may also be
> able to reach the application at:
>
> http://localhost:8080/servlet/LibraryServlet
>
> - Richard
>
> On Monday 13 August 2001 07:40 pm, you wrote:
> >     I still make make this work.  I've made
>
> sure my
>
> > servlet class is in
> > TOMCAT_HOME\webapps\ROOT\WEB-INF\clsses and get
>
> this
>
> > Not Found (404)
> >
> > Original request:
> > http://localhost:8080/servlet/LibraryServlet
> >
> > Not found request:
> > http://localhost:8080/servlet/LibraryServlet
> >
> > This has to be something basic, and it's got to
>
> be me,
>
> > but I cna't figure out what is wrong.  Thanks.
> >
> >
> > Ken
>
> __
> Richard Draucker richard@protected-data.com
> Protected-Data.Com www.protected-data.com
> Remote Data Support For Web Developers
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/

-- 
Richard Draucker richard@protected-data.com
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers


Re: Trouble running a servlet

Posted by Kenneth Litwak <ja...@yahoo.com>.
  I'm afraid this it doens't work in ROOT or examples.
How would I create a context for ROOT?  Another pster
told me I needed to look at my servlet.xml file which
should be in the config directory.  I don't know how
the names difer between platforms, but my "Conf"
directory under jakarta-tomcat-3.2.1 doens't have a
servlet.xml file.  What ight it be called instead on
Win 2000?  Thanks.


Ken

Your output from starting TOMCAT (in your earlier 
post) did not indicate a 
context being created for "ROOT", just "examples" 
and "admin".  Try putting 
it in the "examples" application and use the same 
url syntax:

http://localhost:8080/examples/servlet/LibraryServlet

As delivered, TOMCAT uses ROOT as the default 
webapp.  So, you may also be 
able to reach the application at:

http://localhost:8080/servlet/LibraryServlet

- Richard




On Monday 13 August 2001 07:40 pm, you wrote:
>     I still make make this work.  I've made 
sure my
> servlet class is in
> TOMCAT_HOME\webapps\ROOT\WEB-INF\clsses and get 
this
> Not Found (404)
>
> Original request:
> http://localhost:8080/servlet/LibraryServlet
>
> Not found request:
> http://localhost:8080/servlet/LibraryServlet
>
> This has to be something basic, and it's got to 
be me,
> but I cna't figure out what is wrong.  Thanks.
>
>
> Ken
>
> 
__
Richard Draucker richard@protected-data.com
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Trouble running a servlet

Posted by Kenneth Litwak <ja...@yahoo.com>.
  Well, I still haven't been able to make tomcat work
for me on Win 2000.  Interestingly, I went to a
different machine, running Solaris 8.  I downloaded
Tomcat 3.2.3, instlaled it, put my code in the
Root/classes, and ran it with
http://localhost:8080/servlet/LibraryServlet
and it worked like a champ.  
The only real diference between the Solaris setup
(besdies it being Solaris) and the Win 2000 setup is
that on Win 2000, I've got Netscape set up touse a
manual proxy, and in that state, Netwcape won't talk
to the Internet.  On the Solaris machine, whre I can
talk to the Internet and also go to localhost:8080,
things work fine.  Does this help at all in
determining why the Win 2000 setup won't work? 
Thanks.


Ken

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Trouble running a servlet

Posted by Richard Draucker <ri...@draucker.com>.
Your output from starting TOMCAT (in your earlier post) did not indicate a 
context being created for "ROOT", just "examples" and "admin".  Try putting 
it in the "examples" application and use the same url syntax:

http://localhost:8080/examples/servlet/LibraryServlet

As delivered, TOMCAT uses ROOT as the default webapp.  So, you may also be 
able to reach the application at:

http://localhost:8080/servlet/LibraryServlet

- Richard




On Monday 13 August 2001 07:40 pm, you wrote:
>     I still make make this work.  I've made sure my
> servlet class is in
> TOMCAT_HOME\webapps\ROOT\WEB-INF\clsses and get this
> Not Found (404)
>
> Original request:
> http://localhost:8080/servlet/LibraryServlet
>
> Not found request:
> http://localhost:8080/servlet/LibraryServlet
>
> This has to be something basic, and it's got to be me,
> but I cna't figure out what is wrong.  Thanks.
>
>
> Ken
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/

-- 
Richard Draucker richard@protected-data.com
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers


Re: Trouble running a servlet

Posted by Kenneth Litwak <ja...@yahoo.com>.
    I still make make this work.  I've made sure my
servlet class is in
TOMCAT_HOME\webapps\ROOT\WEB-INF\clsses and get this
Not Found (404)

Original request:
http://localhost:8080/servlet/LibraryServlet

Not found request:
http://localhost:8080/servlet/LibraryServlet 

This has to be something basic, and it's got to be me,
but I cna't figure out what is wrong.  Thanks.


Ken

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Re: Trouble running a servlet

Posted by Jan Labanowski <jk...@osc.edu>.
Try http://localhost:8080/servlet/MyServletClass
assuming that your class is in 
$TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/MyServletClass.class
 


On Mon, 13 Aug 2001, Kenneth Litwak wrote:

>     I'm trying to run a basic servlet tutorial using
> tomcat on Win 2000 with Netscape. It doens't work.
> 
> I start tomcat, and get
> 2001-08-13 03:34:12 - ContextManager: Adding context
> Ctx( /examples )
> 2001-08-13 03:34:12 - ContextManager: Adding context
> Ctx( /admin )
> Starting tomcat. Check logs/tomcat.log for error
> messages
> 2001-08-13 03:34:12 - ContextManager: Adding context
> Ctx(  )
> 2001-08-13 03:34:12 - ContextManager: Adding context
> Ctx( /test )
> 2001-08-13 03:34:13 - PoolTcpConnector: Starting
> HttpConnectionHandler on 8080
> 2001-08-13 03:34:13 - PoolTcpConnector: Starting
> Ajp12ConnectionHandler on 8007
> 
> Next, I go to Netscpae and tyr to opne a page.  The
> final URL i sue is 
> http://localhost:8080/ROOT/WEB-INF/classes/MyServletClass.class
> That fails with a 404
> 
> THen I moved he code and tried
> http:/localhost:8080/webapps/examples/WEB-INF/classes/Myservletcalss.class
> That didn't work either.  The tomcat screen in both
> cases listed the URL, followed by the word "null".  
> I khave doen this under the ROOT directory wiht a
> servlet on Solaris without a hitch Now that I'm trying
> it on WIndows in a diferent environment, it won/t
> work.
> 
> I've tried changing the Netscape settings for ptoxy. 
> I swithced them to "Manual proxy", and set the http IP
> address to 127..01, and the prot for everything to
> 8080.  This still doens't work.  I'm not trying to do
> anything fancy.  I jsut want to be able to stat the
> sever, and code and run JSPs and servlets.  I'd
> appreciate help with this basic problem.  Thanks.
> 
>    If it matters,I'm not on the Internet, but I was
> told htat's irrelevant. 
> 
> Ken
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
> 

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