You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anthony Dell'Anno <an...@yahoo.com.INVALID> on 2023/01/12 23:18:23 UTC

Servlet Deployment Issues

Good evening everyone,
I am just starting out with Java servlets in Tomcat 10.1.4.
I’m learning them using a book written in 2010, of which I don’t remember the authors’ names.
The book does a good job of explaining code samples, but doesn’t describe any solutions to HTTP errors.
I have a HelloWorld servlet, located in my tomcat_home/webapps/servlet_files/classes/hello_app directory, with the corresponding web.xml file located just outside of that folder.
The same directory structure is the same for servlet #2.
The URL pattern for HelloWorld is /HelloWorld, and the second servlet’s web.xml URL pattern is /HelloWorld_Two.
In both instances, I receive HTTPError 404 messages when attempting to run either of them.
Can anybody help me?
Thank you,
Anthony 

Sent from Yahoo Mail for iPhone

Re: Servlet Deployment Issues

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Anthony,

On 1/13/23 12:03, Anthony Dell'Anno wrote:
> Chris,
> No, I haven’t seen those replies, but I have changed from JavaFX to Jakarta, as StackOverflow suggested that, too.
> What I’m experiencing now, is the old version of my HelloWorld class running, when I’ve updated it slightly, have recompiled it, and have placed the new class file in the webapps directory.
> Do you, or does anybody else have sny servlet book suggestions?
> Amazon only had this and one other that was even older.

Please go back and read the responses from the other day. Check the 
(threaded) mailing list archives. The subject was "Tomcat 10.1.4 HTTP 
Status 404 and 500 Help". Some of your questions have already been answered.

-chris

> On Friday, January 13, 2023, 8:23 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:
> 
> Anthony,
> 
> On 1/12/23 18:18, Anthony Dell'Anno wrote:
>> Good evening everyone,
>> I am just starting out with Java servlets in Tomcat 10.1.4.
>> I’m learning them using a book written in 2010, of which I don’t remember the authors’ names.
> 
> Just FYI, a book written in 2010 will be using the Java EE or old
> servlet, etc. package names while Tomcat 10 will want you to use the new
> ones. Without going into too much detail, you basically want to change
> every instance of:
> 
> javax.[stuff]
> 
> To:
> 
> jakarta.[stuff]
> 
>> The book does a good job of explaining code samples, but doesn’t
>> describe any solutions to HTTP errors.
> That's appropriate, depending on the error(s) you are seeing. A book
> about Java servlets and containers is already going to be pretty long;
> adding the details of HTTP would roughly double the size of the book.
> 
>> I have a HelloWorld servlet, located in my
>> tomcat_home/webapps/servlet_files/classes/hello_app directory, with
>> the corresponding web.xml file located just outside of that folder.
>>
>> The same directory structure is the same for servlet #2. The URL
>> pattern for HelloWorld is /HelloWorld, and the second servlet’s
>> web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
>> HTTPError 404 messages when attempting to run either of them. >
>> Can anybody help me?
> 
> Did you see any of the replies sent back to this list on this topic from
> Jan 10th and Jan 11th? I think there are already some ideas in there,
> and some questions, too.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 

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


Re: Servlet Deployment Issues

Posted by Anthony Dell'Anno <an...@yahoo.com.INVALID>.
Chris,
No, I haven’t seen those replies, but I have changed from JavaFX to Jakarta, as StackOverflow suggested that, too.
What I’m experiencing now, is the old version of my HelloWorld class running, when I’ve updated it slightly, have recompiled it, and have placed the new class file in the webapps directory.
Do you, or does anybody else have sny servlet book suggestions?
Amazon only had this and one other that was even older.


Sent from Yahoo Mail for iPhone


On Friday, January 13, 2023, 8:23 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:
> Good evening everyone,
> I am just starting out with Java servlets in Tomcat 10.1.4.
> I’m learning them using a book written in 2010, of which I don’t remember the authors’ names.

Just FYI, a book written in 2010 will be using the Java EE or old 
servlet, etc. package names while Tomcat 10 will want you to use the new 
ones. Without going into too much detail, you basically want to change 
every instance of:

javax.[stuff]

To:

jakarta.[stuff]

> The book does a good job of explaining code samples, but doesn’t
> describe any solutions to HTTP errors.
That's appropriate, depending on the error(s) you are seeing. A book 
about Java servlets and containers is already going to be pretty long; 
adding the details of HTTP would roughly double the size of the book.

> I have a HelloWorld servlet, located in my
> tomcat_home/webapps/servlet_files/classes/hello_app directory, with
> the corresponding web.xml file located just outside of that folder.
> 
> The same directory structure is the same for servlet #2. The URL
> pattern for HelloWorld is /HelloWorld, and the second servlet’s
> web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
> HTTPError 404 messages when attempting to run either of them. >
> Can anybody help me?

Did you see any of the replies sent back to this list on this topic from 
Jan 10th and Jan 11th? I think there are already some ideas in there, 
and some questions, too.

-chris

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





Re: Servlet Deployment Issues

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:
> Good evening everyone,
> I am just starting out with Java servlets in Tomcat 10.1.4.
> I’m learning them using a book written in 2010, of which I don’t remember the authors’ names.

Just FYI, a book written in 2010 will be using the Java EE or old 
servlet, etc. package names while Tomcat 10 will want you to use the new 
ones. Without going into too much detail, you basically want to change 
every instance of:

javax.[stuff]

To:

jakarta.[stuff]

> The book does a good job of explaining code samples, but doesn’t
> describe any solutions to HTTP errors.
That's appropriate, depending on the error(s) you are seeing. A book 
about Java servlets and containers is already going to be pretty long; 
adding the details of HTTP would roughly double the size of the book.

> I have a HelloWorld servlet, located in my
> tomcat_home/webapps/servlet_files/classes/hello_app directory, with
> the corresponding web.xml file located just outside of that folder.
> 
> The same directory structure is the same for servlet #2. The URL
> pattern for HelloWorld is /HelloWorld, and the second servlet’s
> web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
> HTTPError 404 messages when attempting to run either of them. >
> Can anybody help me?

Did you see any of the replies sent back to this list on this topic from 
Jan 10th and Jan 11th? I think there are already some ideas in there, 
and some questions, too.

-chris

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