Hi Shay

Still having problems with reading html form with servlet.

We only have a small number of servlets and would choose not to place
them in a package at this point in time.

I understand your naming of package com.company.project, can you
replace com\mycompany\Myservlet.class. What is the link between them.

I noted your comment on web.xml file  Have been using tomcat for 3/4
years and have most probably got away with murder using invoker
servlet and mapping of.

I attach a file with html form action, server start up log, web.xml
file and error http 404

We only have a small number of servlets and would choose not to place
them in a package at this point in time.

I understand your naming of package com.company.project, can you
replace com\mycompany\

On 28 June 2010 13:26, Shay Rojansky <r...@roji.org> wrote:
> Hi John.
>
> Both John and I were right... Moving your directory outside ROOT was the
> first step.
>
> Now, in your web.xml, the <servlet-class> element is wrong. It should
> contain a servlet class that should be found under your WEB-INF/classes
> directory. So if you want to reference the class that you have under
> comlinks\WEB-INF\classes\com\mycompany\MyServlet.class, simply put
> "com.mycompany.MyServlet" in the <servlet-class> element.
>
> By the way, it's hard to tell what your class name and package actually are.
> It's a good idea to follow conventions and place it in a package called
> com.company.project
>
> Shay
>
> On Mon, Jun 28, 2010 at 5:11 AM, John Byrne <jbmulti...@gmail.com> wrote:
>
>> Hi Shay
>>
>> copy of directory structure
>>
>> C:\Tomcat 6.0\webapps\comlinks\WEB-INF\classes>
>>
>> I have changed this it incorporate your suggestions.
>>
>> I attach a copy of web.xml
>>
>> many thanks for your help.
>>
>> Kind Regards
>>
>> John
>>
>> On 27 June 2010 15:54, Shay Rojansky <r...@roji.org> wrote:
>> > John,
>> >
>> > Can you please send your web.xml as well? I would be it's a misconfigured
>> > <servlet> in there (the WEB-INF should not be part of the class package
>> > name, as it appears in your error log).
>> >
>> > Shay
>> >
>> > On Sun, Jun 27, 2010 at 7:55 AM, John Byrne <jbmulti...@gmail.com>
>> wrote:
>> >
>> >> Hi
>> >>
>> >> Have installed tomcat 6.0.26 on windows 7.
>> >>
>> >> Have installed jdk1.6.0_20 to use with tomcat
>> >>
>> >> The javac and java commands both give correct response at dos prompt.
>> >>
>> >> The log for server start up reports no errors.
>> >>
>> >> The index page displays ok
>> >>
>> >> The manager page displays ok
>> >>
>> >> The example HelloWorld works ok
>> >>
>> >> The application webpages display ok.
>> >>
>> >> The problem appears to be with the servlet that reads the form data in
>> >> html page.
>> >>
>> >> I use default install structure for tomcat.  I add a applications
>> >> folder under TOMCAT 6.0\webapps\ROOT\myfoloder
>> >> Also add classes folder under tomcat 6.0\webapps\ROOT\WEB-INF\classes
>> >>
>> >> I attach copy of server start up log and http 500 error text when I
>> >> use the submit button on html page to activate servlet.
>> >>
>> >> would greatly appreciate your help.
>> >>
>> >> John Byrne
>> >>
>> >> --
>> >> Mult-i-tel better by design.
>> >>
>> >> http://www.multitel.co.uk
>> >>
>> >> tel: 44(0)151 548 8122
>> >> fax: 44(0)709 210 1464
>> >> skype jcbyrne
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >> For additional commands, e-mail: users-h...@tomcat.apache.org
>> >>
>> >
>>
>>
>>
>> --
>> Mult-i-tel better by design.
>>
>> http://www.multitel.co.uk
>>
>> tel: 44(0)151 548 8122
>> fax: 44(0)709 210 1464
>> skype jcbyrne
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>



-- 
Mult-i-tel better by design.

http://www.multitel.co.uk

tel: 44(0)151 548 8122
fax: 44(0)709 210 1464
skype jcbyrne
01-Jul-2010 10:04:06 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performan
e in production environments was not found on the java.library.path: C:\Tomcat
.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\PROGRAM FILE
\Jdk1.6.0_20\BIN
01-Jul-2010 10:04:06 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
01-Jul-2010 10:04:06 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 956 ms
01-Jul-2010 10:04:06 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
01-Jul-2010 10:04:06 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
01-Jul-2010 10:04:06 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
01-Jul-2010 10:04:07 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
01-Jul-2010 10:04:07 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory comlinks
01-Jul-2010 10:04:07 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
01-Jul-2010 10:04:07 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
01-Jul-2010 10:04:08 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
01-Jul-2010 10:04:08 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
01-Jul-2010 10:04:08 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
01-Jul-2010 10:04:08 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
01-Jul-2010 10:04:08 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1754 ms

**********************************************

HTML FORM ACTION

<FORM action=/servlet/ukjava1900 method="post" name="payform"
onsubmit = "return formCheck()">

***********************************************


<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<web-app xmlns="http://java.sun.com/xml/ns/javaee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
   version="2.5">

  <display-name>Welcome to Mult-i-tel International</display-name>
  <description>
     Welcome to Mult-i-tel International
  </description>


  <servlet>
    <servlet-name>ukjava1900</servlet-name>
    <servlet-class>com.multitel.ukjava1900</servlet-class>
  </servlet>



  <servlet-mapping>
    <servlet-name>ukjava1900</servlet-name>
    <url-pattern>/com/multitel/ukjava1900</url-pattern>
  </servlet-mapping>


</web-app>

********************************
HTTP Status 404 - /servlet/ukjava1900

type Status report

message /servlet/ukjava1900

description The requested resource (/servlet/ukjava1900) is not available.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to